ViennaCL - The Vienna Computing Library
1.5.0
|
Implementations of dense matrix related operations, including matrix-vector products, using CUDA. More...
#include "viennacl/forwards.h"
#include "viennacl/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/vector_proxy.hpp"
#include "viennacl/tools/tools.hpp"
#include "viennacl/meta/enable_if.hpp"
#include "viennacl/meta/predicate.hpp"
#include "viennacl/meta/result_of.hpp"
#include "viennacl/traits/size.hpp"
#include "viennacl/traits/start.hpp"
#include "viennacl/traits/handle.hpp"
#include "viennacl/traits/stride.hpp"
#include "viennacl/linalg/cuda/common.hpp"
#include "viennacl/linalg/cuda/vector_operations.hpp"
#include "viennacl/linalg/cuda/matrix_operations_row.hpp"
#include "viennacl/linalg/cuda/matrix_operations_col.hpp"
#include "viennacl/linalg/cuda/matrix_operations_prod.hpp"
Go to the source code of this file.
Namespaces | |
namespace | viennacl |
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them. | |
namespace | viennacl::linalg |
Provides all linear algebra operations which are not covered by operator overloads. | |
namespace | viennacl::linalg::cuda |
Holds all CUDA compute kernels used by ViennaCL. | |
namespace | viennacl::linalg::cuda::detail |
Helper functions for the CUDA linear algebra backend. | |
Functions | |
template<typename NumericT , typename F , typename ScalarType1 > | |
void | am (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha) |
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 > | |
void | ambm (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename NumericT , typename F , typename ScalarType1 , typename ScalarType2 > | |
void | ambm_m (matrix_base< NumericT, F > &mat1, matrix_base< NumericT, F > const &mat2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, matrix_base< NumericT, F > const &mat3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta) |
template<typename NumericT , typename F > | |
void | matrix_assign (matrix_base< NumericT, F > &mat, NumericT s, bool clear=false) |
template<typename NumericT , typename F > | |
void | matrix_diagonal_assign (matrix_base< NumericT, F > &mat, NumericT s) |
template<typename NumericT , typename F > | |
void | matrix_diag_from_vector (const vector_base< NumericT > &vec, int k, matrix_base< NumericT, F > &mat) |
template<typename NumericT , typename F > | |
void | matrix_diag_to_vector (const matrix_base< NumericT, F > &mat, int k, vector_base< NumericT > &vec) |
template<typename NumericT , typename F > | |
void | matrix_row (const matrix_base< NumericT, F > &mat, unsigned int i, vector_base< NumericT > &vec) |
template<typename NumericT , typename F > | |
void | matrix_column (const matrix_base< NumericT, F > &mat, unsigned int j, vector_base< NumericT > &vec) |
template<typename T , typename F , typename OP > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_binary< OP > > const &proxy) |
template<typename F , typename OP > | |
void | element_op (matrix_base< float, F > &A, matrix_expression< const matrix_base< float, F >, const matrix_base< float, F >, op_element_binary< OP > > const &proxy) |
template<typename F , typename OP > | |
void | element_op (matrix_base< double, F > &A, matrix_expression< const matrix_base< double, F >, const matrix_base< double, F >, op_element_binary< OP > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_abs > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_acos > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_asin > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_atan > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_ceil > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_cos > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_cosh > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_exp > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_fabs > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_floor > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_log > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_log10 > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_sin > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_sinh > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_sqrt > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_tan > > const &proxy) |
template<typename T , typename F > | |
void | element_op (matrix_base< T, F > &A, matrix_expression< const matrix_base< T, F >, const matrix_base< T, F >, op_element_unary< op_tanh > > const &proxy) |
template<typename NumericT , typename F > | |
void | prod_impl (const matrix_base< NumericT, F > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result) |
Carries out matrix-vector multiplication. | |
template<typename NumericT , typename F > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F >, const matrix_base< NumericT, F >, op_trans > &mat_trans, const vector_base< NumericT > &vec, vector_base< NumericT > &result) |
Carries out matrix-vector multiplication with a transposed matrix. | |
template<typename T1 , typename T2 , typename T3 , typename ScalarType > | |
void | prod_slow_kernel (const T1 &A, bool transposed_A, const T2 &B, bool transposed_B, T3 &C, ScalarType alpha, ScalarType beta) |
template<typename T1 , typename T2 , typename T3 , typename ScalarType > | |
void | prod_fast_kernel (const T1 &A, const T2 &B, T3 &C, ScalarType alpha, ScalarType beta, std::string kernel_name) |
template<typename T1 , typename T2 , typename T3 , typename ScalarType > | |
void | prod (const T1 &A, bool transposed_A, const T2 &B, bool transposed_B, T3 &C, ScalarType alpha, ScalarType beta) |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const matrix_base< NumericT, F1 > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const matrix_base< NumericT, F2 > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const matrix_base< NumericT, F1 > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. | |
template<typename NumericT , typename F1 , typename F2 , typename F3 , typename ScalarType > | |
void | prod_impl (const viennacl::matrix_expression< const matrix_base< NumericT, F1 >, const matrix_base< NumericT, F1 >, op_trans > &A, const viennacl::matrix_expression< const matrix_base< NumericT, F2 >, const matrix_base< NumericT, F2 >, op_trans > &B, matrix_base< NumericT, F3 > &C, ScalarType alpha, ScalarType beta) |
Carries out matrix-matrix multiplication. | |
template<typename NumericT , typename F , typename S1 > | |
void | scaled_rank_1_update (matrix_base< NumericT, F > &mat1, S1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, const vector_base< NumericT > &vec1, const vector_base< NumericT > &vec2) |
The implementation of the operation mat += alpha * vec1 * vec2^T, i.e. a scaled rank 1 update. |
Implementations of dense matrix related operations, including matrix-vector products, using CUDA.