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

Function transposeKernel

XM/include/Dense/transpose.h:8–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7template <typename T>
8__global__ void transposeKernel(T* out, const T* in, int width, int height) {
9 size_l x = blockIdx.x * blockDim.x + threadIdx.x;
10 size_l y = blockIdx.y * blockDim.y + threadIdx.y;
11
12 if (x < width && y < height) {
13 out[x * height + y] = in[y * width + x];
14 }
15}
16// transpose a matrix
17template <typename T>
18void transpose(T* out, const T* in, size_s width, size_s height) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected