[vsipl++] [patch] matvec: dot, trans, kron
Stefan Seefeld
stefan at codesourcery.com
Mon Sep 19 19:05:13 UTC 2005
Jules Bergmann wrote:
>> + + /// conjugate transpose
>> + template <typename T, typename Block>
>> + const_Matrix<complex<T> >
>
>
> Uh, the return type for herm is a bit more complex... Maybe Stefan can
> suggest a type to use. If not, go ahead and keep the current function.
>
>
>> + herm(const_Matrix<complex<T>, Block> m) VSIP_NOTHROW
>> + {
>> + return Matrix<complex<T> >(conj(m.transpose()));
>
> return conj(m.transpose());
>
>> + }
what about
template <typename T, typename Block>
typename Unary_func_view<conj_functor,
typename const_Matrix<complex<T>,
Block>::transpose_type>::result_type
herm(const_Matrix<complex<T>, Block> m) VSIP_NOTHROW
{
typedef typename const_Matrix<complex<T>, Block>::transpose_type transpose_type;
typedef Unary_func_view<conj_functor, transpose_type> functor_type;
return functor_type::apply(m.transpose());
}
This assumes the conj_functor is already defined (through the macro
machinery in fns_elementwise.hpp that defines the conj function).
Regards,
Stefan
More information about the vsipl++
mailing list