SIRIUS 7.5.0
Electronic structure library and applications
acc_blas.cpp
1#if defined(SIRIUS_CUDA) || defined(SIRIUS_ROCM)
2#include "acc_blas.hpp"
3
4namespace sirius {
5
6namespace acc {
7
8namespace blas {
9
10acc::blas_api::handle_t&
12{
13 static acc::blas_api::handle_t null_stream_handle_;
14 return null_stream_handle_;
15}
16
17std::vector<acc::blas_api::handle_t>&
19{
20 static std::vector<acc::blas_api::handle_t> stream_handles_;
21 return stream_handles_;
22}
23
24#if defined(SIRIUS_CUDA)
25namespace xt {
26cublasXtHandle_t&
27cublasxt_handle()
28{
29 static cublasXtHandle_t handle;
30 return handle;
31}
32} // namespace xt
33#endif
34} // blas
35
36} // acc
37
38} // sirius
39
40#endif
Blas functions for execution on GPUs.
acc::blas_api::handle_t & null_stream_handle()
Store the default (null) stream handler.
Definition: acc_blas.cpp:11
std::vector< acc::blas_api::handle_t > & stream_handles()
Store the gpublas handlers associated with acc streams.
Definition: acc_blas.cpp:18
Namespace of the SIRIUS library.
Definition: sirius.f90:5