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

Function ConstructZmatrixKernal

XM/include/XM/checkeig.h:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <typename T>
31__global__ void ConstructZmatrixKernal(T* Z, T* sR, size_s n,size_s o,double lam){
32 size_s i = blockIdx.x * blockDim.x + threadIdx.x;
33 if(i<n){
34 double norm = 0;
35 for(int j = 0; j<o; ++j){
36 norm += sR[j*3*n+3*i] * sR[j*3*n+3*i];
37 }
38 Z[3*i*3*n+3*i] += 2 * lam * (norm - 1);
39 }
40}
41
42bool checkeig(opt_var &C, const opt_var &sR, const double lam, opt_var &v, double primal_value){
43 // initialize

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected