提交 3643e997 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

added c_support_code in omega_op

上级 58a674a3
...@@ -204,6 +204,9 @@ class omega_op(gof.PythonOp): ...@@ -204,6 +204,9 @@ class omega_op(gof.PythonOp):
def c_libs(self): def c_libs(self):
return [] return []
def c_support_code(self):
return ""
def variable_names(self): def variable_names(self):
(inames, onames), _1, _2, _3 = inspect.getargspec(self.c_impl) (inames, onames), _1, _2, _3 = inspect.getargspec(self.c_impl)
return (inames, onames) return (inames, onames)
...@@ -227,7 +230,7 @@ class omega_op(gof.PythonOp): ...@@ -227,7 +230,7 @@ class omega_op(gof.PythonOp):
local_dict = d, local_dict = d,
global_dict = {}, global_dict = {},
type_converters = converters) type_converters = converters)
instantiate.customize.add_support_code(struct) instantiate.customize.add_support_code(self.c_support_code() + struct)
instantiate.customize.add_extra_compile_arg("-O3") instantiate.customize.add_extra_compile_arg("-O3")
instantiate.customize.add_extra_compile_arg("-ffast-math") instantiate.customize.add_extra_compile_arg("-ffast-math")
instantiate.customize.add_extra_compile_arg("-falign-loops=4") instantiate.customize.add_extra_compile_arg("-falign-loops=4")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论