extra_compile_args.append("-std=c99")
+define_macros=[]
undef_macros=[]
+for arg in sys.argv:
+ if arg.startswith("--STRIDE="):
+ stride = int(arg[len("--stride="):])
+ define_macros.append(('STRIDE', stride))
+ break
+
+sys.argv.remove(arg)
+
+
if DEBUGMODE:
extra_compile_args.append("-O0")
extra_compile_args.append("-g")
setup_requires=setup_requires,
classifiers=trove_classifiers,
entry_points = { 'console_scripts': [ 'zfec = %s.cmdline_zfec:main' % PKG, 'zunfec = %s.cmdline_zunfec:main' % PKG ] },
- ext_modules=[Extension(PKG+'._fec', [PKG+'/fec.c', PKG+'/_fecmodule.c',], extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, undef_macros=undef_macros),],
+ ext_modules=[Extension(PKG+'._fec', [PKG+'/fec.c', PKG+'/_fecmodule.c',], extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, undef_macros=undef_macros, define_macros=define_macros),],
test_suite=PKG+".test",
zip_safe=False, # I prefer unzipped for easier access.
)
/* To make sure that we stay within cache in the inner loops of fec_encode()
and fec_decode(). */
+#ifndef STRIDE
#define STRIDE 8192
+#endif
void
fec_encode(const fec_t* code, const gf*restrict const*restrict const src, gf*restrict const*restrict const fecs, const unsigned*restrict const block_nums, size_t num_block_nums, size_t sz) {