提交 80c31e7b authored 作者: abergeron's avatar abergeron 提交者: GitHub

Merge pull request #5244 from nouiz/conj_c_code

Add c code for conj except for complex
...@@ -3607,6 +3607,16 @@ class Conj(UnaryScalarOp): ...@@ -3607,6 +3607,16 @@ class Conj(UnaryScalarOp):
def impl(self, x): def impl(self, x):
return numpy.conj(x) return numpy.conj(x)
def c_code(self, node, name, inputs, outputs, sub):
(x,) = inputs
(z,) = outputs
if node.inputs[0].type in complex_types:
# For non complex, th
raise NotImplementedError('type have no c code',
node.inputs[0].type)
return "%(z)s = %(x)s;" % locals()
conj = Conj(same_out_min8, name='conj') conj = Conj(same_out_min8, name='conj')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论