| 36 | |
| 37 | template<typename To, typename Ti> |
| 38 | Array<To> imag(const Array<Ti> &in) { |
| 39 | common::Node_ptr in_node = in.getNode(); |
| 40 | common::UnaryNode *node = |
| 41 | new common::UnaryNode(static_cast<af::dtype>(dtype_traits<To>::af_type), |
| 42 | "__cimag", in_node, af_imag_t); |
| 43 | |
| 44 | return createNodeArray<To>(in.dims(), common::Node_ptr(node)); |
| 45 | } |
| 46 | |
| 47 | template<typename T> |
| 48 | static const char *abs_name() { |