| 59 | |
| 60 | template<typename To, typename Ti> |
| 61 | Array<To> abs(const Array<Ti> &in) { |
| 62 | common::Node_ptr in_node = in.getNode(); |
| 63 | common::UnaryNode *node = |
| 64 | new common::UnaryNode(static_cast<af::dtype>(dtype_traits<To>::af_type), |
| 65 | abs_name<Ti>(), in_node, af_abs_t); |
| 66 | |
| 67 | return createNodeArray<To>(in.dims(), common::Node_ptr(node)); |
| 68 | } |
| 69 | |
| 70 | template<typename T> |
| 71 | static const char *conj_name() { |