50 template <u
int32 VECTOR_WIDTH,
typename T>
57 template <>
struct vector_loader< 2,char> {
NVBIO_HOST_DEVICE static void load(
const char* ptr,
char* vec) {
const char2 v = *(
const char2*)ptr; vec[0] = v.x; vec[1] = v.y; } };
58 template <>
struct vector_loader< 3,char> {
NVBIO_HOST_DEVICE static void load(
const char* ptr,
char* vec) {
const char3 v = *(
const char3*)ptr; vec[0] = v.x; vec[1] = v.y; vec[2] = v.z; } };
59 template <>
struct vector_loader< 4,char> {
NVBIO_HOST_DEVICE static void load(
const char* ptr,
char* vec) {
const char4 v = *(
const char4*)ptr; vec[0] = v.x; vec[1] = v.y; vec[2] = v.z; vec[3] = v.w; } };
64 const uint2 v = *(
const uint2*)ptr;
65 vec[0] = (char)((v.x >> 0) & 0xFF); vec[1] = (char)((v.x >> 8) & 0xFF);
66 vec[2] = (char)((v.x >> 16) & 0xFF); vec[3] = (char)((v.x >> 24) & 0xFF);
67 vec[4] = (char)((v.y >> 0) & 0xFF); vec[5] = (char)((v.y >> 8) & 0xFF);
68 vec[6] = (char)((v.y >> 16) & 0xFF); vec[7] = (char)((v.y >> 24) & 0xFF);
75 const uint4 v = *(
const uint4*)ptr;
77 vec[0] = (char)((v.x >> 0) & 0xFF); vec[1] = (char)((v.x >> 8) & 0xFF);
78 vec[2] = (char)((v.x >> 16) & 0xFF); vec[3] = (char)((v.x >> 24) & 0xFF);
79 vec[4] = (char)((v.y >> 0) & 0xFF); vec[5] = (char)((v.y >> 8) & 0xFF);
80 vec[6] = (char)((v.y >> 16) & 0xFF); vec[7] = (char)((v.y >> 24) & 0xFF);
82 vec[8] = (char)((v.z >> 0) & 0xFF); vec[9] = (char)((v.z >> 8) & 0xFF);
83 vec[10] = (char)((v.z >> 16) & 0xFF); vec[11] = (char)((v.z >> 24) & 0xFF);
84 vec[12] = (char)((v.w >> 0) & 0xFF); vec[13] = (char)((v.w >> 8) & 0xFF);
85 vec[14] = (char)((v.w >> 16) & 0xFF); vec[15] = (char)((v.w >> 24) & 0xFF);
97 const uint2 v = *(
const uint2*)ptr;
98 vec[0] = (
int8)((v.x >> 0) & 0xFF); vec[1] = (
int8)((v.x >> 8) & 0xFF);
99 vec[2] = (
int8)((v.x >> 16) & 0xFF); vec[3] = (
int8)((v.x >> 24) & 0xFF);
100 vec[4] = (
int8)((v.y >> 0) & 0xFF); vec[5] = (
int8)((v.y >> 8) & 0xFF);
101 vec[6] = (
int8)((v.y >> 16) & 0xFF); vec[7] = (
int8)((v.y >> 24) & 0xFF);
108 const uint4 v = *(
const uint4*)ptr;
110 vec[0] = (
int8)((v.x >> 0) & 0xFF); vec[1] = (
int8)((v.x >> 8) & 0xFF);
111 vec[2] = (
int8)((v.x >> 16) & 0xFF); vec[3] = (
int8)((v.x >> 24) & 0xFF);
112 vec[4] = (
int8)((v.y >> 0) & 0xFF); vec[5] = (
int8)((v.y >> 8) & 0xFF);
113 vec[6] = (
int8)((v.y >> 16) & 0xFF); vec[7] = (
int8)((v.y >> 24) & 0xFF);
115 vec[8] = (
int8)((v.z >> 0) & 0xFF); vec[9] = (
int8)((v.z >> 8) & 0xFF);
116 vec[10] = (
int8)((v.z >> 16) & 0xFF); vec[11] = (
int8)((v.z >> 24) & 0xFF);
117 vec[12] = (
int8)((v.w >> 0) & 0xFF); vec[13] = (
int8)((v.w >> 8) & 0xFF);
118 vec[14] = (
int8)((v.w >> 16) & 0xFF); vec[15] = (
int8)((v.w >> 24) & 0xFF);
130 const uint2 v = *(
const uint2*)ptr;
131 vec[0] = (
uint8)((v.x >> 0) & 0xFF); vec[1] = (
uint8)((v.x >> 8) & 0xFF);
132 vec[2] = (
uint8)((v.x >> 16) & 0xFF); vec[3] = (
uint8)((v.x >> 24) & 0xFF);
133 vec[4] = (
uint8)((v.y >> 0) & 0xFF); vec[5] = (
uint8)((v.y >> 8) & 0xFF);
134 vec[6] = (
uint8)((v.y >> 16) & 0xFF); vec[7] = (
uint8)((v.y >> 24) & 0xFF);
141 const uint4 v = *(
const uint4*)ptr;
143 vec[0] = (
uint8)((v.x >> 0) & 0xFF); vec[1] = (
uint8)((v.x >> 8) & 0xFF);
144 vec[2] = (
uint8)((v.x >> 16) & 0xFF); vec[3] = (
uint8)((v.x >> 24) & 0xFF);
145 vec[4] = (
uint8)((v.y >> 0) & 0xFF); vec[5] = (
uint8)((v.y >> 8) & 0xFF);
146 vec[6] = (
uint8)((v.y >> 16) & 0xFF); vec[7] = (
uint8)((v.y >> 24) & 0xFF);
148 vec[8] = (
uint8)((v.z >> 0) & 0xFF); vec[9] = (
uint8)((v.z >> 8) & 0xFF);
149 vec[10] = (
uint8)((v.z >> 16) & 0xFF); vec[11] = (
uint8)((v.z >> 24) & 0xFF);
150 vec[12] = (
uint8)((v.w >> 0) & 0xFF); vec[13] = (
uint8)((v.w >> 8) & 0xFF);
151 vec[14] = (
uint8)((v.w >> 16) & 0xFF); vec[15] = (
uint8)((v.w >> 24) & 0xFF);
183 template <u
int32 VECTOR_WIDTH,
typename T>