[vsipl++] [patch] matvec: dot, trans, kron

Jules Bergmann jules at codesourcery.com
Mon Sep 19 10:08:38 UTC 2005


Don,

Looks, good.  Can you try out the changes to trans and see if it works? 
  My suggestion for herm needs a proper return type to work, so let's 
keep the current version of that for now.

Please check in.

				-- Jules


Don McCoy wrote:
> The attached patch implements some of the matrix and vector operations.  
> I tested it against the functions in ref-impl/math-matvec.cpp and it 
> passes up through kron().  Also wrote a supplementary test for kron that 
> checks it when called with matrix views [matvec.cpp] (not checked in 
> ref-impl tests).
> 
> Don


> +  

For trans and herm, I was thinking we should be able to directly return 
the subview:

> + // Transpositions  [math.matvec.transpose]
> + 
> + /// transpose
> + template <typename T, typename Block>

constMatrix<T, Block>::transpose_view

> + trans(const_Matrix<T, Block> m) VSIP_NOTHROW
> + {
> +   return ( Matrix<T>(m.transpose()) );

       return m.transpose();

> + }



> + 
> + /// 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());

> + }



> + 



More information about the vsipl++ mailing list