Go to the documentation of this file.
27#ifndef OPM_CUBLASWRAPPER_HEADER_INCLUDED
28#define OPM_CUBLASWRAPPER_HEADER_INCLUDED
30#include <opm/common/ErrorMacros.hpp>
42 return cublasDscal(handle,
56 return cublasSscal(handle,
65 [[maybe_unused]] int n,
66 [[maybe_unused]] const int* alpha,
67 [[maybe_unused]] int* x,
68 [[maybe_unused]] int incx)
70 OPM_THROW(std::runtime_error, "cublasScal multiplication for integer vectors is not implemented yet.");
81 return cublasDaxpy(handle,
99 return cublasSaxpy(handle,
110 [[maybe_unused]] int n,
111 [[maybe_unused]] const int* alpha,
112 [[maybe_unused]] const int* x,
113 [[maybe_unused]] int incx,
114 [[maybe_unused]] int* y,
115 [[maybe_unused]] int incy)
117 OPM_THROW(std::runtime_error, "axpy multiplication for integer vectors is not implemented yet.");
121cublasDot(cublasHandle_t handle, int n, const double* x, int incx, const double* y, int incy, double* result)
123 return cublasDdot(handle, n, x, incx, y, incy, result);
127cublasDot(cublasHandle_t handle, int n, const float* x, int incx, const float* y, int incy, float* result)
129 return cublasSdot(handle, n, x, incx, y, incy, result);
134 [[maybe_unused]] int n,
135 [[maybe_unused]] const int* x,
136 [[maybe_unused]] int incx,
137 [[maybe_unused]] const int* y,
138 [[maybe_unused]] int incy,
139 [[maybe_unused]] int* result)
141 OPM_THROW(std::runtime_error, "inner product for integer vectors is not implemented yet.");
145cublasNrm2(cublasHandle_t handle, int n, const double* x, int incx, double* result)
147 return cublasDnrm2(handle, n, x, incx, result);
152cublasNrm2(cublasHandle_t handle, int n, const float* x, int incx, float* result)
154 return cublasSnrm2(handle, n, x, incx, result);
159 [[maybe_unused]] int n,
160 [[maybe_unused]] const int* x,
161 [[maybe_unused]] int incx,
162 [[maybe_unused]] int* result)
164 OPM_THROW(std::runtime_error, "norm2 for integer vectors is not implemented yet.");
Definition: autotuner.hpp:29
cublasStatus_t cublasAxpy(cublasHandle_t handle, int n, const double *alpha, const double *x, int incx, double *y, int incy) Definition: cublas_wrapper.hpp:73
cublasStatus_t cublasNrm2(cublasHandle_t handle, int n, const double *x, int incx, double *result) Definition: cublas_wrapper.hpp:145
cublasStatus_t cublasScal(cublasHandle_t handle, int n, const double *alpha, double *x, int incx) Definition: cublas_wrapper.hpp:36
cublasStatus_t cublasDot(cublasHandle_t handle, int n, const double *x, int incx, const double *y, int incy, double *result) Definition: cublas_wrapper.hpp:121
|