20#ifndef OPM_HIPKERNELS_HPP
21#define OPM_HIPKERNELS_HPP
27#include <hip/hip_runtime_api.h>
28#include <hip/hip_version.h>
37 static bool initialized;
44 static void init(
int verbosity);
78 static void vmul(
const Scalar alpha,
114 unsigned int block_size,
126 static void spmv(Scalar* vals,
132 unsigned int block_size,
Definition hipKernels.hpp:34
static void residual(Scalar *vals, int *cols, int *rows, Scalar *x, const Scalar *rhs, Scalar *out, int Nb, unsigned int block_size, hipStream_t stream)
Function to perform res = rhs - mat * x.
Definition hipKernels.cpp:422
static void vmul(const Scalar alpha, Scalar *in1, Scalar *in2, Scalar *out, int N, hipStream_t stream)
Function to multiply vector with another vector and a scalar, element-wise and add the result to a th...
Definition hipKernels.cpp:307
static void prolongate_vector(const Scalar *in, Scalar *out, const int *cols, int N, hipStream_t stream)
Function to prolongate vector during amg cycle, every workitem handles one row.
Definition hipKernels.cpp:392
static void spmv(Scalar *vals, int *cols, int *rows, Scalar *x, Scalar *y, int Nb, unsigned int block_size, hipStream_t stream)
Function to perform sparse matrix vector multipliation.
Definition hipKernels.cpp:461
static void add_coarse_pressure_correction(Scalar *coarse_x, Scalar *fine_x, int pressure_idx, int Nb, hipStream_t stream)
Add the coarse pressure solution back to the finer, complete solution; every workitem handles one blo...
Definition hipKernels.cpp:364
static void full_to_pressure_restriction(const Scalar *fine_y, Scalar *weights, Scalar *coarse_y, int Nb, hipStream_t stream)
Transform blocked vector to scalar vector using pressure-weights, where every workitem handles one bl...
Definition hipKernels.cpp:336
static void init(int verbosity)
Initialize verbosity level for the HIP kernels.
Definition hipKernels.cpp:293
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37