accelerInt  v0.1
sparse_multiplier.cu
Go to the documentation of this file.
1 
7 #include "sparse_multiplier.cuh"
8 
9 #ifdef GENERATE_DOCS
10 //put this in the van der Pol namespace for documentation
11 namespace van_der_pol_cu {
12 #endif
13 
14 
21 __device__
22 void sparse_multiplier(const double * A, const double * Vm, double* w) {
23  w[INDEX(0)] = A[INDEX(0)] * Vm[INDEX(0)] + A[INDEX(NSP)] * Vm[INDEX(1)];
24  w[INDEX(1)] = A[INDEX(1)] * Vm[INDEX(0)] + A[INDEX(NSP + 1)] * Vm[INDEX(1)];
25 }
26 
27 
28 #ifdef GENERATE_DOCS
29 }
30 #endif
#define NSP
The IVP system size.
Definition: header.cuh:20
Header definition for CUDA Jacobian vector multiplier, used in exponential integrators.
__device__ void sparse_multiplier(const double *A, const double *Vm, double *w)
Implements Jacobian \ vector multiplication in sparse (or unrolled) form.
#define INDEX(i)
Convenience macro to get the value of a vector at index i, calculated as i * GRID_DIM + T_ID...
Definition: gpu_macros.cuh:24