TRIQS/nda 2.0.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
gemm_batch.hpp
#include "./interface/cxx_interface.hpp"
#include "./tools.hpp"
#include "../concepts.hpp"
#include "../declarations.hpp"
#include "../device.hpp"
#include "../layout_transforms.hpp"
#include "../macros.hpp"
#include "../mem/address_space.hpp"
#include "../traits.hpp"
#include <algorithm>
#include <iterator>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

Detailed Description

Provides a generic interface to batched versions of the BLAS/cuBLAS gemm routine.

Definition in file gemm_batch.hpp.

Go to the source code of this file.

Functions

template<BlasArrayOrConj< 3 > A, BlasArrayOrConjFor< A, 3 > B, BlasArrayFor< A, 3 > C>
requires ((has_C_layout<A> or has_F_layout<A>) and (has_C_layout<B> or has_F_layout<B>) and (has_C_layout<C> or has_F_layout<C>))
void nda::blas::gemm (get_value_t< A > alpha, A const &a, B const &b, get_value_t< A > beta, C &&c)
 Generic-friendly overload of nda::blas::gemm for batches stored as 3-dimensional arrays.
template<bool is_vbatch = false, BlasArrayOrConj< 2 > A, BlasArrayOrConjFor< A, 2 > B, BlasArrayFor< A, 2 > C>
void nda::blas::gemm_batch (get_value_t< A > alpha, std::vector< A > const &va, std::vector< B > const &vb, get_value_t< A > beta, std::vector< C > &vc)
 Interface to batched versions of the BLAS/cuBLAS gemm routine.
template<BlasArrayOrConj< 3 > A, BlasArrayOrConjFor< A, 3 > B, BlasArrayFor< A, 3 > C>
requires ((has_C_layout<A> or has_F_layout<A>) and (has_C_layout<B> or has_F_layout<B>) and (has_C_layout<C> or has_F_layout<C>))
void nda::blas::gemm_batch_strided (get_value_t< A > alpha, A const &a, B const &b, get_value_t< A > beta, C &&c)
 Interface to batched-strided versions of the BLAS/cuBLAS gemm routine.
template<BlasArrayOrConj< 2 > A, BlasArrayOrConjFor< A, 2 > B, BlasArrayFor< A, 2 > C>
void nda::blas::gemm_vbatch (get_value_t< A > alpha, std::vector< A > const &va, std::vector< B > const &vb, get_value_t< A > beta, std::vector< C > &vc)
 Interface to batched versions of the BLAS/cuBLAS gemm routine for variable sized matrices.

Function Documentation

◆ gemm()

template<BlasArrayOrConj< 3 > A, BlasArrayOrConjFor< A, 3 > B, BlasArrayFor< A, 3 > C>
requires ((has_C_layout<A> or has_F_layout<A>) and (has_C_layout<B> or has_F_layout<B>) and (has_C_layout<C> or has_F_layout<C>))
void nda::blas::gemm ( get_value_t< A > alpha,
A const & a,
B const & b,
get_value_t< A > beta,
C && c )

Generic-friendly overload of nda::blas::gemm for batches stored as 3-dimensional arrays.

It simply calls nda::lapack::gemm_batch_strided and lets generic code call gemm(...) regardless of whether the input is a single matrix (rank 2) or a batch (rank 3).

Definition at line 287 of file gemm_batch.hpp.