| 635 | } |
| 636 | |
| 637 | inline double get_norm(const DeviceBlasHandle& cublas_H) { |
| 638 | double norm; |
| 639 | CHECK_CUDA( cudaSetDevice(this->gpu_id) ); |
| 640 | CHECK_CUBLAS( cublasDnrm2_v2( |
| 641 | cublas_H.cublas_handle, this->nnz, this->vals, 1, &norm |
| 642 | ) ); |
| 643 | return norm; |
| 644 | } |
| 645 | |
| 646 | ~DeviceSpMatCSR() { |
| 647 | CHECK_CUDA( cudaSetDevice(this->gpu_id) ); |
nothing calls this directly
no outgoing calls
no test coverage detected