MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / SingleEigParam

Class SingleEigParam

XM/include/Dense/eig.h:9–32  ·  view source on GitHub ↗

Your code goes here single matrix eig parameter

Source from the content-addressed store, hash-verified

7// Your code goes here
8// single matrix eig parameter
9class SingleEigParam {
10 public:
11 int gpu_id;
12 cusolverEigMode_t jobz;
13 cublasFillMode_t uplo;
14 cusolverDnParams_t param;
15
16 SingleEigParam(const int gpu_id = 0): gpu_id(gpu_id) {
17 CHECK_CUDA( cudaSetDevice(this->gpu_id) );
18 this->param = NULL;
19 CHECK_CUSOLVER( cusolverDnCreateParams(&this->param) );
20 // we need eigen vector
21 this->jobz = CUSOLVER_EIG_MODE_VECTOR;
22 // upper and lower is arbitrary
23 this->uplo = CUBLAS_FILL_MODE_LOWER;
24 }
25
26 ~SingleEigParam() {
27 if (this->param != NULL) {
28 CHECK_CUSOLVER( cusolverDnDestroyParams(this->param) );
29 this->param = NULL;
30 }
31 }
32};
33
34// get single matrix eig buffer sizes in cusolver
35template <typename T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected