// // Copyright (C) 2011-15 DyND Developers // BSD 2-Clause License, see LICENSE.txt // #pragma once #include namespace dynd { namespace nd { template struct imag_kernel : base_strided_kernel, 1> { typedef typename type_of::type complex_type; typedef typename complex_type::value_type real_type; void single(char *dst, char *const *src) { *reinterpret_cast(dst) = reinterpret_cast(src[0])->imag(); } }; } // namespace dynd::nd namespace ndt { template struct traits> { static type equivalent() { return callable_type::make(make_type::real_type>(), {make_type::complex_type>()}); } }; } // namespace dynd::ndt } // namespace dynd