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

Function symKernel

XM/include/Dense/transpose.h:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template <typename T>
25__global__ void symKernel(T* out, const T* in, int mat_size) {
26 size_l x = blockIdx.x * blockDim.x + threadIdx.x;
27 size_l y = blockIdx.y * blockDim.y + threadIdx.y;
28
29 if (x < mat_size && y < mat_size) {
30 out[x * mat_size + y] = (in[x * mat_size + y] + in[y * mat_size + x])*0.5;
31 }
32}
33// transpose a matrix
34template <typename T>
35void sym(T* out, const T* in, size_s mat_size) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected