提交 960a5469 authored 作者: James Bergstra's avatar James Bergstra

Added constructors to theano_complex class definition in scalar.basic.

This causes the conversion tests to pass (now that the code compiles) with recent gcc (on sencha machine in the lab).
上级 8d34f1cb
...@@ -204,6 +204,12 @@ class Scalar(Type): ...@@ -204,6 +204,12 @@ class Scalar(Type):
} }
template <typename T> template <typename T>
complex_type& operator =(const T& y); complex_type& operator =(const T& y);
theano_complex%(nbits)s() {}
template <typename T>
theano_complex%(nbits)s(const T& y) { *this = y; }
}; };
""" """
operator_eq = """ operator_eq = """
...@@ -241,6 +247,7 @@ class Scalar(Type): ...@@ -241,6 +247,7 @@ class Scalar(Type):
def c_code_cache_version(self): def c_code_cache_version(self):
#return () #return ()
# no need to put lib.amdlibm here as c_compile_args() are put in the key. # no need to put lib.amdlibm here as c_compile_args() are put in the key.
return (5,) #added constructors to theano_complex class
return (4,) #explicit T given in specialization of operator= lines. This makes it compile with open64 return (4,) #explicit T given in specialization of operator= lines. This makes it compile with open64
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论