27 #ifndef MPBLOCKS_CUDANN_KERNELS_R2S1_CU_HPP_
28 #define MPBLOCKS_CUDANN_KERNELS_R2S1_CU_HPP_
38 namespace linalg = cuda::linalg2;
43 template<
typename Format_t,
unsigned int NDim>
50 unsigned int pitchOut,
59 int idx = blockId * N + threadId;
73 linalg::set<0>(x0) = q.
data[0];
74 linalg::set<1>(x0) = q.
data[1];
84 + weight*( 2*M_PI - (t1 - t0) );
85 Format_t d = fminf(da,db);
87 g_out[0*pitchOut + idx] = d;
89 g_out[1*pitchOut + idx] = idx;
__device__ __host__ Scalar norm_squared(const RValue< Scalar, ROWS, COLS, Exp > &M)
compute the norm
__global__ void r2s1_distance(Format_t weight, QueryPoint< Format_t, NDim > query, Format_t *g_in, unsigned int pitchIn, Format_t *g_out, unsigned int pitchOut, unsigned int n)
vector norm (2-norm) between two points