DFT-EFE
 
Loading...
Searching...
No Matches
BlasAPIWrapper.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef BLASWrapper_h
27#define BLASWrapper_h
28
29#include <cmath>
31#include <utils/TypeConfig.h>
33namespace dftefe
34{
35 namespace linearAlgebra
36 {
37 namespace blasLapack
38 {
39 namespace blasWrapper
40 {
41 template <typename ValueType1,
42 typename ValueType2,
43 typename utils::MemorySpace memorySpace>
44 void
45 gemm(const char transA,
46 const char transB,
47 const size_type m,
48 const size_type n,
49 const size_type k,
51 ValueType1 const * A,
52 const size_type lda,
53 ValueType2 const * B,
54 const size_type ldb,
57 const size_type ldc,
59
60 template <typename ValueType1,
61 typename ValueType2,
63 void
64 gemmStridedVarBatched(const size_type numMats,
65 const char * transA,
66 const char * transB,
67 const size_type * stridea,
68 const size_type * strideb,
69 const size_type * stridec,
70 const size_type * m,
71 const size_type * n,
72 const size_type * k,
74 const ValueType1 * dA,
75 const size_type * ldda,
76 const ValueType2 * dB,
77 const size_type * lddb,
80 const size_type * lddc,
82
83 template <typename ValueType, typename utils::MemorySpace memorySpace>
85 asum(const size_type n,
86 ValueType const * x,
87 const size_type incx,
89
90 template <typename ValueType, typename utils::MemorySpace memorySpace>
93 ValueType const * x,
94 const size_type incx,
96
97 template <typename ValueType1,
98 typename ValueType2,
99 typename utils::MemorySpace memorySpace>
100 void
101 axpy(const size_type n,
103 ValueType1 const * x,
104 const size_type incx,
105 ValueType2 * y,
106 const size_type incy,
108
109 template <typename ValueType1,
110 typename ValueType2,
111 typename utils::MemorySpace memorySpace>
113 dot(const size_type n,
114 const ValueType1 * x,
115 const size_type incx,
116 const ValueType2 * y,
117 const size_type incy,
119
120 } // namespace blasWrapper
121 } // namespace blasLapack
122 } // end of namespace linearAlgebra
123
124} // end of namespace dftefe
125
126
127#endif // BLASWrapper_h
Definition: LinAlgOpContext.h:52
scalar_type< ValueType1, ValueType2 > dot(const size_type n, const ValueType1 *x, const size_type incx, const ValueType2 *y, const size_type incy, LinAlgOpContext< memorySpace > &context)
Definition: BlasAPIWrapperHost.cpp:650
size_type iamax(const size_type n, ValueType const *x, const size_type incx, LinAlgOpContext< memorySpace > &context)
void gemmStridedVarBatched(const size_type numMats, const char *transA, const char *transB, const size_type *stridea, const size_type *strideb, const size_type *stridec, const size_type *m, const size_type *n, const size_type *k, const scalar_type< ValueType1, ValueType2 > alpha, const ValueType1 *dA, const size_type *ldda, const ValueType2 *dB, const size_type *lddb, const scalar_type< ValueType1, ValueType2 > beta, scalar_type< ValueType1, ValueType2 > *dC, const size_type *lddc, LinAlgOpContext< memorySpace > &context)
Definition: BlasAPIWrapperHost.cpp:220
void gemm(const char transA, const char transB, const size_type m, const size_type n, const size_type k, const scalar_type< ValueType1, ValueType2 > alpha, ValueType1 const *A, const size_type lda, ValueType2 const *B, const size_type ldb, const scalar_type< ValueType1, ValueType2 > beta, scalar_type< ValueType1, ValueType2 > *C, const size_type ldc, LinAlgOpContext< memorySpace > &context)
real_type< ValueType > asum(const size_type n, ValueType const *x, const size_type incx, LinAlgOpContext< memorySpace > &context)
void axpy(const size_type n, const scalar_type< ValueType1, ValueType2 > alpha, ValueType1 const *x, const size_type incx, ValueType2 *y, const size_type incy, LinAlgOpContext< memorySpace > &context)
Definition: BlasAPIWrapperHost.cpp:561
typeInternal::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:177
typeInternal::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:183
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9