|
using | spmv_blocked_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const cl::Buffer &, cl::Buffer &, const unsigned int, cl::LocalSpaceArg > |
|
using | spmv_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const cl::Buffer &, cl::Buffer &, cl::LocalSpaceArg > |
|
using | residual_blocked_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, cl::Buffer &, const cl::Buffer &, cl::Buffer &, const unsigned int, cl::LocalSpaceArg > |
|
using | residual_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, cl::Buffer &, const cl::Buffer &, cl::Buffer &, cl::LocalSpaceArg > |
|
using | ilu_apply1_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::LocalSpaceArg > |
|
using | ilu_apply2_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::LocalSpaceArg > |
|
using | stdwell_apply_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int, const unsigned int, cl::Buffer &, cl::LocalSpaceArg, cl::LocalSpaceArg, cl::LocalSpaceArg > |
|
using | ilu_decomp_kernel_type = cl::KernelFunctor< const unsigned int, const unsigned int, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const int, cl::LocalSpaceArg > |
|
using | isaiL_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int > |
|
using | isaiU_kernel_type = cl::KernelFunctor< cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, cl::Buffer &, const unsigned int > |
|
|
void | sortRow (int *colIndices, int *data, int left, int right) |
|
template<class Scalar > |
void | blockMultSub (Scalar *a, Scalar *b, Scalar *c, unsigned int block_size) |
|
template<class Scalar > |
void | blockMult (Scalar *mat1, Scalar *mat2, Scalar *resMat, unsigned int block_size) |
|
unsigned int | ceilDivision (const unsigned int A, const unsigned int B) |
|
template<class Scalar > |
Scalar | get_absmax (const Scalar *data, const int N) |
|
template<class Scalar > |
void | solve_transposed_3x3 (const Scalar *A, const Scalar *b, Scalar *x) |
|
std::string | getErrorString (cl_int error) |
|
std::vector< int > | buildCsrToCscOffsetMap (std::vector< int > colPointers, std::vector< int > rowIndices) |
|
bool | canBeStarted (const int rowIndex, const int *rowPointers, const int *colIndices, const std::vector< bool > &doneRows) |
|
void | findLevelScheduling (int *CSRColIndices, int *CSRRowPointers, int *CSCRowIndices, int *CSCColPointers, int Nb, int *numColors, int *toOrder, int *fromOrder, std::vector< int > &rowsPerColor) |
|
void | csrPatternToCsc (int *CSRColIndices, int *CSRRowPointers, int *CSCRowIndices, int *CSCColPointers, int Nb) |
|
◆ ilu_apply1_kernel_type
using Opm::Accelerator::ilu_apply1_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, const unsigned int, cl::LocalSpaceArg> |
◆ ilu_apply2_kernel_type
using Opm::Accelerator::ilu_apply2_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, const unsigned int, cl::LocalSpaceArg> |
◆ ilu_decomp_kernel_type
using Opm::Accelerator::ilu_decomp_kernel_type = typedef cl::KernelFunctor<const unsigned int, const unsigned int, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const int, cl::LocalSpaceArg> |
◆ isaiL_kernel_type
using Opm::Accelerator::isaiL_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int> |
◆ isaiU_kernel_type
using Opm::Accelerator::isaiU_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int> |
◆ residual_blocked_kernel_type
◆ residual_kernel_type
using Opm::Accelerator::residual_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, cl::Buffer&, const cl::Buffer&, cl::Buffer&, cl::LocalSpaceArg> |
◆ spmv_blocked_kernel_type
◆ spmv_kernel_type
using Opm::Accelerator::spmv_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, const cl::Buffer&, cl::Buffer&, cl::LocalSpaceArg> |
◆ stdwell_apply_kernel_type
using Opm::Accelerator::stdwell_apply_kernel_type = typedef cl::KernelFunctor<cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, cl::Buffer&, const unsigned int, const unsigned int, cl::Buffer&, cl::LocalSpaceArg, cl::LocalSpaceArg, cl::LocalSpaceArg> |
◆ PreconditionerType
Enumerator |
---|
BILU0 | |
CPR | |
BISAI | |
◆ SolverStatus
Enumerator |
---|
BDA_SOLVER_SUCCESS | |
BDA_SOLVER_ANALYSIS_FAILED | |
BDA_SOLVER_CREATE_PRECONDITIONER_FAILED | |
BDA_SOLVER_UNKNOWN_ERROR | |
◆ blockMult()
template<class Scalar >
void Opm::Accelerator::blockMult |
( |
Scalar * |
mat1, |
|
|
Scalar * |
mat2, |
|
|
Scalar * |
resMat, |
|
|
unsigned int |
block_size |
|
) |
| |
Perform a matrix-matrix multiplication on two blocks resMat = mat1 * mat2 - Parameters
-
[in] | mat1 | input block 1 |
[in] | mat2 | input block 2 |
[out] | resMat | output block |
[in] | block_size | size of block |
◆ blockMultSub()
template<class Scalar >
void Opm::Accelerator::blockMultSub |
( |
Scalar * |
a, |
|
|
Scalar * |
b, |
|
|
Scalar * |
c, |
|
|
unsigned int |
block_size |
|
) |
| |
Multiply and subtract blocks a = a - (b * c) - Parameters
-
[in,out] | a | block to be subtracted from |
[in] | b | input block |
[in] | c | input block |
[in] | block_size | size of block |
◆ buildCsrToCscOffsetMap()
std::vector< int > Opm::Accelerator::buildCsrToCscOffsetMap |
( |
std::vector< int > |
colPointers, |
|
|
std::vector< int > |
rowIndices |
|
) |
| |
Similar function to csrPatternToCsc. It gives an offset map from CSR to CSC instead of the full CSR to CSC conversion. The map works as follows: if an element 'e' of the matrix is in the i-th position in the CSR representation, it will be in the csrToCscOffsetMap[i]-th position in the CSC representation.
◆ canBeStarted()
bool Opm::Accelerator::canBeStarted |
( |
const int |
rowIndex, |
|
|
const int * |
rowPointers, |
|
|
const int * |
colIndices, |
|
|
const std::vector< bool > & |
doneRows |
|
) |
| |
Determine whether all rows that a certain row depends on are done already - Parameters
-
[in] | rowIndex | index of the row that needs to be checked for |
[in] | rowPointers | row pointers of the matrix that the row is in |
[in] | colIndices | column indices of the matrix that the row is in |
[in] | doneRows | array that for each row lists whether it is done or not |
- Returns
- true iff all dependencies are done and if the result itself was not done yet
◆ ceilDivision()
unsigned int Opm::Accelerator::ceilDivision |
( |
const unsigned int |
A, |
|
|
const unsigned int |
B |
|
) |
| |
◆ csrPatternToCsc()
void Opm::Accelerator::csrPatternToCsc |
( |
int * |
CSRColIndices, |
|
|
int * |
CSRRowPointers, |
|
|
int * |
CSCRowIndices, |
|
|
int * |
CSCColPointers, |
|
|
int |
Nb |
|
) |
| |
Convert a sparsity pattern stored in the CSR format to the CSC format CSCRowIndices and CSCColPointers arrays must be allocated already Based on the csr_tocsc() function from the scipy package from python, https://github.com/scipy/scipy/blob/master/scipy/sparse/sparsetools/csr.h - Parameters
-
[in] | CSRColIndices | column indices of the CSR representation of the pattern |
[in] | CSRRowPointers | row pointers of the CSR representation of the pattern |
[in,out] | CSCRowIndices | row indices of the result CSC representation of the pattern |
[in,out] | CSCColPointers | column pointers of the result CSC representation of the pattern |
[in] | Nb | number of blockrows in the matrix |
◆ findLevelScheduling()
void Opm::Accelerator::findLevelScheduling |
( |
int * |
CSRColIndices, |
|
|
int * |
CSRRowPointers, |
|
|
int * |
CSCRowIndices, |
|
|
int * |
CSCColPointers, |
|
|
int |
Nb, |
|
|
int * |
numColors, |
|
|
int * |
toOrder, |
|
|
int * |
fromOrder, |
|
|
std::vector< int > & |
rowsPerColor |
|
) |
| |
Find a level scheduling reordering for an input matrix The toOrder and fromOrder arrays must be allocated already - Parameters
-
[in] | CSRColIndices | column indices array, obtained from storing the input matrix in the CSR format |
[in] | CSRRowPointers | row pointers array, obtained from storing the input matrix in the CSR format |
[in] | CSCRowIndices | row indices array, obtained from storing the input matrix in the CSC format |
[in] | CSCColPointers | column pointers array, obtained from storing the input matrix in the CSC format |
[in] | Nb | number of blockrows in the matrix |
[out] | numColors | a pointer to the number of colors needed for the level scheduling |
[out] | toOrder | the reorder pattern that was found, which lists for each index in the original order, to which index in the new order it should be moved |
[out] | fromOrder | the reorder pattern that was found, which lists for each index in the new order, from which index in the original order it was moved |
[out] | rowsPerColor | for each color, an array of all rowIndices in that color, this function uses emplace_back() to fill |
◆ get_absmax()
template<class Scalar >
Scalar Opm::Accelerator::get_absmax |
( |
const Scalar * |
data, |
|
|
const int |
N |
|
) |
| |
◆ getErrorString()
std::string Opm::Accelerator::getErrorString |
( |
cl_int |
error | ) |
|
Translate OpenCL error codes to strings Integer - String combinations are defined in CL/cl.h - Parameters
-
◆ solve_transposed_3x3()
template<class Scalar >
void Opm::Accelerator::solve_transposed_3x3 |
( |
const Scalar * |
A, |
|
|
const Scalar * |
b, |
|
|
Scalar * |
x |
|
) |
| |
◆ sortRow()
void Opm::Accelerator::sortRow |
( |
int * |
colIndices, |
|
|
int * |
data, |
|
|
int |
left, |
|
|
int |
right |
|
) |
| |
Sort a row of matrix elements from a CSR-format, where the nonzeroes are ints These ints aren't actually nonzeroes, but represent a mapping used later - Parameters
-
[in,out] | colIndices | represent keys in sorting |
[in,out] | data | sorted according to the colIndices |
[in] | left | lower index of data of row |
[in] | right | upper index of data of row |
|