CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions
BLAS3 -- Matrix/Matrix operations

Functions

template<class V , class M , class L >
void cuv::prod (tensor< V, M, L > &C, const tensor< V, M, L > &A, const tensor< V, M, L > &B, char transA='n', char transB='n', const float &factAB=1.f, const float &factC=0.f)
 Matrix multiplication and other BLAS3 functionality.
template<class V , class M , class L >
void cuv::prod (tensor< V, M, L > &C, const tensor< V, M, L > &A, const tensor< V, M, typename other_memory_layout< L >::type > &B, const float &factAB=1.f, const float &factC=0.f)
template<class V , class M , class L >
void cuv::prod (tensor< V, M, L > &C, const tensor< V, M, typename other_memory_layout< L >::type > &A, const tensor< V, M, L > &B, const float &factAB=1.f, const float &factC=0.f)
template<class V , class M , class L >
void cuv::prod (tensor< V, M, L > &C, const dia_matrix< V, M > &A, const tensor< V, M, L > &B, char transA='n', char transB='n', const float &factAB=1.f, const float &factC=0.f)
template<class V , class M , class L >
void cuv::transpose (tensor< V, M, L > &dst, const tensor< V, M, L > &src)
 Transpose a matrix.
template<class V , class T , class M >
cuv::tensor< V, T, typename
other_memory_layout< M >::type > * 
cuv::transposed_view_p (cuv::tensor< V, T, M > &src)
 Transpose a matrix by creating a view with different storage.
template<class V , class T , class M >
std::auto_ptr< cuv::tensor< V,
T, typename
other_memory_layout< M >::type > > 
cuv::transposed_view (cuv::tensor< V, T, M > &src)
 As in.
template<class V , class T , class M >
const cuv::tensor< V, T,
typename other_memory_layout
< M >::type > * 
cuv::transposed_view_p (const cuv::tensor< V, T, M > &src)
 Const variant of.
template<class V , class T , class M >
std::auto_ptr< const
cuv::tensor< V, T, typename
other_memory_layout< M >::type > > 
cuv::transposed_view (const cuv::tensor< V, T, M > &src)
 As in.

Detailed Description

Function Documentation

template<class V , class M , class L >
void cuv::prod ( tensor< V, M, L > &  C,
const tensor< V, M, L > &  A,
const tensor< V, M, L > &  B,
char  transA = 'n',
char  transB = 'n',
const float &  factAB = 1.f,
const float &  factC = 0.f 
)

Matrix multiplication and other BLAS3 functionality.

Parameters
CDestination matrix
AFirst matrix for product
BSecond matrix for product
transAWhether to transpose A before calculating the matix product. Possible values 'n' for "do Not transpose" and 't' for "Transpose".
transBWhether to transpose B befor calculating the matrix product. Possible values 'n' for "do Not transpose" and 't' for "Transpose".
factABScalar factor to multiply the product of A and B with.
factCScalar factor to multiply former entries of C with.

Calculates C = factC * C + factAB * transA(A)*transB(B) Here transA(A) is the transpose of A if transA = 't' and transA(A) is A if transA = 'n'. The analogue is true for transB(B). In the above transA(A)*transB(B) is the matrix product and all other operations are pointwise. This is a thin wrapper of CUBLAS.

template<class V , class M , class L >
void cuv::prod ( tensor< V, M, L > &  C,
const tensor< V, M, L > &  A,
const tensor< V, M, typename other_memory_layout< L >::type > &  B,
const float &  factAB = 1.f,
const float &  factC = 0.f 
)
See Also
prod

Definition at line 105 of file matrix_ops.hpp.

template<class V , class M , class L >
void cuv::prod ( tensor< V, M, L > &  C,
const tensor< V, M, typename other_memory_layout< L >::type > &  A,
const tensor< V, M, L > &  B,
const float &  factAB = 1.f,
const float &  factC = 0.f 
)
See Also
prod

Definition at line 111 of file matrix_ops.hpp.

template<class V , class M , class L >
void cuv::prod ( tensor< V, M, L > &  C,
const dia_matrix< V, M > &  A,
const tensor< V, M, L > &  B,
char  transA = 'n',
char  transB = 'n',
const float &  factAB = 1.f,
const float &  factC = 0.f 
)
See Also
prod
template<class V , class M , class L >
void cuv::transpose ( tensor< V, M, L > &  dst,
const tensor< V, M, L > &  src 
)

Transpose a matrix.

Parameters
dstDestination matrix
srcSource matrix
template<class V , class T , class M >
std::auto_ptr<cuv::tensor<V,T,typename other_memory_layout<M>::type > > cuv::transposed_view ( cuv::tensor< V, T, M > &  src)

As in.

See Also
transposed_view_p, but here we return an auto_ptr for convenience

Definition at line 146 of file matrix_ops.hpp.

template<class V , class T , class M >
std::auto_ptr<const cuv::tensor<V,T,typename other_memory_layout<M>::type > > cuv::transposed_view ( const cuv::tensor< V, T, M > &  src)

As in.

See Also
transposed_view_p, but here we return an auto_ptr for convenience

Definition at line 156 of file matrix_ops.hpp.

template<class V , class T , class M >
cuv::tensor<V,T,typename other_memory_layout<M>::type >* cuv::transposed_view_p ( cuv::tensor< V, T, M > &  src)

Transpose a matrix by creating a view with different storage.

Parameters
srcSource matrix

Creates a row major view of a column major matrix or a column major view of a row major matrix. Does not actually modify the content of the memory.

Deprecated:
an assignment does not copy anymore, so use that instead.
template<class V , class T , class M >
const cuv::tensor<V,T,typename other_memory_layout<M>::type >* cuv::transposed_view_p ( const cuv::tensor< V, T, M > &  src)

Const variant of.

See Also
transposed_view_p