TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
cxx_interface.hpp
Go to the documentation of this file.
1// Copyright (c) 2019--present, The Simons Foundation
2// This file is part of TRIQS/nda and is licensed under the Apache License, Version 2.0.
3// SPDX-License-Identifier: Apache-2.0
4// See LICENSE in the root of this distribution for details.
5
10
11#pragma once
12
13#include "../tools.hpp"
14
15#if defined(NDA_HAVE_CUDA)
17#endif
18
19namespace nda::blas::f77 {
20
21 void axpy(int N, double alpha, const double *x, int incx, double *Y, int incy);
22 void axpy(int N, dcomplex alpha, const dcomplex *x, int incx, dcomplex *Y, int incy);
23
24 void copy(int N, const double *x, int incx, double *Y, int incy);
25 void copy(int N, const dcomplex *x, int incx, dcomplex *Y, int incy);
26
27 double dot(int M, const double *x, int incx, const double *Y, int incy);
28 dcomplex dot(int M, const dcomplex *x, int incx, const dcomplex *Y, int incy);
29 dcomplex dotc(int M, const dcomplex *x, int incx, const dcomplex *Y, int incy);
30
31 void gemm(char op_a, char op_b, int M, int N, int K, double alpha, const double *A, int LDA, const double *B, int LDB, double beta, double *C,
32 int LDC);
33 void gemm(char op_a, char op_b, int M, int N, int K, dcomplex alpha, const dcomplex *A, int LDA, const dcomplex *B, int LDB, dcomplex beta,
34 dcomplex *C, int LDC);
35
36 void gemm_batch(char op_a, char op_b, int M, int N, int K, double alpha, const double **A, int LDA, const double **B, int LDB, double beta,
37 double **C, int LDC, int batch_count);
38 void gemm_batch(char op_a, char op_b, int M, int N, int K, dcomplex alpha, const dcomplex **A, int LDA, const dcomplex **B, int LDB, dcomplex beta,
39 dcomplex **C, int LDC, int batch_count);
40
41 void gemm_vbatch(char op_a, char op_b, int *M, int *N, int *K, double alpha, const double **A, int *LDA, const double **B, int *LDB, double beta,
42 double **C, int *LDC, int batch_count);
43 void gemm_vbatch(char op_a, char op_b, int *M, int *N, int *K, dcomplex alpha, const dcomplex **A, int *LDA, const dcomplex **B, int *LDB,
44 dcomplex beta, dcomplex **C, int *LDC, int batch_count);
45
46 void gemm_batch_strided(char op_a, char op_b, int M, int N, int K, double alpha, const double *A, int LDA, int strideA, const double *B, int LDB,
47 int strideB, double beta, double *C, int LDC, int strideC, int batch_count);
48 void gemm_batch_strided(char op_a, char op_b, int M, int N, int K, dcomplex alpha, const dcomplex *A, int LDA, int strideA, const dcomplex *B,
49 int LDB, int srideB, dcomplex beta, dcomplex *C, int LDC, int strideC, int batch_count);
50
51 void gemv(char op, int M, int N, double alpha, const double *A, int LDA, const double *x, int incx, double beta, double *Y, int incy);
52 void gemv(char op, int M, int N, dcomplex alpha, const dcomplex *A, int LDA, const dcomplex *x, int incx, dcomplex beta, dcomplex *Y, int incy);
53
54 void ger(int M, int N, double alpha, const double *x, int incx, const double *Y, int incy, double *A, int LDA);
55 void ger(int M, int N, dcomplex alpha, const dcomplex *x, int incx, const dcomplex *Y, int incy, dcomplex *A, int LDA);
56
57 void scal(int M, double alpha, double *x, int incx);
58 void scal(int M, dcomplex alpha, dcomplex *x, int incx);
59
60 void swap(int N, double *x, int incx, double *Y, int incy); // NOLINT (this is a BLAS swap)
61 void swap(int N, dcomplex *x, int incx, dcomplex *Y, int incy); // NOLINT (this is a BLAS swap)
62
63} // namespace nda::blas::f77
Provides a C++ interface for the GPU versions of various BLAS routines.
std::complex< double > dcomplex
Alias for std::complex<double> type.
Definition tools.hpp:28
Provides various traits and utilities for the BLAS interface.