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

Method get_dnorm

XM/include/Utils/memory.h:436–441  ·  view source on GitHub ↗

norm of GPU vector

Source from the content-addressed store, hash-verified

434 }
435 // norm of GPU vector
436 double get_dnorm(const DeviceBlasHandle& cublas_H) {
437 double norm = 0;
438 CHECK_CUDA(cudaSetDevice(this->gpu_id));
439 CHECK_CUBLAS(cublasDnrm2_v2(cublas_H.cublas_handle, this->total_size, this->vals, 1, &norm));
440 return norm;
441 }
442
443 // Print matrix, if matrix is larger the 3-dimension then donot print
444 void print() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected