All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
blas3.hpp
Go to the documentation of this file.
#ifndef VIENNACL_SRC_BLAS3_HPP
#define VIENNACL_SRC_BLAS3_HPP
/* =========================================================================
Copyright (c) 2010-2014, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
-----------------
ViennaCL - The Vienna Computing Library
-----------------
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
(A list of authors and contributors can be found in the PDF manual)
License: MIT (X11), see file LICENSE in the base directory
============================================================================= */
// include necessary system headers
#include <iostream>
#include "viennacl.hpp"
#include "viennacl_private.hpp"
//include basic scalar and vector types of ViennaCL
#include "viennacl/scalar.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/vector.hpp"
#include "viennacl/matrix.hpp"
#include "viennacl/linalg/direct_solve.hpp"
#include "viennacl/linalg/prod.hpp"
namespace detail
{
template <typename ScalarType, typename MatrixTypeA, typename MatrixTypeB, typename MatrixTypeC>
void gemm_dispatch(ScalarType alpha,
MatrixTypeA const & A, ViennaCLTranspose transA,
MatrixTypeB const & B, ViennaCLTranspose transB,
ScalarType beta,
MatrixTypeC & C)
{
if (transA == ViennaCLTrans && transB == ViennaCLTrans)
viennacl::linalg::prod_impl(viennacl::trans(A), viennacl::trans(B), C, alpha, beta);
else if (transA == ViennaCLTrans && transB == ViennaCLNoTrans)
viennacl::linalg::prod_impl(viennacl::trans(A), B, C, alpha, beta);
else if (transA == ViennaCLNoTrans && transB == ViennaCLTrans)
viennacl::linalg::prod_impl(A, viennacl::trans(B), C, alpha, beta);
else if (transA == ViennaCLNoTrans && transB == ViennaCLNoTrans)
viennacl::linalg::prod_impl(A, B, C, alpha, beta);
//else
// return ViennaCLGenericFailure;
}
}
#endif
ViennaCLTranspose
ViennaCLTranspose
Definition: viennacl.hpp:68
viennacl::trans
viennacl::enable_if< viennacl::is_any_sparse_matrix< M1 >::value, matrix_expression< const M1, const M1, op_trans > >::type trans(const M1 &mat)
Returns an expression template class representing a transposed matrix.
Definition: sparse_matrix_operations.hpp:376
detail::gemm_dispatch
void gemm_dispatch(ScalarType alpha, MatrixTypeA const &A, ViennaCLTranspose transA, MatrixTypeB const &B, ViennaCLTranspose transB, ScalarType beta, MatrixTypeC &C)
Definition: blas3.hpp:39
prod.hpp
Generic interface for matrix-vector and matrix-matrix products. See viennacl/linalg/vector_operations...
matrix.hpp
Implementation of the dense matrix class.
viennacl_private.hpp
direct_solve.hpp
Implementations of dense direct solvers are found here.
vector.hpp
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
ScalarType
float ScalarType
Definition: fft_1d.cpp:42
ViennaCLNoTrans
Definition: viennacl.hpp:71
viennacl::linalg::prod_impl
void prod_impl(const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
Carries out matrix-vector multiplication.
Definition: matrix_operations.hpp:438
ViennaCLTrans
Definition: viennacl.hpp:72
scalar.hpp
Implementation of the ViennaCL scalar class.
viennacl.hpp