hip_filename
stringlengths 5
84
| hip_content
stringlengths 79
9.69M
| cuda_filename
stringlengths 4
83
| cuda_content
stringlengths 19
9.69M
|
---|---|---|---|
e48d96d482ca8ed00757859a00f8e536c92d046d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@precisions normal z -> s d c
@author Azzam Haidar
@author Tingxing Dong
*/
#include "magma_internal.h"
#include "batched_kernel_param.h"
#define BLK_SIZE 256
#define ZLASWP_COL_NTH 32
// SWP_WIDTH is number of threads in a block
// 64 and 256 are better on Kepler;
extern __shared__ magmaDoubleComplex shared_data[];
/******************************************************************************/
static __device__
void zlaswp_rowparallel_devfunc(
int n, int width, int height,
magmaDoubleComplex *dA, int lda,
magmaDoubleComplex *dout, int ldo,
magma_int_t* pivinfo)
{
//int height = k2- k1;
//int height = blockDim.x;
unsigned int tid = threadIdx.x;
dA += SWP_WIDTH * blockIdx.x * lda;
dout += SWP_WIDTH * blockIdx.x * ldo;
magmaDoubleComplex *sdata = shared_data;
if (blockIdx.x == gridDim.x -1)
{
width = n - blockIdx.x * SWP_WIDTH;
}
if (tid < height)
{
int mynewroworig = pivinfo[tid]-1; //-1 to get the index in C
int itsreplacement = pivinfo[mynewroworig] -1; //-1 to get the index in C
//printf("%d: mynewroworig = %d, itsreplacement = %d\n", tid, mynewroworig, itsreplacement);
#pragma unroll
for (int i=0; i < width; i++)
{
sdata[ tid + i * height ] = dA[ mynewroworig + i * lda ];
dA[ mynewroworig + i * lda ] = dA[ itsreplacement + i * lda ];
}
}
__syncthreads();
if (tid < height)
{
// copy back the upper swapped portion of A to dout
#pragma unroll
for (int i=0; i < width; i++)
{
dout[tid + i * ldo] = sdata[tid + i * height];
}
}
}
/******************************************************************************/
// parallel swap the swaped dA(1:nb,i:n) is stored in dout
__global__
void zlaswp_rowparallel_kernel(
int n, int width, int height,
magmaDoubleComplex *dinput, int ldi,
magmaDoubleComplex *doutput, int ldo,
magma_int_t* pivinfo)
{
zlaswp_rowparallel_devfunc(n, width, height, dinput, ldi, doutput, ldo, pivinfo);
}
/******************************************************************************/
__global__
void zlaswp_rowparallel_kernel_batched(
int n, int width, int height,
magmaDoubleComplex **input_array, int input_i, int input_j, int ldi,
magmaDoubleComplex **output_array, int output_i, int output_j, int ldo,
magma_int_t** pivinfo_array)
{
int batchid = blockIdx.z;
zlaswp_rowparallel_devfunc( n, width, height,
input_array[batchid] + input_j * ldi + input_i, ldi,
output_array[batchid] + output_j * ldo + output_i, ldo,
pivinfo_array[batchid]);
}
/******************************************************************************/
extern "C" void
magma_zlaswp_rowparallel_batched( magma_int_t n,
magmaDoubleComplex** input_array, magma_int_t input_i, magma_int_t input_j, magma_int_t ldi,
magmaDoubleComplex** output_array, magma_int_t output_i, magma_int_t output_j, magma_int_t ldo,
magma_int_t k1, magma_int_t k2,
magma_int_t **pivinfo_array,
magma_int_t batchCount, magma_queue_t queue)
{
#define input_array(i,j) input_array, i, j
#define output_array(i,j) output_array, i, j
if (n == 0 ) return;
int height = k2-k1;
if ( height > 1024)
{
fprintf( stderr, "%s: n=%lld > 1024, not supported\n", __func__, (long long) n );
}
int blocks = magma_ceildiv( n, SWP_WIDTH );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
if ( n < SWP_WIDTH) {
size_t shmem = sizeof(magmaDoubleComplex) * height * n;
hipLaunchKernelGGL(( zlaswp_rowparallel_kernel_batched)
, dim3(grid), dim3(height), shmem, queue->cuda_stream() ,
n, n, height, input_array+i, input_i, input_j, ldi, output_array+i, output_i, output_j, ldo, pivinfo_array+i );
}
else {
size_t shmem = sizeof(magmaDoubleComplex) * height * SWP_WIDTH;
hipLaunchKernelGGL(( zlaswp_rowparallel_kernel_batched)
, dim3(grid), dim3(height), shmem, queue->cuda_stream() ,
n, SWP_WIDTH, height, input_array+i, input_i, input_j, ldi, output_array+i, output_i, output_j, ldo, pivinfo_array+i );
}
}
#undef input_array
#undef output_attay
}
/******************************************************************************/
extern "C" void
magma_zlaswp_rowparallel_native(
magma_int_t n,
magmaDoubleComplex* input, magma_int_t ldi,
magmaDoubleComplex* output, magma_int_t ldo,
magma_int_t k1, magma_int_t k2,
magma_int_t *pivinfo,
magma_queue_t queue)
{
if (n == 0 ) return;
int height = k2-k1;
if ( height > MAX_NTHREADS)
{
fprintf( stderr, "%s: height=%lld > %lld, magma_zlaswp_rowparallel_q not supported\n",
__func__, (long long) n, (long long) MAX_NTHREADS );
}
int blocks = magma_ceildiv( n, SWP_WIDTH );
dim3 grid(blocks, 1, 1);
if ( n < SWP_WIDTH)
{
size_t shmem = sizeof(magmaDoubleComplex) * height * n;
hipLaunchKernelGGL(( zlaswp_rowparallel_kernel)
, dim3(grid), dim3(height), shmem, queue->cuda_stream() ,
n, n, height, input, ldi, output, ldo, pivinfo );
}
else
{
size_t shmem = sizeof(magmaDoubleComplex) * height * SWP_WIDTH;
hipLaunchKernelGGL(( zlaswp_rowparallel_kernel)
, dim3(grid), dim3(height), shmem, queue->cuda_stream() ,
n, SWP_WIDTH, height, input, ldi, output, ldo, pivinfo );
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row
__global__ void zlaswp_rowserial_kernel_batched( int n, magmaDoubleComplex **dA_array, int lda, int k1, int k2, magma_int_t** ipiv_array )
{
magmaDoubleComplex* dA = dA_array[blockIdx.z];
magma_int_t *dipiv = ipiv_array[blockIdx.z];
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
k1--;
k2--;
if (tid < n) {
magmaDoubleComplex A1;
for (int i1 = k1; i1 < k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 + tid * lda];
dA[i1 + tid * lda] = dA[i2 + tid * lda];
dA[i2 + tid * lda] = A1;
}
}
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row
__global__ void zlaswp_rowserial_kernel_native( int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
//k1--;
//k2--;
if (tid < n) {
magmaDoubleComplex A1;
for (int i1 = k1; i1 < k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 + tid * lda];
dA[i1 + tid * lda] = dA[i2 + tid * lda];
dA[i2 + tid * lda] = A1;
}
}
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row, similar to LAPACK
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_rowserial_batched(magma_int_t n, magmaDoubleComplex** dA_array, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t **ipiv_array,
magma_int_t batchCount, magma_queue_t queue)
{
if (n == 0) return;
int blocks = magma_ceildiv( n, BLK_SIZE );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
hipLaunchKernelGGL(( zlaswp_rowserial_kernel_batched)
, dim3(grid), dim3(max(BLK_SIZE, n)), 0, queue->cuda_stream() ,
n, dA_array+i, lda, k1, k2, ipiv_array+i);
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row, similar to LAPACK
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_rowserial_native(magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t* dipiv, magma_queue_t queue)
{
if (n == 0) return;
int blocks = magma_ceildiv( n, BLK_SIZE );
dim3 grid(blocks, 1, 1);
hipLaunchKernelGGL(( zlaswp_rowserial_kernel_native)
, dim3(grid), dim3(max(BLK_SIZE, n)), 0, queue->cuda_stream() ,
n, dA, lda, k1, k2, dipiv);
}
/******************************************************************************/
// serial swap that does swapping one column by one column
__device__ void zlaswp_columnserial_devfunc(int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
k1--;
k2--;
if ( k1 < 0 || k2 < 0 ) return;
if ( tid < n) {
magmaDoubleComplex A1;
if (k1 <= k2)
{
for (int i1 = k1; i1 <= k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 * lda + tid];
dA[i1 * lda + tid] = dA[i2 * lda + tid];
dA[i2 * lda + tid] = A1;
}
}
} else
{
for (int i1 = k1; i1 >= k2; i1--)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 * lda + tid];
dA[i1 * lda + tid] = dA[i2 * lda + tid];
dA[i2 * lda + tid] = A1;
}
}
}
}
}
__global__ void zlaswp_columnserial_kernel_batched( int n, magmaDoubleComplex **dA_array, int lda, int k1, int k2, magma_int_t** ipiv_array )
{
magmaDoubleComplex* dA = dA_array[blockIdx.z];
magma_int_t *dipiv = ipiv_array[blockIdx.z];
zlaswp_columnserial_devfunc(n, dA, lda, k1, k2, dipiv);
}
__global__ void zlaswp_columnserial_kernel( int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
zlaswp_columnserial_devfunc(n, dA, lda, k1, k2, dipiv);
}
/******************************************************************************/
// serial swap that does swapping one column by one column
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_columnserial(
magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t *dipiv, magma_queue_t queue)
{
if (n == 0 ) return;
int blocks = magma_ceildiv( n, ZLASWP_COL_NTH );
dim3 grid(blocks, 1, 1);
hipLaunchKernelGGL(( zlaswp_columnserial_kernel), dim3(grid), dim3(ZLASWP_COL_NTH), 0, queue->cuda_stream() ,
n, dA, lda, k1, k2, dipiv);
}
extern "C" void
magma_zlaswp_columnserial_batched(magma_int_t n, magmaDoubleComplex** dA_array, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t **ipiv_array,
magma_int_t batchCount, magma_queue_t queue)
{
if (n == 0 ) return;
int blocks = magma_ceildiv( n, ZLASWP_COL_NTH );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
hipLaunchKernelGGL(( zlaswp_columnserial_kernel_batched)
, dim3(grid), dim3(min(ZLASWP_COL_NTH,n)), 0, queue->cuda_stream() ,
n, dA_array+i, lda, k1, k2, ipiv_array+i);
}
}
| e48d96d482ca8ed00757859a00f8e536c92d046d.cu | /*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@precisions normal z -> s d c
@author Azzam Haidar
@author Tingxing Dong
*/
#include "magma_internal.h"
#include "batched_kernel_param.h"
#define BLK_SIZE 256
#define ZLASWP_COL_NTH 32
// SWP_WIDTH is number of threads in a block
// 64 and 256 are better on Kepler;
extern __shared__ magmaDoubleComplex shared_data[];
/******************************************************************************/
static __device__
void zlaswp_rowparallel_devfunc(
int n, int width, int height,
magmaDoubleComplex *dA, int lda,
magmaDoubleComplex *dout, int ldo,
magma_int_t* pivinfo)
{
//int height = k2- k1;
//int height = blockDim.x;
unsigned int tid = threadIdx.x;
dA += SWP_WIDTH * blockIdx.x * lda;
dout += SWP_WIDTH * blockIdx.x * ldo;
magmaDoubleComplex *sdata = shared_data;
if (blockIdx.x == gridDim.x -1)
{
width = n - blockIdx.x * SWP_WIDTH;
}
if (tid < height)
{
int mynewroworig = pivinfo[tid]-1; //-1 to get the index in C
int itsreplacement = pivinfo[mynewroworig] -1; //-1 to get the index in C
//printf("%d: mynewroworig = %d, itsreplacement = %d\n", tid, mynewroworig, itsreplacement);
#pragma unroll
for (int i=0; i < width; i++)
{
sdata[ tid + i * height ] = dA[ mynewroworig + i * lda ];
dA[ mynewroworig + i * lda ] = dA[ itsreplacement + i * lda ];
}
}
__syncthreads();
if (tid < height)
{
// copy back the upper swapped portion of A to dout
#pragma unroll
for (int i=0; i < width; i++)
{
dout[tid + i * ldo] = sdata[tid + i * height];
}
}
}
/******************************************************************************/
// parallel swap the swaped dA(1:nb,i:n) is stored in dout
__global__
void zlaswp_rowparallel_kernel(
int n, int width, int height,
magmaDoubleComplex *dinput, int ldi,
magmaDoubleComplex *doutput, int ldo,
magma_int_t* pivinfo)
{
zlaswp_rowparallel_devfunc(n, width, height, dinput, ldi, doutput, ldo, pivinfo);
}
/******************************************************************************/
__global__
void zlaswp_rowparallel_kernel_batched(
int n, int width, int height,
magmaDoubleComplex **input_array, int input_i, int input_j, int ldi,
magmaDoubleComplex **output_array, int output_i, int output_j, int ldo,
magma_int_t** pivinfo_array)
{
int batchid = blockIdx.z;
zlaswp_rowparallel_devfunc( n, width, height,
input_array[batchid] + input_j * ldi + input_i, ldi,
output_array[batchid] + output_j * ldo + output_i, ldo,
pivinfo_array[batchid]);
}
/******************************************************************************/
extern "C" void
magma_zlaswp_rowparallel_batched( magma_int_t n,
magmaDoubleComplex** input_array, magma_int_t input_i, magma_int_t input_j, magma_int_t ldi,
magmaDoubleComplex** output_array, magma_int_t output_i, magma_int_t output_j, magma_int_t ldo,
magma_int_t k1, magma_int_t k2,
magma_int_t **pivinfo_array,
magma_int_t batchCount, magma_queue_t queue)
{
#define input_array(i,j) input_array, i, j
#define output_array(i,j) output_array, i, j
if (n == 0 ) return;
int height = k2-k1;
if ( height > 1024)
{
fprintf( stderr, "%s: n=%lld > 1024, not supported\n", __func__, (long long) n );
}
int blocks = magma_ceildiv( n, SWP_WIDTH );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
if ( n < SWP_WIDTH) {
size_t shmem = sizeof(magmaDoubleComplex) * height * n;
zlaswp_rowparallel_kernel_batched
<<< grid, height, shmem, queue->cuda_stream() >>>
( n, n, height, input_array+i, input_i, input_j, ldi, output_array+i, output_i, output_j, ldo, pivinfo_array+i );
}
else {
size_t shmem = sizeof(magmaDoubleComplex) * height * SWP_WIDTH;
zlaswp_rowparallel_kernel_batched
<<< grid, height, shmem, queue->cuda_stream() >>>
( n, SWP_WIDTH, height, input_array+i, input_i, input_j, ldi, output_array+i, output_i, output_j, ldo, pivinfo_array+i );
}
}
#undef input_array
#undef output_attay
}
/******************************************************************************/
extern "C" void
magma_zlaswp_rowparallel_native(
magma_int_t n,
magmaDoubleComplex* input, magma_int_t ldi,
magmaDoubleComplex* output, magma_int_t ldo,
magma_int_t k1, magma_int_t k2,
magma_int_t *pivinfo,
magma_queue_t queue)
{
if (n == 0 ) return;
int height = k2-k1;
if ( height > MAX_NTHREADS)
{
fprintf( stderr, "%s: height=%lld > %lld, magma_zlaswp_rowparallel_q not supported\n",
__func__, (long long) n, (long long) MAX_NTHREADS );
}
int blocks = magma_ceildiv( n, SWP_WIDTH );
dim3 grid(blocks, 1, 1);
if ( n < SWP_WIDTH)
{
size_t shmem = sizeof(magmaDoubleComplex) * height * n;
zlaswp_rowparallel_kernel
<<< grid, height, shmem, queue->cuda_stream() >>>
( n, n, height, input, ldi, output, ldo, pivinfo );
}
else
{
size_t shmem = sizeof(magmaDoubleComplex) * height * SWP_WIDTH;
zlaswp_rowparallel_kernel
<<< grid, height, shmem, queue->cuda_stream() >>>
( n, SWP_WIDTH, height, input, ldi, output, ldo, pivinfo );
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row
__global__ void zlaswp_rowserial_kernel_batched( int n, magmaDoubleComplex **dA_array, int lda, int k1, int k2, magma_int_t** ipiv_array )
{
magmaDoubleComplex* dA = dA_array[blockIdx.z];
magma_int_t *dipiv = ipiv_array[blockIdx.z];
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
k1--;
k2--;
if (tid < n) {
magmaDoubleComplex A1;
for (int i1 = k1; i1 < k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 + tid * lda];
dA[i1 + tid * lda] = dA[i2 + tid * lda];
dA[i2 + tid * lda] = A1;
}
}
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row
__global__ void zlaswp_rowserial_kernel_native( int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
//k1--;
//k2--;
if (tid < n) {
magmaDoubleComplex A1;
for (int i1 = k1; i1 < k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 + tid * lda];
dA[i1 + tid * lda] = dA[i2 + tid * lda];
dA[i2 + tid * lda] = A1;
}
}
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row, similar to LAPACK
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_rowserial_batched(magma_int_t n, magmaDoubleComplex** dA_array, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t **ipiv_array,
magma_int_t batchCount, magma_queue_t queue)
{
if (n == 0) return;
int blocks = magma_ceildiv( n, BLK_SIZE );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
zlaswp_rowserial_kernel_batched
<<< grid, max(BLK_SIZE, n), 0, queue->cuda_stream() >>>
(n, dA_array+i, lda, k1, k2, ipiv_array+i);
}
}
/******************************************************************************/
// serial swap that does swapping one row by one row, similar to LAPACK
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_rowserial_native(magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t* dipiv, magma_queue_t queue)
{
if (n == 0) return;
int blocks = magma_ceildiv( n, BLK_SIZE );
dim3 grid(blocks, 1, 1);
zlaswp_rowserial_kernel_native
<<< grid, max(BLK_SIZE, n), 0, queue->cuda_stream() >>>
(n, dA, lda, k1, k2, dipiv);
}
/******************************************************************************/
// serial swap that does swapping one column by one column
__device__ void zlaswp_columnserial_devfunc(int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
k1--;
k2--;
if ( k1 < 0 || k2 < 0 ) return;
if ( tid < n) {
magmaDoubleComplex A1;
if (k1 <= k2)
{
for (int i1 = k1; i1 <= k2; i1++)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 * lda + tid];
dA[i1 * lda + tid] = dA[i2 * lda + tid];
dA[i2 * lda + tid] = A1;
}
}
} else
{
for (int i1 = k1; i1 >= k2; i1--)
{
int i2 = dipiv[i1] - 1; // Fortran index, switch i1 and i2
if ( i2 != i1)
{
A1 = dA[i1 * lda + tid];
dA[i1 * lda + tid] = dA[i2 * lda + tid];
dA[i2 * lda + tid] = A1;
}
}
}
}
}
__global__ void zlaswp_columnserial_kernel_batched( int n, magmaDoubleComplex **dA_array, int lda, int k1, int k2, magma_int_t** ipiv_array )
{
magmaDoubleComplex* dA = dA_array[blockIdx.z];
magma_int_t *dipiv = ipiv_array[blockIdx.z];
zlaswp_columnserial_devfunc(n, dA, lda, k1, k2, dipiv);
}
__global__ void zlaswp_columnserial_kernel( int n, magmaDoubleComplex_ptr dA, int lda, int k1, int k2, magma_int_t* dipiv )
{
zlaswp_columnserial_devfunc(n, dA, lda, k1, k2, dipiv);
}
/******************************************************************************/
// serial swap that does swapping one column by one column
// K1, K2 are in Fortran indexing
extern "C" void
magma_zlaswp_columnserial(
magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t *dipiv, magma_queue_t queue)
{
if (n == 0 ) return;
int blocks = magma_ceildiv( n, ZLASWP_COL_NTH );
dim3 grid(blocks, 1, 1);
zlaswp_columnserial_kernel<<< grid, ZLASWP_COL_NTH, 0, queue->cuda_stream() >>>
(n, dA, lda, k1, k2, dipiv);
}
extern "C" void
magma_zlaswp_columnserial_batched(magma_int_t n, magmaDoubleComplex** dA_array, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
magma_int_t **ipiv_array,
magma_int_t batchCount, magma_queue_t queue)
{
if (n == 0 ) return;
int blocks = magma_ceildiv( n, ZLASWP_COL_NTH );
magma_int_t max_batchCount = queue->get_maxBatch();
for(magma_int_t i = 0; i < batchCount; i+=max_batchCount) {
magma_int_t ibatch = min(max_batchCount, batchCount-i);
dim3 grid(blocks, 1, ibatch);
zlaswp_columnserial_kernel_batched
<<< grid, min(ZLASWP_COL_NTH,n), 0, queue->cuda_stream() >>>
(n, dA_array+i, lda, k1, k2, ipiv_array+i);
}
}
|
a4bd0767b34c6970c7a074141f0b3d82943b2be5.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <iostream>
#include <ostream>
#include <fstream>
#include <sys/time.h>
#include <time.h>
using namespace std;
#define CASENAME "test4"
#define NUMGPU 1
#define BLOCKSIZEX 64
#define BLOCKSIZEY 1
#define BLOCKSIZEZ 1
#define BLOCKSIZELRX 64
#define BLOCKSIZELRY 1
#define BLOCKSIZELRZ 1
#define BLOCKSIZEINTERP 8
#define XDIM 224
#define YDIM 800
#define ZDIM 4
#define TMAX 20001
#define STARTF 0
#define DYNY1 200
#define DYNY2 1
#define KP 0.3f //p-control constant
#define PRERUN 10000 //pre-run duration
#define HEIGHT 200
#define OBSTR1 20.f
#define OBSTX1 100.5f
#define OBSTY1 340.5f
#define OBSTZ1 32.5f
#define OBSTR2 10.f
#define OBSTX2 100.5f
#define OBSTY2 50.5f
#define OBSTZ2 32.5f
#define LRFACTOR 0.5f
#define LRLEVEL 2
#define LRX0 16.25f //minimum x coord of LR
#define XLRDIM 64 //number of nodes in x
#define LRY0 63.25f
#define YLRDIM 80
#define LRZ0 -0.75f
#define ZLRDIM 8
#define ORDER 2 //order of accuracy of interpolation
#define RE 3000.f//2000.f//100.f;
#define UMAX 0.06f
#define SmagLES 1 //1,0
#define MODEL "MRT" //BGK,MRT,STREAM
#define REFINEMENT 0 //1,0
#define CS 0.02f
#define DPDX 0.f
#define DPDY -5.0e-7
#define VELAV 1
#define START_VELAV 200000
#define START_VELFLUC 1600000
inline __device__ int ImageFcnLR(float x, float y, float z)
{
int value = 0;
if(abs(x-OBSTX1) < OBSTR1 && abs(y-OBSTY1) < OBSTR1)
{
value = 10;
}
return value;
}
inline __device__ int ImageFcn(int x, int y, int z, int t)
{
int value = 0;
if(abs(x-OBSTX2) < OBSTR2 && abs(y-OBSTY2) < OBSTR2 && t < 5000)
value = 1;
if(abs(x-OBSTX2-3) < OBSTR2 && abs(y-OBSTY2-3) < OBSTR2 && t < 5000 && z == 0)
value = 1;
if(abs(x-OBSTX1) < OBSTR1 && abs(y-OBSTY1) < OBSTR1)
value = 10;
if(x == 0)
value = 1;//50;//400;
else if(x > HEIGHT)//== XDIM-1)
value = 1;//51;//300;
// else if(y == 0)
// value = 200; //52;//1;//22;
else if(y == DYNY1+1)
value = 80;//1;//22;
else if(y == YDIM-1)
value = 100;
//if(z == ZDIM-1) value = 1;
return value;
}
inline __device__ float PoisProf (float x){
float radius = (YDIM-1-1)*0.5f;
float result = -1.5f*(((1.0f-(x-0.5f)/radius))*((1.0f-(x-0.5f)/radius))-1.0f);
return (result);
}
inline __device__ float PoisProf3D (float x, float y){
x = x-0.5f;
y = y-0.5f;
//float H = 41.f;
return UMAX;//2.25f*16.f*UMAX*x*y*(H-x)*(H-y)/((H)*(H)*(H)*(H));
// float radius = (YDIM-1-1)*0.5f;
// float result = -1.0f*(((1.0f-(x-0.5f)/radius))*((1.0f-(x-0.5f)/radius))-1.0f);
// return (result);
}
int
timeval_subtract (double *result, struct timeval *x, struct timeval *y)
{
struct timeval result0;
/* Perform the carry for the later subtraction by updating y. */
if (x->tv_usec < y->tv_usec) {
int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
y->tv_usec -= 1000000 * nsec;
y->tv_sec += nsec;
}
if (x->tv_usec - y->tv_usec > 1000000) {
int nsec = (y->tv_usec - x->tv_usec) / 1000000;
y->tv_usec += 1000000 * nsec;
y->tv_sec -= nsec;
}
/* Compute the time remaining to wait.
tv_usec is certainly positive. */
result0.tv_sec = x->tv_sec - y->tv_sec;
result0.tv_usec = x->tv_usec - y->tv_usec;
*result = ((double)result0.tv_usec)/1e6 + (double)result0.tv_sec;
/* Return 1 if result is negative. */
return x->tv_sec < y->tv_sec;
}
__device__ int dmin(int a, int b)
{
if (a<b) return a;
else return b-1;
}
__device__ int dmax(int a)
{
if (a>-1) return a;
else return 0;
}
__device__ int dmax(int a,int b)
{
if (a>b) return a;
else return b;
}
__device__ int dmin_p(int a, int b)
{
if (a<b) return a;
else return 0;
}
__device__ int dmax_p(int a, int b)
{
if (a>-1) return a;
else return b-1;
}
inline __device__ float trilinear_interp (float v000, float v001, float v010, float v011,
float v100, float v101, float v110, float v111, float x, float y, float z){
return v000*(1.f-x)*(1.f-y)*(1.f-z)+
v001*( x)*(1.f-y)*(1.f-z)+
v010*(1.f-x)*( y)*(1.f-z)+
v011*( x)*( y)*(1.f-z)+
v100*(1.f-x)*(1.f-y)*( z)+
v101*( x)*(1.f-y)*( z)+
v110*(1.f-x)*( y)*( z)+
v111*( x)*( y)*( z);
}
inline __device__ int f_mem(int f_num, int x, int y, int z, size_t pitch, int zInner)
{
if(y > YDIM-1) y = 0;
if(y < 0) y = YDIM-1;
//if(y == DYNY1+1) y = 0; //YDIM-1;
int index = (x+y*pitch+z*YDIM*pitch)+f_num*pitch*YDIM*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*YDIM*(zInner));
return index;
}
inline __device__ int f_memLR(int f_num, int x, int y, int z, size_t pitch, int zInner)
{
int index = (x+y*pitch+z*YLRDIM*pitch)+f_num*pitch*YLRDIM*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*YLRDIM*(zInner));
return index;
}
inline __device__ int f_mem_interp(int m_num, int x, int y, int z, int pitch, int zInner)
{
int index = (x+y*pitch+z*(YLRDIM*LRFACTOR+1)*pitch)+m_num*pitch*(YLRDIM*LRFACTOR+1)*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*(YLRDIM*LRFACTOR+1)*(zInner));
return index;
}
inline __device__ int buff_mem_interp(int m_num, int x, int y, int pitch, int zInner)
{
int index = (x+y*pitch+m_num*(YLRDIM*LRFACTOR+1)*pitch);
index = dmax(index);
index = dmin(index,19*pitch*(YLRDIM*LRFACTOR+1));
return index;
}
inline __device__ int buff_mem(int f_num, int x, int y, size_t pitch)
{
if(y > YDIM-1) y = 0;
if(y < 0) y = YDIM-1;
//if(y == DYNY1+1) y = 0; //YDIM-1;
int index = (x+y*pitch)+f_num*pitch*YDIM;
index = dmax(index);
index = dmin(index,19*pitch*YDIM);
return index;
}
inline __device__ int buff_memLR(int f_num, int x, int y, size_t pitch)
{
int index = (x+y*pitch)+f_num*pitch*YLRDIM;
index = dmax(index);
index = dmin(index,19*pitch*YLRDIM);
return index;
}
inline __device__ void AddForce(float* f, float dpdy)
{
// f[1] -= 0.0555555556f*3.f*DPDX;
// f[3] += 0.0555555556f*3.f*DPDX;
// f[5] -= 0.0277777778f*3.f*DPDX;
// f[6] += 0.0277777778f*3.f*DPDX;
// f[7] += 0.0277777778f*3.f*DPDX;
// f[8] -= 0.0277777778f*3.f*DPDX;
// f[10]-= 0.0277777778f*3.f*DPDX;
// f[12]+= 0.0277777778f*3.f*DPDX;
// f[15]-= 0.0277777778f*3.f*DPDX;
// f[17]+= 0.0277777778f*3.f*DPDX;
f[2] -= 0.0555555556f*3.f*dpdy;
f[4] += 0.0555555556f*3.f*dpdy;
f[5] -= 0.0277777778f*3.f*dpdy;
f[6] -= 0.0277777778f*3.f*dpdy;
f[7] += 0.0277777778f*3.f*dpdy;
f[8] += 0.0277777778f*3.f*dpdy;
f[11]-= 0.0277777778f*3.f*dpdy;
f[13]+= 0.0277777778f*3.f*dpdy;
f[16]-= 0.0277777778f*3.f*dpdy;
f[18]+= 0.0277777778f*3.f*dpdy;
}
inline __device__ void Moments(float* f, float* m)
{
m[0 ] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[1 ] = -30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+ 8.f*f[5]+ 8.f*f[6]+ 8.f*f[7]+ 8.f*f[8]+-11.f*f[9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[2 ] = 12.f*f[0]+ -4.f*f[1]+ -4.f*f[2]+ -4.f*f[3]+ -4.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[3 ] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
m[4 ] = -4.f*f[1] + 4.f*f[3] + f[5]+ - f[6]+ - f[7]+ f[8] + f[10] + - f[12] + f[15] + - f[17] ;
m[5 ] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
m[6 ] = -4.f*f[2] + 4.f*f[4]+ f[5]+ f[6]+ - f[7]+ - f[8] + f[11] + - f[13] + f[16] + - f[18];
m[7 ] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[8 ] = + -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[9 ] = 2.f*f[1]+ - f[2]+ 2.f*f[3]+ - f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[1]+ 2.f*f[2]+ -4.f*f[3]+ 2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[2] + f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[2] -2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[5]+ - f[6]+ f[7]+ - f[8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[5]+ - f[6]+ - f[7]+ f[8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[5]+ - f[6]+ f[7]+ f[8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
}
void Moments_host(float* f, float* m)
{
m[0 ] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[1 ] = -30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+ 8.f*f[5]+ 8.f*f[6]+ 8.f*f[7]+ 8.f*f[8]+-11.f*f[9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[2 ] = 12.f*f[0]+ -4.f*f[1]+ -4.f*f[2]+ -4.f*f[3]+ -4.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[3 ] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
m[4 ] = -4.f*f[1] + 4.f*f[3] + f[5]+ - f[6]+ - f[7]+ f[8] + f[10] + - f[12] + f[15] + - f[17] ;
m[5 ] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
m[6 ] = -4.f*f[2] + 4.f*f[4]+ f[5]+ f[6]+ - f[7]+ - f[8] + f[11] + - f[13] + f[16] + - f[18];
m[7 ] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[8 ] = + -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[9 ] = 2.f*f[1]+ - f[2]+ 2.f*f[3]+ - f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[1]+ 2.f*f[2]+ -4.f*f[3]+ 2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[2] + f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[2] -2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[5]+ - f[6]+ f[7]+ - f[8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[5]+ - f[6]+ - f[7]+ f[8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[5]+ - f[6]+ f[7]+ f[8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
}
void InvertMoments_host(float* f, float* m)
{
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void mrt_meq(float* meq, float rho, float u, float v, float w)
{
meq[ 0] = rho;
meq[ 1] = -11.f*rho+19.f*(u*u+v*v+w*w);
meq[ 2] = 7.53968254f*(u*u+v*v+w*w);;
meq[ 3] = u;
meq[ 4] = -0.666666667f*u;
meq[ 5] = v;
meq[ 6] = -0.666666667f*v;
meq[ 7] = w;
meq[ 8] = -0.666666667f*w;
meq[ 9] = 2.f*u*u-(v*v+w*w);
meq[11] = v*v-w*w;
meq[13] = u*v;
meq[14] = v*w;
meq[15] = u*w;
}
inline __device__ void bgk_meq(float* meq, float rho, float u, float v, float w)
{
meq[ 0] = rho;
meq[ 1] = -11.f*rho+19.f*(u*u+v*v+w*w);
meq[ 2] = 3.f*rho-5.5f*(u*u+v*v+w*w);;
meq[ 3] = u;
meq[ 4] = -0.666666667f*u;
meq[ 5] = v;
meq[ 6] = -0.666666667f*v;
meq[ 7] = w;
meq[ 8] = -0.666666667f*w;
meq[ 9] = 2.f*u*u-(v*v+w*w);
meq[10] = -0.5f*meq[9]*0.333333333333f;
meq[11] = v*v-w*w;
meq[12] = -0.5f*meq[11];
meq[13] = u*v;
meq[14] = v*w;
meq[15] = u*w;
}
//outputs strain rate tensor (Sxx,Syy,Szz,Sxy,Syz,Sxz) from 19 moments
inline __device__ void StrainRate(float* S, float* m_strain, float dx)
{
float rho = m_strain[0];
float u = m_strain[3];
float v = m_strain[5];
float w = m_strain[7];
float m1 = m_strain[1 ]+11.f*rho-19.f*(u*u+v*v+w*w);
float m9 = m_strain[9 ]-(2.f*u*u-(v*v+w*w));
float m11= m_strain[11]-(v*v-w*w);
float m13= m_strain[13]-(u*v);
float m14= m_strain[14]-(v*w);
float m15= m_strain[15]-(u*w);
S[0] = -0.026315789f*( m1+19.f* m9);
S[1] = -0.013157895f*(2.f*m1-19.f*(m9-3.f*m11));
S[2] = -0.013157895f*(2.f*m1-19.f*(m9+3.f*m11));
S[3] = -1.5f*m13;
S[4] = -1.5f*m14;
S[5] = -1.5f*m15;
}
//outputs physical moments (rho,u,v,w,Pxx,Pww,Pxy,Pyz,Pxz) from f
inline __device__ void PhysicalMoments(float* mom, float* f)
{
mom[0] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
mom[1] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
mom[2] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
mom[3] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
mom[4] = 2.f*f[1]+-f[2]+2.f*f[3]+-f[4]+f[5]+f[6]+f[7]+f[8]+-f[9]+f[10]+-2.f*f[11]+f[12]+-2.f*f[13]+-f[14]+f[15]+-2.f*f[16]+f[17]+-2.f*f[18];
mom[5] = f[2]+f[4]+f[5]+f[6]+f[7]+f[8]+-f[9]+-f[10]+-f[12]+-f[14]+-f[15]+-f[17];
mom[6] = f[5]+-f[6]+f[7]+-f[8];
mom[7] = f[11]+-f[13]+-f[16]+f[18];
mom[8] = f[10]+-f[12]+-f[15]+f[17];
}
inline __device__ void InvertMoments(float* f, float* m)
{
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void InvertPhysicalMoments(float* f, float* mom, float SF)
{
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void ScaleMoments_bgk(float* m, float SF)
{
float rho,u,v,w;
rho = m[0]; u = m[3]; v = m[5]; w = m[7];
m[ 1] = m[ 1]*SF+(1.f-SF)*(-11.f*rho+19.f*(u*u+v*v+w*w));
m[ 2] = m[ 2]*SF+(1.f-SF)*(3.f*rho-5.5f*(u*u+v*v+w*w) );
m[ 4] = m[ 4]*SF+(1.f-SF)*(-0.666666667f*u );
m[ 6] = m[ 6]*SF+(1.f-SF)*(-0.666666667f*v );
m[ 8] = m[ 8]*SF+(1.f-SF)*(-0.666666667f*w );
m[ 9] = m[ 9]*SF+(1.f-SF)*(2.f*u*u-(v*v+w*w) );
m[10] = m[10]*SF+(1.f-SF)*(-0.5f*(2.f*u*u-(v*v+w*w))*0.333333333333f);
m[11] = m[11]*SF+(1.f-SF)*(v*v-w*w );
m[12] = m[12]*SF+(1.f-SF)*(-0.5f*(v*v-w*w) );
m[13] = m[13]*SF+(1.f-SF)*(u*v );
m[14] = m[14]*SF+(1.f-SF)*(v*w );
m[15] = m[15]*SF+(1.f-SF)*(u*w );
m[16] = m[16]*SF;
m[17] = m[17]*SF;
m[18] = m[18]*SF;
}
inline __device__ void InvertPhysicalMoments_LES_fc(float* f, float* mom, float SF, float omega_f)
{
float tau_f = 1.f/omega_f;
float S[6]={0};
StrainRate(S,mom,1.f);
float Smag_f = sqrt(2.f*(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]+2.f*S[3]*S[3]+2.f*S[4]*S[4]+2.f*S[5]*S[5]));
float tau_c = tau_f+0.5f+12.f*Smag_f*CS;
tau_c *= 0.5f;
float omega_c = 1.f/tau_c;
tau_f = tau_f+Smag_f*CS;
omega_f = 1.f/tau_f;
SF = (1.f-omega_c)*omega_f/(LRFACTOR*omega_c*(1.f-omega_f));
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void InvertPhysicalMoments_LES_cf(float* f, float* mom, float SF, float omega_c)
{
float tau_c = 1.f/omega_c;
float S[6]={0};
StrainRate(S,mom,1.f);
float Smag_c = sqrt(2.f*(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]+2.f*S[3]*S[3]+2.f*S[4]*S[4]+2.f*S[5]*S[5]));
float tau_f = 2.f*tau_c-0.5f+1.5f*Smag_c*CS;
float omega_f = 1.f/tau_f;
omega_f = 1.f/tau_f;
tau_c = tau_c+Smag_c*CS;
omega_c = 1.f/tau_c;
SF = (LRFACTOR*omega_c*(1.f-omega_f))/((1.f-omega_c)*omega_f);
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void mrt_collide(float* f, float omega, float dpdy)
{
float feq[19];
float u,v,w,rho;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
float usqr = u*u+v*v+w*w;
feq[0 ]=(0.3333333333f*(rho-1.5f*usqr));
feq[1 ]=(0.0555555556f*(rho+3.0f*u+4.5f*u*u-1.5f*usqr));
feq[2 ]=(0.0555555556f*(rho+3.0f*v+4.5f*v*v-1.5f*usqr));
feq[3 ]=(0.0555555556f*(rho-3.0f*u+4.5f*u*u-1.5f*usqr));
feq[4 ]=(0.0555555556f*(rho-3.0f*v+4.5f*v*v-1.5f*usqr));
feq[5 ]=(0.0277777778f*(rho+3.0f*(u+v)+4.5f*(u+v)*(u+v)-1.5f*usqr));
feq[6 ]=(0.0277777778f*(rho+3.0f*(-u+v)+4.5f*(-u+v)*(-u+v)-1.5f*usqr));
feq[7 ]=(0.0277777778f*(rho+3.0f*(-u-v)+4.5f*(-u-v)*(-u-v)-1.5f*usqr));
feq[8 ]=(0.0277777778f*(rho+3.0f*(u-v)+4.5f*(u-v)*(u-v)-1.5f*usqr));
feq[9 ]=(0.0555555556f*(rho+3.0f*w+4.5f*w*w-1.5f*usqr));
feq[10]=(0.0277777778f*(rho+3.0f*(u+w)+4.5f*(u+w)*(u+w)-1.5f*usqr));
feq[11]=(0.0277777778f*(rho+3.0f*(v+w)+4.5f*(v+w)*(v+w)-1.5f*usqr));
feq[12]=(0.0277777778f*(rho+3.0f*(-u+w)+4.5f*(-u+w)*(-u+w)-1.5f*usqr));
feq[13]=(0.0277777778f*(rho+3.0f*(-v+w)+4.5f*(-v+w)*(-v+w)-1.5f*usqr));
feq[14]=(0.0555555556f*(rho-3.0f*w+4.5f*w*w-1.5f*usqr));
feq[15]=(0.0277777778f*(rho+3.0f*(u-w)+4.5f*(u-w)*(u-w)-1.5f*usqr));
feq[16]=(0.0277777778f*(rho+3.0f*(v-w)+4.5f*(v-w)*(v-w)-1.5f*usqr));
feq[17]=(0.0277777778f*(rho+3.0f*(-u-w)+4.5f*(-u-w)*(-u-w)-1.5f*usqr));
feq[18]=(0.0277777778f*(rho+3.0f*(-v-w)+4.5f*(-v-w)*(-v-w)-1.5f*usqr));
if(SmagLES == 1)
{
float PI11 = (f[1 ]-feq[1 ])+(f[3 ]-feq[3 ])+(f[5 ]-feq[5 ])+
(f[6 ]-feq[6 ])+(f[7 ]-feq[7 ])+(f[8 ]-feq[8 ])+
(f[10]-feq[10])+(f[12]-feq[12])+(f[15]-feq[15])+
(f[17]-feq[17]);
float PI22 = (f[2 ]-feq[2 ])+(f[4 ]-feq[4 ])+(f[5 ]-feq[5 ])+
(f[6 ]-feq[6 ])+(f[7 ]-feq[7 ])+(f[8 ]-feq[8 ])+
(f[11]-feq[11])+(f[13]-feq[13])+(f[16]-feq[16])+
(f[18]-feq[18]);
float PI33 = (f[9 ]-feq[9 ])+(f[14]-feq[14])+(f[10]-feq[10])+
(f[12]-feq[12])+(f[15]-feq[15])+(f[17]-feq[17])+
(f[11]-feq[11])+(f[13]-feq[13])+(f[16]-feq[16])+
(f[18]-feq[18]);
float PI12 = (f[5 ]-feq[5 ])+(f[7 ]-feq[7 ])-(f[6 ]-feq[6 ])-(f[8 ]-feq[8 ]);
float PI13 = (f[10]-feq[10])+(f[17]-feq[17])-(f[12]-feq[12])-(f[15]-feq[15]);
float PI23 = (f[11]-feq[11])+(f[18]-feq[18])-(f[13]-feq[13])-(f[16]-feq[16]);
float Q = sqrt(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13);
float tau0 = 1.f/omega;
float tau = 0.5f*tau0+0.5f*sqrt(tau0*tau0+18.f*CS*sqrt(2.f)*Q);
omega = 1.f/tau;
}
f[0 ] -=omega*(f[0 ]-feq[0 ]);
f[1 ] -=omega*(f[1 ]-feq[1 ]);
f[2 ] -=omega*(f[2 ]-feq[2 ]);
f[3 ] -=omega*(f[3 ]-feq[3 ]);
f[4 ] -=omega*(f[4 ]-feq[4 ]);
f[5 ] -=omega*(f[5 ]-feq[5 ]);
f[6 ] -=omega*(f[6 ]-feq[6 ]);
f[7 ] -=omega*(f[7 ]-feq[7 ]);
f[8 ] -=omega*(f[8 ]-feq[8 ]);
f[9 ] -=omega*(f[9 ]-feq[9 ]);
f[10] -=omega*(f[10]-feq[10]);
f[11] -=omega*(f[11]-feq[11]);
f[12] -=omega*(f[12]-feq[12]);
f[13] -=omega*(f[13]-feq[13]);
f[14] -=omega*(f[14]-feq[14]);
f[15] -=omega*(f[15]-feq[15]);
f[16] -=omega*(f[16]-feq[16]);
f[17] -=omega*(f[17]-feq[17]);
f[18] -=omega*(f[18]-feq[18]);
AddForce(f,dpdy);
}
inline __device__ void North_Extrap(float* f, float rho)
{
float m[19];
//rho = 1.0f;
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void South_Extrap(float* f, float u, float v, float w)
{
float m[19];
// float u = 0.f;//f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
// float w = 0.f;//f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float rho = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
//bgk_meq(m,rho,u,v,w);
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void East_Extrap(float* f, float rho)
{
float m[19];
//rho = 0.0f;
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void West_Extrap(float* f, float u, int t)
{
float m[19];
float v = 0.f;//f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float w = 0.f;//f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
//if(t == 1000 || t == 2000 || t == 3000) w = 0.01f;
float rho = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
__device__ void xsymmetry_bot(float* f, int y, int z)
{
if(y == 0 && z == 0){
f[ 2] = f[ 4];
f[13]=f[18];
f[11]=f[18];
f[16]=f[18];
f[ 6] =f[ 7];
f[ 9] =f[14];
f[12]=f[17];
}
else if(y == 0 && z == ZDIM-1){
f[ 4] = f[ 2];
f[11]=f[13];
f[18]=f[13];
f[16]=f[13];
f[ 6] =f[ 7];
f[14]=f[ 9];
f[17]=f[12];
}
else if(y == YDIM-1 && z == 0){
f[ 4] = f[ 2];
f[11]=f[16];
f[18]=f[16];
f[13]=f[16];
f[ 7] =f[ 6];
f[ 9] =f[14];
f[12]=f[17];
}
else if(y == YDIM-1 && z == ZDIM-1){
f[ 4] = f[ 2];
f[16]=f[11];
f[18]=f[11];
f[13]=f[11];
f[ 7] =f[ 6];
f[14]=f[ 9];
f[17]=f[12];
}
else{
if(y == 0){
f[ 2] = f[ 4];
f[11]=f[13];
f[16]=f[18];
f[ 8] = f[ 5];
}
else if(y == YDIM-1){
f[ 4]=f[ 2] ;
f[13]=f[11];
f[18]=f[16];
f[ 5]=f[ 8] ;
}
}
f[ 1] = f[ 3] ;
f[ 5] = f[ 6] ;
f[ 8] = f[ 7] ;
f[10]= f[12];
f[15]= f[17];
}
__device__ void xsymmetry_top(float* f, int y, int z)
{
if(y == 0 && z == 0){
f[ 2] = f[ 4];
f[13] = f[18];
f[11] = f[18];
f[16] = f[18];
f[ 5] = f[ 8];
f[ 9] = f[14];
f[10] = f[15];
}
else if(y == 0 && z == ZDIM-1){
f[ 2] = f[ 4];
f[11] = f[13];
f[18] = f[13];
f[16] = f[13];
f[ 5] = f[ 8];
f[14] = f[ 9];
f[15] = f[10];
}
else if(y == YDIM-1 && z == 0){
f[ 4] = f[ 2];
f[18] = f[16];
f[11] = f[16];
f[13] = f[16];
f[ 8] = f[ 5];
f[ 9] = f[14];
f[10] = f[15];
}
else if(y == YDIM-1 && z == ZDIM-1){
f[ 4] = f[ 2];
f[13] = f[11];
f[16] = f[11];
f[18] = f[11];
f[ 8] = f[ 5];
f[14] = f[ 9];
f[15] = f[10];
}
else{
if(y == 0){
f[ 2] = f[ 4];
f[11] = f[13];
f[16] = f[18];
f[ 5] = f[ 8];
}
else if(y == YDIM-1){
f[ 4] = f[ 2];
f[13] = f[11];
f[18] = f[16];
f[ 8] = f[ 5];
}
}
f[ 3] = f[ 1] ;
f[ 6] = f[ 5] ;
f[ 7] = f[ 8] ;
f[12]= f[10];
f[17]= f[15];
}
inline __device__ void vel_av(float* f, float& uAv, float& vAv, float& wAv, int t)
{
float u,v,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
uAv = (uAv*(t-START_VELAV)+u)/((t-START_VELAV)+1);
vAv = (vAv*(t-START_VELAV)+v)/((t-START_VELAV)+1);
wAv = (wAv*(t-START_VELAV)+w)/((t-START_VELAV)+1);
}
inline __device__ void vel_avLR(float* f, float& uAv, float& vAv, float t)
{
float u,v;//,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
uAv = (uAv*(t-START_VELAV)+u*LRFACTOR)/((t-START_VELAV)+LRFACTOR);
vAv = (vAv*(t-START_VELAV)+v*LRFACTOR)/((t-START_VELAV)+LRFACTOR);
}
inline __device__ void vel_fluc(float* f, float& uAv,
float& vAv, float& wAv, float& ufluc, float& vfluc, float& wfluc, int t)
{
float u,v,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
u = (u-uAv)*(u-uAv);
v = (v-vAv)*(v-vAv);
w = (w-wAv)*(w-wAv);
ufluc = (ufluc*(t-START_VELFLUC)+u)/((t-START_VELFLUC)+1);
vfluc = (vfluc*(t-START_VELFLUC)+v)/((t-START_VELFLUC)+1);
wfluc = (wfluc*(t-START_VELFLUC)+w)/((t-START_VELFLUC)+1);
}
inline __device__ void vel_flucLR(float* f, float& uAv,
float& vAv, float& ufluc, float& vfluc, float t)
{
float u,v;//,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
u = (u-uAv)*(u-uAv);
v = (v-vAv)*(v-vAv);
ufluc = (ufluc*(t-START_VELFLUC)+u*LRFACTOR)/((t-START_VELFLUC)+LRFACTOR);
vfluc = (vfluc*(t-START_VELFLUC)+v*LRFACTOR)/((t-START_VELFLUC)+LRFACTOR);
}
__global__ void initialize(float *fout, size_t pitch, int zInner, int GPU_N)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float xcoord = x;
float ycoord = y;
float zcoord = z+1+GPU_N*ZDIM;
int j = x+y*pitch+z*YDIM*pitch;//index on padded mem (pitch in elements)
float f[19] = {0};
float m[19] = {0};
int im = ImageFcn(xcoord,ycoord,zcoord,0);
float u,v,w,rho;
rho = 1.f;
u = 0.0f;
v = UMAX;
w = 0.0f;
if(im == 10 || im == 1){
u = 0.0f;
v = 0.0f;
w = 0.0f;
}
bgk_meq(m,rho,u,v,w);
InvertMoments(f,m);
for(int i = 0; i<19; i++)
fout[j+i *pitch*YDIM*zInner]=f[ i];
}
__global__ void initializeLR(float *fout, size_t pitch, int zInner, int GPU_N)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float xcoord = x;
float ycoord = y;
float zcoord = z+1+GPU_N*(zInner+2);
xcoord = LRX0+x*LRFACTOR;
ycoord = LRY0+y*LRFACTOR;
zcoord = LRZ0+LRFACTOR*(GPU_N*(zInner+2)+z);
int j = x+y*pitch+z*YLRDIM*pitch;//index on padded mem (pitch in elements)
float f[19] = {0};
float m[19] = {0};
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float u,v,w,rho;
rho = 1.f;
u = 0.0f;
v = UMAX;
w = 0.0f;
if(im == 10 || im == 1){
u = 0.0f;
v = 0.0f;
w = 0.0f;
}
bgk_meq(m,rho,u,v,w);
InvertMoments(f,m);
for(int i = 0; i<19; i++)
fout[j+i *pitch*YLRDIM*zInner]=f[ i];
}
__global__ void update_top(float* hB, float* hA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float* h_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int j = x+y*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,(GPU+1)*(zInner+2)-1,t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[0 ]= hA [j];
f[1 ]= hA [buff_mem(1 ,x-1,y ,pitch)];
f[3 ]= hA [buff_mem(3 ,x+1,y ,pitch)];
f[2 ]= hA [buff_mem(2 ,x ,ym ,pitch)];
f[5 ]= hA [buff_mem(5 ,x-1,ym ,pitch)];
f[6 ]= hA [buff_mem(6 ,x+1,ym ,pitch)];
f[4 ]= hA [buff_mem(4 ,x ,yp ,pitch)];
f[7 ]= hA [buff_mem(7 ,x+1,yp ,pitch)];
f[8 ]= hA [buff_mem(8 ,x-1,yp ,pitch)];
f[9 ]= fA [f_mem (9 ,x ,y ,zInner-1,pitch, zInner)];
f[10]= fA [f_mem (10,x-1,y ,zInner-1,pitch, zInner)];
f[11]= fA [f_mem (11,x ,ym ,zInner-1,pitch, zInner)];
f[12]= fA [f_mem (12,x+1,y ,zInner-1,pitch, zInner)];
f[13]= fA [f_mem (13,x ,yp ,zInner-1,pitch, zInner)];
f[14]= temp[buff_mem(14,x ,y ,pitch)];
f[15]= temp[buff_mem(15,x-1,y ,pitch)];
f[16]= temp[buff_mem(16,x ,ym ,pitch)];
f[17]= temp[buff_mem(17,x+1,y ,pitch)];
f[18]= temp[buff_mem(18,x ,yp ,pitch)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
hB[buff_mem(0 ,x,y,pitch)] = f[0 ];
hB[buff_mem(1 ,x,y,pitch)] = f[3 ];
hB[buff_mem(2 ,x,y,pitch)] = f[4 ];
hB[buff_mem(3 ,x,y,pitch)] = f[1 ];
hB[buff_mem(4 ,x,y,pitch)] = f[2 ];
hB[buff_mem(5 ,x,y,pitch)] = f[7 ];
hB[buff_mem(6 ,x,y,pitch)] = f[8 ];
hB[buff_mem(7 ,x,y,pitch)] = f[5 ];
hB[buff_mem(8 ,x,y,pitch)] = f[6 ];
hB[buff_mem(9 ,x,y,pitch)] = f[14];
hB[buff_mem(10,x,y,pitch)] = f[17];
hB[buff_mem(11,x,y,pitch)] = f[18];
hB[buff_mem(12,x,y,pitch)] = f[15];
hB[buff_mem(13,x,y,pitch)] = f[16];
hB[buff_mem(14,x,y,pitch)] = f[9 ];
hB[buff_mem(15,x,y,pitch)] = f[12];
hB[buff_mem(16,x,y,pitch)] = f[13];
hB[buff_mem(17,x,y,pitch)] = f[10];
hB[buff_mem(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,(GPU+1)*(zInner+2)-1);
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x-1,y,pitch)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x+1,y,pitch)];
float u_in = PoisProf3D(y,(GPU+1)*(zInner+2)-1);
West_Extrap(f,u_in,t);
}
else if(im == 70)//use velocity from y-1 location. all other moments from y+1
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,(GPU+1)*(zInner+2)-1);
if(im == 26)
xsymmetry_bot(f,y,(GPU+1)*(zInner+2)-1);
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
for(int i = 0; i<19; i++)
hB[buff_mem(i ,x,y,pitch)] = f[i ];
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
// //float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
h_interp[buff_mem_interp(i,x-int(LRX0),y-int(LRY0),pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_bot(float* gB, float* gA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float* g_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int j = x+y*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,GPU*(zInner+2),t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[0 ]= gA [j];
f[1 ]= gA [buff_mem(1 ,x-1,y ,pitch)];
f[3 ]= gA [buff_mem(3 ,x+1,y ,pitch)];
f[2 ]= gA [buff_mem(2 ,x ,ym ,pitch)];
f[5 ]= gA [buff_mem(5 ,x-1,ym ,pitch)];
f[6 ]= gA [buff_mem(6 ,x+1,ym ,pitch)];
f[4 ]= gA [buff_mem(4 ,x ,yp ,pitch)];
f[7 ]= gA [buff_mem(7 ,x+1,yp ,pitch)];
f[8 ]= gA [buff_mem(8 ,x-1,yp ,pitch)];
f[9 ]= temp[buff_mem(9 ,x ,y ,pitch)];
f[10]= temp[buff_mem(10,x-1,y ,pitch)];
f[11]= temp[buff_mem(11,x ,ym ,pitch)];
f[12]= temp[buff_mem(12,x+1,y ,pitch)];
f[13]= temp[buff_mem(13,x ,yp ,pitch)];
f[14]= fA [f_mem (14,x ,y ,0,pitch, zInner)];
f[15]= fA [f_mem (15,x-1,y ,0,pitch, zInner)];
f[16]= fA [f_mem (16,x ,ym ,0,pitch, zInner)];
f[17]= fA [f_mem (17,x+1,y ,0,pitch, zInner)];
f[18]= fA [f_mem (18,x ,yp ,0,pitch, zInner)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
gB[buff_mem(0 ,x,y,pitch)] = f[0 ];
gB[buff_mem(1 ,x,y,pitch)] = f[3 ];
gB[buff_mem(2 ,x,y,pitch)] = f[4 ];
gB[buff_mem(3 ,x,y,pitch)] = f[1 ];
gB[buff_mem(4 ,x,y,pitch)] = f[2 ];
gB[buff_mem(5 ,x,y,pitch)] = f[7 ];
gB[buff_mem(6 ,x,y,pitch)] = f[8 ];
gB[buff_mem(7 ,x,y,pitch)] = f[5 ];
gB[buff_mem(8 ,x,y,pitch)] = f[6 ];
gB[buff_mem(9 ,x,y,pitch)] = f[14];
gB[buff_mem(10,x,y,pitch)] = f[17];
gB[buff_mem(11,x,y,pitch)] = f[18];
gB[buff_mem(12,x,y,pitch)] = f[15];
gB[buff_mem(13,x,y,pitch)] = f[16];
gB[buff_mem(14,x,y,pitch)] = f[9 ];
gB[buff_mem(15,x,y,pitch)] = f[12];
gB[buff_mem(16,x,y,pitch)] = f[13];
gB[buff_mem(17,x,y,pitch)] = f[10];
gB[buff_mem(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,GPU*(zInner+2));
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x-1,y,pitch)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x+1,y,pitch)];
float u_in = PoisProf3D(y,GPU*(zInner+2));
West_Extrap(f,u_in,t);
}
else if(im == 70)//new south inlet periodic
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,GPU*(zInner+2));
if(im == 26)
xsymmetry_bot(f,y,GPU*(zInner+2));
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
for(int i = 0; i<19; i++)
gB[buff_mem(i ,x,y,pitch)] = f[i ];
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
//float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
g_interp[buff_mem_interp(i,x-int(LRX0),y-int(LRY0),pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_inn(float* fB, float* fA, float* g, float* h, float omega, size_t pitch, int GPU, int zInner, float* velAv_u, float* velAv_v, float* velAv_w, float* velFluc_u, float* velFluc_v, float* velFluc_w, float* FX, float* FY, float* FZ, int t, int flag_F, float* f_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
int j = x+y*pitch+z*YDIM*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,GPU*(zInner+2)+1+z,t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[ 0] = fA[j];
f[ 1] = fA[f_mem (1 ,x-1,y ,z ,pitch, zInner)];
f[ 3] = fA[f_mem (3 ,x+1,y ,z ,pitch, zInner)];
f[ 2] = fA[f_mem (2 ,x ,ym ,z ,pitch, zInner)];
f[ 5] = fA[f_mem (5 ,x-1,ym ,z ,pitch, zInner)];
f[ 6] = fA[f_mem (6 ,x+1,ym ,z ,pitch, zInner)];
f[ 4] = fA[f_mem (4 ,x ,yp ,z ,pitch, zInner)];
f[ 7] = fA[f_mem (7 ,x+1,yp ,z ,pitch, zInner)];
f[ 8] = fA[f_mem (8 ,x-1,yp ,z ,pitch, zInner)];
if(z==zInner-1){//top nodes need info from h
f[ 9] = fA[f_mem (9 ,x ,y ,z-1,pitch, zInner)];
f[10]= fA[f_mem (10,x-1,y ,z-1,pitch, zInner)];
f[11]= fA[f_mem (11,x ,ym ,z-1,pitch, zInner)];
f[12]= fA[f_mem (12,x+1,y ,z-1,pitch, zInner)];
f[13]= fA[f_mem (13,x ,yp ,z-1,pitch, zInner)];
f[14]= h [buff_mem(14,x ,y ,pitch)];
f[15]= h [buff_mem(15,x-1,y ,pitch)];
f[16]= h [buff_mem(16,x ,ym ,pitch)];
f[17]= h [buff_mem(17,x+1,y ,pitch)];
f[18]= h [buff_mem(18,x ,yp ,pitch)];
}
else if(z==0){//bottom nodes need info from g
f[ 9] =g [buff_mem(9 ,x ,y ,pitch)];
f[10]= g [buff_mem(10,x-1,y ,pitch)];
f[11]= g [buff_mem(11,x ,ym ,pitch)];
f[12]= g [buff_mem(12,x+1,y ,pitch)];
f[13]= g [buff_mem(13,x ,yp ,pitch)];
f[14]= fA[f_mem (14,x ,y ,z+1,pitch, zInner)];
f[15]= fA[f_mem (15,x-1,y ,z+1,pitch, zInner)];
f[16]= fA[f_mem (16,x ,ym ,z+1,pitch, zInner)];
f[17]= fA[f_mem (17,x+1,y ,z+1,pitch, zInner)];
f[18]= fA[f_mem (18,x ,yp ,z+1,pitch, zInner)];
}
else{//normal nodes
f[ 9] = fA[f_mem(9 ,x ,y ,z-1,pitch,zInner)];
f[10]= fA[f_mem(10,x-1,y ,z-1,pitch,zInner)];
f[11]= fA[f_mem(11,x ,ym ,z-1,pitch,zInner)];
f[12]= fA[f_mem(12,x+1,y ,z-1,pitch,zInner)];
f[13]= fA[f_mem(13,x ,yp ,z-1,pitch,zInner)];
f[14]= fA[f_mem(14,x ,y ,z+1,pitch,zInner)];
f[15]= fA[f_mem(15,x-1,y ,z+1,pitch,zInner)];
f[16]= fA[f_mem(16,x ,ym ,z+1,pitch,zInner)];
f[17]= fA[f_mem(17,x+1,y ,z+1,pitch,zInner)];
f[18]= fA[f_mem(18,x ,yp ,z+1,pitch,zInner)];
}//end normal nodes
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
fB[f_mem(1 ,x,y,z,pitch,zInner)] = f[ 3] ;
fB[f_mem(2 ,x,y,z,pitch,zInner)] = f[ 4] ;
fB[f_mem(3 ,x,y,z,pitch,zInner)] = f[ 1] ;
fB[f_mem(4 ,x,y,z,pitch,zInner)] = f[ 2] ;
fB[f_mem(5 ,x,y,z,pitch,zInner)] = f[ 7] ;
fB[f_mem(6 ,x,y,z,pitch,zInner)] = f[ 8] ;
fB[f_mem(7 ,x,y,z,pitch,zInner)] = f[ 5] ;
fB[f_mem(8 ,x,y,z,pitch,zInner)] = f[ 6] ;
fB[f_mem(9 ,x,y,z,pitch,zInner)] = f[14];
fB[f_mem(10,x,y,z,pitch,zInner)] = f[17];
fB[f_mem(11,x,y,z,pitch,zInner)] = f[18];
fB[f_mem(12,x,y,z,pitch,zInner)] = f[15];
fB[f_mem(13,x,y,z,pitch,zInner)] = f[16];
fB[f_mem(14,x,y,z,pitch,zInner)] = f[ 9] ;
fB[f_mem(15,x,y,z,pitch,zInner)] = f[12];
fB[f_mem(16,x,y,z,pitch,zInner)] = f[13];
fB[f_mem(17,x,y,z,pitch,zInner)] = f[10];
fB[f_mem(18,x,y,z,pitch,zInner)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,GPU*(zInner+2)+1+z);
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x-1,y,z,pitch,zInner)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x+1,y,z,pitch,zInner)];
float u_in = PoisProf3D(y,GPU*(zInner+2)+1+z);
West_Extrap(f,u_in,t);
}
else if(im == 70)//new south inlet periodic
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,GPU*(zInner+2)+1+z);
if(im == 26)
xsymmetry_bot(f,y,GPU*(zInner+2)+1+z);
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
if(VELAV == 1){
if(t>=START_VELAV && t<START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_Av = velAv_w[x+y*pitch+(z+1)*pitch*YDIM];
vel_av(f,u_Av,v_Av,w_Av,t);
velAv_u[x+y*pitch+(z+1)*pitch*YDIM] = u_Av;
velAv_v[x+y*pitch+(z+1)*pitch*YDIM] = v_Av;
velAv_w[x+y*pitch+(z+1)*pitch*YDIM] = w_Av;
}
else if(t>=START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_Av = velAv_w[x+y*pitch+(z+1)*pitch*YDIM];
float u_fluc = velFluc_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_fluc = velFluc_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_fluc = velFluc_w[x+y*pitch+(z+1)*pitch*YDIM];
vel_fluc(f,u_Av,v_Av,w_Av,u_fluc,v_fluc,w_fluc,t);
velFluc_u[x+y*pitch+(z+1)*pitch*YDIM] = u_fluc;
velFluc_v[x+y*pitch+(z+1)*pitch*YDIM] = v_fluc;
velFluc_w[x+y*pitch+(z+1)*pitch*YDIM] = w_fluc;
}
}
for(int i = 0; i<19; i++)
fB[f_mem(i ,x,y,z,pitch,zInner)] = f[ i] ;
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
//float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
f_interp[f_mem_interp(i,x-int(LRX0),y-int(LRY0),z,pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_top_LR(float* hB, float* hA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = (GPU+1)*(zInner+2)-1;//physical coord in LR region
int j = x+y*pitch;//index on padded mem (pitch in elements)
float xcoord = LRX0+x*LRFACTOR;
float ycoord = LRY0+y*LRFACTOR;
float zcoord = LRZ0+LRFACTOR*z;
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[0 ]= hA [j];
f[1 ]= hA [buff_memLR(1 ,x-1,y ,pitch)];
f[3 ]= hA [buff_memLR(3 ,x+1,y ,pitch)];
f[2 ]= hA [buff_memLR(2 ,x ,y-1,pitch)];
f[5 ]= hA [buff_memLR(5 ,x-1,y-1,pitch)];
f[6 ]= hA [buff_memLR(6 ,x+1,y-1,pitch)];
f[4 ]= hA [buff_memLR(4 ,x ,y+1,pitch)];
f[7 ]= hA [buff_memLR(7 ,x+1,y+1,pitch)];
f[8 ]= hA [buff_memLR(8 ,x-1,y+1,pitch)];
f[9 ]= fA [ f_memLR(9 ,x ,y ,zInner-1,pitch, zInner)];
f[10]= fA [ f_memLR(10,x-1,y ,zInner-1,pitch, zInner)];
f[11]= fA [ f_memLR(11,x ,y-1,zInner-1,pitch, zInner)];
f[12]= fA [ f_memLR(12,x+1,y ,zInner-1,pitch, zInner)];
f[13]= fA [ f_memLR(13,x ,y+1,zInner-1,pitch, zInner)];
f[14]= temp[buff_memLR(14,x ,y ,pitch)];
f[15]= temp[buff_memLR(15,x-1,y ,pitch)];
f[16]= temp[buff_memLR(16,x ,y-1,pitch)];
f[17]= temp[buff_memLR(17,x+1,y ,pitch)];
f[18]= temp[buff_memLR(18,x ,y+1,pitch)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
hB[buff_memLR(0 ,x,y,pitch)] = f[0 ];
hB[buff_memLR(1 ,x,y,pitch)] = f[3 ];
hB[buff_memLR(2 ,x,y,pitch)] = f[4 ];
hB[buff_memLR(3 ,x,y,pitch)] = f[1 ];
hB[buff_memLR(4 ,x,y,pitch)] = f[2 ];
hB[buff_memLR(5 ,x,y,pitch)] = f[7 ];
hB[buff_memLR(6 ,x,y,pitch)] = f[8 ];
hB[buff_memLR(7 ,x,y,pitch)] = f[5 ];
hB[buff_memLR(8 ,x,y,pitch)] = f[6 ];
hB[buff_memLR(9 ,x,y,pitch)] = f[14];
hB[buff_memLR(10,x,y,pitch)] = f[17];
hB[buff_memLR(11,x,y,pitch)] = f[18];
hB[buff_memLR(12,x,y,pitch)] = f[15];
hB[buff_memLR(13,x,y,pitch)] = f[16];
hB[buff_memLR(14,x,y,pitch)] = f[9 ];
hB[buff_memLR(15,x,y,pitch)] = f[12];
hB[buff_memLR(16,x,y,pitch)] = f[13];
hB[buff_memLR(17,x,y,pitch)] = f[10];
hB[buff_memLR(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
for(int i = 0; i<19; i++)
hB[buff_memLR(i ,x,y,pitch)] = f[i ];
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_bot_LR(float* gB, float* gA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
//int z = (zInner+2)-1;
int j = x+y*pitch;//index on padded mem (pitch in elements)
float xcoord = LRX0+x*LRFACTOR;
float ycoord = LRY0+y*LRFACTOR;
//float zcoord = LRZ0+GPU*LRFACTOR*z;
float zcoord = LRZ0+LRFACTOR*(GPU*(zInner+2)-1);
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[0 ]= gA [j];
f[1 ]= gA [buff_memLR(1 ,x-1,y ,pitch)];
f[3 ]= gA [buff_memLR(3 ,x+1,y ,pitch)];
f[2 ]= gA [buff_memLR(2 ,x ,y-1,pitch)];
f[5 ]= gA [buff_memLR(5 ,x-1,y-1,pitch)];
f[6 ]= gA [buff_memLR(6 ,x+1,y-1,pitch)];
f[4 ]= gA [buff_memLR(4 ,x ,y+1,pitch)];
f[7 ]= gA [buff_memLR(7 ,x+1,y+1,pitch)];
f[8 ]= gA [buff_memLR(8 ,x-1,y+1,pitch)];
f[9 ]= temp[buff_memLR(9 ,x ,y ,pitch)];
f[10]= temp[buff_memLR(10,x-1,y ,pitch)];
f[11]= temp[buff_memLR(11,x ,y-1,pitch)];
f[12]= temp[buff_memLR(12,x+1,y ,pitch)];
f[13]= temp[buff_memLR(13,x ,y+1,pitch)];
f[14]= fA [ f_memLR(14,x ,y ,0,pitch, zInner)];
f[15]= fA [ f_memLR(15,x-1,y ,0,pitch, zInner)];
f[16]= fA [ f_memLR(16,x ,y-1,0,pitch, zInner)];
f[17]= fA [ f_memLR(17,x+1,y ,0,pitch, zInner)];
f[18]= fA [ f_memLR(18,x ,y+1,0,pitch, zInner)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
gB[buff_memLR(0 ,x,y,pitch)] = f[0 ];
gB[buff_memLR(1 ,x,y,pitch)] = f[3 ];
gB[buff_memLR(2 ,x,y,pitch)] = f[4 ];
gB[buff_memLR(3 ,x,y,pitch)] = f[1 ];
gB[buff_memLR(4 ,x,y,pitch)] = f[2 ];
gB[buff_memLR(5 ,x,y,pitch)] = f[7 ];
gB[buff_memLR(6 ,x,y,pitch)] = f[8 ];
gB[buff_memLR(7 ,x,y,pitch)] = f[5 ];
gB[buff_memLR(8 ,x,y,pitch)] = f[6 ];
gB[buff_memLR(9 ,x,y,pitch)] = f[14];
gB[buff_memLR(10,x,y,pitch)] = f[17];
gB[buff_memLR(11,x,y,pitch)] = f[18];
gB[buff_memLR(12,x,y,pitch)] = f[15];
gB[buff_memLR(13,x,y,pitch)] = f[16];
gB[buff_memLR(14,x,y,pitch)] = f[9 ];
gB[buff_memLR(15,x,y,pitch)] = f[12];
gB[buff_memLR(16,x,y,pitch)] = f[13];
gB[buff_memLR(17,x,y,pitch)] = f[10];
gB[buff_memLR(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
for(int i = 0; i<19; i++)
gB[buff_memLR(i ,x,y,pitch)] = f[i ];
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_inn_LR(float* fB, float* fA, float* g, float* h, float omega, size_t pitch, int GPU, int zInner, float* velAv_u, float* velAv_v, float* velFluc_u, float* velFluc_v, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
int j = x+y*pitch+z*YLRDIM*pitch;//index on padded mem (pitch in elements)
int im = ImageFcnLR(LRX0+LRFACTOR*x,LRY0+LRFACTOR*y,LRZ0+LRFACTOR*(GPU*(zInner+2)+1+z));
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[ 0] = fA[j];
f[ 1] = fA[f_memLR (1 ,x-1,y ,z ,pitch, zInner)];
f[ 3] = fA[f_memLR (3 ,x+1,y ,z ,pitch, zInner)];
f[ 2] = fA[f_memLR (2 ,x ,y-1,z ,pitch, zInner)];
f[ 5] = fA[f_memLR (5 ,x-1,y-1,z ,pitch, zInner)];
f[ 6] = fA[f_memLR (6 ,x+1,y-1,z ,pitch, zInner)];
f[ 4] = fA[f_memLR (4 ,x ,y+1,z ,pitch, zInner)];
f[ 7] = fA[f_memLR (7 ,x+1,y+1,z ,pitch, zInner)];
f[ 8] = fA[f_memLR (8 ,x-1,y+1,z ,pitch, zInner)];
if(z==zInner-1){//top nodes need info from h
f[ 9] =fA[ f_memLR(9 ,x ,y ,z-1,pitch, zInner)];
f[10]= fA[ f_memLR(10,x-1,y ,z-1,pitch, zInner)];
f[11]= fA[ f_memLR(11,x ,y-1,z-1,pitch, zInner)];
f[12]= fA[ f_memLR(12,x+1,y ,z-1,pitch, zInner)];
f[13]= fA[ f_memLR(13,x ,y+1,z-1,pitch, zInner)];
f[14]= h [buff_memLR(14,x ,y ,pitch)];
f[15]= h [buff_memLR(15,x-1,y ,pitch)];
f[16]= h [buff_memLR(16,x ,y-1,pitch)];
f[17]= h [buff_memLR(17,x+1,y ,pitch)];
f[18]= h [buff_memLR(18,x ,y+1,pitch)];
}
else if(z==0){//bottom nodes need info from g
f[ 9] =g [buff_memLR(9 ,x ,y ,pitch)];
f[10]= g [buff_memLR(10,x-1,y ,pitch)];
f[11]= g [buff_memLR(11,x ,y-1,pitch)];
f[12]= g [buff_memLR(12,x+1,y ,pitch)];
f[13]= g [buff_memLR(13,x ,y+1,pitch)];
f[14]= fA[ f_memLR(14,x ,y ,z+1,pitch, zInner)];
f[15]= fA[ f_memLR(15,x-1,y ,z+1,pitch, zInner)];
f[16]= fA[ f_memLR(16,x ,y-1,z+1,pitch, zInner)];
f[17]= fA[ f_memLR(17,x+1,y ,z+1,pitch, zInner)];
f[18]= fA[ f_memLR(18,x ,y+1,z+1,pitch, zInner)];
}
else{//normal nodes
f[ 9] =fA[f_memLR(9 ,x ,y ,z-1,pitch,zInner)];
f[10]= fA[f_memLR(10,x-1,y ,z-1,pitch,zInner)];
f[11]= fA[f_memLR(11,x ,y-1,z-1,pitch,zInner)];
f[12]= fA[f_memLR(12,x+1,y ,z-1,pitch,zInner)];
f[13]= fA[f_memLR(13,x ,y+1,z-1,pitch,zInner)];
f[14]= fA[f_memLR(14,x ,y ,z+1,pitch,zInner)];
f[15]= fA[f_memLR(15,x-1,y ,z+1,pitch,zInner)];
f[16]= fA[f_memLR(16,x ,y-1,z+1,pitch,zInner)];
f[17]= fA[f_memLR(17,x+1,y ,z+1,pitch,zInner)];
f[18]= fA[f_memLR(18,x ,y+1,z+1,pitch,zInner)];
}//end normal nodes
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
fB[f_memLR(1 ,x,y,z,pitch,zInner)] = f[ 3] ;
fB[f_memLR(2 ,x,y,z,pitch,zInner)] = f[ 4] ;
fB[f_memLR(3 ,x,y,z,pitch,zInner)] = f[ 1] ;
fB[f_memLR(4 ,x,y,z,pitch,zInner)] = f[ 2] ;
fB[f_memLR(5 ,x,y,z,pitch,zInner)] = f[ 7] ;
fB[f_memLR(6 ,x,y,z,pitch,zInner)] = f[ 8] ;
fB[f_memLR(7 ,x,y,z,pitch,zInner)] = f[ 5] ;
fB[f_memLR(8 ,x,y,z,pitch,zInner)] = f[ 6] ;
fB[f_memLR(9 ,x,y,z,pitch,zInner)] = f[14];
fB[f_memLR(10,x,y,z,pitch,zInner)] = f[17];
fB[f_memLR(11,x,y,z,pitch,zInner)] = f[18];
fB[f_memLR(12,x,y,z,pitch,zInner)] = f[15];
fB[f_memLR(13,x,y,z,pitch,zInner)] = f[16];
fB[f_memLR(14,x,y,z,pitch,zInner)] = f[ 9] ;
fB[f_memLR(15,x,y,z,pitch,zInner)] = f[12];
fB[f_memLR(16,x,y,z,pitch,zInner)] = f[13];
fB[f_memLR(17,x,y,z,pitch,zInner)] = f[10];
fB[f_memLR(18,x,y,z,pitch,zInner)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
if(VELAV == 1){
if(t>=START_VELAV && t<START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM];
vel_avLR(f,u_Av,v_Av,t);
velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM] = u_Av;
velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM] = v_Av;
}
else if(t>=START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM];
float u_fluc = velFluc_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_fluc = velFluc_v[x+y*pitch+(z+1)*pitch*YLRDIM];
vel_flucLR(f,u_Av,v_Av,u_fluc,v_fluc,t);
velFluc_u[x+y*pitch+(z+1)*pitch*YLRDIM] = u_fluc;
velFluc_v[x+y*pitch+(z+1)*pitch*YLRDIM] = v_fluc;
}
}
for(int i = 0; i<19; i++)
fB[f_memLR(i ,x,y,z,pitch,zInner)] = f[ i] ;
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
/*
InterpCF is used on the LR grid. It first uses part of its threads to read from the coarse mesh nodes that completely envelope the fine mesh nodes, and loads the f's into shared memory. Next, all threads use the shared memory data to interpolate and scale the f's
*/
__global__ void InterpCF(float* f_f, float* g_f, float* h_f, size_t pitch_f, float* m_f_c, float* m_g_c, float* m_h_c, float* m_g_temp, size_t pitch_m, float SF, float omega_c, int GPU, int zInner, int zInner_f)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
__shared__ float mom_c[BLOCKSIZEINTERP][2][2][19];
__shared__ float S_c[BLOCKSIZEINTERP][2][2][6];
//int GPU = 0;
int im = ImageFcnLR(LRX0+LRFACTOR*x,LRY0+LRFACTOR*y,LRZ0+LRFACTOR*(GPU*(zInner_f+2)+z));
if(blockIdx.z == 0 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use g and g_temp
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_temp[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(blockIdx.z == 1 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use g and f
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+i*ymax*pitch_m*zInner];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(blockIdx.z == zInner+1 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use h and f
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+(zInner-1)*ymax*pitch_m+i*ymax*pitch_m*zInner];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_h_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2){//use f only
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int z_c = threadIdx.z+blockIdx.z-2;//in coarse grid, blockdim.z is 1; -2 to account for g and lower halo
int ymax = YLRDIM*LRFACTOR+1;
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+z_c*ymax*pitch_m+i*ymax*pitch_m*zInner];
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
syncthreads();
if(x<LRLEVEL || x>XLRDIM-LRLEVEL-1 || y<LRLEVEL || y>YLRDIM-LRLEVEL-1){
//if(x<LRLEVEL+3 || x>XLRDIM-LRLEVEL-5 || y<LRLEVEL+3 || y>YLRDIM-LRLEVEL-5){
//interpolate from shared mem
int xm = int(threadIdx.x*LRFACTOR+LRFACTOR*0.5f);
int ym = int(threadIdx.y*LRFACTOR+LRFACTOR*0.5f);
int zm = int(threadIdx.z*LRFACTOR+LRFACTOR*0.5f);
int xp = xm+1; //int yp = ym+1; int zp = zm+1;
float xf = (threadIdx.x*LRFACTOR+LRFACTOR*0.5f)-xm;
float yf = (threadIdx.y*LRFACTOR+LRFACTOR*0.5f)-ym;
float zf = (threadIdx.z*LRFACTOR+LRFACTOR*0.5f)-zm;
float mom[19];
for(int i = 0; i<19; i++){
float v000 = mom_c[xm][0][0][i];
float v001 = mom_c[xp][0][0][i];
float v010 = mom_c[xm][1][0][i];
float v011 = mom_c[xp][1][0][i];
float v100 = mom_c[xm][0][1][i];
float v101 = mom_c[xp][0][1][i];
float v110 = mom_c[xm][1][1][i];
float v111 = mom_c[xp][1][1][i];
mom[i] = trilinear_interp(v000, v001, v010, v011, v100, v101, v110, v111, xf, yf, zf);
}
if(ORDER == 2)
{
float u_x1,u_x2,u_x3,u_x4,u_x5,u_x6,u_x7,u_x8;
float v_y1,v_y2,v_y3,v_y4,v_y5,v_y6,v_y7,v_y8;
float w_z1,w_z2,w_z3,w_z4,w_z5,w_z6,w_z7,w_z8;
float Sxy1,Sxy2,Sxy3,Sxy4,Sxy5,Sxy6,Sxy7,Sxy8;
float Syz1,Syz2,Syz3,Syz4,Syz5,Syz6,Syz7,Syz8;
float Sxz1,Sxz2,Sxz3,Sxz4,Sxz5,Sxz6,Sxz7,Sxz8;
u_x1=S_c[xm][0][0][0];v_y1=S_c[xm][0][0][1];w_z1=S_c[xm][0][0][2];Sxy1=S_c[xm][0][0][3];Syz1=S_c[xm][0][0][4];Sxz1=S_c[xm][0][0][5];
u_x2=S_c[xp][0][0][0];v_y2=S_c[xp][0][0][1];w_z2=S_c[xp][0][0][2];Sxy2=S_c[xp][0][0][3];Syz2=S_c[xp][0][0][4];Sxz2=S_c[xp][0][0][5];
u_x3=S_c[xm][1][0][0];v_y3=S_c[xm][1][0][1];w_z3=S_c[xm][1][0][2];Sxy3=S_c[xm][1][0][3];Syz3=S_c[xm][1][0][4];Sxz3=S_c[xm][1][0][5];
u_x4=S_c[xp][1][0][0];v_y4=S_c[xp][1][0][1];w_z4=S_c[xp][1][0][2];Sxy4=S_c[xp][1][0][3];Syz4=S_c[xp][1][0][4];Sxz4=S_c[xp][1][0][5];
u_x5=S_c[xm][0][1][0];v_y5=S_c[xm][0][1][1];w_z5=S_c[xm][0][1][2];Sxy5=S_c[xm][0][1][3];Syz5=S_c[xm][0][1][4];Sxz5=S_c[xm][0][1][5];
u_x6=S_c[xp][0][1][0];v_y6=S_c[xp][0][1][1];w_z6=S_c[xp][0][1][2];Sxy6=S_c[xp][0][1][3];Syz6=S_c[xp][0][1][4];Sxz6=S_c[xp][0][1][5];
u_x7=S_c[xm][1][1][0];v_y7=S_c[xm][1][1][1];w_z7=S_c[xm][1][1][2];Sxy7=S_c[xm][1][1][3];Syz7=S_c[xm][1][1][4];Sxz7=S_c[xm][1][1][5];
u_x8=S_c[xp][1][1][0];v_y8=S_c[xp][1][1][1];w_z8=S_c[xp][1][1][2];Sxy8=S_c[xp][1][1][3];Syz8=S_c[xp][1][1][4];Sxz8=S_c[xp][1][1][5];
float m03,m05,m07, m13,m15,m17, m23,m25,m27, m33,m35,m37, m43,m45,m47, m53,m55,m57, m63,m65,m67, m73,m75,m77;
m03=mom_c[xm][0][0][3];m05=mom_c[xm][0][0][5];m07=mom_c[xm][0][0][7];
m13=mom_c[xp][0][0][3];m15=mom_c[xp][0][0][5];m17=mom_c[xp][0][0][7];
m23=mom_c[xm][1][0][3];m25=mom_c[xm][1][0][5];m27=mom_c[xm][1][0][7];
m33=mom_c[xp][1][0][3];m35=mom_c[xp][1][0][5];m37=mom_c[xp][1][0][7];
m43=mom_c[xm][0][1][3];m45=mom_c[xm][0][1][5];m47=mom_c[xm][0][1][7];
m53=mom_c[xp][0][1][3];m55=mom_c[xp][0][1][5];m57=mom_c[xp][0][1][7];
m63=mom_c[xm][1][1][3];m65=mom_c[xm][1][1][5];m67=mom_c[xm][1][1][7];
m73=mom_c[xp][1][1][3];m75=mom_c[xp][1][1][5];m77=mom_c[xp][1][1][7];
float cx = -((u_x8-u_x7+u_x6-u_x5+u_x4-u_x3+u_x2-u_x1))*0.03125f;
float cy = -((Sxy8+Sxy7-Sxy6-Sxy5+Sxy4+Sxy3-Sxy2-Sxy1)-m75+m65+m55-m45-m35+m25+m15-m05)*0.0625f;
float cz = -((Sxz8+Sxz7+Sxz6+Sxz5-Sxz4-Sxz3-Sxz2-Sxz1)-m77+m67-m57+m47+m37-m27+m17-m07)*0.0625f;
float dx = -((Sxy8-Sxy7+Sxy6-Sxy5+Sxy4-Sxy3+Sxy2-Sxy1)-m73+m63+m53-m43-m33+m23+m13-m03)*0.0625f;
float dy = -((v_y8+v_y7-v_y6-v_y5+v_y4+v_y3-v_y2-v_y1))*0.03125f;
float dz = -((Syz8+Syz7+Syz6+Syz5-Syz4-Syz3-Syz2-Syz1)-m77-m67+m57+m47+m37+m27-m17-m07)*0.0625f;
float ex = -((Sxz8-Sxz7+Sxz6-Sxz5+Sxz4-Sxz3+Sxz2-Sxz1)-m73+m63-m53+m43+m33-m23+m13-m03)*0.0625f;
float ey = -((Syz8+Syz7-Syz6-Syz5+Syz4+Syz3-Syz2-Syz1)-m75-m65+m55+m45+m35+m25-m15-m05)*0.0625f;
float ez = -((w_z8+w_z7+w_z6+w_z5-w_z4-w_z3-w_z2-w_z1))*0.03125f;
float xpr = 4.f*xf*xf-4.f*xf+1.f;
float ypr = 4.f*yf*yf-4.f*yf+1.f;
float zpr = 4.f*zf*zf-4.f*zf+1.f;
mom[3] += cx*(1.f-xpr)+cy*(1.f-ypr)+cz*(1.f-zpr);
mom[5] += dx*(1.f-xpr)+dy*(1.f-ypr)+dz*(1.f-zpr);
mom[7] += ex*(1.f-xpr)+ey*(1.f-ypr)+ez*(1.f-zpr);
}
float f[19];
//InvertPhysicalMoments(f,mom,SF);
//InvertPhysicalMoments_LES_cf(f,mom,SF,omega_c);
ScaleMoments_bgk(mom,SF);
// mom[0] = 2.f;
// mom[3] = 0.1f;
// mom[5] = 0.1f;
// mom[7] = 0.1f;
InvertMoments(f,mom);
if(im != 1 && im != 10){
if(z==0){
for(int i = 0; i<19; i++){
g_f[buff_memLR(i,x,y,pitch_f)]=f[i];
}
}
else if(z==gridDim.z*blockDim.z-1){
for(int i = 0; i<19; i++){
h_f[buff_memLR(i,x,y,pitch_f)]=f[i];
}
}
else{
for(int i = 0; i<19; i++){
f_f[f_memLR(i,x,y,z-1,pitch_f,zInner_f)]=f[i];
}
}
}
}
}
__global__ void InterpFC(float* f_c, float* g_c, float* h_c, float* f_f, float* h_f, float* temp_f, size_t pitch_c, size_t pitch_f, float SF, float omega_f, int GPU, int zInner, int zInner_f)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
//if( (x > LRX0+1 && x < LRX0+XLRDIM*LRFACTOR-1 && y > LRY0+1 && y < LRY0+YLRDIM*LRFACTOR-1) &&
//(x == int(LRX0+2) || x == int(LRX0+XLRDIM*LRFACTOR-2) || y == int(LRY0+2) || y == int(LRY0+YLRDIM*LRFACTOR-2)))
//(true))
//if( (x > LRX0+5 && x < LRX0+XLRDIM*LRFACTOR-6 && y > LRY0+5 && y < LRY0+YLRDIM*LRFACTOR-6) &&
if( (x > LRX0+1 && x < LRX0+XLRDIM*LRFACTOR-2 && y > LRY0+1 && y < LRY0+YLRDIM*LRFACTOR-2) &&
//(x == int(LRX0+2) || x == int(LRX0+XLRDIM*LRFACTOR-2) || y == int(LRY0+2) || y == int(LRY0+YLRDIM*LRFACTOR-2)))
(true))
{
float f[19];
float mom[8][19];//physical moments of 8 neighboring nodes
float S_f[8][6];//strain rate tensor of 8 neighboring nodes
int xm = LRLEVEL*(x-LRX0);
int ym = LRLEVEL*(y-LRY0);
int zm = LRLEVEL*(z-(-(1.f-0.5f*LRFACTOR)))-1;//LRZ0=-(1.f-0.5f*LRFACTOR), and -1 to account for g_LR
int xp = xm+1;
int yp = ym+1;
int zp = zm+1;
//top nodes. interp between h and h_temp. output to h
if(z == zInner+1)
{
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xm,ym,pitch_f)];
Moments(f,mom[0]);
StrainRate(S_f[0],mom[0],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xp,ym,pitch_f)];
Moments(f,mom[1]);
StrainRate(S_f[1],mom[1],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xm,yp,pitch_f)];
Moments(f,mom[2]);
StrainRate(S_f[2],mom[2],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xp,yp,pitch_f)];
Moments(f,mom[3]);
StrainRate(S_f[3],mom[3],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xm,ym,pitch_f)];
Moments(f,mom[4]);
StrainRate(S_f[4],mom[4],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xp,ym,pitch_f)];
Moments(f,mom[5]);
StrainRate(S_f[5],mom[5],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xm,yp,pitch_f)];
Moments(f,mom[6]);
StrainRate(S_f[6],mom[6],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xp,yp,pitch_f)];
Moments(f,mom[7]);
StrainRate(S_f[7],mom[7],1.f);
}
//inner nodes. output to g or f
else{
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,ym,zm,pitch_f,zInner_f)];
Moments(f,mom[0]);
StrainRate(S_f[0],mom[0],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,ym,zm,pitch_f,zInner_f)];
Moments(f,mom[1]);
StrainRate(S_f[1],mom[1],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,yp,zm,pitch_f,zInner_f)];
Moments(f,mom[2]);
StrainRate(S_f[2],mom[2],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,yp,zm,pitch_f,zInner_f)];
Moments(f,mom[3]);
StrainRate(S_f[3],mom[3],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,ym,zp,pitch_f,zInner_f)];
Moments(f,mom[4]);
StrainRate(S_f[4],mom[4],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,ym,zp,pitch_f,zInner_f)];
Moments(f,mom[5]);
StrainRate(S_f[5],mom[5],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,yp,zp,pitch_f,zInner_f)];
Moments(f,mom[6]);
StrainRate(S_f[6],mom[6],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,yp,zp,pitch_f,zInner_f)];
Moments(f,mom[7]);
StrainRate(S_f[7],mom[7],1.f);
}
if(ORDER == 1){
for(int i = 0; i<19; i++)
mom[0][i] = 0.125f*(mom[0][i]+mom[1][i]+mom[2][i]+mom[3][i]+mom[4][i]+mom[5][i]+mom[6][i]+mom[7][i]);
}
else if(ORDER == 2)
{
float u_x1,u_x2,u_x3,u_x4,u_x5,u_x6,u_x7,u_x8;
float v_y1,v_y2,v_y3,v_y4,v_y5,v_y6,v_y7,v_y8;
float w_z1,w_z2,w_z3,w_z4,w_z5,w_z6,w_z7,w_z8;
float Sxy1,Sxy2,Sxy3,Sxy4,Sxy5,Sxy6,Sxy7,Sxy8;
float Syz1,Syz2,Syz3,Syz4,Syz5,Syz6,Syz7,Syz8;
float Sxz1,Sxz2,Sxz3,Sxz4,Sxz5,Sxz6,Sxz7,Sxz8;
u_x1=S_f[0][0];v_y1=S_f[0][1];w_z1=S_f[0][2];Sxy1=S_f[0][3];Syz1=S_f[0][4];Sxz1=S_f[0][5];
u_x2=S_f[1][0];v_y2=S_f[1][1];w_z2=S_f[1][2];Sxy2=S_f[1][3];Syz2=S_f[1][4];Sxz2=S_f[1][5];
u_x3=S_f[2][0];v_y3=S_f[2][1];w_z3=S_f[2][2];Sxy3=S_f[2][3];Syz3=S_f[2][4];Sxz3=S_f[2][5];
u_x4=S_f[3][0];v_y4=S_f[3][1];w_z4=S_f[3][2];Sxy4=S_f[3][3];Syz4=S_f[3][4];Sxz4=S_f[3][5];
u_x5=S_f[4][0];v_y5=S_f[4][1];w_z5=S_f[4][2];Sxy5=S_f[4][3];Syz5=S_f[4][4];Sxz5=S_f[4][5];
u_x6=S_f[5][0];v_y6=S_f[5][1];w_z6=S_f[5][2];Sxy6=S_f[5][3];Syz6=S_f[5][4];Sxz6=S_f[5][5];
u_x7=S_f[6][0];v_y7=S_f[6][1];w_z7=S_f[6][2];Sxy7=S_f[6][3];Syz7=S_f[6][4];Sxz7=S_f[6][5];
u_x8=S_f[7][0];v_y8=S_f[7][1];w_z8=S_f[7][2];Sxy8=S_f[7][3];Syz8=S_f[7][4];Sxz8=S_f[7][5];
float m03,m05,m07, m13,m15,m17, m23,m25,m27, m33,m35,m37, m43,m45,m47, m53,m55,m57, m63,m65,m67, m73,m75,m77;
m03=mom[0][3];m05=mom[0][5];m07=mom[0][7];
m13=mom[1][3];m15=mom[1][5];m17=mom[1][7];
m23=mom[2][3];m25=mom[2][5];m27=mom[2][7];
m33=mom[3][3];m35=mom[3][5];m37=mom[3][7];
m43=mom[4][3];m45=mom[4][5];m47=mom[4][7];
m53=mom[5][3];m55=mom[5][5];m57=mom[5][7];
m63=mom[6][3];m65=mom[6][5];m67=mom[6][7];
m73=mom[7][3];m75=mom[7][5];m77=mom[7][7];
float cx = -((u_x8-u_x7+u_x6-u_x5+u_x4-u_x3+u_x2-u_x1))*0.03125f;
float cy = -((Sxy8+Sxy7-Sxy6-Sxy5+Sxy4+Sxy3-Sxy2-Sxy1)-m75+m65+m55-m45-m35+m25+m15-m05)*0.0625f;
float cz = -((Sxz8+Sxz7+Sxz6+Sxz5-Sxz4-Sxz3-Sxz2-Sxz1)-m77+m67-m57+m47+m37-m27+m17-m07)*0.0625f;
float dx = -((Sxy8-Sxy7+Sxy6-Sxy5+Sxy4-Sxy3+Sxy2-Sxy1)-m73+m63+m53-m43-m33+m23+m13-m03)*0.0625f;
float dy = -((v_y8+v_y7-v_y6-v_y5+v_y4+v_y3-v_y2-v_y1))*0.03125f;
float dz = -((Syz8+Syz7+Syz6+Syz5-Syz4-Syz3-Syz2-Syz1)-m77-m67+m57+m47+m37+m27-m17-m07)*0.0625f;
float ex = -((Sxz8-Sxz7+Sxz6-Sxz5+Sxz4-Sxz3+Sxz2-Sxz1)-m73+m63-m53+m43+m33-m23+m13-m03)*0.0625f;
float ey = -((Syz8+Syz7-Syz6-Syz5+Syz4+Syz3-Syz2-Syz1)-m75-m65+m55+m45+m35+m25-m15-m05)*0.0625f;
float ez = -((w_z8+w_z7+w_z6+w_z5-w_z4-w_z3-w_z2-w_z1))*0.03125f;
for(int i = 0; i<19; i++)
mom[0][i] = 0.125f*(mom[0][i]+mom[1][i]+mom[2][i]+mom[3][i]+mom[4][i]+mom[5][i]+mom[6][i]+mom[7][i]);
float xpr = 0.f;//4.f*xf*xf-4.f*xf+1.f;
float ypr = 0.f;//4.f*yf*yf-4.f*yf+1.f;
float zpr = 0.f;//4.f*zf*zf-4.f*zf+1.f;
mom[0][3] += cx*(1.f-xpr)+cy*(1.f-ypr)+cz*(1.f-zpr);
mom[0][5] += dx*(1.f-xpr)+dy*(1.f-ypr)+dz*(1.f-zpr);
mom[0][7] += ex*(1.f-xpr)+ey*(1.f-ypr)+ez*(1.f-zpr);
}
//InvertPhysicalMoments(f,mom[0],SF);
//InvertPhysicalMoments_LES_fc(f,mom[0],SF,omega_f);
ScaleMoments_bgk(mom[0],SF);
InvertMoments(f,mom[0]);
//for(int i = 0; i<19; i++) f[i] = 0.1f;
//int GPU = 0;
int im = ImageFcn(x,y,GPU*(zInner+2)+z,0);
if(im != 1 && im != 10){
if(z == 0){
for(int i = 0; i<19; i++)
g_c[buff_mem(i,x,y,pitch_c)]=f[i];
}
else if(z == zInner+1){
for(int i = 0; i<19; i++)
h_c[buff_mem(i,x,y,pitch_c)]=f[i];
}
else{
for(int i = 0; i<19; i++)
f_c[f_mem(i,x,y,z-1,pitch_c,zInner)]=f[i];
}
}
}//end extraction region
}
__global__ void AverageV(float* fA, float* gA, float* hA, size_t pitch, int GPU, int zInner, float* Av_V, int t)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float f[19];
float v_av = 0;
int im = ImageFcn(x,0,(GPU+1)*(zInner+2)-1,t);
__shared__ float sumV[BLOCKSIZEX];
syncthreads();
if(z == 0){
for(int i = 0; i<19; i++)
f[i] = gA[buff_mem(i,x,DYNY1,pitch)];
}
else if(z == zInner+1){
for(int i = 0; i<19; i++)
f[i] = hA[buff_mem(i,x,DYNY1,pitch)];
}
else{
for(int i = 0; i<19; i++)
f[i] = fA[f_mem(i,x,DYNY1,z-1,pitch,zInner)];
}
sumV[threadIdx.x] = f[2]-f[4]+f[5]+f[6]-f[7]-f[8]+f[11]-f[13]+f[16]-f[18];
if(im == 1 || im == 10) sumV[threadIdx.x] = 0.f;
syncthreads();
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumV[threadIdx.x] += sumV[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&Av_V[t],sumV[0]);
}
}
void WriteResults(ostream &output, ostream &outputslice, float *fin, float *gin, float *hin, float **velAv,
float **velFluc, float omega, int GPU_N, int GPU)
{
float f[19];
output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
output<<"ZONE F=POINT, I="<<XDIM<<", J="<<YDIM<<", K="<<ZDIM/GPU_N<<"\n";
if(GPU == 0){
outputslice<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
outputslice<<"ZONE F=POINT, I="<<XDIM<<", J="<<YDIM<<", K="<<1<<"\n";
}
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = gin[(i+j*XDIM)+l *XDIM*YDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
output<<i<<", "<<j<<", "<<(ZDIM/GPU_N*GPU)<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM]<<","<<velAv[1][i+j*XDIM]<<","<<velAv[2][i+j*XDIM]<<", "<<velFluc[0][i+j*XDIM]<<","<<velFluc[1][i+j*XDIM]<<","<<velFluc[2][i+j*XDIM]<<","<<0<<endl;
}}
for(int k = 1; k<ZDIM/GPU_N-1; k++){
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = fin[(i+j*XDIM)+(k-1)*XDIM*YDIM+l*XDIM*YDIM*(ZDIM/GPU_N-2)];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float m1 =-30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+8.f*f[5]+8.f*f[6]+8.f*f[7]+8.f*f[8]+-11.f*f[9]+8.f*f[10]+8.f*f[11]+8.f*f[12]+8.f*f[13]+-11.f*f[14]+8.f*f[15]+8.f*f[16]+8.f*f[17]+8.f*f[18];
//float m6 = -4.f*f[2]+4.f*f[4]+f[5]+f[6]+-f[7]+-f[8]+f[11]+-f[13]+f[16]+-f[18];
float m10 =-4.f*f[1]+2.f*f[2]+-4.f*f[3]+2.f*f[4]+f[5]+f[6]+f[7]+f[8]+2.f*f[9]+f[10]+-2.f*f[11]+f[12]+-2.f*f[13]+2.f*f[14]+f[15]+-2.f*f[16]+f[17]+-2.f*f[18];
float m16 = f[5]+-f[6]+-f[7]+f[8]-f[10]+f[12]+-f[15]+f[17];
float m[19] = {0};
Moments_host(f,m);
float omega = 1.0f/(3.0f*(UMAX*OBSTR1*2.f/RE)+0.5f);
//float omega2 = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
m[9] -= 2.f*u*u-(v*v+w*w);
m[11]-= v*v-w*w;
m[13]-= u*v;
m[14]-= v*w;
m[15]-= u*w;
float PI11 = -0.5f *(m[ 9]);
float PI22 = -(-38.f*m[ 9]-3.0f*m[11])/76.f;
float PI33 = -(-38.f*m[ 9]+3.0f*m[11])/76.f;
float PI12 = -1.5f*m[13];
float PI23 = -1.5f*m[14];
float PI13 = -1.5f*m[15];
//we know Smag on coarse mesh
float Smag = sqrt(2.f*(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13));
//InvertMoments_host(f,m);
//u = m[3];
//v = m[5];
//w = m[7];
//m6 = m[6 ];
//m10= m[10];
//m16= m[16];
int z = (ZDIM/GPU_N*GPU+k);
output<<i<<", "<<j<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+k*XDIM*YDIM]<<", "<<velAv[2][i+j*XDIM+k*XDIM*YDIM]<<", "
//<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[1][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
if(k == 1 && GPU == 0){
outputslice<<i<<", "<<j<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+k*XDIM*YDIM]<<", "<<velAv[2][i+j*XDIM+k*XDIM*YDIM]<<","
<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[1][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
}
}}}
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = hin[(i+j*XDIM)+l *XDIM*YDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
output<<i<<", "<<j<<", "<<(ZDIM/GPU_N*(GPU+1)-1)<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<","<<velAv[2][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<", "
<<velFluc[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velFluc[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<","<<0<<endl;
}}
}
void WriteResultsLR(ostream &output, ostream &outputslice, float *fin, float *gin, float *hin, float **velAv,
float **velFluc, float omega, int GPU_N, int GPU)
{
float f[19];
output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
output<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<ZLRDIM/GPU_N<<"\n";
if(GPU == 0){
outputslice<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
outputslice<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<1<<"\n";
}
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = gin[(i+j*XLRDIM)+l *XLRDIM*YLRDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*GPU);
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XLRDIM]<<","<<velAv[1][i+j*XLRDIM]<<","<<velAv[2][i+j*XLRDIM]
<<", "<<velFluc[0][i+j*XLRDIM]<<","<<velFluc[1][i+j*XLRDIM]<<","<<velFluc[2][i+j*XLRDIM]
<<","<<0<<endl;
}}
for(int k = 1; k<ZLRDIM/GPU_N-1; k++){
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = fin[(i+j*XLRDIM)+(k-1)*XLRDIM*YLRDIM+l*XLRDIM*YLRDIM*(ZLRDIM/GPU_N-2)];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*GPU+k);
float m[19] = {0};
Moments_host(f,m);
float omega = 1.0f/(3.0f*(UMAX*OBSTR1*2.f/RE)+0.5f);
//float omega2 = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
m[9] -= 2.f*u*u-(v*v+w*w);
m[11]-= v*v-w*w;
m[13]-= u*v;
m[14]-= v*w;
m[15]-= u*w;
float PI11 = -0.5f *(m[ 9]);
float PI22 = -(-38.f*m[ 9]-3.0f*m[11])/76.f;
float PI33 = -(-38.f*m[ 9]+3.0f*m[11])/76.f;
float PI12 = -1.5f*m[13];
float PI23 = -1.5f*m[14];
float PI13 = -1.5f*m[15];
//we know Smag on coarse mesh
float Smag = sqrt(2.f*(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13))/LRFACTOR;
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv [0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velAv [1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "<<velAv [2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<Smag<<endl;
if(k == 3 && GPU == 0){
outputslice<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv [0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velAv [1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "<<velAv [2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<Smag<<endl;
}
}}}
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = hin[(i+j*XLRDIM)+l *XLRDIM*YLRDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*(GPU+1)-1);
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velAv[1][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<", "<<velAv[2][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<0<<endl;
}}
}
void WriteForces(float **F, ofstream &output, int ForceTime, int level)
{
float ref = UMAX*UMAX*ZDIM*OBSTR1;
if(level > 0)
ref *= LRLEVEL*LRLEVEL;
for(int i = 0; i<ForceTime; i++){
output<<i+STARTF<<", "<<F[0][i]/ref<<", "<<F[1][i]/ref<<", "<<F[2][i]/ref<<endl;
}
}
void WriteAvV(float *v, ofstream &output)
{
for(int i = 0; i<TMAX; i++){
output<<i<<", "<<v[i]/(XDIM-2)/ZDIM<<endl;
}
}
void WriteInputs(ostream &output, float omega, float omegaLR, int GPU_per_node)
{
output<<"Base domain size \t"<<XDIM<<"x"<<YDIM<<"x"<<ZDIM<<endl;
output<<"Base blocksize: \t"<<BLOCKSIZEX<<"x"<<BLOCKSIZEY<<"x"<<BLOCKSIZEZ<<endl;
output<<"Obst1 location: \t("<<OBSTX1<<","<<OBSTY1<<","<<OBSTZ1<<")"<<endl;
output<<"Obst1 radius: \t"<<OBSTR1<<endl;
output<<"Obst2 location: \t("<<OBSTX2<<","<<OBSTY2<<","<<OBSTZ2<<")"<<endl;
output<<"Obst2 radius: \t"<<OBSTR2<<endl;
output<<"RE: \t"<<RE<<endl;
output<<"UMAX: \t"<<UMAX<<endl;
output<<"omega \t: "<<omega<<endl;
output<<"DPDY \t: "<<DPDY<<endl;
output<<"TMAX: \t"<<TMAX<<endl;
output<<"STARTF: \t"<<STARTF<<endl;
output<<"START_VELAV: \t"<<START_VELAV<<endl;
output<<"START_VELFLUC: \t"<<START_VELFLUC<<endl;
output<<"REFINEMENT: \t"<<REFINEMENT<<endl;
output<<"MODEL: \t"<<MODEL<<endl;
output<<"Smagorinsky LES: \t"<<SmagLES<<endl;
output<<"CS: \t"<<CS<<endl;
output<<"LR domain size \t"<<XLRDIM<<"x"<<YLRDIM<<"x"<<ZLRDIM<<endl;
output<<"LR factor \t"<<LRFACTOR<<endl;
output<<"LR location \t"<<LRX0<<"x"<<LRY0<<"x"<<LRZ0<<endl;
output<<"LR blocksize: \t"<<BLOCKSIZELRX<<"x"<<BLOCKSIZELRY<<"x"<<BLOCKSIZELRZ<<endl;
output<<"omega in LR \t: "<<omegaLR<<endl;
output<<"GPUs per node \t: "<<GPU_per_node<<endl;
}
int main(int argc, char *argv[])
{
int GPU_N; hipGetDeviceCount(&GPU_N);
GPU_N=NUMGPU;
cout<<"number of GPUs: "<<GPU_N<<endl;
ofstream output; ofstream outputForce; ofstream outputInputs; ofstream outputAvV;
string FileName = CASENAME;
output.open ((FileName+".dat").c_str());
outputForce.open ((FileName+".force").c_str());
outputInputs.open ((FileName+".inputs").c_str());
outputAvV.open ((FileName+".vel").c_str());
ofstream outputpart[REFINEMENT*GPU_N+GPU_N], outputslice;
for(int i = 0; i< REFINEMENT*GPU_N+GPU_N; i++){
//string filenum = to_string(i);
char str[10];
snprintf(str,10,"%i",i);
outputpart[i].open ((FileName+"_part"+str+".dat").c_str());
}
outputslice.open ((FileName+"_slice.dat").c_str());
//size_t memsize, memsize2;
size_t pitch = 2;
while(pitch<XDIM)
pitch=pitch*2;
pitch *= sizeof(float);//pitch*sizeof(float);
size_t pitch_e = pitch/sizeof(float);
cout<<"Pitch (in elements): "<<pitch/sizeof(float)<<endl;
float CharLength = OBSTR1*2.f;
float omega = 1.0f/(3.0f*(UMAX*CharLength/RE)+0.5f);
float omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
if(LRFACTOR == 0.25f){
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
}
if(LRFACTOR == 0.125f){
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
}
float SF_cf = omega*(1.0f-omegaLR)/((1.0f-omega)*omegaLR/LRFACTOR);
float SF_fc = 1.f/SF_cf;
cout<<SF_cf<<endl;
WriteInputs(outputInputs,omega,omegaLR,GPU_N);
WriteInputs(cout,omega,omegaLR,GPU_N);
if(abs(LRFACTOR-1.f/LRLEVEL)>0.001f && REFINEMENT == 1){
cout<<"LRLEVEL and LRFACTOR don't match! Exiting..."<<endl;
return 0;
}
int zInner = ZDIM/GPU_N-2; //excluding halo
int ForceTime = max(0,TMAX-STARTF);
dim3 threads(BLOCKSIZEX, BLOCKSIZEY, BLOCKSIZEZ);
//2 halo layers per GPU (for 2 GPUs)
dim3 orig_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),(zInner)/BLOCKSIZEZ);
dim3 orig_g_grid(((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),1);
dim3 AvV_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),1,(ZDIM/GPU_N)/BLOCKSIZEZ);
dim3 Pre_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((DYNY1+1+BLOCKSIZEY-1)/BLOCKSIZEY),(zInner)/BLOCKSIZEZ);
dim3 Pre_g_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((DYNY1+1+BLOCKSIZEY-1)/BLOCKSIZEY),1);
dim3 grid = orig_grid;
dim3 g_grid = orig_g_grid;
hipStream_t stream_halo[GPU_N];
hipStream_t stream_inner[GPU_N];
//data pointers as 3D array (GPUxCoord)
float *f_h[GPU_N], *g_h[GPU_N], *h_h[GPU_N];
float *f_d[GPU_N][2], *g_d[GPU_N][2], *h_d[GPU_N][2];
float *g_temp[GPU_N], *h_temp[GPU_N];
float *F_h[GPU_N][3];
float *F_d[GPU_N][3];
float *F_total[3];
float *velAv_h[GPU_N][3],*velFluc_h[GPU_N][3];
float *velAv_d[GPU_N][3],*velFluc_d[GPU_N][3];
float *Av_V_h[GPU_N];
float *Av_V_d[GPU_N];
float dpdy = DPDY;
for(int i = 0; i<3; i++)
F_total[i] = (float *)malloc(ForceTime*sizeof(float));
for(int i=0;i<3;i++)
for(int j=0;j<(ForceTime);j++)
F_total[i][j] = 0;
//Malloc and Initialize for each GPU
for(int n = 0; n<GPU_N; n++){
f_h [n] = (float *)malloc(XDIM*YDIM*zInner*19*sizeof(float));
g_h [n] = (float *)malloc(XDIM*YDIM* 19*sizeof(float));
h_h [n] = (float *)malloc(XDIM*YDIM* 19*sizeof(float));
for(int i = 0; i<3; i++){
F_h [n][i] = (float *)malloc(ForceTime*sizeof(float));
velAv_h [n][i] = (float *)malloc(XDIM*YDIM*ZDIM/GPU_N*sizeof(float));
velFluc_h[n][i] = (float *)malloc(XDIM*YDIM*ZDIM/GPU_N*sizeof(float));
}
Av_V_h[n] = (float *)malloc(TMAX*sizeof(float));
hipSetDevice(n);
hipStreamCreate(&stream_halo[n]);
hipStreamCreate(&stream_inner[n]);
for(int m = 0; m<GPU_N; m++)
if(m != n) hipDeviceEnablePeerAccess(m,0);
for(int i = 0; i<2; i++){
hipMalloc((void **) &f_d[n][i], pitch_e*YDIM*zInner*19*sizeof(float));
hipMalloc((void **) &g_d[n][i], pitch_e*YDIM* 19*sizeof(float));
hipMalloc((void **) &h_d[n][i], pitch_e*YDIM* 19*sizeof(float));
}
hipMalloc((void **) & g_temp[n], pitch_e*YDIM* 19*sizeof(float));
hipMalloc((void **) & h_temp[n], pitch_e*YDIM* 19*sizeof(float));
for(int i = 0; i<3; i++){
hipMalloc((void **) & F_d [n][i], (ForceTime)*sizeof(float));
hipMalloc((void **) & velAv_d [n][i], pitch_e*YDIM*ZDIM/GPU_N*sizeof(float));
hipMalloc((void **) & velFluc_d[n][i], pitch_e*YDIM*ZDIM/GPU_N*sizeof(float));
}
hipMalloc((void **) & Av_V_d[n],TMAX*sizeof(float));
//initialize host f_inner
for (int i = 0; i < XDIM*YDIM*zInner*19; i++)
f_h[n][i] = 0;
//initialize host g,h
for (int i = 0; i < XDIM*YDIM*19; i++){
g_h[n][i] = 0;
h_h[n][i] = 0;
}
for(int i=0;i<3;i++){
for(int j=0;j<(ForceTime);j++)
F_h[n][i][j] = 0;
for (int j = 0; j < XDIM*YDIM*ZDIM/GPU_N; j++){
velAv_h [n][i][j] = 0;
velFluc_h[n][i][j] = 0;
}
}
for(int j=0;j<(ForceTime);j++)
Av_V_h[n][j] = 0;
for(int i = 0; i<2; i++){
hipMemcpy2D(f_d[n][i],pitch,f_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*zInner*19,hipMemcpyHostToDevice);
hipMemcpy2D(g_d[n][i],pitch,g_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM *19,hipMemcpyHostToDevice);
hipMemcpy2D(h_d[n][i],pitch,h_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM *19,hipMemcpyHostToDevice);
}
for(int i = 0; i<3; i++){
hipMemcpy2D(velAv_d [n][i],pitch,velAv_h [n][i],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*ZDIM/GPU_N,hipMemcpyHostToDevice);
hipMemcpy2D(velFluc_d[n][i],pitch,velFluc_h[n][i],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*ZDIM/GPU_N,hipMemcpyHostToDevice);
hipMemcpy(F_d[n][i],F_h[n][i],sizeof(float)*(ForceTime),hipMemcpyHostToDevice);
}
hipMemcpy(Av_V_d[n],Av_V_h[n],sizeof(float)*(TMAX),hipMemcpyHostToDevice);
//initialization kernels
for(int i = 0; i<2; i++){
hipLaunchKernelGGL(( initialize), dim3(grid),dim3(threads), 0, 0, f_d[n][i],pitch_e,zInner,GPU_N);
hipLaunchKernelGGL(( initialize), dim3(g_grid),dim3(threads), 0, 0, g_d[n][i],pitch_e, 1,GPU_N);
hipLaunchKernelGGL(( initialize), dim3(g_grid),dim3(threads), 0, 0, h_d[n][i],pitch_e, 1,GPU_N);
}
hipLaunchKernelGGL(( initialize), dim3(g_grid),dim3(threads), 0, 0, g_temp[n],pitch_e, 1,GPU_N);
hipLaunchKernelGGL(( initialize), dim3(g_grid),dim3(threads), 0, 0, h_temp[n],pitch_e, 1,GPU_N);
}//end Malloc and Initialize
//data pointers as 3D array (GPUxCoord)
float *f_LR_h[GPU_N], *g_LR_h[GPU_N], *h_LR_h[GPU_N];
float *f_LR_d[GPU_N][2], *g_LR_d[GPU_N][2], *h_LR_d[GPU_N][2];
float *g_LR_temp[GPU_N], *h_LR_temp[GPU_N];
float *velAv_LR_h[GPU_N][3],*velFluc_LR_h[GPU_N][3];
float *velAv_LR_d[GPU_N][3],*velFluc_LR_d[GPU_N][3];
float *f_interp[GPU_N], *g_interp[GPU_N], *h_interp[GPU_N], *g_interp_temp[GPU_N], *h_interp_temp[GPU_N];
float *interp_h[GPU_N];
size_t pitchLR = 2;
while(pitchLR<XLRDIM)
pitchLR=pitchLR*2;
pitchLR = pitchLR*sizeof(float);
size_t pitchLR_e = pitchLR/sizeof(float);
cout<<"LR Pitch (in elements): "<<pitchLR_e<<endl;
size_t pitchInterp = 2;
while(pitchInterp<XLRDIM*LRFACTOR+1)
pitchInterp=pitchInterp*2;
pitchInterp = pitchInterp*sizeof(float);
size_t pitchInterp_e = pitchInterp/sizeof(float);
cout<<"Interp Pitch (in elements): "<<pitchInterp_e<<endl;
int zLRInner = ZLRDIM/GPU_N-2;
dim3 LR_threads(BLOCKSIZELRX, BLOCKSIZELRY, BLOCKSIZELRZ);
dim3 LR_grid(((XLRDIM+BLOCKSIZELRX-1)/BLOCKSIZELRX),((YLRDIM+BLOCKSIZELRY-1)/BLOCKSIZELRY),(zLRInner)/BLOCKSIZELRZ);
dim3 g_LR_grid(((XLRDIM+BLOCKSIZELRX-1)/BLOCKSIZELRX),((YLRDIM+BLOCKSIZELRY-1)/BLOCKSIZELRY),1);
dim3 Interp_threads(BLOCKSIZEINTERP, LRLEVEL, LRLEVEL);
dim3 Interp_grid(((XLRDIM+BLOCKSIZEINTERP-1)/BLOCKSIZEINTERP),((YLRDIM+LRLEVEL-1)/LRLEVEL),ZLRDIM/LRLEVEL/GPU_N);
cout<<((XLRDIM+BLOCKSIZEINTERP-1)/BLOCKSIZEINTERP)<<", "<<((YLRDIM+LRLEVEL-1)/LRLEVEL)<<", "<<ZLRDIM/LRLEVEL/GPU_N<<endl;
dim3 Interp_grid_c(((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),(ZDIM/GPU_N)/BLOCKSIZEZ);
//setup LR
if(REFINEMENT == 1){
for(int n = 0; n<GPU_N; n++){
f_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM*zLRInner*19*sizeof(float));
g_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM* 19*sizeof(float));
h_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM* 19*sizeof(float));
interp_h [n] = (float *)malloc((XLRDIM*LRFACTOR+1)*(YLRDIM*LRFACTOR+1)*zInner*19*sizeof(float));
for(int i = 0; i<3; i++){
velAv_LR_h [n][i] = (float *)malloc(XLRDIM*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
velFluc_LR_h[n][i] = (float *)malloc(XLRDIM*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
}
hipSetDevice(n);
for(int i = 0; i<2; i++){
hipMalloc((void **) &f_LR_d[n][i], pitchLR_e*YLRDIM*zLRInner*19*sizeof(float));
hipMalloc((void **) &g_LR_d[n][i], pitchLR_e*YLRDIM* 19*sizeof(float));
hipMalloc((void **) &h_LR_d[n][i], pitchLR_e*YLRDIM* 19*sizeof(float));
}
hipMalloc((void **) & g_LR_temp[n], pitchLR_e*YLRDIM* 19*sizeof(float));
hipMalloc((void **) & h_LR_temp[n], pitchLR_e*YLRDIM* 19*sizeof(float));
hipMalloc((void **) & f_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*zInner*19*sizeof(float));
hipMalloc((void **) & g_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
hipMalloc((void **) & h_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
hipMalloc((void **) & g_interp_temp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
hipMalloc((void **) & h_interp_temp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
for(int i = 0; i<3; i++){
hipMalloc((void **) & velAv_LR_d [n][i], pitchLR_e*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
hipMalloc((void **) & velFluc_LR_d[n][i], pitchLR_e*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
}
for (int i = 0; i < XLRDIM*YLRDIM*zLRInner*19; i++)
f_LR_h[n][i] = 0;
//initialize host g,h
for (int i = 0; i < XLRDIM*YLRDIM*19; i++){
g_LR_h[n][i] = 0;
h_LR_h[n][i] = 0;
}
for(int i=0;i<3;i++){
for (int j = 0; j < XLRDIM*YLRDIM*ZLRDIM/GPU_N; j++){
velAv_LR_h [n][i][j] = 0;
velFluc_LR_h[n][i][j] = 0;
}
}
for(int i = 0; i<2; i++){
hipMemcpy2D(f_LR_d[n][i],pitchLR,f_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*zLRInner*19,hipMemcpyHostToDevice);
hipMemcpy2D(g_LR_d[n][i],pitchLR,g_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM *19,hipMemcpyHostToDevice);
hipMemcpy2D(h_LR_d[n][i],pitchLR,h_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM *19,hipMemcpyHostToDevice);
}
for(int i = 0; i<3; i++){
hipMemcpy2D(velAv_LR_d [n][i],pitchLR,velAv_LR_h [n][i],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,hipMemcpyHostToDevice);
hipMemcpy2D(velFluc_LR_d[n][i],pitchLR,velFluc_LR_h[n][i],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,hipMemcpyHostToDevice);
}
//initialization kernels
for(int i = 0; i<2; i++){
hipLaunchKernelGGL(( initializeLR), dim3(LR_grid),dim3(LR_threads), 0, 0, f_LR_d[n][i],pitchLR_e,zLRInner,GPU_N);
hipLaunchKernelGGL(( initializeLR), dim3(g_LR_grid),dim3(LR_threads), 0, 0, g_LR_d[n][i],pitchLR_e, 1,GPU_N);
hipLaunchKernelGGL(( initializeLR), dim3(g_LR_grid),dim3(LR_threads), 0, 0, h_LR_d[n][i],pitchLR_e, 1,GPU_N);
}
hipLaunchKernelGGL(( initializeLR), dim3(g_LR_grid),dim3(LR_threads), 0, 0, g_LR_temp[n],pitchLR_e, 1,GPU_N);
hipLaunchKernelGGL(( initializeLR), dim3(g_LR_grid),dim3(LR_threads), 0, 0, h_LR_temp[n],pitchLR_e, 1,GPU_N);
}//end of GPU loop for malloc and initialize for LR
}//end of LR malloc and initialize
hipFuncSetCacheConfig(InterpCF,hipFuncCachePreferShared);
int A = 0; int B = 1; int C = 0; int D = 1;
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
size_t mem_avail, mem_total;
hipMemGetInfo(&mem_avail,&mem_total);
cout<<"Device memory used for dev"<<n<<" : "<<(mem_total-mem_avail)*pow(10,-9)<<" GB\n";
cout<<"Device memory available for dev"<<n<<" : "<<(mem_avail)*pow(10,-9)<<" GB\n";
}
struct timeval tdr0,tdr1;
double restime;
hipDeviceSynchronize();
gettimeofday (&tdr0,NULL);
//time loop
for(int t = 0; t<TMAX; t++)
{
//compute for periodic domain only by using restricted grid
if(t<PRERUN) {
grid = Pre_grid;
g_grid = Pre_g_grid;
}
else {
if(t == PRERUN) cout<<"finished prerun"<<endl;
grid = orig_grid;
g_grid = orig_g_grid;
}
//copy temporary array for top and bottom on coarse mesh to neighbor GPU. Only transfering 5 distbs
for(int n = 0; n<GPU_N; n++)
hipMemcpyPeerAsync(&h_temp[n][0],n,&g_d[ (n+1)%GPU_N][A][0], (n+1)%GPU_N,pitch_e*YDIM*sizeof(float)*19,stream_halo[n]);
for(int n = 0; n<GPU_N; n++)
hipMemcpyPeerAsync(&g_temp[n][0],n,&h_d[abs(n-1)%GPU_N][A][0],abs(n-1)%GPU_N,pitch_e*YDIM*sizeof(float)*19,stream_halo[n]);
//compute inner nodes on coarse mesh
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipLaunchKernelGGL(( update_inn), dim3(grid),dim3(threads),0,stream_inner[n], f_d[n][B],f_d[n][A],g_d[n][A], h_d[n][A],omega,pitch_e,n,zInner,velAv_d[n][0],velAv_d[n][1],velAv_d[n][2],velFluc_d[n][0],velFluc_d[n][1],velFluc_d[n][2],F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),f_interp[n],pitchInterp_e,dpdy);
}
//synchronize halo stream before computing top and bottom nodes
for(int n = 0; n<GPU_N; n++)
hipStreamSynchronize(stream_halo[n]);
//compute top and bottom nodes
for(int n = 0; n<GPU_N; n++)
{
hipSetDevice(n);
hipLaunchKernelGGL(( update_top), dim3(g_grid), dim3(threads), 0, stream_halo [n], h_d[n][B],h_d[n][A],f_d[n][A],h_temp[n],omega,pitch_e,n,zInner,F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),h_interp[n],pitchInterp_e,dpdy);
hipLaunchKernelGGL(( update_bot), dim3(g_grid), dim3(threads), 0, stream_halo [n], g_d[n][B],g_d[n][A],f_d[n][A],g_temp[n],omega,pitch_e,n,zInner,F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),g_interp[n],pitchInterp_e,dpdy);
}
if(t%100 == 0 && t>10000)
{
for(int n = 0; n<GPU_N; n++)
hipDeviceSynchronize();
for(int n = 0; n<GPU_N; n++)
{
hipLaunchKernelGGL(( AverageV), dim3(AvV_grid), dim3(threads), 0, 0, f_d[n][B],g_d[n][B],h_d[n][B],pitch_e,n,zInner,Av_V_d[n],t);
}
for(int n = 0; n<GPU_N; n++)
hipMemcpy(&Av_V_h[n][t],&Av_V_d[n][t],sizeof(float),hipMemcpyDeviceToHost);
float Av_V = 0;
for(int n = 0; n<GPU_N; n++)
Av_V += Av_V_h[n][t];
Av_V /= HEIGHT*ZDIM;
float diff;
diff = (Av_V-UMAX)/UMAX;
dpdy += diff*KP*abs(DPDY);
//dpdy = max(DPDY*)
// if(Av_V < UMAX*0.995f)
// dpdy *= 1.01f;
// else if(Av_V > UMAX*1.005f)
// dpdy *= 0.99f;
if(t%1000 == 0) outputAvV<<t<<", "<<Av_V<<", "<<dpdy<<endl;
}
//hipDeviceSynchronize();
swap(A,B);
if(REFINEMENT == 1){
int flag_F = 0;
for(int i = 0; i<LRLEVEL; i++){
if(t>STARTF && i == 0) flag_F = 1;
else flag_F = 0;
for(int n = 0; n<GPU_N; n++){
hipMemcpyPeerAsync(&h_LR_temp[n][pitchLR_e*YLRDIM],n,&g_LR_d[ (n+1)%GPU_N][C][pitchLR_e*YLRDIM], (n+1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
hipMemcpyPeerAsync(&g_LR_temp[n][pitchLR_e*YLRDIM],n,&h_LR_d[abs(n-1)%GPU_N][C][pitchLR_e*YLRDIM],abs(n-1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipLaunchKernelGGL(( update_inn_LR), dim3(LR_grid),dim3(LR_threads),0,stream_inner[n], f_LR_d[n][D],f_LR_d[n][C],g_LR_d[n][C], h_LR_d[n][C],omegaLR,pitchLR_e,n,zLRInner,velAv_LR_d[n][0],velAv_LR_d[n][1],velFluc_LR_d[n][0],velFluc_LR_d[n][1],F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
}
for(int n = 0; n<GPU_N; n++)
hipStreamSynchronize(stream_halo[n]);
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipLaunchKernelGGL(( update_top_LR), dim3(g_LR_grid),dim3(LR_threads),0,stream_halo[n], h_LR_d[n][D],h_LR_d[n][C],f_LR_d[n][C],h_LR_temp[n],omegaLR,pitchLR_e,n,zLRInner,F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
hipLaunchKernelGGL(( update_bot_LR), dim3(g_LR_grid),dim3(LR_threads),0,stream_halo[n], g_LR_d[n][D],g_LR_d[n][C],f_LR_d[n][C],g_LR_temp[n],omegaLR,pitchLR_e,n,zLRInner,F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
}
if(i == LRLEVEL-1)
{
for(int n = 0; n<GPU_N; n++)
//hipMemcpyPeerAsync(&h_interp_temp[n][0],n,&g_interp[ (n+1)%GPU_N][0], (n+1)%GPU_N,pitchInterp_e*(YLRDIM*LRFACTOR+1)*sizeof(float)*9,stream_halo[n]);
for(int n = 0; n<GPU_N; n++)
hipMemcpyPeerAsync(&g_interp_temp[n][0],n,&h_interp[abs(n-1)%GPU_N][0],abs(n-1)%GPU_N,pitchInterp_e*(YLRDIM*LRFACTOR+1)*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipDeviceSynchronize();
}
flag_F = 0;
swap(C,D);
}
//interp from coarse grid
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipLaunchKernelGGL(( InterpCF), dim3(Interp_grid),dim3(Interp_threads),0,stream_inner[n], f_LR_d[n][C],g_LR_d[n][C],h_LR_d[n][C],pitchLR_e,f_interp[n],g_interp[n],h_interp[n],g_interp_temp[n],pitchInterp_e,SF_cf,omega,n,zInner,zLRInner);
//hipDeviceSynchronize();
}
//interp from fine grid
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipMemcpyPeerAsync(&h_LR_temp[n][0],n,&g_LR_d[ (n+1)%GPU_N][C][0], (n+1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++)
hipStreamSynchronize(stream_halo[n]);
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipLaunchKernelGGL(( InterpFC), dim3(Interp_grid_c),dim3(threads),0,stream_halo[n], f_d[n][A],g_d[n][A],h_d[n][A],f_LR_d[n][C],h_LR_d[n][C],h_LR_temp[n],pitch_e,pitchLR_e,SF_fc,omegaLR,n,zInner,zLRInner);
}
}//end refinement
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipDeviceSynchronize();
}
}//end time loop
hipDeviceSynchronize();
gettimeofday (&tdr1,NULL);
timeval_subtract (&restime, &tdr1, &tdr0);
int Nodes;
Nodes = XDIM*YDIM*ZDIM;
if (REFINEMENT == 1)
Nodes += XLRDIM*YLRDIM*ZLRDIM*LRLEVEL;
cout<<"Time taken for main kernel: "<<restime<<" ("
<<double(Nodes*double(TMAX/1000000.f))/restime<<"MLUPS)\n";
//D2H Memcpy and write results
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipMemcpy2D(f_h[n],XDIM*sizeof(float),f_d[n][A],pitch,XDIM*sizeof(float),YDIM*zInner*19,hipMemcpyDeviceToHost);
hipMemcpy2D(g_h[n],XDIM*sizeof(float),g_d[n][A],pitch,XDIM*sizeof(float),YDIM *19,hipMemcpyDeviceToHost);
hipMemcpy2D(h_h[n],XDIM*sizeof(float),h_d[n][A],pitch,XDIM*sizeof(float),YDIM *19,hipMemcpyDeviceToHost);
for(int i = 0; i<3; i++){
hipMemcpy2D( velAv_h[n][i],XDIM*sizeof(float),velAv_d[n][i],pitch,XDIM*sizeof(float),YDIM*ZDIM/GPU_N,hipMemcpyDeviceToHost);
hipMemcpy2D(velFluc_h[n][i],XDIM*sizeof(float),velFluc_d[n][i],pitch,XDIM*sizeof(float),YDIM*ZDIM/GPU_N,hipMemcpyDeviceToHost);
hipMemcpy(F_h[n][i],F_d[n][i],sizeof(float)*ForceTime,hipMemcpyDeviceToHost);
}
hipMemcpy(Av_V_h[n],Av_V_d[n],sizeof(float)*TMAX,hipMemcpyDeviceToHost);
WriteResults(outputpart[n],outputslice,f_h[n],g_h[n],h_h[n],velAv_h[n],velFluc_h[n],omega,GPU_N,n);
outputpart[n]<<endl;
for(int i=0;i<3;i++)
for(int j=0;j<ForceTime;j++)
F_total[i][j] += F_h[n][i][j];
if(n > 0){
for(int j=0;j<TMAX;j++)
Av_V_h[0][j] += Av_V_h[n][j];
}
for(int i = 0; i<2; i++){
hipFree(f_d[n][i]);
hipFree(g_d[n][i]);
hipFree(h_d[n][i]);
}
hipFree(f_d[n]);
hipFree(g_d[n]);
hipFree(h_d[n]);
hipFree(g_temp[n]);
hipFree(h_temp[n]);
for(int i=0;i<3;i++)
hipFree(F_d[n][i]);
hipFree(F_d[n]);
}//end Memcpy and write results
WriteForces(F_total,outputForce,ForceTime,REFINEMENT*LRLEVEL);
//WriteAvV(Av_V_h[0],outputAvV);
if(REFINEMENT == 1){
// output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"uAv\",\"vAv\",\"ufluc\",\"vfluc\"\n";
// output<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<ZLRDIM<<"\n";
for(int n = 0; n<GPU_N; n++){
hipSetDevice(n);
hipMemcpy2D(f_LR_h[n],XLRDIM*sizeof(float),f_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM*zLRInner*19,hipMemcpyDeviceToHost);
hipMemcpy2D(g_LR_h[n],XLRDIM*sizeof(float),g_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM *19,hipMemcpyDeviceToHost);
hipMemcpy2D(h_LR_h[n],XLRDIM*sizeof(float),h_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM *19,hipMemcpyDeviceToHost);
//hipMemcpy2D(interp_h[n],(XLRDIM*LRFACTOR+1)*sizeof(float),f_interp[n],pitchInterp,(XLRDIM*LRFACTOR+1)*sizeof(float),(YLRDIM*LRFACTOR+1)*zInner*9,hipMemcpyDeviceToHost);
for(int i = 0; i<3; i++){
hipMemcpy2D( velAv_LR_h[n][i],XLRDIM*sizeof(float),velAv_LR_d[n][i],pitchLR,XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,hipMemcpyDeviceToHost);
hipMemcpy2D(velFluc_LR_h[n][i],XLRDIM*sizeof(float),velFluc_LR_d[n][i],pitchLR,XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,hipMemcpyDeviceToHost);
}
WriteResultsLR(outputpart[GPU_N+n],outputslice,f_LR_h[n],g_LR_h[n],h_LR_h[n],velAv_LR_h[n],velFluc_LR_h[n],omegaLR,GPU_N,n);
outputpart[GPU_N+n]<<endl;
for(int i = 0; i<2; i++){
hipFree(f_LR_d[n][i]);
hipFree(g_LR_d[n][i]);
hipFree(h_LR_d[n][i]);
}
hipFree(f_LR_d[n]);
hipFree(g_LR_d[n]);
hipFree(h_LR_d[n]);
hipFree(g_LR_temp[n]);
hipFree(h_LR_temp[n]);
}
}
return 0;
}
| a4bd0767b34c6970c7a074141f0b3d82943b2be5.cu | #include <cuda.h>
#include <iostream>
#include <ostream>
#include <fstream>
#include <sys/time.h>
#include <time.h>
using namespace std;
#define CASENAME "test4"
#define NUMGPU 1
#define BLOCKSIZEX 64
#define BLOCKSIZEY 1
#define BLOCKSIZEZ 1
#define BLOCKSIZELRX 64
#define BLOCKSIZELRY 1
#define BLOCKSIZELRZ 1
#define BLOCKSIZEINTERP 8
#define XDIM 224
#define YDIM 800
#define ZDIM 4
#define TMAX 20001
#define STARTF 0
#define DYNY1 200
#define DYNY2 1
#define KP 0.3f //p-control constant
#define PRERUN 10000 //pre-run duration
#define HEIGHT 200
#define OBSTR1 20.f
#define OBSTX1 100.5f
#define OBSTY1 340.5f
#define OBSTZ1 32.5f
#define OBSTR2 10.f
#define OBSTX2 100.5f
#define OBSTY2 50.5f
#define OBSTZ2 32.5f
#define LRFACTOR 0.5f
#define LRLEVEL 2
#define LRX0 16.25f //minimum x coord of LR
#define XLRDIM 64 //number of nodes in x
#define LRY0 63.25f
#define YLRDIM 80
#define LRZ0 -0.75f
#define ZLRDIM 8
#define ORDER 2 //order of accuracy of interpolation
#define RE 3000.f//2000.f//100.f;
#define UMAX 0.06f
#define SmagLES 1 //1,0
#define MODEL "MRT" //BGK,MRT,STREAM
#define REFINEMENT 0 //1,0
#define CS 0.02f
#define DPDX 0.f
#define DPDY -5.0e-7
#define VELAV 1
#define START_VELAV 200000
#define START_VELFLUC 1600000
inline __device__ int ImageFcnLR(float x, float y, float z)
{
int value = 0;
if(abs(x-OBSTX1) < OBSTR1 && abs(y-OBSTY1) < OBSTR1)
{
value = 10;
}
return value;
}
inline __device__ int ImageFcn(int x, int y, int z, int t)
{
int value = 0;
if(abs(x-OBSTX2) < OBSTR2 && abs(y-OBSTY2) < OBSTR2 && t < 5000)
value = 1;
if(abs(x-OBSTX2-3) < OBSTR2 && abs(y-OBSTY2-3) < OBSTR2 && t < 5000 && z == 0)
value = 1;
if(abs(x-OBSTX1) < OBSTR1 && abs(y-OBSTY1) < OBSTR1)
value = 10;
if(x == 0)
value = 1;//50;//400;
else if(x > HEIGHT)//== XDIM-1)
value = 1;//51;//300;
// else if(y == 0)
// value = 200; //52;//1;//22;
else if(y == DYNY1+1)
value = 80;//1;//22;
else if(y == YDIM-1)
value = 100;
//if(z == ZDIM-1) value = 1;
return value;
}
inline __device__ float PoisProf (float x){
float radius = (YDIM-1-1)*0.5f;
float result = -1.5f*(((1.0f-(x-0.5f)/radius))*((1.0f-(x-0.5f)/radius))-1.0f);
return (result);
}
inline __device__ float PoisProf3D (float x, float y){
x = x-0.5f;
y = y-0.5f;
//float H = 41.f;
return UMAX;//2.25f*16.f*UMAX*x*y*(H-x)*(H-y)/((H)*(H)*(H)*(H));
// float radius = (YDIM-1-1)*0.5f;
// float result = -1.0f*(((1.0f-(x-0.5f)/radius))*((1.0f-(x-0.5f)/radius))-1.0f);
// return (result);
}
int
timeval_subtract (double *result, struct timeval *x, struct timeval *y)
{
struct timeval result0;
/* Perform the carry for the later subtraction by updating y. */
if (x->tv_usec < y->tv_usec) {
int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
y->tv_usec -= 1000000 * nsec;
y->tv_sec += nsec;
}
if (x->tv_usec - y->tv_usec > 1000000) {
int nsec = (y->tv_usec - x->tv_usec) / 1000000;
y->tv_usec += 1000000 * nsec;
y->tv_sec -= nsec;
}
/* Compute the time remaining to wait.
tv_usec is certainly positive. */
result0.tv_sec = x->tv_sec - y->tv_sec;
result0.tv_usec = x->tv_usec - y->tv_usec;
*result = ((double)result0.tv_usec)/1e6 + (double)result0.tv_sec;
/* Return 1 if result is negative. */
return x->tv_sec < y->tv_sec;
}
__device__ int dmin(int a, int b)
{
if (a<b) return a;
else return b-1;
}
__device__ int dmax(int a)
{
if (a>-1) return a;
else return 0;
}
__device__ int dmax(int a,int b)
{
if (a>b) return a;
else return b;
}
__device__ int dmin_p(int a, int b)
{
if (a<b) return a;
else return 0;
}
__device__ int dmax_p(int a, int b)
{
if (a>-1) return a;
else return b-1;
}
inline __device__ float trilinear_interp (float v000, float v001, float v010, float v011,
float v100, float v101, float v110, float v111, float x, float y, float z){
return v000*(1.f-x)*(1.f-y)*(1.f-z)+
v001*( x)*(1.f-y)*(1.f-z)+
v010*(1.f-x)*( y)*(1.f-z)+
v011*( x)*( y)*(1.f-z)+
v100*(1.f-x)*(1.f-y)*( z)+
v101*( x)*(1.f-y)*( z)+
v110*(1.f-x)*( y)*( z)+
v111*( x)*( y)*( z);
}
inline __device__ int f_mem(int f_num, int x, int y, int z, size_t pitch, int zInner)
{
if(y > YDIM-1) y = 0;
if(y < 0) y = YDIM-1;
//if(y == DYNY1+1) y = 0; //YDIM-1;
int index = (x+y*pitch+z*YDIM*pitch)+f_num*pitch*YDIM*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*YDIM*(zInner));
return index;
}
inline __device__ int f_memLR(int f_num, int x, int y, int z, size_t pitch, int zInner)
{
int index = (x+y*pitch+z*YLRDIM*pitch)+f_num*pitch*YLRDIM*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*YLRDIM*(zInner));
return index;
}
inline __device__ int f_mem_interp(int m_num, int x, int y, int z, int pitch, int zInner)
{
int index = (x+y*pitch+z*(YLRDIM*LRFACTOR+1)*pitch)+m_num*pitch*(YLRDIM*LRFACTOR+1)*(zInner);
index = dmax(index);
index = dmin(index,19*pitch*(YLRDIM*LRFACTOR+1)*(zInner));
return index;
}
inline __device__ int buff_mem_interp(int m_num, int x, int y, int pitch, int zInner)
{
int index = (x+y*pitch+m_num*(YLRDIM*LRFACTOR+1)*pitch);
index = dmax(index);
index = dmin(index,19*pitch*(YLRDIM*LRFACTOR+1));
return index;
}
inline __device__ int buff_mem(int f_num, int x, int y, size_t pitch)
{
if(y > YDIM-1) y = 0;
if(y < 0) y = YDIM-1;
//if(y == DYNY1+1) y = 0; //YDIM-1;
int index = (x+y*pitch)+f_num*pitch*YDIM;
index = dmax(index);
index = dmin(index,19*pitch*YDIM);
return index;
}
inline __device__ int buff_memLR(int f_num, int x, int y, size_t pitch)
{
int index = (x+y*pitch)+f_num*pitch*YLRDIM;
index = dmax(index);
index = dmin(index,19*pitch*YLRDIM);
return index;
}
inline __device__ void AddForce(float* f, float dpdy)
{
// f[1] -= 0.0555555556f*3.f*DPDX;
// f[3] += 0.0555555556f*3.f*DPDX;
// f[5] -= 0.0277777778f*3.f*DPDX;
// f[6] += 0.0277777778f*3.f*DPDX;
// f[7] += 0.0277777778f*3.f*DPDX;
// f[8] -= 0.0277777778f*3.f*DPDX;
// f[10]-= 0.0277777778f*3.f*DPDX;
// f[12]+= 0.0277777778f*3.f*DPDX;
// f[15]-= 0.0277777778f*3.f*DPDX;
// f[17]+= 0.0277777778f*3.f*DPDX;
f[2] -= 0.0555555556f*3.f*dpdy;
f[4] += 0.0555555556f*3.f*dpdy;
f[5] -= 0.0277777778f*3.f*dpdy;
f[6] -= 0.0277777778f*3.f*dpdy;
f[7] += 0.0277777778f*3.f*dpdy;
f[8] += 0.0277777778f*3.f*dpdy;
f[11]-= 0.0277777778f*3.f*dpdy;
f[13]+= 0.0277777778f*3.f*dpdy;
f[16]-= 0.0277777778f*3.f*dpdy;
f[18]+= 0.0277777778f*3.f*dpdy;
}
inline __device__ void Moments(float* f, float* m)
{
m[0 ] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[1 ] = -30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+ 8.f*f[5]+ 8.f*f[6]+ 8.f*f[7]+ 8.f*f[8]+-11.f*f[9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[2 ] = 12.f*f[0]+ -4.f*f[1]+ -4.f*f[2]+ -4.f*f[3]+ -4.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[3 ] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
m[4 ] = -4.f*f[1] + 4.f*f[3] + f[5]+ - f[6]+ - f[7]+ f[8] + f[10] + - f[12] + f[15] + - f[17] ;
m[5 ] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
m[6 ] = -4.f*f[2] + 4.f*f[4]+ f[5]+ f[6]+ - f[7]+ - f[8] + f[11] + - f[13] + f[16] + - f[18];
m[7 ] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[8 ] = + -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[9 ] = 2.f*f[1]+ - f[2]+ 2.f*f[3]+ - f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[1]+ 2.f*f[2]+ -4.f*f[3]+ 2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[2] + f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[2] -2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[5]+ - f[6]+ f[7]+ - f[8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[5]+ - f[6]+ - f[7]+ f[8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[5]+ - f[6]+ f[7]+ f[8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
}
void Moments_host(float* f, float* m)
{
m[0 ] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[1 ] = -30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+ 8.f*f[5]+ 8.f*f[6]+ 8.f*f[7]+ 8.f*f[8]+-11.f*f[9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[2 ] = 12.f*f[0]+ -4.f*f[1]+ -4.f*f[2]+ -4.f*f[3]+ -4.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[3 ] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
m[4 ] = -4.f*f[1] + 4.f*f[3] + f[5]+ - f[6]+ - f[7]+ f[8] + f[10] + - f[12] + f[15] + - f[17] ;
m[5 ] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
m[6 ] = -4.f*f[2] + 4.f*f[4]+ f[5]+ f[6]+ - f[7]+ - f[8] + f[11] + - f[13] + f[16] + - f[18];
m[7 ] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[8 ] = + -4.f*f[9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[9 ] = 2.f*f[1]+ - f[2]+ 2.f*f[3]+ - f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[1]+ 2.f*f[2]+ -4.f*f[3]+ 2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[2] + f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ - f[9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[2] -2.f*f[4]+ f[5]+ f[6]+ f[7]+ f[8]+ 2.f*f[9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[5]+ - f[6]+ f[7]+ - f[8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[5]+ - f[6]+ - f[7]+ f[8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[5]+ - f[6]+ f[7]+ f[8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
}
void InvertMoments_host(float* f, float* m)
{
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void mrt_meq(float* meq, float rho, float u, float v, float w)
{
meq[ 0] = rho;
meq[ 1] = -11.f*rho+19.f*(u*u+v*v+w*w);
meq[ 2] = 7.53968254f*(u*u+v*v+w*w);;
meq[ 3] = u;
meq[ 4] = -0.666666667f*u;
meq[ 5] = v;
meq[ 6] = -0.666666667f*v;
meq[ 7] = w;
meq[ 8] = -0.666666667f*w;
meq[ 9] = 2.f*u*u-(v*v+w*w);
meq[11] = v*v-w*w;
meq[13] = u*v;
meq[14] = v*w;
meq[15] = u*w;
}
inline __device__ void bgk_meq(float* meq, float rho, float u, float v, float w)
{
meq[ 0] = rho;
meq[ 1] = -11.f*rho+19.f*(u*u+v*v+w*w);
meq[ 2] = 3.f*rho-5.5f*(u*u+v*v+w*w);;
meq[ 3] = u;
meq[ 4] = -0.666666667f*u;
meq[ 5] = v;
meq[ 6] = -0.666666667f*v;
meq[ 7] = w;
meq[ 8] = -0.666666667f*w;
meq[ 9] = 2.f*u*u-(v*v+w*w);
meq[10] = -0.5f*meq[9]*0.333333333333f;
meq[11] = v*v-w*w;
meq[12] = -0.5f*meq[11];
meq[13] = u*v;
meq[14] = v*w;
meq[15] = u*w;
}
//outputs strain rate tensor (Sxx,Syy,Szz,Sxy,Syz,Sxz) from 19 moments
inline __device__ void StrainRate(float* S, float* m_strain, float dx)
{
float rho = m_strain[0];
float u = m_strain[3];
float v = m_strain[5];
float w = m_strain[7];
float m1 = m_strain[1 ]+11.f*rho-19.f*(u*u+v*v+w*w);
float m9 = m_strain[9 ]-(2.f*u*u-(v*v+w*w));
float m11= m_strain[11]-(v*v-w*w);
float m13= m_strain[13]-(u*v);
float m14= m_strain[14]-(v*w);
float m15= m_strain[15]-(u*w);
S[0] = -0.026315789f*( m1+19.f* m9);
S[1] = -0.013157895f*(2.f*m1-19.f*(m9-3.f*m11));
S[2] = -0.013157895f*(2.f*m1-19.f*(m9+3.f*m11));
S[3] = -1.5f*m13;
S[4] = -1.5f*m14;
S[5] = -1.5f*m15;
}
//outputs physical moments (rho,u,v,w,Pxx,Pww,Pxy,Pyz,Pxz) from f
inline __device__ void PhysicalMoments(float* mom, float* f)
{
mom[0] = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
mom[1] = f[1]-f[3]+f[5]-f[6]-f[7]+f[8]+f[10]-f[12]+f[15]-f[17];
mom[2] = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
mom[3] = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
mom[4] = 2.f*f[1]+-f[2]+2.f*f[3]+-f[4]+f[5]+f[6]+f[7]+f[8]+-f[9]+f[10]+-2.f*f[11]+f[12]+-2.f*f[13]+-f[14]+f[15]+-2.f*f[16]+f[17]+-2.f*f[18];
mom[5] = f[2]+f[4]+f[5]+f[6]+f[7]+f[8]+-f[9]+-f[10]+-f[12]+-f[14]+-f[15]+-f[17];
mom[6] = f[5]+-f[6]+f[7]+-f[8];
mom[7] = f[11]+-f[13]+-f[16]+f[18];
mom[8] = f[10]+-f[12]+-f[15]+f[17];
}
inline __device__ void InvertMoments(float* f, float* m)
{
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void InvertPhysicalMoments(float* f, float* mom, float SF)
{
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void ScaleMoments_bgk(float* m, float SF)
{
float rho,u,v,w;
rho = m[0]; u = m[3]; v = m[5]; w = m[7];
m[ 1] = m[ 1]*SF+(1.f-SF)*(-11.f*rho+19.f*(u*u+v*v+w*w));
m[ 2] = m[ 2]*SF+(1.f-SF)*(3.f*rho-5.5f*(u*u+v*v+w*w) );
m[ 4] = m[ 4]*SF+(1.f-SF)*(-0.666666667f*u );
m[ 6] = m[ 6]*SF+(1.f-SF)*(-0.666666667f*v );
m[ 8] = m[ 8]*SF+(1.f-SF)*(-0.666666667f*w );
m[ 9] = m[ 9]*SF+(1.f-SF)*(2.f*u*u-(v*v+w*w) );
m[10] = m[10]*SF+(1.f-SF)*(-0.5f*(2.f*u*u-(v*v+w*w))*0.333333333333f);
m[11] = m[11]*SF+(1.f-SF)*(v*v-w*w );
m[12] = m[12]*SF+(1.f-SF)*(-0.5f*(v*v-w*w) );
m[13] = m[13]*SF+(1.f-SF)*(u*v );
m[14] = m[14]*SF+(1.f-SF)*(v*w );
m[15] = m[15]*SF+(1.f-SF)*(u*w );
m[16] = m[16]*SF;
m[17] = m[17]*SF;
m[18] = m[18]*SF;
}
inline __device__ void InvertPhysicalMoments_LES_fc(float* f, float* mom, float SF, float omega_f)
{
float tau_f = 1.f/omega_f;
float S[6]={0};
StrainRate(S,mom,1.f);
float Smag_f = sqrt(2.f*(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]+2.f*S[3]*S[3]+2.f*S[4]*S[4]+2.f*S[5]*S[5]));
float tau_c = tau_f+0.5f+12.f*Smag_f*CS;
tau_c *= 0.5f;
float omega_c = 1.f/tau_c;
tau_f = tau_f+Smag_f*CS;
omega_f = 1.f/tau_f;
SF = (1.f-omega_c)*omega_f/(LRFACTOR*omega_c*(1.f-omega_f));
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void InvertPhysicalMoments_LES_cf(float* f, float* mom, float SF, float omega_c)
{
float tau_c = 1.f/omega_c;
float S[6]={0};
StrainRate(S,mom,1.f);
float Smag_c = sqrt(2.f*(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]+2.f*S[3]*S[3]+2.f*S[4]*S[4]+2.f*S[5]*S[5]));
float tau_f = 2.f*tau_c-0.5f+1.5f*Smag_c*CS;
float omega_f = 1.f/tau_f;
omega_f = 1.f/tau_f;
tau_c = tau_c+Smag_c*CS;
omega_c = 1.f/tau_c;
SF = (LRFACTOR*omega_c*(1.f-omega_f))/((1.f-omega_c)*omega_f);
float m[19]={0};
m[ 0] = mom[0];
m[ 1] = (-11.f*mom[0]+19.f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]));
m[ 2] = 7.53968254f*(mom[1]*mom[1]+mom[2]*mom[2]+mom[3]*mom[3]);
m[ 3] = mom[1];
m[ 4] = -0.666666667f*mom[1];
m[ 5] = mom[2];
m[ 6] = -0.666666667f*mom[2];
m[ 7] = mom[3];
m[ 8] = -0.666666667f*mom[3];
m[ 9] = mom[4]*SF+(1.f-SF)*(2.f*mom[1]*mom[1]-(mom[2]*mom[2]+mom[3]*mom[3]));
m[11] = mom[5]*SF+(1.f-SF)*(mom[2]*mom[2]-mom[3]*mom[3]);
m[13] = mom[6]*SF+(1.f-SF)*mom[1]*mom[2];
m[14] = mom[7]*SF+(1.f-SF)*mom[2]*mom[3];
m[15] = mom[8]*SF+(1.f-SF)*mom[1]*mom[3];
// InvertMoments(f,m);
float u = m[3];
float v = m[5];
float w = m[7];
f[0 ]=(0.052631579f*m[0] +- 0.012531328f*(m[1])+ 0.047619048f*(m[2]));
f[1 ]=(0.052631579f*m[0]+ 0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ -0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[2 ]=(0.052631579f*m[0] + 0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[3 ]=(0.052631579f*m[0]+ -0.1f*u +-0.0045948204f*(m[1])+-0.015873016f*(m[2])+ 0.1f*(m[4]) + 0.055555556f*((m[9])-m[10]));
f[4 ]=(0.052631579f*m[0] + -0.1f*v +-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[6]) +-0.027777778f*((m[9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[5 ]=(0.052631579f*m[0]+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[6 ]=(0.052631579f*m[0]+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[7 ]=(0.052631579f*m[0]+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[8 ]=(0.052631579f*m[0]+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[9 ]=(0.052631579f*m[0] + 0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + -0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*m[0]+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*m[0] + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]+m[8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*m[0]+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*m[0] + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]-m[8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*m[0] + -0.1f*w+-0.0045948204f*(m[1])+-0.015873016f*(m[2]) + 0.1f*(m[8])+-0.027777778f*((m[9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*m[0]+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+ 0.025f*(m[4]-m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*m[0] + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + 0.025f*(m[6]-m[8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*m[0]+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2])+-0.025f*(m[4]+m[8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*m[0] + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[1])+ 0.003968254f*(m[2]) + -0.025f*(m[6]+m[8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[9]) +( 0.25f*(m[14]))));
}
inline __device__ void mrt_collide(float* f, float omega, float dpdy)
{
float feq[19];
float u,v,w,rho;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
float usqr = u*u+v*v+w*w;
feq[0 ]=(0.3333333333f*(rho-1.5f*usqr));
feq[1 ]=(0.0555555556f*(rho+3.0f*u+4.5f*u*u-1.5f*usqr));
feq[2 ]=(0.0555555556f*(rho+3.0f*v+4.5f*v*v-1.5f*usqr));
feq[3 ]=(0.0555555556f*(rho-3.0f*u+4.5f*u*u-1.5f*usqr));
feq[4 ]=(0.0555555556f*(rho-3.0f*v+4.5f*v*v-1.5f*usqr));
feq[5 ]=(0.0277777778f*(rho+3.0f*(u+v)+4.5f*(u+v)*(u+v)-1.5f*usqr));
feq[6 ]=(0.0277777778f*(rho+3.0f*(-u+v)+4.5f*(-u+v)*(-u+v)-1.5f*usqr));
feq[7 ]=(0.0277777778f*(rho+3.0f*(-u-v)+4.5f*(-u-v)*(-u-v)-1.5f*usqr));
feq[8 ]=(0.0277777778f*(rho+3.0f*(u-v)+4.5f*(u-v)*(u-v)-1.5f*usqr));
feq[9 ]=(0.0555555556f*(rho+3.0f*w+4.5f*w*w-1.5f*usqr));
feq[10]=(0.0277777778f*(rho+3.0f*(u+w)+4.5f*(u+w)*(u+w)-1.5f*usqr));
feq[11]=(0.0277777778f*(rho+3.0f*(v+w)+4.5f*(v+w)*(v+w)-1.5f*usqr));
feq[12]=(0.0277777778f*(rho+3.0f*(-u+w)+4.5f*(-u+w)*(-u+w)-1.5f*usqr));
feq[13]=(0.0277777778f*(rho+3.0f*(-v+w)+4.5f*(-v+w)*(-v+w)-1.5f*usqr));
feq[14]=(0.0555555556f*(rho-3.0f*w+4.5f*w*w-1.5f*usqr));
feq[15]=(0.0277777778f*(rho+3.0f*(u-w)+4.5f*(u-w)*(u-w)-1.5f*usqr));
feq[16]=(0.0277777778f*(rho+3.0f*(v-w)+4.5f*(v-w)*(v-w)-1.5f*usqr));
feq[17]=(0.0277777778f*(rho+3.0f*(-u-w)+4.5f*(-u-w)*(-u-w)-1.5f*usqr));
feq[18]=(0.0277777778f*(rho+3.0f*(-v-w)+4.5f*(-v-w)*(-v-w)-1.5f*usqr));
if(SmagLES == 1)
{
float PI11 = (f[1 ]-feq[1 ])+(f[3 ]-feq[3 ])+(f[5 ]-feq[5 ])+
(f[6 ]-feq[6 ])+(f[7 ]-feq[7 ])+(f[8 ]-feq[8 ])+
(f[10]-feq[10])+(f[12]-feq[12])+(f[15]-feq[15])+
(f[17]-feq[17]);
float PI22 = (f[2 ]-feq[2 ])+(f[4 ]-feq[4 ])+(f[5 ]-feq[5 ])+
(f[6 ]-feq[6 ])+(f[7 ]-feq[7 ])+(f[8 ]-feq[8 ])+
(f[11]-feq[11])+(f[13]-feq[13])+(f[16]-feq[16])+
(f[18]-feq[18]);
float PI33 = (f[9 ]-feq[9 ])+(f[14]-feq[14])+(f[10]-feq[10])+
(f[12]-feq[12])+(f[15]-feq[15])+(f[17]-feq[17])+
(f[11]-feq[11])+(f[13]-feq[13])+(f[16]-feq[16])+
(f[18]-feq[18]);
float PI12 = (f[5 ]-feq[5 ])+(f[7 ]-feq[7 ])-(f[6 ]-feq[6 ])-(f[8 ]-feq[8 ]);
float PI13 = (f[10]-feq[10])+(f[17]-feq[17])-(f[12]-feq[12])-(f[15]-feq[15]);
float PI23 = (f[11]-feq[11])+(f[18]-feq[18])-(f[13]-feq[13])-(f[16]-feq[16]);
float Q = sqrt(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13);
float tau0 = 1.f/omega;
float tau = 0.5f*tau0+0.5f*sqrt(tau0*tau0+18.f*CS*sqrt(2.f)*Q);
omega = 1.f/tau;
}
f[0 ] -=omega*(f[0 ]-feq[0 ]);
f[1 ] -=omega*(f[1 ]-feq[1 ]);
f[2 ] -=omega*(f[2 ]-feq[2 ]);
f[3 ] -=omega*(f[3 ]-feq[3 ]);
f[4 ] -=omega*(f[4 ]-feq[4 ]);
f[5 ] -=omega*(f[5 ]-feq[5 ]);
f[6 ] -=omega*(f[6 ]-feq[6 ]);
f[7 ] -=omega*(f[7 ]-feq[7 ]);
f[8 ] -=omega*(f[8 ]-feq[8 ]);
f[9 ] -=omega*(f[9 ]-feq[9 ]);
f[10] -=omega*(f[10]-feq[10]);
f[11] -=omega*(f[11]-feq[11]);
f[12] -=omega*(f[12]-feq[12]);
f[13] -=omega*(f[13]-feq[13]);
f[14] -=omega*(f[14]-feq[14]);
f[15] -=omega*(f[15]-feq[15]);
f[16] -=omega*(f[16]-feq[16]);
f[17] -=omega*(f[17]-feq[17]);
f[18] -=omega*(f[18]-feq[18]);
AddForce(f,dpdy);
}
inline __device__ void North_Extrap(float* f, float rho)
{
float m[19];
//rho = 1.0f;
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void South_Extrap(float* f, float u, float v, float w)
{
float m[19];
// float u = 0.f;//f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
// float w = 0.f;//f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float rho = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
//bgk_meq(m,rho,u,v,w);
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void East_Extrap(float* f, float rho)
{
float m[19];
//rho = 0.0f;
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
inline __device__ void West_Extrap(float* f, float u, int t)
{
float m[19];
float v = 0.f;//f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float w = 0.f;//f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
//if(t == 1000 || t == 2000 || t == 3000) w = 0.01f;
float rho = f[0]+f[1]+f[2]+f[3]+f[4]+f[5]+f[6]+f[7]+f[8]+f[9]+f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
m[ 1] = -30.f*f[ 0]+-11.f*f[ 1]+-11.f*f[ 2]+-11.f*f[ 3]+-11.f*f[ 4]+ 8.f*f[ 5]+ 8.f*f[ 6]+ 8.f*f[ 7]+ 8.f*f[ 8]+-11.f*f[ 9]+ 8.f*f[10]+ 8.f*f[11]+ 8.f*f[12]+ 8.f*f[13]+-11.f*f[14]+ 8.f*f[15]+ 8.f*f[16]+ 8.f*f[17]+ 8.f*f[18];
m[ 2] = 12.f*f[ 0]+ -4.f*f[ 1]+ -4.f*f[ 2]+ -4.f*f[ 3]+ -4.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ -4.f*f[14]+ f[15]+ f[16]+ f[17]+ f[18];
m[ 4] = -4.f*f[ 1] + 4.f*f[ 3] + f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] + f[10] + - f[12] + f[15] + - f[17] ;
m[ 6] = -4.f*f[ 2] + 4.f*f[ 4]+ f[ 5]+ f[ 6]+ - f[ 7]+ - f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[ 8] = + -4.f*f[ 9]+ f[10]+ f[11]+ f[12]+ f[13]+ 4.f*f[14]+ - f[15]+ - f[16]+ - f[17]+ - f[18];
m[ 9] = 2.f*f[ 1]+ - f[ 2]+ 2.f*f[ 3]+ - f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ - f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[10] = -4.f*f[ 1]+ 2.f*f[ 2]+ -4.f*f[ 3]+ 2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ f[10]+ -2.f*f[11]+ f[12]+ -2.f*f[13]+ 2.f*f[14]+ f[15]+ -2.f*f[16]+ f[17]+ -2.f*f[18];
m[11] = f[ 2] + f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ - f[ 9]+ - f[10] + - f[12] + - f[14]+ - f[15] + - f[17] ;
m[12] = -2.f*f[ 2] -2.f*f[ 4]+ f[ 5]+ f[ 6]+ f[ 7]+ f[ 8]+ 2.f*f[ 9]+ - f[10] + - f[12] + 2.f*f[14]+ - f[15] + - f[17] ;
m[13] = f[ 5]+ - f[ 6]+ f[ 7]+ - f[ 8] ;
m[14] = f[11] + - f[13] + - f[16] + f[18];
m[15] = f[10] + - f[12] + - f[15] + f[17] ;
m[16] = f[ 5]+ - f[ 6]+ - f[ 7]+ f[ 8] - f[10] + f[12] + - f[15] + f[17] ;
m[17] = - f[ 5]+ - f[ 6]+ f[ 7]+ f[ 8] + f[11] + - f[13] + f[16] + - f[18];
m[18] = f[10]+ - f[11]+ f[12]+ - f[13] + - f[15]+ f[16]+ - f[17]+ f[18];
f[ 0] =(0.052631579f*rho +- 0.012531328f*(m[ 1])+ 0.047619048f*(m[ 2]));
f[ 1] =(0.052631579f*rho+ 0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ -0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 2] =(0.052631579f*rho + 0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 3] =(0.052631579f*rho+ -0.1f*u +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2])+ 0.1f*(m[ 4]) + 0.055555556f*((m[ 9])-m[10]));
f[ 4] =(0.052631579f*rho + -0.1f*v +-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 6]) +-0.027777778f*((m[ 9])-m[10])+ 0.083333333f*((m[11])-m[12]));
f[ 5] =(0.052631579f*rho+ 0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 6] =(0.052631579f*rho+ -0.1f*u+ 0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]-m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 7] =(0.052631579f*rho+ -0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*(-m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+( 0.25f*(m[13]))));
f[ 8] =(0.052631579f*rho+ 0.1f*u+ -0.1f*v + 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 6]) +0.013888889f*(m[10])+0.041666667f*(m[12])+0.125f*( m[16]+m[17])+ (0.027777778f*(m[ 9]) +0.083333333f*(m[11])+(-0.25f*(m[13]))));
f[ 9] =(0.052631579f*rho + 0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + -0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[10]=(0.052631579f*rho+ 0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[11]=(0.052631579f*rho + 0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]+m[ 8])+0.125f*( m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
f[12]=(0.052631579f*rho+ -0.1f*u + 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]+m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[13]=(0.052631579f*rho + -0.1f*v+ 0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]-m[ 8])+0.125f*(-m[17]-m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[14]=(0.052631579f*rho + -0.1f*w+-0.0045948204f*(m[ 1])+-0.015873016f*(m[ 2]) + 0.1f*(m[ 8])+-0.027777778f*((m[ 9])-m[10])+-0.083333333f*((m[11])-m[12]));
f[15]=(0.052631579f*rho+ 0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+ 0.025f*(m[ 4]-m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*(-m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+(-0.25f*(m[15]))));
f[16]=(0.052631579f*rho + 0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + 0.025f*(m[ 6]-m[ 8])+0.125f*( m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +(-0.25f*(m[14]))));
f[17]=(0.052631579f*rho+ -0.1f*u + -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2])+-0.025f*(m[ 4]+m[ 8]) +0.013888889f*(m[10])-0.041666667f*(m[12])+0.125f*( m[16]-m[18])+ (0.027777778f*(m[ 9]) -0.083333333f*(m[11])+( 0.25f*(m[15]))));
f[18]=(0.052631579f*rho + -0.1f*v+ -0.1f*w+ 0.0033416876f*(m[ 1])+ 0.003968254f*(m[ 2]) + -0.025f*(m[ 6]+m[ 8])+0.125f*(-m[17]+m[18])-0.027777778f*(m[10])+(-0.055555556f*(m[ 9]) +( 0.25f*(m[14]))));
}
__device__ void xsymmetry_bot(float* f, int y, int z)
{
if(y == 0 && z == 0){
f[ 2] = f[ 4];
f[13]=f[18];
f[11]=f[18];
f[16]=f[18];
f[ 6] =f[ 7];
f[ 9] =f[14];
f[12]=f[17];
}
else if(y == 0 && z == ZDIM-1){
f[ 4] = f[ 2];
f[11]=f[13];
f[18]=f[13];
f[16]=f[13];
f[ 6] =f[ 7];
f[14]=f[ 9];
f[17]=f[12];
}
else if(y == YDIM-1 && z == 0){
f[ 4] = f[ 2];
f[11]=f[16];
f[18]=f[16];
f[13]=f[16];
f[ 7] =f[ 6];
f[ 9] =f[14];
f[12]=f[17];
}
else if(y == YDIM-1 && z == ZDIM-1){
f[ 4] = f[ 2];
f[16]=f[11];
f[18]=f[11];
f[13]=f[11];
f[ 7] =f[ 6];
f[14]=f[ 9];
f[17]=f[12];
}
else{
if(y == 0){
f[ 2] = f[ 4];
f[11]=f[13];
f[16]=f[18];
f[ 8] = f[ 5];
}
else if(y == YDIM-1){
f[ 4]=f[ 2] ;
f[13]=f[11];
f[18]=f[16];
f[ 5]=f[ 8] ;
}
}
f[ 1] = f[ 3] ;
f[ 5] = f[ 6] ;
f[ 8] = f[ 7] ;
f[10]= f[12];
f[15]= f[17];
}
__device__ void xsymmetry_top(float* f, int y, int z)
{
if(y == 0 && z == 0){
f[ 2] = f[ 4];
f[13] = f[18];
f[11] = f[18];
f[16] = f[18];
f[ 5] = f[ 8];
f[ 9] = f[14];
f[10] = f[15];
}
else if(y == 0 && z == ZDIM-1){
f[ 2] = f[ 4];
f[11] = f[13];
f[18] = f[13];
f[16] = f[13];
f[ 5] = f[ 8];
f[14] = f[ 9];
f[15] = f[10];
}
else if(y == YDIM-1 && z == 0){
f[ 4] = f[ 2];
f[18] = f[16];
f[11] = f[16];
f[13] = f[16];
f[ 8] = f[ 5];
f[ 9] = f[14];
f[10] = f[15];
}
else if(y == YDIM-1 && z == ZDIM-1){
f[ 4] = f[ 2];
f[13] = f[11];
f[16] = f[11];
f[18] = f[11];
f[ 8] = f[ 5];
f[14] = f[ 9];
f[15] = f[10];
}
else{
if(y == 0){
f[ 2] = f[ 4];
f[11] = f[13];
f[16] = f[18];
f[ 5] = f[ 8];
}
else if(y == YDIM-1){
f[ 4] = f[ 2];
f[13] = f[11];
f[18] = f[16];
f[ 8] = f[ 5];
}
}
f[ 3] = f[ 1] ;
f[ 6] = f[ 5] ;
f[ 7] = f[ 8] ;
f[12]= f[10];
f[17]= f[15];
}
inline __device__ void vel_av(float* f, float& uAv, float& vAv, float& wAv, int t)
{
float u,v,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
uAv = (uAv*(t-START_VELAV)+u)/((t-START_VELAV)+1);
vAv = (vAv*(t-START_VELAV)+v)/((t-START_VELAV)+1);
wAv = (wAv*(t-START_VELAV)+w)/((t-START_VELAV)+1);
}
inline __device__ void vel_avLR(float* f, float& uAv, float& vAv, float t)
{
float u,v;//,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
uAv = (uAv*(t-START_VELAV)+u*LRFACTOR)/((t-START_VELAV)+LRFACTOR);
vAv = (vAv*(t-START_VELAV)+v*LRFACTOR)/((t-START_VELAV)+LRFACTOR);
}
inline __device__ void vel_fluc(float* f, float& uAv,
float& vAv, float& wAv, float& ufluc, float& vfluc, float& wfluc, int t)
{
float u,v,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
u = (u-uAv)*(u-uAv);
v = (v-vAv)*(v-vAv);
w = (w-wAv)*(w-wAv);
ufluc = (ufluc*(t-START_VELFLUC)+u)/((t-START_VELFLUC)+1);
vfluc = (vfluc*(t-START_VELFLUC)+v)/((t-START_VELFLUC)+1);
wfluc = (wfluc*(t-START_VELFLUC)+w)/((t-START_VELFLUC)+1);
}
inline __device__ void vel_flucLR(float* f, float& uAv,
float& vAv, float& ufluc, float& vfluc, float t)
{
float u,v;//,w;
u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
u = (u-uAv)*(u-uAv);
v = (v-vAv)*(v-vAv);
ufluc = (ufluc*(t-START_VELFLUC)+u*LRFACTOR)/((t-START_VELFLUC)+LRFACTOR);
vfluc = (vfluc*(t-START_VELFLUC)+v*LRFACTOR)/((t-START_VELFLUC)+LRFACTOR);
}
__global__ void initialize(float *fout, size_t pitch, int zInner, int GPU_N)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float xcoord = x;
float ycoord = y;
float zcoord = z+1+GPU_N*ZDIM;
int j = x+y*pitch+z*YDIM*pitch;//index on padded mem (pitch in elements)
float f[19] = {0};
float m[19] = {0};
int im = ImageFcn(xcoord,ycoord,zcoord,0);
float u,v,w,rho;
rho = 1.f;
u = 0.0f;
v = UMAX;
w = 0.0f;
if(im == 10 || im == 1){
u = 0.0f;
v = 0.0f;
w = 0.0f;
}
bgk_meq(m,rho,u,v,w);
InvertMoments(f,m);
for(int i = 0; i<19; i++)
fout[j+i *pitch*YDIM*zInner]=f[ i];
}
__global__ void initializeLR(float *fout, size_t pitch, int zInner, int GPU_N)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float xcoord = x;
float ycoord = y;
float zcoord = z+1+GPU_N*(zInner+2);
xcoord = LRX0+x*LRFACTOR;
ycoord = LRY0+y*LRFACTOR;
zcoord = LRZ0+LRFACTOR*(GPU_N*(zInner+2)+z);
int j = x+y*pitch+z*YLRDIM*pitch;//index on padded mem (pitch in elements)
float f[19] = {0};
float m[19] = {0};
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float u,v,w,rho;
rho = 1.f;
u = 0.0f;
v = UMAX;
w = 0.0f;
if(im == 10 || im == 1){
u = 0.0f;
v = 0.0f;
w = 0.0f;
}
bgk_meq(m,rho,u,v,w);
InvertMoments(f,m);
for(int i = 0; i<19; i++)
fout[j+i *pitch*YLRDIM*zInner]=f[ i];
}
__global__ void update_top(float* hB, float* hA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float* h_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int j = x+y*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,(GPU+1)*(zInner+2)-1,t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[0 ]= hA [j];
f[1 ]= hA [buff_mem(1 ,x-1,y ,pitch)];
f[3 ]= hA [buff_mem(3 ,x+1,y ,pitch)];
f[2 ]= hA [buff_mem(2 ,x ,ym ,pitch)];
f[5 ]= hA [buff_mem(5 ,x-1,ym ,pitch)];
f[6 ]= hA [buff_mem(6 ,x+1,ym ,pitch)];
f[4 ]= hA [buff_mem(4 ,x ,yp ,pitch)];
f[7 ]= hA [buff_mem(7 ,x+1,yp ,pitch)];
f[8 ]= hA [buff_mem(8 ,x-1,yp ,pitch)];
f[9 ]= fA [f_mem (9 ,x ,y ,zInner-1,pitch, zInner)];
f[10]= fA [f_mem (10,x-1,y ,zInner-1,pitch, zInner)];
f[11]= fA [f_mem (11,x ,ym ,zInner-1,pitch, zInner)];
f[12]= fA [f_mem (12,x+1,y ,zInner-1,pitch, zInner)];
f[13]= fA [f_mem (13,x ,yp ,zInner-1,pitch, zInner)];
f[14]= temp[buff_mem(14,x ,y ,pitch)];
f[15]= temp[buff_mem(15,x-1,y ,pitch)];
f[16]= temp[buff_mem(16,x ,ym ,pitch)];
f[17]= temp[buff_mem(17,x+1,y ,pitch)];
f[18]= temp[buff_mem(18,x ,yp ,pitch)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
hB[buff_mem(0 ,x,y,pitch)] = f[0 ];
hB[buff_mem(1 ,x,y,pitch)] = f[3 ];
hB[buff_mem(2 ,x,y,pitch)] = f[4 ];
hB[buff_mem(3 ,x,y,pitch)] = f[1 ];
hB[buff_mem(4 ,x,y,pitch)] = f[2 ];
hB[buff_mem(5 ,x,y,pitch)] = f[7 ];
hB[buff_mem(6 ,x,y,pitch)] = f[8 ];
hB[buff_mem(7 ,x,y,pitch)] = f[5 ];
hB[buff_mem(8 ,x,y,pitch)] = f[6 ];
hB[buff_mem(9 ,x,y,pitch)] = f[14];
hB[buff_mem(10,x,y,pitch)] = f[17];
hB[buff_mem(11,x,y,pitch)] = f[18];
hB[buff_mem(12,x,y,pitch)] = f[15];
hB[buff_mem(13,x,y,pitch)] = f[16];
hB[buff_mem(14,x,y,pitch)] = f[9 ];
hB[buff_mem(15,x,y,pitch)] = f[12];
hB[buff_mem(16,x,y,pitch)] = f[13];
hB[buff_mem(17,x,y,pitch)] = f[10];
hB[buff_mem(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,(GPU+1)*(zInner+2)-1);
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x-1,y,pitch)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x+1,y,pitch)];
float u_in = PoisProf3D(y,(GPU+1)*(zInner+2)-1);
West_Extrap(f,u_in,t);
}
else if(im == 70)//use velocity from y-1 location. all other moments from y+1
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y+1,pitch)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= hA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,(GPU+1)*(zInner+2)-1);
if(im == 26)
xsymmetry_bot(f,y,(GPU+1)*(zInner+2)-1);
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
for(int i = 0; i<19; i++)
hB[buff_mem(i ,x,y,pitch)] = f[i ];
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
// //float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
h_interp[buff_mem_interp(i,x-int(LRX0),y-int(LRY0),pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_bot(float* gB, float* gA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float* g_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int j = x+y*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,GPU*(zInner+2),t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[0 ]= gA [j];
f[1 ]= gA [buff_mem(1 ,x-1,y ,pitch)];
f[3 ]= gA [buff_mem(3 ,x+1,y ,pitch)];
f[2 ]= gA [buff_mem(2 ,x ,ym ,pitch)];
f[5 ]= gA [buff_mem(5 ,x-1,ym ,pitch)];
f[6 ]= gA [buff_mem(6 ,x+1,ym ,pitch)];
f[4 ]= gA [buff_mem(4 ,x ,yp ,pitch)];
f[7 ]= gA [buff_mem(7 ,x+1,yp ,pitch)];
f[8 ]= gA [buff_mem(8 ,x-1,yp ,pitch)];
f[9 ]= temp[buff_mem(9 ,x ,y ,pitch)];
f[10]= temp[buff_mem(10,x-1,y ,pitch)];
f[11]= temp[buff_mem(11,x ,ym ,pitch)];
f[12]= temp[buff_mem(12,x+1,y ,pitch)];
f[13]= temp[buff_mem(13,x ,yp ,pitch)];
f[14]= fA [f_mem (14,x ,y ,0,pitch, zInner)];
f[15]= fA [f_mem (15,x-1,y ,0,pitch, zInner)];
f[16]= fA [f_mem (16,x ,ym ,0,pitch, zInner)];
f[17]= fA [f_mem (17,x+1,y ,0,pitch, zInner)];
f[18]= fA [f_mem (18,x ,yp ,0,pitch, zInner)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
gB[buff_mem(0 ,x,y,pitch)] = f[0 ];
gB[buff_mem(1 ,x,y,pitch)] = f[3 ];
gB[buff_mem(2 ,x,y,pitch)] = f[4 ];
gB[buff_mem(3 ,x,y,pitch)] = f[1 ];
gB[buff_mem(4 ,x,y,pitch)] = f[2 ];
gB[buff_mem(5 ,x,y,pitch)] = f[7 ];
gB[buff_mem(6 ,x,y,pitch)] = f[8 ];
gB[buff_mem(7 ,x,y,pitch)] = f[5 ];
gB[buff_mem(8 ,x,y,pitch)] = f[6 ];
gB[buff_mem(9 ,x,y,pitch)] = f[14];
gB[buff_mem(10,x,y,pitch)] = f[17];
gB[buff_mem(11,x,y,pitch)] = f[18];
gB[buff_mem(12,x,y,pitch)] = f[15];
gB[buff_mem(13,x,y,pitch)] = f[16];
gB[buff_mem(14,x,y,pitch)] = f[9 ];
gB[buff_mem(15,x,y,pitch)] = f[12];
gB[buff_mem(16,x,y,pitch)] = f[13];
gB[buff_mem(17,x,y,pitch)] = f[10];
gB[buff_mem(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,GPU*(zInner+2));
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x-1,y,pitch)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x+1,y,pitch)];
float u_in = PoisProf3D(y,GPU*(zInner+2));
West_Extrap(f,u_in,t);
}
else if(im == 70)//new south inlet periodic
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y+1,pitch)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= gA[buff_mem(i ,x,y-1,pitch)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,GPU*(zInner+2));
if(im == 26)
xsymmetry_bot(f,y,GPU*(zInner+2));
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
for(int i = 0; i<19; i++)
gB[buff_mem(i ,x,y,pitch)] = f[i ];
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
//float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
g_interp[buff_mem_interp(i,x-int(LRX0),y-int(LRY0),pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_inn(float* fB, float* fA, float* g, float* h, float omega, size_t pitch, int GPU, int zInner, float* velAv_u, float* velAv_v, float* velAv_w, float* velFluc_u, float* velFluc_v, float* velFluc_w, float* FX, float* FY, float* FZ, int t, int flag_F, float* f_interp, size_t pitch_interp, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
int j = x+y*pitch+z*YDIM*pitch;//index on padded mem (pitch in elements)
int im = ImageFcn(x,y,GPU*(zInner+2)+1+z,t);
float f[19];
__shared__ float sumX[BLOCKSIZEX], sumY[BLOCKSIZEX], sumZ[BLOCKSIZEX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
int yp,ym;
yp = y+1;
ym = y-1;
if(y == DYNY1) yp = 0;
if(y == 0) ym = DYNY1;
f[ 0] = fA[j];
f[ 1] = fA[f_mem (1 ,x-1,y ,z ,pitch, zInner)];
f[ 3] = fA[f_mem (3 ,x+1,y ,z ,pitch, zInner)];
f[ 2] = fA[f_mem (2 ,x ,ym ,z ,pitch, zInner)];
f[ 5] = fA[f_mem (5 ,x-1,ym ,z ,pitch, zInner)];
f[ 6] = fA[f_mem (6 ,x+1,ym ,z ,pitch, zInner)];
f[ 4] = fA[f_mem (4 ,x ,yp ,z ,pitch, zInner)];
f[ 7] = fA[f_mem (7 ,x+1,yp ,z ,pitch, zInner)];
f[ 8] = fA[f_mem (8 ,x-1,yp ,z ,pitch, zInner)];
if(z==zInner-1){//top nodes need info from h
f[ 9] = fA[f_mem (9 ,x ,y ,z-1,pitch, zInner)];
f[10]= fA[f_mem (10,x-1,y ,z-1,pitch, zInner)];
f[11]= fA[f_mem (11,x ,ym ,z-1,pitch, zInner)];
f[12]= fA[f_mem (12,x+1,y ,z-1,pitch, zInner)];
f[13]= fA[f_mem (13,x ,yp ,z-1,pitch, zInner)];
f[14]= h [buff_mem(14,x ,y ,pitch)];
f[15]= h [buff_mem(15,x-1,y ,pitch)];
f[16]= h [buff_mem(16,x ,ym ,pitch)];
f[17]= h [buff_mem(17,x+1,y ,pitch)];
f[18]= h [buff_mem(18,x ,yp ,pitch)];
}
else if(z==0){//bottom nodes need info from g
f[ 9] =g [buff_mem(9 ,x ,y ,pitch)];
f[10]= g [buff_mem(10,x-1,y ,pitch)];
f[11]= g [buff_mem(11,x ,ym ,pitch)];
f[12]= g [buff_mem(12,x+1,y ,pitch)];
f[13]= g [buff_mem(13,x ,yp ,pitch)];
f[14]= fA[f_mem (14,x ,y ,z+1,pitch, zInner)];
f[15]= fA[f_mem (15,x-1,y ,z+1,pitch, zInner)];
f[16]= fA[f_mem (16,x ,ym ,z+1,pitch, zInner)];
f[17]= fA[f_mem (17,x+1,y ,z+1,pitch, zInner)];
f[18]= fA[f_mem (18,x ,yp ,z+1,pitch, zInner)];
}
else{//normal nodes
f[ 9] = fA[f_mem(9 ,x ,y ,z-1,pitch,zInner)];
f[10]= fA[f_mem(10,x-1,y ,z-1,pitch,zInner)];
f[11]= fA[f_mem(11,x ,ym ,z-1,pitch,zInner)];
f[12]= fA[f_mem(12,x+1,y ,z-1,pitch,zInner)];
f[13]= fA[f_mem(13,x ,yp ,z-1,pitch,zInner)];
f[14]= fA[f_mem(14,x ,y ,z+1,pitch,zInner)];
f[15]= fA[f_mem(15,x-1,y ,z+1,pitch,zInner)];
f[16]= fA[f_mem(16,x ,ym ,z+1,pitch,zInner)];
f[17]= fA[f_mem(17,x+1,y ,z+1,pitch,zInner)];
f[18]= fA[f_mem(18,x ,yp ,z+1,pitch,zInner)];
}//end normal nodes
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
fB[f_mem(1 ,x,y,z,pitch,zInner)] = f[ 3] ;
fB[f_mem(2 ,x,y,z,pitch,zInner)] = f[ 4] ;
fB[f_mem(3 ,x,y,z,pitch,zInner)] = f[ 1] ;
fB[f_mem(4 ,x,y,z,pitch,zInner)] = f[ 2] ;
fB[f_mem(5 ,x,y,z,pitch,zInner)] = f[ 7] ;
fB[f_mem(6 ,x,y,z,pitch,zInner)] = f[ 8] ;
fB[f_mem(7 ,x,y,z,pitch,zInner)] = f[ 5] ;
fB[f_mem(8 ,x,y,z,pitch,zInner)] = f[ 6] ;
fB[f_mem(9 ,x,y,z,pitch,zInner)] = f[14];
fB[f_mem(10,x,y,z,pitch,zInner)] = f[17];
fB[f_mem(11,x,y,z,pitch,zInner)] = f[18];
fB[f_mem(12,x,y,z,pitch,zInner)] = f[15];
fB[f_mem(13,x,y,z,pitch,zInner)] = f[16];
fB[f_mem(14,x,y,z,pitch,zInner)] = f[ 9] ;
fB[f_mem(15,x,y,z,pitch,zInner)] = f[12];
fB[f_mem(16,x,y,z,pitch,zInner)] = f[13];
fB[f_mem(17,x,y,z,pitch,zInner)] = f[10];
fB[f_mem(18,x,y,z,pitch,zInner)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
if(im == 100)//north outlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
North_Extrap(f,1.0f);
}
if(im == 200)//south inlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
//South_Extrap(f,UMAX);
float u_in = PoisProf3D(x,GPU*(zInner+2)+1+z);
South_Extrap(f,0,u_in,0);
}
if(im == 300)//east outlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x-1,y,z,pitch,zInner)];
East_Extrap(f,1.0f);
}
if(im == 400)//west inlet
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x+1,y,z,pitch,zInner)];
float u_in = PoisProf3D(y,GPU*(zInner+2)+1+z);
West_Extrap(f,u_in,t);
}
else if(im == 70)//new south inlet periodic
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
float u = f[ 1]-f[ 3]+f[ 5]-f[ 6]-f[ 7]+f[ 8]+f[10]-f[12]+f[15]-f[17];
float v = f[ 2]-f[ 4]+f[ 5]+f[ 6]-f[ 7]-f[ 8]+f[11]-f[13]+f[16]-f[18];
float w = f[ 9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
South_Extrap(f,u,v,w);
}
else if(im == 80)//use rho from y+1. all other moments from y-1
{
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y+1,z,pitch,zInner)];
float rho=f[ 0]+f[ 1]+f[ 2]+f[ 3]+f[ 4]+f[ 5]+f[ 6]+f[ 7]+f[ 8]+f[ 9]+
f[10]+f[11]+f[12]+f[13]+f[14]+f[15]+f[16]+f[17]+f[18];
for(int i = 0; i<19; i++)
f[i ]= fA[f_mem(i ,x,y-1,z,pitch,zInner)];
North_Extrap(f,rho);
}
if(im == 25)
xsymmetry_top(f,y,GPU*(zInner+2)+1+z);
if(im == 26)
xsymmetry_bot(f,y,GPU*(zInner+2)+1+z);
//if(y>DYNY1) dpdy = 0.f;
mrt_collide(f,omega,dpdy);
if(VELAV == 1){
if(t>=START_VELAV && t<START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_Av = velAv_w[x+y*pitch+(z+1)*pitch*YDIM];
vel_av(f,u_Av,v_Av,w_Av,t);
velAv_u[x+y*pitch+(z+1)*pitch*YDIM] = u_Av;
velAv_v[x+y*pitch+(z+1)*pitch*YDIM] = v_Av;
velAv_w[x+y*pitch+(z+1)*pitch*YDIM] = w_Av;
}
else if(t>=START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_Av = velAv_w[x+y*pitch+(z+1)*pitch*YDIM];
float u_fluc = velFluc_u[x+y*pitch+(z+1)*pitch*YDIM];
float v_fluc = velFluc_v[x+y*pitch+(z+1)*pitch*YDIM];
float w_fluc = velFluc_w[x+y*pitch+(z+1)*pitch*YDIM];
vel_fluc(f,u_Av,v_Av,w_Av,u_fluc,v_fluc,w_fluc,t);
velFluc_u[x+y*pitch+(z+1)*pitch*YDIM] = u_fluc;
velFluc_v[x+y*pitch+(z+1)*pitch*YDIM] = v_fluc;
velFluc_w[x+y*pitch+(z+1)*pitch*YDIM] = w_fluc;
}
}
for(int i = 0; i<19; i++)
fB[f_mem(i ,x,y,z,pitch,zInner)] = f[ i] ;
}
if(REFINEMENT == 1){
if(x>=int(LRX0)&&x<=int(LRX0+XLRDIM*LRFACTOR)&&y>=int(LRY0)&&y<=int(LRY0+YLRDIM*LRFACTOR))
{
// if(x>int(LRX0+2)&&x<int(LRX0+XLRDIM*LRFACTOR-1)&&y>int(LRY0+2)&&y<int(LRY0+YLRDIM*LRFACTOR-1))
// {
// //do nothing
// }
// else{
//float rho,u,v,w,m9,m11,m13,m14,m15;
float mom[19];
Moments(f,mom);
for(int i = 0; i<19; i++)
f_interp[f_mem_interp(i,x-int(LRX0),y-int(LRY0),z,pitch_interp,zInner)]=mom[i];
// }
}
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_top_LR(float* hB, float* hA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = (GPU+1)*(zInner+2)-1;//physical coord in LR region
int j = x+y*pitch;//index on padded mem (pitch in elements)
float xcoord = LRX0+x*LRFACTOR;
float ycoord = LRY0+y*LRFACTOR;
float zcoord = LRZ0+LRFACTOR*z;
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[0 ]= hA [j];
f[1 ]= hA [buff_memLR(1 ,x-1,y ,pitch)];
f[3 ]= hA [buff_memLR(3 ,x+1,y ,pitch)];
f[2 ]= hA [buff_memLR(2 ,x ,y-1,pitch)];
f[5 ]= hA [buff_memLR(5 ,x-1,y-1,pitch)];
f[6 ]= hA [buff_memLR(6 ,x+1,y-1,pitch)];
f[4 ]= hA [buff_memLR(4 ,x ,y+1,pitch)];
f[7 ]= hA [buff_memLR(7 ,x+1,y+1,pitch)];
f[8 ]= hA [buff_memLR(8 ,x-1,y+1,pitch)];
f[9 ]= fA [ f_memLR(9 ,x ,y ,zInner-1,pitch, zInner)];
f[10]= fA [ f_memLR(10,x-1,y ,zInner-1,pitch, zInner)];
f[11]= fA [ f_memLR(11,x ,y-1,zInner-1,pitch, zInner)];
f[12]= fA [ f_memLR(12,x+1,y ,zInner-1,pitch, zInner)];
f[13]= fA [ f_memLR(13,x ,y+1,zInner-1,pitch, zInner)];
f[14]= temp[buff_memLR(14,x ,y ,pitch)];
f[15]= temp[buff_memLR(15,x-1,y ,pitch)];
f[16]= temp[buff_memLR(16,x ,y-1,pitch)];
f[17]= temp[buff_memLR(17,x+1,y ,pitch)];
f[18]= temp[buff_memLR(18,x ,y+1,pitch)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
hB[buff_memLR(0 ,x,y,pitch)] = f[0 ];
hB[buff_memLR(1 ,x,y,pitch)] = f[3 ];
hB[buff_memLR(2 ,x,y,pitch)] = f[4 ];
hB[buff_memLR(3 ,x,y,pitch)] = f[1 ];
hB[buff_memLR(4 ,x,y,pitch)] = f[2 ];
hB[buff_memLR(5 ,x,y,pitch)] = f[7 ];
hB[buff_memLR(6 ,x,y,pitch)] = f[8 ];
hB[buff_memLR(7 ,x,y,pitch)] = f[5 ];
hB[buff_memLR(8 ,x,y,pitch)] = f[6 ];
hB[buff_memLR(9 ,x,y,pitch)] = f[14];
hB[buff_memLR(10,x,y,pitch)] = f[17];
hB[buff_memLR(11,x,y,pitch)] = f[18];
hB[buff_memLR(12,x,y,pitch)] = f[15];
hB[buff_memLR(13,x,y,pitch)] = f[16];
hB[buff_memLR(14,x,y,pitch)] = f[9 ];
hB[buff_memLR(15,x,y,pitch)] = f[12];
hB[buff_memLR(16,x,y,pitch)] = f[13];
hB[buff_memLR(17,x,y,pitch)] = f[10];
hB[buff_memLR(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
for(int i = 0; i<19; i++)
hB[buff_memLR(i ,x,y,pitch)] = f[i ];
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_bot_LR(float* gB, float* gA, float* fA, float* temp,
float omega, size_t pitch, int GPU, int zInner, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
//int z = (zInner+2)-1;
int j = x+y*pitch;//index on padded mem (pitch in elements)
float xcoord = LRX0+x*LRFACTOR;
float ycoord = LRY0+y*LRFACTOR;
//float zcoord = LRZ0+GPU*LRFACTOR*z;
float zcoord = LRZ0+LRFACTOR*(GPU*(zInner+2)-1);
int im = ImageFcnLR(xcoord,ycoord,zcoord);
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[0 ]= gA [j];
f[1 ]= gA [buff_memLR(1 ,x-1,y ,pitch)];
f[3 ]= gA [buff_memLR(3 ,x+1,y ,pitch)];
f[2 ]= gA [buff_memLR(2 ,x ,y-1,pitch)];
f[5 ]= gA [buff_memLR(5 ,x-1,y-1,pitch)];
f[6 ]= gA [buff_memLR(6 ,x+1,y-1,pitch)];
f[4 ]= gA [buff_memLR(4 ,x ,y+1,pitch)];
f[7 ]= gA [buff_memLR(7 ,x+1,y+1,pitch)];
f[8 ]= gA [buff_memLR(8 ,x-1,y+1,pitch)];
f[9 ]= temp[buff_memLR(9 ,x ,y ,pitch)];
f[10]= temp[buff_memLR(10,x-1,y ,pitch)];
f[11]= temp[buff_memLR(11,x ,y-1,pitch)];
f[12]= temp[buff_memLR(12,x+1,y ,pitch)];
f[13]= temp[buff_memLR(13,x ,y+1,pitch)];
f[14]= fA [ f_memLR(14,x ,y ,0,pitch, zInner)];
f[15]= fA [ f_memLR(15,x-1,y ,0,pitch, zInner)];
f[16]= fA [ f_memLR(16,x ,y-1,0,pitch, zInner)];
f[17]= fA [ f_memLR(17,x+1,y ,0,pitch, zInner)];
f[18]= fA [ f_memLR(18,x ,y+1,0,pitch, zInner)];
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
gB[buff_memLR(0 ,x,y,pitch)] = f[0 ];
gB[buff_memLR(1 ,x,y,pitch)] = f[3 ];
gB[buff_memLR(2 ,x,y,pitch)] = f[4 ];
gB[buff_memLR(3 ,x,y,pitch)] = f[1 ];
gB[buff_memLR(4 ,x,y,pitch)] = f[2 ];
gB[buff_memLR(5 ,x,y,pitch)] = f[7 ];
gB[buff_memLR(6 ,x,y,pitch)] = f[8 ];
gB[buff_memLR(7 ,x,y,pitch)] = f[5 ];
gB[buff_memLR(8 ,x,y,pitch)] = f[6 ];
gB[buff_memLR(9 ,x,y,pitch)] = f[14];
gB[buff_memLR(10,x,y,pitch)] = f[17];
gB[buff_memLR(11,x,y,pitch)] = f[18];
gB[buff_memLR(12,x,y,pitch)] = f[15];
gB[buff_memLR(13,x,y,pitch)] = f[16];
gB[buff_memLR(14,x,y,pitch)] = f[9 ];
gB[buff_memLR(15,x,y,pitch)] = f[12];
gB[buff_memLR(16,x,y,pitch)] = f[13];
gB[buff_memLR(17,x,y,pitch)] = f[10];
gB[buff_memLR(18,x,y,pitch)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
for(int i = 0; i<19; i++)
gB[buff_memLR(i ,x,y,pitch)] = f[i ];
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
__global__ void update_inn_LR(float* fB, float* fA, float* g, float* h, float omega, size_t pitch, int GPU, int zInner, float* velAv_u, float* velAv_v, float* velFluc_u, float* velFluc_v, float* FX, float* FY, float* FZ, int t, int flag_F, float dpdy)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;//coord in linear mem
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
int j = x+y*pitch+z*YLRDIM*pitch;//index on padded mem (pitch in elements)
int im = ImageFcnLR(LRX0+LRFACTOR*x,LRY0+LRFACTOR*y,LRZ0+LRFACTOR*(GPU*(zInner+2)+1+z));
float f[19];
__shared__ float sumX[BLOCKSIZELRX], sumY[BLOCKSIZELRX], sumZ[BLOCKSIZELRX];
__shared__ int check[1];
check[0] = 0;
syncthreads();
f[ 0] = fA[j];
f[ 1] = fA[f_memLR (1 ,x-1,y ,z ,pitch, zInner)];
f[ 3] = fA[f_memLR (3 ,x+1,y ,z ,pitch, zInner)];
f[ 2] = fA[f_memLR (2 ,x ,y-1,z ,pitch, zInner)];
f[ 5] = fA[f_memLR (5 ,x-1,y-1,z ,pitch, zInner)];
f[ 6] = fA[f_memLR (6 ,x+1,y-1,z ,pitch, zInner)];
f[ 4] = fA[f_memLR (4 ,x ,y+1,z ,pitch, zInner)];
f[ 7] = fA[f_memLR (7 ,x+1,y+1,z ,pitch, zInner)];
f[ 8] = fA[f_memLR (8 ,x-1,y+1,z ,pitch, zInner)];
if(z==zInner-1){//top nodes need info from h
f[ 9] =fA[ f_memLR(9 ,x ,y ,z-1,pitch, zInner)];
f[10]= fA[ f_memLR(10,x-1,y ,z-1,pitch, zInner)];
f[11]= fA[ f_memLR(11,x ,y-1,z-1,pitch, zInner)];
f[12]= fA[ f_memLR(12,x+1,y ,z-1,pitch, zInner)];
f[13]= fA[ f_memLR(13,x ,y+1,z-1,pitch, zInner)];
f[14]= h [buff_memLR(14,x ,y ,pitch)];
f[15]= h [buff_memLR(15,x-1,y ,pitch)];
f[16]= h [buff_memLR(16,x ,y-1,pitch)];
f[17]= h [buff_memLR(17,x+1,y ,pitch)];
f[18]= h [buff_memLR(18,x ,y+1,pitch)];
}
else if(z==0){//bottom nodes need info from g
f[ 9] =g [buff_memLR(9 ,x ,y ,pitch)];
f[10]= g [buff_memLR(10,x-1,y ,pitch)];
f[11]= g [buff_memLR(11,x ,y-1,pitch)];
f[12]= g [buff_memLR(12,x+1,y ,pitch)];
f[13]= g [buff_memLR(13,x ,y+1,pitch)];
f[14]= fA[ f_memLR(14,x ,y ,z+1,pitch, zInner)];
f[15]= fA[ f_memLR(15,x-1,y ,z+1,pitch, zInner)];
f[16]= fA[ f_memLR(16,x ,y-1,z+1,pitch, zInner)];
f[17]= fA[ f_memLR(17,x+1,y ,z+1,pitch, zInner)];
f[18]= fA[ f_memLR(18,x ,y+1,z+1,pitch, zInner)];
}
else{//normal nodes
f[ 9] =fA[f_memLR(9 ,x ,y ,z-1,pitch,zInner)];
f[10]= fA[f_memLR(10,x-1,y ,z-1,pitch,zInner)];
f[11]= fA[f_memLR(11,x ,y-1,z-1,pitch,zInner)];
f[12]= fA[f_memLR(12,x+1,y ,z-1,pitch,zInner)];
f[13]= fA[f_memLR(13,x ,y+1,z-1,pitch,zInner)];
f[14]= fA[f_memLR(14,x ,y ,z+1,pitch,zInner)];
f[15]= fA[f_memLR(15,x-1,y ,z+1,pitch,zInner)];
f[16]= fA[f_memLR(16,x ,y-1,z+1,pitch,zInner)];
f[17]= fA[f_memLR(17,x+1,y ,z+1,pitch,zInner)];
f[18]= fA[f_memLR(18,x ,y+1,z+1,pitch,zInner)];
}//end normal nodes
if(im == 1 || im ==10){//BB
if(im == 10 && flag_F == 1){
check[0] = 1;
sumX[threadIdx.x]=2.f*f[ 1]-2.f*f[ 3]+2.f*f[ 5]+2.f*f[ 8]-2.f*f[ 6];
sumX[threadIdx.x]+=-2.f*f[ 7]+2.f*f[10]-2.f*f[12]+2.f*f[15]-2.f*f[17];
sumY[threadIdx.x]=2.f*f[ 2]-2.f*f[ 4]+2.f*f[ 5]-2.f*f[ 8]+2.f*f[ 6];
sumY[threadIdx.x]+=-2.f*f[ 7]+2.f*f[11]-2.f*f[13]+2.f*f[16]-2.f*f[18];
sumZ[threadIdx.x]=2.f*f[ 9]+2.f*f[10]+2.f*f[11]+2.f*f[12]+2.f*f[13];
sumZ[threadIdx.x]+=-2.f*f[14]-2.f*f[15]-2.f*f[16]-2.f*f[17]-2.f*f[18];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
}
fB[f_memLR(1 ,x,y,z,pitch,zInner)] = f[ 3] ;
fB[f_memLR(2 ,x,y,z,pitch,zInner)] = f[ 4] ;
fB[f_memLR(3 ,x,y,z,pitch,zInner)] = f[ 1] ;
fB[f_memLR(4 ,x,y,z,pitch,zInner)] = f[ 2] ;
fB[f_memLR(5 ,x,y,z,pitch,zInner)] = f[ 7] ;
fB[f_memLR(6 ,x,y,z,pitch,zInner)] = f[ 8] ;
fB[f_memLR(7 ,x,y,z,pitch,zInner)] = f[ 5] ;
fB[f_memLR(8 ,x,y,z,pitch,zInner)] = f[ 6] ;
fB[f_memLR(9 ,x,y,z,pitch,zInner)] = f[14];
fB[f_memLR(10,x,y,z,pitch,zInner)] = f[17];
fB[f_memLR(11,x,y,z,pitch,zInner)] = f[18];
fB[f_memLR(12,x,y,z,pitch,zInner)] = f[15];
fB[f_memLR(13,x,y,z,pitch,zInner)] = f[16];
fB[f_memLR(14,x,y,z,pitch,zInner)] = f[ 9] ;
fB[f_memLR(15,x,y,z,pitch,zInner)] = f[12];
fB[f_memLR(16,x,y,z,pitch,zInner)] = f[13];
fB[f_memLR(17,x,y,z,pitch,zInner)] = f[10];
fB[f_memLR(18,x,y,z,pitch,zInner)] = f[11];
}
else{
sumX[threadIdx.x]=0.f;
sumY[threadIdx.x]=0.f;
sumZ[threadIdx.x]=0.f;
mrt_collide(f,omega,dpdy*LRFACTOR);
if(VELAV == 1){
if(t>=START_VELAV && t<START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM];
vel_avLR(f,u_Av,v_Av,t);
velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM] = u_Av;
velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM] = v_Av;
}
else if(t>=START_VELFLUC){
float u_Av = velAv_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_Av = velAv_v[x+y*pitch+(z+1)*pitch*YLRDIM];
float u_fluc = velFluc_u[x+y*pitch+(z+1)*pitch*YLRDIM];
float v_fluc = velFluc_v[x+y*pitch+(z+1)*pitch*YLRDIM];
vel_flucLR(f,u_Av,v_Av,u_fluc,v_fluc,t);
velFluc_u[x+y*pitch+(z+1)*pitch*YLRDIM] = u_fluc;
velFluc_v[x+y*pitch+(z+1)*pitch*YLRDIM] = v_fluc;
}
}
for(int i = 0; i<19; i++)
fB[f_memLR(i ,x,y,z,pitch,zInner)] = f[ i] ;
}
syncthreads();
if(check[0] == 1){
//reduction for force
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumX[threadIdx.x] += sumX[threadIdx.x+halfPoint];
sumY[threadIdx.x] += sumY[threadIdx.x+halfPoint];
sumZ[threadIdx.x] += sumZ[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&FX[t-STARTF],sumX[0]);
atomicAdd(&FY[t-STARTF],sumY[0]);
atomicAdd(&FZ[t-STARTF],sumZ[0]);
}
}
}
/*
InterpCF is used on the LR grid. It first uses part of its threads to read from the coarse mesh nodes that completely envelope the fine mesh nodes, and loads the f's into shared memory. Next, all threads use the shared memory data to interpolate and scale the f's
*/
__global__ void InterpCF(float* f_f, float* g_f, float* h_f, size_t pitch_f, float* m_f_c, float* m_g_c, float* m_h_c, float* m_g_temp, size_t pitch_m, float SF, float omega_c, int GPU, int zInner, int zInner_f)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
__shared__ float mom_c[BLOCKSIZEINTERP][2][2][19];
__shared__ float S_c[BLOCKSIZEINTERP][2][2][6];
//int GPU = 0;
int im = ImageFcnLR(LRX0+LRFACTOR*x,LRY0+LRFACTOR*y,LRZ0+LRFACTOR*(GPU*(zInner_f+2)+z));
if(blockIdx.z == 0 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use g and g_temp
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_temp[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(blockIdx.z == 1 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use g and f
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_g_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+i*ymax*pitch_m*zInner];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(blockIdx.z == zInner+1 && threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2)
{
//use h and f
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int ymax = YLRDIM*LRFACTOR+1;
if(threadIdx.z == 0){
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+(zInner-1)*ymax*pitch_m+i*ymax*pitch_m*zInner];
}
else{
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_h_c[x_c+y_c*pitch_m+i*ymax*pitch_m];
}
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
else if(threadIdx.x<ceil(BLOCKSIZEINTERP*LRFACTOR)+1 && threadIdx.z<2 && threadIdx.y<2){//use f only
int x_c = threadIdx.x+blockIdx.x*BLOCKSIZEINTERP*LRFACTOR;//in coarse grid, blockdim.x is LRX*LRFACTOR
int y_c = threadIdx.y+blockIdx.y;//in coarse grid, blockdim.y is 1
int z_c = threadIdx.z+blockIdx.z-2;//in coarse grid, blockdim.z is 1; -2 to account for g and lower halo
int ymax = YLRDIM*LRFACTOR+1;
for(int i = 0; i<19; i++)
mom_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= m_f_c[x_c+y_c*pitch_m+z_c*ymax*pitch_m+i*ymax*pitch_m*zInner];
// float S[6];//float m_strain[9];
// for(int i = 0; i<9; i++)
// m_strain[i] = mom_c[i][threadIdx.x][threadIdx.y][threadIdx.z];
// for(int i = 0; i<6; i++)
// S_c[threadIdx.x][threadIdx.y][threadIdx.z][i]= S[i];
StrainRate(S_c[threadIdx.x][threadIdx.y][threadIdx.z],mom_c[threadIdx.x][threadIdx.y][threadIdx.z],1.f);
}
syncthreads();
if(x<LRLEVEL || x>XLRDIM-LRLEVEL-1 || y<LRLEVEL || y>YLRDIM-LRLEVEL-1){
//if(x<LRLEVEL+3 || x>XLRDIM-LRLEVEL-5 || y<LRLEVEL+3 || y>YLRDIM-LRLEVEL-5){
//interpolate from shared mem
int xm = int(threadIdx.x*LRFACTOR+LRFACTOR*0.5f);
int ym = int(threadIdx.y*LRFACTOR+LRFACTOR*0.5f);
int zm = int(threadIdx.z*LRFACTOR+LRFACTOR*0.5f);
int xp = xm+1; //int yp = ym+1; int zp = zm+1;
float xf = (threadIdx.x*LRFACTOR+LRFACTOR*0.5f)-xm;
float yf = (threadIdx.y*LRFACTOR+LRFACTOR*0.5f)-ym;
float zf = (threadIdx.z*LRFACTOR+LRFACTOR*0.5f)-zm;
float mom[19];
for(int i = 0; i<19; i++){
float v000 = mom_c[xm][0][0][i];
float v001 = mom_c[xp][0][0][i];
float v010 = mom_c[xm][1][0][i];
float v011 = mom_c[xp][1][0][i];
float v100 = mom_c[xm][0][1][i];
float v101 = mom_c[xp][0][1][i];
float v110 = mom_c[xm][1][1][i];
float v111 = mom_c[xp][1][1][i];
mom[i] = trilinear_interp(v000, v001, v010, v011, v100, v101, v110, v111, xf, yf, zf);
}
if(ORDER == 2)
{
float u_x1,u_x2,u_x3,u_x4,u_x5,u_x6,u_x7,u_x8;
float v_y1,v_y2,v_y3,v_y4,v_y5,v_y6,v_y7,v_y8;
float w_z1,w_z2,w_z3,w_z4,w_z5,w_z6,w_z7,w_z8;
float Sxy1,Sxy2,Sxy3,Sxy4,Sxy5,Sxy6,Sxy7,Sxy8;
float Syz1,Syz2,Syz3,Syz4,Syz5,Syz6,Syz7,Syz8;
float Sxz1,Sxz2,Sxz3,Sxz4,Sxz5,Sxz6,Sxz7,Sxz8;
u_x1=S_c[xm][0][0][0];v_y1=S_c[xm][0][0][1];w_z1=S_c[xm][0][0][2];Sxy1=S_c[xm][0][0][3];Syz1=S_c[xm][0][0][4];Sxz1=S_c[xm][0][0][5];
u_x2=S_c[xp][0][0][0];v_y2=S_c[xp][0][0][1];w_z2=S_c[xp][0][0][2];Sxy2=S_c[xp][0][0][3];Syz2=S_c[xp][0][0][4];Sxz2=S_c[xp][0][0][5];
u_x3=S_c[xm][1][0][0];v_y3=S_c[xm][1][0][1];w_z3=S_c[xm][1][0][2];Sxy3=S_c[xm][1][0][3];Syz3=S_c[xm][1][0][4];Sxz3=S_c[xm][1][0][5];
u_x4=S_c[xp][1][0][0];v_y4=S_c[xp][1][0][1];w_z4=S_c[xp][1][0][2];Sxy4=S_c[xp][1][0][3];Syz4=S_c[xp][1][0][4];Sxz4=S_c[xp][1][0][5];
u_x5=S_c[xm][0][1][0];v_y5=S_c[xm][0][1][1];w_z5=S_c[xm][0][1][2];Sxy5=S_c[xm][0][1][3];Syz5=S_c[xm][0][1][4];Sxz5=S_c[xm][0][1][5];
u_x6=S_c[xp][0][1][0];v_y6=S_c[xp][0][1][1];w_z6=S_c[xp][0][1][2];Sxy6=S_c[xp][0][1][3];Syz6=S_c[xp][0][1][4];Sxz6=S_c[xp][0][1][5];
u_x7=S_c[xm][1][1][0];v_y7=S_c[xm][1][1][1];w_z7=S_c[xm][1][1][2];Sxy7=S_c[xm][1][1][3];Syz7=S_c[xm][1][1][4];Sxz7=S_c[xm][1][1][5];
u_x8=S_c[xp][1][1][0];v_y8=S_c[xp][1][1][1];w_z8=S_c[xp][1][1][2];Sxy8=S_c[xp][1][1][3];Syz8=S_c[xp][1][1][4];Sxz8=S_c[xp][1][1][5];
float m03,m05,m07, m13,m15,m17, m23,m25,m27, m33,m35,m37, m43,m45,m47, m53,m55,m57, m63,m65,m67, m73,m75,m77;
m03=mom_c[xm][0][0][3];m05=mom_c[xm][0][0][5];m07=mom_c[xm][0][0][7];
m13=mom_c[xp][0][0][3];m15=mom_c[xp][0][0][5];m17=mom_c[xp][0][0][7];
m23=mom_c[xm][1][0][3];m25=mom_c[xm][1][0][5];m27=mom_c[xm][1][0][7];
m33=mom_c[xp][1][0][3];m35=mom_c[xp][1][0][5];m37=mom_c[xp][1][0][7];
m43=mom_c[xm][0][1][3];m45=mom_c[xm][0][1][5];m47=mom_c[xm][0][1][7];
m53=mom_c[xp][0][1][3];m55=mom_c[xp][0][1][5];m57=mom_c[xp][0][1][7];
m63=mom_c[xm][1][1][3];m65=mom_c[xm][1][1][5];m67=mom_c[xm][1][1][7];
m73=mom_c[xp][1][1][3];m75=mom_c[xp][1][1][5];m77=mom_c[xp][1][1][7];
float cx = -((u_x8-u_x7+u_x6-u_x5+u_x4-u_x3+u_x2-u_x1))*0.03125f;
float cy = -((Sxy8+Sxy7-Sxy6-Sxy5+Sxy4+Sxy3-Sxy2-Sxy1)-m75+m65+m55-m45-m35+m25+m15-m05)*0.0625f;
float cz = -((Sxz8+Sxz7+Sxz6+Sxz5-Sxz4-Sxz3-Sxz2-Sxz1)-m77+m67-m57+m47+m37-m27+m17-m07)*0.0625f;
float dx = -((Sxy8-Sxy7+Sxy6-Sxy5+Sxy4-Sxy3+Sxy2-Sxy1)-m73+m63+m53-m43-m33+m23+m13-m03)*0.0625f;
float dy = -((v_y8+v_y7-v_y6-v_y5+v_y4+v_y3-v_y2-v_y1))*0.03125f;
float dz = -((Syz8+Syz7+Syz6+Syz5-Syz4-Syz3-Syz2-Syz1)-m77-m67+m57+m47+m37+m27-m17-m07)*0.0625f;
float ex = -((Sxz8-Sxz7+Sxz6-Sxz5+Sxz4-Sxz3+Sxz2-Sxz1)-m73+m63-m53+m43+m33-m23+m13-m03)*0.0625f;
float ey = -((Syz8+Syz7-Syz6-Syz5+Syz4+Syz3-Syz2-Syz1)-m75-m65+m55+m45+m35+m25-m15-m05)*0.0625f;
float ez = -((w_z8+w_z7+w_z6+w_z5-w_z4-w_z3-w_z2-w_z1))*0.03125f;
float xpr = 4.f*xf*xf-4.f*xf+1.f;
float ypr = 4.f*yf*yf-4.f*yf+1.f;
float zpr = 4.f*zf*zf-4.f*zf+1.f;
mom[3] += cx*(1.f-xpr)+cy*(1.f-ypr)+cz*(1.f-zpr);
mom[5] += dx*(1.f-xpr)+dy*(1.f-ypr)+dz*(1.f-zpr);
mom[7] += ex*(1.f-xpr)+ey*(1.f-ypr)+ez*(1.f-zpr);
}
float f[19];
//InvertPhysicalMoments(f,mom,SF);
//InvertPhysicalMoments_LES_cf(f,mom,SF,omega_c);
ScaleMoments_bgk(mom,SF);
// mom[0] = 2.f;
// mom[3] = 0.1f;
// mom[5] = 0.1f;
// mom[7] = 0.1f;
InvertMoments(f,mom);
if(im != 1 && im != 10){
if(z==0){
for(int i = 0; i<19; i++){
g_f[buff_memLR(i,x,y,pitch_f)]=f[i];
}
}
else if(z==gridDim.z*blockDim.z-1){
for(int i = 0; i<19; i++){
h_f[buff_memLR(i,x,y,pitch_f)]=f[i];
}
}
else{
for(int i = 0; i<19; i++){
f_f[f_memLR(i,x,y,z-1,pitch_f,zInner_f)]=f[i];
}
}
}
}
}
__global__ void InterpFC(float* f_c, float* g_c, float* h_c, float* f_f, float* h_f, float* temp_f, size_t pitch_c, size_t pitch_f, float SF, float omega_f, int GPU, int zInner, int zInner_f)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int y = threadIdx.y+blockIdx.y*blockDim.y;
int z = threadIdx.z+blockIdx.z*blockDim.z;
//if( (x > LRX0+1 && x < LRX0+XLRDIM*LRFACTOR-1 && y > LRY0+1 && y < LRY0+YLRDIM*LRFACTOR-1) &&
//(x == int(LRX0+2) || x == int(LRX0+XLRDIM*LRFACTOR-2) || y == int(LRY0+2) || y == int(LRY0+YLRDIM*LRFACTOR-2)))
//(true))
//if( (x > LRX0+5 && x < LRX0+XLRDIM*LRFACTOR-6 && y > LRY0+5 && y < LRY0+YLRDIM*LRFACTOR-6) &&
if( (x > LRX0+1 && x < LRX0+XLRDIM*LRFACTOR-2 && y > LRY0+1 && y < LRY0+YLRDIM*LRFACTOR-2) &&
//(x == int(LRX0+2) || x == int(LRX0+XLRDIM*LRFACTOR-2) || y == int(LRY0+2) || y == int(LRY0+YLRDIM*LRFACTOR-2)))
(true))
{
float f[19];
float mom[8][19];//physical moments of 8 neighboring nodes
float S_f[8][6];//strain rate tensor of 8 neighboring nodes
int xm = LRLEVEL*(x-LRX0);
int ym = LRLEVEL*(y-LRY0);
int zm = LRLEVEL*(z-(-(1.f-0.5f*LRFACTOR)))-1;//LRZ0=-(1.f-0.5f*LRFACTOR), and -1 to account for g_LR
int xp = xm+1;
int yp = ym+1;
int zp = zm+1;
//top nodes. interp between h and h_temp. output to h
if(z == zInner+1)
{
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xm,ym,pitch_f)];
Moments(f,mom[0]);
StrainRate(S_f[0],mom[0],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xp,ym,pitch_f)];
Moments(f,mom[1]);
StrainRate(S_f[1],mom[1],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xm,yp,pitch_f)];
Moments(f,mom[2]);
StrainRate(S_f[2],mom[2],1.f);
for(int i = 0; i<19; i++)
f[i] = temp_f[buff_memLR(i,xp,yp,pitch_f)];
Moments(f,mom[3]);
StrainRate(S_f[3],mom[3],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xm,ym,pitch_f)];
Moments(f,mom[4]);
StrainRate(S_f[4],mom[4],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xp,ym,pitch_f)];
Moments(f,mom[5]);
StrainRate(S_f[5],mom[5],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xm,yp,pitch_f)];
Moments(f,mom[6]);
StrainRate(S_f[6],mom[6],1.f);
for(int i = 0; i<19; i++)
f[i] = h_f[buff_memLR(i,xp,yp,pitch_f)];
Moments(f,mom[7]);
StrainRate(S_f[7],mom[7],1.f);
}
//inner nodes. output to g or f
else{
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,ym,zm,pitch_f,zInner_f)];
Moments(f,mom[0]);
StrainRate(S_f[0],mom[0],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,ym,zm,pitch_f,zInner_f)];
Moments(f,mom[1]);
StrainRate(S_f[1],mom[1],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,yp,zm,pitch_f,zInner_f)];
Moments(f,mom[2]);
StrainRate(S_f[2],mom[2],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,yp,zm,pitch_f,zInner_f)];
Moments(f,mom[3]);
StrainRate(S_f[3],mom[3],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,ym,zp,pitch_f,zInner_f)];
Moments(f,mom[4]);
StrainRate(S_f[4],mom[4],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,ym,zp,pitch_f,zInner_f)];
Moments(f,mom[5]);
StrainRate(S_f[5],mom[5],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xm,yp,zp,pitch_f,zInner_f)];
Moments(f,mom[6]);
StrainRate(S_f[6],mom[6],1.f);
for(int i = 0; i<19; i++)
f[i] = f_f[f_memLR(i,xp,yp,zp,pitch_f,zInner_f)];
Moments(f,mom[7]);
StrainRate(S_f[7],mom[7],1.f);
}
if(ORDER == 1){
for(int i = 0; i<19; i++)
mom[0][i] = 0.125f*(mom[0][i]+mom[1][i]+mom[2][i]+mom[3][i]+mom[4][i]+mom[5][i]+mom[6][i]+mom[7][i]);
}
else if(ORDER == 2)
{
float u_x1,u_x2,u_x3,u_x4,u_x5,u_x6,u_x7,u_x8;
float v_y1,v_y2,v_y3,v_y4,v_y5,v_y6,v_y7,v_y8;
float w_z1,w_z2,w_z3,w_z4,w_z5,w_z6,w_z7,w_z8;
float Sxy1,Sxy2,Sxy3,Sxy4,Sxy5,Sxy6,Sxy7,Sxy8;
float Syz1,Syz2,Syz3,Syz4,Syz5,Syz6,Syz7,Syz8;
float Sxz1,Sxz2,Sxz3,Sxz4,Sxz5,Sxz6,Sxz7,Sxz8;
u_x1=S_f[0][0];v_y1=S_f[0][1];w_z1=S_f[0][2];Sxy1=S_f[0][3];Syz1=S_f[0][4];Sxz1=S_f[0][5];
u_x2=S_f[1][0];v_y2=S_f[1][1];w_z2=S_f[1][2];Sxy2=S_f[1][3];Syz2=S_f[1][4];Sxz2=S_f[1][5];
u_x3=S_f[2][0];v_y3=S_f[2][1];w_z3=S_f[2][2];Sxy3=S_f[2][3];Syz3=S_f[2][4];Sxz3=S_f[2][5];
u_x4=S_f[3][0];v_y4=S_f[3][1];w_z4=S_f[3][2];Sxy4=S_f[3][3];Syz4=S_f[3][4];Sxz4=S_f[3][5];
u_x5=S_f[4][0];v_y5=S_f[4][1];w_z5=S_f[4][2];Sxy5=S_f[4][3];Syz5=S_f[4][4];Sxz5=S_f[4][5];
u_x6=S_f[5][0];v_y6=S_f[5][1];w_z6=S_f[5][2];Sxy6=S_f[5][3];Syz6=S_f[5][4];Sxz6=S_f[5][5];
u_x7=S_f[6][0];v_y7=S_f[6][1];w_z7=S_f[6][2];Sxy7=S_f[6][3];Syz7=S_f[6][4];Sxz7=S_f[6][5];
u_x8=S_f[7][0];v_y8=S_f[7][1];w_z8=S_f[7][2];Sxy8=S_f[7][3];Syz8=S_f[7][4];Sxz8=S_f[7][5];
float m03,m05,m07, m13,m15,m17, m23,m25,m27, m33,m35,m37, m43,m45,m47, m53,m55,m57, m63,m65,m67, m73,m75,m77;
m03=mom[0][3];m05=mom[0][5];m07=mom[0][7];
m13=mom[1][3];m15=mom[1][5];m17=mom[1][7];
m23=mom[2][3];m25=mom[2][5];m27=mom[2][7];
m33=mom[3][3];m35=mom[3][5];m37=mom[3][7];
m43=mom[4][3];m45=mom[4][5];m47=mom[4][7];
m53=mom[5][3];m55=mom[5][5];m57=mom[5][7];
m63=mom[6][3];m65=mom[6][5];m67=mom[6][7];
m73=mom[7][3];m75=mom[7][5];m77=mom[7][7];
float cx = -((u_x8-u_x7+u_x6-u_x5+u_x4-u_x3+u_x2-u_x1))*0.03125f;
float cy = -((Sxy8+Sxy7-Sxy6-Sxy5+Sxy4+Sxy3-Sxy2-Sxy1)-m75+m65+m55-m45-m35+m25+m15-m05)*0.0625f;
float cz = -((Sxz8+Sxz7+Sxz6+Sxz5-Sxz4-Sxz3-Sxz2-Sxz1)-m77+m67-m57+m47+m37-m27+m17-m07)*0.0625f;
float dx = -((Sxy8-Sxy7+Sxy6-Sxy5+Sxy4-Sxy3+Sxy2-Sxy1)-m73+m63+m53-m43-m33+m23+m13-m03)*0.0625f;
float dy = -((v_y8+v_y7-v_y6-v_y5+v_y4+v_y3-v_y2-v_y1))*0.03125f;
float dz = -((Syz8+Syz7+Syz6+Syz5-Syz4-Syz3-Syz2-Syz1)-m77-m67+m57+m47+m37+m27-m17-m07)*0.0625f;
float ex = -((Sxz8-Sxz7+Sxz6-Sxz5+Sxz4-Sxz3+Sxz2-Sxz1)-m73+m63-m53+m43+m33-m23+m13-m03)*0.0625f;
float ey = -((Syz8+Syz7-Syz6-Syz5+Syz4+Syz3-Syz2-Syz1)-m75-m65+m55+m45+m35+m25-m15-m05)*0.0625f;
float ez = -((w_z8+w_z7+w_z6+w_z5-w_z4-w_z3-w_z2-w_z1))*0.03125f;
for(int i = 0; i<19; i++)
mom[0][i] = 0.125f*(mom[0][i]+mom[1][i]+mom[2][i]+mom[3][i]+mom[4][i]+mom[5][i]+mom[6][i]+mom[7][i]);
float xpr = 0.f;//4.f*xf*xf-4.f*xf+1.f;
float ypr = 0.f;//4.f*yf*yf-4.f*yf+1.f;
float zpr = 0.f;//4.f*zf*zf-4.f*zf+1.f;
mom[0][3] += cx*(1.f-xpr)+cy*(1.f-ypr)+cz*(1.f-zpr);
mom[0][5] += dx*(1.f-xpr)+dy*(1.f-ypr)+dz*(1.f-zpr);
mom[0][7] += ex*(1.f-xpr)+ey*(1.f-ypr)+ez*(1.f-zpr);
}
//InvertPhysicalMoments(f,mom[0],SF);
//InvertPhysicalMoments_LES_fc(f,mom[0],SF,omega_f);
ScaleMoments_bgk(mom[0],SF);
InvertMoments(f,mom[0]);
//for(int i = 0; i<19; i++) f[i] = 0.1f;
//int GPU = 0;
int im = ImageFcn(x,y,GPU*(zInner+2)+z,0);
if(im != 1 && im != 10){
if(z == 0){
for(int i = 0; i<19; i++)
g_c[buff_mem(i,x,y,pitch_c)]=f[i];
}
else if(z == zInner+1){
for(int i = 0; i<19; i++)
h_c[buff_mem(i,x,y,pitch_c)]=f[i];
}
else{
for(int i = 0; i<19; i++)
f_c[f_mem(i,x,y,z-1,pitch_c,zInner)]=f[i];
}
}
}//end extraction region
}
__global__ void AverageV(float* fA, float* gA, float* hA, size_t pitch, int GPU, int zInner, float* Av_V, int t)
{
int x = threadIdx.x+blockIdx.x*blockDim.x;
int z = threadIdx.z+blockIdx.z*blockDim.z;
float f[19];
float v_av = 0;
int im = ImageFcn(x,0,(GPU+1)*(zInner+2)-1,t);
__shared__ float sumV[BLOCKSIZEX];
syncthreads();
if(z == 0){
for(int i = 0; i<19; i++)
f[i] = gA[buff_mem(i,x,DYNY1,pitch)];
}
else if(z == zInner+1){
for(int i = 0; i<19; i++)
f[i] = hA[buff_mem(i,x,DYNY1,pitch)];
}
else{
for(int i = 0; i<19; i++)
f[i] = fA[f_mem(i,x,DYNY1,z-1,pitch,zInner)];
}
sumV[threadIdx.x] = f[2]-f[4]+f[5]+f[6]-f[7]-f[8]+f[11]-f[13]+f[16]-f[18];
if(im == 1 || im == 10) sumV[threadIdx.x] = 0.f;
syncthreads();
int nTotalThreads = blockDim.x;
while(nTotalThreads > 1){
int halfPoint = (nTotalThreads >> 1);
if(threadIdx.x < halfPoint){
sumV[threadIdx.x] += sumV[threadIdx.x+halfPoint];
}
syncthreads();
nTotalThreads = halfPoint;
}
if(threadIdx.x == 0){
atomicAdd(&Av_V[t],sumV[0]);
}
}
void WriteResults(ostream &output, ostream &outputslice, float *fin, float *gin, float *hin, float **velAv,
float **velFluc, float omega, int GPU_N, int GPU)
{
float f[19];
output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
output<<"ZONE F=POINT, I="<<XDIM<<", J="<<YDIM<<", K="<<ZDIM/GPU_N<<"\n";
if(GPU == 0){
outputslice<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
outputslice<<"ZONE F=POINT, I="<<XDIM<<", J="<<YDIM<<", K="<<1<<"\n";
}
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = gin[(i+j*XDIM)+l *XDIM*YDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
output<<i<<", "<<j<<", "<<(ZDIM/GPU_N*GPU)<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM]<<","<<velAv[1][i+j*XDIM]<<","<<velAv[2][i+j*XDIM]<<", "<<velFluc[0][i+j*XDIM]<<","<<velFluc[1][i+j*XDIM]<<","<<velFluc[2][i+j*XDIM]<<","<<0<<endl;
}}
for(int k = 1; k<ZDIM/GPU_N-1; k++){
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = fin[(i+j*XDIM)+(k-1)*XDIM*YDIM+l*XDIM*YDIM*(ZDIM/GPU_N-2)];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float m1 =-30.f*f[0]+-11.f*f[1]+-11.f*f[2]+-11.f*f[3]+-11.f*f[4]+8.f*f[5]+8.f*f[6]+8.f*f[7]+8.f*f[8]+-11.f*f[9]+8.f*f[10]+8.f*f[11]+8.f*f[12]+8.f*f[13]+-11.f*f[14]+8.f*f[15]+8.f*f[16]+8.f*f[17]+8.f*f[18];
//float m6 = -4.f*f[2]+4.f*f[4]+f[5]+f[6]+-f[7]+-f[8]+f[11]+-f[13]+f[16]+-f[18];
float m10 =-4.f*f[1]+2.f*f[2]+-4.f*f[3]+2.f*f[4]+f[5]+f[6]+f[7]+f[8]+2.f*f[9]+f[10]+-2.f*f[11]+f[12]+-2.f*f[13]+2.f*f[14]+f[15]+-2.f*f[16]+f[17]+-2.f*f[18];
float m16 = f[5]+-f[6]+-f[7]+f[8]-f[10]+f[12]+-f[15]+f[17];
float m[19] = {0};
Moments_host(f,m);
float omega = 1.0f/(3.0f*(UMAX*OBSTR1*2.f/RE)+0.5f);
//float omega2 = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
m[9] -= 2.f*u*u-(v*v+w*w);
m[11]-= v*v-w*w;
m[13]-= u*v;
m[14]-= v*w;
m[15]-= u*w;
float PI11 = -0.5f *(m[ 9]);
float PI22 = -(-38.f*m[ 9]-3.0f*m[11])/76.f;
float PI33 = -(-38.f*m[ 9]+3.0f*m[11])/76.f;
float PI12 = -1.5f*m[13];
float PI23 = -1.5f*m[14];
float PI13 = -1.5f*m[15];
//we know Smag on coarse mesh
float Smag = sqrt(2.f*(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13));
//InvertMoments_host(f,m);
//u = m[3];
//v = m[5];
//w = m[7];
//m6 = m[6 ];
//m10= m[10];
//m16= m[16];
int z = (ZDIM/GPU_N*GPU+k);
output<<i<<", "<<j<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+k*XDIM*YDIM]<<", "<<velAv[2][i+j*XDIM+k*XDIM*YDIM]<<", "
//<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[1][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
if(k == 1 && GPU == 0){
outputslice<<i<<", "<<j<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+k*XDIM*YDIM]<<", "<<velAv[2][i+j*XDIM+k*XDIM*YDIM]<<","
<<velFluc[0][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[1][i+j*XDIM+k*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+k*XDIM*YDIM]<<","<<Smag<<endl;
}
}}}
for(int j = 0; j<YDIM; j++){
for(int i = 0; i<XDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = hin[(i+j*XDIM)+l *XDIM*YDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
output<<i<<", "<<j<<", "<<(ZDIM/GPU_N*(GPU+1)-1)<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velAv[1][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<","<<velAv[2][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<", "
<<velFluc[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velFluc[0][i+j*XDIM+(ZDIM-1)*XDIM*YDIM]<<","<<velFluc[2][i+j*XDIM+(ZDIM/GPU_N-1)*XDIM*YDIM]<<","<<0<<endl;
}}
}
void WriteResultsLR(ostream &output, ostream &outputslice, float *fin, float *gin, float *hin, float **velAv,
float **velFluc, float omega, int GPU_N, int GPU)
{
float f[19];
output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
output<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<ZLRDIM/GPU_N<<"\n";
if(GPU == 0){
outputslice<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"velAv[0]\",\"velAv[1]\",\"velAv[2]\",\"ufluc\",\"vfluc\",\"wfluc\",\"Smag\"\n";
outputslice<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<1<<"\n";
}
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = gin[(i+j*XLRDIM)+l *XLRDIM*YLRDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*GPU);
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XLRDIM]<<","<<velAv[1][i+j*XLRDIM]<<","<<velAv[2][i+j*XLRDIM]
<<", "<<velFluc[0][i+j*XLRDIM]<<","<<velFluc[1][i+j*XLRDIM]<<","<<velFluc[2][i+j*XLRDIM]
<<","<<0<<endl;
}}
for(int k = 1; k<ZLRDIM/GPU_N-1; k++){
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = fin[(i+j*XLRDIM)+(k-1)*XLRDIM*YLRDIM+l*XLRDIM*YLRDIM*(ZLRDIM/GPU_N-2)];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*GPU+k);
float m[19] = {0};
Moments_host(f,m);
float omega = 1.0f/(3.0f*(UMAX*OBSTR1*2.f/RE)+0.5f);
//float omega2 = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
m[9] -= 2.f*u*u-(v*v+w*w);
m[11]-= v*v-w*w;
m[13]-= u*v;
m[14]-= v*w;
m[15]-= u*w;
float PI11 = -0.5f *(m[ 9]);
float PI22 = -(-38.f*m[ 9]-3.0f*m[11])/76.f;
float PI33 = -(-38.f*m[ 9]+3.0f*m[11])/76.f;
float PI12 = -1.5f*m[13];
float PI23 = -1.5f*m[14];
float PI13 = -1.5f*m[15];
//we know Smag on coarse mesh
float Smag = sqrt(2.f*(PI11*PI11+PI22*PI22+PI33*PI33+2.f*PI12*PI12+2.f*PI23*PI23+2.f*PI13*PI13))/LRFACTOR;
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv [0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velAv [1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "<<velAv [2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<Smag<<endl;
if(k == 3 && GPU == 0){
outputslice<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv [0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velAv [1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "<<velAv [2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+k*XLRDIM*YLRDIM]<<","<<Smag<<endl;
}
}}}
for(int j = 0; j<YLRDIM; j++){
for(int i = 0; i<XLRDIM; i++){
float rho = 0;
for(int l = 0; l<19; l++){
f[l] = hin[(i+j*XLRDIM)+l *XLRDIM*YLRDIM];
rho += f[l];
}
float u = f[1]-f[3 ]+f[5 ]-f[6 ]-f[7 ]+f[8 ]+f[10]-f[12]+f[15]-f[17];
float v = f[2]-f[4 ]+f[5 ]+f[6 ]-f[7 ]-f[8 ]+f[11]-f[13]+f[16]-f[18];
float w = f[9]+f[10]+f[11]+f[12]+f[13]-f[14]-f[15]-f[16]-f[17]-f[18];
float x = LRX0+LRFACTOR*i;
float y = LRY0+LRFACTOR*j;
float z = LRZ0+LRFACTOR*(ZLRDIM/GPU_N*(GPU+1)-1);
output<<x<<", "<<y<<", "<<z<<", "<<u<<","<<v<<","<<w<<","<<rho<<","
<<velAv[0][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velAv[1][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<", "<<velAv[2][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<", "
<<velFluc[0][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velFluc[1][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<velFluc[2][i+j*XLRDIM+(ZLRDIM/GPU_N-1)*XLRDIM*YLRDIM]<<","<<0<<endl;
}}
}
void WriteForces(float **F, ofstream &output, int ForceTime, int level)
{
float ref = UMAX*UMAX*ZDIM*OBSTR1;
if(level > 0)
ref *= LRLEVEL*LRLEVEL;
for(int i = 0; i<ForceTime; i++){
output<<i+STARTF<<", "<<F[0][i]/ref<<", "<<F[1][i]/ref<<", "<<F[2][i]/ref<<endl;
}
}
void WriteAvV(float *v, ofstream &output)
{
for(int i = 0; i<TMAX; i++){
output<<i<<", "<<v[i]/(XDIM-2)/ZDIM<<endl;
}
}
void WriteInputs(ostream &output, float omega, float omegaLR, int GPU_per_node)
{
output<<"Base domain size \t"<<XDIM<<"x"<<YDIM<<"x"<<ZDIM<<endl;
output<<"Base blocksize: \t"<<BLOCKSIZEX<<"x"<<BLOCKSIZEY<<"x"<<BLOCKSIZEZ<<endl;
output<<"Obst1 location: \t("<<OBSTX1<<","<<OBSTY1<<","<<OBSTZ1<<")"<<endl;
output<<"Obst1 radius: \t"<<OBSTR1<<endl;
output<<"Obst2 location: \t("<<OBSTX2<<","<<OBSTY2<<","<<OBSTZ2<<")"<<endl;
output<<"Obst2 radius: \t"<<OBSTR2<<endl;
output<<"RE: \t"<<RE<<endl;
output<<"UMAX: \t"<<UMAX<<endl;
output<<"omega \t: "<<omega<<endl;
output<<"DPDY \t: "<<DPDY<<endl;
output<<"TMAX: \t"<<TMAX<<endl;
output<<"STARTF: \t"<<STARTF<<endl;
output<<"START_VELAV: \t"<<START_VELAV<<endl;
output<<"START_VELFLUC: \t"<<START_VELFLUC<<endl;
output<<"REFINEMENT: \t"<<REFINEMENT<<endl;
output<<"MODEL: \t"<<MODEL<<endl;
output<<"Smagorinsky LES: \t"<<SmagLES<<endl;
output<<"CS: \t"<<CS<<endl;
output<<"LR domain size \t"<<XLRDIM<<"x"<<YLRDIM<<"x"<<ZLRDIM<<endl;
output<<"LR factor \t"<<LRFACTOR<<endl;
output<<"LR location \t"<<LRX0<<"x"<<LRY0<<"x"<<LRZ0<<endl;
output<<"LR blocksize: \t"<<BLOCKSIZELRX<<"x"<<BLOCKSIZELRY<<"x"<<BLOCKSIZELRZ<<endl;
output<<"omega in LR \t: "<<omegaLR<<endl;
output<<"GPUs per node \t: "<<GPU_per_node<<endl;
}
int main(int argc, char *argv[])
{
int GPU_N; cudaGetDeviceCount(&GPU_N);
GPU_N=NUMGPU;
cout<<"number of GPUs: "<<GPU_N<<endl;
ofstream output; ofstream outputForce; ofstream outputInputs; ofstream outputAvV;
string FileName = CASENAME;
output.open ((FileName+".dat").c_str());
outputForce.open ((FileName+".force").c_str());
outputInputs.open ((FileName+".inputs").c_str());
outputAvV.open ((FileName+".vel").c_str());
ofstream outputpart[REFINEMENT*GPU_N+GPU_N], outputslice;
for(int i = 0; i< REFINEMENT*GPU_N+GPU_N; i++){
//string filenum = to_string(i);
char str[10];
snprintf(str,10,"%i",i);
outputpart[i].open ((FileName+"_part"+str+".dat").c_str());
}
outputslice.open ((FileName+"_slice.dat").c_str());
//size_t memsize, memsize2;
size_t pitch = 2;
while(pitch<XDIM)
pitch=pitch*2;
pitch *= sizeof(float);//pitch*sizeof(float);
size_t pitch_e = pitch/sizeof(float);
cout<<"Pitch (in elements): "<<pitch/sizeof(float)<<endl;
float CharLength = OBSTR1*2.f;
float omega = 1.0f/(3.0f*(UMAX*CharLength/RE)+0.5f);
float omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omega-1.0f));
if(LRFACTOR == 0.25f){
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
}
if(LRFACTOR == 0.125f){
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
omegaLR = 2.0f/(1.0f+2.0f*(2.0f/omegaLR-1.0f));
}
float SF_cf = omega*(1.0f-omegaLR)/((1.0f-omega)*omegaLR/LRFACTOR);
float SF_fc = 1.f/SF_cf;
cout<<SF_cf<<endl;
WriteInputs(outputInputs,omega,omegaLR,GPU_N);
WriteInputs(cout,omega,omegaLR,GPU_N);
if(abs(LRFACTOR-1.f/LRLEVEL)>0.001f && REFINEMENT == 1){
cout<<"LRLEVEL and LRFACTOR don't match! Exiting..."<<endl;
return 0;
}
int zInner = ZDIM/GPU_N-2; //excluding halo
int ForceTime = max(0,TMAX-STARTF);
dim3 threads(BLOCKSIZEX, BLOCKSIZEY, BLOCKSIZEZ);
//2 halo layers per GPU (for 2 GPUs)
dim3 orig_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),(zInner)/BLOCKSIZEZ);
dim3 orig_g_grid(((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),1);
dim3 AvV_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),1,(ZDIM/GPU_N)/BLOCKSIZEZ);
dim3 Pre_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((DYNY1+1+BLOCKSIZEY-1)/BLOCKSIZEY),(zInner)/BLOCKSIZEZ);
dim3 Pre_g_grid (((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((DYNY1+1+BLOCKSIZEY-1)/BLOCKSIZEY),1);
dim3 grid = orig_grid;
dim3 g_grid = orig_g_grid;
cudaStream_t stream_halo[GPU_N];
cudaStream_t stream_inner[GPU_N];
//data pointers as 3D array (GPUxCoord)
float *f_h[GPU_N], *g_h[GPU_N], *h_h[GPU_N];
float *f_d[GPU_N][2], *g_d[GPU_N][2], *h_d[GPU_N][2];
float *g_temp[GPU_N], *h_temp[GPU_N];
float *F_h[GPU_N][3];
float *F_d[GPU_N][3];
float *F_total[3];
float *velAv_h[GPU_N][3],*velFluc_h[GPU_N][3];
float *velAv_d[GPU_N][3],*velFluc_d[GPU_N][3];
float *Av_V_h[GPU_N];
float *Av_V_d[GPU_N];
float dpdy = DPDY;
for(int i = 0; i<3; i++)
F_total[i] = (float *)malloc(ForceTime*sizeof(float));
for(int i=0;i<3;i++)
for(int j=0;j<(ForceTime);j++)
F_total[i][j] = 0;
//Malloc and Initialize for each GPU
for(int n = 0; n<GPU_N; n++){
f_h [n] = (float *)malloc(XDIM*YDIM*zInner*19*sizeof(float));
g_h [n] = (float *)malloc(XDIM*YDIM* 19*sizeof(float));
h_h [n] = (float *)malloc(XDIM*YDIM* 19*sizeof(float));
for(int i = 0; i<3; i++){
F_h [n][i] = (float *)malloc(ForceTime*sizeof(float));
velAv_h [n][i] = (float *)malloc(XDIM*YDIM*ZDIM/GPU_N*sizeof(float));
velFluc_h[n][i] = (float *)malloc(XDIM*YDIM*ZDIM/GPU_N*sizeof(float));
}
Av_V_h[n] = (float *)malloc(TMAX*sizeof(float));
cudaSetDevice(n);
cudaStreamCreate(&stream_halo[n]);
cudaStreamCreate(&stream_inner[n]);
for(int m = 0; m<GPU_N; m++)
if(m != n) cudaDeviceEnablePeerAccess(m,0);
for(int i = 0; i<2; i++){
cudaMalloc((void **) &f_d[n][i], pitch_e*YDIM*zInner*19*sizeof(float));
cudaMalloc((void **) &g_d[n][i], pitch_e*YDIM* 19*sizeof(float));
cudaMalloc((void **) &h_d[n][i], pitch_e*YDIM* 19*sizeof(float));
}
cudaMalloc((void **) & g_temp[n], pitch_e*YDIM* 19*sizeof(float));
cudaMalloc((void **) & h_temp[n], pitch_e*YDIM* 19*sizeof(float));
for(int i = 0; i<3; i++){
cudaMalloc((void **) & F_d [n][i], (ForceTime)*sizeof(float));
cudaMalloc((void **) & velAv_d [n][i], pitch_e*YDIM*ZDIM/GPU_N*sizeof(float));
cudaMalloc((void **) & velFluc_d[n][i], pitch_e*YDIM*ZDIM/GPU_N*sizeof(float));
}
cudaMalloc((void **) & Av_V_d[n],TMAX*sizeof(float));
//initialize host f_inner
for (int i = 0; i < XDIM*YDIM*zInner*19; i++)
f_h[n][i] = 0;
//initialize host g,h
for (int i = 0; i < XDIM*YDIM*19; i++){
g_h[n][i] = 0;
h_h[n][i] = 0;
}
for(int i=0;i<3;i++){
for(int j=0;j<(ForceTime);j++)
F_h[n][i][j] = 0;
for (int j = 0; j < XDIM*YDIM*ZDIM/GPU_N; j++){
velAv_h [n][i][j] = 0;
velFluc_h[n][i][j] = 0;
}
}
for(int j=0;j<(ForceTime);j++)
Av_V_h[n][j] = 0;
for(int i = 0; i<2; i++){
cudaMemcpy2D(f_d[n][i],pitch,f_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*zInner*19,cudaMemcpyHostToDevice);
cudaMemcpy2D(g_d[n][i],pitch,g_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM *19,cudaMemcpyHostToDevice);
cudaMemcpy2D(h_d[n][i],pitch,h_h[n],XDIM*sizeof(float),XDIM*sizeof(float),YDIM *19,cudaMemcpyHostToDevice);
}
for(int i = 0; i<3; i++){
cudaMemcpy2D(velAv_d [n][i],pitch,velAv_h [n][i],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*ZDIM/GPU_N,cudaMemcpyHostToDevice);
cudaMemcpy2D(velFluc_d[n][i],pitch,velFluc_h[n][i],XDIM*sizeof(float),XDIM*sizeof(float),YDIM*ZDIM/GPU_N,cudaMemcpyHostToDevice);
cudaMemcpy(F_d[n][i],F_h[n][i],sizeof(float)*(ForceTime),cudaMemcpyHostToDevice);
}
cudaMemcpy(Av_V_d[n],Av_V_h[n],sizeof(float)*(TMAX),cudaMemcpyHostToDevice);
//initialization kernels
for(int i = 0; i<2; i++){
initialize<<< grid,threads>>>(f_d[n][i],pitch_e,zInner,GPU_N);
initialize<<<g_grid,threads>>>(g_d[n][i],pitch_e, 1,GPU_N);
initialize<<<g_grid,threads>>>(h_d[n][i],pitch_e, 1,GPU_N);
}
initialize<<<g_grid,threads>>>(g_temp[n],pitch_e, 1,GPU_N);
initialize<<<g_grid,threads>>>(h_temp[n],pitch_e, 1,GPU_N);
}//end Malloc and Initialize
//data pointers as 3D array (GPUxCoord)
float *f_LR_h[GPU_N], *g_LR_h[GPU_N], *h_LR_h[GPU_N];
float *f_LR_d[GPU_N][2], *g_LR_d[GPU_N][2], *h_LR_d[GPU_N][2];
float *g_LR_temp[GPU_N], *h_LR_temp[GPU_N];
float *velAv_LR_h[GPU_N][3],*velFluc_LR_h[GPU_N][3];
float *velAv_LR_d[GPU_N][3],*velFluc_LR_d[GPU_N][3];
float *f_interp[GPU_N], *g_interp[GPU_N], *h_interp[GPU_N], *g_interp_temp[GPU_N], *h_interp_temp[GPU_N];
float *interp_h[GPU_N];
size_t pitchLR = 2;
while(pitchLR<XLRDIM)
pitchLR=pitchLR*2;
pitchLR = pitchLR*sizeof(float);
size_t pitchLR_e = pitchLR/sizeof(float);
cout<<"LR Pitch (in elements): "<<pitchLR_e<<endl;
size_t pitchInterp = 2;
while(pitchInterp<XLRDIM*LRFACTOR+1)
pitchInterp=pitchInterp*2;
pitchInterp = pitchInterp*sizeof(float);
size_t pitchInterp_e = pitchInterp/sizeof(float);
cout<<"Interp Pitch (in elements): "<<pitchInterp_e<<endl;
int zLRInner = ZLRDIM/GPU_N-2;
dim3 LR_threads(BLOCKSIZELRX, BLOCKSIZELRY, BLOCKSIZELRZ);
dim3 LR_grid(((XLRDIM+BLOCKSIZELRX-1)/BLOCKSIZELRX),((YLRDIM+BLOCKSIZELRY-1)/BLOCKSIZELRY),(zLRInner)/BLOCKSIZELRZ);
dim3 g_LR_grid(((XLRDIM+BLOCKSIZELRX-1)/BLOCKSIZELRX),((YLRDIM+BLOCKSIZELRY-1)/BLOCKSIZELRY),1);
dim3 Interp_threads(BLOCKSIZEINTERP, LRLEVEL, LRLEVEL);
dim3 Interp_grid(((XLRDIM+BLOCKSIZEINTERP-1)/BLOCKSIZEINTERP),((YLRDIM+LRLEVEL-1)/LRLEVEL),ZLRDIM/LRLEVEL/GPU_N);
cout<<((XLRDIM+BLOCKSIZEINTERP-1)/BLOCKSIZEINTERP)<<", "<<((YLRDIM+LRLEVEL-1)/LRLEVEL)<<", "<<ZLRDIM/LRLEVEL/GPU_N<<endl;
dim3 Interp_grid_c(((XDIM+BLOCKSIZEX-1)/BLOCKSIZEX),((YDIM+BLOCKSIZEY-1)/BLOCKSIZEY),(ZDIM/GPU_N)/BLOCKSIZEZ);
//setup LR
if(REFINEMENT == 1){
for(int n = 0; n<GPU_N; n++){
f_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM*zLRInner*19*sizeof(float));
g_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM* 19*sizeof(float));
h_LR_h [n] = (float *)malloc(XLRDIM*YLRDIM* 19*sizeof(float));
interp_h [n] = (float *)malloc((XLRDIM*LRFACTOR+1)*(YLRDIM*LRFACTOR+1)*zInner*19*sizeof(float));
for(int i = 0; i<3; i++){
velAv_LR_h [n][i] = (float *)malloc(XLRDIM*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
velFluc_LR_h[n][i] = (float *)malloc(XLRDIM*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
}
cudaSetDevice(n);
for(int i = 0; i<2; i++){
cudaMalloc((void **) &f_LR_d[n][i], pitchLR_e*YLRDIM*zLRInner*19*sizeof(float));
cudaMalloc((void **) &g_LR_d[n][i], pitchLR_e*YLRDIM* 19*sizeof(float));
cudaMalloc((void **) &h_LR_d[n][i], pitchLR_e*YLRDIM* 19*sizeof(float));
}
cudaMalloc((void **) & g_LR_temp[n], pitchLR_e*YLRDIM* 19*sizeof(float));
cudaMalloc((void **) & h_LR_temp[n], pitchLR_e*YLRDIM* 19*sizeof(float));
cudaMalloc((void **) & f_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*zInner*19*sizeof(float));
cudaMalloc((void **) & g_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
cudaMalloc((void **) & h_interp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
cudaMalloc((void **) & g_interp_temp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
cudaMalloc((void **) & h_interp_temp[n], pitchInterp_e*(YLRDIM*LRFACTOR+1)*19*sizeof(float));
for(int i = 0; i<3; i++){
cudaMalloc((void **) & velAv_LR_d [n][i], pitchLR_e*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
cudaMalloc((void **) & velFluc_LR_d[n][i], pitchLR_e*YLRDIM*ZLRDIM/GPU_N*sizeof(float));
}
for (int i = 0; i < XLRDIM*YLRDIM*zLRInner*19; i++)
f_LR_h[n][i] = 0;
//initialize host g,h
for (int i = 0; i < XLRDIM*YLRDIM*19; i++){
g_LR_h[n][i] = 0;
h_LR_h[n][i] = 0;
}
for(int i=0;i<3;i++){
for (int j = 0; j < XLRDIM*YLRDIM*ZLRDIM/GPU_N; j++){
velAv_LR_h [n][i][j] = 0;
velFluc_LR_h[n][i][j] = 0;
}
}
for(int i = 0; i<2; i++){
cudaMemcpy2D(f_LR_d[n][i],pitchLR,f_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*zLRInner*19,cudaMemcpyHostToDevice);
cudaMemcpy2D(g_LR_d[n][i],pitchLR,g_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM *19,cudaMemcpyHostToDevice);
cudaMemcpy2D(h_LR_d[n][i],pitchLR,h_LR_h[n],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM *19,cudaMemcpyHostToDevice);
}
for(int i = 0; i<3; i++){
cudaMemcpy2D(velAv_LR_d [n][i],pitchLR,velAv_LR_h [n][i],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,cudaMemcpyHostToDevice);
cudaMemcpy2D(velFluc_LR_d[n][i],pitchLR,velFluc_LR_h[n][i],XLRDIM*sizeof(float),XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,cudaMemcpyHostToDevice);
}
//initialization kernels
for(int i = 0; i<2; i++){
initializeLR<<< LR_grid,LR_threads>>>(f_LR_d[n][i],pitchLR_e,zLRInner,GPU_N);
initializeLR<<<g_LR_grid,LR_threads>>>(g_LR_d[n][i],pitchLR_e, 1,GPU_N);
initializeLR<<<g_LR_grid,LR_threads>>>(h_LR_d[n][i],pitchLR_e, 1,GPU_N);
}
initializeLR<<<g_LR_grid,LR_threads>>>(g_LR_temp[n],pitchLR_e, 1,GPU_N);
initializeLR<<<g_LR_grid,LR_threads>>>(h_LR_temp[n],pitchLR_e, 1,GPU_N);
}//end of GPU loop for malloc and initialize for LR
}//end of LR malloc and initialize
cudaFuncSetCacheConfig(InterpCF,cudaFuncCachePreferShared);
int A = 0; int B = 1; int C = 0; int D = 1;
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
size_t mem_avail, mem_total;
cudaMemGetInfo(&mem_avail,&mem_total);
cout<<"Device memory used for dev"<<n<<" : "<<(mem_total-mem_avail)*pow(10,-9)<<" GB\n";
cout<<"Device memory available for dev"<<n<<" : "<<(mem_avail)*pow(10,-9)<<" GB\n";
}
struct timeval tdr0,tdr1;
double restime;
cudaDeviceSynchronize();
gettimeofday (&tdr0,NULL);
//time loop
for(int t = 0; t<TMAX; t++)
{
//compute for periodic domain only by using restricted grid
if(t<PRERUN) {
grid = Pre_grid;
g_grid = Pre_g_grid;
}
else {
if(t == PRERUN) cout<<"finished prerun"<<endl;
grid = orig_grid;
g_grid = orig_g_grid;
}
//copy temporary array for top and bottom on coarse mesh to neighbor GPU. Only transfering 5 distbs
for(int n = 0; n<GPU_N; n++)
cudaMemcpyPeerAsync(&h_temp[n][0],n,&g_d[ (n+1)%GPU_N][A][0], (n+1)%GPU_N,pitch_e*YDIM*sizeof(float)*19,stream_halo[n]);
for(int n = 0; n<GPU_N; n++)
cudaMemcpyPeerAsync(&g_temp[n][0],n,&h_d[abs(n-1)%GPU_N][A][0],abs(n-1)%GPU_N,pitch_e*YDIM*sizeof(float)*19,stream_halo[n]);
//compute inner nodes on coarse mesh
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
update_inn<<<grid,threads,0,stream_inner[n]>>>(f_d[n][B],f_d[n][A],g_d[n][A], h_d[n][A],omega,pitch_e,n,zInner,velAv_d[n][0],velAv_d[n][1],velAv_d[n][2],velFluc_d[n][0],velFluc_d[n][1],velFluc_d[n][2],F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),f_interp[n],pitchInterp_e,dpdy);
}
//synchronize halo stream before computing top and bottom nodes
for(int n = 0; n<GPU_N; n++)
cudaStreamSynchronize(stream_halo[n]);
//compute top and bottom nodes
for(int n = 0; n<GPU_N; n++)
{
cudaSetDevice(n);
update_top<<<g_grid, threads, 0, stream_halo [n]>>>(h_d[n][B],h_d[n][A],f_d[n][A],h_temp[n],omega,pitch_e,n,zInner,F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),h_interp[n],pitchInterp_e,dpdy);
update_bot<<<g_grid, threads, 0, stream_halo [n]>>>(g_d[n][B],g_d[n][A],f_d[n][A],g_temp[n],omega,pitch_e,n,zInner,F_d[n][0],F_d[n][1],F_d[n][2],t,(!REFINEMENT&&t>STARTF),g_interp[n],pitchInterp_e,dpdy);
}
if(t%100 == 0 && t>10000)
{
for(int n = 0; n<GPU_N; n++)
cudaDeviceSynchronize();
for(int n = 0; n<GPU_N; n++)
{
AverageV<<<AvV_grid, threads>>>(f_d[n][B],g_d[n][B],h_d[n][B],pitch_e,n,zInner,Av_V_d[n],t);
}
for(int n = 0; n<GPU_N; n++)
cudaMemcpy(&Av_V_h[n][t],&Av_V_d[n][t],sizeof(float),cudaMemcpyDeviceToHost);
float Av_V = 0;
for(int n = 0; n<GPU_N; n++)
Av_V += Av_V_h[n][t];
Av_V /= HEIGHT*ZDIM;
float diff;
diff = (Av_V-UMAX)/UMAX;
dpdy += diff*KP*abs(DPDY);
//dpdy = max(DPDY*)
// if(Av_V < UMAX*0.995f)
// dpdy *= 1.01f;
// else if(Av_V > UMAX*1.005f)
// dpdy *= 0.99f;
if(t%1000 == 0) outputAvV<<t<<", "<<Av_V<<", "<<dpdy<<endl;
}
//cudaDeviceSynchronize();
swap(A,B);
if(REFINEMENT == 1){
int flag_F = 0;
for(int i = 0; i<LRLEVEL; i++){
if(t>STARTF && i == 0) flag_F = 1;
else flag_F = 0;
for(int n = 0; n<GPU_N; n++){
cudaMemcpyPeerAsync(&h_LR_temp[n][pitchLR_e*YLRDIM],n,&g_LR_d[ (n+1)%GPU_N][C][pitchLR_e*YLRDIM], (n+1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
cudaMemcpyPeerAsync(&g_LR_temp[n][pitchLR_e*YLRDIM],n,&h_LR_d[abs(n-1)%GPU_N][C][pitchLR_e*YLRDIM],abs(n-1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
update_inn_LR<<<LR_grid,LR_threads,0,stream_inner[n]>>>(f_LR_d[n][D],f_LR_d[n][C],g_LR_d[n][C], h_LR_d[n][C],omegaLR,pitchLR_e,n,zLRInner,velAv_LR_d[n][0],velAv_LR_d[n][1],velFluc_LR_d[n][0],velFluc_LR_d[n][1],F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
}
for(int n = 0; n<GPU_N; n++)
cudaStreamSynchronize(stream_halo[n]);
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
update_top_LR<<<g_LR_grid,LR_threads,0,stream_halo[n]>>>(h_LR_d[n][D],h_LR_d[n][C],f_LR_d[n][C],h_LR_temp[n],omegaLR,pitchLR_e,n,zLRInner,F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
update_bot_LR<<<g_LR_grid,LR_threads,0,stream_halo[n]>>>(g_LR_d[n][D],g_LR_d[n][C],f_LR_d[n][C],g_LR_temp[n],omegaLR,pitchLR_e,n,zLRInner,F_d[n][0],F_d[n][1],F_d[n][2],t,flag_F,dpdy);
}
if(i == LRLEVEL-1)
{
for(int n = 0; n<GPU_N; n++)
//cudaMemcpyPeerAsync(&h_interp_temp[n][0],n,&g_interp[ (n+1)%GPU_N][0], (n+1)%GPU_N,pitchInterp_e*(YLRDIM*LRFACTOR+1)*sizeof(float)*9,stream_halo[n]);
for(int n = 0; n<GPU_N; n++)
cudaMemcpyPeerAsync(&g_interp_temp[n][0],n,&h_interp[abs(n-1)%GPU_N][0],abs(n-1)%GPU_N,pitchInterp_e*(YLRDIM*LRFACTOR+1)*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
cudaDeviceSynchronize();
}
flag_F = 0;
swap(C,D);
}
//interp from coarse grid
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
InterpCF<<<Interp_grid,Interp_threads,0,stream_inner[n]>>>(f_LR_d[n][C],g_LR_d[n][C],h_LR_d[n][C],pitchLR_e,f_interp[n],g_interp[n],h_interp[n],g_interp_temp[n],pitchInterp_e,SF_cf,omega,n,zInner,zLRInner);
//cudaDeviceSynchronize();
}
//interp from fine grid
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
cudaMemcpyPeerAsync(&h_LR_temp[n][0],n,&g_LR_d[ (n+1)%GPU_N][C][0], (n+1)%GPU_N,pitchLR_e*YLRDIM*sizeof(float)*19,stream_halo[n]);
}
for(int n = 0; n<GPU_N; n++)
cudaStreamSynchronize(stream_halo[n]);
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
InterpFC<<<Interp_grid_c,threads,0,stream_halo[n]>>>(f_d[n][A],g_d[n][A],h_d[n][A],f_LR_d[n][C],h_LR_d[n][C],h_LR_temp[n],pitch_e,pitchLR_e,SF_fc,omegaLR,n,zInner,zLRInner);
}
}//end refinement
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
cudaDeviceSynchronize();
}
}//end time loop
cudaDeviceSynchronize();
gettimeofday (&tdr1,NULL);
timeval_subtract (&restime, &tdr1, &tdr0);
int Nodes;
Nodes = XDIM*YDIM*ZDIM;
if (REFINEMENT == 1)
Nodes += XLRDIM*YLRDIM*ZLRDIM*LRLEVEL;
cout<<"Time taken for main kernel: "<<restime<<" ("
<<double(Nodes*double(TMAX/1000000.f))/restime<<"MLUPS)\n";
//D2H Memcpy and write results
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
cudaMemcpy2D(f_h[n],XDIM*sizeof(float),f_d[n][A],pitch,XDIM*sizeof(float),YDIM*zInner*19,cudaMemcpyDeviceToHost);
cudaMemcpy2D(g_h[n],XDIM*sizeof(float),g_d[n][A],pitch,XDIM*sizeof(float),YDIM *19,cudaMemcpyDeviceToHost);
cudaMemcpy2D(h_h[n],XDIM*sizeof(float),h_d[n][A],pitch,XDIM*sizeof(float),YDIM *19,cudaMemcpyDeviceToHost);
for(int i = 0; i<3; i++){
cudaMemcpy2D( velAv_h[n][i],XDIM*sizeof(float),velAv_d[n][i],pitch,XDIM*sizeof(float),YDIM*ZDIM/GPU_N,cudaMemcpyDeviceToHost);
cudaMemcpy2D(velFluc_h[n][i],XDIM*sizeof(float),velFluc_d[n][i],pitch,XDIM*sizeof(float),YDIM*ZDIM/GPU_N,cudaMemcpyDeviceToHost);
cudaMemcpy(F_h[n][i],F_d[n][i],sizeof(float)*ForceTime,cudaMemcpyDeviceToHost);
}
cudaMemcpy(Av_V_h[n],Av_V_d[n],sizeof(float)*TMAX,cudaMemcpyDeviceToHost);
WriteResults(outputpart[n],outputslice,f_h[n],g_h[n],h_h[n],velAv_h[n],velFluc_h[n],omega,GPU_N,n);
outputpart[n]<<endl;
for(int i=0;i<3;i++)
for(int j=0;j<ForceTime;j++)
F_total[i][j] += F_h[n][i][j];
if(n > 0){
for(int j=0;j<TMAX;j++)
Av_V_h[0][j] += Av_V_h[n][j];
}
for(int i = 0; i<2; i++){
cudaFree(f_d[n][i]);
cudaFree(g_d[n][i]);
cudaFree(h_d[n][i]);
}
cudaFree(f_d[n]);
cudaFree(g_d[n]);
cudaFree(h_d[n]);
cudaFree(g_temp[n]);
cudaFree(h_temp[n]);
for(int i=0;i<3;i++)
cudaFree(F_d[n][i]);
cudaFree(F_d[n]);
}//end Memcpy and write results
WriteForces(F_total,outputForce,ForceTime,REFINEMENT*LRLEVEL);
//WriteAvV(Av_V_h[0],outputAvV);
if(REFINEMENT == 1){
// output<<"VARIABLES = \"X\",\"Y\",\"Z\",\"u\",\"v\",\"w\",\"rho\",\"uAv\",\"vAv\",\"ufluc\",\"vfluc\"\n";
// output<<"ZONE F=POINT, I="<<XLRDIM<<", J="<<YLRDIM<<", K="<<ZLRDIM<<"\n";
for(int n = 0; n<GPU_N; n++){
cudaSetDevice(n);
cudaMemcpy2D(f_LR_h[n],XLRDIM*sizeof(float),f_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM*zLRInner*19,cudaMemcpyDeviceToHost);
cudaMemcpy2D(g_LR_h[n],XLRDIM*sizeof(float),g_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM *19,cudaMemcpyDeviceToHost);
cudaMemcpy2D(h_LR_h[n],XLRDIM*sizeof(float),h_LR_d[n][C],pitchLR,XLRDIM*sizeof(float),YLRDIM *19,cudaMemcpyDeviceToHost);
//cudaMemcpy2D(interp_h[n],(XLRDIM*LRFACTOR+1)*sizeof(float),f_interp[n],pitchInterp,(XLRDIM*LRFACTOR+1)*sizeof(float),(YLRDIM*LRFACTOR+1)*zInner*9,cudaMemcpyDeviceToHost);
for(int i = 0; i<3; i++){
cudaMemcpy2D( velAv_LR_h[n][i],XLRDIM*sizeof(float),velAv_LR_d[n][i],pitchLR,XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,cudaMemcpyDeviceToHost);
cudaMemcpy2D(velFluc_LR_h[n][i],XLRDIM*sizeof(float),velFluc_LR_d[n][i],pitchLR,XLRDIM*sizeof(float),YLRDIM*ZLRDIM/GPU_N,cudaMemcpyDeviceToHost);
}
WriteResultsLR(outputpart[GPU_N+n],outputslice,f_LR_h[n],g_LR_h[n],h_LR_h[n],velAv_LR_h[n],velFluc_LR_h[n],omegaLR,GPU_N,n);
outputpart[GPU_N+n]<<endl;
for(int i = 0; i<2; i++){
cudaFree(f_LR_d[n][i]);
cudaFree(g_LR_d[n][i]);
cudaFree(h_LR_d[n][i]);
}
cudaFree(f_LR_d[n]);
cudaFree(g_LR_d[n]);
cudaFree(h_LR_d[n]);
cudaFree(g_LR_temp[n]);
cudaFree(h_LR_temp[n]);
}
}
return 0;
}
|
e22aec787aaa4ca2680717388643568f08c19087.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/AccumulateType.h>
#include <ATen/native/Pool.h>
#include <ATen/hip/HIPContext.h>
#include <ATen/hip/HIPApplyUtils.cuh>
#include <ATen/hip/detail/TensorInfo.cuh>
#include <ATen/hip/detail/IndexUtils.cuh>
#include <ATen/hip/detail/KernelUtils.h>
#include <THH/THHAtomics.cuh>
#include <THH/THHNumerics.cuh>
#include <c10/macros/Macros.h>
namespace at {
namespace native {
namespace {
__device__ inline int min(int a, int b) {
return a <= b ? a : b;
}
__device__ inline int max(int a, int b) {
return a >= b ? a : b;
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_output(
PackedTensorAccessor64<scalar_t, 4> input,
PackedTensorAccessor64<scalar_t, 4> output,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % output.size(1); // output frame/time
int slice = (blockIdx.z + offsetZ) / output.size(1); // output slice/feature
if (oRow < output.size(2) && oCol < output.size(3))
{
accscalar_t sum = 0.0;
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, input.size(1) + padT);
int hend = min(hstart + kH, input.size(2) + padH);
int wend = min(wstart + kW, input.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, input.size(1));
hend = min(hend, input.size(2));
wend = min(wend, input.size(3));
if (tstart >= tend || hstart >= hend || wstart >= wend) {
output[slice][oFrame][oRow][oCol] = scalar_t(0);
return;
}
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
int ti, hi, wi;
for (ti = tstart; ti < tend; ++ti)
{
for (hi = hstart; hi < hend; ++hi)
{
for (wi = wstart; wi < wend; ++wi)
{
scalar_t val = input[slice][ti][hi][wi];
sum += val;
}
}
}
output[slice][oFrame][oRow][oCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum / divide_factor);
}
}
// Inner-most loop size (kW) passed as template parameter for
// performance reasons.
//
template<int KERNEL_WIDTH, typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_output(
PackedTensorAccessor64<scalar_t, 4> input,
PackedTensorAccessor64<scalar_t, 4> output,
int kT, int kH,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % output.size(1); // output frame/time
int slice = (blockIdx.z + offsetZ) / output.size(1); // output slice/feature
if (oRow < output.size(2) && oCol < output.size(3))
{
accscalar_t sum = 0.0;
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, input.size(1) + padT);
int hend = min(hstart + kH, input.size(2) + padH);
int wend = min(wstart + KERNEL_WIDTH, input.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, input.size(1));
hend = min(hend, input.size(2));
wend = min(wend, input.size(3));
if (tstart >= tend || hstart >= hend || wstart >= wend) {
output[slice][oFrame][oRow][oCol] = scalar_t(0);
return;
}
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
int ti, hi, wi;
for (ti = tstart; ti < tend; ++ti)
{
for (hi = hstart; hi < hend; ++hi)
{
for (wi = wstart; wi < wend; ++wi)
{
scalar_t val = input[slice][ti][hi][wi];
sum += val;
}
}
}
output[slice][oFrame][oRow][oCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum / divide_factor);
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_single_backward_out_frame_stride1(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
accscalar_t normFactor,
int offsetZ)
{
int iCol = blockIdx.x * blockDim.x + threadIdx.x;
int iRow = blockIdx.y * blockDim.y + threadIdx.y;
int iFrame = (blockIdx.z + offsetZ) % gradInput.size(1); // input frame/time
int slice = (blockIdx.z + offsetZ) / gradInput.size(1); // input slice/feature
// guard against over-tiled threads
if (iRow < gradInput.size(2) && iCol < gradInput.size(3))
{
accscalar_t sum = 0.0;
scalar_t *gOut = &gradOutput[slice][max(0, iFrame - kT + 1)]
[max(0, iRow - kH + 1)][max(0, iCol - kW + 1)];
int frameOffset = 0;
for (int oFrame = max(0, iFrame - kT + 1);
oFrame < min(iFrame + 1, gradOutput.size(1));
++oFrame)
{
int rowOffset = frameOffset;
for (int oRow = max(0, iRow - kH + 1);
oRow < min(iRow + 1, gradOutput.size(2));
++oRow)
{
int colOffset = rowOffset;
for (int oCol = max(0, iCol - kW + 1);
oCol < min(iCol + 1, gradOutput.size(3));
++oCol)
{
sum += gOut[colOffset];
++colOffset;
}
rowOffset += gradOutput.size(3);
}
frameOffset += gradOutput.size(2) * gradOutput.size(3);
}
gradInput[slice][iFrame][iRow][iCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum * normFactor);
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_grad_input_atomic(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % gradOutput.size(1); // gradOutput frame/time
int slice = (blockIdx.z + offsetZ) / gradOutput.size(1); // gradOutput slice/feature
// guard against over-tiled threads
if (oRow < gradOutput.size(2) && oCol < gradOutput.size(3))
{
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, gradInput.size(1) + padT);
int hend = min(hstart + kH, gradInput.size(2) + padH);
int wend = min(wstart + kW, gradInput.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, gradInput.size(1));
hend = min(hend, gradInput.size(2));
wend = min(wend, gradInput.size(3));
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
scalar_t val = ScalarConvert<accscalar_t, scalar_t>::to(
ScalarConvert<scalar_t, accscalar_t>::to(gradOutput[slice][oFrame][oRow][oCol]) / divide_factor);
for (int iFrame = tstart; iFrame < tend; ++iFrame)
{
for (int iRow = hstart; iRow < hend; ++iRow)
{
for (int iCol = wstart; iCol < wend; ++iCol)
{
gpuAtomicAddNoReturn(&gradInput[slice][iFrame][iRow][iCol], val);
}
}
}
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_grad_input(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad, int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % gradOutput.size(1); // gradOutput frame/time
int slice = (blockIdx.z + offsetZ) / gradOutput.size(1); // gradOutput slice/feature
// guard against over-tiled threads
if (oRow < gradOutput.size(2) && oCol < gradOutput.size(3))
{
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, gradInput.size(1) + padT);
int hend = min(hstart + kH, gradInput.size(2) + padH);
int wend = min(wstart + kW, gradInput.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, gradInput.size(1));
hend = min(hend, gradInput.size(2));
wend = min(wend, gradInput.size(3));
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
scalar_t val = ScalarConvert<accscalar_t, scalar_t>::to(
ScalarConvert<scalar_t, accscalar_t>::to(gradOutput[slice][oFrame][oRow][oCol]) / divide_factor);
for (int iFrame = tstart; iFrame < tend; ++iFrame)
{
for (int iRow = hstart; iRow < hend; ++iRow)
{
for (int iCol = wstart; iCol < wend; ++iCol)
{
gradInput[slice][iFrame][iRow][iCol] = val;
}
}
}
}
}
#define LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(KW) case KW: \
hipLaunchKernelGGL(( avg_pool3d_cuda_update_output<KW, scalar_t, accscalar_t>) \
, dim3(grid), dim3(block), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(), \
work_input.packed_accessor64<scalar_t, 4>(), \
work_output.packed_accessor64<scalar_t, 4>(), \
kT, kH, \
dT, dH, dW, \
padT, padH, padW, \
count_include_pad, \
offsetZ, divisor); \
break
void avg_pool3d_out_cuda_template(
Tensor& output,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
TensorArg output_arg{ output, "output", 1 };
TensorArg input_arg{ input, "input", 2 };
checkAllSameGPU("avg_pool3d_out_cuda", {output_arg, input_arg});
// #20866, #22032: Guarantee this for the official C++ API?
TORCH_CHECK(kernel_size.size() == 1 || kernel_size.size() == 3,
"avg_pool3d: kernel_size must be a single int, or a tuple of three ints");
const int kT = safe_downcast<int, int64_t>(kernel_size[0]);
const int kH = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[1]);
const int kW = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[2]);
TORCH_CHECK(stride.empty() || stride.size() == 1 || stride.size() == 3,
"avg_pool3d: stride must be omitted, a single int, or a tuple of three ints");
const int dT = stride.empty() ? kT : safe_downcast<int, int64_t>(stride[0]);
const int dH = stride.empty() ? kH :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[1]);
const int dW = stride.empty() ? kW :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[2]);
TORCH_CHECK(padding.size() == 1 || padding.size() == 3,
"avg_pool3d: padding must be a single int, or a tuple of three ints");
const int padT = safe_downcast<int, int64_t>(padding[0]);
const int padH = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[1]);
const int padW = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[2]);
TORCH_CHECK((input.ndimension() == 4 || input.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for input");
// if divisor==0 then we will ignore it
int64_t divisor = 0;
if (divisor_override.has_value()) {
TORCH_CHECK(divisor_override.value() != 0, "divisor must be not zero");
divisor = divisor_override.value();
}
const int64_t nbatch = input.ndimension() == 5 ? input.size(-5) : 1;
const int64_t nslices = input.size(-4);
const int64_t itime = input.size(-3);
const int64_t iheight = input.size(-2);
const int64_t iwidth = input.size(-1);
const int64_t otime = pooling_output_shape<int64_t>(itime, kT, padT, dT, 1, ceil_mode);
const int64_t oheight = pooling_output_shape<int64_t>(iheight, kH, padH, dH, 1, ceil_mode);
const int64_t owidth = pooling_output_shape<int64_t>(iwidth, kW, padW, dW, 1, ceil_mode);
pool3d_shape_check(
input,
nslices,
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
1, 1, 1,
itime, iheight, iwidth,
otime, oheight, owidth,
/*check_input_size=*/ true);
if (input.ndimension() == 4) {
output.resize_({ nslices, otime, oheight, owidth});
}
else {
output.resize_({nbatch, nslices, otime, oheight, owidth});
}
Tensor work_input = input.contiguous();
Tensor work_output = output;
if (input.ndimension() == 5) {
// Collapse batch and feature dimensions.
work_input = work_input.reshape({nbatch * nslices, itime, iheight, iwidth});
work_output = work_output.reshape({nbatch * nslices, otime, oheight, owidth});
}
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16,
input.scalar_type(),
"avg_pool3d_out_cuda",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_out_cuda", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = otime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(owidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(oheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
switch (kW) {
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(1);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(2);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(3);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(4);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(5);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(6);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(7);
default:
hipLaunchKernelGGL(( avg_pool3d_cuda_update_output<scalar_t, accscalar_t>)
, dim3(grid), dim3(block), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(),
work_input.packed_accessor64<scalar_t, 4>(),
work_output.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
break;
}
AT_CUDA_CHECK(hipGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
#undef LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH
void avg_pool3d_backward_out_cuda_template(
Tensor& gradInput,
const Tensor& gradOutput,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
TensorArg gradInput_arg{ gradInput, "gradInput", 1 };
TensorArg gradOutput_arg{ gradOutput, "gradOutput", 2 };
TensorArg input_arg{ input, "input", 3 };
checkAllSameGPU("avg_pool3d_backward_out_cuda",
{gradInput_arg, gradOutput_arg, input_arg});
// #20866, #22032: Guarantee this for the official C++ API?
TORCH_CHECK(kernel_size.size() == 1 || kernel_size.size() == 3,
"avg_pool3d: kernel_size must be a single int, or a tuple of three ints");
const int kT = safe_downcast<int, int64_t>(kernel_size[0]);
const int kH = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[1]);
const int kW = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[2]);
TORCH_CHECK(stride.empty() || stride.size() == 1 || stride.size() == 3,
"avg_pool3d: stride must be omitted, a single int, or a tuple of three ints");
const int dT = stride.empty() ? kT : safe_downcast<int, int64_t>(stride[0]);
const int dH = stride.empty() ? kH :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[1]);
const int dW = stride.empty() ? kW :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[2]);
TORCH_CHECK(padding.size() == 1 || padding.size() == 3,
"avg_pool3d: padding must be a single int, or a tuple of three ints");
const int padT = safe_downcast<int, int64_t>(padding[0]);
const int padH = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[1]);
const int padW = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[2]);
TORCH_CHECK((input.ndimension() == 4 || input.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for input");
TORCH_CHECK((gradOutput.ndimension() == 4 || gradOutput.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for gradOutput");
// if divisor==0 then we will ignore it
int64_t divisor = 0;
if (divisor_override.has_value()) {
TORCH_CHECK(divisor_override.value() != 0, "divisor must be not zero");
divisor = divisor_override.value();
}
// Resize and initialize result tensor.
gradInput.resize_as_(input);
gradInput.zero_();
const int64_t nbatch = input.ndimension() == 5 ? input.size(-5) : 1;
const int64_t nslices = input.size(-4);
const int64_t itime = input.size(-3);
const int64_t iheight = input.size(-2);
const int64_t iwidth = input.size(-1);
const int64_t otime = gradOutput.size(-3);
const int64_t oheight = gradOutput.size(-2);
const int64_t owidth = gradOutput.size(-1);
/* XXX shape check behavior from TH */
const int64_t otime_for_shape_check = pooling_output_shape<int64_t>(itime, kT, padT, dT, 1, ceil_mode);
const int64_t oheight_for_shape_check = pooling_output_shape<int64_t>(iheight, kH, padH, dH, 1, ceil_mode);
const int64_t owidth_for_chape_check = pooling_output_shape<int64_t>(iwidth, kW, padW, dW, 1, ceil_mode);
const bool kernelsOverlap = (dT < kT) || (dH < kH) || (dW < kW);
avg_pool3d_backward_shape_check(
input,
gradOutput,
nslices,
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
itime, iheight, iwidth,
otime, oheight, owidth);
Tensor work_grad_input = gradInput;
Tensor work_grad_output = gradOutput.contiguous();
if (input.ndimension() == 5) {
// Collapse batch and feature dimensions.
work_grad_input = work_grad_input.reshape({nbatch * nslices, itime, iheight, iwidth});
work_grad_output = work_grad_output.reshape({nbatch * nslices, otime, oheight, owidth});
}
// Optimizing for stride 1 is probably only of limited value, but this
// specialization yields 3x speedup over the gpuAtomicAddNoReturn implementation.
// Padding must be 0, otherwise, pool size may change.
if (dT == 1 && dH == 1 && dW == 1 && padT == 0 && padH == 0 && padW == 0) {
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16, input.scalar_type(),
"avg_pool3d_backward_out_frame_stride1",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_backward_out_frame_stride1", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = itime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
accscalar_t divide_factor;
if (divisor) {
divide_factor = static_cast<accscalar_t>(divisor);
} else {
divide_factor = static_cast<accscalar_t>(kT * kH * kW);
}
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(iwidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(iheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
hipLaunchKernelGGL(( avg_pool3d_single_backward_out_frame_stride1<scalar_t, accscalar_t>)
, dim3(grid), dim3(block), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(),
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
1.0f/divide_factor,
offsetZ);
AT_CUDA_CHECK(hipGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
else {
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16, input.scalar_type(),
"avg_pool3d_backward_out_frame",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_backward_out_frame", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = otime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(owidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(oheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
if (kernelsOverlap) {
hipLaunchKernelGGL(( avg_pool3d_cuda_update_grad_input_atomic<scalar_t, accscalar_t>)
, dim3(grid), dim3(block), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(),
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
}
else {
hipLaunchKernelGGL(( avg_pool3d_cuda_update_grad_input<scalar_t, accscalar_t>)
, dim3(grid), dim3(block), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(),
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
}
AT_CUDA_CHECK(hipGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
}
} // namespace
Tensor& avg_pool3d_out_cuda(
Tensor& output,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
avg_pool3d_out_cuda_template(
output,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return output;
}
Tensor avg_pool3d_cuda(
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
Tensor output = at::empty({0}, input.options());
avg_pool3d_out_cuda_template(
output,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return output;
}
Tensor& avg_pool3d_backward_out_cuda(
Tensor& gradInput,
const Tensor& gradOutput_,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
// Nondeterministic because of atomicAdd usage
globalContext().alertNotDeterministic("avg_pool3d_backward_out_cuda");
avg_pool3d_backward_out_cuda_template(
gradInput,
gradOutput_,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return gradInput;
}
Tensor avg_pool3d_backward_cuda(
const Tensor& gradOutput_,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
// Nondeterministic because of atomicAdd usage
globalContext().alertNotDeterministic("avg_pool3d_backward_cuda");
auto gradInput = at::zeros_like(input, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
avg_pool3d_backward_out_cuda_template(
gradInput,
gradOutput_,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return gradInput;
}
} // at::native
} // at
| e22aec787aaa4ca2680717388643568f08c19087.cu | #include <ATen/AccumulateType.h>
#include <ATen/native/Pool.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/cuda/detail/KernelUtils.h>
#include <THC/THCAtomics.cuh>
#include <THC/THCNumerics.cuh>
#include <c10/macros/Macros.h>
namespace at {
namespace native {
namespace {
__device__ inline int min(int a, int b) {
return a <= b ? a : b;
}
__device__ inline int max(int a, int b) {
return a >= b ? a : b;
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_output(
PackedTensorAccessor64<scalar_t, 4> input,
PackedTensorAccessor64<scalar_t, 4> output,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % output.size(1); // output frame/time
int slice = (blockIdx.z + offsetZ) / output.size(1); // output slice/feature
if (oRow < output.size(2) && oCol < output.size(3))
{
accscalar_t sum = 0.0;
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, input.size(1) + padT);
int hend = min(hstart + kH, input.size(2) + padH);
int wend = min(wstart + kW, input.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, input.size(1));
hend = min(hend, input.size(2));
wend = min(wend, input.size(3));
if (tstart >= tend || hstart >= hend || wstart >= wend) {
output[slice][oFrame][oRow][oCol] = scalar_t(0);
return;
}
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
int ti, hi, wi;
for (ti = tstart; ti < tend; ++ti)
{
for (hi = hstart; hi < hend; ++hi)
{
for (wi = wstart; wi < wend; ++wi)
{
scalar_t val = input[slice][ti][hi][wi];
sum += val;
}
}
}
output[slice][oFrame][oRow][oCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum / divide_factor);
}
}
// Inner-most loop size (kW) passed as template parameter for
// performance reasons.
//
template<int KERNEL_WIDTH, typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_output(
PackedTensorAccessor64<scalar_t, 4> input,
PackedTensorAccessor64<scalar_t, 4> output,
int kT, int kH,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % output.size(1); // output frame/time
int slice = (blockIdx.z + offsetZ) / output.size(1); // output slice/feature
if (oRow < output.size(2) && oCol < output.size(3))
{
accscalar_t sum = 0.0;
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, input.size(1) + padT);
int hend = min(hstart + kH, input.size(2) + padH);
int wend = min(wstart + KERNEL_WIDTH, input.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, input.size(1));
hend = min(hend, input.size(2));
wend = min(wend, input.size(3));
if (tstart >= tend || hstart >= hend || wstart >= wend) {
output[slice][oFrame][oRow][oCol] = scalar_t(0);
return;
}
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
int ti, hi, wi;
for (ti = tstart; ti < tend; ++ti)
{
for (hi = hstart; hi < hend; ++hi)
{
for (wi = wstart; wi < wend; ++wi)
{
scalar_t val = input[slice][ti][hi][wi];
sum += val;
}
}
}
output[slice][oFrame][oRow][oCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum / divide_factor);
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_single_backward_out_frame_stride1(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
accscalar_t normFactor,
int offsetZ)
{
int iCol = blockIdx.x * blockDim.x + threadIdx.x;
int iRow = blockIdx.y * blockDim.y + threadIdx.y;
int iFrame = (blockIdx.z + offsetZ) % gradInput.size(1); // input frame/time
int slice = (blockIdx.z + offsetZ) / gradInput.size(1); // input slice/feature
// guard against over-tiled threads
if (iRow < gradInput.size(2) && iCol < gradInput.size(3))
{
accscalar_t sum = 0.0;
scalar_t *gOut = &gradOutput[slice][max(0, iFrame - kT + 1)]
[max(0, iRow - kH + 1)][max(0, iCol - kW + 1)];
int frameOffset = 0;
for (int oFrame = max(0, iFrame - kT + 1);
oFrame < min(iFrame + 1, gradOutput.size(1));
++oFrame)
{
int rowOffset = frameOffset;
for (int oRow = max(0, iRow - kH + 1);
oRow < min(iRow + 1, gradOutput.size(2));
++oRow)
{
int colOffset = rowOffset;
for (int oCol = max(0, iCol - kW + 1);
oCol < min(iCol + 1, gradOutput.size(3));
++oCol)
{
sum += gOut[colOffset];
++colOffset;
}
rowOffset += gradOutput.size(3);
}
frameOffset += gradOutput.size(2) * gradOutput.size(3);
}
gradInput[slice][iFrame][iRow][iCol] = ScalarConvert<accscalar_t, scalar_t>::to(sum * normFactor);
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_grad_input_atomic(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad,
int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % gradOutput.size(1); // gradOutput frame/time
int slice = (blockIdx.z + offsetZ) / gradOutput.size(1); // gradOutput slice/feature
// guard against over-tiled threads
if (oRow < gradOutput.size(2) && oCol < gradOutput.size(3))
{
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, gradInput.size(1) + padT);
int hend = min(hstart + kH, gradInput.size(2) + padH);
int wend = min(wstart + kW, gradInput.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, gradInput.size(1));
hend = min(hend, gradInput.size(2));
wend = min(wend, gradInput.size(3));
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
scalar_t val = ScalarConvert<accscalar_t, scalar_t>::to(
ScalarConvert<scalar_t, accscalar_t>::to(gradOutput[slice][oFrame][oRow][oCol]) / divide_factor);
for (int iFrame = tstart; iFrame < tend; ++iFrame)
{
for (int iRow = hstart; iRow < hend; ++iRow)
{
for (int iCol = wstart; iCol < wend; ++iCol)
{
gpuAtomicAddNoReturn(&gradInput[slice][iFrame][iRow][iCol], val);
}
}
}
}
}
template <typename scalar_t, typename accscalar_t>
__global__ void avg_pool3d_cuda_update_grad_input(
PackedTensorAccessor64<scalar_t, 4> gradOutput,
PackedTensorAccessor64<scalar_t, 4> gradInput,
int kT, int kH, int kW,
int dT, int dH, int dW,
int padT, int padH, int padW,
bool count_include_pad, int offsetZ, int divisor_override)
{
int oCol = blockIdx.x * blockDim.x + threadIdx.x;
int oRow = blockIdx.y * blockDim.y + threadIdx.y;
int oFrame = (blockIdx.z + offsetZ) % gradOutput.size(1); // gradOutput frame/time
int slice = (blockIdx.z + offsetZ) / gradOutput.size(1); // gradOutput slice/feature
// guard against over-tiled threads
if (oRow < gradOutput.size(2) && oCol < gradOutput.size(3))
{
int tstart = oFrame * dT - padT;
int hstart = oRow * dH - padH;
int wstart = oCol * dW - padW;
int tend = min(tstart + kT, gradInput.size(1) + padT);
int hend = min(hstart + kH, gradInput.size(2) + padH);
int wend = min(wstart + kW, gradInput.size(3) + padW);
int pool_size = (tend - tstart) * (hend - hstart) * (wend - wstart);
tstart = max(tstart, 0);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
tend = min(tend, gradInput.size(1));
hend = min(hend, gradInput.size(2));
wend = min(wend, gradInput.size(3));
accscalar_t divide_factor;
if (divisor_override) {
divide_factor = static_cast<accscalar_t>(divisor_override);
} else {
if(count_include_pad) {
divide_factor = static_cast<accscalar_t>(pool_size);
} else {
divide_factor = static_cast<accscalar_t>((tend - tstart) * (hend - hstart) * (wend - wstart));
}
}
scalar_t val = ScalarConvert<accscalar_t, scalar_t>::to(
ScalarConvert<scalar_t, accscalar_t>::to(gradOutput[slice][oFrame][oRow][oCol]) / divide_factor);
for (int iFrame = tstart; iFrame < tend; ++iFrame)
{
for (int iRow = hstart; iRow < hend; ++iRow)
{
for (int iCol = wstart; iCol < wend; ++iCol)
{
gradInput[slice][iFrame][iRow][iCol] = val;
}
}
}
}
}
#define LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(KW) case KW: \
avg_pool3d_cuda_update_output<KW, scalar_t, accscalar_t> \
<<<grid, block, 0, at::cuda::getCurrentCUDAStream()>>>( \
work_input.packed_accessor64<scalar_t, 4>(), \
work_output.packed_accessor64<scalar_t, 4>(), \
kT, kH, \
dT, dH, dW, \
padT, padH, padW, \
count_include_pad, \
offsetZ, divisor); \
break
void avg_pool3d_out_cuda_template(
Tensor& output,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
TensorArg output_arg{ output, "output", 1 };
TensorArg input_arg{ input, "input", 2 };
checkAllSameGPU("avg_pool3d_out_cuda", {output_arg, input_arg});
// #20866, #22032: Guarantee this for the official C++ API?
TORCH_CHECK(kernel_size.size() == 1 || kernel_size.size() == 3,
"avg_pool3d: kernel_size must be a single int, or a tuple of three ints");
const int kT = safe_downcast<int, int64_t>(kernel_size[0]);
const int kH = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[1]);
const int kW = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[2]);
TORCH_CHECK(stride.empty() || stride.size() == 1 || stride.size() == 3,
"avg_pool3d: stride must be omitted, a single int, or a tuple of three ints");
const int dT = stride.empty() ? kT : safe_downcast<int, int64_t>(stride[0]);
const int dH = stride.empty() ? kH :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[1]);
const int dW = stride.empty() ? kW :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[2]);
TORCH_CHECK(padding.size() == 1 || padding.size() == 3,
"avg_pool3d: padding must be a single int, or a tuple of three ints");
const int padT = safe_downcast<int, int64_t>(padding[0]);
const int padH = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[1]);
const int padW = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[2]);
TORCH_CHECK((input.ndimension() == 4 || input.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for input");
// if divisor==0 then we will ignore it
int64_t divisor = 0;
if (divisor_override.has_value()) {
TORCH_CHECK(divisor_override.value() != 0, "divisor must be not zero");
divisor = divisor_override.value();
}
const int64_t nbatch = input.ndimension() == 5 ? input.size(-5) : 1;
const int64_t nslices = input.size(-4);
const int64_t itime = input.size(-3);
const int64_t iheight = input.size(-2);
const int64_t iwidth = input.size(-1);
const int64_t otime = pooling_output_shape<int64_t>(itime, kT, padT, dT, 1, ceil_mode);
const int64_t oheight = pooling_output_shape<int64_t>(iheight, kH, padH, dH, 1, ceil_mode);
const int64_t owidth = pooling_output_shape<int64_t>(iwidth, kW, padW, dW, 1, ceil_mode);
pool3d_shape_check(
input,
nslices,
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
1, 1, 1,
itime, iheight, iwidth,
otime, oheight, owidth,
/*check_input_size=*/ true);
if (input.ndimension() == 4) {
output.resize_({ nslices, otime, oheight, owidth});
}
else {
output.resize_({nbatch, nslices, otime, oheight, owidth});
}
Tensor work_input = input.contiguous();
Tensor work_output = output;
if (input.ndimension() == 5) {
// Collapse batch and feature dimensions.
work_input = work_input.reshape({nbatch * nslices, itime, iheight, iwidth});
work_output = work_output.reshape({nbatch * nslices, otime, oheight, owidth});
}
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16,
input.scalar_type(),
"avg_pool3d_out_cuda",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_out_cuda", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = otime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(owidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(oheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
switch (kW) {
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(1);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(2);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(3);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(4);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(5);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(6);
LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH(7);
default:
avg_pool3d_cuda_update_output<scalar_t, accscalar_t>
<<<grid, block, 0, at::cuda::getCurrentCUDAStream()>>>(
work_input.packed_accessor64<scalar_t, 4>(),
work_output.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
break;
}
AT_CUDA_CHECK(cudaGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
#undef LAUNCH_UPDATE_OUTPUT_KERNEL_WIDTH
void avg_pool3d_backward_out_cuda_template(
Tensor& gradInput,
const Tensor& gradOutput,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
TensorArg gradInput_arg{ gradInput, "gradInput", 1 };
TensorArg gradOutput_arg{ gradOutput, "gradOutput", 2 };
TensorArg input_arg{ input, "input", 3 };
checkAllSameGPU("avg_pool3d_backward_out_cuda",
{gradInput_arg, gradOutput_arg, input_arg});
// #20866, #22032: Guarantee this for the official C++ API?
TORCH_CHECK(kernel_size.size() == 1 || kernel_size.size() == 3,
"avg_pool3d: kernel_size must be a single int, or a tuple of three ints");
const int kT = safe_downcast<int, int64_t>(kernel_size[0]);
const int kH = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[1]);
const int kW = kernel_size.size() == 1 ? kT : safe_downcast<int, int64_t>(kernel_size[2]);
TORCH_CHECK(stride.empty() || stride.size() == 1 || stride.size() == 3,
"avg_pool3d: stride must be omitted, a single int, or a tuple of three ints");
const int dT = stride.empty() ? kT : safe_downcast<int, int64_t>(stride[0]);
const int dH = stride.empty() ? kH :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[1]);
const int dW = stride.empty() ? kW :
stride.size() == 1 ? dT : safe_downcast<int, int64_t>(stride[2]);
TORCH_CHECK(padding.size() == 1 || padding.size() == 3,
"avg_pool3d: padding must be a single int, or a tuple of three ints");
const int padT = safe_downcast<int, int64_t>(padding[0]);
const int padH = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[1]);
const int padW = padding.size() == 1 ? padT : safe_downcast<int, int64_t>(padding[2]);
TORCH_CHECK((input.ndimension() == 4 || input.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for input");
TORCH_CHECK((gradOutput.ndimension() == 4 || gradOutput.ndimension() == 5),
"non-empty 4D or 5D (batch mode) tensor expected for gradOutput");
// if divisor==0 then we will ignore it
int64_t divisor = 0;
if (divisor_override.has_value()) {
TORCH_CHECK(divisor_override.value() != 0, "divisor must be not zero");
divisor = divisor_override.value();
}
// Resize and initialize result tensor.
gradInput.resize_as_(input);
gradInput.zero_();
const int64_t nbatch = input.ndimension() == 5 ? input.size(-5) : 1;
const int64_t nslices = input.size(-4);
const int64_t itime = input.size(-3);
const int64_t iheight = input.size(-2);
const int64_t iwidth = input.size(-1);
const int64_t otime = gradOutput.size(-3);
const int64_t oheight = gradOutput.size(-2);
const int64_t owidth = gradOutput.size(-1);
/* XXX shape check behavior from TH */
const int64_t otime_for_shape_check = pooling_output_shape<int64_t>(itime, kT, padT, dT, 1, ceil_mode);
const int64_t oheight_for_shape_check = pooling_output_shape<int64_t>(iheight, kH, padH, dH, 1, ceil_mode);
const int64_t owidth_for_chape_check = pooling_output_shape<int64_t>(iwidth, kW, padW, dW, 1, ceil_mode);
const bool kernelsOverlap = (dT < kT) || (dH < kH) || (dW < kW);
avg_pool3d_backward_shape_check(
input,
gradOutput,
nslices,
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
itime, iheight, iwidth,
otime, oheight, owidth);
Tensor work_grad_input = gradInput;
Tensor work_grad_output = gradOutput.contiguous();
if (input.ndimension() == 5) {
// Collapse batch and feature dimensions.
work_grad_input = work_grad_input.reshape({nbatch * nslices, itime, iheight, iwidth});
work_grad_output = work_grad_output.reshape({nbatch * nslices, otime, oheight, owidth});
}
// Optimizing for stride 1 is probably only of limited value, but this
// specialization yields 3x speedup over the gpuAtomicAddNoReturn implementation.
// Padding must be 0, otherwise, pool size may change.
if (dT == 1 && dH == 1 && dW == 1 && padT == 0 && padH == 0 && padW == 0) {
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16, input.scalar_type(),
"avg_pool3d_backward_out_frame_stride1",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_backward_out_frame_stride1", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = itime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
accscalar_t divide_factor;
if (divisor) {
divide_factor = static_cast<accscalar_t>(divisor);
} else {
divide_factor = static_cast<accscalar_t>(kT * kH * kW);
}
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(iwidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(iheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
avg_pool3d_single_backward_out_frame_stride1<scalar_t, accscalar_t>
<<<grid, block, 0, at::cuda::getCurrentCUDAStream()>>>(
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
1.0f/divide_factor,
offsetZ);
AT_CUDA_CHECK(cudaGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
else {
AT_DISPATCH_FLOATING_TYPES_AND2(kHalf, kBFloat16, input.scalar_type(),
"avg_pool3d_backward_out_frame",
[&] {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "avg_pool3d_backward_out_frame", [&] {
using accscalar_t = acc_type<scalar_t, true>;
int64_t totalZ = otime * nslices * nbatch;
int64_t offsetZ = 0;
dim3 block(32, 8);
while (totalZ > 0) {
dim3 grid(cuda::ATenCeilDiv(owidth, static_cast<int64_t>(block.x)),
cuda::ATenCeilDiv(oheight, static_cast<int64_t>(block.y)),
totalZ > 65535 ? 65535 : totalZ);
if (kernelsOverlap) {
avg_pool3d_cuda_update_grad_input_atomic<scalar_t, accscalar_t>
<<<grid, block, 0, at::cuda::getCurrentCUDAStream()>>>(
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
}
else {
avg_pool3d_cuda_update_grad_input<scalar_t, accscalar_t>
<<<grid, block, 0, at::cuda::getCurrentCUDAStream()>>>(
work_grad_output.packed_accessor64<scalar_t, 4>(),
work_grad_input.packed_accessor64<scalar_t, 4>(),
kT, kH, kW,
dT, dH, dW,
padT, padH, padW,
count_include_pad,
offsetZ, divisor);
}
AT_CUDA_CHECK(cudaGetLastError());
totalZ -= 65535;
offsetZ += 65535;
}
});
}
);
}
}
} // namespace
Tensor& avg_pool3d_out_cuda(
Tensor& output,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
avg_pool3d_out_cuda_template(
output,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return output;
}
Tensor avg_pool3d_cuda(
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
Tensor output = at::empty({0}, input.options());
avg_pool3d_out_cuda_template(
output,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return output;
}
Tensor& avg_pool3d_backward_out_cuda(
Tensor& gradInput,
const Tensor& gradOutput_,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
// Nondeterministic because of atomicAdd usage
globalContext().alertNotDeterministic("avg_pool3d_backward_out_cuda");
avg_pool3d_backward_out_cuda_template(
gradInput,
gradOutput_,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return gradInput;
}
Tensor avg_pool3d_backward_cuda(
const Tensor& gradOutput_,
const Tensor& input,
IntArrayRef kernel_size,
IntArrayRef stride,
IntArrayRef padding,
bool ceil_mode,
bool count_include_pad,
c10::optional<int64_t> divisor_override)
{
// Nondeterministic because of atomicAdd usage
globalContext().alertNotDeterministic("avg_pool3d_backward_cuda");
auto gradInput = at::zeros_like(input, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
avg_pool3d_backward_out_cuda_template(
gradInput,
gradOutput_,
input,
kernel_size,
stride,
padding,
ceil_mode,
count_include_pad,
divisor_override);
return gradInput;
}
} // at::native
} // at
|
db943b55952201f1eeaccce2e6f493305c84a871.hip | // !!! This is a file automatically generated by hipify!!!
#include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/vision_layers.hpp"
#ifdef USE_GREENTEA
#include "caffe/greentea/greentea.hpp"
#include "caffe/greentea/greentea_math_functions.hpp"
#endif
namespace caffe {
template<typename Dtype>
void SigmoidCrossEntropyLossLayer<Dtype>::Backward_gpu(
const vector<Blob<Dtype>*>& top, const vector<bool>& propagate_down,
const vector<Blob<Dtype>*>& bottom) {
if (propagate_down[1]) {
LOG(FATAL)<< this->type()
<< " Layer cannot backpropagate to label inputs.";
}
if (propagate_down[0]) {
const int count = bottom[0]->count();
const int num = bottom[0]->num();
const Dtype* sigmoid_output_data = sigmoid_output_->gpu_data();
const Dtype* target = bottom[1]->gpu_data();
Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();
if (this->device_context_->backend() == BACKEND_CUDA) {
#ifdef USE_ROCM
// First, compute the diff
caffe_copy(count, sigmoid_output_data, bottom_diff);
caffe_gpu_axpy(count, Dtype(-1), target, bottom_diff);
// Scale down gradient
const Dtype loss_weight = top[0]->cpu_diff()[0];
caffe_gpu_scal(count, loss_weight / num, bottom_diff);
#endif // USE_ROCM
} else {
#ifdef USE_GREENTEA
viennacl::ocl::context &ctx = viennacl::ocl::get_context(
this->device_context_->id());
// First, compute the diff
greentea_copy<Dtype>(count, (cl_mem)sigmoid_output_data, 0,
(cl_mem)bottom_diff, 0, &ctx);
greentea_gpu_axpy<Dtype>(this->device_context_->id(), count,
Dtype(-1), (cl_mem)target, 0,
(cl_mem)bottom_diff, 0);
// Scale down gradient
const Dtype loss_weight = top[0]->cpu_diff()[0];
greentea_gpu_scal(this->device_context_->id(), count, loss_weight / num,
(cl_mem)bottom_diff, 0);
#endif // USE_GREENTEA
}
}
}
INSTANTIATE_LAYER_GPU_BACKWARD(SigmoidCrossEntropyLossLayer);
} // namespace caffe
| db943b55952201f1eeaccce2e6f493305c84a871.cu | #include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/vision_layers.hpp"
#ifdef USE_GREENTEA
#include "caffe/greentea/greentea.hpp"
#include "caffe/greentea/greentea_math_functions.hpp"
#endif
namespace caffe {
template<typename Dtype>
void SigmoidCrossEntropyLossLayer<Dtype>::Backward_gpu(
const vector<Blob<Dtype>*>& top, const vector<bool>& propagate_down,
const vector<Blob<Dtype>*>& bottom) {
if (propagate_down[1]) {
LOG(FATAL)<< this->type()
<< " Layer cannot backpropagate to label inputs.";
}
if (propagate_down[0]) {
const int count = bottom[0]->count();
const int num = bottom[0]->num();
const Dtype* sigmoid_output_data = sigmoid_output_->gpu_data();
const Dtype* target = bottom[1]->gpu_data();
Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();
if (this->device_context_->backend() == BACKEND_CUDA) {
#ifdef USE_CUDA
// First, compute the diff
caffe_copy(count, sigmoid_output_data, bottom_diff);
caffe_gpu_axpy(count, Dtype(-1), target, bottom_diff);
// Scale down gradient
const Dtype loss_weight = top[0]->cpu_diff()[0];
caffe_gpu_scal(count, loss_weight / num, bottom_diff);
#endif // USE_CUDA
} else {
#ifdef USE_GREENTEA
viennacl::ocl::context &ctx = viennacl::ocl::get_context(
this->device_context_->id());
// First, compute the diff
greentea_copy<Dtype>(count, (cl_mem)sigmoid_output_data, 0,
(cl_mem)bottom_diff, 0, &ctx);
greentea_gpu_axpy<Dtype>(this->device_context_->id(), count,
Dtype(-1), (cl_mem)target, 0,
(cl_mem)bottom_diff, 0);
// Scale down gradient
const Dtype loss_weight = top[0]->cpu_diff()[0];
greentea_gpu_scal(this->device_context_->id(), count, loss_weight / num,
(cl_mem)bottom_diff, 0);
#endif // USE_GREENTEA
}
}
}
INSTANTIATE_LAYER_GPU_BACKWARD(SigmoidCrossEntropyLossLayer);
} // namespace caffe
|
6c541293a11c13065e6926bc5706b2fef0c84a5c.hip | // !!! This is a file automatically generated by hipify!!!
#include <cstdio>
#include <omp.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#ifdef USE_MPI
#include <mpi.h>
#endif
#include "../utils/common.h"
static const size_t N = 1000;
void init(int *p, size_t size) {
for (size_t i = 0; i < size; ++i) {
p[i] = i;
}
}
void output(int *p, size_t size) {
for (size_t i = 0; i < size; ++i) {
printf("index %zu: %d\n", i, p[i]);
}
}
__global__
void vecAdd(int *l, int *r, int *p, size_t N) {
size_t idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < N) {
p[idx] = l[idx] + r[idx];
}
}
int main(int argc, char *argv[]) {
#ifdef USE_MPI
int numtasks, rank;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
printf("MPI task %d/%d\n", rank, numtasks);
#endif
// Init device
int device_id = 0;
if (argc > 1) {
device_id = atoi(argv[1]);
}
cuda_init_device(device_id);
#pragma omp parallel
{
int l[N], r[N], p[N];
int *dl, *dr, *dp;
init(l, N);
init(r, N);
RUNTIME_API_CALL(hipMalloc(&dl, N * sizeof(int)));
RUNTIME_API_CALL(hipMalloc(&dr, N * sizeof(int)));
RUNTIME_API_CALL(hipMalloc(&dp, N * sizeof(int)));
RUNTIME_API_CALL(hipMemcpy(dl, l, N * sizeof(int), hipMemcpyHostToDevice));
RUNTIME_API_CALL(hipMemcpy(dr, r, N * sizeof(int), hipMemcpyHostToDevice));
size_t threads = 256;
size_t blocks = (N - 1) / threads + 1;
hipLaunchKernelGGL(( GPU_TEST_FOR((vecAdd), dim3(blocks), dim3(threads), 0, 0, dl, dr, dp, N)));
RUNTIME_API_CALL(hipMemcpy(p, dp, N * sizeof(int), hipMemcpyDeviceToHost));
RUNTIME_API_CALL(hipFree(dl));
RUNTIME_API_CALL(hipFree(dr));
RUNTIME_API_CALL(hipFree(dp));
#ifdef OUTPUT
#pragma omp critical
{
printf("Thread %d\n", omp_get_thread_num());
output(p, N);
}
#endif
}
hipDeviceSynchronize();
#ifdef USE_MPI
MPI_Finalize();
#endif
return 0;
}
| 6c541293a11c13065e6926bc5706b2fef0c84a5c.cu | #include <cstdio>
#include <omp.h>
#include <cuda.h>
#include <cuda_runtime.h>
#ifdef USE_MPI
#include <mpi.h>
#endif
#include "../utils/common.h"
static const size_t N = 1000;
void init(int *p, size_t size) {
for (size_t i = 0; i < size; ++i) {
p[i] = i;
}
}
void output(int *p, size_t size) {
for (size_t i = 0; i < size; ++i) {
printf("index %zu: %d\n", i, p[i]);
}
}
__global__
void vecAdd(int *l, int *r, int *p, size_t N) {
size_t idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < N) {
p[idx] = l[idx] + r[idx];
}
}
int main(int argc, char *argv[]) {
#ifdef USE_MPI
int numtasks, rank;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numtasks);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
printf("MPI task %d/%d\n", rank, numtasks);
#endif
// Init device
int device_id = 0;
if (argc > 1) {
device_id = atoi(argv[1]);
}
cuda_init_device(device_id);
#pragma omp parallel
{
int l[N], r[N], p[N];
int *dl, *dr, *dp;
init(l, N);
init(r, N);
RUNTIME_API_CALL(cudaMalloc(&dl, N * sizeof(int)));
RUNTIME_API_CALL(cudaMalloc(&dr, N * sizeof(int)));
RUNTIME_API_CALL(cudaMalloc(&dp, N * sizeof(int)));
RUNTIME_API_CALL(cudaMemcpy(dl, l, N * sizeof(int), cudaMemcpyHostToDevice));
RUNTIME_API_CALL(cudaMemcpy(dr, r, N * sizeof(int), cudaMemcpyHostToDevice));
size_t threads = 256;
size_t blocks = (N - 1) / threads + 1;
GPU_TEST_FOR((vecAdd<<<blocks, threads>>>(dl, dr, dp, N)));
RUNTIME_API_CALL(cudaMemcpy(p, dp, N * sizeof(int), cudaMemcpyDeviceToHost));
RUNTIME_API_CALL(cudaFree(dl));
RUNTIME_API_CALL(cudaFree(dr));
RUNTIME_API_CALL(cudaFree(dp));
#ifdef OUTPUT
#pragma omp critical
{
printf("Thread %d\n", omp_get_thread_num());
output(p, N);
}
#endif
}
cudaDeviceSynchronize();
#ifdef USE_MPI
MPI_Finalize();
#endif
return 0;
}
|
99f4a07a065b33e7f8b632262b8ce6d4bf17408a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include "math_functions.h"
#include "device_atomic_functions.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
//Service functions
__global__ void evaluate_weights();
int absolute(int x);
int** split_coordinate(unsigned int* vec);
//Field operations
__device__ unsigned int rem(unsigned int x);
__device__ unsigned int mult(unsigned int x, unsigned int y);
__device__ unsigned int pow(unsigned int x, unsigned int y);
__device__ __managed__ unsigned int m = 16;
__device__ __managed__ unsigned int generator_polynomial = 0b10001000000001011;
__managed__ unsigned int weights[1 << 16] = { 0 };
//Kernals
__global__ void evaluate_function(unsigned int* res, unsigned int deg);
__global__ void fft_device(const int* vec, int* res, int var_index);
__global__ void fft_device(const long long* vec, long long* res, int var_index);
__global__ void fmt_device(const int* vec, int* res, int var_index);
__global__ void sqr_device(const int* vec, long long* res);
__global__ void div_device(const int* vec, float* res, int d);
__global__ void differencial_probability(const int* vec, int* res, int a);
__global__ void plus_minus_analog(const int* vec, int* res);
//Fast transforms
void fft(int** vec, int** res);
void fwt(int** vec, int** res);
void fmt(int** vec, int** res);
void fft(int* vec, int* res);
void fmt(int* vec, int* res);
void fft_with_normalization(int** vec, float** res);
void fft_with_normalization(int* vec, float* res);
//Cryptographic properies
int disbalance(const int* W);
int degree(const int* A);
int nonlinearity(const int* W);
int correlation_immunity(const int* W);
int coefficient_of_error_propagation(const int* T, int var_index);
int coefficient_of_error_propagation_in_mean(const int* T, int var_index);
int sac(const int* W);
bool zero_level_sac(int** T);
bool zero_level_sac(int* T);
bool mean_sac(const int* T);
float mdp(const int* T);
bool is_bent(int** W);
int main(int argc, char* argv[]) {
//Fields pre-computing
hipLaunchKernelGGL(( evaluate_weights) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, );
hipDeviceSynchronize();
cout << "Enter degree: ";
unsigned int N;
cin >> N;
unsigned int* T = new unsigned int[1 << 16];
unsigned int* device_T;
hipMalloc(&device_T, (1 << 16) * sizeof(unsigned int));
hipLaunchKernelGGL(( evaluate_function) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, device_T, N);
hipDeviceSynchronize();
hipMemcpy(T, device_T, (1 << 16) * sizeof(unsigned int), hipMemcpyDeviceToHost);
int** coordinate_T = split_coordinate(T);
int** W = new int*[16];
for (int i = 0; i < 16; i++)
W[i] = new int[1 << 16];
fwt(coordinate_T, W);
int** A = new int*[16];
for (int i = 0; i < 16; i++)
A[i] = new int[1 << 16];
fmt(coordinate_T, A);
cout << "Disbalance of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << disbalance(W[i]) << endl;
cout << "Algebraic degree of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << degree(A[i]) << endl;
cout << "Nonlinearity of coordinate functions: (max_nonlinearity = " << ((1 << 15) - (1 << 7)) << ")" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << nonlinearity(W[i]) << endl;
cout << "Correlation immunity of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << correlation_immunity(W[i]) << endl;
cout << "Coefficient of error propagation for each function and varianble:" << endl;
for (int i = 0; i < 16; i++) {
for (int j = 15; j > -1; j--) {
int k = coefficient_of_error_propagation(coordinate_T[i], j);
float bias = ((float)(absolute(k - (1 << 15)))) / (1 << 15);
cout << "[Function = " << i << "][Variable = " << 15 - j << "]: " << k << " (bias = " << bias << ")" << endl;
}
}
cout << "Strict avalenche criteria for coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << sac(W[i]) << endl;
int* signed_T = new int[1 << 16];
int* full_A = new int[1 << 16];
for (int i = 0; i < (1 << 16); i++)
signed_T[i] = (int)T[i];
fmt(signed_T, full_A);
cout << "Algebraic degree of (n, n) - function: " << degree(full_A) << endl;
cout << "Coefficient of error propagation for (n, n) - function:" << endl;
for (int i = 15; i > -1; i--) {
int k = coefficient_of_error_propagation_in_mean(signed_T, i);
float bias = ((float)(absolute(k - 16 * (1 << 15)))) / (16 * (1 << 15));
cout << "[Variable = " << 15 - i << "]: " << k << " (bias = " << bias << ")" << endl;
}
string res;
if (zero_level_sac(coordinate_T))
res = "True";
else
res = "False";
cout << "Strict SAC (zero level): " << res << endl;
if (mean_sac(signed_T))
res = "True";
else
res = "False";
cout << "SAC in mean: " << res << endl;
cout << "Processing MDP... (Wait a 1-2 minutes)" << endl;
cout << "MDP: " << mdp(signed_T) << endl;
for (int i = 0; i < 16; i++) {
delete[] coordinate_T[i];
delete[] W[i];
delete[] A[i];
}
delete[] A;
delete[] W;
delete[] coordinate_T;
delete[] T;
delete[] signed_T;
delete[] full_A;
hipFree(device_T);
system("pause");
return 0;
}
bool is_bent(int** W) {
for (int i = 0; i < (1 << 16); i++) {
for (int j = 0; j < 16; j++) {
if (absolute(W[j][i]) != (1 << 8)) {
return false;
}
}
}
return true;
}
__global__ void evaluate_weights() {
weights[blockIdx.x] = __popc(blockIdx.x);
}
__device__ unsigned int rem(unsigned int x) {
unsigned int res = x;
for (int i = 31; i > 15; i--) {
if (((res >> i) & 0x1) == 1)
res = res ^ (generator_polynomial << (i - 16));
}
return res;
}
inline __device__ unsigned int mult(unsigned int x, unsigned int y) {
unsigned int res = 0;
for (int i = 0; i < 16; i++)
if (((y >> i) & 0x1) == 1)
res = res ^ (x << i);
return rem(res);
}
inline __device__ unsigned int pow(unsigned int x, unsigned int y) {
unsigned int b = 1;
unsigned int c = x;
for (int i = 0; i < 32; i++) {
if (((y >> i) & 0x1) == 1)
b = mult(b, c);
c = mult(c, c);
}
return b;
}
__global__ void evaluate_function(unsigned int* res, unsigned int deg) {
res[blockIdx.x] = pow(blockIdx.x, deg);
}
//Without division (normalization)
__global__ void fft_device(const int* vec, int* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x] + vec[blockIdx.x ^ (1 << var_index)];
else
res[blockIdx.x] = vec[blockIdx.x] - vec[blockIdx.x ^ (1 << var_index)];
}
//Without division (normalization)
__global__ void fft_device(const long long* vec, long long* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x] + vec[blockIdx.x ^ (1 << var_index)];
else
res[blockIdx.x] = vec[blockIdx.x] - vec[blockIdx.x ^ (1 << var_index)];
}
__global__ void fmt_device(const int* vec, int* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x];
else
res[blockIdx.x] = vec[blockIdx.x] ^ vec[blockIdx.x ^ (1 << var_index)];
}
__global__ void sqr_device(const int* vec, long long* res) {
long long x = vec[blockIdx.x];
res[blockIdx.x] = x * x;
}
__global__ void div_device(const int* vec, float* res, int d) {
res[blockIdx.x] = ((float)(vec[blockIdx.x])) / d;
}
__global__ void differencial_probability(const int* vec, int* res, int a) {
atomicAdd(&res[vec[blockIdx.x] ^ vec[blockIdx.x ^ a]], 1);
}
__global__ void plus_minus_analog(const int* vec, int* res) {
if (vec[blockIdx.x] == 0)
res[blockIdx.x] = 1;
else
res[blockIdx.x] = -1;
}
int disbalance(const int* W) {
if (W[0] >= 0)
return W[0];
else
return -W[0];
}
int degree(const int* A) {
unsigned int deg = 0;
for (int i = 1; i < (1 << 16); i++)
if ((A[i] != 0) && (deg < weights[i]))
deg = weights[i];
return (int)deg;
}
int nonlinearity(const int* W) {
int max_w = 0;
for (int i = 0; i < (1 << 16); i++) {
int abs_w = absolute(W[i]);
if (max_w < abs_w)
max_w = abs_w;
}
return (int)((1 << 15) - max_w / 2);
}
int correlation_immunity(const int* W) {
int cor = 0;
bool flag = true;
for (int w = 1; w <= 16; w++) {
for (int i = 1; i < (1 << 16); i++) {
if ((weights[i] == w) && (W[i] != 0))
flag = false;
}
if (flag)
cor++;
else
break;
}
return cor;
}
int coefficient_of_error_propagation(const int* T, int var_index) {
int k = 0;
for (int i = 0; i < (1 << 16); i++)
k += (T[i] ^ T[i ^ (1 << var_index)]);
return k;
}
int coefficient_of_error_propagation_in_mean(const int* T, int var_index) {
int k = 0;
for (int i = 0; i < (1 << 16); i++)
k += weights[(T[i] ^ T[i ^ (1 << var_index)])];
return k;
}
int sac(const int* W) {
long long* auto_cor_func = new long long[1 << 16];
long long* temp_1;
long long* temp_2;
int* temp_3;
hipMalloc(&temp_1, (1 << 16) * sizeof(long long));
hipMalloc(&temp_2, (1 << 16) * sizeof(long long));
hipMalloc(&temp_3, (1 << 16) * sizeof(int));
hipMemcpy(temp_3, W, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( sqr_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_3, temp_1);
hipDeviceSynchronize();
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(long long), hipMemcpyDeviceToDevice);
}
hipMemcpy(auto_cor_func, temp_1, (1 << 16) * sizeof(long long), hipMemcpyDeviceToHost);
hipFree(temp_1);
hipFree(temp_2);
hipFree(temp_3);
int s = 0;
bool flag = true;
for (int w = 1; w <= 16; w++) {
for (int i = 1; i < (1 << 16); i++) {
if ((weights[i] == w) && (auto_cor_func[i] != 0))
flag = false;
}
if (flag)
s++;
else
break;
}
delete[] auto_cor_func;
return s;
}
bool zero_level_sac(int** T) {
for (int i = 0; i < 16; i++)
if (!zero_level_sac(T[i]))
return false;
return true;
}
bool zero_level_sac(int* T) {
for (int i = 0; i < 16; i++)
if (coefficient_of_error_propagation(T, i) != (1 << 15))
return false;
return true;
}
bool mean_sac(const int* T) {
bool flag = true;
for (int i = 0; i < 16; i++) {
int k = coefficient_of_error_propagation_in_mean(T, i);
if (k != 16 * (1 << 15)) {
flag = false;
break;
}
}
return flag;
}
float mdp(const int* T) {
int max = 0;
int* host_d = new int[1 << 16];
int* d;
int* temp;
hipMalloc(&temp, (1 << 16) * sizeof(int));
hipMalloc(&d, (1 << 16) * sizeof(int));
hipMemcpy(temp, T, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int i = 0; i < (1 << 16); i++)
host_d[i] = 0;
for (int a = 1; a < (1 << 16); a++) {
hipMemcpy(d, host_d, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( differencial_probability) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp, d, a);
hipDeviceSynchronize();
hipMemcpy(host_d, d, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
for (int i = 0; i < (1 << 16); i++) {
if (max < host_d[i]) {
max = host_d[i];
}
host_d[i] = 0;
}
}
delete[] host_d;
hipFree(d);
hipFree(temp);
return ((float)max) / (1 << 16);
}
//Without division (normalization)
void fft(int** vec, int** res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
hipMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
}
hipFree(temp_1);
hipFree(temp_2);
}
//Without division (normalization)
void fft(int* vec, int* res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
hipMemcpy(temp_1, vec, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res, temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
hipFree(temp_1);
hipFree(temp_2);
}
void fwt(int** vec, int** res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
hipMemcpy(temp_2, vec[i], (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( plus_minus_analog) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_2, temp_1);
hipDeviceSynchronize();
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
}
hipFree(temp_1);
hipFree(temp_2);
}
void fwt(int* vec, int* res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
hipMemcpy(temp_2, vec, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( plus_minus_analog) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_2, temp_1);
hipDeviceSynchronize();
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res, temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
hipFree(temp_1);
hipFree(temp_2);
}
void fmt(int** vec, int** res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
hipMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fmt_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
}
hipFree(temp_1);
hipFree(temp_2);
}
void fmt(int* vec, int* res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
hipMemcpy(temp_1, vec, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fmt_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipMemcpy(res, temp_1, (1 << 16) * sizeof(int), hipMemcpyDeviceToHost);
hipFree(temp_1);
hipFree(temp_2);
}
void fft_with_normalization(int** vec, float** res) {
int* temp_1;
int* temp_2;
float* temp_3;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
hipMalloc(&temp_3, (1 << 16) * sizeof(float));
for (int i = 0; i < 16; i++) {
hipMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
hipLaunchKernelGGL(( div_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_3, (1 << 16));
hipDeviceSynchronize();
hipMemcpy(res[i], temp_3, (1 << 16) * sizeof(float), hipMemcpyDeviceToHost);
}
hipFree(temp_1);
hipFree(temp_2);
hipFree(temp_3);
}
void fft_with_normalization(int* vec, float* res) {
int* temp_1;
int* temp_2;
hipMalloc(&temp_1, (1 << 16) * sizeof(int));
hipMalloc(&temp_2, (1 << 16) * sizeof(int));
hipMemcpy(temp_1, vec, (1 << 16) * sizeof(int), hipMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
hipLaunchKernelGGL(( fft_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_2, j);
hipDeviceSynchronize();
hipMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), hipMemcpyDeviceToDevice);
}
float* temp_3;
hipMalloc(&temp_3, (1 << 16) * sizeof(float));
hipLaunchKernelGGL(( div_device) , dim3((1 << 16)), dim3(1) , 0, 0, 0, 0, temp_1, temp_3, (1 << 16));
hipDeviceSynchronize();
hipMemcpy(res, temp_3, (1 << 16) * sizeof(float), hipMemcpyDeviceToHost);
hipFree(temp_1);
hipFree(temp_2);
hipFree(temp_3);
}
int absolute(int x) {
if (x >= 0) {
return x;
}
else {
return -x;
}
}
int** split_coordinate(unsigned int* vec) {
int** res = new int*[16];
for (int i = 0; i < 16; i++)
res[i] = new int[1 << 16];
for (int i = 0; i < (1 << 16); i++) {
for (int j = 0; j < 16; j++) {
res[15 - j][i] = (int)((vec[i] >> j) & 0x1);
}
}
return res;
} | 99f4a07a065b33e7f8b632262b8ce6d4bf17408a.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "math_functions.h"
#include "device_atomic_functions.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
//Service functions
__global__ void evaluate_weights();
int absolute(int x);
int** split_coordinate(unsigned int* vec);
//Field operations
__device__ unsigned int rem(unsigned int x);
__device__ unsigned int mult(unsigned int x, unsigned int y);
__device__ unsigned int pow(unsigned int x, unsigned int y);
__device__ __managed__ unsigned int m = 16;
__device__ __managed__ unsigned int generator_polynomial = 0b10001000000001011;
__managed__ unsigned int weights[1 << 16] = { 0 };
//Kernals
__global__ void evaluate_function(unsigned int* res, unsigned int deg);
__global__ void fft_device(const int* vec, int* res, int var_index);
__global__ void fft_device(const long long* vec, long long* res, int var_index);
__global__ void fmt_device(const int* vec, int* res, int var_index);
__global__ void sqr_device(const int* vec, long long* res);
__global__ void div_device(const int* vec, float* res, int d);
__global__ void differencial_probability(const int* vec, int* res, int a);
__global__ void plus_minus_analog(const int* vec, int* res);
//Fast transforms
void fft(int** vec, int** res);
void fwt(int** vec, int** res);
void fmt(int** vec, int** res);
void fft(int* vec, int* res);
void fmt(int* vec, int* res);
void fft_with_normalization(int** vec, float** res);
void fft_with_normalization(int* vec, float* res);
//Cryptographic properies
int disbalance(const int* W);
int degree(const int* A);
int nonlinearity(const int* W);
int correlation_immunity(const int* W);
int coefficient_of_error_propagation(const int* T, int var_index);
int coefficient_of_error_propagation_in_mean(const int* T, int var_index);
int sac(const int* W);
bool zero_level_sac(int** T);
bool zero_level_sac(int* T);
bool mean_sac(const int* T);
float mdp(const int* T);
bool is_bent(int** W);
int main(int argc, char* argv[]) {
//Fields pre-computing
evaluate_weights <<< (1 << 16), 1 >>> ();
cudaDeviceSynchronize();
cout << "Enter degree: ";
unsigned int N;
cin >> N;
unsigned int* T = new unsigned int[1 << 16];
unsigned int* device_T;
cudaMalloc(&device_T, (1 << 16) * sizeof(unsigned int));
evaluate_function <<< (1 << 16), 1 >>> (device_T, N);
cudaDeviceSynchronize();
cudaMemcpy(T, device_T, (1 << 16) * sizeof(unsigned int), cudaMemcpyDeviceToHost);
int** coordinate_T = split_coordinate(T);
int** W = new int*[16];
for (int i = 0; i < 16; i++)
W[i] = new int[1 << 16];
fwt(coordinate_T, W);
int** A = new int*[16];
for (int i = 0; i < 16; i++)
A[i] = new int[1 << 16];
fmt(coordinate_T, A);
cout << "Disbalance of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << disbalance(W[i]) << endl;
cout << "Algebraic degree of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << degree(A[i]) << endl;
cout << "Nonlinearity of coordinate functions: (max_nonlinearity = " << ((1 << 15) - (1 << 7)) << ")" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << nonlinearity(W[i]) << endl;
cout << "Correlation immunity of coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << correlation_immunity(W[i]) << endl;
cout << "Coefficient of error propagation for each function and varianble:" << endl;
for (int i = 0; i < 16; i++) {
for (int j = 15; j > -1; j--) {
int k = coefficient_of_error_propagation(coordinate_T[i], j);
float bias = ((float)(absolute(k - (1 << 15)))) / (1 << 15);
cout << "[Function = " << i << "][Variable = " << 15 - j << "]: " << k << " (bias = " << bias << ")" << endl;
}
}
cout << "Strict avalenche criteria for coordinate functions:" << endl;
for (int i = 0; i < 16; i++)
cout << "[" << i << "]: " << sac(W[i]) << endl;
int* signed_T = new int[1 << 16];
int* full_A = new int[1 << 16];
for (int i = 0; i < (1 << 16); i++)
signed_T[i] = (int)T[i];
fmt(signed_T, full_A);
cout << "Algebraic degree of (n, n) - function: " << degree(full_A) << endl;
cout << "Coefficient of error propagation for (n, n) - function:" << endl;
for (int i = 15; i > -1; i--) {
int k = coefficient_of_error_propagation_in_mean(signed_T, i);
float bias = ((float)(absolute(k - 16 * (1 << 15)))) / (16 * (1 << 15));
cout << "[Variable = " << 15 - i << "]: " << k << " (bias = " << bias << ")" << endl;
}
string res;
if (zero_level_sac(coordinate_T))
res = "True";
else
res = "False";
cout << "Strict SAC (zero level): " << res << endl;
if (mean_sac(signed_T))
res = "True";
else
res = "False";
cout << "SAC in mean: " << res << endl;
cout << "Processing MDP... (Wait a 1-2 minutes)" << endl;
cout << "MDP: " << mdp(signed_T) << endl;
for (int i = 0; i < 16; i++) {
delete[] coordinate_T[i];
delete[] W[i];
delete[] A[i];
}
delete[] A;
delete[] W;
delete[] coordinate_T;
delete[] T;
delete[] signed_T;
delete[] full_A;
cudaFree(device_T);
system("pause");
return 0;
}
bool is_bent(int** W) {
for (int i = 0; i < (1 << 16); i++) {
for (int j = 0; j < 16; j++) {
if (absolute(W[j][i]) != (1 << 8)) {
return false;
}
}
}
return true;
}
__global__ void evaluate_weights() {
weights[blockIdx.x] = __popc(blockIdx.x);
}
__device__ unsigned int rem(unsigned int x) {
unsigned int res = x;
for (int i = 31; i > 15; i--) {
if (((res >> i) & 0x1) == 1)
res = res ^ (generator_polynomial << (i - 16));
}
return res;
}
inline __device__ unsigned int mult(unsigned int x, unsigned int y) {
unsigned int res = 0;
for (int i = 0; i < 16; i++)
if (((y >> i) & 0x1) == 1)
res = res ^ (x << i);
return rem(res);
}
inline __device__ unsigned int pow(unsigned int x, unsigned int y) {
unsigned int b = 1;
unsigned int c = x;
for (int i = 0; i < 32; i++) {
if (((y >> i) & 0x1) == 1)
b = mult(b, c);
c = mult(c, c);
}
return b;
}
__global__ void evaluate_function(unsigned int* res, unsigned int deg) {
res[blockIdx.x] = pow(blockIdx.x, deg);
}
//Without division (normalization)
__global__ void fft_device(const int* vec, int* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x] + vec[blockIdx.x ^ (1 << var_index)];
else
res[blockIdx.x] = vec[blockIdx.x] - vec[blockIdx.x ^ (1 << var_index)];
}
//Without division (normalization)
__global__ void fft_device(const long long* vec, long long* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x] + vec[blockIdx.x ^ (1 << var_index)];
else
res[blockIdx.x] = vec[blockIdx.x] - vec[blockIdx.x ^ (1 << var_index)];
}
__global__ void fmt_device(const int* vec, int* res, int var_index) {
if (((blockIdx.x >> var_index) & 0x1) == 0)
res[blockIdx.x] = vec[blockIdx.x];
else
res[blockIdx.x] = vec[blockIdx.x] ^ vec[blockIdx.x ^ (1 << var_index)];
}
__global__ void sqr_device(const int* vec, long long* res) {
long long x = vec[blockIdx.x];
res[blockIdx.x] = x * x;
}
__global__ void div_device(const int* vec, float* res, int d) {
res[blockIdx.x] = ((float)(vec[blockIdx.x])) / d;
}
__global__ void differencial_probability(const int* vec, int* res, int a) {
atomicAdd(&res[vec[blockIdx.x] ^ vec[blockIdx.x ^ a]], 1);
}
__global__ void plus_minus_analog(const int* vec, int* res) {
if (vec[blockIdx.x] == 0)
res[blockIdx.x] = 1;
else
res[blockIdx.x] = -1;
}
int disbalance(const int* W) {
if (W[0] >= 0)
return W[0];
else
return -W[0];
}
int degree(const int* A) {
unsigned int deg = 0;
for (int i = 1; i < (1 << 16); i++)
if ((A[i] != 0) && (deg < weights[i]))
deg = weights[i];
return (int)deg;
}
int nonlinearity(const int* W) {
int max_w = 0;
for (int i = 0; i < (1 << 16); i++) {
int abs_w = absolute(W[i]);
if (max_w < abs_w)
max_w = abs_w;
}
return (int)((1 << 15) - max_w / 2);
}
int correlation_immunity(const int* W) {
int cor = 0;
bool flag = true;
for (int w = 1; w <= 16; w++) {
for (int i = 1; i < (1 << 16); i++) {
if ((weights[i] == w) && (W[i] != 0))
flag = false;
}
if (flag)
cor++;
else
break;
}
return cor;
}
int coefficient_of_error_propagation(const int* T, int var_index) {
int k = 0;
for (int i = 0; i < (1 << 16); i++)
k += (T[i] ^ T[i ^ (1 << var_index)]);
return k;
}
int coefficient_of_error_propagation_in_mean(const int* T, int var_index) {
int k = 0;
for (int i = 0; i < (1 << 16); i++)
k += weights[(T[i] ^ T[i ^ (1 << var_index)])];
return k;
}
int sac(const int* W) {
long long* auto_cor_func = new long long[1 << 16];
long long* temp_1;
long long* temp_2;
int* temp_3;
cudaMalloc(&temp_1, (1 << 16) * sizeof(long long));
cudaMalloc(&temp_2, (1 << 16) * sizeof(long long));
cudaMalloc(&temp_3, (1 << 16) * sizeof(int));
cudaMemcpy(temp_3, W, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
sqr_device <<< (1 << 16), 1 >>> (temp_3, temp_1);
cudaDeviceSynchronize();
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(long long), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(auto_cor_func, temp_1, (1 << 16) * sizeof(long long), cudaMemcpyDeviceToHost);
cudaFree(temp_1);
cudaFree(temp_2);
cudaFree(temp_3);
int s = 0;
bool flag = true;
for (int w = 1; w <= 16; w++) {
for (int i = 1; i < (1 << 16); i++) {
if ((weights[i] == w) && (auto_cor_func[i] != 0))
flag = false;
}
if (flag)
s++;
else
break;
}
delete[] auto_cor_func;
return s;
}
bool zero_level_sac(int** T) {
for (int i = 0; i < 16; i++)
if (!zero_level_sac(T[i]))
return false;
return true;
}
bool zero_level_sac(int* T) {
for (int i = 0; i < 16; i++)
if (coefficient_of_error_propagation(T, i) != (1 << 15))
return false;
return true;
}
bool mean_sac(const int* T) {
bool flag = true;
for (int i = 0; i < 16; i++) {
int k = coefficient_of_error_propagation_in_mean(T, i);
if (k != 16 * (1 << 15)) {
flag = false;
break;
}
}
return flag;
}
float mdp(const int* T) {
int max = 0;
int* host_d = new int[1 << 16];
int* d;
int* temp;
cudaMalloc(&temp, (1 << 16) * sizeof(int));
cudaMalloc(&d, (1 << 16) * sizeof(int));
cudaMemcpy(temp, T, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int i = 0; i < (1 << 16); i++)
host_d[i] = 0;
for (int a = 1; a < (1 << 16); a++) {
cudaMemcpy(d, host_d, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
differencial_probability <<< (1 << 16), 1 >>> (temp, d, a);
cudaDeviceSynchronize();
cudaMemcpy(host_d, d, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
for (int i = 0; i < (1 << 16); i++) {
if (max < host_d[i]) {
max = host_d[i];
}
host_d[i] = 0;
}
}
delete[] host_d;
cudaFree(d);
cudaFree(temp);
return ((float)max) / (1 << 16);
}
//Without division (normalization)
void fft(int** vec, int** res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
cudaMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
}
cudaFree(temp_1);
cudaFree(temp_2);
}
//Without division (normalization)
void fft(int* vec, int* res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
cudaMemcpy(temp_1, vec, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res, temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
cudaFree(temp_1);
cudaFree(temp_2);
}
void fwt(int** vec, int** res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
cudaMemcpy(temp_2, vec[i], (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
plus_minus_analog <<< (1 << 16), 1 >>> (temp_2, temp_1);
cudaDeviceSynchronize();
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
}
cudaFree(temp_1);
cudaFree(temp_2);
}
void fwt(int* vec, int* res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
cudaMemcpy(temp_2, vec, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
plus_minus_analog <<< (1 << 16), 1 >>> (temp_2, temp_1);
cudaDeviceSynchronize();
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res, temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
cudaFree(temp_1);
cudaFree(temp_2);
}
void fmt(int** vec, int** res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
for (int i = 0; i < 16; i++) {
cudaMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fmt_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res[i], temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
}
cudaFree(temp_1);
cudaFree(temp_2);
}
void fmt(int* vec, int* res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
cudaMemcpy(temp_1, vec, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fmt_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
cudaMemcpy(res, temp_1, (1 << 16) * sizeof(int), cudaMemcpyDeviceToHost);
cudaFree(temp_1);
cudaFree(temp_2);
}
void fft_with_normalization(int** vec, float** res) {
int* temp_1;
int* temp_2;
float* temp_3;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
cudaMalloc(&temp_3, (1 << 16) * sizeof(float));
for (int i = 0; i < 16; i++) {
cudaMemcpy(temp_1, vec[i], (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
div_device <<< (1 << 16), 1 >>> (temp_1, temp_3, (1 << 16));
cudaDeviceSynchronize();
cudaMemcpy(res[i], temp_3, (1 << 16) * sizeof(float), cudaMemcpyDeviceToHost);
}
cudaFree(temp_1);
cudaFree(temp_2);
cudaFree(temp_3);
}
void fft_with_normalization(int* vec, float* res) {
int* temp_1;
int* temp_2;
cudaMalloc(&temp_1, (1 << 16) * sizeof(int));
cudaMalloc(&temp_2, (1 << 16) * sizeof(int));
cudaMemcpy(temp_1, vec, (1 << 16) * sizeof(int), cudaMemcpyHostToDevice);
for (int j = 0; j < 16; j++) {
fft_device <<< (1 << 16), 1 >>> (temp_1, temp_2, j);
cudaDeviceSynchronize();
cudaMemcpy(temp_1, temp_2, (1 << 16) * sizeof(int), cudaMemcpyDeviceToDevice);
}
float* temp_3;
cudaMalloc(&temp_3, (1 << 16) * sizeof(float));
div_device <<< (1 << 16), 1 >>> (temp_1, temp_3, (1 << 16));
cudaDeviceSynchronize();
cudaMemcpy(res, temp_3, (1 << 16) * sizeof(float), cudaMemcpyDeviceToHost);
cudaFree(temp_1);
cudaFree(temp_2);
cudaFree(temp_3);
}
int absolute(int x) {
if (x >= 0) {
return x;
}
else {
return -x;
}
}
int** split_coordinate(unsigned int* vec) {
int** res = new int*[16];
for (int i = 0; i < 16; i++)
res[i] = new int[1 << 16];
for (int i = 0; i < (1 << 16); i++) {
for (int j = 0; j < 16; j++) {
res[15 - j][i] = (int)((vec[i] >> j) & 0x1);
}
}
return res;
} |
822dec343728e398e24b14e96701c182217a8668.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <driver_functions.h>
#include "CycleTimer.h"
extern float toBW(int bytes, float sec);
__global__ void saxpy_kernel(int N, float alpha, float* x, float* y, float* result) {
// compute overall index from position of thread in current block,
// and given the block we are in
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index < N)
result[index] = alpha * x[index] + y[index];
}
void saxpyCuda(int N, float alpha, float* xarray, float* yarray, float* resultarray) {
int totalBytes = sizeof(float) * 3 * N;
int bufferSize = sizeof(float) * N;
// compute number of blocks and threads per block
const int threadsPerBlock = 512;
const int blocks = (N + threadsPerBlock - 1) / threadsPerBlock;
float* device_x;
float* device_y;
float* device_result;
//
// TODO: allocate device memory buffers on the GPU using
// hipMalloc. The started code issues warnings on build because
// these buffers are used in the call to saxpy_kernel below
// without being initialized.
//
hipMalloc(&device_x, bufferSize);
hipMalloc(&device_y, bufferSize);
hipMalloc(&device_result, bufferSize);
// start timing after allocation of device memory.
double startTime = CycleTimer::currentSeconds();
//
// TODO: copy input arrays to the GPU using hipMemcpy
//
hipMemcpy(device_x, xarray, bufferSize, hipMemcpyHostToDevice);
hipMemcpy(device_y, yarray, bufferSize, hipMemcpyHostToDevice);
//
// TODO: insert time here to begin timing only the kernel
//
double kernelStartTime = CycleTimer::currentSeconds();
// run saxpy_kernel on the GPU
hipLaunchKernelGGL(( saxpy_kernel), dim3(blocks), dim3(threadsPerBlock), 0, 0, N, alpha, device_x, device_y, device_result);
//
// TODO: insert timer here to time only the kernel. Since the
// kernel will run asynchronously with the calling CPU thread, you
// need to call hipDeviceSynchronize() before your timer to
// ensure the kernel running on the GPU has completed. (Otherwise
// you will incorrectly observe that almost no time elapses!)
//
hipDeviceSynchronize();
double kernelEndTime = CycleTimer::currentSeconds();
//
// TODO: copy result from GPU using hipMemcpy
//
hipMemcpy(resultarray, device_result, bufferSize, hipMemcpyDeviceToHost);
// end timing after result has been copied back into host memory.
// The time elapsed between startTime and endTime is the total
// time to copy data to the GPU, run the kernel, and copy the
// result back to the CPU
double endTime = CycleTimer::currentSeconds();
hipError_t errCode = hipPeekAtLastError();
if (errCode != hipSuccess) {
fprintf(stderr, "WARNING: A CUDA error occured: code=%d, %s\n", errCode, hipGetErrorString(errCode));
}
double overallDuration = endTime - startTime;
double kernelDuration = kernelEndTime - kernelStartTime;
double transferDuration = overallDuration - kernelDuration;
printf("Overall time: %.3f ms\t\t[%.3f GB/s]\n", 1000.f * overallDuration, toBW(totalBytes, overallDuration));
printf("Kernel time: %.3f ms\n", 1000.f * kernelDuration);
printf("Data transfer time: %.3f ms\t\t[%.3f GB/s]\n", 1000.f * transferDuration, toBW(totalBytes, transferDuration));
//
// TODO free memory buffers on the GPU
//
hipFree(device_x);
hipFree(device_y);
hipFree(device_result);
}
void printCudaInfo() {
// for fun, just print out some stats on the machine
int deviceCount = 0;
hipError_t err = hipGetDeviceCount(&deviceCount);
printf("---------------------------------------------------------\n");
printf("Found %d CUDA devices\n", deviceCount);
for (int i=0; i<deviceCount; i++) {
hipDeviceProp_t deviceProps;
hipGetDeviceProperties(&deviceProps, i);
printf("Device %d: %s\n", i, deviceProps.name);
printf(" SMs: %d\n", deviceProps.multiProcessorCount);
printf(" Global mem: %.0f MB\n",
static_cast<float>(deviceProps.totalGlobalMem) / (1024 * 1024));
printf(" CUDA Cap: %d.%d\n", deviceProps.major, deviceProps.minor);
}
printf("---------------------------------------------------------\n");
}
| 822dec343728e398e24b14e96701c182217a8668.cu | #include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <driver_functions.h>
#include "CycleTimer.h"
extern float toBW(int bytes, float sec);
__global__ void saxpy_kernel(int N, float alpha, float* x, float* y, float* result) {
// compute overall index from position of thread in current block,
// and given the block we are in
int index = blockIdx.x * blockDim.x + threadIdx.x;
if (index < N)
result[index] = alpha * x[index] + y[index];
}
void saxpyCuda(int N, float alpha, float* xarray, float* yarray, float* resultarray) {
int totalBytes = sizeof(float) * 3 * N;
int bufferSize = sizeof(float) * N;
// compute number of blocks and threads per block
const int threadsPerBlock = 512;
const int blocks = (N + threadsPerBlock - 1) / threadsPerBlock;
float* device_x;
float* device_y;
float* device_result;
//
// TODO: allocate device memory buffers on the GPU using
// cudaMalloc. The started code issues warnings on build because
// these buffers are used in the call to saxpy_kernel below
// without being initialized.
//
cudaMalloc(&device_x, bufferSize);
cudaMalloc(&device_y, bufferSize);
cudaMalloc(&device_result, bufferSize);
// start timing after allocation of device memory.
double startTime = CycleTimer::currentSeconds();
//
// TODO: copy input arrays to the GPU using cudaMemcpy
//
cudaMemcpy(device_x, xarray, bufferSize, cudaMemcpyHostToDevice);
cudaMemcpy(device_y, yarray, bufferSize, cudaMemcpyHostToDevice);
//
// TODO: insert time here to begin timing only the kernel
//
double kernelStartTime = CycleTimer::currentSeconds();
// run saxpy_kernel on the GPU
saxpy_kernel<<<blocks, threadsPerBlock>>>(N, alpha, device_x, device_y, device_result);
//
// TODO: insert timer here to time only the kernel. Since the
// kernel will run asynchronously with the calling CPU thread, you
// need to call cudaThreadSynchronize() before your timer to
// ensure the kernel running on the GPU has completed. (Otherwise
// you will incorrectly observe that almost no time elapses!)
//
cudaThreadSynchronize();
double kernelEndTime = CycleTimer::currentSeconds();
//
// TODO: copy result from GPU using cudaMemcpy
//
cudaMemcpy(resultarray, device_result, bufferSize, cudaMemcpyDeviceToHost);
// end timing after result has been copied back into host memory.
// The time elapsed between startTime and endTime is the total
// time to copy data to the GPU, run the kernel, and copy the
// result back to the CPU
double endTime = CycleTimer::currentSeconds();
cudaError_t errCode = cudaPeekAtLastError();
if (errCode != cudaSuccess) {
fprintf(stderr, "WARNING: A CUDA error occured: code=%d, %s\n", errCode, cudaGetErrorString(errCode));
}
double overallDuration = endTime - startTime;
double kernelDuration = kernelEndTime - kernelStartTime;
double transferDuration = overallDuration - kernelDuration;
printf("Overall time: %.3f ms\t\t[%.3f GB/s]\n", 1000.f * overallDuration, toBW(totalBytes, overallDuration));
printf("Kernel time: %.3f ms\n", 1000.f * kernelDuration);
printf("Data transfer time: %.3f ms\t\t[%.3f GB/s]\n", 1000.f * transferDuration, toBW(totalBytes, transferDuration));
//
// TODO free memory buffers on the GPU
//
cudaFree(device_x);
cudaFree(device_y);
cudaFree(device_result);
}
void printCudaInfo() {
// for fun, just print out some stats on the machine
int deviceCount = 0;
cudaError_t err = cudaGetDeviceCount(&deviceCount);
printf("---------------------------------------------------------\n");
printf("Found %d CUDA devices\n", deviceCount);
for (int i=0; i<deviceCount; i++) {
cudaDeviceProp deviceProps;
cudaGetDeviceProperties(&deviceProps, i);
printf("Device %d: %s\n", i, deviceProps.name);
printf(" SMs: %d\n", deviceProps.multiProcessorCount);
printf(" Global mem: %.0f MB\n",
static_cast<float>(deviceProps.totalGlobalMem) / (1024 * 1024));
printf(" CUDA Cap: %d.%d\n", deviceProps.major, deviceProps.minor);
}
printf("---------------------------------------------------------\n");
}
|
b59a000104d25015ae8108a51425c9bc2242cf65.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <sys/time.h>
#define P (1<<16)
__global__ void copymat_x(int m, int n, int* A, int *B)
{
int idx, ix;
int iy = threadIdx.y + blockIdx.y*blockDim.y;
if (iy < n)
for(ix = 0; ix < P; ix++) {
idx = iy*m + ix;
B[idx] = A[idx];
}
}
__global__ void copymat_y(int m, int n, int* A, int *B)
{
int ix = threadIdx.x + blockIdx.x*blockDim.x;
int idx, iy;
if (ix < m)
for(iy = 0; iy < P; iy++) {
idx = iy*m + ix;
B[idx] = A[idx];
}
}
double cpuSecond()
{
struct timeval tp;
gettimeofday(&tp,NULL);
return (double) tp.tv_sec + (double)tp.tv_usec*1e-6;
}
int main(int argc, char** argv)
{
size_t m = 1 << 16;
size_t n = 1 << 16;
size_t nbytes = m*n*sizeof(int);
printf("P = %d\n",P);
int* A = (int*) malloc(nbytes);
int *B = (int*) malloc(nbytes);
memset(A,0,nbytes);
int *dev_A, *dev_B;
hipMalloc((void**) &dev_A, nbytes);
hipMalloc((void**) &dev_B, nbytes);
hipMemcpy(dev_A, A, nbytes, hipMemcpyHostToDevice);
#if 0
/* One thread per row */
dim3 block(1,32);
dim3 grid(1,(n+block.y-1)/block.y);
double start = cpuSecond();
hipLaunchKernelGGL(( copymat_x), dim3(grid),dim3(block), 0, 0, m,n,dev_A, dev_B);
#else
/* One thread per column */
dim3 block(32,1);
dim3 grid((m+block.x-1)/block.x,1);
double start = cpuSecond();
hipLaunchKernelGGL(( copymat_y), dim3(grid),dim3(block), 0, 0, m,n,dev_A, dev_B);
#endif
hipDeviceSynchronize();
double etime = cpuSecond() - start;
printf("GPU Kernel %10.3g (s)\n",etime);
hipFree(dev_A);
hipFree(dev_B);
free(A);
free(B);
hipDeviceReset();
}
| b59a000104d25015ae8108a51425c9bc2242cf65.cu | #include <stdio.h>
#include <sys/time.h>
#define P (1<<16)
__global__ void copymat_x(int m, int n, int* A, int *B)
{
int idx, ix;
int iy = threadIdx.y + blockIdx.y*blockDim.y;
if (iy < n)
for(ix = 0; ix < P; ix++) {
idx = iy*m + ix;
B[idx] = A[idx];
}
}
__global__ void copymat_y(int m, int n, int* A, int *B)
{
int ix = threadIdx.x + blockIdx.x*blockDim.x;
int idx, iy;
if (ix < m)
for(iy = 0; iy < P; iy++) {
idx = iy*m + ix;
B[idx] = A[idx];
}
}
double cpuSecond()
{
struct timeval tp;
gettimeofday(&tp,NULL);
return (double) tp.tv_sec + (double)tp.tv_usec*1e-6;
}
int main(int argc, char** argv)
{
size_t m = 1 << 16;
size_t n = 1 << 16;
size_t nbytes = m*n*sizeof(int);
printf("P = %d\n",P);
int* A = (int*) malloc(nbytes);
int *B = (int*) malloc(nbytes);
memset(A,0,nbytes);
int *dev_A, *dev_B;
cudaMalloc((void**) &dev_A, nbytes);
cudaMalloc((void**) &dev_B, nbytes);
cudaMemcpy(dev_A, A, nbytes, cudaMemcpyHostToDevice);
#if 0
/* One thread per row */
dim3 block(1,32);
dim3 grid(1,(n+block.y-1)/block.y);
double start = cpuSecond();
copymat_x<<<grid,block>>>(m,n,dev_A, dev_B);
#else
/* One thread per column */
dim3 block(32,1);
dim3 grid((m+block.x-1)/block.x,1);
double start = cpuSecond();
copymat_y<<<grid,block>>>(m,n,dev_A, dev_B);
#endif
cudaDeviceSynchronize();
double etime = cpuSecond() - start;
printf("GPU Kernel %10.3g (s)\n",etime);
cudaFree(dev_A);
cudaFree(dev_B);
free(A);
free(B);
cudaDeviceReset();
}
|
94c0cc4095ac1817c32ace2a2ad09e0f9f642cf1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include "sys/time.h"
#define GPU_ID 0
// #define USE_SINGLE_PRECISION /* Comment this line using "!" if you want to use double precision. */
#ifdef USE_SINGLE_PRECISION
#define DAT float
#define PRECIS 4
#else
#define DAT double
#define PRECIS 8
#endif
#define zeros(A,nx,ny,nz) DAT *A##_d,*A##_h; A##_h = (DAT*)malloc((nx)*(ny)*(nz)*sizeof(DAT)); \
for(i=0; i < (nx)*(ny)*(nz); i++){ A##_h[i]=(DAT)0.0; } \
hipMalloc(&A##_d ,(nx)*(ny)*(nz)*sizeof(DAT)); \
hipMemcpy( A##_d,A##_h,(nx)*(ny)*(nz)*sizeof(DAT),hipMemcpyHostToDevice);
#define free_all(A) free(A##_h);hipFree(A##_d);
#define BLOCK_X 32
#define BLOCK_Y 16
#define BLOCK_Z 2
#define GRID_X 32
#define GRID_Y 64
#define GRID_Z 128
const int nx = GRID_X*BLOCK_X;
const int ny = GRID_Y*BLOCK_Y;
const int nz = GRID_Z*BLOCK_Z;
const int nt = 100;
// Timer
double timer_start = 0;
double cpu_sec(){ struct timeval tp; gettimeofday(&tp,NULL); return tp.tv_sec+1e-6*tp.tv_usec; }
void tic(){ timer_start = cpu_sec(); }
double toc(){ return cpu_sec()-timer_start; }
void tim(const char *what, double n){ double s=toc(); printf("%s: %8.3f seconds",what,s);if(n>0)printf(", %8.3f GB/s", n/s); printf("\n"); }
void timPrint(const char *what, double n, int nx, int ny, int nz){
double s=toc();
printf("%s: %8.3f seconds",what,s);if(n>0)printf(", %8.3f GB/s", n/s); printf("\n");
FILE*fid; fid=fopen("PERF_memcpy.dat","a"); fprintf(fid,"nx=%d ny=%d nz=%d GBs=%1.4f time_s=%1.4f \n", nx, ny, nz, n/s, s); fclose(fid);
}
void clean_cuda(){
hipError_t ce = hipGetLastError();
if(ce != hipSuccess){ printf("ERROR launching GPU C-CUDA program: %s\n", hipGetErrorString(ce)); hipDeviceReset();}
}
__global__ void memcopy(DAT*A, DAT*B, DAT*C, const int nx,const int ny,const int nz){
int ix = blockIdx.x*blockDim.x + threadIdx.x; // thread ID, dimension x
int iy = blockIdx.y*blockDim.y + threadIdx.y; // thread ID, dimension x
int iz = blockIdx.z*blockDim.z + threadIdx.z; // thread ID, dimension x
if (iz<nz && iy<ny && ix<nx) A[ix + iy*nx + iz*nx*ny] = B[ix + iy*nx + iz*nx*ny] + C[ix + iy*nx + iz*nx*ny];
}
////////// main //////////
int main(){
size_t i, it, N=nx*ny*nz, mem=3*N*sizeof(DAT);
dim3 grid, block;
block.x = BLOCK_X; block.y = BLOCK_Y; block.z = BLOCK_Z;
grid.x = GRID_X; grid.y = GRID_Y; grid.z = GRID_Z;
int gpu_id=-1; gpu_id=GPU_ID; hipSetDevice(gpu_id); hipGetDevice(&gpu_id);
hipDeviceReset(); hipDeviceSetCacheConfig(hipFuncCachePreferL1); // set L1 to prefered
printf("Process uses GPU with id %d.\n",gpu_id);
printf("%dx%dx%d, %1.3f GB, %d iterations.\n", nx,ny,nz, mem/1024./1024./1024., nt);
printf("launching (%dx%dx%d) grid of (%dx%dx%d) blocks.\n", grid.x, grid.y, grid.z, block.x, block.y, block.z);
// initializations
zeros(A, nx,ny,nz);
zeros(B, nx,ny,nz);
zeros(C, nx,ny,nz);
// time loop
for(it=0; it<nt; it++){
if (it==10){ tic(); }
hipLaunchKernelGGL(( memcopy), dim3(grid), dim3(block), 0, 0, A_d,B_d,C_d,nx,ny,nz);
hipDeviceSynchronize();
}
// tim("Performance", mem*(nt-3)*2/1024./1024./1024.);
timPrint("Performance", mem*(nt-10)/1024./1024./1024.,nx,ny,nz);
free_all(A);
free_all(B);
free_all(C);
clean_cuda();
return 0;
}
| 94c0cc4095ac1817c32ace2a2ad09e0f9f642cf1.cu | #include <stdio.h>
#include "sys/time.h"
#define GPU_ID 0
// #define USE_SINGLE_PRECISION /* Comment this line using "!" if you want to use double precision. */
#ifdef USE_SINGLE_PRECISION
#define DAT float
#define PRECIS 4
#else
#define DAT double
#define PRECIS 8
#endif
#define zeros(A,nx,ny,nz) DAT *A##_d,*A##_h; A##_h = (DAT*)malloc((nx)*(ny)*(nz)*sizeof(DAT)); \
for(i=0; i < (nx)*(ny)*(nz); i++){ A##_h[i]=(DAT)0.0; } \
cudaMalloc(&A##_d ,(nx)*(ny)*(nz)*sizeof(DAT)); \
cudaMemcpy( A##_d,A##_h,(nx)*(ny)*(nz)*sizeof(DAT),cudaMemcpyHostToDevice);
#define free_all(A) free(A##_h);cudaFree(A##_d);
#define BLOCK_X 32
#define BLOCK_Y 16
#define BLOCK_Z 2
#define GRID_X 32
#define GRID_Y 64
#define GRID_Z 128
const int nx = GRID_X*BLOCK_X;
const int ny = GRID_Y*BLOCK_Y;
const int nz = GRID_Z*BLOCK_Z;
const int nt = 100;
// Timer
double timer_start = 0;
double cpu_sec(){ struct timeval tp; gettimeofday(&tp,NULL); return tp.tv_sec+1e-6*tp.tv_usec; }
void tic(){ timer_start = cpu_sec(); }
double toc(){ return cpu_sec()-timer_start; }
void tim(const char *what, double n){ double s=toc(); printf("%s: %8.3f seconds",what,s);if(n>0)printf(", %8.3f GB/s", n/s); printf("\n"); }
void timPrint(const char *what, double n, int nx, int ny, int nz){
double s=toc();
printf("%s: %8.3f seconds",what,s);if(n>0)printf(", %8.3f GB/s", n/s); printf("\n");
FILE*fid; fid=fopen("PERF_memcpy.dat","a"); fprintf(fid,"nx=%d ny=%d nz=%d GBs=%1.4f time_s=%1.4f \n", nx, ny, nz, n/s, s); fclose(fid);
}
void clean_cuda(){
cudaError_t ce = cudaGetLastError();
if(ce != cudaSuccess){ printf("ERROR launching GPU C-CUDA program: %s\n", cudaGetErrorString(ce)); cudaDeviceReset();}
}
__global__ void memcopy(DAT*A, DAT*B, DAT*C, const int nx,const int ny,const int nz){
int ix = blockIdx.x*blockDim.x + threadIdx.x; // thread ID, dimension x
int iy = blockIdx.y*blockDim.y + threadIdx.y; // thread ID, dimension x
int iz = blockIdx.z*blockDim.z + threadIdx.z; // thread ID, dimension x
if (iz<nz && iy<ny && ix<nx) A[ix + iy*nx + iz*nx*ny] = B[ix + iy*nx + iz*nx*ny] + C[ix + iy*nx + iz*nx*ny];
}
////////// main //////////
int main(){
size_t i, it, N=nx*ny*nz, mem=3*N*sizeof(DAT);
dim3 grid, block;
block.x = BLOCK_X; block.y = BLOCK_Y; block.z = BLOCK_Z;
grid.x = GRID_X; grid.y = GRID_Y; grid.z = GRID_Z;
int gpu_id=-1; gpu_id=GPU_ID; cudaSetDevice(gpu_id); cudaGetDevice(&gpu_id);
cudaDeviceReset(); cudaDeviceSetCacheConfig(cudaFuncCachePreferL1); // set L1 to prefered
printf("Process uses GPU with id %d.\n",gpu_id);
printf("%dx%dx%d, %1.3f GB, %d iterations.\n", nx,ny,nz, mem/1024./1024./1024., nt);
printf("launching (%dx%dx%d) grid of (%dx%dx%d) blocks.\n", grid.x, grid.y, grid.z, block.x, block.y, block.z);
// initializations
zeros(A, nx,ny,nz);
zeros(B, nx,ny,nz);
zeros(C, nx,ny,nz);
// time loop
for(it=0; it<nt; it++){
if (it==10){ tic(); }
memcopy<<<grid, block>>>(A_d,B_d,C_d,nx,ny,nz);
cudaDeviceSynchronize();
}
// tim("Performance", mem*(nt-3)*2/1024./1024./1024.);
timPrint("Performance", mem*(nt-10)/1024./1024./1024.,nx,ny,nz);
free_all(A);
free_all(B);
free_all(C);
clean_cuda();
return 0;
}
|
a97a9525aa42aa3da663803844f594910b4b79fa.hip | // !!! This is a file automatically generated by hipify!!!
#include "THZCTensorCopy.h"
#include "THZCTensorMath.h"
#include "THZCGeneral.h"
#include "THZCGeneral.cuh"
// #include "THZCTensorRandom.h"
#include "THZCApply.cuh"
#include "THZCReduce.cuh"
#include "THZCReduceAll.cuh"
#include <thrust/functional.h>
// #include <thrust/complex.h>
// typedef thrust::complex<float> ccx;
// ccx toCcx(cx val) {
// return ccx(crealf(val), cimagf(val));
// }
struct Plus {
__host__ __device__
ccx operator()(const ccx& v1, const ccx& v2) {
return v1 + v2;
}
};
struct Mul {
__host__ __device__
ccx operator()(const ccx& v1, const ccx& v2) {
return v1 * v2;
}
};
struct TensorCPowOp {
__device__ __forceinline__ void operator()(ccx* out, ccx* in) {
*out = thrust::pow((ccx) *out, (ccx) *in);
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out = thrust::pow((ccx) *in1, (ccx) *in2);
}
};
struct TensorDivOp {
__device__ __forceinline__ void operator()(ccx* out, ccx* in) {
ccx* o = (ccx*) out;
ccx* i = (ccx*) in;
*o /= *i;
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
ccx* o = (ccx*) out;
ccx* i1 = (ccx*) in1;
ccx* i2 = (ccx*) in2;
*o = *i1 / *i2;
}
};
struct AbsOp {
__host__ __device__
float operator()(ccx v) {
return thrust::abs(v);
}
};
struct TensorAddCDivOp {
TensorAddCDivOp(float v) :
val(v) {
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out += val * *in1 / *in2;
}
float val;
};
struct TensorAddCMulOp {
TensorAddCMulOp(float v) :
val(v) {
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out += val * *in1 * *in2;
}
float val;
};
void THZCudaTensor_reshape(THCState *state, THZCudaTensor *r_, THZCudaTensor *t,
THLongStorage *size) {
THAssert(THZCudaTensor_checkGPU(state, 2, r_, t));
THZCudaTensor_resize(state, r_, size, NULL);
THZCudaTensor_copy(state, r_, t);
}
long THZCudaTensor_numel(THCState *state, THZCudaTensor *t) {
return THZCudaTensor_nElement(state, t);
}
void THZCudaTensor_catArray(THCState *state, THZCudaTensor *result,
THZCudaTensor **inputs, int numInputs, int dimension) {
THLongStorage *size;
int i, j;
long offset;
int ndim = dimension + 1;
for (i = 0; i < numInputs; i++) {
ndim = THMax(ndim, THZCudaTensor_nDimension(state, inputs[i]));
}
THArgCheck(numInputs > 0, 3, "invalid number of inputs %d", numInputs);
THArgCheck(dimension >= 0, 4, "invalid dimension %d", dimension + 1);
size = THLongStorage_newWithSize(ndim);
for (i = 0; i < ndim; i++) {
long dimSize =
i < THZCudaTensor_nDimension(state, inputs[0]) ?
THZCudaTensor_size(state, inputs[0], i) : 1;
if (i == dimension) {
for (j = 1; j < numInputs; j++) {
dimSize +=
i < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], i) : 1;
}
} else {
for (j = 1; j < numInputs; j++) {
if (dimSize
!= (i < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], i) : 1)) {
THLongStorage_free(size);
THError("inconsistent tensor sizes");
}
}
}
size->data[i] = dimSize;
}
THZCudaTensor_resize(state, result, size, NULL);
THLongStorage_free(size);
offset = 0;
for (j = 0; j < numInputs; j++) {
long dimSize =
dimension < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], dimension) : 1;
THZCudaTensor *nt = THZCudaTensor_newWithTensor(state, result);
THZCudaTensor_narrow(state, nt, NULL, dimension, offset, dimSize);
THZCudaTensor_copy(state, nt, inputs[j]);
THZCudaTensor_free(state, nt);
offset += dimSize;
}
}
void THZCudaTensor_cat(THCState *state, THZCudaTensor *result,
THZCudaTensor *ta, THZCudaTensor *tb, int dimension) {
THZCudaTensor* inputs[2];
inputs[0] = ta;
inputs[1] = tb;
THZCudaTensor_catArray(state, result, inputs, 2, dimension);
}
void THCudaTensor_cpow(THCState *state, THZCudaTensor *self_,
THZCudaTensor *src1, THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 3, self_, src1, src2));
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (self_ == src1) {
// self = pow(self, src2)
if (!THZCudaTensor_pointwiseApply2(state, self_, src2,
TensorCPowOp())) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
} else {
THZCudaTensor_resizeAs(state, self_, src1);
// self = pow(src1, src2)
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorCPowOp())) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
}
THCudaCheck(hipGetLastError());
}
// THZC_API void THZCudaTensor_cdiv(THCState* state, THZCudaTensor *self_,
// THZCudaTensor *src1, THZCudaTensor *src2) {
// THAssert(THZCudaTensor_checkGPU(state, 3, self_, src1, src2));
// THArgCheck(
// THZCudaTensor_nElement(state, src1)
// == THZCudaTensor_nElement(state, src2), 3,
// "sizes do not match");
//
// if (self_ == src1) {
// // self *= src2
// if (!THZCudaTensor_pointwiseApply2(state, self_, src2, TensorDivOp())) {
// THArgCheck(false, 2, CUTORCH_DIM_WARNING);
// }
// } else {
// THZCudaTensor_resizeAs(state, self_, src1);
//
// // self = src1 * src2
// if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
// TensorDivOp())) {
// THArgCheck(false, 2, CUTORCH_DIM_WARNING);
// }
// }
//
// THZCudaCheck(hipGetLastError());
// }
THZC_API void THZCudaTensor_addcmul(THCState *state, THZCudaTensor *self_,
THZCudaTensor *t, float value, THZCudaTensor *src1,
THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 4, self_, t, src1, src2));
if (self_ != t) {
THZCudaTensor_resizeAs(state, self_, t);
THZCudaTensor_copy(state, self_, t);
} else {
THArgCheck(
THZCudaTensor_nElement(state, self_)
== THZCudaTensor_nElement(state, src1), 1,
"sizes do not match");
}
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorAddCMulOp(value))) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
}
THZC_API void THZCudaTensor_addcdiv(THCState *state, THZCudaTensor *self_,
THZCudaTensor *t, float value, THZCudaTensor *src1,
THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 4, self_, t, src1, src2));
if (self_ != t) {
THZCudaTensor_resizeAs(state, self_, t);
THZCudaTensor_copy(state, self_, t);
} else {
THArgCheck(
THZCudaTensor_nElement(state, self_)
== THZCudaTensor_nElement(state, src1), 1,
"sizes do not match");
}
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorAddCDivOp(value))) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
}
THZC_API float THZCudaTensor_minall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
float val = (float) THInf;
if (!THZCudaTensor_reduceAllf(state, self, AbsOp(),
thrust::minimum<float>(), (float) THInf, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
return val;
}
THZC_API float THZCudaTensor_maxall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
float val = -THInf;
if (!THZCudaTensor_reduceAllf(state, self, AbsOp(),
thrust::maximum<float>(), (float) -THInf, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
return val;
}
THZC_API cx THZCudaTensor_sumall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
ccx val = 0.0f;
if (!THZCudaTensor_reduceAll(state, self, thrust::identity<ccx>(), Plus(), 0.0f, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
return val.real() + val.imag() * I;
}
THZC_API cx THZCudaTensor_prodall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
ccx val = 1.0f;
if (!THZCudaTensor_reduceAll(state, self, thrust::identity<ccx>(), Mul(),
1.0f, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
return val.real() + val.imag() * I;
}
THZC_API void THZCudaTensor_sum(THCState* state, THZCudaTensor *self, THZCudaTensor *src,
long dimension) {
THAssert(THZCudaTensor_checkGPU(state, 2, self, src));
if (!THZCudaTensor_reduceDim(state, self, src, thrust::identity<ccx>(),
Plus(), 0.0f, dimension)) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
}
THZC_API void THZCudaTensor_prod(THCState* state, THZCudaTensor *self,
THZCudaTensor *src, long dimension) {
THAssert(THZCudaTensor_checkGPU(state, 2, self, src));
if (!THZCudaTensor_reduceDim(state, self, src, thrust::identity<ccx>(),
Mul(), 1.0f, dimension)) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(hipGetLastError());
}
| a97a9525aa42aa3da663803844f594910b4b79fa.cu | #include "THZCTensorCopy.h"
#include "THZCTensorMath.h"
#include "THZCGeneral.h"
#include "THZCGeneral.cuh"
// #include "THZCTensorRandom.h"
#include "THZCApply.cuh"
#include "THZCReduce.cuh"
#include "THZCReduceAll.cuh"
#include <thrust/functional.h>
// #include <thrust/complex.h>
// typedef thrust::complex<float> ccx;
// ccx toCcx(cx val) {
// return ccx(crealf(val), cimagf(val));
// }
struct Plus {
__host__ __device__
ccx operator()(const ccx& v1, const ccx& v2) {
return v1 + v2;
}
};
struct Mul {
__host__ __device__
ccx operator()(const ccx& v1, const ccx& v2) {
return v1 * v2;
}
};
struct TensorCPowOp {
__device__ __forceinline__ void operator()(ccx* out, ccx* in) {
*out = thrust::pow((ccx) *out, (ccx) *in);
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out = thrust::pow((ccx) *in1, (ccx) *in2);
}
};
struct TensorDivOp {
__device__ __forceinline__ void operator()(ccx* out, ccx* in) {
ccx* o = (ccx*) out;
ccx* i = (ccx*) in;
*o /= *i;
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
ccx* o = (ccx*) out;
ccx* i1 = (ccx*) in1;
ccx* i2 = (ccx*) in2;
*o = *i1 / *i2;
}
};
struct AbsOp {
__host__ __device__
float operator()(ccx v) {
return thrust::abs(v);
}
};
struct TensorAddCDivOp {
TensorAddCDivOp(float v) :
val(v) {
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out += val * *in1 / *in2;
}
float val;
};
struct TensorAddCMulOp {
TensorAddCMulOp(float v) :
val(v) {
}
__device__ __forceinline__ void operator()(ccx* out, ccx* in1, ccx* in2) {
*out += val * *in1 * *in2;
}
float val;
};
void THZCudaTensor_reshape(THCState *state, THZCudaTensor *r_, THZCudaTensor *t,
THLongStorage *size) {
THAssert(THZCudaTensor_checkGPU(state, 2, r_, t));
THZCudaTensor_resize(state, r_, size, NULL);
THZCudaTensor_copy(state, r_, t);
}
long THZCudaTensor_numel(THCState *state, THZCudaTensor *t) {
return THZCudaTensor_nElement(state, t);
}
void THZCudaTensor_catArray(THCState *state, THZCudaTensor *result,
THZCudaTensor **inputs, int numInputs, int dimension) {
THLongStorage *size;
int i, j;
long offset;
int ndim = dimension + 1;
for (i = 0; i < numInputs; i++) {
ndim = THMax(ndim, THZCudaTensor_nDimension(state, inputs[i]));
}
THArgCheck(numInputs > 0, 3, "invalid number of inputs %d", numInputs);
THArgCheck(dimension >= 0, 4, "invalid dimension %d", dimension + 1);
size = THLongStorage_newWithSize(ndim);
for (i = 0; i < ndim; i++) {
long dimSize =
i < THZCudaTensor_nDimension(state, inputs[0]) ?
THZCudaTensor_size(state, inputs[0], i) : 1;
if (i == dimension) {
for (j = 1; j < numInputs; j++) {
dimSize +=
i < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], i) : 1;
}
} else {
for (j = 1; j < numInputs; j++) {
if (dimSize
!= (i < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], i) : 1)) {
THLongStorage_free(size);
THError("inconsistent tensor sizes");
}
}
}
size->data[i] = dimSize;
}
THZCudaTensor_resize(state, result, size, NULL);
THLongStorage_free(size);
offset = 0;
for (j = 0; j < numInputs; j++) {
long dimSize =
dimension < THZCudaTensor_nDimension(state, inputs[j]) ?
THZCudaTensor_size(state, inputs[j], dimension) : 1;
THZCudaTensor *nt = THZCudaTensor_newWithTensor(state, result);
THZCudaTensor_narrow(state, nt, NULL, dimension, offset, dimSize);
THZCudaTensor_copy(state, nt, inputs[j]);
THZCudaTensor_free(state, nt);
offset += dimSize;
}
}
void THZCudaTensor_cat(THCState *state, THZCudaTensor *result,
THZCudaTensor *ta, THZCudaTensor *tb, int dimension) {
THZCudaTensor* inputs[2];
inputs[0] = ta;
inputs[1] = tb;
THZCudaTensor_catArray(state, result, inputs, 2, dimension);
}
void THCudaTensor_cpow(THCState *state, THZCudaTensor *self_,
THZCudaTensor *src1, THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 3, self_, src1, src2));
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (self_ == src1) {
// self = pow(self, src2)
if (!THZCudaTensor_pointwiseApply2(state, self_, src2,
TensorCPowOp())) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
} else {
THZCudaTensor_resizeAs(state, self_, src1);
// self = pow(src1, src2)
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorCPowOp())) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
}
THCudaCheck(cudaGetLastError());
}
// THZC_API void THZCudaTensor_cdiv(THCState* state, THZCudaTensor *self_,
// THZCudaTensor *src1, THZCudaTensor *src2) {
// THAssert(THZCudaTensor_checkGPU(state, 3, self_, src1, src2));
// THArgCheck(
// THZCudaTensor_nElement(state, src1)
// == THZCudaTensor_nElement(state, src2), 3,
// "sizes do not match");
//
// if (self_ == src1) {
// // self *= src2
// if (!THZCudaTensor_pointwiseApply2(state, self_, src2, TensorDivOp())) {
// THArgCheck(false, 2, CUTORCH_DIM_WARNING);
// }
// } else {
// THZCudaTensor_resizeAs(state, self_, src1);
//
// // self = src1 * src2
// if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
// TensorDivOp())) {
// THArgCheck(false, 2, CUTORCH_DIM_WARNING);
// }
// }
//
// THZCudaCheck(cudaGetLastError());
// }
THZC_API void THZCudaTensor_addcmul(THCState *state, THZCudaTensor *self_,
THZCudaTensor *t, float value, THZCudaTensor *src1,
THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 4, self_, t, src1, src2));
if (self_ != t) {
THZCudaTensor_resizeAs(state, self_, t);
THZCudaTensor_copy(state, self_, t);
} else {
THArgCheck(
THZCudaTensor_nElement(state, self_)
== THZCudaTensor_nElement(state, src1), 1,
"sizes do not match");
}
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorAddCMulOp(value))) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
}
THZC_API void THZCudaTensor_addcdiv(THCState *state, THZCudaTensor *self_,
THZCudaTensor *t, float value, THZCudaTensor *src1,
THZCudaTensor *src2) {
THAssert(THZCudaTensor_checkGPU(state, 4, self_, t, src1, src2));
if (self_ != t) {
THZCudaTensor_resizeAs(state, self_, t);
THZCudaTensor_copy(state, self_, t);
} else {
THArgCheck(
THZCudaTensor_nElement(state, self_)
== THZCudaTensor_nElement(state, src1), 1,
"sizes do not match");
}
THArgCheck(
THZCudaTensor_nElement(state, src1)
== THZCudaTensor_nElement(state, src2), 3,
"sizes do not match");
if (!THZCudaTensor_pointwiseApply3(state, self_, src1, src2,
TensorAddCDivOp(value))) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
}
THZC_API float THZCudaTensor_minall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
float val = (float) THInf;
if (!THZCudaTensor_reduceAllf(state, self, AbsOp(),
thrust::minimum<float>(), (float) THInf, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
return val;
}
THZC_API float THZCudaTensor_maxall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
float val = -THInf;
if (!THZCudaTensor_reduceAllf(state, self, AbsOp(),
thrust::maximum<float>(), (float) -THInf, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
return val;
}
THZC_API cx THZCudaTensor_sumall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
ccx val = 0.0f;
if (!THZCudaTensor_reduceAll(state, self, thrust::identity<ccx>(), Plus(), 0.0f, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
return val.real() + val.imag() * I;
}
THZC_API cx THZCudaTensor_prodall(THCState *state, THZCudaTensor *self) {
THAssert(THZCudaTensor_checkGPU(state, 1, self));
ccx val = 1.0f;
if (!THZCudaTensor_reduceAll(state, self, thrust::identity<ccx>(), Mul(),
1.0f, &val, 0)) {
THArgCheck(false, 1, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
return val.real() + val.imag() * I;
}
THZC_API void THZCudaTensor_sum(THCState* state, THZCudaTensor *self, THZCudaTensor *src,
long dimension) {
THAssert(THZCudaTensor_checkGPU(state, 2, self, src));
if (!THZCudaTensor_reduceDim(state, self, src, thrust::identity<ccx>(),
Plus(), 0.0f, dimension)) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
}
THZC_API void THZCudaTensor_prod(THCState* state, THZCudaTensor *self,
THZCudaTensor *src, long dimension) {
THAssert(THZCudaTensor_checkGPU(state, 2, self, src));
if (!THZCudaTensor_reduceDim(state, self, src, thrust::identity<ccx>(),
Mul(), 1.0f, dimension)) {
THArgCheck(false, 2, CUTORCH_DIM_WARNING);
}
THZCudaCheck(cudaGetLastError());
}
|
3c9b16d701cf7a0c0bc370a3107ed37eea717efa.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
* Copyright 1993-2020 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
/*
* This sample illustrates basic usage of binary partition cooperative groups
* within the thread block tile when divergent path exists.
* 1.) Each thread loads a value from random array.
* 2.) then checks if it is odd or even.
* 3.) create binary partition group based on the above predicate
* 4.) we count the number of odd/even in the group based on size of the binary groups
* 5.) write it global counter of odd.
* 6.) sum the values loaded by individual threads(using reduce) and write it to global
* even & odd elements sum.
*
* **NOTE** : binary_partition results in splitting warp into divergent thread groups
this is not good from performance perspective, but in cases where warp
divergence is inevitable one can use binary_partition group.
*/
#include <stdio.h>
#include <hip/hip_cooperative_groups.h>
#include <cooperative_groups/reduce.h>
#include <helper_cuda.h>
namespace cg = cooperative_groups;
void initOddEvenArr(int *inputArr, unsigned int size)
{
for (unsigned int i=0; i < size; i++)
{
inputArr[i] = rand() % 50;
}
}
/**
* CUDA kernel device code
*
* Creates cooperative groups and performs odd/even counting & summation.
*/
__global__ void oddEvenCountAndSumCG(int *inputArr, int *numOfOdds, int *sumOfOddAndEvens, unsigned int size)
{
cg::thread_block cta = cg::this_thread_block();
cg::grid_group grid = cg::this_grid();
cg::thread_block_tile<32> tile32 = cg::tiled_partition<32>(cta);
for (int i = grid.thread_rank(); i < size; i += grid.size())
{
int elem = inputArr[i];
auto subTile = cg::binary_partition(tile32, elem & 1);
if (elem & 1) // Odd numbers group
{
int oddGroupSum = cg::reduce(subTile, elem, cg::plus<int>());
if (subTile.thread_rank() == 0)
{
// Add number of odds present in this group of Odds.
atomicAdd(numOfOdds, subTile.size());
// Add local reduction of odds present in this group of Odds.
atomicAdd(&sumOfOddAndEvens[0], oddGroupSum);
}
}
else // Even numbers group
{
int evenGroupSum = cg::reduce(subTile, elem, cg::plus<int>());
if (subTile.thread_rank() == 0)
{
// Add local reduction of even present in this group of evens.
atomicAdd(&sumOfOddAndEvens[1], evenGroupSum);
}
}
// reconverge warp so for next loop iteration we ensure convergence of
// above diverged threads to perform coalesced loads of inputArr.
cg::sync(tile32);
}
}
/**
* Host main routine
*/
int main(int argc, const char **argv)
{
int deviceId = findCudaDevice(argc, argv);
int *h_inputArr, *d_inputArr;
int *h_numOfOdds, *d_numOfOdds;
int *h_sumOfOddEvenElems, *d_sumOfOddEvenElems;
unsigned int arrSize = 1024 * 100;
checkCudaErrors(hipHostMalloc(&h_inputArr, sizeof(int) * arrSize));
checkCudaErrors(hipHostMalloc(&h_numOfOdds, sizeof(int)));
checkCudaErrors(hipHostMalloc(&h_sumOfOddEvenElems, sizeof(int) * 2));
initOddEvenArr(h_inputArr, arrSize);
hipStream_t stream;
checkCudaErrors(hipStreamCreateWithFlags(&stream, hipStreamNonBlocking));
checkCudaErrors(hipMalloc(&d_inputArr, sizeof(int)*arrSize));
checkCudaErrors(hipMalloc(&d_numOfOdds, sizeof(int)));
checkCudaErrors(hipMalloc(&d_sumOfOddEvenElems, sizeof(int)*2));
checkCudaErrors(hipMemcpyAsync(d_inputArr, h_inputArr, sizeof(int)*arrSize, hipMemcpyHostToDevice, stream));
checkCudaErrors(hipMemsetAsync(d_numOfOdds, 0, sizeof(int), stream));
checkCudaErrors(hipMemsetAsync(d_sumOfOddEvenElems, 0, 2*sizeof(int), stream));
//Launch the kernel
int threadsPerBlock = 0;
int blocksPerGrid = 0;
checkCudaErrors(hipOccupancyMaxPotentialBlockSize(&blocksPerGrid, &threadsPerBlock, oddEvenCountAndSumCG, 0, 0));
printf("\nLaunching %d blocks with %d threads...\n\n",blocksPerGrid, threadsPerBlock);
hipLaunchKernelGGL(( oddEvenCountAndSumCG), dim3(blocksPerGrid), dim3(threadsPerBlock), 0, stream, d_inputArr, d_numOfOdds, d_sumOfOddEvenElems, arrSize);
checkCudaErrors(hipMemcpyAsync(h_numOfOdds, d_numOfOdds, sizeof(int), hipMemcpyDeviceToHost, stream));
checkCudaErrors(hipMemcpyAsync(h_sumOfOddEvenElems, d_sumOfOddEvenElems, 2*sizeof(int), hipMemcpyDeviceToHost, stream));
checkCudaErrors(hipStreamSynchronize(stream));
printf("Array size = %d Num of Odds = %d Sum of Odds = %d Sum of Evens %d\n", arrSize, h_numOfOdds[0], h_sumOfOddEvenElems[0], h_sumOfOddEvenElems[1]);
printf("\n...Done.\n\n");
checkCudaErrors(hipHostFree(h_inputArr));
checkCudaErrors(hipHostFree(h_numOfOdds));
checkCudaErrors(hipHostFree(h_sumOfOddEvenElems));
checkCudaErrors(hipFree(d_inputArr));
checkCudaErrors(hipFree(d_numOfOdds));
checkCudaErrors(hipFree(d_sumOfOddEvenElems));
return EXIT_SUCCESS;
}
| 3c9b16d701cf7a0c0bc370a3107ed37eea717efa.cu | /**
* Copyright 1993-2020 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
/*
* This sample illustrates basic usage of binary partition cooperative groups
* within the thread block tile when divergent path exists.
* 1.) Each thread loads a value from random array.
* 2.) then checks if it is odd or even.
* 3.) create binary partition group based on the above predicate
* 4.) we count the number of odd/even in the group based on size of the binary groups
* 5.) write it global counter of odd.
* 6.) sum the values loaded by individual threads(using reduce) and write it to global
* even & odd elements sum.
*
* **NOTE** : binary_partition results in splitting warp into divergent thread groups
this is not good from performance perspective, but in cases where warp
divergence is inevitable one can use binary_partition group.
*/
#include <stdio.h>
#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
#include <helper_cuda.h>
namespace cg = cooperative_groups;
void initOddEvenArr(int *inputArr, unsigned int size)
{
for (unsigned int i=0; i < size; i++)
{
inputArr[i] = rand() % 50;
}
}
/**
* CUDA kernel device code
*
* Creates cooperative groups and performs odd/even counting & summation.
*/
__global__ void oddEvenCountAndSumCG(int *inputArr, int *numOfOdds, int *sumOfOddAndEvens, unsigned int size)
{
cg::thread_block cta = cg::this_thread_block();
cg::grid_group grid = cg::this_grid();
cg::thread_block_tile<32> tile32 = cg::tiled_partition<32>(cta);
for (int i = grid.thread_rank(); i < size; i += grid.size())
{
int elem = inputArr[i];
auto subTile = cg::binary_partition(tile32, elem & 1);
if (elem & 1) // Odd numbers group
{
int oddGroupSum = cg::reduce(subTile, elem, cg::plus<int>());
if (subTile.thread_rank() == 0)
{
// Add number of odds present in this group of Odds.
atomicAdd(numOfOdds, subTile.size());
// Add local reduction of odds present in this group of Odds.
atomicAdd(&sumOfOddAndEvens[0], oddGroupSum);
}
}
else // Even numbers group
{
int evenGroupSum = cg::reduce(subTile, elem, cg::plus<int>());
if (subTile.thread_rank() == 0)
{
// Add local reduction of even present in this group of evens.
atomicAdd(&sumOfOddAndEvens[1], evenGroupSum);
}
}
// reconverge warp so for next loop iteration we ensure convergence of
// above diverged threads to perform coalesced loads of inputArr.
cg::sync(tile32);
}
}
/**
* Host main routine
*/
int main(int argc, const char **argv)
{
int deviceId = findCudaDevice(argc, argv);
int *h_inputArr, *d_inputArr;
int *h_numOfOdds, *d_numOfOdds;
int *h_sumOfOddEvenElems, *d_sumOfOddEvenElems;
unsigned int arrSize = 1024 * 100;
checkCudaErrors(cudaMallocHost(&h_inputArr, sizeof(int) * arrSize));
checkCudaErrors(cudaMallocHost(&h_numOfOdds, sizeof(int)));
checkCudaErrors(cudaMallocHost(&h_sumOfOddEvenElems, sizeof(int) * 2));
initOddEvenArr(h_inputArr, arrSize);
cudaStream_t stream;
checkCudaErrors(cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking));
checkCudaErrors(cudaMalloc(&d_inputArr, sizeof(int)*arrSize));
checkCudaErrors(cudaMalloc(&d_numOfOdds, sizeof(int)));
checkCudaErrors(cudaMalloc(&d_sumOfOddEvenElems, sizeof(int)*2));
checkCudaErrors(cudaMemcpyAsync(d_inputArr, h_inputArr, sizeof(int)*arrSize, cudaMemcpyHostToDevice, stream));
checkCudaErrors(cudaMemsetAsync(d_numOfOdds, 0, sizeof(int), stream));
checkCudaErrors(cudaMemsetAsync(d_sumOfOddEvenElems, 0, 2*sizeof(int), stream));
//Launch the kernel
int threadsPerBlock = 0;
int blocksPerGrid = 0;
checkCudaErrors(cudaOccupancyMaxPotentialBlockSize(&blocksPerGrid, &threadsPerBlock, oddEvenCountAndSumCG, 0, 0));
printf("\nLaunching %d blocks with %d threads...\n\n",blocksPerGrid, threadsPerBlock);
oddEvenCountAndSumCG<<<blocksPerGrid, threadsPerBlock, 0, stream>>>(d_inputArr, d_numOfOdds, d_sumOfOddEvenElems, arrSize);
checkCudaErrors(cudaMemcpyAsync(h_numOfOdds, d_numOfOdds, sizeof(int), cudaMemcpyDeviceToHost, stream));
checkCudaErrors(cudaMemcpyAsync(h_sumOfOddEvenElems, d_sumOfOddEvenElems, 2*sizeof(int), cudaMemcpyDeviceToHost, stream));
checkCudaErrors(cudaStreamSynchronize(stream));
printf("Array size = %d Num of Odds = %d Sum of Odds = %d Sum of Evens %d\n", arrSize, h_numOfOdds[0], h_sumOfOddEvenElems[0], h_sumOfOddEvenElems[1]);
printf("\n...Done.\n\n");
checkCudaErrors(cudaFreeHost(h_inputArr));
checkCudaErrors(cudaFreeHost(h_numOfOdds));
checkCudaErrors(cudaFreeHost(h_sumOfOddEvenElems));
checkCudaErrors(cudaFree(d_inputArr));
checkCudaErrors(cudaFree(d_numOfOdds));
checkCudaErrors(cudaFree(d_sumOfOddEvenElems));
return EXIT_SUCCESS;
}
|
cf8c6f291d00c0c43337b2dabce5ce47c28e22fd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
*@BEGIN LICENSE
*
* GPU-accelerated density-fitted coupled-cluster, a plugin to:
*
* PSI4: an ab initio quantum chemistry software package
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*@END LICENSE
*/
#include"ccsd.h"
#include<psiconfig.h>
#include<../bin/fnocc/blas.h>
#include<libmints/matrix.h>
#include<libmints/molecule.h>
#include<libmints/mints.h>
#include<libciomr/libciomr.h>
#include<libqt/qt.h>
#define PSIF_CIM 273 // TODO: move to psifiles.h
#ifdef _OPENMP
#include<omp.h>
#else
#define omp_get_thread_num() 0
#define omp_set_num_threads(a)
#define omp_get_num_threads()
#define omp_set_dynamic(a)
#define omp_set_nested(a)
#endif
#ifdef HAVE_MKL
#include<mkl.h>
#else
#define mkl_set_dynamic(a)
#define mkl_set_num_threads(a)
#define mkl_domain_set_num_threads(a,b)
#endif
#define NUMTHREADS 32
#define MAXBLOCKS 65535
__device__ int GPUKernel_Position(int i,int j) {
if (i<j){
return j*(j+1)/2+i;
}
return i*(i+1)/2+j;
}
__global__ void GPUKernel_VpVm_tiled(int a, int bstart, int bsize,int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2*bsize ) return;
// id : b*v2+c*v+d
int d = id%v;
int c = (id-d)%(v*v)/v;
if ( d > c ) return;
//int b = (id-d)%(v*bsize)/v;
//int c = (id-d-b*v)/(bsize*v);
int b = (id-d-c*v)/(v*v);
if ( b + bstart < a ) return;
int cd = c*(c+1)/2 + d;
int vtri = v*(v+1)/2;
int bv2 = b*v2;
//outp[b*vtri+cd] = in[bv2+d*v+c] + in[bv2+c*v+d];
//outm[b*vtri+cd] = in[bv2+d*v+c] - in[bv2+c*v+d];
outp[b*vtri+cd] = in[bv2+d*v+c] + in[id];
outm[b*vtri+cd] = in[bv2+d*v+c] - in[id];
}
__global__ void GPUKernel_VpVm_v2(int a, int b,int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2 ) return;
int d = id%v;
int c = (id-d)/v;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
outp[cd] = in[d*v+c] + in[c*v+d];
outm[cd] = in[d*v+c] - in[c*v+d];
}
__global__ void GPUKernel_VpVm(int a, int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2*v ) return;
int d = id%v;
int b = (id-d)%(v2)/v;
if ( b < a ) return;
int bma = b - a;
int c = (id-d-b*v)/(v2);
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
outp[bma*vtri+cd] = in[bma*v2+d*v+c] + in[bma*v2+c*v+d];
outm[bma*vtri+cd] = in[bma*v2+d*v+c] - in[bma*v2+c*v+d];
}
__global__ void GPUKernel_Vm(int a, int v,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*v ) return;
int d = id%v;
int b = (id-d)%(v*v)/v;
int c = (id-d-b*v)/(v*v);
if ( b < a ) return;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
out[(b-a)*vtri+cd] = in[(b-a)*v*v+d*v+c] - in[(b-a)*v*v+c*v+d];
}
__global__ void GPUKernel_Vp(int a, int v,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*v ) return;
int d = id%v;
int b = (id-d)%(v*v)/v;
int c = (id-d-b*v)/(v*v);
if ( b < a ) return;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
out[(b-a)*vtri+cd] = in[(b-a)*v*v+d*v+c] + in[(b-a)*v*v+c*v+d];
}
using namespace psi;
namespace psi{namespace fnocc{
GPUDFCoupledCluster::GPUDFCoupledCluster(boost::shared_ptr<Wavefunction> reference_wavefunction, Options &options):
DFCoupledCluster(reference_wavefunction,options)
{
common_init();
}
GPUDFCoupledCluster::~GPUDFCoupledCluster()
{
}
// this is where we'll set up cuda/gpu stuff i suppose
void GPUDFCoupledCluster::common_init() {
long int nthreads = omp_get_max_threads();
if ( nthreads < 2 ) {
throw PsiException("GPU DFCC must be run with > 1 threads",__FILE__,__LINE__);
}
/**
* GPU helper class knows if we have gpus or not and how to use them.
* all gpu memory is allocated by the helper.
*/
helper_ = boost::shared_ptr<GPUHelper>(new GPUHelper);
// get device parameters, allocate gpu memory and pinned cpu memory
helper_->ndoccact = ndoccact;
helper_->nvirt = nvirt;
helper_->nmo = nmo;
helper_->CudaInit(options_);
gpubuffer = helper_->gpubuffer;
left = helper_->gpumemory / 8.0;
wasted = helper_->extraroom / 8.0;
num_gpus = helper_->num_gpus;
long int o = ndoccact;
long int v = nvirt;
ngputhreads=NUMTHREADS;
num=1;
if ((v*v*v)%ngputhreads==0)
nblocks = (v*v*v)/ngputhreads;
else
nblocks = (v*v*v+ngputhreads-(v*v*v)%ngputhreads)/ngputhreads;
if (nblocks>MAXBLOCKS){
num = nblocks/MAXBLOCKS+1;
nblocks = nblocks/num + 1;
}
ncputhreads = omp_get_max_threads();
if ( options_.get_bool("DGEMM_TIMINGS") ) {
helper_->DGEMM_Timings();
}
}
// accumulate results of contraction of (ac|bd) and t2
void GPUDFCoupledCluster::useVabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
for (long int a = 0; a < v; a++) {
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);;
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
//if (ntiles > 1) printf("%5i/%5i ntiles %5i\n",a,v,ntiles);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// contribute to residual
#pragma omp parallel for schedule (static)
for (long int ij = 0; ij < o*o; ij++) {
long int j = ij % o;
long int i = ( ij - j ) / o;
int sg = ( i > j ) ? 1 : -1;
for (long int b = bstart; b < bstart + bsize; b++) {
tempv[a*oo*v+b*oo+i*o+j] += tempr[Position(i,j) * vtri + Position(a,b)]
+ sg*tempr[Position(i,j) * vtri + Position(a,b) + otri*vtri];
if (a!=b) {
tempv[b*oov+a*oo+i*o+j] += tempr[Position(i,j) * vtri + Position(a,b)]
- sg*tempr[Position(i,j) * vtri + Position(a,b) + otri*vtri];
}
}
}
//gohere
}
free(tilesize);
}
// contribute to residual
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
}
void GPUDFCoupledCluster::Vabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<o; i++){
for (long int j=i; j<o; j++){
long int ij = Position(i,j);
for (long int a=0; a<v; a++){
for (long int b=a; b<v; b++){
tempr[ij*vtri+Position(a,b)] =
(tb[a*oov+b*oo+i*o+j]+tb[b*oov+a*oo+i*o+j]);
tempr[ij*vtri+Position(a,b)+vtri*otri] =
(tb[a*oov+b*oo+i*o+j]-tb[b*oov+a*oo+i*o+j]);
}
tempr[ij*vtri+Position(a,a)] = tb[a*oov+a*oo+i*o+j];
}
}
}
if ( v > nQ ) {
throw PsiException("GPU DFCC will break if Nv > Naux",__FILE__,__LINE__);
}
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
long int ntiles_ij = 1;
// do we need to tile ij?
if ( ndoubles < 0 ) {
while ( ntiles_ij < otri ) {
ntiles_ij++;
long int size = otri / ntiles_ij;
if ( size * ntiles_ij < otri ) size++;
if ( left - wasted - size * 2*vtri ) {
ndoubles = (left - wasted) - size * 2*vtri;
break;
}
}
outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
}
// sizes of ij tiles:
long int * tilesize_ij = (long int *)malloc(ntiles_ij*sizeof(long int));
for (long int tile = 0; tile < ntiles_ij - 1; tile++) {
tilesize_ij[tile] = otri / ntiles_ij;
if ( tilesize_ij[tile] * ntiles_ij < otri ) tilesize_ij[tile]++;
}
tilesize_ij[ntiles_ij-1] = otri - tilesize_ij[0] * (ntiles_ij - 1);
for (long int tile_ij = 0; tile_ij < ntiles_ij; tile_ij++) {
// copy this tile of t2 to the gpus
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i = 0; i < num_gpus; i++) {
int thread = omp_get_thread_num();
hipSetDevice(thread);
double * gput2 = gpubuffer[thread];
hipMemcpy(gput2, tempr + tile_ij * tilesize_ij[0] * vtri, sizeof(double) * tilesize_ij[tile_ij] * vtri,hipMemcpyHostToDevice);
hipMemcpy(gput2+tilesize_ij[0]*vtri,tempr + tile_ij * tilesize_ij[0] * vtri + otri * vtri,sizeof(double) * tilesize_ij[tile_ij] * vtri,hipMemcpyHostToDevice);
}
last_a = v;
// parallelize over multiple gpus
#pragma omp parallel for schedule (dynamic) num_threads(num_gpus)
for (long int a = 0; a < v; a++) {
if (cpudone && last_a == v) { last_a = a; }
if (last_a == v) {
hipStream_t stream;
hipEvent_t estart,estop;
hipEventCreate(&estart);
hipEventCreate(&estop);
int thread = omp_get_thread_num();
hipSetDevice(thread);
double * gput2 = gpubuffer[thread];
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i\n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 2L * tilesize_ij[0] * vtri;
double * gpuVcdb = gpubuffer[thread] + shift + (bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
double * gpuVm = gpubuffer[thread] + shift;
double * gpuVp = gpubuffer[thread] + shift + bsize*vtri;
double * gpuA = gpubuffer[thread] + shift + 2*bsize*vtri;
double * gpuIqd = gpubuffer[thread] + shift;
double * gpuIqc = gpubuffer[thread] + shift + bsize*nQ*v;
long int num = 1;
long int nblocks = ( bsize*v*v )/ NUMTHREADS;
if ( (bsize*v*v) % NUMTHREADS != 0 ) {
nblocks = (bsize*v*v+NUMTHREADS-(bsize*v*v)%NUMTHREADS)/NUMTHREADS;
}
if (nblocks > MAXBLOCKS){
num = nblocks / MAXBLOCKS + 1;
nblocks = nblocks / num + 1;
}
dim3 dimgrid (nblocks,num);
stream = NULL;
double start2 = omp_get_wtime();
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"before anything. ");
hipEventRecord(estart,stream);
hipMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,hipMemcpyHostToDevice,stream);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 1");
hipMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,hipMemcpyHostToDevice,stream);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 2");
hipblasDgemm('t','n',v,bsize*v,nQ,1.0,gpuIqc,nQ,gpuIqd,nQ,0.0,gpuVcdb,v);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v");
hipLaunchKernelGGL(( GPUKernel_VpVm_tiled), dim3(dimgrid),dim3(NUMTHREADS), 0, 0, a,bstart,bsize,v,gpuVcdb,gpuVp,gpuVm);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v+/v-");
hipblasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
hipblasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
hipMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],hipMemcpyDeviceToHost,stream);
hipEventRecord(estop,stream);
while( hipEventQuery(estop) == hipErrorNotReady );
double end2 = omp_get_wtime();
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
//gohere
}
free(tilesize);
}
}
}
free(tilesize_ij);
}
void GPUDFCoupledCluster::FinishVabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
// need to build t2+/- for CPU to use
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<o; i++){
for (long int j=i; j<o; j++){
long int ij = Position(i,j);
for (long int a=0; a<v; a++){
for (long int b=a; b<v; b++){
tempt[ij*vtri+Position(a,b)] =
(tb[a*oov+b*oo+i*o+j]+tb[b*oov+a*oo+i*o+j]);
tempt[ij*vtri+Position(a,b)+vtri*otri] =
(tb[a*oov+b*oo+i*o+j]-tb[b*oov+a*oo+i*o+j]);
}
tempt[ij*vtri+Position(a,a)] = tb[a*oov+a*oo+i*o+j];
}
}
}
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
long int ntiles_ij = 1;
// available cpu memory (in doubles)
long int nQmax = nQ > nQ_scf ? nQ : nQ_scf;
long int dim = 2L*v*v*v;
if (2*nQmax*o*v>dim) dim = 2*nQmax*o*v;
if (o*o*v*v>dim) dim = o*o*v*v;
if (nQmax*v*v>dim) dim = nQmax*v*v;
if (nQmax*nso*nso>dim) dim = nQmax*nso*nso;
long int ndoubles_cpu = dim;
// do we need to tile ij?
if ( ndoubles < 0 ) {
while ( ntiles_ij < otri ) {
ntiles_ij++;
long int size = otri / ntiles_ij;
if ( size * ntiles_ij < otri ) size++;
if ( left - wasted - size * 2*vtri ) {
ndoubles = (left - wasted) - size * 2*vtri;
break;
}
}
//outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
//outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
throw PsiException(" <<< warning >>> tiling composite ij index ... feature temporarily disabled",__FILE__,__LINE__);
}
// sizes of ij tiles:
long int * tilesize_ij = (long int *)malloc(ntiles_ij*sizeof(long int));
for (long int tile = 0; tile < ntiles_ij - 1; tile++) {
tilesize_ij[tile] = otri / ntiles_ij;
if ( tilesize_ij[tile] * ntiles_ij < otri ) tilesize_ij[tile]++;
}
tilesize_ij[ntiles_ij-1] = otri - tilesize_ij[0] * (ntiles_ij - 1);
omp_set_nested(1);
omp_set_dynamic(0);
mkl_set_dynamic(0);
int nthreads = omp_get_max_threads();
for (long int tile_ij = 0; tile_ij < ntiles_ij; tile_ij++) {
// copy this tile of t2 to the gpus (already there)
// parallelize over multiple gpus
#pragma omp parallel for schedule (dynamic) num_threads(num_gpus + 1)
for (long int a = last_a; a < v; a++) {
int thread = omp_get_thread_num();
if ( thread < num_gpus ) {
hipStream_t stream;
hipEvent_t estart,estop;
hipEventCreate(&estart);
hipEventCreate(&estop);
hipSetDevice(thread);
double * gput2 = gpubuffer[thread];
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i\n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 2L * tilesize_ij[0] * vtri;
double * gpuVcdb = gpubuffer[thread] + shift + (bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
double * gpuVm = gpubuffer[thread] + shift;
double * gpuVp = gpubuffer[thread] + shift + bsize*vtri;
double * gpuA = gpubuffer[thread] + shift + 2*bsize*vtri;
double * gpuIqd = gpubuffer[thread] + shift;
double * gpuIqc = gpubuffer[thread] + shift + bsize*nQ*v;
long int num = 1;
long int nblocks = ( bsize*v*v )/ NUMTHREADS;
if ( (bsize*v*v) % NUMTHREADS != 0 ) {
nblocks = (bsize*v*v+NUMTHREADS-(bsize*v*v)%NUMTHREADS)/NUMTHREADS;
}
if (nblocks > MAXBLOCKS){
num = nblocks / MAXBLOCKS + 1;
nblocks = nblocks / num + 1;
}
dim3 dimgrid (nblocks,num);
stream = NULL;
double start2 = omp_get_wtime();
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"before anything. ");
hipEventRecord(estart,stream);
hipMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,hipMemcpyHostToDevice,stream);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 1");
hipMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,hipMemcpyHostToDevice,stream);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 2");
hipblasDgemm('t','n',v,bsize*v,nQ,1.0,gpuIqc,nQ,gpuIqd,nQ,0.0,gpuVcdb,v);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v");
hipLaunchKernelGGL(( GPUKernel_VpVm_tiled), dim3(dimgrid),dim3(NUMTHREADS), 0, 0, a,bstart,bsize,v,gpuVcdb,gpuVp,gpuVm);
//hipDeviceSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v+/v-");
hipblasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
hipblasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
hipMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],hipMemcpyDeviceToHost,stream);
hipEventRecord(estop,stream);
while( hipEventQuery(estop) == hipErrorNotReady );
double end2 = omp_get_wtime();
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
}
free(tilesize);
}else {
// cpu work
mkl_set_num_threads(nthreads - num_gpus);
// do we need to tile loop over b >= a?
long int ntiles = 1;
/*
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles_cpu >= max + size*nQ*v ) break;
ntiles++;
}
*/
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i (cpu) \n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 0;//2L * tilesize_ij[0] * vtri;
double * gpuVm = integrals + shift;
double * gpuVp = integrals + shift + bsize*vtri;
double * gpuA = integrals + shift + 2*bsize*vtri;
double * gpuVcdb = integrals + shift + 3*bsize*vtri;//(bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
//double * gpuIqd = integrals + shift;
//double * gpuIqc = integrals + shift + bsize*nQ*v;
double start2 = omp_get_wtime();
//hipMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,hipMemcpyHostToDevice,stream);
//hipMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,hipMemcpyHostToDevice,stream);
F_DGEMM('t','n',v,bsize*v,nQ,1.0,Qvv+a*nQ*v,nQ,Qvv+bstart*nQ*v,nQ,0.0,gpuVcdb,v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads - num_gpus)
for (int d = 0; d < v; d++) {
for (int c = d; c < v; c++) {
int cd = c*(c+1)/2 + d;
for (int b = bstart; b < v; b++) {
int id = d + c*v + (b-bstart)*v*v;
int bv2 = (b-bstart)*v*v;
gpuVp[(b-bstart)*vtri+cd] = gpuVcdb[bv2+d*v+c] + gpuVcdb[id];
gpuVm[(b-bstart)*vtri+cd] = gpuVcdb[bv2+d*v+c] - gpuVcdb[id];
}
}
}
F_DGEMM('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,tempt, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
F_DGEMM('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,tempt+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
//hipMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],hipMemcpyDeviceToHost,stream);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads - num_gpus)
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = gpuA[(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = gpuA[(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
}
free(tilesize);
}
}
}
free(tilesize_ij);
omp_set_nested(0);
omp_set_dynamic(1);
mkl_set_dynamic(1);
mkl_set_num_threads(nthreads);
}
void GPUDFCoupledCluster::CudaInit(){
num_gpus = 0;
hipblasInit();
helper_->Check_CUDA_Error(stdout,"cudaInit");
struct hipDeviceProp_t cudaProp;
int gpu_id;
// how many GPUs do we have?
hipGetDeviceCount(&num_gpus);
helper_->Check_CUDA_Error(stdout,"hipGetDeviceCount");
if ( num_gpus == 0 ) {
throw PsiException(" Error: no cuda capable device detected.",__FILE__,__LINE__);
}
if (options_["NUM_GPUS"].has_changed()) {
num_gpus = options_.get_int("NUM_GPUS");
}
hipGetDevice(&gpu_id);
helper_->Check_CUDA_Error(stdout,"hipGetDevice");
hipGetDeviceProperties( &cudaProp,gpu_id );
helper_->Check_CUDA_Error(stdout,"hipGetDeviceProperties");
outfile->Printf("\n");
outfile->Printf(" _________________________________________________________\n");
outfile->Printf(" CUDA device properties:\n");
outfile->Printf(" name: %20s\n",cudaProp.name);
outfile->Printf(" major version: %20d\n",cudaProp.major);
outfile->Printf(" minor version: %20d\n",cudaProp.minor);
outfile->Printf(" canMapHostMemory: %20d\n",cudaProp.canMapHostMemory);
outfile->Printf(" totalGlobalMem: %20lu mb\n",cudaProp.totalGlobalMem/(1024*1024));
outfile->Printf(" sharedMemPerBlock: %20lu\n",cudaProp.sharedMemPerBlock);
outfile->Printf(" clockRate: %20.3f ghz\n",cudaProp.clockRate/1.0e6);
outfile->Printf(" regsPerBlock: %20d\n",cudaProp.regsPerBlock);
outfile->Printf(" warpSize: %20d\n",cudaProp.warpSize);
outfile->Printf(" maxThreadsPerBlock: %20d\n",cudaProp.maxThreadsPerBlock);
outfile->Printf(" _________________________________________________________\n");
outfile->Printf("\n");
//fflush(outfile);
// device memory left after some arrays (no, now total memory)
int o = ndoccact;
int v = nvirt;
left = cudaProp.totalGlobalMem/8.;// - 3*o*o*v*v - o*v-nmo*nmo;
wasted = 200*1024*1024/8.; // leave an extra 200 mb on there.
ngputhreads=NUMTHREADS;
num=1;
if ((v*v*v)%ngputhreads==0)
nblocks = (v*v*v)/ngputhreads;
else
nblocks = (v*v*v+ngputhreads-(v*v*v)%ngputhreads)/ngputhreads;
if (nblocks>MAXBLOCKS){
num = nblocks/MAXBLOCKS+1;
nblocks = nblocks/num + 1;
}
hipDeviceReset();
helper_->Check_CUDA_Error(stdout,"hipDeviceReset");
}
void GPUDFCoupledCluster::CudaFinalize(){
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i=0; i<num_gpus; i++){
int thread = omp_get_thread_num();
hipSetDevice(thread);
hipFree(gpubuffer[thread]);
}
hipDeviceReset();
}
void GPUDFCoupledCluster::AllocateGPUMemory(){
gpubuffer = (double**)malloc(num_gpus*sizeof(double*));
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i=0; i<num_gpus; i++){
int thread = omp_get_thread_num();
hipSetDevice(thread);
helper_->Check_CUDA_Error(stdout,"hipSetDevice");
hipMalloc((void**)&gpubuffer[thread],sizeof(double)*(left-wasted));
helper_->Check_CUDA_Error(stdout,"gpu memory");
printf("%5i %5i\n",thread,i);fflush(stdout);
}
}
void GPUDFCoupledCluster::AllocateMemory() {
if (nirrep_>1){
throw PsiException("df_ccsd requires symmetry c1",__FILE__,__LINE__);
}
ischolesky_ = ( options_.get_str("DF_BASIS_CC") == "CHOLESKY" );
nQ = (int)Process::environment.globals["NAUX (CC)"];
nQ_scf = (int)Process::environment.globals["NAUX (SCF)"];
if (!reference_wavefunction_->isCIM()){
int count=0;
eps = (double*)malloc((ndoccact+nvirt)*sizeof(double));
boost::shared_ptr<Vector> eps_test = reference_wavefunction_->epsilon_a();
for (int h=0; h<nirrep_; h++){
for (int norb = frzcpi_[h]; norb<doccpi_[h]; norb++){
eps[count++] = eps_test->get(h,norb);
}
}
for (int h=0; h<nirrep_; h++){
for (int norb = doccpi_[h]; norb<nmopi_[h]-frzvpi_[h]; norb++){
eps[count++] = eps_test->get(h,norb);
}
}
}else{
// orbital energies in qt ordering:
long int count = 0;
eps = (double*)malloc((ndoccact+nvirt)*sizeof(double));
boost::shared_ptr<Vector> eps_test = reference_wavefunction_->CIMOrbitalEnergies();
for (int i = 0; i < ndoccact + nvirt; i++){
eps[i] = eps_test->get(0,i+nfzc);
}
eps_test.reset();
}
long int o = ndoccact;
long int v = nvirt;
/*========================================================
ccsd memory requirements:
tb: o^2v^2
tempt: o^2v^2+ov ( actually o(o+1)v(v+1) + ov )
tempv: max (o^2v^2+ov , o*v*nQ)
integrals: max(2v^3,nQ*nso^2, o^2v^2, 2v^3, 2nQ*o*v) (this is a minimum)
Abij (SJS v^4 result): o(o+1)v/2
Sbij (SJS v^4 result): o(o+1)v/2
other stuff: 2ov+2v^2+(o+v)
total: 3o^2v^2 + 2v^3 + o(o+1)v + 4ov + 2v^2 + (o+v) or
4o^2v^2 + o(o+1)v + 4ov + 2v^2 + (o+v) or
3o^2v^2 + 2ovnQ + o(o+1)v + 4ov + 2v^2 + (o+v)
compare to the requirements for the (T) part:
2o^2v^2 + 3v^3*nthreads + o^3v + ov
========================================================*/
// reduce available memory by the amount required by the helper class
memory -= helper_->max_mapped_memory;
long int nQmax = nQ > nQ_scf ? nQ : nQ_scf;
// for the df version, the dimension of the large buffer:
long int dim = 2L*v*v*v;
if (2*nQmax*o*v>dim) dim = 2*nQmax*o*v;
if (o*o*v*v>dim) dim = o*o*v*v;
if (nQmax*v*v>dim) dim = nQmax*v*v;
if (nQmax*nso*nso>dim) dim = nQmax*nso*nso;
double total_memory = dim+(o*o*v*v+o*v)+(o*(o+1)*v*(v+1)+o*v)+o*o*v*v+2.*o*v+2.*v*v;
long int max = nvirt*nvirt*nQmax > (nfzv+ndocc+nvirt)*ndocc*nQmax ? nvirt*nvirt*nQmax : (nfzv+ndocc+nvirt)*ndocc*nQmax;
double df_memory = nQmax*(o*o+o*v)+max;
total_memory *= 8./1024./1024.;
df_memory *= 8./1024./1024.;
outfile->Printf(" Total memory requirements: %9.2lf mb\n",df_memory+total_memory);
outfile->Printf(" 3-index integrals: %9.2lf mb\n",df_memory);
outfile->Printf(" CCSD intermediates: %9.2lf mb\n",total_memory);
outfile->Printf("\n");
if (1.0 * memory / 1024. / 1024. < total_memory + df_memory) {
outfile->Printf("\n");
outfile->Printf(" error: not enough memory for ccsd. increase available memory by %7.2lf mb\n",total_memory+df_memory-1.0*memory/1024./1024.);
outfile->Printf("\n");
//fflush(outfile);
throw PsiException("not enough memory (ccsd).",__FILE__,__LINE__);
}
if (options_.get_bool("COMPUTE_TRIPLES")) {
long int nthreads = omp_get_max_threads();
double tempmem = 8.*(2L*o*o*v*v+o*o*o*v+o*v+3L*v*v*v*nthreads);
if (tempmem > memory) {
outfile->Printf("\n <<< warning! >>> switched to low-memory (t) algorithm\n\n");
}
if (tempmem > memory || options_.get_bool("TRIPLES_LOW_MEMORY")){
throw PsiException("low-memory triples option not yet implemented",__FILE__,__LINE__);
isLowMemory = true;
tempmem = 8.*(2L*o*o*v*v+o*o*o*v+o*v+5L*o*o*o*nthreads);
}
outfile->Printf(" memory requirements for CCSD(T): %9.2lf mb\n\n",tempmem/1024./1024.);
}
hipHostMalloc((void**)&Qvv,nvirt*nvirt*nQ*sizeof(double));
hipDeviceSynchronize();
helper_->Check_CUDA_Error(stdout,"allocate host Qvv");
tempr = (double*)malloc(o*(o+1)*v*(v+1)/2*sizeof(double));
hipDeviceSynchronize();
helper_->Check_CUDA_Error(stdout,"allocate host tempr");
// o*(o+1)*v mapped memory for each gpu:
// for now, give the choice of using helper's or allocating more. TODO:
// need to figure out a cleaner way to choose the memory we want to pin
// and Qvv needs to be considerred as well.
if ( o*(o+1)/v*sizeof(double) < helper_->max_mapped_memory_per_thread ) {
tempr2 = helper_->tmp;
}else {
tempr2 = (double**)malloc(num_gpus*sizeof(double*));
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<num_gpus; i++){
long int thread = 0;
#ifdef _OPENMP
thread = omp_get_thread_num();
#endif
hipSetDevice(thread);
helper_->Check_CUDA_Error(stdout,"hipSetDevice");
hipHostMalloc((void**)&tempr2[thread],o*(o+1)*v*sizeof(double));
helper_->Check_CUDA_Error(stdout,"cpu tempr2");
}
}
// allocate some memory for 3-index tensors
Qoo = (double*)malloc(ndoccact*ndoccact*nQmax*sizeof(double));
Qov = (double*)malloc(ndoccact*nvirt*nQmax*sizeof(double));
long int tempvdim = o*o*v*v+o*v;
if ( nQmax * o * v > tempvdim) tempvdim = nQmax * o * v;
integrals = (double*)malloc(dim*sizeof(double));
tempt = (double*)malloc((o*(o+1)*v*(v+1)+o*v)*sizeof(double));
tempv = (double*)malloc(tempvdim*sizeof(double));
Abij = (double*)malloc(o*(o+1)/2*v*sizeof(double));
Sbij = (double*)malloc(o*(o+1)/2*v*sizeof(double));
tb = (double*)malloc(o*o*v*v*sizeof(double));
w1 = (double*)malloc(o*v*sizeof(double));
t1 = (double*)malloc(o*v*sizeof(double));
I1 = (double*)malloc(v*v*sizeof(double));
I1p = (double*)malloc(v*v*sizeof(double));
memset((void*)integrals,'\0',dim*sizeof(double));
memset((void*)tempv,'\0',tempvdim*sizeof(double));
memset((void*)tempt,'\0',(o*(o+1)*v*(v+1)+o*v)*sizeof(double));
memset((void*)tempr,'\0',(o*(o+1)*v*(v+1)/2)*sizeof(double));
memset((void*)tb,'\0',o*o*v*v*sizeof(double));
memset((void*)w1,'\0',o*v*sizeof(double));
memset((void*)t1,'\0',o*v*sizeof(double));
memset((void*)I1,'\0',v*v*sizeof(double));
memset((void*)I1p,'\0',v*v*sizeof(double));
memset((void*)Abij,'\0',o*(o+1)/2*v*sizeof(double));
memset((void*)Sbij,'\0',o*(o+1)/2*v*sizeof(double));
// DIIS:
diisvec = (double*)malloc(sizeof(double)*(maxdiis+1));
memset((void*)diisvec,'\0',(maxdiis+1)*sizeof(double));
// new 3-index stuff for t1-transformed integrals:
Fij = (double*)malloc(o*o*sizeof(double));
Fia = (double*)malloc(o*v*sizeof(double));
Fai = (double*)malloc(o*v*sizeof(double));
Fab = (double*)malloc(v*v*sizeof(double));
Ca_R = (double*)malloc(nso*(nmo+nfzc+nfzv)*sizeof(double));
Ca_L = (double*)malloc(nso*(nmo+nfzc+nfzv)*sizeof(double));
Ca = reference_wavefunction_->Ca()->pointer();
// one-electron integrals
boost::shared_ptr<MintsHelper> mints(new MintsHelper());
H = mints->so_kinetic();
H->add(mints->so_potential());
}
// GPU kernels!
__global__ void GPUKernel_Iqdb(int a,int v,int nQ,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*nQ ) return;
int q = id%nQ;
int d = (id-q)%(nQ*v)/nQ;
int b = (id-q-d*nQ)/(nQ*v);
if ( b < a ) return;
int id2 = (b-a)*nQ*v+d*nQ+q;
out[id2] = in[id];
}
typedef struct {
int id;
GPUDFCoupledCluster * cc;
} mega;
void *doit(void*x) {
mega * m = (mega * )x;
m->cc->pthreadCCResidual(m->id);
return (NULL);
}
void GPUDFCoupledCluster::pthreadCCResidual(int id) {
bool timer = options_.get_bool("CC_TIMINGS");
long int o = ndoccact;
long int v = nvirt;
//////// start gpu section! ////////
if (id==0)
{
omp_set_num_threads(num_gpus);
int nthreads = omp_get_max_threads();
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i = 0 ; i < num_gpus; i++) {
int mythread = omp_get_thread_num();
hipSetDevice(mythread);
}
double start = omp_get_wtime();
Vabcd1();
if (last_a == v) {
gpudone = true;
if (timer) {
outfile->Printf(" A2 = t(c,d,i,j) (ac|bd) %6.2lf\n",omp_get_wtime()-start);
}
}
else
gpudone = false;
//////// end gpu section! ////////
}
//////// start cpu section! ////////
else
{
int mythread = omp_get_thread_num();
// pthread has NO idea what the right number of threads is ...
int nthreads = ncputhreads;//omp_get_max_threads();
if (nthreads > 1 + num_gpus) nthreads -= num_gpus;
omp_set_num_threads(nthreads);
mkl_set_num_threads(nthreads);
mkl_domain_set_num_threads(nthreads, MKL_DOMAIN_BLAS);
double start;
// C2 = -1/2 t(bc,kj) [ (ki|ac) - 1/2 t(ad,li) (kd|lc) ]
// + t(bc,ki) [ (kj|ac) - 1/2 t(ad,lj) (kd|lc) ]
if (timer) start = omp_get_wtime();
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 1 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
tempt[a*o*o*v+i*o*v+l*v+d] = tb[a*o*o*v+d*o*o+l*o+i];
}
}
}
}
//printf("position 2 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempv[k*o*v*v+c*o*v+l*v+d] = integrals[k*o*v*v+d*o*v+l*v+c];
}
}
}
}
// hang out until the gpu finishes ...
// double wait = omp_get_wtime();
// double accum = 0.0;
// do {
// if ( omp_get_wtime() - wait > 5.0 ) {
// accum += omp_get_wtime() - wait;
// wait = omp_get_wtime();
// outfile->Printf("gpu has taken an extra %6.2lf s\n",accum);
// }
// }while(!gpudone);
//printf("position 3 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,o*v,o*v,-0.5,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
// else F_DGEMM('t','n',o*v,o*v,o*v,-0.5,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
long int gpuchunk = 0;
long int odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('t','n',o*v,v,o*v,-0.5,tempv,o*v,tempt+i*o*v*v,o*v,0.0,integrals+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of C2 part 1\n",gpuchunk);
helper_->GPUTiledDGEMM('t','n',o*v,gpuchunk*v,o*v,-0.5,tempv,o*v,tempt+odone*o*v*v,o*v,0.0,integrals+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 4 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
if (gpudone) helper_->GPUTiledDGEMM('t','t',v*v,o*o,nQ,1.0,Qvv,nQ,Qoo,o*o,0.0,tempv,v*v);
else F_DGEMM('t','t',v*v,o*o,nQ,1.0,Qvv,nQ,Qoo,o*o,0.0,tempv,v*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 5 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
//F_DGEMM('n','t',v*v,o*o,nQ,1.0,Qvv,v*v,Qoo,o*o,0.0,tempv,v*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
integrals[a*o*o*v+i*o*v+k*v+c] += tempv[k*o*v*v+i*v*v+a*v+c];
}
}
}
}
//printf("position 6 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int b = 0; b < v; b++) {
for (int j = 0; j < o; j++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempt[b*o*o*v+j*o*v+k*v+c] = tb[b*o*o*v+c*o*o+k*o+j];
}
}
}
}
//printf("position 7 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,o*v,o*v,-1.0,integrals,o*v,tempt,o*v,0.0,tempv,o*v);
// else F_DGEMM('t','n',o*v,o*v,o*v,-1.0,integrals,o*v,tempt,o*v,0.0,tempv,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('t','n',o*v,v,o*v,-1.0,integrals,o*v,tempt+i*o*v*v,o*v,0.0,tempv+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of C2 part 2\n",gpuchunk);
helper_->GPUTiledDGEMM('t','n',o*v,gpuchunk*v,o*v,-1.0,integrals,o*v,tempt+odone*o*v*v,o*v,0.0,tempv+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 8 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = 0.5 * tempv[b*o*o*v+j*o*v+a*o+i] + tempv[b*o*o*v+i*o*v+a*o+j];
}
}
}
}
//printf("position 9 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// first contribution to residual
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_R2,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
//printf("position 10 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
if (timer) {
outfile->Printf("\n");
outfile->Printf(" C2 = -1/2 t(b,c,k,j) [ (ki|ac) - 1/2 t(a,d,l,i) (kd|lc) ]\n");
outfile->Printf(" + t(b,c,k,i) [ (kj|ac) - 1/2 t(a,d,l,j) (kd|lc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// now singles residual:
// D1: F(ai)
C_DCOPY(o*v,Fai,1,w1,1);
// A1 (G): U(c,d,k,l) (ad|kc)
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int d = 0; d < v; d++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempt[d*o*o*v+i*o*v+k*v+c] = (2.0*tb[c*o*o*v+d*o*o+k*o+i] - tb[c*o*o*v+d*o*o+i*o+k]);
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,nQ,o*v,1.0,tempt,o*v,Qov,o*v,0.0,tempv,o*v);
else F_DGEMM('t','n',o*v,nQ,o*v,1.0,tempt,o*v,Qov,o*v,0.0,tempv,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int q = 0; q < nQ; q++) {
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
integrals[q*v*v+b*v+a] = Qvv[a*v*nQ+b*nQ+q];
}
}
}
//#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
//for (int q = 0; q < nQ; q++) {
// for (int a = 0; a < v; a++) {
// C_DCOPY(v,Qvv+q*v*v+a*v,1,integrals+q*v*v+a,v);
// }
//}
//if (gpudone) helper_->GPUTiledDGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
//else F_DGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
F_DGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
if (timer) {
outfile->Printf(" A1 = U(c,d,k,l) (ad|kc) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// B1 (H): -U(a,c,k,l) (ki|lc)
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*o,nQ,1.0,Qov,o*v,Qoo,o*o,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*o,nQ,1.0,Qov,o*v,Qoo,o*o,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int i = 0; i < o; i++) {
for (int c = 0; c < v; c++) {
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
tempv[i*o*o*v+c*o*o+k*o+l] = integrals[k*o*o*v+i*o*v+l*v+c];
}
}
}
}
C_DCOPY(o*o*v*v,tb,1,tempt,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int c = 0; c < v; c++) {
for (int k = 0; k < o; k++) {
C_DAXPY(o,-0.5,tb+a*o*o*v+c*o*o+k,o,tempt+a*o*o*v+c*o*o+k*o,1);
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('t','n',o,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,w1,o);
else F_DGEMM('t','n',o,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,w1,o);
if (timer) {
outfile->Printf(" B1 = - U(a,c,k,l) (ki|lc) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// C1
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
dum += Fia[k*v+c] * (2.0*tb[a*o*o*v+c*o*o+i*o+k] - tb[a*o*o*v+c*o*o+k*o+i]);
}
}
w1[a*o+i] += dum;
}
}
if (timer) {
outfile->Printf(" C1 = F(k,c) U(a,c,i,k) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// D2: 1/2 U(b,c,j,k) [ L(a,i,k,c) + 1/2 U(a,d,i,l) L(l,d,k,c) ]
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
C_DCOPY(o*o*v*v,integrals,1,tempv,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempv[l*o*v*v+d*o*v+k*v+c] -= 0.5 * integrals[l*o*v*v+c*o*v+k*v+d];
}
}
}
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
tempt[a*o*o*v+i*o*v+l*v+d] = 2.0 * tb[a*o*o*v+d*o*o+i*o+l]-tb[a*o*o*v+d*o*o+l*o+i];
//tempt[l*o*v*v+d*o*v+a*o+i] = 2.0 * tb[a*o*o*v+d*o*o+i*o+l]-tb[a*o*o*v+d*o*o+l*o+i];
}
}
}
}
// hang out until the gpu finishes ...
// double wait = omp_get_wtime();
// double accum = 0.0;
// do {
// if ( omp_get_wtime() - wait > 5.0 ) {
// accum += omp_get_wtime() - wait;
// wait = omp_get_wtime();
// outfile->Printf("gpu has taken an extra %6.2lf s\n",accum);
// }
// }while(!gpudone);
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o*v,o*v,o*v,1.0,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
//else F_DGEMM('n','n',o*v,o*v,o*v,1.0,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('n','n',o*v,v,o*v,1.0,tempv,o*v,tempt+i*o*v*v,o*v,0.0,integrals+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of D2 part 1\n",gpuchunk);
helper_->GPUTiledDGEMM('n','n',o*v,gpuchunk*v,o*v,1.0,tempv,o*v,tempt+odone*o*v*v,o*v,0.0,integrals+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_QSO,"qvo",(char*)&tempv[0],nQ*o*v*sizeof(double));
psio->close(PSIF_DCC_QSO,1);
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,2.0,Qov,o*v,tempv,o*v,1.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,2.0,Qov,o*v,tempv,o*v,1.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,nQ,0.0,tempv,o*o);
else F_DGEMM('n','n',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,nQ,0.0,tempv,o*o);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//F_DGEMM('n','t',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,v*v,0.0,tempv,o*o);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
integrals[a*o*o*v+i*o*v+k*v+c] += tempv[a*o*o*v+c*o*o+k*o+i];
}
}
}
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
for (int b = 0; b < v; b++) {
for (int j = 0; j < o; j++) {
tempt[k*o*v*v+c*o*v+b*o+j] = 2.0 * tb[b*o*o*v+c*o*o+j*o+k] - tb[b*o*o*v+c*o*o+k*o+j];
}
}
}
}
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o*v,o*v,o*v,0.5,tempt,o*v,integrals,o*v,0.0,tempv,o*v);
//else F_DGEMM('n','n',o*v,o*v,o*v,0.5,tempt,o*v,integrals,o*v,0.0,tempv,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('n','n',o*v,v,o*v,0.5,tempt,o*v,integrals+i*o*v*v,o*v,0.0,tempv+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of D2 part 2\n",gpuchunk);
helper_->GPUTiledDGEMM('n','n',o*v,gpuchunk*v,o*v,0.5,tempt,o*v,integrals+odone*o*v*v,o*v,0.0,tempv+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = tempv[a*o*o*v+i*o*v+b*o+j];
}
}
}
}
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,tempt,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" D2 = 1/2 U(b,c,j,k) [ L(a,i,k,c) + 1/2 U(a,d,i,l) L(l,d,k,c) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
// E2 a: t(ac,ij) [ F(bc) - U(bd,kl) (ld|kc) ]
C_DCOPY(o*o*v*v,tb,1,tempt,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int b = 0; b < v; b++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
C_DAXPY(o,-0.5,tb+b*o*o*v+d*o*o+k,o,tempt+b*o*o*v+d*o*o+k*o,1);
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int c = 0; c < v; c++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
tempv[c*o*o*v+d*o*o+k*o+l] = integrals[l*o*v*v+d*o*v+k*v+c];
}
}
}
}
// overwriting Fab here, but it gets rebuilt every iteration anyway.
if (gpudone) helper_->GPUTiledDGEMM('t','n',v,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,Fab,v);
else F_DGEMM('t','n',v,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,Fab,v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int c = 0; c < v; c++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[c*o*o*v+a*o*o+i*o+j] = tb[a*o*o*v+c*o*o+i*o+j];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o*v,v,v,1.0,tempt,o*o*v,Fab,v,0.0,tempv,o*o*v);
else F_DGEMM('n','n',o*o*v,v,v,1.0,tempt,o*o*v,Fab,v,0.0,tempv,o*o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = tempv[b*o*o*v+a*o*o+i*o+j];
}
}
}
}
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,tempt,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" E2 = t(a,c,i,j) [ F(b,c) - U(b,d,k,l) (ld|kc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// E2 b: -t(a,b,i,k) [ F(kj) - U(c,d,l,j) (kd|lc) ]
// note that (kd|lc) should still be in integrals buffer
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int j = 0; j < o; j++) {
for (int d = 0; d < v; d++) {
for (int l = 0; l < o; l++) {
for (int c = 0; c < v; c++) {
tempt[j*o*v*v+d*o*v+l*v+c] = (2.0 * tb[c*o*o*v+d*o*o+l*o+j] - tb[c*o*o*v+d*o*o+j*o+l] );
}
}
}
}
// overwriting Fij here, but it gets rebuilt every iteration anyway.
if (gpudone) helper_->GPUTiledDGEMM('t','n',o,o,o*v*v,1.0,tempt,o*v*v,integrals,o*v*v,1.0,Fij,o);
else F_DGEMM('t','n',o,o,o*v*v,1.0,tempt,o*v*v,integrals,o*v*v,1.0,Fij,o);
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
//else F_DGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
F_DGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
// R2 = R2 + P(ia,jb) R2
C_DCOPY(o*o*v*v,tempt,1,integrals,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
integrals[a*o*o*v+b*o*o+i*o+j] += tempt[b*o*o*v+a*o*o+j*o+i];
}
}
}
}
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" - t(a,b,i,k) [ F(k,j) - U(c,d,l,j) (kd|lc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// B2 = t(ab,kl) [ (ki|lj) + t(cd,ij) (kc|ld) ]
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
for (int c = 0; c < v; c++) {
for (int d = 0; d < v; d++) {
tempv[k*o*v*v+l*v*v+c*v+d] = integrals[k*v*v*o+c*o*v+l*v+d];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*o,o*o,nQ,1.0,Qoo,o*o,Qoo,o*o,0.0,integrals,o*o);
else F_DGEMM('n','t',o*o,o*o,nQ,1.0,Qoo,o*o,Qoo,o*o,0.0,integrals,o*o);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int i = 0; i < o; i++) {
for (int l = 0; l < o; l++) {
for (int j = 0; j < o; j++) {
tempt[k*o*o*o+l*o*o+i*o+j] = integrals[k*o*o*o+i*o*o+l*o+j];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,o*o,v*v,1.0,tb,o*o,tempv,v*v,1.0,tempt,o*o);
else F_DGEMM('n','n',o*o,o*o,v*v,1.0,tb,o*o,tempv,v*v,1.0,tempt,o*o);
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,v*v,o*o,1.0,tempt,o*o,tb,o*o,0.0,integrals,o*o);
else F_DGEMM('n','n',o*o,v*v,o*o,1.0,tempt,o*o,tb,o*o,0.0,integrals,o*o);
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempt,1,integrals,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" B2 = t(a,b,k,l) [ (ki|lj) + t(c,d,i,j) (kc|ld) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
cpudone = true;
}
//////// end cpu section! ////////
}
void GPUDFCoupledCluster::CCResidual(){
bool timer = options_.get_bool("CC_TIMINGS");
long int o = ndoccact;
long int v = nvirt;
// test new transposed storage of Qvv
// qvv transpose
#pragma omp parallel for schedule (static)
for (int q = 0; q < nQ; q++) {
C_DCOPY(v*v,Qvv+q*v*v,1,integrals+q,nQ);
}
C_DCOPY(nQ*v*v,integrals,1,Qvv,1);
int n = 2 < omp_get_max_threads() ? 2 : omp_get_max_threads();
pthread_attr_t pthread_custom_attr;
pthread_t * threads = (pthread_t *)malloc(n*sizeof(*threads));
pthread_attr_init(&pthread_custom_attr);
mega * m = (mega *)malloc(sizeof(mega)*n);
gpudone = false;
cpudone = false;
double start = omp_get_wtime();
for (int i = 0; i < n; i++) {
m[i].id = i;
m[i].cc = (&(*this));
pthread_create(&threads[i], &pthread_custom_attr, doit, (void*)(m+i));
}
// Synchronize the completion of each thread.
for (int i = 0; i < n; i++) {
pthread_join(threads[i],NULL);
}
free(threads);
// it is possible the gpu didn't finish its work. check and finish with
// the CPU and the GPU together
if (cpudone && !gpudone) {
//outfile->Printf("cpu finished first! %5i %5i\n",v,last_a);fflush(stdout);//exit(0);
FinishVabcd1();
if (timer) {
outfile->Printf(" A2 = t(c,d,i,j) (ac|bd) %6.2lf\n",omp_get_wtime()-start);
}
}
// use results of contraction of (ac|bd) and t2
useVabcd1();
}
// t1-transformed 3-index fock matrix (using 3-index integrals from SCF)
void GPUDFCoupledCluster::T1Fock(){
long int o = ndoccact;
long int v = nvirt;
long int full = o+v+nfzc+nfzv;
// Ca_L = C(1-t1^T)
// Ca_R = C(1+t1)
double * Catemp = (double*)malloc(nso*full*sizeof(double));
if ( reference_wavefunction_->isCIM() ) {
boost::shared_ptr<PSIO> psio (new PSIO());
psio->open(PSIF_CIM,PSIO_OPEN_OLD);
psio->read_entry(PSIF_CIM,"C matrix",(char*)&Catemp[0],nso*full*sizeof(double));
psio->close(PSIF_CIM,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_L,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_R,1);
}else {
C_DCOPY(nso*full,&Ca[0][0],1,Ca_L,1);
C_DCOPY(nso*full,&Ca[0][0],1,Ca_R,1);
C_DCOPY(nso*full,&Ca[0][0],1,Catemp,1);
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int a = 0; a < v; a++) {
double dum = 0.0;
for (int i = 0; i < o; i++) {
dum += Catemp[mu*full+i+nfzc] * t1[a*o+i];
}
Ca_L[mu*full + a + ndocc] -= dum;
}
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int a = 0; a < v; a++) {
dum += Catemp[mu*full+a+ndocc] * t1[a*o+i];
}
Ca_R[mu*full + i + nfzc] += dum;
}
}
free(Catemp);
// (Q|rs)
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio_address addr1 = PSIO_ZERO;
psio_address addr2 = PSIO_ZERO;
psio_address addroo = PSIO_ZERO;
psio_address addrov = PSIO_ZERO;
psio_address addrvo = PSIO_ZERO;
psio_address addrvv = PSIO_ZERO;
long int nrows = 1;
long int rowsize = nQ_scf;
while ( rowsize*nso*nso > o*o*v*v ) {
nrows++;
rowsize = nQ_scf / nrows;
if (nrows * rowsize < nQ_scf) rowsize++;
if (rowsize == 1) break;
}
long int lastrowsize = nQ_scf - (nrows - 1L) * rowsize;
long int * rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qso SCF",(char*)&integrals[0],rowdims[row]*nso*nso*sizeof(double),addr1,&addr1);
F_DGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
for (int q = 0; q < rowdims[row]; q++) {
for (int mu = 0; mu < nso; mu++) {
C_DCOPY(full,tempv+q*nso*full+mu*full,1,integrals+q*nso*full+mu,nso);
}
}
F_DGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
// full Qmo
psio->write(PSIF_DCC_QSO,"Qmo SCF",(char*)&tempv[0],rowdims[row]*full*full*sizeof(double),addr2,&addr2);
}
delete rowdims;
// build Fock matrix
memset((void*)Fij,'\0',o*o*sizeof(double));
memset((void*)Fia,'\0',o*v*sizeof(double));
memset((void*)Fai,'\0',o*v*sizeof(double));
memset((void*)Fab,'\0',v*v*sizeof(double));
// transform H
double ** hp = H->pointer();
double * h = (double*)malloc(nmo*nmo*sizeof(double));
for (int mu = 0; mu < nso; mu++) {
for (int p = 0; p < nmo; p++) {
double dum = 0.0;
for (int nu = 0; nu < nso; nu++) {
dum += Ca_L[nu*full + p + nfzc] * hp[nu][mu];
}
integrals[p*nso+mu] = dum;
}
}
for (int p = 0; p < nmo; p++) {
for (int q = 0; q < nmo; q++) {
double dum = 0.0;
for (int nu = 0; nu < nso; nu++) {
dum += Ca_R[nu*full+q+nfzc] * integrals[p*nso+nu];
}
h[p*nmo+q] = dum;
}
}
double * temp3 = (double*)malloc(full*full*sizeof(double));
memset((void*)temp3,'\0',full*full*sizeof(double));
psio_address addr = PSIO_ZERO;
nrows = 1;
rowsize = nQ_scf;
while ( rowsize*full*full > o*o*v*v ) {
nrows++;
rowsize = nQ_scf / nrows;
if (nrows * rowsize < nQ_scf) rowsize++;
if (rowsize == 1) break;
}
lastrowsize = nQ_scf - (nrows - 1L) * rowsize;
rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qmo SCF",(char*)&integrals[0],rowdims[row]*full*full*sizeof(double),addr,&addr);
for (int q = 0; q < rowdims[row]; q++) {
// sum k (q|rk) (q|ks)
F_DGEMM('n','n',full,full,ndocc,-1.0,integrals+q*full*full,full,integrals+q*full*full,full,1.0,temp3,full);
// sum k (q|kk) (q|rs)
double dum = 0.0;
for (int k = 0; k < ndocc; k++) {
dum += integrals[q*full*full+k*full + k];
}
F_DAXPY(full*full,2.0 * dum,integrals+q*full*full,1,temp3,1);
}
}
delete rowdims;
psio->close(PSIF_DCC_QSO,1);
// Fij
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
Fij[i*o+j] = h[i*nmo+j] + temp3[(i+nfzc)*full+(j+nfzc)];
}
}
// Fia
for (int i = 0; i < o; i++) {
for (int a = 0; a < v; a++) {
Fia[i*v+a] = h[i*nmo+a+o] + temp3[(i+nfzc)*full+(a+ndocc)];
}
}
// Fai
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
Fai[a*o+i] = h[(a+o)*nmo+i] + temp3[(a+ndocc)*full+(i+nfzc)];
}
}
// Fab
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
Fab[a*v+b] = h[(a+o)*nmo+b+o] + temp3[(a+ndocc)*full+(b+ndocc)];
}
}
// replace eps
for (int i = 0; i < o; i++) {
eps[i] = Fij[i*o+i];
}
for (int a = 0; a < v; a++) {
eps[a+o] = Fab[a*v+a];
}
free(h);
free(temp3);
}
// t1-transformed 3-index integrals
void GPUDFCoupledCluster::T1Integrals(){
long int o = ndoccact;
long int v = nvirt;
long int full = o+v+nfzc+nfzv;
// Ca_L = C(1-t1^T)
// Ca_R = C(1+t1)
double * Catemp = (double*)malloc(nso*full*sizeof(double));
if ( reference_wavefunction_->isCIM() ) {
boost::shared_ptr<PSIO> psio (new PSIO());
psio->open(PSIF_CIM,PSIO_OPEN_OLD);
psio->read_entry(PSIF_CIM,"C matrix",(char*)&Catemp[0],nso*full*sizeof(double));
psio->close(PSIF_CIM,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_L,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_R,1);
}else {
C_DCOPY(nso*full,&Ca[0][0],1,Ca_L,1);
C_DCOPY(nso*full,&Ca[0][0],1,Ca_R,1);
C_DCOPY(nso*full,&Ca[0][0],1,Catemp,1);
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int a = 0; a < v; a++) {
double dum = 0.0;
for (int i = 0; i < o; i++) {
dum += Catemp[mu*full+i+nfzc] * t1[a*o+i];
}
Ca_L[mu*full + a + ndocc] -= dum;
}
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int a = 0; a < v; a++) {
dum += Catemp[mu*full+a+ndocc] * t1[a*o+i];
}
Ca_R[mu*full + i + nfzc] += dum;
}
}
free(Catemp);
// (Q|rs)
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio_address addr1 = PSIO_ZERO;
psio_address addrvo = PSIO_ZERO;
long int nrows = 1;
long int rowsize = nQ;
while ( rowsize*nso*nso > o*o*v*v ) {
nrows++;
rowsize = nQ / nrows;
if (nrows * rowsize < nQ) rowsize++;
if ( rowsize == 1 ) break;
}
long int lastrowsize = nQ - (nrows - 1L) * rowsize;
long int * rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qso CC",(char*)&integrals[0],rowdims[row]*nso*nso*sizeof(double),addr1,&addr1);
//helper_->GPUTiledDGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
F_DGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
for (int q = 0; q < rowdims[row]; q++) {
for (int mu = 0; mu < nso; mu++) {
C_DCOPY(full,tempv+q*nso*full+mu*full,1,integrals+q*nso*full+mu,full);
}
}
//helper_->GPUTiledDGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
F_DGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
// Qoo
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
Qoo[(q+rowdims[0]*row)*o*o+i*o+j] = tempv[q*full*full+(i+nfzc)*full+(j+nfzc)];
}
}
}
// Qov
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int i = 0; i < o; i++) {
for (int a = 0; a < v; a++) {
Qov[(q+rowdims[0]*row)*o*v+i*v+a] = tempv[q*full*full+(i+nfzc)*full+(a+ndocc)];
}
}
}
// Qvo
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
integrals[q*o*v+a*o+i] = tempv[q*full*full+(a+ndocc)*full+(i+nfzc)];
}
}
}
psio->write(PSIF_DCC_QSO,"qvo",(char*)&integrals[0],rowdims[row]*o*v*sizeof(double),addrvo,&addrvo);
// Qvv
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
Qvv[(q+rowdims[0]*row)*v*v+a*v+b] = tempv[q*full*full+(a+ndocc)*full+(b+ndocc)];
}
}
}
}
delete rowdims;
psio->close(PSIF_DCC_QSO,1);
}
double GPUDFCoupledCluster::compute_energy() {
PsiReturnType status = Success;
//WriteBanner();
AllocateMemory();
status = CCSDIterations();
// free some memory!
free(Fij);
free(Fab);
free(Abij);
free(Sbij);
free(integrals);
free(w1);
free(I1);
free(I1p);
free(diisvec);
free(tempt);
free(tempv);
// tstart in fnocc
tstop();
// mp2 energy
Process::environment.globals["MP2 CORRELATION ENERGY"] = emp2;
Process::environment.globals["MP2 TOTAL ENERGY"] = emp2 + escf;
Process::environment.globals["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = emp2_os;
Process::environment.globals["MP2 SAME-SPIN CORRELATION ENERGY"] = emp2_ss;
// ccsd energy
Process::environment.globals["CCSD CORRELATION ENERGY"] = eccsd;
Process::environment.globals["CCSD OPPOSITE-SPIN CORRELATION ENERGY"] = eccsd_os;
Process::environment.globals["CCSD SAME-SPIN CORRELATION ENERGY"] = eccsd_ss;
Process::environment.globals["CCSD TOTAL ENERGY"] = eccsd + escf;
Process::environment.globals["CURRENT ENERGY"] = eccsd + escf;
if (options_.get_bool("COMPUTE_TRIPLES")){
long int o = ndoccact;
long int v = nvirt;
if (!isLowMemory && !reference_wavefunction_->isCIM() ) {
// write (ov|vv) integrals, formerly E2abci, for (t)
double *tempq = (double*)malloc(v*nQ*sizeof(double));
// the buffer integrals was at least 2v^3, so these should definitely fit.
double *Z = (double*)malloc(v*v*v*sizeof(double));
double *Z2 = (double*)malloc(v*v*v*sizeof(double));
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_ABCI,PSIO_OPEN_NEW);
psio_address addr2 = PSIO_ZERO;
for (long int i=0; i<o; i++){
#pragma omp parallel for schedule (static)
for (long int q=0; q<nQ; q++){
for (long int b=0; b<v; b++){
tempq[q*v+b] = Qov[q*o*v+i*v+b];
}
}
helper_->GPUTiledDGEMM('n','t',v,v*v,nQ,1.0,tempq,v,Qvv,v*v,0.0,&Z[0],v);
#pragma omp parallel for schedule (static)
for (long int a=0; a<v; a++){
for (long int b=0; b<v; b++){
for (long int c=0; c<v; c++){
Z2[a*v*v+b*v+c] = Z[a*v*v+c*v+b];
}
}
}
psio->write(PSIF_DCC_ABCI,"E2abci",(char*)&Z2[0],v*v*v*sizeof(double),addr2,&addr2);
}
psio->close(PSIF_DCC_ABCI,1);
free(tempq);
free(Z);
free(Z2);
} else {
psio_address addr = PSIO_ZERO;
double * temp1 = (double*)malloc(( nQ*v > o*v*v ? nQ*v : o*v*v)*sizeof(double));
double * temp2 = (double*)malloc(o*v*v*sizeof(double));
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_ABCI4,PSIO_OPEN_NEW);
for (long int a = 0; a < v; a++) {
#pragma omp parallel for schedule (static)
for (long int q = 0; q < nQ; q++) {
for (long int c = 0; c < v; c++) {
temp1[q*v+c] = Qvv[q*v*v+a*v+c];
}
}
helper_->GPUTiledDGEMM('n','t',o*v,v,nQ,1.0,Qov,o*v,temp1,v,0.0,temp2,o*v);
#pragma omp parallel for schedule (static)
for (long int b = 0; b < v; b++) {
for (long int i = 0; i < o; i++) {
for (long int c = 0; c < v; c++) {
temp1[b*o*v+i*v+c] = temp2[c*o*v+i*v+b];
}
}
}
psio->write(PSIF_DCC_ABCI4,"E2abci4",(char*)&temp1[0],o*v*v*sizeof(double),addr,&addr);
}
psio->close(PSIF_DCC_ABCI4,1);
free(temp1);
free(temp2);
}
hipHostFree(Qvv);//free(Qvv);
double * temp1 = (double*)malloc(o*o*v*v*sizeof(double));
double * temp2 = (double*)malloc(o*o*v*v*sizeof(double));
// write (oo|ov) integrals, formerly E2ijak, for (t)
helper_->GPUTiledDGEMM('n','t',o*o,o*v,nQ,1.0,Qoo,o*o,Qov,o*v,0.0,temp1,o*o);
for (int i=0; i<o; i++){
for (int j=0; j<o; j++){
for (int k=0; k<o; k++){
for (int a=0; a<v; a++){
temp2[j*o*o*v+i*o*v+k*v+a] = temp1[i*o*o*v+a*o*o+j*o+k];
}
}
}
}
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_IJAK,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_IJAK,"E2ijak",(char*)&temp2[0],o*o*o*v*sizeof(double));
psio->close(PSIF_DCC_IJAK,1);
// df (ov|ov) integrals, formerly E2klcd
helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,temp1,o*v);
psio->open(PSIF_DCC_IAJB,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_IAJB,"E2iajb",(char*)&temp1[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_IAJB,1);
free(Qov);
free(Qoo);
free(temp1);
free(temp2);
// triples
tstart();
ccmethod = 0;
if (isLowMemory) status = lowmemory_triples();
else if (reference_wavefunction_->isCIM()) status = local_triples();
else status = triples();
if (status == Failure){
throw PsiException(
"Whoops, the (T) correction died.",__FILE__,__LINE__);
}
tstop();
// ccsd(t) energy
Process::environment.globals["(T) CORRECTION ENERGY"] = et;
Process::environment.globals["CCSD(T) CORRELATION ENERGY"] = eccsd + et;
Process::environment.globals["CCSD(T) TOTAL ENERGY"] = eccsd + et + escf;
Process::environment.globals["CURRENT ENERGY"] = eccsd + et + escf;
}else {
free(Qoo);
free(Qov);
hipHostFree(Qvv);
}
// free remaining memory
free(Fia);
free(Fai);
free(t1);
free(tb);
return Process::environment.globals["CURRENT ENERGY"];
}
void GPUDFCoupledCluster::UpdateT2(){
long int v = nvirt;
long int o = ndoccact;
long int rs = nmo;
boost::shared_ptr<PSIO> psio(new PSIO());
// df (ai|bj)
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_QSO,"qvo",(char*)&tempv[0],nQ*o*v*sizeof(double));
psio->close(PSIF_DCC_QSO,1);
helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,tempv,o*v,tempv,o*v,0.0,integrals,o*v);
// residual
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
#pragma omp parallel for schedule (static)
for (long int a=o; a<rs; a++){
double da = eps[a];
for (long int b=o; b<rs; b++){
double dab = da + eps[b];
for (long int i=0; i<o; i++){
double dabi = dab - eps[i];
for (long int j=0; j<o; j++){
long int iajb = (a-o)*v*o*o+i*v*o+(b-o)*o+j;
long int jaib = iajb + (i-j)*v*(1-v*o);
long int ijab = (a-o)*v*o*o+(b-o)*o*o+i*o+j;
double dijab = dabi-eps[j];
double tnew = - (integrals[iajb] + tempv[ijab])/dijab;
//tempt[ijab] = tnew;
tempv[ijab] = tnew;
}
}
}
}
// error vector is just dt
//C_DCOPY(o*o*v*v,tempt,1,tempv,1);
if (t2_on_disk){
psio->open(PSIF_DCC_T2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_T2,"t2",(char*)&integrals[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,integrals,1);
psio->write_entry(PSIF_DCC_T2,"t2",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_T2,1);
}else {
C_DAXPY(o*o*v*v,1.0,tempv,1,tb,1);
}
}
}}
| cf8c6f291d00c0c43337b2dabce5ce47c28e22fd.cu | /*
*@BEGIN LICENSE
*
* GPU-accelerated density-fitted coupled-cluster, a plugin to:
*
* PSI4: an ab initio quantum chemistry software package
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*@END LICENSE
*/
#include"ccsd.h"
#include<psiconfig.h>
#include<../bin/fnocc/blas.h>
#include<libmints/matrix.h>
#include<libmints/molecule.h>
#include<libmints/mints.h>
#include<libciomr/libciomr.h>
#include<libqt/qt.h>
#define PSIF_CIM 273 // TODO: move to psifiles.h
#ifdef _OPENMP
#include<omp.h>
#else
#define omp_get_thread_num() 0
#define omp_set_num_threads(a)
#define omp_get_num_threads()
#define omp_set_dynamic(a)
#define omp_set_nested(a)
#endif
#ifdef HAVE_MKL
#include<mkl.h>
#else
#define mkl_set_dynamic(a)
#define mkl_set_num_threads(a)
#define mkl_domain_set_num_threads(a,b)
#endif
#define NUMTHREADS 32
#define MAXBLOCKS 65535
__device__ int GPUKernel_Position(int i,int j) {
if (i<j){
return j*(j+1)/2+i;
}
return i*(i+1)/2+j;
}
__global__ void GPUKernel_VpVm_tiled(int a, int bstart, int bsize,int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2*bsize ) return;
// id : b*v2+c*v+d
int d = id%v;
int c = (id-d)%(v*v)/v;
if ( d > c ) return;
//int b = (id-d)%(v*bsize)/v;
//int c = (id-d-b*v)/(bsize*v);
int b = (id-d-c*v)/(v*v);
if ( b + bstart < a ) return;
int cd = c*(c+1)/2 + d;
int vtri = v*(v+1)/2;
int bv2 = b*v2;
//outp[b*vtri+cd] = in[bv2+d*v+c] + in[bv2+c*v+d];
//outm[b*vtri+cd] = in[bv2+d*v+c] - in[bv2+c*v+d];
outp[b*vtri+cd] = in[bv2+d*v+c] + in[id];
outm[b*vtri+cd] = in[bv2+d*v+c] - in[id];
}
__global__ void GPUKernel_VpVm_v2(int a, int b,int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2 ) return;
int d = id%v;
int c = (id-d)/v;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
outp[cd] = in[d*v+c] + in[c*v+d];
outm[cd] = in[d*v+c] - in[c*v+d];
}
__global__ void GPUKernel_VpVm(int a, int v,double * in,double * outp,double * outm) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
int v2 = v*v;
if ( id >= v2*v ) return;
int d = id%v;
int b = (id-d)%(v2)/v;
if ( b < a ) return;
int bma = b - a;
int c = (id-d-b*v)/(v2);
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
outp[bma*vtri+cd] = in[bma*v2+d*v+c] + in[bma*v2+c*v+d];
outm[bma*vtri+cd] = in[bma*v2+d*v+c] - in[bma*v2+c*v+d];
}
__global__ void GPUKernel_Vm(int a, int v,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*v ) return;
int d = id%v;
int b = (id-d)%(v*v)/v;
int c = (id-d-b*v)/(v*v);
if ( b < a ) return;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
out[(b-a)*vtri+cd] = in[(b-a)*v*v+d*v+c] - in[(b-a)*v*v+c*v+d];
}
__global__ void GPUKernel_Vp(int a, int v,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*v ) return;
int d = id%v;
int b = (id-d)%(v*v)/v;
int c = (id-d-b*v)/(v*v);
if ( b < a ) return;
if ( d > c ) return;
int cd = GPUKernel_Position(c,d);
int vtri = v*(v+1)/2;
out[(b-a)*vtri+cd] = in[(b-a)*v*v+d*v+c] + in[(b-a)*v*v+c*v+d];
}
using namespace psi;
namespace psi{namespace fnocc{
GPUDFCoupledCluster::GPUDFCoupledCluster(boost::shared_ptr<Wavefunction> reference_wavefunction, Options &options):
DFCoupledCluster(reference_wavefunction,options)
{
common_init();
}
GPUDFCoupledCluster::~GPUDFCoupledCluster()
{
}
// this is where we'll set up cuda/gpu stuff i suppose
void GPUDFCoupledCluster::common_init() {
long int nthreads = omp_get_max_threads();
if ( nthreads < 2 ) {
throw PsiException("GPU DFCC must be run with > 1 threads",__FILE__,__LINE__);
}
/**
* GPU helper class knows if we have gpus or not and how to use them.
* all gpu memory is allocated by the helper.
*/
helper_ = boost::shared_ptr<GPUHelper>(new GPUHelper);
// get device parameters, allocate gpu memory and pinned cpu memory
helper_->ndoccact = ndoccact;
helper_->nvirt = nvirt;
helper_->nmo = nmo;
helper_->CudaInit(options_);
gpubuffer = helper_->gpubuffer;
left = helper_->gpumemory / 8.0;
wasted = helper_->extraroom / 8.0;
num_gpus = helper_->num_gpus;
long int o = ndoccact;
long int v = nvirt;
ngputhreads=NUMTHREADS;
num=1;
if ((v*v*v)%ngputhreads==0)
nblocks = (v*v*v)/ngputhreads;
else
nblocks = (v*v*v+ngputhreads-(v*v*v)%ngputhreads)/ngputhreads;
if (nblocks>MAXBLOCKS){
num = nblocks/MAXBLOCKS+1;
nblocks = nblocks/num + 1;
}
ncputhreads = omp_get_max_threads();
if ( options_.get_bool("DGEMM_TIMINGS") ) {
helper_->DGEMM_Timings();
}
}
// accumulate results of contraction of (ac|bd) and t2
void GPUDFCoupledCluster::useVabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
for (long int a = 0; a < v; a++) {
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);;
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
//if (ntiles > 1) printf("%5i/%5i ntiles %5i\n",a,v,ntiles);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// contribute to residual
#pragma omp parallel for schedule (static)
for (long int ij = 0; ij < o*o; ij++) {
long int j = ij % o;
long int i = ( ij - j ) / o;
int sg = ( i > j ) ? 1 : -1;
for (long int b = bstart; b < bstart + bsize; b++) {
tempv[a*oo*v+b*oo+i*o+j] += tempr[Position(i,j) * vtri + Position(a,b)]
+ sg*tempr[Position(i,j) * vtri + Position(a,b) + otri*vtri];
if (a!=b) {
tempv[b*oov+a*oo+i*o+j] += tempr[Position(i,j) * vtri + Position(a,b)]
- sg*tempr[Position(i,j) * vtri + Position(a,b) + otri*vtri];
}
}
}
//gohere
}
free(tilesize);
}
// contribute to residual
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
}
void GPUDFCoupledCluster::Vabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<o; i++){
for (long int j=i; j<o; j++){
long int ij = Position(i,j);
for (long int a=0; a<v; a++){
for (long int b=a; b<v; b++){
tempr[ij*vtri+Position(a,b)] =
(tb[a*oov+b*oo+i*o+j]+tb[b*oov+a*oo+i*o+j]);
tempr[ij*vtri+Position(a,b)+vtri*otri] =
(tb[a*oov+b*oo+i*o+j]-tb[b*oov+a*oo+i*o+j]);
}
tempr[ij*vtri+Position(a,a)] = tb[a*oov+a*oo+i*o+j];
}
}
}
if ( v > nQ ) {
throw PsiException("GPU DFCC will break if Nv > Naux",__FILE__,__LINE__);
}
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
long int ntiles_ij = 1;
// do we need to tile ij?
if ( ndoubles < 0 ) {
while ( ntiles_ij < otri ) {
ntiles_ij++;
long int size = otri / ntiles_ij;
if ( size * ntiles_ij < otri ) size++;
if ( left - wasted - size * 2*vtri ) {
ndoubles = (left - wasted) - size * 2*vtri;
break;
}
}
outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
}
// sizes of ij tiles:
long int * tilesize_ij = (long int *)malloc(ntiles_ij*sizeof(long int));
for (long int tile = 0; tile < ntiles_ij - 1; tile++) {
tilesize_ij[tile] = otri / ntiles_ij;
if ( tilesize_ij[tile] * ntiles_ij < otri ) tilesize_ij[tile]++;
}
tilesize_ij[ntiles_ij-1] = otri - tilesize_ij[0] * (ntiles_ij - 1);
for (long int tile_ij = 0; tile_ij < ntiles_ij; tile_ij++) {
// copy this tile of t2 to the gpus
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i = 0; i < num_gpus; i++) {
int thread = omp_get_thread_num();
cudaSetDevice(thread);
double * gput2 = gpubuffer[thread];
cudaMemcpy(gput2, tempr + tile_ij * tilesize_ij[0] * vtri, sizeof(double) * tilesize_ij[tile_ij] * vtri,cudaMemcpyHostToDevice);
cudaMemcpy(gput2+tilesize_ij[0]*vtri,tempr + tile_ij * tilesize_ij[0] * vtri + otri * vtri,sizeof(double) * tilesize_ij[tile_ij] * vtri,cudaMemcpyHostToDevice);
}
last_a = v;
// parallelize over multiple gpus
#pragma omp parallel for schedule (dynamic) num_threads(num_gpus)
for (long int a = 0; a < v; a++) {
if (cpudone && last_a == v) { last_a = a; }
if (last_a == v) {
cudaStream_t stream;
cudaEvent_t estart,estop;
cudaEventCreate(&estart);
cudaEventCreate(&estop);
int thread = omp_get_thread_num();
cudaSetDevice(thread);
double * gput2 = gpubuffer[thread];
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i\n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 2L * tilesize_ij[0] * vtri;
double * gpuVcdb = gpubuffer[thread] + shift + (bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
double * gpuVm = gpubuffer[thread] + shift;
double * gpuVp = gpubuffer[thread] + shift + bsize*vtri;
double * gpuA = gpubuffer[thread] + shift + 2*bsize*vtri;
double * gpuIqd = gpubuffer[thread] + shift;
double * gpuIqc = gpubuffer[thread] + shift + bsize*nQ*v;
long int num = 1;
long int nblocks = ( bsize*v*v )/ NUMTHREADS;
if ( (bsize*v*v) % NUMTHREADS != 0 ) {
nblocks = (bsize*v*v+NUMTHREADS-(bsize*v*v)%NUMTHREADS)/NUMTHREADS;
}
if (nblocks > MAXBLOCKS){
num = nblocks / MAXBLOCKS + 1;
nblocks = nblocks / num + 1;
}
dim3 dimgrid (nblocks,num);
stream = NULL;
double start2 = omp_get_wtime();
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"before anything. ");
cudaEventRecord(estart,stream);
cudaMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,cudaMemcpyHostToDevice,stream);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 1");
cudaMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,cudaMemcpyHostToDevice,stream);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 2");
cublasDgemm('t','n',v,bsize*v,nQ,1.0,gpuIqc,nQ,gpuIqd,nQ,0.0,gpuVcdb,v);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v");
GPUKernel_VpVm_tiled<<<dimgrid,NUMTHREADS>>>(a,bstart,bsize,v,gpuVcdb,gpuVp,gpuVm);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v+/v-");
cublasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
cublasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
cudaMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],cudaMemcpyDeviceToHost,stream);
cudaEventRecord(estop,stream);
while( cudaEventQuery(estop) == cudaErrorNotReady );
double end2 = omp_get_wtime();
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
//gohere
}
free(tilesize);
}
}
}
free(tilesize_ij);
}
void GPUDFCoupledCluster::FinishVabcd1(){
long int o = ndoccact;
long int v = nvirt;
long int oov = o*o*v;
long int oo = o*o;
long int otri = o*(o+1)/2;
long int vtri = v*(v+1)/2;
boost::shared_ptr<PSIO> psio(new PSIO());
// need to build t2+/- for CPU to use
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<o; i++){
for (long int j=i; j<o; j++){
long int ij = Position(i,j);
for (long int a=0; a<v; a++){
for (long int b=a; b<v; b++){
tempt[ij*vtri+Position(a,b)] =
(tb[a*oov+b*oo+i*o+j]+tb[b*oov+a*oo+i*o+j]);
tempt[ij*vtri+Position(a,b)+vtri*otri] =
(tb[a*oov+b*oo+i*o+j]-tb[b*oov+a*oo+i*o+j]);
}
tempt[ij*vtri+Position(a,a)] = tb[a*oov+a*oo+i*o+j];
}
}
}
// available gpu memory (in doubles)
long int ndoubles = (left - wasted) - 2*otri*vtri;
long int ntiles_ij = 1;
// available cpu memory (in doubles)
long int nQmax = nQ > nQ_scf ? nQ : nQ_scf;
long int dim = 2L*v*v*v;
if (2*nQmax*o*v>dim) dim = 2*nQmax*o*v;
if (o*o*v*v>dim) dim = o*o*v*v;
if (nQmax*v*v>dim) dim = nQmax*v*v;
if (nQmax*nso*nso>dim) dim = nQmax*nso*nso;
long int ndoubles_cpu = dim;
// do we need to tile ij?
if ( ndoubles < 0 ) {
while ( ntiles_ij < otri ) {
ntiles_ij++;
long int size = otri / ntiles_ij;
if ( size * ntiles_ij < otri ) size++;
if ( left - wasted - size * 2*vtri ) {
ndoubles = (left - wasted) - size * 2*vtri;
break;
}
}
//outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
//outfile->Printf(" <<< warning >>> tiling composite ij index (%5li tiles)\n",ntiles_ij);
throw PsiException(" <<< warning >>> tiling composite ij index ... feature temporarily disabled",__FILE__,__LINE__);
}
// sizes of ij tiles:
long int * tilesize_ij = (long int *)malloc(ntiles_ij*sizeof(long int));
for (long int tile = 0; tile < ntiles_ij - 1; tile++) {
tilesize_ij[tile] = otri / ntiles_ij;
if ( tilesize_ij[tile] * ntiles_ij < otri ) tilesize_ij[tile]++;
}
tilesize_ij[ntiles_ij-1] = otri - tilesize_ij[0] * (ntiles_ij - 1);
omp_set_nested(1);
omp_set_dynamic(0);
mkl_set_dynamic(0);
int nthreads = omp_get_max_threads();
for (long int tile_ij = 0; tile_ij < ntiles_ij; tile_ij++) {
// copy this tile of t2 to the gpus (already there)
// parallelize over multiple gpus
#pragma omp parallel for schedule (dynamic) num_threads(num_gpus + 1)
for (long int a = last_a; a < v; a++) {
int thread = omp_get_thread_num();
if ( thread < num_gpus ) {
cudaStream_t stream;
cudaEvent_t estart,estop;
cudaEventCreate(&estart);
cudaEventCreate(&estop);
cudaSetDevice(thread);
double * gput2 = gpubuffer[thread];
// do we need to tile loop over b >= a?
long int ntiles = 1;
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles >= max + size*nQ*v ) break;
ntiles++;
}
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i\n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 2L * tilesize_ij[0] * vtri;
double * gpuVcdb = gpubuffer[thread] + shift + (bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
double * gpuVm = gpubuffer[thread] + shift;
double * gpuVp = gpubuffer[thread] + shift + bsize*vtri;
double * gpuA = gpubuffer[thread] + shift + 2*bsize*vtri;
double * gpuIqd = gpubuffer[thread] + shift;
double * gpuIqc = gpubuffer[thread] + shift + bsize*nQ*v;
long int num = 1;
long int nblocks = ( bsize*v*v )/ NUMTHREADS;
if ( (bsize*v*v) % NUMTHREADS != 0 ) {
nblocks = (bsize*v*v+NUMTHREADS-(bsize*v*v)%NUMTHREADS)/NUMTHREADS;
}
if (nblocks > MAXBLOCKS){
num = nblocks / MAXBLOCKS + 1;
nblocks = nblocks / num + 1;
}
dim3 dimgrid (nblocks,num);
stream = NULL;
double start2 = omp_get_wtime();
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"before anything. ");
cudaEventRecord(estart,stream);
cudaMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,cudaMemcpyHostToDevice,stream);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 1");
cudaMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,cudaMemcpyHostToDevice,stream);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"memcpy 2");
cublasDgemm('t','n',v,bsize*v,nQ,1.0,gpuIqc,nQ,gpuIqd,nQ,0.0,gpuVcdb,v);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v");
GPUKernel_VpVm_tiled<<<dimgrid,NUMTHREADS>>>(a,bstart,bsize,v,gpuVcdb,gpuVp,gpuVm);
//cudaThreadSynchronize();
//helper_->Check_CUDA_Error(outfile,"building v+/v-");
cublasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
cublasDgemm('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,gput2+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
cudaMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],cudaMemcpyDeviceToHost,stream);
cudaEventRecord(estop,stream);
while( cudaEventQuery(estop) == cudaErrorNotReady );
double end2 = omp_get_wtime();
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = tempr2[thread][(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
}
free(tilesize);
}else {
// cpu work
mkl_set_num_threads(nthreads - num_gpus);
// do we need to tile loop over b >= a?
long int ntiles = 1;
/*
while ( ntiles < v-a ) {
long int size = (v - a) / ntiles;
if (size * ntiles < v - a) size++;
long int max = (size*nQ*v+nQ*v > 2*size*vtri ? size*nQ*v + nQ*v : 2*size*vtri);
//if ( ndoubles >= max + 2*size*otri ) break;
if ( ndoubles_cpu >= max + size*nQ*v ) break;
ntiles++;
}
*/
// tile dimensions
long int * tilesize = (long int *)malloc(ntiles*sizeof(long int));
for (long int tile = 0; tile < ntiles - 1; tile++) {
tilesize[tile] = (v-a) / ntiles;
if ( tilesize[tile] * ntiles < v - a) tilesize[tile]++;
}
tilesize[ntiles-1] = (v - a) - tilesize[0] * (ntiles - 1);
if (ntiles > 1) outfile->Printf("%5i/%5i ntiles %5i tilesize %5i (cpu) \n",a,v,ntiles,tilesize[0]);fflush(stdout);
for (long int tileb = 0; tileb < ntiles; tileb++) {
long int bsize = tilesize[tileb];
long int bstart = a + tileb*tilesize[0];
// shift other buffers by 2 * tilesize_ij * vtri
long int shift = 0;//2L * tilesize_ij[0] * vtri;
double * gpuVm = integrals + shift;
double * gpuVp = integrals + shift + bsize*vtri;
double * gpuA = integrals + shift + 2*bsize*vtri;
double * gpuVcdb = integrals + shift + 3*bsize*vtri;//(bsize*nQ*v + nQ*v > 2*bsize*vtri ? bsize*nQ*v + nQ*v : 2*bsize*vtri);
//double * gpuIqd = integrals + shift;
//double * gpuIqc = integrals + shift + bsize*nQ*v;
double start2 = omp_get_wtime();
//cudaMemcpyAsync(gpuIqc,Qvv+a*nQ*v,sizeof(double)*nQ*v,cudaMemcpyHostToDevice,stream);
//cudaMemcpyAsync(gpuIqd,Qvv+bstart*nQ*v,sizeof(double)*bsize*nQ*v,cudaMemcpyHostToDevice,stream);
F_DGEMM('t','n',v,bsize*v,nQ,1.0,Qvv+a*nQ*v,nQ,Qvv+bstart*nQ*v,nQ,0.0,gpuVcdb,v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads - num_gpus)
for (int d = 0; d < v; d++) {
for (int c = d; c < v; c++) {
int cd = c*(c+1)/2 + d;
for (int b = bstart; b < v; b++) {
int id = d + c*v + (b-bstart)*v*v;
int bv2 = (b-bstart)*v*v;
gpuVp[(b-bstart)*vtri+cd] = gpuVcdb[bv2+d*v+c] + gpuVcdb[id];
gpuVm[(b-bstart)*vtri+cd] = gpuVcdb[bv2+d*v+c] - gpuVcdb[id];
}
}
}
F_DGEMM('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,tempt, vtri,gpuVp,vtri,0.0,gpuA, tilesize_ij[tile_ij]);
F_DGEMM('t','n',tilesize_ij[tile_ij],bsize,vtri,0.5,tempt+tilesize_ij[0]*vtri,vtri,gpuVm,vtri,0.0,gpuA+bsize*tilesize_ij[tile_ij],tilesize_ij[tile_ij]);
//cudaMemcpyAsync(tempr2[thread],gpuA,sizeof(double)*2*bsize*tilesize_ij[tile_ij],cudaMemcpyDeviceToHost,stream);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads - num_gpus)
for (int ij = 0; ij < tilesize_ij[tile_ij]; ij++) {
for (int b = bstart; b < bstart + bsize; b++) {
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)] = gpuA[(b-bstart)*tilesize_ij[tile_ij]+ij];
tempr[(ij+tile_ij*tilesize_ij[0])*vtri + Position(a,b)+otri*vtri] = gpuA[(b-bstart)*tilesize_ij[tile_ij]+ij+bsize*tilesize_ij[tile_ij]];
}
}
}
free(tilesize);
}
}
}
free(tilesize_ij);
omp_set_nested(0);
omp_set_dynamic(1);
mkl_set_dynamic(1);
mkl_set_num_threads(nthreads);
}
void GPUDFCoupledCluster::CudaInit(){
num_gpus = 0;
cublasInit();
helper_->Check_CUDA_Error(stdout,"cudaInit");
struct cudaDeviceProp cudaProp;
int gpu_id;
// how many GPUs do we have?
cudaGetDeviceCount(&num_gpus);
helper_->Check_CUDA_Error(stdout,"cudaGetDeviceCount");
if ( num_gpus == 0 ) {
throw PsiException(" Error: no cuda capable device detected.",__FILE__,__LINE__);
}
if (options_["NUM_GPUS"].has_changed()) {
num_gpus = options_.get_int("NUM_GPUS");
}
cudaGetDevice(&gpu_id);
helper_->Check_CUDA_Error(stdout,"cudaGetDevice");
cudaGetDeviceProperties( &cudaProp,gpu_id );
helper_->Check_CUDA_Error(stdout,"cudaGetDeviceProperties");
outfile->Printf("\n");
outfile->Printf(" _________________________________________________________\n");
outfile->Printf(" CUDA device properties:\n");
outfile->Printf(" name: %20s\n",cudaProp.name);
outfile->Printf(" major version: %20d\n",cudaProp.major);
outfile->Printf(" minor version: %20d\n",cudaProp.minor);
outfile->Printf(" canMapHostMemory: %20d\n",cudaProp.canMapHostMemory);
outfile->Printf(" totalGlobalMem: %20lu mb\n",cudaProp.totalGlobalMem/(1024*1024));
outfile->Printf(" sharedMemPerBlock: %20lu\n",cudaProp.sharedMemPerBlock);
outfile->Printf(" clockRate: %20.3f ghz\n",cudaProp.clockRate/1.0e6);
outfile->Printf(" regsPerBlock: %20d\n",cudaProp.regsPerBlock);
outfile->Printf(" warpSize: %20d\n",cudaProp.warpSize);
outfile->Printf(" maxThreadsPerBlock: %20d\n",cudaProp.maxThreadsPerBlock);
outfile->Printf(" _________________________________________________________\n");
outfile->Printf("\n");
//fflush(outfile);
// device memory left after some arrays (no, now total memory)
int o = ndoccact;
int v = nvirt;
left = cudaProp.totalGlobalMem/8.;// - 3*o*o*v*v - o*v-nmo*nmo;
wasted = 200*1024*1024/8.; // leave an extra 200 mb on there.
ngputhreads=NUMTHREADS;
num=1;
if ((v*v*v)%ngputhreads==0)
nblocks = (v*v*v)/ngputhreads;
else
nblocks = (v*v*v+ngputhreads-(v*v*v)%ngputhreads)/ngputhreads;
if (nblocks>MAXBLOCKS){
num = nblocks/MAXBLOCKS+1;
nblocks = nblocks/num + 1;
}
cudaDeviceReset();
helper_->Check_CUDA_Error(stdout,"cudaDeviceReset");
}
void GPUDFCoupledCluster::CudaFinalize(){
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i=0; i<num_gpus; i++){
int thread = omp_get_thread_num();
cudaSetDevice(thread);
cudaFree(gpubuffer[thread]);
}
cudaDeviceReset();
}
void GPUDFCoupledCluster::AllocateGPUMemory(){
gpubuffer = (double**)malloc(num_gpus*sizeof(double*));
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i=0; i<num_gpus; i++){
int thread = omp_get_thread_num();
cudaSetDevice(thread);
helper_->Check_CUDA_Error(stdout,"cudaSetDevice");
cudaMalloc((void**)&gpubuffer[thread],sizeof(double)*(left-wasted));
helper_->Check_CUDA_Error(stdout,"gpu memory");
printf("%5i %5i\n",thread,i);fflush(stdout);
}
}
void GPUDFCoupledCluster::AllocateMemory() {
if (nirrep_>1){
throw PsiException("df_ccsd requires symmetry c1",__FILE__,__LINE__);
}
ischolesky_ = ( options_.get_str("DF_BASIS_CC") == "CHOLESKY" );
nQ = (int)Process::environment.globals["NAUX (CC)"];
nQ_scf = (int)Process::environment.globals["NAUX (SCF)"];
if (!reference_wavefunction_->isCIM()){
int count=0;
eps = (double*)malloc((ndoccact+nvirt)*sizeof(double));
boost::shared_ptr<Vector> eps_test = reference_wavefunction_->epsilon_a();
for (int h=0; h<nirrep_; h++){
for (int norb = frzcpi_[h]; norb<doccpi_[h]; norb++){
eps[count++] = eps_test->get(h,norb);
}
}
for (int h=0; h<nirrep_; h++){
for (int norb = doccpi_[h]; norb<nmopi_[h]-frzvpi_[h]; norb++){
eps[count++] = eps_test->get(h,norb);
}
}
}else{
// orbital energies in qt ordering:
long int count = 0;
eps = (double*)malloc((ndoccact+nvirt)*sizeof(double));
boost::shared_ptr<Vector> eps_test = reference_wavefunction_->CIMOrbitalEnergies();
for (int i = 0; i < ndoccact + nvirt; i++){
eps[i] = eps_test->get(0,i+nfzc);
}
eps_test.reset();
}
long int o = ndoccact;
long int v = nvirt;
/*========================================================
ccsd memory requirements:
tb: o^2v^2
tempt: o^2v^2+ov ( actually o(o+1)v(v+1) + ov )
tempv: max (o^2v^2+ov , o*v*nQ)
integrals: max(2v^3,nQ*nso^2, o^2v^2, 2v^3, 2nQ*o*v) (this is a minimum)
Abij (SJS v^4 result): o(o+1)v/2
Sbij (SJS v^4 result): o(o+1)v/2
other stuff: 2ov+2v^2+(o+v)
total: 3o^2v^2 + 2v^3 + o(o+1)v + 4ov + 2v^2 + (o+v) or
4o^2v^2 + o(o+1)v + 4ov + 2v^2 + (o+v) or
3o^2v^2 + 2ovnQ + o(o+1)v + 4ov + 2v^2 + (o+v)
compare to the requirements for the (T) part:
2o^2v^2 + 3v^3*nthreads + o^3v + ov
========================================================*/
// reduce available memory by the amount required by the helper class
memory -= helper_->max_mapped_memory;
long int nQmax = nQ > nQ_scf ? nQ : nQ_scf;
// for the df version, the dimension of the large buffer:
long int dim = 2L*v*v*v;
if (2*nQmax*o*v>dim) dim = 2*nQmax*o*v;
if (o*o*v*v>dim) dim = o*o*v*v;
if (nQmax*v*v>dim) dim = nQmax*v*v;
if (nQmax*nso*nso>dim) dim = nQmax*nso*nso;
double total_memory = dim+(o*o*v*v+o*v)+(o*(o+1)*v*(v+1)+o*v)+o*o*v*v+2.*o*v+2.*v*v;
long int max = nvirt*nvirt*nQmax > (nfzv+ndocc+nvirt)*ndocc*nQmax ? nvirt*nvirt*nQmax : (nfzv+ndocc+nvirt)*ndocc*nQmax;
double df_memory = nQmax*(o*o+o*v)+max;
total_memory *= 8./1024./1024.;
df_memory *= 8./1024./1024.;
outfile->Printf(" Total memory requirements: %9.2lf mb\n",df_memory+total_memory);
outfile->Printf(" 3-index integrals: %9.2lf mb\n",df_memory);
outfile->Printf(" CCSD intermediates: %9.2lf mb\n",total_memory);
outfile->Printf("\n");
if (1.0 * memory / 1024. / 1024. < total_memory + df_memory) {
outfile->Printf("\n");
outfile->Printf(" error: not enough memory for ccsd. increase available memory by %7.2lf mb\n",total_memory+df_memory-1.0*memory/1024./1024.);
outfile->Printf("\n");
//fflush(outfile);
throw PsiException("not enough memory (ccsd).",__FILE__,__LINE__);
}
if (options_.get_bool("COMPUTE_TRIPLES")) {
long int nthreads = omp_get_max_threads();
double tempmem = 8.*(2L*o*o*v*v+o*o*o*v+o*v+3L*v*v*v*nthreads);
if (tempmem > memory) {
outfile->Printf("\n <<< warning! >>> switched to low-memory (t) algorithm\n\n");
}
if (tempmem > memory || options_.get_bool("TRIPLES_LOW_MEMORY")){
throw PsiException("low-memory triples option not yet implemented",__FILE__,__LINE__);
isLowMemory = true;
tempmem = 8.*(2L*o*o*v*v+o*o*o*v+o*v+5L*o*o*o*nthreads);
}
outfile->Printf(" memory requirements for CCSD(T): %9.2lf mb\n\n",tempmem/1024./1024.);
}
cudaMallocHost((void**)&Qvv,nvirt*nvirt*nQ*sizeof(double));
cudaThreadSynchronize();
helper_->Check_CUDA_Error(stdout,"allocate host Qvv");
tempr = (double*)malloc(o*(o+1)*v*(v+1)/2*sizeof(double));
cudaThreadSynchronize();
helper_->Check_CUDA_Error(stdout,"allocate host tempr");
// o*(o+1)*v mapped memory for each gpu:
// for now, give the choice of using helper's or allocating more. TODO:
// need to figure out a cleaner way to choose the memory we want to pin
// and Qvv needs to be considerred as well.
if ( o*(o+1)/v*sizeof(double) < helper_->max_mapped_memory_per_thread ) {
tempr2 = helper_->tmp;
}else {
tempr2 = (double**)malloc(num_gpus*sizeof(double*));
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (long int i=0; i<num_gpus; i++){
long int thread = 0;
#ifdef _OPENMP
thread = omp_get_thread_num();
#endif
cudaSetDevice(thread);
helper_->Check_CUDA_Error(stdout,"cudaSetDevice");
cudaMallocHost((void**)&tempr2[thread],o*(o+1)*v*sizeof(double));
helper_->Check_CUDA_Error(stdout,"cpu tempr2");
}
}
// allocate some memory for 3-index tensors
Qoo = (double*)malloc(ndoccact*ndoccact*nQmax*sizeof(double));
Qov = (double*)malloc(ndoccact*nvirt*nQmax*sizeof(double));
long int tempvdim = o*o*v*v+o*v;
if ( nQmax * o * v > tempvdim) tempvdim = nQmax * o * v;
integrals = (double*)malloc(dim*sizeof(double));
tempt = (double*)malloc((o*(o+1)*v*(v+1)+o*v)*sizeof(double));
tempv = (double*)malloc(tempvdim*sizeof(double));
Abij = (double*)malloc(o*(o+1)/2*v*sizeof(double));
Sbij = (double*)malloc(o*(o+1)/2*v*sizeof(double));
tb = (double*)malloc(o*o*v*v*sizeof(double));
w1 = (double*)malloc(o*v*sizeof(double));
t1 = (double*)malloc(o*v*sizeof(double));
I1 = (double*)malloc(v*v*sizeof(double));
I1p = (double*)malloc(v*v*sizeof(double));
memset((void*)integrals,'\0',dim*sizeof(double));
memset((void*)tempv,'\0',tempvdim*sizeof(double));
memset((void*)tempt,'\0',(o*(o+1)*v*(v+1)+o*v)*sizeof(double));
memset((void*)tempr,'\0',(o*(o+1)*v*(v+1)/2)*sizeof(double));
memset((void*)tb,'\0',o*o*v*v*sizeof(double));
memset((void*)w1,'\0',o*v*sizeof(double));
memset((void*)t1,'\0',o*v*sizeof(double));
memset((void*)I1,'\0',v*v*sizeof(double));
memset((void*)I1p,'\0',v*v*sizeof(double));
memset((void*)Abij,'\0',o*(o+1)/2*v*sizeof(double));
memset((void*)Sbij,'\0',o*(o+1)/2*v*sizeof(double));
// DIIS:
diisvec = (double*)malloc(sizeof(double)*(maxdiis+1));
memset((void*)diisvec,'\0',(maxdiis+1)*sizeof(double));
// new 3-index stuff for t1-transformed integrals:
Fij = (double*)malloc(o*o*sizeof(double));
Fia = (double*)malloc(o*v*sizeof(double));
Fai = (double*)malloc(o*v*sizeof(double));
Fab = (double*)malloc(v*v*sizeof(double));
Ca_R = (double*)malloc(nso*(nmo+nfzc+nfzv)*sizeof(double));
Ca_L = (double*)malloc(nso*(nmo+nfzc+nfzv)*sizeof(double));
Ca = reference_wavefunction_->Ca()->pointer();
// one-electron integrals
boost::shared_ptr<MintsHelper> mints(new MintsHelper());
H = mints->so_kinetic();
H->add(mints->so_potential());
}
// GPU kernels!
__global__ void GPUKernel_Iqdb(int a,int v,int nQ,double * in,double * out) {
int blockid = blockIdx.x*gridDim.y + blockIdx.y;
int id = blockid*blockDim.x + threadIdx.x;
if ( id >= v*v*nQ ) return;
int q = id%nQ;
int d = (id-q)%(nQ*v)/nQ;
int b = (id-q-d*nQ)/(nQ*v);
if ( b < a ) return;
int id2 = (b-a)*nQ*v+d*nQ+q;
out[id2] = in[id];
}
typedef struct {
int id;
GPUDFCoupledCluster * cc;
} mega;
void *doit(void*x) {
mega * m = (mega * )x;
m->cc->pthreadCCResidual(m->id);
return (NULL);
}
void GPUDFCoupledCluster::pthreadCCResidual(int id) {
bool timer = options_.get_bool("CC_TIMINGS");
long int o = ndoccact;
long int v = nvirt;
//////// start gpu section! ////////
if (id==0)
{
omp_set_num_threads(num_gpus);
int nthreads = omp_get_max_threads();
#pragma omp parallel for schedule (static) num_threads(num_gpus)
for (int i = 0 ; i < num_gpus; i++) {
int mythread = omp_get_thread_num();
cudaSetDevice(mythread);
}
double start = omp_get_wtime();
Vabcd1();
if (last_a == v) {
gpudone = true;
if (timer) {
outfile->Printf(" A2 = t(c,d,i,j) (ac|bd) %6.2lf\n",omp_get_wtime()-start);
}
}
else
gpudone = false;
//////// end gpu section! ////////
}
//////// start cpu section! ////////
else
{
int mythread = omp_get_thread_num();
// pthread has NO idea what the right number of threads is ...
int nthreads = ncputhreads;//omp_get_max_threads();
if (nthreads > 1 + num_gpus) nthreads -= num_gpus;
omp_set_num_threads(nthreads);
mkl_set_num_threads(nthreads);
mkl_domain_set_num_threads(nthreads, MKL_DOMAIN_BLAS);
double start;
// C2 = -1/2 t(bc,kj) [ (ki|ac) - 1/2 t(ad,li) (kd|lc) ]
// + t(bc,ki) [ (kj|ac) - 1/2 t(ad,lj) (kd|lc) ]
if (timer) start = omp_get_wtime();
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 1 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
tempt[a*o*o*v+i*o*v+l*v+d] = tb[a*o*o*v+d*o*o+l*o+i];
}
}
}
}
//printf("position 2 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempv[k*o*v*v+c*o*v+l*v+d] = integrals[k*o*v*v+d*o*v+l*v+c];
}
}
}
}
// hang out until the gpu finishes ...
// double wait = omp_get_wtime();
// double accum = 0.0;
// do {
// if ( omp_get_wtime() - wait > 5.0 ) {
// accum += omp_get_wtime() - wait;
// wait = omp_get_wtime();
// outfile->Printf("gpu has taken an extra %6.2lf s\n",accum);
// }
// }while(!gpudone);
//printf("position 3 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,o*v,o*v,-0.5,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
// else F_DGEMM('t','n',o*v,o*v,o*v,-0.5,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
long int gpuchunk = 0;
long int odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('t','n',o*v,v,o*v,-0.5,tempv,o*v,tempt+i*o*v*v,o*v,0.0,integrals+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of C2 part 1\n",gpuchunk);
helper_->GPUTiledDGEMM('t','n',o*v,gpuchunk*v,o*v,-0.5,tempv,o*v,tempt+odone*o*v*v,o*v,0.0,integrals+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 4 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
if (gpudone) helper_->GPUTiledDGEMM('t','t',v*v,o*o,nQ,1.0,Qvv,nQ,Qoo,o*o,0.0,tempv,v*v);
else F_DGEMM('t','t',v*v,o*o,nQ,1.0,Qvv,nQ,Qoo,o*o,0.0,tempv,v*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 5 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
//F_DGEMM('n','t',v*v,o*o,nQ,1.0,Qvv,v*v,Qoo,o*o,0.0,tempv,v*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
integrals[a*o*o*v+i*o*v+k*v+c] += tempv[k*o*v*v+i*v*v+a*v+c];
}
}
}
}
//printf("position 6 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int b = 0; b < v; b++) {
for (int j = 0; j < o; j++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempt[b*o*o*v+j*o*v+k*v+c] = tb[b*o*o*v+c*o*o+k*o+j];
}
}
}
}
//printf("position 7 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,o*v,o*v,-1.0,integrals,o*v,tempt,o*v,0.0,tempv,o*v);
// else F_DGEMM('t','n',o*v,o*v,o*v,-1.0,integrals,o*v,tempt,o*v,0.0,tempv,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('t','n',o*v,v,o*v,-1.0,integrals,o*v,tempt+i*o*v*v,o*v,0.0,tempv+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of C2 part 2\n",gpuchunk);
helper_->GPUTiledDGEMM('t','n',o*v,gpuchunk*v,o*v,-1.0,integrals,o*v,tempt+odone*o*v*v,o*v,0.0,tempv+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//printf("position 8 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = 0.5 * tempv[b*o*o*v+j*o*v+a*o+i] + tempv[b*o*o*v+i*o*v+a*o+j];
}
}
}
}
//printf("position 9 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
// first contribution to residual
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_R2,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
//printf("position 10 %20.12lf\n",omp_get_wtime()-start);fflush(stdout);
if (timer) {
outfile->Printf("\n");
outfile->Printf(" C2 = -1/2 t(b,c,k,j) [ (ki|ac) - 1/2 t(a,d,l,i) (kd|lc) ]\n");
outfile->Printf(" + t(b,c,k,i) [ (kj|ac) - 1/2 t(a,d,l,j) (kd|lc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// now singles residual:
// D1: F(ai)
C_DCOPY(o*v,Fai,1,w1,1);
// A1 (G): U(c,d,k,l) (ad|kc)
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int d = 0; d < v; d++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempt[d*o*o*v+i*o*v+k*v+c] = (2.0*tb[c*o*o*v+d*o*o+k*o+i] - tb[c*o*o*v+d*o*o+i*o+k]);
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('t','n',o*v,nQ,o*v,1.0,tempt,o*v,Qov,o*v,0.0,tempv,o*v);
else F_DGEMM('t','n',o*v,nQ,o*v,1.0,tempt,o*v,Qov,o*v,0.0,tempv,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int q = 0; q < nQ; q++) {
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
integrals[q*v*v+b*v+a] = Qvv[a*v*nQ+b*nQ+q];
}
}
}
//#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
//for (int q = 0; q < nQ; q++) {
// for (int a = 0; a < v; a++) {
// C_DCOPY(v,Qvv+q*v*v+a*v,1,integrals+q*v*v+a,v);
// }
//}
//if (gpudone) helper_->GPUTiledDGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
//else F_DGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
F_DGEMM('n','t',o,v,v*nQ,1.0,tempv,o,integrals,v,1.0,w1,o);
if (timer) {
outfile->Printf(" A1 = U(c,d,k,l) (ad|kc) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// B1 (H): -U(a,c,k,l) (ki|lc)
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*o,nQ,1.0,Qov,o*v,Qoo,o*o,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*o,nQ,1.0,Qov,o*v,Qoo,o*o,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int i = 0; i < o; i++) {
for (int c = 0; c < v; c++) {
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
tempv[i*o*o*v+c*o*o+k*o+l] = integrals[k*o*o*v+i*o*v+l*v+c];
}
}
}
}
C_DCOPY(o*o*v*v,tb,1,tempt,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int c = 0; c < v; c++) {
for (int k = 0; k < o; k++) {
C_DAXPY(o,-0.5,tb+a*o*o*v+c*o*o+k,o,tempt+a*o*o*v+c*o*o+k*o,1);
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('t','n',o,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,w1,o);
else F_DGEMM('t','n',o,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,w1,o);
if (timer) {
outfile->Printf(" B1 = - U(a,c,k,l) (ki|lc) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// C1
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
dum += Fia[k*v+c] * (2.0*tb[a*o*o*v+c*o*o+i*o+k] - tb[a*o*o*v+c*o*o+k*o+i]);
}
}
w1[a*o+i] += dum;
}
}
if (timer) {
outfile->Printf(" C1 = F(k,c) U(a,c,i,k) %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// D2: 1/2 U(b,c,j,k) [ L(a,i,k,c) + 1/2 U(a,d,i,l) L(l,d,k,c) ]
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
C_DCOPY(o*o*v*v,integrals,1,tempv,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
tempv[l*o*v*v+d*o*v+k*v+c] -= 0.5 * integrals[l*o*v*v+c*o*v+k*v+d];
}
}
}
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int l = 0; l < o; l++) {
for (int d = 0; d < v; d++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
tempt[a*o*o*v+i*o*v+l*v+d] = 2.0 * tb[a*o*o*v+d*o*o+i*o+l]-tb[a*o*o*v+d*o*o+l*o+i];
//tempt[l*o*v*v+d*o*v+a*o+i] = 2.0 * tb[a*o*o*v+d*o*o+i*o+l]-tb[a*o*o*v+d*o*o+l*o+i];
}
}
}
}
// hang out until the gpu finishes ...
// double wait = omp_get_wtime();
// double accum = 0.0;
// do {
// if ( omp_get_wtime() - wait > 5.0 ) {
// accum += omp_get_wtime() - wait;
// wait = omp_get_wtime();
// outfile->Printf("gpu has taken an extra %6.2lf s\n",accum);
// }
// }while(!gpudone);
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o*v,o*v,o*v,1.0,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
//else F_DGEMM('n','n',o*v,o*v,o*v,1.0,tempv,o*v,tempt,o*v,0.0,integrals,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('n','n',o*v,v,o*v,1.0,tempv,o*v,tempt+i*o*v*v,o*v,0.0,integrals+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of D2 part 1\n",gpuchunk);
helper_->GPUTiledDGEMM('n','n',o*v,gpuchunk*v,o*v,1.0,tempv,o*v,tempt+odone*o*v*v,o*v,0.0,integrals+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_QSO,"qvo",(char*)&tempv[0],nQ*o*v*sizeof(double));
psio->close(PSIF_DCC_QSO,1);
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,2.0,Qov,o*v,tempv,o*v,1.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,2.0,Qov,o*v,tempv,o*v,1.0,integrals,o*v);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,nQ,0.0,tempv,o*o);
else F_DGEMM('n','n',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,nQ,0.0,tempv,o*o);
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
//F_DGEMM('n','t',o*o,v*v,nQ,-1.0,Qoo,o*o,Qvv,v*v,0.0,tempv,o*o);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
integrals[a*o*o*v+i*o*v+k*v+c] += tempv[a*o*o*v+c*o*o+k*o+i];
}
}
}
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int c = 0; c < v; c++) {
for (int b = 0; b < v; b++) {
for (int j = 0; j < o; j++) {
tempt[k*o*v*v+c*o*v+b*o+j] = 2.0 * tb[b*o*o*v+c*o*o+j*o+k] - tb[b*o*o*v+c*o*o+k*o+j];
}
}
}
}
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o*v,o*v,o*v,0.5,tempt,o*v,integrals,o*v,0.0,tempv,o*v);
//else F_DGEMM('n','n',o*v,o*v,o*v,0.5,tempt,o*v,integrals,o*v,0.0,tempv,o*v);
gpuchunk = 0;
odone = 0;
for (int i = 0; i < o; i++) {
if (!gpudone) {
F_DGEMM('n','n',o*v,v,o*v,0.5,tempt,o*v,integrals+i*o*v*v,o*v,0.0,tempv+i*o*v*v,o*v);
}else {
gpuchunk = o - i;
odone = i;
break;
}
}
if (gpudone && gpuchunk > 0) {
outfile->Printf("gpu finished with %5li tiles left of D2 part 2\n",gpuchunk);
helper_->GPUTiledDGEMM('n','n',o*v,gpuchunk*v,o*v,0.5,tempt,o*v,integrals+odone*o*v*v,o*v,0.0,tempv+odone*o*v*v,o*v);
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = tempv[a*o*o*v+i*o*v+b*o+j];
}
}
}
}
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,tempt,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" D2 = 1/2 U(b,c,j,k) [ L(a,i,k,c) + 1/2 U(a,d,i,l) L(l,d,k,c) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
if (gpudone) {
omp_set_num_threads(ncputhreads);
mkl_set_num_threads(ncputhreads);
mkl_domain_set_num_threads(ncputhreads, MKL_DOMAIN_BLAS);
}
// E2 a: t(ac,ij) [ F(bc) - U(bd,kl) (ld|kc) ]
C_DCOPY(o*o*v*v,tb,1,tempt,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int b = 0; b < v; b++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
C_DAXPY(o,-0.5,tb+b*o*o*v+d*o*o+k,o,tempt+b*o*o*v+d*o*o+k*o,1);
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int c = 0; c < v; c++) {
for (int d = 0; d < v; d++) {
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
tempv[c*o*o*v+d*o*o+k*o+l] = integrals[l*o*v*v+d*o*v+k*v+c];
}
}
}
}
// overwriting Fab here, but it gets rebuilt every iteration anyway.
if (gpudone) helper_->GPUTiledDGEMM('t','n',v,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,Fab,v);
else F_DGEMM('t','n',v,v,o*o*v,-2.0,tempv,o*o*v,tempt,o*o*v,1.0,Fab,v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int c = 0; c < v; c++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[c*o*o*v+a*o*o+i*o+j] = tb[a*o*o*v+c*o*o+i*o+j];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o*v,v,v,1.0,tempt,o*o*v,Fab,v,0.0,tempv,o*o*v);
else F_DGEMM('n','n',o*o*v,v,v,1.0,tempt,o*o*v,Fab,v,0.0,tempv,o*o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
tempt[a*o*o*v+b*o*o+i*o+j] = tempv[b*o*o*v+a*o*o+i*o+j];
}
}
}
}
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,tempt,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" E2 = t(a,c,i,j) [ F(b,c) - U(b,d,k,l) (ld|kc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// E2 b: -t(a,b,i,k) [ F(kj) - U(c,d,l,j) (kd|lc) ]
// note that (kd|lc) should still be in integrals buffer
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int j = 0; j < o; j++) {
for (int d = 0; d < v; d++) {
for (int l = 0; l < o; l++) {
for (int c = 0; c < v; c++) {
tempt[j*o*v*v+d*o*v+l*v+c] = (2.0 * tb[c*o*o*v+d*o*o+l*o+j] - tb[c*o*o*v+d*o*o+j*o+l] );
}
}
}
}
// overwriting Fij here, but it gets rebuilt every iteration anyway.
if (gpudone) helper_->GPUTiledDGEMM('t','n',o,o,o*v*v,1.0,tempt,o*v*v,integrals,o*v*v,1.0,Fij,o);
else F_DGEMM('t','n',o,o,o*v*v,1.0,tempt,o*v*v,integrals,o*v*v,1.0,Fij,o);
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
//if (gpudone) helper_->GPUTiledDGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
//else F_DGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
F_DGEMM('n','n',o,o*v*v,o,-1.0,Fij,o,tb,o,1.0,tempt,o);
// R2 = R2 + P(ia,jb) R2
C_DCOPY(o*o*v*v,tempt,1,integrals,1);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
integrals[a*o*o*v+b*o*o+i*o+j] += tempt[b*o*o*v+a*o*o+j*o+i];
}
}
}
}
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" - t(a,b,i,k) [ F(k,j) - U(c,d,l,j) (kd|lc) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
// B2 = t(ab,kl) [ (ki|lj) + t(cd,ij) (kc|ld) ]
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
else F_DGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,integrals,o*v);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int l = 0; l < o; l++) {
for (int c = 0; c < v; c++) {
for (int d = 0; d < v; d++) {
tempv[k*o*v*v+l*v*v+c*v+d] = integrals[k*v*v*o+c*o*v+l*v+d];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','t',o*o,o*o,nQ,1.0,Qoo,o*o,Qoo,o*o,0.0,integrals,o*o);
else F_DGEMM('n','t',o*o,o*o,nQ,1.0,Qoo,o*o,Qoo,o*o,0.0,integrals,o*o);
#pragma omp parallel for schedule (dynamic) num_threads(nthreads)
for (int k = 0; k < o; k++) {
for (int i = 0; i < o; i++) {
for (int l = 0; l < o; l++) {
for (int j = 0; j < o; j++) {
tempt[k*o*o*o+l*o*o+i*o+j] = integrals[k*o*o*o+i*o*o+l*o+j];
}
}
}
}
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,o*o,v*v,1.0,tb,o*o,tempv,v*v,1.0,tempt,o*o);
else F_DGEMM('n','n',o*o,o*o,v*v,1.0,tb,o*o,tempv,v*v,1.0,tempt,o*o);
if (gpudone) helper_->GPUTiledDGEMM('n','n',o*o,v*v,o*o,1.0,tempt,o*o,tb,o*o,0.0,integrals,o*o);
else F_DGEMM('n','n',o*o,v*v,o*o,1.0,tempt,o*o,tb,o*o,0.0,integrals,o*o);
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempt[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempt,1,integrals,1);
psio->write_entry(PSIF_DCC_R2,"residual",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
if (timer) {
outfile->Printf(" B2 = t(a,b,k,l) [ (ki|lj) + t(c,d,i,j) (kc|ld) ] %6.2lf\n",omp_get_wtime()-start);
start = omp_get_wtime();
}
cpudone = true;
}
//////// end cpu section! ////////
}
void GPUDFCoupledCluster::CCResidual(){
bool timer = options_.get_bool("CC_TIMINGS");
long int o = ndoccact;
long int v = nvirt;
// test new transposed storage of Qvv
// qvv transpose
#pragma omp parallel for schedule (static)
for (int q = 0; q < nQ; q++) {
C_DCOPY(v*v,Qvv+q*v*v,1,integrals+q,nQ);
}
C_DCOPY(nQ*v*v,integrals,1,Qvv,1);
int n = 2 < omp_get_max_threads() ? 2 : omp_get_max_threads();
pthread_attr_t pthread_custom_attr;
pthread_t * threads = (pthread_t *)malloc(n*sizeof(*threads));
pthread_attr_init(&pthread_custom_attr);
mega * m = (mega *)malloc(sizeof(mega)*n);
gpudone = false;
cpudone = false;
double start = omp_get_wtime();
for (int i = 0; i < n; i++) {
m[i].id = i;
m[i].cc = (&(*this));
pthread_create(&threads[i], &pthread_custom_attr, doit, (void*)(m+i));
}
// Synchronize the completion of each thread.
for (int i = 0; i < n; i++) {
pthread_join(threads[i],NULL);
}
free(threads);
// it is possible the gpu didn't finish its work. check and finish with
// the CPU and the GPU together
if (cpudone && !gpudone) {
//outfile->Printf("cpu finished first! %5i %5i\n",v,last_a);fflush(stdout);//exit(0);
FinishVabcd1();
if (timer) {
outfile->Printf(" A2 = t(c,d,i,j) (ac|bd) %6.2lf\n",omp_get_wtime()-start);
}
}
// use results of contraction of (ac|bd) and t2
useVabcd1();
}
// t1-transformed 3-index fock matrix (using 3-index integrals from SCF)
void GPUDFCoupledCluster::T1Fock(){
long int o = ndoccact;
long int v = nvirt;
long int full = o+v+nfzc+nfzv;
// Ca_L = C(1-t1^T)
// Ca_R = C(1+t1)
double * Catemp = (double*)malloc(nso*full*sizeof(double));
if ( reference_wavefunction_->isCIM() ) {
boost::shared_ptr<PSIO> psio (new PSIO());
psio->open(PSIF_CIM,PSIO_OPEN_OLD);
psio->read_entry(PSIF_CIM,"C matrix",(char*)&Catemp[0],nso*full*sizeof(double));
psio->close(PSIF_CIM,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_L,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_R,1);
}else {
C_DCOPY(nso*full,&Ca[0][0],1,Ca_L,1);
C_DCOPY(nso*full,&Ca[0][0],1,Ca_R,1);
C_DCOPY(nso*full,&Ca[0][0],1,Catemp,1);
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int a = 0; a < v; a++) {
double dum = 0.0;
for (int i = 0; i < o; i++) {
dum += Catemp[mu*full+i+nfzc] * t1[a*o+i];
}
Ca_L[mu*full + a + ndocc] -= dum;
}
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int a = 0; a < v; a++) {
dum += Catemp[mu*full+a+ndocc] * t1[a*o+i];
}
Ca_R[mu*full + i + nfzc] += dum;
}
}
free(Catemp);
// (Q|rs)
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio_address addr1 = PSIO_ZERO;
psio_address addr2 = PSIO_ZERO;
psio_address addroo = PSIO_ZERO;
psio_address addrov = PSIO_ZERO;
psio_address addrvo = PSIO_ZERO;
psio_address addrvv = PSIO_ZERO;
long int nrows = 1;
long int rowsize = nQ_scf;
while ( rowsize*nso*nso > o*o*v*v ) {
nrows++;
rowsize = nQ_scf / nrows;
if (nrows * rowsize < nQ_scf) rowsize++;
if (rowsize == 1) break;
}
long int lastrowsize = nQ_scf - (nrows - 1L) * rowsize;
long int * rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qso SCF",(char*)&integrals[0],rowdims[row]*nso*nso*sizeof(double),addr1,&addr1);
F_DGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
for (int q = 0; q < rowdims[row]; q++) {
for (int mu = 0; mu < nso; mu++) {
C_DCOPY(full,tempv+q*nso*full+mu*full,1,integrals+q*nso*full+mu,nso);
}
}
F_DGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
// full Qmo
psio->write(PSIF_DCC_QSO,"Qmo SCF",(char*)&tempv[0],rowdims[row]*full*full*sizeof(double),addr2,&addr2);
}
delete rowdims;
// build Fock matrix
memset((void*)Fij,'\0',o*o*sizeof(double));
memset((void*)Fia,'\0',o*v*sizeof(double));
memset((void*)Fai,'\0',o*v*sizeof(double));
memset((void*)Fab,'\0',v*v*sizeof(double));
// transform H
double ** hp = H->pointer();
double * h = (double*)malloc(nmo*nmo*sizeof(double));
for (int mu = 0; mu < nso; mu++) {
for (int p = 0; p < nmo; p++) {
double dum = 0.0;
for (int nu = 0; nu < nso; nu++) {
dum += Ca_L[nu*full + p + nfzc] * hp[nu][mu];
}
integrals[p*nso+mu] = dum;
}
}
for (int p = 0; p < nmo; p++) {
for (int q = 0; q < nmo; q++) {
double dum = 0.0;
for (int nu = 0; nu < nso; nu++) {
dum += Ca_R[nu*full+q+nfzc] * integrals[p*nso+nu];
}
h[p*nmo+q] = dum;
}
}
double * temp3 = (double*)malloc(full*full*sizeof(double));
memset((void*)temp3,'\0',full*full*sizeof(double));
psio_address addr = PSIO_ZERO;
nrows = 1;
rowsize = nQ_scf;
while ( rowsize*full*full > o*o*v*v ) {
nrows++;
rowsize = nQ_scf / nrows;
if (nrows * rowsize < nQ_scf) rowsize++;
if (rowsize == 1) break;
}
lastrowsize = nQ_scf - (nrows - 1L) * rowsize;
rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qmo SCF",(char*)&integrals[0],rowdims[row]*full*full*sizeof(double),addr,&addr);
for (int q = 0; q < rowdims[row]; q++) {
// sum k (q|rk) (q|ks)
F_DGEMM('n','n',full,full,ndocc,-1.0,integrals+q*full*full,full,integrals+q*full*full,full,1.0,temp3,full);
// sum k (q|kk) (q|rs)
double dum = 0.0;
for (int k = 0; k < ndocc; k++) {
dum += integrals[q*full*full+k*full + k];
}
F_DAXPY(full*full,2.0 * dum,integrals+q*full*full,1,temp3,1);
}
}
delete rowdims;
psio->close(PSIF_DCC_QSO,1);
// Fij
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
Fij[i*o+j] = h[i*nmo+j] + temp3[(i+nfzc)*full+(j+nfzc)];
}
}
// Fia
for (int i = 0; i < o; i++) {
for (int a = 0; a < v; a++) {
Fia[i*v+a] = h[i*nmo+a+o] + temp3[(i+nfzc)*full+(a+ndocc)];
}
}
// Fai
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
Fai[a*o+i] = h[(a+o)*nmo+i] + temp3[(a+ndocc)*full+(i+nfzc)];
}
}
// Fab
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
Fab[a*v+b] = h[(a+o)*nmo+b+o] + temp3[(a+ndocc)*full+(b+ndocc)];
}
}
// replace eps
for (int i = 0; i < o; i++) {
eps[i] = Fij[i*o+i];
}
for (int a = 0; a < v; a++) {
eps[a+o] = Fab[a*v+a];
}
free(h);
free(temp3);
}
// t1-transformed 3-index integrals
void GPUDFCoupledCluster::T1Integrals(){
long int o = ndoccact;
long int v = nvirt;
long int full = o+v+nfzc+nfzv;
// Ca_L = C(1-t1^T)
// Ca_R = C(1+t1)
double * Catemp = (double*)malloc(nso*full*sizeof(double));
if ( reference_wavefunction_->isCIM() ) {
boost::shared_ptr<PSIO> psio (new PSIO());
psio->open(PSIF_CIM,PSIO_OPEN_OLD);
psio->read_entry(PSIF_CIM,"C matrix",(char*)&Catemp[0],nso*full*sizeof(double));
psio->close(PSIF_CIM,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_L,1);
C_DCOPY(nso*full,&Catemp[0],1,Ca_R,1);
}else {
C_DCOPY(nso*full,&Ca[0][0],1,Ca_L,1);
C_DCOPY(nso*full,&Ca[0][0],1,Ca_R,1);
C_DCOPY(nso*full,&Ca[0][0],1,Catemp,1);
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int a = 0; a < v; a++) {
double dum = 0.0;
for (int i = 0; i < o; i++) {
dum += Catemp[mu*full+i+nfzc] * t1[a*o+i];
}
Ca_L[mu*full + a + ndocc] -= dum;
}
}
#pragma omp parallel for schedule (static)
for (int mu = 0; mu < nso; mu++) {
for (int i = 0; i < o; i++) {
double dum = 0.0;
for (int a = 0; a < v; a++) {
dum += Catemp[mu*full+a+ndocc] * t1[a*o+i];
}
Ca_R[mu*full + i + nfzc] += dum;
}
}
free(Catemp);
// (Q|rs)
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio_address addr1 = PSIO_ZERO;
psio_address addrvo = PSIO_ZERO;
long int nrows = 1;
long int rowsize = nQ;
while ( rowsize*nso*nso > o*o*v*v ) {
nrows++;
rowsize = nQ / nrows;
if (nrows * rowsize < nQ) rowsize++;
if ( rowsize == 1 ) break;
}
long int lastrowsize = nQ - (nrows - 1L) * rowsize;
long int * rowdims = new long int [nrows];
for (int i = 0; i < nrows-1; i++) rowdims[i] = rowsize;
rowdims[nrows-1] = lastrowsize;
for (int row = 0; row < nrows; row++) {
psio->read(PSIF_DCC_QSO,"Qso CC",(char*)&integrals[0],rowdims[row]*nso*nso*sizeof(double),addr1,&addr1);
//helper_->GPUTiledDGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
F_DGEMM('n','n',full,nso*rowdims[row],nso,1.0,Ca_L,full,integrals,nso,0.0,tempv,full);
for (int q = 0; q < rowdims[row]; q++) {
for (int mu = 0; mu < nso; mu++) {
C_DCOPY(full,tempv+q*nso*full+mu*full,1,integrals+q*nso*full+mu,full);
}
}
//helper_->GPUTiledDGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
F_DGEMM('n','n',full,full*rowdims[row],nso,1.0,Ca_R,full,integrals,nso,0.0,tempv,full);
// Qoo
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int i = 0; i < o; i++) {
for (int j = 0; j < o; j++) {
Qoo[(q+rowdims[0]*row)*o*o+i*o+j] = tempv[q*full*full+(i+nfzc)*full+(j+nfzc)];
}
}
}
// Qov
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int i = 0; i < o; i++) {
for (int a = 0; a < v; a++) {
Qov[(q+rowdims[0]*row)*o*v+i*v+a] = tempv[q*full*full+(i+nfzc)*full+(a+ndocc)];
}
}
}
// Qvo
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int a = 0; a < v; a++) {
for (int i = 0; i < o; i++) {
integrals[q*o*v+a*o+i] = tempv[q*full*full+(a+ndocc)*full+(i+nfzc)];
}
}
}
psio->write(PSIF_DCC_QSO,"qvo",(char*)&integrals[0],rowdims[row]*o*v*sizeof(double),addrvo,&addrvo);
// Qvv
#pragma omp parallel for schedule (static)
for (int q = 0; q < rowdims[row]; q++) {
for (int a = 0; a < v; a++) {
for (int b = 0; b < v; b++) {
Qvv[(q+rowdims[0]*row)*v*v+a*v+b] = tempv[q*full*full+(a+ndocc)*full+(b+ndocc)];
}
}
}
}
delete rowdims;
psio->close(PSIF_DCC_QSO,1);
}
double GPUDFCoupledCluster::compute_energy() {
PsiReturnType status = Success;
//WriteBanner();
AllocateMemory();
status = CCSDIterations();
// free some memory!
free(Fij);
free(Fab);
free(Abij);
free(Sbij);
free(integrals);
free(w1);
free(I1);
free(I1p);
free(diisvec);
free(tempt);
free(tempv);
// tstart in fnocc
tstop();
// mp2 energy
Process::environment.globals["MP2 CORRELATION ENERGY"] = emp2;
Process::environment.globals["MP2 TOTAL ENERGY"] = emp2 + escf;
Process::environment.globals["MP2 OPPOSITE-SPIN CORRELATION ENERGY"] = emp2_os;
Process::environment.globals["MP2 SAME-SPIN CORRELATION ENERGY"] = emp2_ss;
// ccsd energy
Process::environment.globals["CCSD CORRELATION ENERGY"] = eccsd;
Process::environment.globals["CCSD OPPOSITE-SPIN CORRELATION ENERGY"] = eccsd_os;
Process::environment.globals["CCSD SAME-SPIN CORRELATION ENERGY"] = eccsd_ss;
Process::environment.globals["CCSD TOTAL ENERGY"] = eccsd + escf;
Process::environment.globals["CURRENT ENERGY"] = eccsd + escf;
if (options_.get_bool("COMPUTE_TRIPLES")){
long int o = ndoccact;
long int v = nvirt;
if (!isLowMemory && !reference_wavefunction_->isCIM() ) {
// write (ov|vv) integrals, formerly E2abci, for (t)
double *tempq = (double*)malloc(v*nQ*sizeof(double));
// the buffer integrals was at least 2v^3, so these should definitely fit.
double *Z = (double*)malloc(v*v*v*sizeof(double));
double *Z2 = (double*)malloc(v*v*v*sizeof(double));
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_ABCI,PSIO_OPEN_NEW);
psio_address addr2 = PSIO_ZERO;
for (long int i=0; i<o; i++){
#pragma omp parallel for schedule (static)
for (long int q=0; q<nQ; q++){
for (long int b=0; b<v; b++){
tempq[q*v+b] = Qov[q*o*v+i*v+b];
}
}
helper_->GPUTiledDGEMM('n','t',v,v*v,nQ,1.0,tempq,v,Qvv,v*v,0.0,&Z[0],v);
#pragma omp parallel for schedule (static)
for (long int a=0; a<v; a++){
for (long int b=0; b<v; b++){
for (long int c=0; c<v; c++){
Z2[a*v*v+b*v+c] = Z[a*v*v+c*v+b];
}
}
}
psio->write(PSIF_DCC_ABCI,"E2abci",(char*)&Z2[0],v*v*v*sizeof(double),addr2,&addr2);
}
psio->close(PSIF_DCC_ABCI,1);
free(tempq);
free(Z);
free(Z2);
} else {
psio_address addr = PSIO_ZERO;
double * temp1 = (double*)malloc(( nQ*v > o*v*v ? nQ*v : o*v*v)*sizeof(double));
double * temp2 = (double*)malloc(o*v*v*sizeof(double));
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_ABCI4,PSIO_OPEN_NEW);
for (long int a = 0; a < v; a++) {
#pragma omp parallel for schedule (static)
for (long int q = 0; q < nQ; q++) {
for (long int c = 0; c < v; c++) {
temp1[q*v+c] = Qvv[q*v*v+a*v+c];
}
}
helper_->GPUTiledDGEMM('n','t',o*v,v,nQ,1.0,Qov,o*v,temp1,v,0.0,temp2,o*v);
#pragma omp parallel for schedule (static)
for (long int b = 0; b < v; b++) {
for (long int i = 0; i < o; i++) {
for (long int c = 0; c < v; c++) {
temp1[b*o*v+i*v+c] = temp2[c*o*v+i*v+b];
}
}
}
psio->write(PSIF_DCC_ABCI4,"E2abci4",(char*)&temp1[0],o*v*v*sizeof(double),addr,&addr);
}
psio->close(PSIF_DCC_ABCI4,1);
free(temp1);
free(temp2);
}
cudaFreeHost(Qvv);//free(Qvv);
double * temp1 = (double*)malloc(o*o*v*v*sizeof(double));
double * temp2 = (double*)malloc(o*o*v*v*sizeof(double));
// write (oo|ov) integrals, formerly E2ijak, for (t)
helper_->GPUTiledDGEMM('n','t',o*o,o*v,nQ,1.0,Qoo,o*o,Qov,o*v,0.0,temp1,o*o);
for (int i=0; i<o; i++){
for (int j=0; j<o; j++){
for (int k=0; k<o; k++){
for (int a=0; a<v; a++){
temp2[j*o*o*v+i*o*v+k*v+a] = temp1[i*o*o*v+a*o*o+j*o+k];
}
}
}
}
boost::shared_ptr<PSIO> psio(new PSIO());
psio->open(PSIF_DCC_IJAK,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_IJAK,"E2ijak",(char*)&temp2[0],o*o*o*v*sizeof(double));
psio->close(PSIF_DCC_IJAK,1);
// df (ov|ov) integrals, formerly E2klcd
helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,Qov,o*v,Qov,o*v,0.0,temp1,o*v);
psio->open(PSIF_DCC_IAJB,PSIO_OPEN_NEW);
psio->write_entry(PSIF_DCC_IAJB,"E2iajb",(char*)&temp1[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_IAJB,1);
free(Qov);
free(Qoo);
free(temp1);
free(temp2);
// triples
tstart();
ccmethod = 0;
if (isLowMemory) status = lowmemory_triples();
else if (reference_wavefunction_->isCIM()) status = local_triples();
else status = triples();
if (status == Failure){
throw PsiException(
"Whoops, the (T) correction died.",__FILE__,__LINE__);
}
tstop();
// ccsd(t) energy
Process::environment.globals["(T) CORRECTION ENERGY"] = et;
Process::environment.globals["CCSD(T) CORRELATION ENERGY"] = eccsd + et;
Process::environment.globals["CCSD(T) TOTAL ENERGY"] = eccsd + et + escf;
Process::environment.globals["CURRENT ENERGY"] = eccsd + et + escf;
}else {
free(Qoo);
free(Qov);
cudaFreeHost(Qvv);
}
// free remaining memory
free(Fia);
free(Fai);
free(t1);
free(tb);
return Process::environment.globals["CURRENT ENERGY"];
}
void GPUDFCoupledCluster::UpdateT2(){
long int v = nvirt;
long int o = ndoccact;
long int rs = nmo;
boost::shared_ptr<PSIO> psio(new PSIO());
// df (ai|bj)
psio->open(PSIF_DCC_QSO,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_QSO,"qvo",(char*)&tempv[0],nQ*o*v*sizeof(double));
psio->close(PSIF_DCC_QSO,1);
helper_->GPUTiledDGEMM('n','t',o*v,o*v,nQ,1.0,tempv,o*v,tempv,o*v,0.0,integrals,o*v);
// residual
psio->open(PSIF_DCC_R2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_R2,"residual",(char*)&tempv[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_R2,1);
#pragma omp parallel for schedule (static)
for (long int a=o; a<rs; a++){
double da = eps[a];
for (long int b=o; b<rs; b++){
double dab = da + eps[b];
for (long int i=0; i<o; i++){
double dabi = dab - eps[i];
for (long int j=0; j<o; j++){
long int iajb = (a-o)*v*o*o+i*v*o+(b-o)*o+j;
long int jaib = iajb + (i-j)*v*(1-v*o);
long int ijab = (a-o)*v*o*o+(b-o)*o*o+i*o+j;
double dijab = dabi-eps[j];
double tnew = - (integrals[iajb] + tempv[ijab])/dijab;
//tempt[ijab] = tnew;
tempv[ijab] = tnew;
}
}
}
}
// error vector is just dt
//C_DCOPY(o*o*v*v,tempt,1,tempv,1);
if (t2_on_disk){
psio->open(PSIF_DCC_T2,PSIO_OPEN_OLD);
psio->read_entry(PSIF_DCC_T2,"t2",(char*)&integrals[0],o*o*v*v*sizeof(double));
C_DAXPY(o*o*v*v,1.0,tempv,1,integrals,1);
psio->write_entry(PSIF_DCC_T2,"t2",(char*)&integrals[0],o*o*v*v*sizeof(double));
psio->close(PSIF_DCC_T2,1);
}else {
C_DAXPY(o*o*v*v,1.0,tempv,1,tb,1);
}
}
}}
|
a84364ad28b757871ed3ea81318de0716ce3db1c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
float h_A[]= {
0.6231129915441065, 0.6159796536213568, 0.7516223300466565, 0.5614399174950864, 0.7806484910812693, 0.6231672425083965, 0.9403363360562412, 0.6721354421249044, 0.9066093680806764, 0.8975730352955702, 0.5148014596757533, 0.7417318092438872, 0.7395976420984723, 0.7838657534425599, 0.7958196527715926, 0.9375050923134054, 0.8925208888533525, 0.9182557013015487, 0.7745808923236535, 0.8083106383229153, 0.6827379301611063, 0.7757183931732181, 0.6277217423914624, 0.9584034790959745, 0.5386046765163974, 0.5353430803782013, 0.5459403184326601, 0.8212653861444605, 0.6110477850671165, 0.8689436423980099, 0.8462802727011302, 0.5115158775423836, 0.854267800810526, 0.5401720830282366, 0.5489186938344522, 0.631719961603628, 0.6607827994601548, 0.7434779337661432, 0.8082060954841934, 0.6489736635388637, 0.7154711251206838, 0.8642656107268478, 0.8659626680894827, 0.9498259714562574, 0.8384446230232696, 0.6631239631499953, 0.9040393642032084, 0.6349754120196889, 0.8011538140809963, 0.6006921546597147, 0.6374219346747811, 0.7233058506355274, 0.8207923396424412, 0.5088873655394561, 0.9900742116034964, 0.9266812371695384, 0.8367248863675525, 0.9526369590172841, 0.7322410991662831, 0.8786529394998712, 0.5437779463522676, 0.5380024376868351, 0.5734568167815381, 0.6910514571287729, 0.8544264536935693, 0.9318651407577285, 0.8591376391571255, 0.6156888717580042, 0.8014405849173016, 0.9277805086053746, 0.8784878132450062, 0.798362565885458, 0.649093181842976, 0.9834114914139269, 0.5008324392102079, 0.9612254530848625, 0.912095210579595, 0.940520147390048, 0.8248652530071363, 0.8306116274446957, 0.9551910442225091, 0.7006083425860362, 0.8073798191743724, 0.7654246239545331, 0.7335094060071523, 0.9566657212856664, 0.7134826179794267, 0.9537858036804708, 0.617057065367487, 0.8619508800347451, 0.6843935305503841, 0.5207910741411301, 0.9785500292291038, 0.5070104662087561, 0.6249875591972298, 0.8994998996467646, 0.6259984816008164, 0.8747435062294515, 0.938836018654275, 0.7721455900197995, 0.5205277478450147, 0.7092020040375254, 0.6302234697621729, 0.8497083807082549, 0.6428281815244772, 0.9416628510080747, 0.6260845098581116, 0.7928952482094195, 0.624599528560787, 0.6859718744429495, 0.6872135635530618, 0.5670082875509619, 0.9615224123611941, 0.7171713600225094, 0.9501806880151904, 0.7415013053720096, 0.7151780895901266, 0.6560444192883779, 0.5469859240905652, 0.591078956304478, 0.8563483823140198, 0.5923644764413061, 0.5097451675655706, 0.8694857884471935, 0.9628249447312887, 0.9321936310741543, 0.8787460193242878, 0.7875744381282235, 0.5219567684765394, 0.9599228820503526, 0.6564180483726969, 0.6485485672831486, 0.5256159685232262, 0.8652969372417784, 0.8137375382850347, 0.6672763382156496, 0.9263399169288334, 0.5410968971242123, 0.9229245611361123, 0.5000747175127569, 0.5564754806783984, 0.9395750338086212, 0.7220948558619438, 0.6459532719589148, 0.5152335697318225, 0.9234476338386897, 0.5257919729312173, 0.6230655421651594, 0.8597770868478505, 0.5770565656879671, 0.9223726231740734, 0.5680899386100562, 0.5006000245550888, 0.6979198300392617, 0.5018965269953596, 0.8454242688159548, 0.9631175492087045, 0.5614366050492758, 0.5926550351759485, 0.9401213868689287, 0.8291604776961117, 0.7373403344746008, 0.6002687728920982, 0.6798071702358752, 0.603507204830142, 0.6457512750488867, 0.9995740653637379, 0.5579295186962758, 0.8586588385019173, 0.7415016975870887, 0.667902856262832, 0.8935213374781765, 0.8762534530544219, 0.673539578441524, 0.9066231836336207, 0.8563339931062417, 0.923105739454678, 0.6422211097308812, 0.674354156312788, 0.6244769298078643, 0.9675956254920509, 0.6183575832881996, 0.843405113295223, 0.6360807883804059, 0.6630965265803216, 0.8939541198063397, 0.5636782779161275, 0.8116837814418487, 0.5491926349061023, 0.835112706251385, 0.8690902411800727, 0.8113076743039271, 0.9129195117073323, 0.9571878054302201, 0.6618350757936878, 0.9416701258834982, 0.7636540694150873, 0.7105603154966307, 0.6877925183546314, 0.544875823764067, 0.5455996041831477, 0.5711311106330184, 0.6200274219809795, 0.9433103777063984, 0.6169173972193338, 0.7504459547235904, 0.7166313885237237, 0.9499909422701918, 0.9912074362229487, 0.6000075360814325, 0.5400851038408295, 0.6261523293470741, 0.6786910890135709, 0.6284514784491615, 0.9992253429478433, 0.9119848094792049, 0.7013984517771935, 0.6627402648744514, 0.8909205633813799, 0.7842873295527706, 0.5697292044208534, 0.7106124499491107, 0.9767752968246721, 0.5575279051872302, 0.7641444429889482, 0.9371106844679346, 0.9545775880295567, 0.9566975577371198, 0.8068402293318777, 0.7320145654425483, 0.7655422459353924, 0.5837697195690035, 0.6500074203310982, 0.6428431190225623, 0.5654279614973293, 0.8060388828699947, 0.5727197565062961, 0.9896230079646497, 0.8829856786996545, 0.655245767593196, 0.6124921466920681, 0.9996448564558036, 0.6833823888504206, 0.8457048651127149, 0.8263059885176727, 0.5567621185780027, 0.9537738469718369, 0.653805126507804, 0.8846050898551858, 0.9748820579266942, 0.781329156707042, 0.6025381108763442, 0.6592712134303573, 0.5750848884360531, 0.6909478873975476, 0.607719258985294, 0.7328110828159027, 0.5295094471376443, 0.7662378227902359, 0.6273161019289721, 0.6237108219505152, 0.8992545582736129, 0.7408924070822671, 0.8554458797086282, 0.6501761128001067, 0.8868037448011008, 0.6848420360758002, 0.5810518247056454, 0.514561791239164, 0.7797061750863576, 0.5899109998707627, 0.8122005827655764, 0.9405845344831192, 0.9129523830193342, 0.7388674001194985, 0.7036167922019965, 0.8376923047528994, 0.9356996382887639, 0.9207146057252313, 0.8711361755245899, 0.8017401810881346, 0.9059090655910486, 0.5658402806319779, 0.9837023881892969, 0.552300768450639, 0.9280108632701148, 0.5485926731603842, 0.5260890249758323, 0.7838581673255463, 0.6163778516668972, 0.6986172580789347, 0.9050491985883552, 0.9034637041231895, 0.5061313739332158, 0.7199168470029942, 0.9315585714321966, 0.815954180593125, 0.5448808329157446, 0.5696455817949435, 0.7747134476939372, 0.6534371610036945, 0.8818886810739733, 0.8120304351421179, 0.7827721351710639, 0.9388934246422382, 0.5948903085063191, 0.563164028280289, 0.7478287829107519, 0.6876873222390273, 0.9927345879482165, 0.7717461657057183, 0.645512255294729, 0.633112289565604, 0.8819028426048845, 0.7096336448171392, 0.9345439632777494, 0.6739557970772094, 0.8710214569577517, 0.5515300017330856, 0.7996178931083927, 0.7191821987243594, 0.9985116862901565, 0.6053762757328738, 0.5172819238099848, 0.6500454676790536, 0.7431442614402977, 0.7525641905450021, 0.6798147169536097, 0.5441689511195633, 0.8132244166605793, 0.5945750781444674, 0.9598047800186389, 0.7721178817141192, 0.5089610972284075, 0.5565966345577334, 0.6478777195735224, 0.5208216151213814, 0.5930713815190874, 0.5517309544944026, 0.8910858495551517, 0.7269838218153863, 0.9688727095889571, 0.6002526329836235, 0.9377391727724688, 0.6735084949603115, 0.8663436342252573, 0.5355734573318359, 0.5679287909707504, 0.7304302222815067, 0.6572071597402827, 0.5519768313302931, 0.8410960687108151, 0.9195531048993237, 0.5814858718954103, 0.8737159221651591, 0.9509786855954421, 0.512833053656029, 0.8927300254446374, 0.9449875387149258, 0.8675461282266576, 0.9990452978295511, 0.7363735636428466, 0.8932848688136248, 0.8782825214419895, 0.6731069362050313, 0.789804609109737, 0.6231475781843507, 0.6804469238301319, 0.8870931095698071, 0.9533266193307992, 0.9792554504717094, 0.8725089213092518, 0.5460665347599196, 0.9232416852926772, 0.740369652882297, 0.8681648439843996, 0.9811150396629205, 0.5021694330468041, 0.7400376301304266, 0.9288631977775093, 0.6306529153682086, 0.6460809557342271, 0.7306143224222293, 0.7227319738704963, 0.8788990689398752, 0.970599236176393, 0.9376811301021398, 0.6200947072488107, 0.6792415366211916, 0.5963519132252781, 0.9863570254794669, 0.8387533292874276, 0.8657647308722949, 0.6794470543050577, 0.9186333038943053, 0.9707058415397927, 0.7618658283778348, 0.6499250440670727, 0.8986719573560611, 0.9839273466576031, 0.5906214423350019, 0.9154388586595762, 0.6657796047228282, 0.6330470090697313, 0.9552050784326411, 0.738325721509996, 0.8590447907516618, 0.6824715569087052, 0.8296743172459139, 0.6642433602190025, 0.9951331803019781, 0.6161125467387472, 0.8549857043175508, 0.6319431593104303, 0.5700873105503972, 0.7379668888100245, 0.862038758700446, 0.9685098605330358, 0.9517238879244924, 0.7922135689034713, 0.8400741696581916, 0.834950088136843, 0.9209234535103051, 0.8076748782325308, 0.882691980212383, 0.6487892924085683, 0.7039874336585179, 0.7003517446375862, 0.8960984565828198, 0.6449294636659453, 0.9989436458384507, 0.7393980853567137, 0.5346435465118289, 0.567376185658349, 0.6154976391923856, 0.7905250186280315, 0.7107835087777479, 0.7278764104921196, 0.568935834280007, 0.7375124856502002, 0.8728755555352032, 0.9631035742567786, 0.9621434007570535, 0.5868593015450626, 0.9661629477387906, 0.645695190061595, 0.9648338420842303, 0.7609323023146877, 0.7766940788180837, 0.6293118382566654, 0.5130283399523377, 0.5672784768319591, 0.8941065643435469, 0.7829471685049014, 0.9747018841729581, 0.901851495087942, 0.9163027099384856, 0.9838632192803363, 0.5150793267165377, 0.9612472475052762, 0.5228192030577626, 0.9270983548458445, 0.579635779126106, 0.8123330197231722, 0.751209551377094, 0.7909084991210181, 0.8515927891206008, 0.7983903304842108, 0.5130832140580253, 0.9417641460425336, 0.9664315546262596, 0.7319566256426997, 0.9522152645882532, 0.5182438838335623, 0.5520680409677599, 0.7442729274492974, 0.5087176857621984, 0.932881146465651, 0.7230050412115632, 0.5889944353335046, 0.680567103221491, 0.6663931063301812, 0.7947224641281816, 0.838134755054808, 0.5053820682293888, 0.5444784298272363, 0.9535133479373734, 0.891020553808165, 0.974895436056344, 0.8560799138937666, 0.6681184277520819, 0.6372990531089441, 0.5829792279404102, 0.8133826398209643, 0.8366950799961499, 0.9559761575858512, 0.6143780514866594, 0.6276728072659123, 0.9118967269293572, 0.8773952468671034, 0.88279115301469, 0.9680458336898772, 0.5125820471898073, 0.676751991420913, 0.8794505572281495, 0.5661953001111063, 0.7865613402773806, 0.7363527422898919, 0.9864494672010877, 0.7623683892314708, 0.7454866184939104, 0.5766261718796725, 0.7115869037878417, 0.5414206227633866, 0.845587781326745, 0.504776081564656, 0.9907191630945926, 0.7675637287580176, 0.7726139793646122, 0.7742168191339667, 0.868391518724863, 0.9109132509725286, 0.8253911577468436, 0.9430526764224948, 0.8121814379858181, 0.9586831322090483, 0.9955526147817425, 0.7555485124080269, 0.951870945990487, 0.7070807412088262, 0.9251916981314785, 0.7185013710221758, 0.7319703397192265, 0.5944592508489821, 0.9834087819271513, 0.934642786533803, 0.5603841109565643, 0.8210269734521991, 0.6253512414019582, 0.9260898196335361, 0.8665767409662803, 0.9050767012856189, 0.8471981197698937, 0.8473043190658394, 0.665967021772097, 0.6872189630441249, 0.5126150396798261, 0.684183136454735, 0.8030353117802176, 0.5849351247803118, 0.6322487670731847, 0.8117587102385158, 0.7022805956011248, 0.8734770771286938, 0.676767762970323, 0.6769016913831027, 0.600516406815514, 0.8145744504355339, 0.5685954674517373, 0.5894749946697353, 0.6292156217080138, 0.9589964712972039, 0.8976539306161458, 0.5824753777459901, 0.854648407328739, 0.7256568102548506, 0.6329233179816007, 0.8915536253555497, 0.9625006177059754, 0.9745095399541305, 0.6324248973798177, 0.9340377041257449, 0.7791553989503217, 0.5616172973217096, 0.6930233627533812, 0.883462419269026, 0.9146586375629057, 0.6800390363780204, 0.94075175788484, 0.7368211502913519, 0.983753273845118, 0.9955723086293884, 0.9556548939219516, 0.5333131055871545, 0.539875441902314, 0.6179480634979087, 0.9153417267266983, 0.6269917334333059, 0.9401085837393051, 0.9826963847065988, 0.857775027143439, 0.9752279602295932, 0.8016591667337902, 0.5526749828428139, 0.5873432790323927, 0.8568082377353452, 0.6588855452928613, 0.704712310351657, 0.8273130342611655, 0.5147878226710951, 0.6164213260543625, 0.5651066137646661, 0.9100037023026364, 0.9262219507337428, 0.6925037929862654, 0.9147171635843709, 0.7316294156868022, 0.5986389853893191, 0.6498360946480631, 0.6679724559237927, 0.9092667962686352, 0.6727241959521846, 0.5761271479074204, 0.9303496907187587, 0.5208742849275381, 0.5688282650982538, 0.8512411698203852, 0.7211090536721754, 0.8142992523059117, 0.8778328856146693, 0.5033384163803003, 0.6115579158925488, 0.7902729536851794, 0.981791617333216, 0.92453488655899, 0.7558885278651677, 0.9967482692507769, 0.7924065176111872, 0.7482521428629553, 0.7285037906415329, 0.6785311034975143, 0.8704985464752169, 0.605170399625811, 0.8428586325987366, 0.9584546166553976, 0.5270505140594213, 0.6666974183405846, 0.690067636078636, 0.677022142274813, 0.5364979126391061, 0.5543495035748016, 0.979585597294313, 0.634811134429331, 0.6667662086924797, 0.7955473200641736, 0.9315600850727483, 0.5002518737620998, 0.6072477084337908, 0.6715030516313594, 0.6575046812548231, 0.6299251025702642, 0.9958170673263758, 0.6456453559002316, 0.5011857384444554, 0.695288537800834, 0.6395236855683606, 0.6112286077235237, 0.9977086684989769, 0.5553230175431497, 0.6252216222013073, 0.8214098796868285, 0.658917330481001, 0.9737624848741698, 0.705517239131705, 0.5712234042250248, 0.8034700974892239, 0.6701014856768135, 0.5252916894179191, 0.7684846911081462, 0.8912419886507128, 0.5627671995953701, 0.5133166069125245, 0.7696306550243641, 0.9879240699373749, 0.8567784694026737, 0.7901037283798003, 0.6858241188245051, 0.6596347782525467, 0.5314653807377633, 0.5010391512724884, 0.7329126091955831, 0.7718138743201848, 0.5157786482540874, 0.5015340131100495, 0.7715826797636136, 0.8422628863726842, 0.9267031183772544, 0.6757559822626893, 0.5284138624535901, 0.7496657256687698, 0.8450679615811285, 0.6718956657145245, 0.6003060934715128, 0.6783545601277546, 0.7659223215889976, 0.5936240245713573, 0.9508955845109617, 0.924050138086612, 0.7063521013024623, 0.7941917617118739, 0.8667324714162374, 0.8126066279949309, 0.7393466313508428, 0.6117954387101932, 0.9230278675894132, 0.8372836971083719, 0.6304730667309075, 0.8928457084262953, 0.9860179822698614, 0.9251553408559383, 0.820938776181915, 0.9494621477520993, 0.6295723327274786, 0.6359877834874654, 0.8125707657754048, 0.9597724896550988, 0.7380643705869264, 0.8506790178722635, 0.8425208523522942, 0.7271416552788111, 0.824525265438611, 0.729249265875352, 0.9061721299901306, 0.6829223604100216, 0.8639324377069236, 0.756388526050429, 0.7794483195210079, 0.661343974330326, 0.5315562141594381, 0.9331649327739031, 0.6696791385363806, 0.92369604464687, 0.8467888727054389, 0.9160000425371698, 0.9045401659388871, 0.729100687495724, 0.5609970910943536, 0.7456925389010424, 0.7219246127781431, 0.9206467824169767, 0.7584741752166435, 0.6910410012366538, 0.7569374436598852, 0.6303210422410532, 0.9673883725849218, 0.7454928551155691, 0.8540743310271661, 0.9727943776631689, 0.9889254036200168, 0.9310210843692478, 0.7225896994306678, 0.5332406423266105, 0.8868524601903642, 0.8274078539377231, 0.9228642893239821, 0.92137567439106, 0.8077992788922449, 0.6696303871528009, 0.7307158969352983, 0.9923949721479743, 0.6332137821197068, 0.6600311790096154, 0.696692889784394, 0.8883611061327155, 0.5015212512240032, 0.7552851525379531, 0.6726615557734774, 0.7328679134027745, 0.7873168075296828, 0.6230143256691787, 0.569381656912868, 0.7716877155304882, 0.8237241354715037, 0.5173910594003481, 0.8125903584080092, 0.6078370344769615, 0.5892100057195989, 0.8834370253503637, 0.8194962487057115, 0.8159700909375831, 0.6213198942072351, 0.9003218071236513, 0.7124385105010342, 0.7837521806309915, 0.8650631432024809, 0.9148452074322233, 0.7196828906538346, 0.626386065727919, 0.513330807917061, 0.9031182459133944, 0.9251839609305594, 0.8927745252385015, 0.7831530975101261, 0.7863875213737503, 0.7691955768092986, 0.866324587457393, 0.8709040078929056, 0.7997527996750775, 0.9195875060056442, 0.5113607748097362, 0.7410871144262727, 0.741303338135983, 0.6422636706661331, 0.6487801379087533, 0.8223142803995676, 0.6345016529469176, 0.5225377383489092, 0.9066074454100934, 0.6464776766137941, 0.9552958780477084, 0.7355642654252159, 0.8424783058583839, 0.9667883817551132, 0.9998371499577414, 0.8252606798518234, 0.9632562789648451, 0.6386500404900137, 0.7076830812867123, 0.831006227304556, 0.751565680195303, 0.5489275889586895, 0.6899345022156451, 0.5817283354788926, 0.5629772928788342, 0.6305141740058162, 0.6042878025323111, 0.8227681902213311, 0.9464535589209744, 0.5026184960003914, 0.8120976963774083, 0.536753931264961, 0.8052083366962008, 0.580308254939012, 0.6992047808035329, 0.83982982015261, 0.6142159726676122, 0.939062127452533, 0.9563115926827963, 0.955191577723242, 0.8085319435757983, 0.7834579377598787, 0.6827715913046816, 0.7848270713738337, 0.8995419778509604, 0.7147480720793824, 0.633930804076563, 0.9503384152699599, 0.6172992019423329, 0.7111162345008954, 0.7785507643576199, 0.9523155049865184, 0.9599295357905884, 0.617508441405806, 0.7751318527427189, 0.7302346196129701, 0.8986358271983699, 0.9600161688768503, 0.776851271719425, 0.7277953054960311, 0.6990956503653445, 0.5619786742476456, 0.783786278366362, 0.8946639932538564, 0.5752861624434038, 0.8935272795379878, 0.617274548619471, 0.6911548522912221, 0.9511694329309, 0.9354865449434326, 0.5995628841881105, 0.7505124448567573, 0.9776830435443532, 0.6233806448272841, 0.9378617540166079, 0.664434762403248, 0.608968862357937, 0.6012942718609899, 0.8456201319340657, 0.6452844287336984, 0.7182981185229854, 0.8761896541619902, 0.7545444212886687, 0.518928535128382, 0.563205105969121, 0.830524158565395, 0.8876888681189921, 0.5282847505388731, 0.5335240880045207, 0.9404065392491028, 0.5603554306255135, 0.6256483440196214, 0.9100512670427097, 0.5316686933242574, 0.7551583479547104, 0.83176117058172, 0.6879225851258306, 0.8954734867270682, 0.733069425523605, 0.601386546459221, 0.9500503735449004, 0.9636126959954561, 0.5617615290736644, 0.5232007214171497, 0.6047190888038192, 0.5523393492562152, 0.9665158979358839, 0.6509400747935146, 0.6630879683243975, 0.9466853999833975, 0.8954971553699398, 0.9743977102505905, 0.8559159496619326, 0.8249089603501542, 0.9056036754779759, 0.644445700407274, 0.9213107374168105, 0.8429044115048514, 0.8616183011063338, 0.6700475643854295, 0.8886874030396457, 0.6346297576748308, 0.6585095622702786, 0.770775029565822, 0.5975622288429443, 0.6127457042391725, 0.718551096935585, 0.5110918981315875, 0.577500097098598, 0.8110440560523383, 0.5450394162885538, 0.6391456222275647, 0.5055356576654946, 0.9649430448761283, 0.7113424327614415, 0.6729572034310547, 0.7935531968270886, 0.6066047070509866, 0.9288472832222564, 0.9658339084939298, 0.5545020104791373, 0.5955831932782943, 0.8208332797942999, 0.6659512862699334, 0.7131325526648189, 0.88250736373535, 0.9122702770230529, 0.7380045455286862, 0.5347688785989562, 0.7671301546400539, 0.6825578994952256, 0.62365433216625, 0.6463843884242799, 0.801390778272621, 0.7414622264384656, 0.6185310882708615, 0.8257260819649298, 0.8895489059033501, 0.923075372286425, 0.581135865115012, 0.9490606561169916, 0.9955857897083715, 0.7644536112495629, 0.9931000017062726, 0.9905146730778636, 0.962772905220366, 0.8207716469546527, 0.9421432420490805, 0.5631297211118156, 0.7973429947562767, 0.9129440633655133, 0.9122178271309156, 0.6207662433432453, 0.7079466079784511, 0.6062620152210703, 0.6112895108157821, 0.8235934457858161, 0.7778239294041664, 0.7670767287281139, 0.7464008751222574, 0.6661966367104672, 0.7077352483947306, 0.7967202141639949, 0.540774818275533, 0.9923072027361775, 0.7802033683755194, 0.5632438974874849, 0.8482052586480986, 0.7095266401771176, 0.8279071270442775, 0.6934538173357409, 0.5146169654216766, 0.8019299804327047, 0.8460324985675582, 0.7327246461711281, 0.8603459756306031, 0.8900692925163078, 0.5642808994831301, 0.5389615156844281, 0.691156924672298, 0.6919680034778461, 0.7929009404191947, 0.9081694350428067, 0.6861343870445402, 0.9935052887911995, 0.5891949222533533, 0.6490553243494035, 0.7060776408707163, 0.5589749709610352, 0.7929645926674551, 0.9887552749928896, 0.8265851819216976, 0.9085819748402988, 0.8466632715858626, 0.8182358414636898, 0.5246292253326985, 0.873259331792203, 0.5958556404058751, 0.851319432647691, 0.8662469372927555, 0.6983642832917047, 0.8772665304641152, 0.8929588916847457, 0.54424516494996, 0.5507202147847523, 0.94492442473712, 0.8524905135160386, 0.8233878808108619, 0.7104015247284126, 0.631684919703007, 0.7306051391535606, 0.8895469998371843, 0.726461527225799, 0.6879504171234601, 0.9252374048812113, 0.7894388743073297, 0.6746537683670509, 0.7568722681701676, 0.8192540618596905, 0.819527815241009, 0.5753694656643296, 0.9158802981467615, 0.8355222399604263, 0.6048878921974419, 0.5922679603355958, 0.5833058853903417, 0.6217694349376708, 0.6577396366437503, 0.8022876819138814, 0.862901532047784, 0.9500878873553771, 0.6452572780383145, 0.9181263303258935, 0.8336528705843731, 0.9701308768628993, 0.5467070093914553, 0.7793845611568987, 0.6624236110876159, 0.862187453634796, 0.5892181877837346, 0.9996142020733241, 0.571340134554686, 0.8800774127600496, 0.6349667556637748, 0.9789190747278002, 0.500263047357155, 0.8663943393799098, 0.5968339841555412, 0.5731899897247196, 0.8520652033651359, 0.9135811199983919, 0.7923408898048592, 0.6513620632003108, 0.7275284454402141, 0.6490081937892833, 0.6174182400703003, 0.5112684244481958, 0.9567564311492326, 0.8925201813581798, 0.6057862856531251, 0.999548202402536, 0.9457372713202005, 0.8206706383743135, 0.7346893785183992, 0.5276371967493468, 0.7408956156425022, 0.7262654252511576, 0.6629506815993789, 0.8860471183961328, 0.8012580950138395, 0.5481179186434804, 0.9626096858993272, 0.6463634059542045, 0.7283065093431764, 0.9458865340045095, 0.5868994433968272, 0.9379248816659134, 0.7814129693333137, 0.6074652648779739, 0.5875997771896981, 0.9496034913130096, 0.7268558399665508, 0.8238393768274164, 0.8920965056749763, 0.6071148445083747, 0.9838110533756195, 0.5438503006289598, 0.8664063971104172, 0.9174722915924383, 0.7313986456531693, 0.6487228092974073, 0.9568948955569587, 0.8441847102760587, 0.535711823186126, 0.5320525405914346, 0.6683317029314196, 0.7392221786130098, 0.6496513676270659, 0.713504677981208, 0.5046493020277443, 0.6961200957283171, 0.968443650679008, 0.8755940546269514, 0.6683625830398484, 0.7731668633438887, 0.6599218992514002, 0.9153082149119532, 0.6244499551983088, 0.6900396135216316, 0.5811021529548356, 0.8747734035588669, 0.7182112348090754, 0.5236285890144053, 0.6401812167396015, 0.5831876998077183, 0.6639553297977099, 0.8653805535819727, 0.9007837313788913, 0.7115177372549593, 0.7011622594906395, 0.8536286604201412, 0.5108767041470199, 0.7492314306762111, 0.7706113163469409, 0.5862951430439783, 0.8086306197564048, 0.9785571830538913, 0.5203269095475339, 0.5810445606714312, 0.6480660180290607, 0.7524841613903657, 0.5185980228257665, 0.9698912657818652, 0.6641569530280249, 0.6437110731142746, 0.7208791143854256, 0.5025093912400598, 0.8909109390604446, 0.5577724250913625, 0.8148837911126448, 0.5832583365676862, 0.7873177389054138, 0.9083625817901799, 0.8428996484377551, 0.9581752156241155, 0.5960418816779746, 0.5895233376765474, 0.6506087854573164, 0.784840082146681, 0.9729354058111395, 0.92360292947016, 0.8891699837719378, 0.5326860725237555, 0.8385915759599938, 0.78691106281564, 0.9741776056150027, 0.9390339529377632, 0.7427728537445492, 0.6602925606358674, 0.9032418516099705, 0.5437216833952914, 0.7241575042724412, 0.5787102085962179, 0.6993791877967898, 0.7366707843827123, 0.7426796933426645, 0.6952989835373311, 0.759516077628908, 0.6545698902344195, 0.5758881749664951, 0.8300776591880927, 0.7008314712804178, 0.8575682808700258, 0.7463163228237384, 0.8688491524357073, 0.8158142656688763, 0.7854393394003487, 0.9201868252281566, 0.6930651566350647, 0.9089734936994953, 0.8919963855388651, 0.5870601235076144, 0.5041058079700548, 0.9186035916916726, 0.8423275728048993, 0.6642059134330066, 0.8592361406999977, 0.6548724417003218, 0.6234410052363051, 0.9799042770140831, 0.7035967208397966, 0.6173040708011606, 0.7221420418571893, 0.8095782249491731, 0.5638735181617922, 0.5931748155243992, 0.812617867861521, 0.8695666644659039, 0.5914888136068339, 0.7129694957045332, 0.7722109812936603, 0.9932729833280185, 0.6302723600873386, 0.8163786627931726, 0.5318643543303767, 0.710373939660831, 0.8265982365961613, 0.9898985084480747, 0.9598922213721313, 0.8818106277511488, 0.9509502869511933, 0.7859098486389043, 0.9738091881412893, 0.5006001322421869, 0.6147963731294601, 0.5010750017472446, 0.908267777731194, 0.6503859853039944, 0.5463341209838164, 0.5698362019346386, 0.7640151733737568, 0.8552189793399434, 0.8212642166963935, 0.8006731979692654, 0.6357291224400059, 0.8288913287227886, 0.6491809388248206, 0.8515795173970883, 0.6224906962735217, 0.7188299206515211, 0.6595760744884904, 0.6059605539176774, 0.7198614460211261, 0.7192919152034565, 0.5916244890012393, 0.6055935932455798, 0.7498192516881146, 0.5127845889536926, 0.6059618504018306, 0.5067549332127719, 0.8012726282248026, 0.7971462491976162, 0.747921093764673, 0.5547164617599233, 0.6585433190907972, 0.508908302653678, 0.5060400114721005, 0.7613559403663266, 0.8511578417336472, 0.9576383501949393, 0.8740802552230946, 0.6364737615651799, 0.8536620528370839, 0.5592640024819766, 0.944182504398996, 0.6262355849723904, 0.7536120596002336, 0.7358536313372248, 0.5370941828043925, 0.5768201124834597, 0.7001075792623228, 0.5720304736646771, 0.9771203254680907, 0.9846736981586783, 0.8311214154634676, 0.9967046837434133, 0.7278571229631166, 0.5876116917346159, 0.5030858485663178, 0.7951092887179665, 0.5168487357074523, 0.9298069781114102, 0.7670039221795506, 0.8110228495215246, 0.5708388186506639, 0.5453490190283669, 0.8400682563445182, 0.8880816916818762, 0.7122398567782342, 0.5415522793110255, 0.6014634260151162, 0.5638672854533959, 0.6621582577402017, 0.8400082873284717, 0.5610569549118951, 0.6936364775837791, 0.5949944211362364, 0.7902260000172734, 0.6425931793172945, 0.8694551440088865, 0.9581138279837558, 0.6607744947317098, 0.8211254290536218, 0.6427346103569505, 0.6027714671642032, 0.538161592802381, 0.5272193250566559, 0.656980194354698, 0.5110735393179591, 0.892140226893546, 0.5288996473336316, 0.856227383584826, 0.5281497758596014, 0.743685236398681, 0.72388363992053, 0.7146873954831954, 0.8113477639186604, 0.5216715083996808, 0.9642564380978852, 0.6152677770892097, 0.5429208436581339, 0.5794662942264944, 0.9521582423376489, 0.5491553320883836, 0.6625937297244393, 0.6638269863479072, 0.9481872178104258, 0.7808289904918364, 0.7929702896485019, 0.9946058399583687, 0.8316507061859844, 0.9655789721651, 0.5370019543131171, 0.634975044880821, 0.9142257606939095, 0.6266013061941105, 0.5248245975599806, 0.8840951686947359, 0.742783989201601, 0.7214695643727269, 0.9859475380145613, 0.9342742686435659, 0.8082841374738623, 0.7091889201984095, 0.9903915565385191, 0.6791701722094319, 0.8504527316799148, 0.8854253572589836, 0.9220614354225434, 0.704601213268832, 0.7682338275747016, 0.6850663094555909, 0.991877329743901, 0.5026953471325173, 0.8797243450844217, 0.8528967185101802, 0.8682481639863335, 0.7130235305197917, 0.5826538951787842, 0.9009757155575857, 0.9579052792999727, 0.6420298932450459, 0.8680917330557281, 0.7716620272684702, 0.6232499401631986, 0.8460612745868028, 0.8883253603755294, 0.6705623339936384, 0.7165685502624879, 0.659838569188609, 0.7460884245979434, 0.8748850740597082, 0.6122884261363344, 0.972296131006455, 0.7238651916374728, 0.5962937134360508, 0.5297023808173894, 0.6310044957075099, 0.9311776769943583, 0.8207782298745736, 0.9608215150502392, 0.5517852729838129, 0.6267771779278475, 0.8311142795034268, 0.6503936310764562, 0.9908209082340318, 0.894369886071004, 0.6718453759233237, 0.8259061957601581, 0.6924208632465662, 0.805180335574216, 0.7179951731872263, 0.8452030203864113, 0.5259766689349286, 0.6382163532483158, 0.5390178929090493, 0.5196455039667505, 0.6965641174836732, 0.9941734208179198, 0.8866958403191101, 0.8630363061932445, 0.7368529773505854, 0.8003481913795433, 0.8306839132971202, 0.9787155967680867, 0.9064071896663434, 0.6058927951737959, 0.925496319179441, 0.829895454408452, 0.7384960188350309, 0.9610407746214509, 0.8266813318446484, 0.9627335099538201, 0.7984799782922976, 0.8396058726877931, 0.9369189494051433, 0.99647937906657, 0.5302605137742943, 0.9316621487484336, 0.7912390794412543, 0.7004073089357893, 0.8923967661932447, 0.8008685229289578, 0.8583155144676464, 0.6805943737167015, 0.8919431629067309, 0.7037702209625546, 0.6271337672863762, 0.7559188041427329, 0.6892959579808995, 0.8708769624681547, 0.563351476248589, 0.8594728919669319, 0.9340418802568721, 0.5204008708715901, 0.595583696399706, 0.5597328463772595, 0.628341157141443, 0.7569844717339481, 0.7162004073568982, 0.5921932096524343, 0.7999466941187094, 0.6212953792235749, 0.7882204600562379, 0.5061686424075391, 0.8530936336852712, 0.7060528230075087, 0.7415109523771133, 0.7521156730792673, 0.9037583909373313, 0.9605494583987648, 0.7401194283578973, 0.7989401582395137, 0.5376583956214622, 0.8482083737838462, 0.7715371856515412, 0.8858150774868702, 0.5563500099314449, 0.9933474892721207, 0.702599971014013, 0.547863878985011, 0.9790084699206469, 0.6570838081828169, 0.7734975434637734, 0.9722941242316574, 0.8396570079830874, 0.8832692063349235, 0.9014195241564191, 0.8646019518946491, 0.8577986936727919, 0.7376447416527994, 0.8035707410470021, 0.9276773867925868, 0.5959680900532738, 0.71719441110902, 0.7205808048908049, 0.6898832614943933, 0.8447731297384953, 0.8161053549152164, 0.8361698634649364, 0.7421383205902865, 0.8044842369819163, 0.9217112258375897, 0.5270011313291959, 0.992004257380332, 0.7044237773950379, 0.9332974783481129, 0.7630475357745827, 0.7646178712908712, 0.5366878132413943, 0.5188288997925858, 0.5033058886838995, 0.9245505386207569, 0.8009746135415317, 0.9575623491492368, 0.7099720107989795, 0.5181496258155809, 0.7181440665558005, 0.5986130978566708, 0.8356634995551576, 0.9914848631372719, 0.7717430513141166, 0.5794016383949285, 0.7982513848980766, 0.8526094048812831, 0.8766771468363292, 0.9582529639437076, 0.6251383220014785, 0.7595790360117137, 0.90741329091098, 0.9473248838539696, 0.6872567503993636, 0.8605489767032055, 0.7158894941149263, 0.5619215039108938, 0.959349006321776, 0.6756607564723427, 0.709665032339234, 0.8871707951695198, 0.9196361718321372, 0.5114974673942406, 0.7884897078335659, 0.875221495075746, 0.9709874299208834, 0.5107553164726337, 0.7052329330760534, 0.9364926089357113, 0.9511523242904159, 0.935078509025693, 0.9344739676308117, 0.5013890528521703, 0.893223511786466, 0.5430365975232057, 0.7826984087071387, 0.9531022842847958, 0.6052717533662897, 0.5164656082237791, 0.9414401240093353, 0.6867687374995518, 0.6386797074700278, 0.650714607519973, 0.6473136048897113, 0.9560960940082119, 0.8189809306186717, 0.5514930948115376, 0.5157970878326052, 0.8225634843035333, 0.7680532710059871, 0.9831414449144906, 0.6556858475747259, 0.8440334306695663, 0.6155816472102461, 0.7729720139888479, 0.80527469182502, 0.9395015603669383, 0.5771066307895029, 0.7460092410279129, 0.8513976452376006, 0.6831733788296972, 0.6332907506503945, 0.8722089498422992, 0.8430795953929715, 0.9634553269418176, 0.9107295557981782, 0.8277777236831998, 0.7540987100904661, 0.8811851017364936, 0.5248227202518565, 0.5059936638416892, 0.9248568760718547, 0.8063877289292254, 0.5118095409989596, 0.8308136019599003, 0.5986267793794509, 0.928128420569384, 0.5627939489083349, 0.6725567341402134, 0.8144420764782117, 0.631694259096806, 0.6785270811846054, 0.6207079758966464, 0.5804136919662002, 0.6885666980771338, 0.5681143950714553, 0.50958595404206, 0.9865816631371185, 0.7421832590917754, 0.5095014378398689, 0.6705478220787855, 0.8524269416635771, 0.8164763232294816, 0.9622840463124459, 0.5745888613734391, 0.9539449032228111, 0.6668427357619449, 0.7525661565578434, 0.5636712152618029, 0.792675827307471, 0.5868967219042898, 0.5746206511774761, 0.5965315047512799, 0.9524621027455742, 0.9004917982314281, 0.8309079544530313, 0.5694896381429417, 0.6814069309313653, 0.718663669601407, 0.5920851908517496, 0.6069741617547906, 0.9937865608176968, 0.7961525066828652, 0.7688000670451711, 0.6805572589433593, 0.9674164047377519, 0.5215135757481084, 0.7531707036600368, 0.7355682003453468, 0.5827145302667676, 0.7013033232725938, 0.6140758156359366, 0.5700856770558436, 0.5245469550329898, 0.8411527134106911, 0.5149459578790896, 0.5809312725091864, 0.8222268362479404, 0.5665045112938818, 0.702360105734801, 0.7486365145366609, 0.7844246027377011, 0.8436642813630779, 0.8931913434502197, 0.9061651290830699, 0.5541194917274148, 0.8486822552161426, 0.578125745733685, 0.6948924718514786, 0.6300110867445646, 0.780521985280981, 0.7990196391290423, 0.5102510558479397, 0.991865027771736, 0.6922069604411598, 0.7319259825413594, 0.8200858691109053, 0.8774888414353723, 0.5609376127301837, 0.5208085738710844, 0.970664236165484, 0.8077231388297292, 0.8330385068971494, 0.8770863601413514, 0.5634971577466685, 0.8187358204502151, 0.8299506776746534, 0.6434006188798786, 0.5581894086593648, 0.6006397038796674, 0.7102304999431728, 0.8337400046804369, 0.5831816835068577, 0.828333119646353, 0.9051873875037078, 0.532858859156685, 0.9292357682226753, 0.6212074859608705, 0.5844758476576946, 0.6724423642111172, 0.6916947381001142, 0.5645045080079243, 0.7275316561931713, 0.7110137346067408, 0.6310565428703085, 0.8121217088527914, 0.9349464291811264, 0.7363782218588815, 0.809985267429105, 0.5894920768086767, 0.7477848971205749, 0.542022876482676, 0.6810127016546661, 0.5869537292770779, 0.5871160916296688, 0.6692854007742437, 0.8860986988912237, 0.5349977508667526, 0.7032572159910567, 0.8376524551885938, 0.7343455136070554, 0.8450171076104712, 0.5312061596621362, 0.9919591979678499, 0.8036306745524715, 0.9792745250323909, 0.8646525587352909, 0.987000977955028, 0.5007390775614701, 0.8082037360000349, 0.7096791165761867, 0.6630777945630291, 0.8066224477975596, 0.8927844940443964, 0.597766971168627, 0.6078590936241768, 0.5225574291572728, 0.7309179824173049, 0.5695627080483077, 0.7287337814020896, 0.5736038024267917, 0.9093659841495787, 0.5834618314526148, 0.9855577485235933, 0.529907636550961, 0.6204378995923916, 0.7365837763200441, 0.5778812966963329, 0.5399083056780964, 0.7894225487862456, 0.6924962065706173, 0.798487134484474, 0.7320790030007163, 0.6473223733683815, 0.9591119952060421, 0.6836202722634853, 0.9995604448387223, 0.7047906371509958, 0.555347476094433, 0.6758461361561469, 0.8024922042689631, 0.5929398829922874, 0.5096195165569379, 0.6039009332456656, 0.7693680455077389, 0.5526957236521169, 0.6958468685174405, 0.819200007008944, 0.6371108609713259, 0.9015540697056772, 0.9215693825214204, 0.6929444153793798, 0.6381846198302661, 0.585079670213728, 0.5752096863366871, 0.9376721381259194, 0.5033466087511759, 0.8449690578482045, 0.7550271239731832, 0.63419562888186, 0.9844822099454441, 0.7148237473716758, 0.6161921672855333, 0.9462855389553023, 0.7936440815945804, 0.9384596544061028, 0.9011596462290281, 0.6260412878424935, 0.6784478996667134, 0.5478316136889818, 0.9136042505208686, 0.8733083282130938, 0.7715038856887346, 0.7952666659906595, 0.7377139689264169, 0.9426264559290418, 0.885284913310749, 0.7318024733801014, 0.7039975387414635, 0.7646220538116657, 0.7613456343221805, 0.884692140239068, 0.8202433803389862, 0.6714994943043961, 0.9603002918415987, 0.5484010101590253, 0.6363192527584709, 0.7786461309357449, 0.5269143710196347, 0.7810617939262189, 0.9468261975362717, 0.6200226870419919, 0.598592096650133, 0.9975123065310965, 0.8426956102499483, 0.7276454794621707, 0.6575512349026797, 0.8598870912086787, 0.5607263740184987, 0.5257855024072224, 0.5676886308338867, 0.5010829424724321, 0.8969774026075306, 0.7218550939559771, 0.7653255593854291, 0.9940690566685677, 0.8590299585606357, 0.5233667133162544, 0.7721281046448143, 0.6020381620349677, 0.9348867469108382, 0.6805886620895103, 0.5960995656923596, 0.5454821140136018, 0.5249459071598694, 0.870943486710746, 0.5757668047191655, 0.7022929128277309, 0.9286330052369474, 0.78248322587997, 0.7239239189963116, 0.565951028114015, 0.624296380382299, 0.5358308393518707, 0.6230711268774886, 0.5952420347351306, 0.5080859514961673, 0.5469251182079504, 0.7894290521372804, 0.735164281253893, 0.8770358206926777, 0.7060272031813724, 0.5059837577022609, 0.98787451137558, 0.9702226721773439, 0.9179688072667107, 0.5024424416102586, 0.5874313942309437, 0.8704033124348567, 0.8372182851514554, 0.7044014783409817, 0.6689661746103106, 0.6821030537109734, 0.5206454735583741, 0.7966663533160316, 0.5565927918835559, 0.8811300235113244, 0.9742101239356822, 0.9713785928374026, 0.5804444322545652, 0.9018396868178764, 0.5601270753023964, 0.9566638243633216, 0.5064364057342543, 0.8347293066422046, 0.6322828598218944, 0.9123693479072248, 0.7389021557950826, 0.598044057150795, 0.694959634826948, 0.6115044540621162, 0.9666045652947006, 0.748435205970549, 0.6715569853886443, 0.9184998830842939, 0.9470379538340754, 0.8461977051699869, 0.6195601949322569, 0.7566047947059479, 0.5689237257270943, 0.9765413191026664, 0.737255572085155, 0.7340167039521347, 0.7786439449559799, 0.8509345642032311, 0.890144094725135, 0.999003456597979, 0.5247842271494315, 0.7802928705278589, 0.644231080560538, 0.7619449069974524, 0.8581068311430466, 0.8391919014223479, 0.7684153430495144, 0.82399926879446, 0.9409625893480191, 0.7417474636256731, 0.6658572657974832, 0.8596729097266689, 0.6351798053469742, 0.7417099274876762, 0.9173120160056645, 0.7860859488397105, 0.5578406541586607, 0.9155508693168719, 0.6966160808912072, 0.9898879134775085, 0.7600704212246798, 0.6423204499319608, 0.6768217662826546, 0.6077389155453552, 0.5575416098218944, 0.7709363462779788, 0.9123345737106783, 0.5523855890929639, 0.7721399017112467, 0.9281347392633674, 0.8650223263685937, 0.8559006995178593, 0.8407732442138081, 0.8082888566414258, 0.8516086602118931, 0.9645511945772378, 0.6454916538354005, 0.9464480668854351, 0.6052461441345101, 0.8328905257476399, 0.5439704979393084, 0.5485713035035265, 0.6740383935669164, 0.645996750674237, 0.851534662318489, 0.8334283346891291, 0.7044484144407565, 0.7026557625198867, 0.5954478996939718, 0.6437068331840708, 0.9091358273611727, 0.5578847448214392, 0.881403306749102, 0.9781421577879245, 0.7419462201637318, 0.7827512281511195, 0.78542783490953, 0.5593628123226047, 0.8792972841223832, 0.942597488653905, 0.82151985748349, 0.8115587585259036, 0.5241733659551461, 0.5783218287650671, 0.5727821531980938, 0.7868271201942327, 0.5218371593622546, 0.7536579750480372, 0.8033197619333021, 0.5919594969400267, 0.9403015013869109, 0.9963239438164454, 0.6135473409086237, 0.6369289257134201, 0.6817812253599524, 0.8451352590601807, 0.9773630749577373, 0.586937339909278, 0.7576603572418596, 0.6138511412932459, 0.9912204177032973, 0.866678173045905, 0.581329404941247, 0.9895166264158648, 0.8026072504054609, 0.7452207938349877, 0.936841657946353, 0.5396949411276306, 0.6957349761675049, 0.9128853757394648, 0.823369655402874, 0.8099969027993107, 0.7557215134104357, 0.7969672873304177, 0.9205432494344323, 0.6890062231459224, 0.5223035168130912, 0.6186600933591735, 0.7455244074301871, 0.6077313112933632, 0.8454127200723474, 0.5818094173210977, 0.9327314791712417, 0.9551772242282526, 0.8642820691649358, 0.6298138847214858, 0.9021079908149175, 0.7628137288586845, 0.8621701824708325, 0.6214087642682551, 0.7105991318983846, 0.5793009269309541, 0.675282404200579, 0.6527235029630057, 0.6889720046396165, 0.5344767574094897, 0.5487711136103659, 0.5604786464195775, 0.7733143772833897, 0.6296974463960453, 0.6817241252700657, 0.5486670051226569, 0.6488940561912176, 0.7230826835850117, 0.7069463440069625, 0.9069793238322017, 0.9206110731319634, 0.6728501662264674, 0.9538873206439387, 0.5777459342504004, 0.6555522300302055, 0.5170201353571562, 0.9667315140919193, 0.9403889730704744, 0.749529252791453, 0.7255744936523426, 0.9364824251402949, 0.9453937298373775, 0.8954306365758024, 0.6585740244397782, 0.7990711564276135, 0.6663986372143189, 0.8684963404697604, 0.7552991818793486, 0.7658587786325688, 0.7421184217343064, 0.592070130322193, 0.8663361239879563, 0.8702667737423235, 0.9430479031680774, 0.714359594431756, 0.8330053339140776, 0.5308276189203864, 0.6420987955634461, 0.9969040966772691, 0.5321424723096129, 0.7449983134654423, 0.7224754717735788, 0.6138809510243144, 0.987671377275074, 0.9549194208329612, 0.5465535851471809, 0.8186975390199089, 0.530163248460718, 0.8872500507177579, 0.777949572326075, 0.7618524309307473, 0.9623817701393893, 0.6659364291196141, 0.7075535959145465, 0.5596675360258342, 0.7451028051243642, 0.5991704137562957, 0.6024252298096575, 0.7663457503275775, 0.6963390384959838, 0.7753601786661933, 0.5879252662534402, 0.507389167216626, 0.8788132993690154, 0.5915080149411533, 0.6555668305982012, 0.7439054389866571, 0.7083238300879051, 0.7297346556762123, 0.7583788055576973, 0.743099339321756, 0.6077716707231199, 0.953822841769458, 0.9793169527895935, 0.6225062798741907, 0.8683484488897171, 0.9062698882262795, 0.5321491254808738, 0.9220803449676174, 0.9923110600123985, 0.7519606689675613, 0.6652042636057649, 0.5664088449992473, 0.6152241194368258, 0.7587520035719872, 0.9612323116032377, 0.8764036920545654, 0.7686286970314183, 0.6909230710499903, 0.983971790890084, 0.8515840550388509, 0.7689687425719731, 0.6491664778533305, 0.8469771066402736, 0.5721335051485759, 0.5033264992364093, 0.9622519073778946, 0.7245418225216393, 0.9657623510544338, 0.770405006156827, 0.8751679166532251, 0.6721336378865257, 0.9143532742849493, 0.8827854307360075, 0.9543723638866721, 0.9545479319509456, 0.6653096647627952, 0.8759806314219296, 0.5810351123715825, 0.6981162712976166, 0.692781572782561, 0.5495691285094926, 0.9677534806212242, 0.8622643966625776, 0.9050598273471151, 0.629223235201742, 0.7024739471641397, 0.5652290996266657, 0.6090133196835584, 0.7161016822956496, 0.7482905193222781, 0.9278268526891231, 0.9945879963557529, 0.8430992867140341, 0.6715679187078013, 0.9471121670387446, 0.9223451827268689, 0.8980100026640314, 0.6142387046477042, 0.5095750417372964, 0.9332745574068506, 0.6001407218167081, 0.7502871268195335, 0.6123652761963241, 0.9259800685163837, 0.6454209382029249, 0.8288847190831918, 0.920662232393441, 0.8772591978041915, 0.9696338901536117, 0.5401864544824228, 0.6749864916783266, 0.7300842183393307, 0.6065449218386441, 0.6041994587883808, 0.6306642778053223, 0.9294984920608678, 0.7064212294578012, 0.5103130209993834, 0.9214527086299922, 0.6728372832482328, 0.5811792505070723, 0.741307422085774, 0.5184864622858492, 0.5561484612553464, 0.7804878583611945, 0.791361307284346, 0.8058882418818796, 0.8184155933118944, 0.7639571771388947, 0.8700532852336476, 0.5135746721276215, 0.8559194167721866, 0.8925149908998831, 0.7424176947069798, 0.5079179247624612, 0.7738241716940575, 0.5293898699064132, 0.726275643083431, 0.9355031316170659, 0.7592032789457697, 0.7102259591237565, 0.5707457289400442, 0.6209625091785007, 0.9825157962142753, 0.8981091476756489, 0.9799849631171638, 0.7675235621319724, 0.596840083784911, 0.7357549390450973, 0.5499387781853413, 0.6253365967655169, 0.7336662978786328, 0.6753524269296812, 0.6401908220059376, 0.9590956753229245, 0.7681662728683651, 0.5515001982431015, 0.790059380623979, 0.9131718772939108, 0.5684157602849312, 0.7444999006966562, 0.8502882803401068, 0.7947794886955255, 0.7267930643495295, 0.7434902281797632, 0.9672393139283362, 0.8649235803903188, 0.778703271215748, 0.8687761984587581, 0.8358803775278036, 0.7022755184532068, 0.6920573070695726, 0.733529001900225, 0.686019141980482, 0.5207939299383115, 0.6240861355541552, 0.5766221845096153, 0.9830863838233297, 0.7760905016615114, 0.7815094680476824, 0.7265185390276956, 0.5210883205844676, 0.5341199575281096, 0.5135082909892086, 0.956763876540388, 0.6007448537272247, 0.6987996327107366, 0.7928361112302673, 0.7268911205404792, 0.5322175797177774, 0.5536084775186905, 0.7044002467278785, 0.8131642677495838, 0.9538634271403532, 0.7041302953148517, 0.8371468758782749, 0.5244927050577872, 0.7092519936492525, 0.8965193506416627, 0.7813405394318655, 0.9559522483838356, 0.5173167212089134, 0.5749021541411733, 0.5485410360650225, 0.9767505416140743, 0.5378085227991626, 0.8856777982493131, 0.8052527465984017, 0.7429425695376506, 0.6935038267110664, 0.7920441603692369, 0.9393832957631458, 0.543099273648042, 0.7698054123677702, 0.6001067650696297, 0.7181880495075856, 0.8388331775686242, 0.7971369229217422, 0.7691048093238317, 0.7668048709531692, 0.6966693222937689, 0.5235512085400572, 0.6010603398044003, 0.8454021283930337, 0.7001345917344235, 0.6927268285436206, 0.6303398838939376, 0.6734321380474466, 0.8456908389350187, 0.7123288262287693, 0.9217295414405293, 0.5070080199573475, 0.8844842783673441, 0.5063653000917983, 0.669638669301157, 0.9724710742828117, 0.907664474620777, 0.6563777357811602, 0.7026875477284068, 0.6728685098405023, 0.7525919977484021, 0.7659995176898623, 0.8152375998075388, 0.5201979814021951, 0.8901463669222058, 0.9148704948330159, 0.9312920322662563, 0.5215003669547913, 0.9600697274854622, 0.8301025333637759, 0.5729251240536765, 0.5109938489221175, 0.8288661670757737, 0.8910963953792201, 0.774243635227398, 0.8148974974736201, 0.9759184071356641, 0.9880593088511231, 0.9337835837676021, 0.632080296969171, 0.768779625857692, 0.9986600555728784, 0.6368880963710504, 0.7680180828076519, 0.8877961594589745, 0.5411627780994515, 0.7327645531225803, 0.7778318855522275, 0.699398083685435, 0.69505877138561, 0.8512108777465528, 0.5068160099546865, 0.6610406995798925, 0.7949206037087724, 0.7329569786160273, 0.852875012025482, 0.9226744142341041, 0.8437081130130426, 0.6788546205924298, 0.8657605568978513, 0.8806251732706885, 0.8161906404483201, 0.8154835880297088, 0.9913205819755512, 0.5425716107242744, 0.5859302430565005, 0.973056575772326, 0.9509449967569928, 0.6274160719967339, 0.7065771466691328, 0.6117930854560498, 0.7348966804384085, 0.6675738199223005, 0.7312048439385147, 0.893528101036352, 0.7542163315539894, 0.9404070185608719, 0.501488772129159, 0.9863806647237143, 0.9178312712893102, 0.5617638441029702, 0.7402144257859893, 0.8428771703119549, 0.6632057961776712, 0.8495201455905195, 0.9799320626065755, 0.6381916672233527, 0.7838919817457926, 0.6887924899413611, 0.6756307272178645, 0.6225608914840979, 0.8131088268434195, 0.5740773966744043, 0.7531241977858327, 0.8995949940660635, 0.9932724457877578, 0.7781667928450668, 0.5246266555368054, 0.6180057474616204, 0.7470368120884696, 0.5653157983825148, 0.863802756900963, 0.7199238672366886, 0.7429262536644455, 0.7395086860509212, 0.7800739435360349, 0.8805654888125779, 0.6415947035069725, 0.6875352077444006, 0.875736131735406, 0.9316279900710757, 0.6271458378275683, 0.9307416602553523, 0.9610493813761712, 0.6001642394633766, 0.6105132285203898, 0.9615763515921907, 0.5635598804292474, 0.6534760153170533, 0.6222580073626411, 0.7309630841835817, 0.9714506863616932, 0.9320755580198186, 0.6781208791248741, 0.9070256457251125, 0.7867577711815728, 0.6120680032533758, 0.8511196042613314, 0.6952661202909829, 0.6171336514104304, 0.8234589125097456, 0.9909403639074046, 0.6083831801897281, 0.6007232546507036, 0.5319577633595156, 0.5755554224021309, 0.5511192400104725, 0.8911763271374906, 0.8657307692337968, 0.5563968949845892, 0.7503876641448413, 0.9248208075498126, 0.861610483940392, 0.5892034389477376, 0.8789403554244433, 0.7524866192581448, 0.9255811414226947, 0.9113325115765134, 0.9344168589323605, 0.9072197137760816, 0.9021404150888481, 0.5770105053611773, 0.6404793266868597, 0.6903178505791396, 0.6062979743071941, 0.5848717403664653, 0.9856300557976342, 0.7747603753356387, 0.7568539196595112, 0.6546027556258065, 0.735323772473798, 0.7111767405292898, 0.7063370440043197, 0.9100483386228186, 0.8438676845954594, 0.5221107672877028, 0.9705804325216966, 0.8270498763863312, 0.5763857998403478, 0.8311718196303419, 0.936700662179947, 0.8009686648806424, 0.6292951740002221, 0.5525038335240371, 0.5412138023367634, 0.64929295461484, 0.6758242946754855, 0.5501621189157797, 0.9270632392330719, 0.750083499408839, 0.9938632653057593, 0.5042945290919125, 0.5556496882073758, 0.9771752827160376, 0.7590875985499541, 0.9841183875778595, 0.9419700207290393, 0.5310946825115495, 0.9225935232440213, 0.8994999712387356, 0.8491438427412883, 0.5369984535782018, 0.707085400275851, 0.6389288630736683, 0.9646877447821199, 0.8296949316841726, 0.9700801590944876, 0.657964035150854, 0.8560809220650983, 0.5044165281011589, 0.7227360535602416, 0.6855314053439917, 0.8090807359256683, 0.6124975565492332, 0.8459994206232184, 0.9553699152240129, 0.5650528636311161, 0.6554444546638271, 0.8173128814294275, 0.5228041140233151, 0.9666149909152865, 0.9856844441098686, 0.8097166410499019, 0.9564918211024487, 0.5385472150513739, 0.8618628322548345, 0.8901803553376095, 0.6734493608782403, 0.8230836379744694, 0.6279545359100233, 0.9506424669101508, 0.9593612929215665, 0.6367286382103395, 0.7079605661536474, 0.6629735448783678, 0.6855614371485304, 0.9975858056322657, 0.8526421727893342, 0.7089093326711602, 0.7932105454933525, 0.8754270607634425, 0.7487345300124283, 0.6552369073697628, 0.8666964656418421, 0.7974244439261071, 0.5145571256704975, 0.659161286568037, 0.9536728020092778, 0.5115177436094471, 0.9387841837637307, 0.6726397253614611, 0.9945784203695194, 0.912690193380429, 0.6925426791169231, 0.53863524680941, 0.9430803311084737, 0.9712693179724642, 0.7289038959380421, 0.7296264160862284, 0.9343878897082454, 0.7681365380676333, 0.6141010642860679, 0.8327305733332491, 0.6981564797705955, 0.7385841720249791, 0.9281967814180162, 0.7097715671407576, 0.5636868414344061, 0.6904321282799606, 0.9029314348476406, 0.5356244954044306, 0.9775393329747988, 0.8089183905398645, 0.9253640898715461, 0.5779870321021903, 0.6799875292250509, 0.7608464442586448, 0.5126787383259841, 0.7462538710333355, 0.6832366325694208, 0.654486750284907, 0.9202309841228697, 0.5321587188535769, 0.6166072595865931, 0.7895000751289063, 0.9732615543572665, 0.8316171102341812, 0.7380627471729042, 0.6455184058832854, 0.9632737478504502, 0.9575657462489942, 0.6232677228136021, 0.5635401259319262, 0.7535686519036037, 0.5478118506277037, 0.8865009569792619, 0.785474187187932, 0.8805308323386195, 0.6848728662005878, 0.987720939751541, 0.6539431755940968, 0.6878953140741024, 0.5878898537142594, 0.5979517863159609, 0.6261278058614632, 0.9591858826270099, 0.5202788568935375, 0.962829917625352, 0.6424165416976306, 0.9121285976672597, 0.6591085349771142, 0.611899678087599, 0.766466055679544, 0.5179480956811335, 0.5666185244069113, 0.8812294294494973, 0.5844467129141466, 0.5017516963419508, 0.8787385749445866, 0.8360984548891643, 0.9976680785133838, 0.776666331470775, 0.6228786908941053, 0.5290429953193069, 0.566846668286321, 0.9543826993667379, 0.8491400543969465, 0.7148568398343433, 0.9419842476255589, 0.7023262286966826, 0.8276564537935973, 0.6673149892351622, 0.9494372668156821, 0.626385651425452, 0.5616473466416391, 0.6988498721034735, 0.9430866031154672, 0.9357394746594805, 0.8162783462497194, 0.5927881546567866, 0.6782650512716148, 0.8567671800107263, 0.5432210382675051, 0.7012636488519299, 0.7163073567987982, 0.7589502060824302, 0.6187157262939454, 0.8517553479143416, 0.9245601569470433, 0.7797265070863288, 0.553814226602795, 0.9240770433433347, 0.853322911311709, 0.536735321049504, 0.5455946658207438, 0.5831969345800854, 0.9053330140818346, 0.8388596458159288, 0.7792587833029363, 0.7139963781450607, 0.9913542178145119, 0.7776562173753292, 0.6713333779630478, 0.8221155126922379, 0.978020924663245, 0.9579558587254434, 0.5511438618660981, 0.9085186049677398, 0.917340606840379, 0.7145587917599969, 0.8198459100317095, 0.737818973140532, 0.5449636341763746, 0.9542224150743339, 0.6392516656645946, 0.9623703148876422, 0.753219799033416, 0.688588315047201, 0.5956144211905541, 0.5031357643741153, 0.9505583637512429, 0.6821075949410595, 0.6207953489616943, 0.8965899285436723, 0.5067360590647169, 0.5106617089067557, 0.7580087546562665, 0.5522846814076201, 0.556381267363147, 0.517453170000316, 0.684528338471119, 0.8063635989880771, 0.7214947565299319, 0.5117114815725126, 0.940716657961921, 0.8621715330459685, 0.8588417088765539, 0.8417193001116268, 0.9423177883526692, 0.8302479771301596, 0.5957143395682449, 0.8849945614439778, 0.6324434295364268, 0.9575730575252619, 0.8271424835183045, 0.9159705532434765, 0.5232360871899109, 0.6149434512023957, 0.908860529057637, 0.7573180481961104, 0.7303630196059543, 0.8913340332713586, 0.7424358715989774, 0.5064447313090714, 0.7807524105061654, 0.8188733050783484, 0.5683262292894256, 0.9554291819405467, 0.823163907839541, 0.8586500811751038, 0.5895969924818544, 0.7580608080311044, 0.9301283007539836, 0.9253459509859947, 0.7346060105051471, 0.7850549071385369, 0.8824196252477241, 0.8403188425820503, 0.5653014808433647, 0.7969155453584054, 0.9225137571375135, 0.9914710820597913, 0.6351890587290687, 0.9081845059515403, 0.5369167592434734, 0.8245179387934416, 0.5551400540265482, 0.5569849971019023, 0.7154229391738975, 0.9835282614115437, 0.582187733600271, 0.967774703893467, 0.6276209198684402, 0.5958495192744954, 0.5725735939924976, 0.9627487243015737, 0.5880694058364173, 0.7440096931680629, 0.5846278871333249, 0.7596489853096577, 0.6214354502584585, 0.8980676892819988, 0.5785278828514746, 0.9135573866961351, 0.5833823861521272, 0.5515232391270307, 0.7134312330619742, 0.5139590558073719, 0.6223104847044651, 0.815304711960311, 0.8419805474847224, 0.7431094823408566, 0.7466014764432047, 0.8559103374102452, 0.9350701028816926, 0.9900619606423634, 0.6150271167114514, 0.5546450618393632, 0.7962600074318428, 0.8249599895003504, 0.6911579487683246, 0.9839254890664733, 0.5647518757690351, 0.7296590410434625, 0.5216028209798789, 0.5324157500219916, 0.9523923314765237, 0.8076981694385679, 0.7456155900572551, 0.7853808852054376, 0.7610804560423832, 0.6207754662168443, 0.9093527379071227, 0.8496304464940359, 0.5488335892704935, 0.852964218650869, 0.7576277214323428, 0.8305401228838769, 0.963636797005629, 0.6495509868183605, 0.8518651441381784, 0.7330224245588057, 0.7985842180999343, 0.9233540798263156, 0.8390978535294428, 0.979439072097994, 0.964423021824549, 0.8209457481964226, 0.9043903182028081, 0.9288743064239646, 0.6798668570533519, 0.5956023074769594, 0.8243047751116738, 0.5289981433399681, 0.8540255334561628, 0.5412319118069979, 0.9999995176638, 0.5469135561885311, 0.9987443819158098, 0.5601571014921265, 0.6143316389498725, 0.9001583624245045, 0.767033361851878, 0.8785097181212139, 0.5268889011475584, 0.909936675474817, 0.8126099498670003, 0.6388208086260163, 0.52808856607454, 0.9490829293679035, 0.5975360418700424, 0.9966472176836468, 0.8787362083821507, 0.9870474907710085, 0.8572008610097983, 0.9291062757089955, 0.9871705393300367, 0.6518302803059481, 0.926784454588529, 0.9051422471704114, 0.6210583576537847, 0.7405087199306777, 0.8235243522633786, 0.9025460236300687, 0.5958928162113128, 0.7340452887763319, 0.9166168111375272, 0.5298613274679411, 0.6724124265699793, 0.9210695869091461, 0.6074191263184903, 0.656446983804655, 0.67651017269585, 0.5437281815227353, 0.8946411211356889, 0.5531853786750442, 0.9968878815135553, 0.6656916332109922, 0.8015832777083949, 0.9890653728665952, 0.6623477748094162, 0.9838376171046247, 0.5072553560852996, 0.6521733221287906, 0.786456557378445, 0.9578151408554563, 0.7341866470090123, 0.5461772102614925, 0.9866241674736308, 0.9986199939283162, 0.6873901432983269, 0.5988542059462164, 0.8419837327899665, 0.9546864683610836, 0.6639635560793442, 0.9773125938393298, 0.965830720362628, 0.9598428373874867, 0.6018125203565514, 0.6539576064040036, 0.719007188083545, 0.6862298808794267, 0.8812187773603437, 0.5553515661797127, 0.9700254923258784, 0.7359971900702601, 0.626099935850517, 0.7219924752991094, 0.9078260551672076, 0.8881375432248722, 0.8630321650152316, 0.6539718068231402, 0.8488465764694499, 0.5167242169638839, 0.8342481028795669, 0.7318775809755109, 0.8602599519158849, 0.7440670787216828, 0.7842349246901796, 0.7637339675046728, 0.6879874639372363, 0.9915333031431284, 0.8973632865876734, 0.5120126179349098, 0.5294755218899697, 0.7029310913409696, 0.7064840783742476, 0.7056873587085892, 0.6964022934558267, 0.5343433694194484, 0.695526147755875, 0.9319063546806112, 0.5526582430371678, 0.8417186492448276, 0.5429151106734766, 0.9431792871026194, 0.5606699375051181, 0.9329294747234238, 0.818996164920532, 0.9569781645300515, 0.8137385417014668, 0.9156910934735207, 0.5987782037599667, 0.9739800128967937, 0.8645749264692713, 0.5770962543367886, 0.5153054198152445, 0.5469957586434793, 0.8300674240978684, 0.7612497616781502, 0.8292045416351409, 0.904099849648046, 0.6077543207504364, 0.753160260809915, 0.9084125099798066, 0.6767751566821574, 0.8824132245789832, 0.8207972220239252, 0.583890184348304, 0.9696571833523104, 0.6145353370439677, 0.5372512032846908, 0.7858861479119541, 0.5277995513890574, 0.8499739711898683, 0.6732470531658332, 0.9383438518374638, 0.8307991576785985, 0.9300015206703731, 0.5203738012509931, 0.6239023689108272, 0.6235939490201592, 0.9028782744091508, 0.72309585657685, 0.8596456915057016, 0.5119345125565421, 0.7130800733424355, 0.8848238180001076, 0.9304503331406544, 0.5485436593067052, 0.9483757075354409, 0.6066243487806879, 0.7385567724193169, 0.6013324144811352, 0.8248198766512362, 0.6802027262172463, 0.7498492714838805, 0.8351091507250963, 0.6358858491892607, 0.7306673089662448, 0.9823246301638173, 0.5306327052758558, 0.7013573239795909, 0.6240586947379461, 0.8906302684209071, 0.9433659483941513, 0.8200373589473072, 0.6537508454515214, 0.5172125144991717, 0.8910660104812242, 0.720311030595581, 0.6153688777052428, 0.6534006374339469, 0.8755900867765645, 0.6114568601217221, 0.8739672364267641, 0.8048006046404932, 0.8086756116487828, 0.5530812580487678, 0.7974442329346815, 0.896756201621634, 0.7129912163542782, 0.6335899798085668, 0.9980338923564924, 0.6047854566421158, 0.6408260204362106, 0.5127874184464218, 0.9004140882218497, 0.5119133219675029, 0.5796355421669285, 0.8068222167022031, 0.7323608458957879, 0.699277030580745, 0.6581429479381276, 0.840682114742717, 0.9930317338344501, 0.5303409821613307, 0.6804716580608445, 0.9769504735358464, 0.55992282959068, 0.6122441597672825, 0.6524503173303178, 0.8656024277841383, 0.6582253407660164, 0.5577408828876489, 0.8759226319529885, 0.6590296159218979, 0.9717380736329153, 0.6711978667521166, 0.9812770627344711, 0.6833316497468542, 0.6909717056459099, 0.7774091956045097, 0.769179918714884, 0.525996232771188, 0.8370830290110769, 0.5388267833689437, 0.5796573690368756, 0.6211497697005218, 0.9905802428889467, 0.5806726538606617, 0.9612974361869617, 0.5954218718384379, 0.8912357957807341, 0.5754932341106065, 0.8816481247157226, 0.7464988712238787, 0.525081280196785, 0.5040234833847204, 0.7856611078760105, 0.5313167407720454, 0.9275494629203583, 0.96817447834183, 0.907192003350136, 0.7501059712273548, 0.8241296436560154, 0.7341715563578007, 0.844044974588921, 0.5223312730370646, 0.9512007981314725, 0.7409191028621678, 0.603066120154216, 0.5793347023028812, 0.8184253609447181, 0.5219807448892266, 0.7415736078336277, 0.9893155422371815, 0.7763270425477016, 0.7711303483219789, 0.9597171036478349, 0.6688296027696397, 0.700776821192695, 0.7769677072432213, 0.5337181019370683, 0.7213732260582413, 0.8687278752719354, 0.6588175704992729, 0.60265909796525, 0.9944145215950617, 0.8490143131856042, 0.5923428528115251, 0.9015851809025621, 0.658810930871355, 0.8149056026498542, 0.6427844492611063, 0.9451054545420832, 0.8363079724985489, 0.9341975832057507, 0.6786256234602337, 0.7527994432523408, 0.6835851100327388, 0.9412336898986304, 0.8491468596095622, 0.832362826509919, 0.7501772536670126, 0.9672224041663706, 0.7978218272092448, 0.6558068476590895, 0.9986017272689816, 0.8287271362416371, 0.8461045613623728, 0.7062472219026474, 0.8534220454948174, 0.8188643104966666, 0.6184765386646056, 0.88956579887289, 0.8193955146043108, 0.8359803619932713, 0.5975170823519355, 0.824421869596313, 0.5314391642221741, 0.8735712762522332, 0.6304085127619167, 0.8274258411470248, 0.9971490304131354, 0.750478569906243, 0.6857087965968692, 0.5906448313832716, 0.9283534218764065, 0.5498317927496834, 0.54267940337664, 0.9246590524185573, 0.7432353195494834, 0.9719056001065229, 0.8043510016220561, 0.6971132926691102, 0.9995385880095287, 0.6369713482855659, 0.7642079252695213, 0.6929955669180581, 0.8135841545283253, 0.8104218365787406, 0.6894117831900062, 0.8383847490545209, 0.7379582802999961, 0.9049089856164008, 0.8885985769775864, 0.8527644690948937, 0.5759936319410166, 0.8393616689155345, 0.8326802610607242, 0.8353291910230125, 0.805371945638357, 0.9078657206132471, 0.8779020403613385, 0.9368494192685636, 0.9310277000606291, 0.9620616449153633, 0.5619630446761452, 0.6148477933849666, 0.8796962013414995, 0.7534434665890732, 0.8309982223596076, 0.9741001832088186, 0.5333930378348912, 0.8801180012576331, 0.9548855826194935, 0.9425217266465886, 0.9926123959010216, 0.7525141260298942, 0.7094057235018579, 0.7007507542070708, 0.6378441043034042, 0.6554211703629022, 0.9270008946280313, 0.506209522345952, 0.727927365379643, 0.8529293751652041, 0.5957879668663597, 0.7317769789624964, 0.9864042218232605, 0.5501997294922971, 0.8616599443315451, 0.8844510019094636, 0.6774172137038657, 0.8046094555759649, 0.8341492603414324, 0.5001600582248933, 0.8105515631440325, 0.7675675645222979, 0.5222727285467956, 0.6802802202896439, 0.6941710815936109, 0.678623329821273, 0.7540307598846883, 0.8805821394087634, 0.9112127442731702, 0.8522971264340782, 0.5815823349444653, 0.5244467101892674, 0.5654577435158397, 0.6664478806664988, 0.5398182192064556, 0.5957051847448495, 0.5406941094299802, 0.7373414758975665, 0.9716673490290881, 0.5692375602219137, 0.659501113155617, 0.6045704803473282, 0.5782293681680567, 0.5840234713025054, 0.954192245487886, 0.5085277161264941, 0.5021381604172779, 0.892525108510554, 0.8723091316873968, 0.8400204717608268, 0.7410390528691686, 0.8848489182348216, 0.5267711387405407, 0.620808507783706, 0.6030825836444343, 0.791671413570483, 0.6196549800440392, 0.5819605092327964, 0.5470422946050819, 0.8238529568368591, 0.6704169712800592, 0.9377117335952347, 0.9920988762738545, 0.9263826349806593, 0.900054809652698, 0.9699265366780223, 0.802080560839361, 0.7887296105163852, 0.742390494934692, 0.907469786371685, 0.5553813984329528, 0.8849675256380242, 0.7993745757479193, 0.5831539922099502, 0.9680366340569224, 0.9575457826405593, 0.6522449852643147, 0.8557947852466752, 0.8685106579267204, 0.771608067471802, 0.5205997307633061, 0.5036835089867209, 0.7597163708945653, 0.5611454300009548, 0.7150679407186356, 0.767610599312341, 0.5078580239338781, 0.6260819237771409, 0.69172119059364, 0.7627550567587494, 0.9700763498115278, 0.8966718495514698, 0.7856166461936578, 0.9230878494562593, 0.6403404922563902, 0.670521801680768, 0.9328735079439706, 0.546411414880446, 0.7757884814094919, 0.5150987030537271, 0.9330178659147348, 0.5904734128543998, 0.584872510623039, 0.7432723867173963, 0.6817175217026865, 0.8965922412577438, 0.7676878422213338, 0.6493966274155242, 0.7409878130689774, 0.5684376596107333, 0.6173471258330201, 0.9182690205056407, 0.95811434804049, 0.5936272896579169, 0.5173379755620531, 0.8165711050292529, 0.5455105541580587, 0.8436223839593252, 0.7942906071185364, 0.7497055448055137, 0.7069382047359001, 0.9678525265002595, 0.8983013825205945, 0.8443826116555131, 0.6580601793364185, 0.6740052754112866, 0.6566683578857075, 0.7442497894049029, 0.7041300054418387, 0.6349396046187572, 0.5557939704529621, 0.9854315816831258, 0.5397134185953002, 0.7895264569856901, 0.5150170398164214, 0.9134726514922127, 0.847038361604278, 0.555458489229245, 0.6369141638573411, 0.8441821754403217, 0.6262003248947356, 0.776205258392596, 0.7117916077832649, 0.5361025382460944, 0.9505558651228576, 0.7649330826717899, 0.5809926194204509, 0.9442805923424165, 0.7377844098148629, 0.7620445676936174, 0.6107077138293098, 0.6844927010620676, 0.5862957415513641, 0.7563917756317536, 0.5584228688464485, 0.8183548100423226, 0.9596816269746775, 0.5991541173039168, 0.5426265813963924, 0.8651621718287259, 0.8883788599122395, 0.6582784491979599, 0.9030273681761176, 0.7210301314633882, 0.6028171503948156, 0.7397958675253435, 0.5070110444068667, 0.5509482121496851, 0.6354139330671441, 0.789721493249463, 0.9155922565516434, 0.6199909210803277, 0.6296527999336716, 0.9466674487660671, 0.7650323178149906, 0.8654370662316746, 0.9515780584825368, 0.9314505245265774, 0.8364316675811378, 0.6323564172360782, 0.9730152944381336, 0.7456454494377951, 0.8441672979491438, 0.9360189366022358, 0.9330553401033752, 0.5390507602956023, 0.5926487382580325, 0.9589583972903194, 0.6914942006615981, 0.7894266447839063, 0.9356394534847574, 0.691892373188518, 0.6188514293814413, 0.7135324404449357, 0.9107187074545522, 0.849724282837949, 0.8238068594987629, 0.7591838374873182, 0.6736404040398185, 0.8239775718988924, 0.7472436527340934, 0.9197276333751611, 0.7906325619118157, 0.6468334315193398, 0.6111023168040881, 0.9810391458503724, 0.5166229260392671, 0.8019593876634397, 0.7827101121282044, 0.9320014950433213, 0.8540897079665364, 0.8260257687099837, 0.8349098652022544, 0.6350123311374178, 0.5070592448281479, 0.6789874429114775, 0.7486531503215929, 0.8295466676651266, 0.9784643992442992, 0.6655276592946473, 0.5606191174305615, 0.5986785736659003, 0.9607734862664046, 0.7922398636456899, 0.9695707399040873, 0.6556539529639619, 0.8424298256611531, 0.8703578174479221, 0.729945637605966, 0.7909757413112326, 0.7557865840448887, 0.8995718084897687, 0.6137859668668167, 0.9367757824138527, 0.6919695363548948, 0.5231634318262648, 0.8919474561549021, 0.8832419313545501, 0.5127891975030021, 0.8097320290273627, 0.5318268374042414, 0.8907804486980593, 0.8999208007148923, 0.5813787295792183, 0.9499164978735313, 0.6597936872262784, 0.5477318540380207, 0.6776932634425477, 0.8103080353378557, 0.7880597483427894, 0.7585705787838761, 0.520293222074943, 0.7293538724252487, 0.8449478936164299, 0.8627443795948746, 0.5901418532274677, 0.9978971050522188, 0.6169159995547301, 0.8518089878627397, 0.9886815711022091, 0.8916047221112484, 0.5338302808229869, 0.7767511545505308, 0.8777919217502872, 0.5426829305856933, 0.5971073829735912, 0.6372264150291147, 0.5943281907276904, 0.5215853084314893, 0.84661442942707, 0.6427164156247542, 0.6593871030584105, 0.9256990586899769, 0.9943546628292954, 0.5265618595880811, 0.6940270472219758, 0.7626215080642872, 0.5564606804893183, 0.8816152096887448, 0.7444167354314541, 0.8793482517841889, 0.6289011581313682, 0.931574828550388, 0.6750793277863819, 0.5679299893973375, 0.8373393964950395, 0.9112444116898062, 0.593581996098652, 0.8444624353882881, 0.5486998804595704, 0.672626474955948, 0.9314523071182905, 0.7788766438439425, 0.9827328378692677, 0.9672905578819433, 0.5397025711453143, 0.9183467871055149, 0.9687900291213714, 0.8739009443265036, 0.5965956192179794, 0.7350762490666318, 0.7326684545862399, 0.5542994800157981, 0.5870467443375588, 0.9670595952186729, 0.8344172935263681, 0.6143714019221093, 0.7877428698592499, 0.6516845577380668, 0.5895283658036392, 0.5433887457406366, 0.7845578971652931, 0.5031016103771158, 0.7334814747070968, 0.9707472607467584, 0.7973784061778946, 0.5842955926607682, 0.9789978799583277, 0.7654759430030689, 0.6239514729122966, 0.8761967520897338, 0.5648881556167612, 0.7125647996054636, 0.544816264914995, 0.7484416957890174, 0.5414256754842292, 0.6124201833398557, 0.7072169838521078, 0.7190455546197723, 0.5487457237487934, 0.5739622529432536, 0.8104853196078884, 0.5438415770838777, 0.8490102890862061, 0.9147368197018715, 0.8966001057151218, 0.6989394379526789, 0.6372494064266923, 0.8998236734945697, 0.6827172888328077, 0.9785651348729307, 0.6439418799444523, 0.9356243080827593, 0.8025446002702616, 0.9628495088973921, 0.5211266392590425, 0.6976908128802757, 0.9997609463709948, 0.637724762319595, 0.9723941013460847, 0.9223587997984428, 0.6696625165106311, 0.5734773003295096, 0.9824315218303022, 0.9505756647284525, 0.7027494182515495, 0.8995233410137828, 0.5137585602880359, 0.9464758250712972, 0.8274800722648933, 0.9327594972377717, 0.8707249644987867, 0.747241249918283, 0.8552316417158969, 0.5527419756957171, 0.95432850289539, 0.9823448256934342, 0.5632730260504359, 0.8110374152475662, 0.5233488017585777, 0.8872346547968821, 0.706127271982065, 0.8570616971841645, 0.7960062580647629, 0.645819309283132, 0.8745283631474605, 0.7657196996114964, 0.8692175367838276, 0.6905415417913927, 0.7274473888992414, 0.706844555497568, 0.7128168055500361, 0.800945685161603, 0.8291477008489576, 0.8123888001002073, 0.8368595808217462, 0.7687739525272066, 0.9432814490486191, 0.8002951854894742, 0.5302646436552518, 0.6055933403485212, 0.7022353042971695, 0.6655263908237066, 0.9847641416984614, 0.5864522363951963, 0.5300252785047873, 0.9427999975245821, 0.5419806682782302, 0.8305108712895117, 0.7112064116133592, 0.959715464491829, 0.9566294831614943, 0.5931553188283045, 0.5900125994785752, 0.9057859309441018, 0.5124643555734913, 0.7435581897931891, 0.7976378259812686, 0.7361101133063285, 0.8748141387375912, 0.9618226531891971, 0.9354542758263824, 0.9660276351453096, 0.9637541933099125, 0.829925476483598, 0.5395107274714241, 0.701667554618272, 0.8199790366552477, 0.8323948975939301, 0.9699102472570222, 0.6098528311133643, 0.7518541946494899, 0.7504672976850906, 0.6561996227555349, 0.8500953620043218, 0.7440635154665248, 0.5121013333579563, 0.6961396401484293, 0.9297363888964192, 0.705421199811602, 0.9563959624577876, 0.7934887474488006, 0.5323336695643486, 0.8361824069962651, 0.690209812973843, 0.8785309579580168, 0.9087553014489158, 0.6550987316908466, 0.644352763738885, 0.9951206820173828, 0.5081021145356456, 0.6319526387673734, 0.7408477074823767, 0.673391774547503, 0.5746548719130077, 0.8043905832179189, 0.8440835828748388, 0.8322166216220446, 0.6024692289865254, 0.5629659282279975, 0.7456754875841207, 0.5045938212738825, 0.5432650719519038, 0.5886087118131221, 0.8729475317618338, 0.8326528017164451, 0.7784606298025913, 0.8791205552433221, 0.6649098455035658, 0.9272091990662852, 0.7234822134720589, 0.9785331492231284, 0.8302290396463531, 0.6620115511493949, 0.8759723490459319, 0.8646474040367444, 0.6251817394971877, 0.6473418550923467, 0.9791759640877387, 0.5740401638410931, 0.5465807978853459, 0.5559101530517836, 0.8706972290680127, 0.5107757434596597, 0.9830350091368272, 0.590857666870271, 0.7935341513988154, 0.9105866353231105, 0.8510722337311116, 0.9842647947159238, 0.878204029265026, 0.7345498221051627, 0.8571705272016704, 0.6977787215282476, 0.7977834945721183, 0.688908722463601, 0.879441046244652, 0.854812223178413, 0.6136441295372189, 0.9453724966397645, 0.6453906915523387, 0.5455364177116512, 0.6367598578056272, 0.780268976246981, 0.9546570540519648, 0.5193450536626624, 0.5022450510747813, 0.7401779114321918, 0.9539525103989708, 0.7832335911631259, 0.6485174833715776, 0.8462118125522753, 0.9512005743500627, 0.7766001032675842, 0.5544122451152262, 0.6286129956384421, 0.6810679993613019, 0.9858067988088053, 0.5955830929413426, 0.720829308448158, 0.7235121345668987, 0.9295007861903459, 0.999177058734587, 0.568184466540019, 0.7840596234025657, 0.7090336964184493, 0.5098885474346619, 0.8342105727977238, 0.6817585593580715, 0.8623943376476442, 0.5948883849576878, 0.9574870671583435, 0.5902909831432799, 0.8754046173515064, 0.5599152984933349, 0.7847432968847907, 0.885796390713241, 0.5133750494308962, 0.5763148853320356, 0.6713712491614139, 0.8418177034052869, 0.9192849816178464, 0.5304599890152144, 0.6603076398011473, 0.8363824407400429, 0.9178664779018795, 0.7220624937545175, 0.6009785520365898, 0.8131225992889115, 0.5216913424116305, 0.6150481423439907, 0.9061575242806766, 0.5056857524482823, 0.9070873882104187, 0.774148418996579, 0.6039819780099731, 0.8560562901929787, 0.7586795070227745, 0.9431931533157456, 0.5250593834300474, 0.8167373399272286, 0.8043092665817657, 0.6826496060154396, 0.9203528609922942, 0.9576440662788691, 0.6391625164854577, 0.5613644764845214, 0.7721523521662663, 0.6846143580337072, 0.774185397089473, 0.6187813411703295, 0.9415623172862404, 0.7051155362199408, 0.5120030443864932, 0.7293771346546958, 0.5857467090925372, 0.7725922627957905, 0.9459994125144053, 0.9565711445241563, 0.9017641136664345, 0.6684082157202658, 0.9241615296687185, 0.9384389333082677, 0.9889459972044534, 0.8156992093403228, 0.7610978215356233, 0.7382348314265936, 0.7089246715090516, 0.7118176586018401, 0.9325247651110752, 0.511587185506596, 0.7405657642283677, 0.722546813934196, 0.9486658317389869, 0.862001660349824, 0.9891318002356415, 0.8191570534713193, 0.9719043355093155, 0.826261706477474, 0.9763598013510197, 0.5185650368274995, 0.9628445405564303, 0.6292133508257296, 0.5329117940543647, 0.6944776357256401, 0.6309044810609055, 0.7987770151829876, 0.9324720276429875, 0.9174831149742388, 0.6668305752382965, 0.6118109207837197, 0.9581005552432708, 0.6650542373897441, 0.8160367223101788, 0.8358780454554227, 0.6809840946899666, 0.5376104962266077, 0.8659668001625606, 0.8149686551282938, 0.5078162601770797, 0.9227141431644388, 0.9407946742602736, 0.8947970037787607, 0.7380122533443781, 0.8683190619779171, 0.9493595513981088, 0.7928004030620864, 0.9756742672991651, 0.6332334983520009, 0.8047229854795304, 0.9466164952338665, 0.7721949280019387, 0.6189912988340045, 0.7813188474964747, 0.6637121300685006, 0.6809622708902461, 0.7005426655719866, 0.6445149680450889, 0.6150168506379198, 0.8494535443936412, 0.6353668255162058, 0.7283820097383735, 0.5108984373699208, 0.6308397697064989, 0.5536063060925579, 0.6949291374153583, 0.7845846952458384, 0.548640295538575, 0.5708760585438961, 0.5178212516946716, 0.8691141547860155, 0.7849217923742562, 0.5288629763740742, 0.9495561812667213, 0.5465719720346105, 0.9469981166867686, 0.8475601457849299, 0.9961586975679897, 0.5018429110310962, 0.5174049158531198, 0.5616551212226712, 0.761139886315533, 0.6560451116746706, 0.9325645307697088, 0.8565563122426961, 0.8637413065832217, 0.9339403169496661, 0.849038187309211, 0.7178830767440942, 0.7055639184658642, 0.5255133086627011, 0.5314460831191291, 0.6214518414093804, 0.623448512186497, 0.7682203567932253, 0.9615635204191655, 0.8070785298060168, 0.5870153096935768, 0.6239334830136426, 0.965471479850095, 0.9975845001683201, 0.774830273427498, 0.6715639972877584, 0.5680047315123593, 0.7691878831628858, 0.6858609355697491, 0.674464778343717, 0.5735982827458509, 0.6972267657882589, 0.6506660392898275, 0.9612522284728164, 0.5644963105373686, 0.7146498869317139, 0.9569212403019713, 0.5032204132174081, 0.9231528583475594, 0.7135371155859902, 0.6757101723492704, 0.6770355210366068, 0.7278777916448449, 0.5596062317928265, 0.5982637571288935, 0.6946305071451082, 0.7976151338018255, 0.6260182396278939, 0.9825793378276704, 0.9876492371879586, 0.7704396848555619, 0.9781359640702498, 0.9277388635905301, 0.7444154483358416, 0.9984817586884773, 0.8827782264618382, 0.9630879186647578, 0.9346816835817475, 0.6383735889465387, 0.627658764912056, 0.7319055673112329, 0.611977966497485, 0.6657449224169926, 0.9374584178183107, 0.8399601861996187, 0.8458837811448711, 0.5185872434396575, 0.7787991466447477, 0.6662353904070011, 0.6048191160880261, 0.9679732940082497, 0.9448060535415952, 0.5871565575960069, 0.8818546905854876, 0.6879193290744864, 0.7371047342315478, 0.973666186232312, 0.5823758943988638, 0.7038466572677393, 0.6104148047886289, 0.9713199669088493, 0.7484806310712602, 0.5829026450604553, 0.6919918222026331, 0.6841927421132369, 0.8501332511689714, 0.8962698881047205, 0.9914104056832906, 0.960371095282146, 0.7566418035622595, 0.8136740662945396, 0.523094733232919, 0.7576383391084534, 0.9691886347196019, 0.9323736236960227, 0.9097886109396526, 0.9826679722025147, 0.7400769097561901, 0.8392132451982567, 0.867310753807236, 0.9460110023485985, 0.9889979663745606, 0.6052890651336881, 0.5764693308176605, 0.9340742431526301, 0.9962363919412887, 0.7859523951505953, 0.6335609287577743, 0.5259817489108798, 0.9213520299629744, 0.7513750961935626, 0.6023834692481955, 0.8706863333579009, 0.6430917785239949, 0.8201115350862, 0.5512395811514293, 0.7681431589909662, 0.5208687593933161, 0.9860398873567502, 0.6704722013207709, 0.5841297381334121, 0.5787930129517624, 0.7023318194697656, 0.8296809217001475, 0.7028686307767504, 0.8421243852994724, 0.5155911946508013, 0.73311791838806, 0.9270499015247191, 0.6992223349730571, 0.5686373430639815, 0.7054641979055389, 0.7010396084680806, 0.7817797054191962, 0.7869649884188343, 0.8731277519158467, 0.8199975796531447, 0.6222043354945149, 0.5973787644300497, 0.7687620195990326, 0.8655663566274875, 0.6941158085989088, 0.8864680800253406, 0.9371857120903673, 0.8586405253387532, 0.7724728940864136, 0.8607929419877268, 0.8826741895436794, 0.9732821733313568, 0.8427769059633067, 0.5310441374792327, 0.6810466765667699, 0.5807912140676508, 0.6042786707666075, 0.6905715383663722, 0.560765444252225, 0.9043180523654468, 0.802513547275014, 0.5793494870439819, 0.8869787062097902, 0.7037836454879187, 0.8583358726790317, 0.8270045105043062, 0.8274952036932133, 0.9749789809491789, 0.5183712497703785, 0.6084555239759467, 0.5936485931390876, 0.8878696769452183, 0.656704486031849, 0.5608742732914694, 0.841368717525564, 0.7766129200057492, 0.5578966271437021, 0.8893941598863155, 0.8987926398487729, 0.8078891223542568, 0.5477134794253151, 0.9374749607181323, 0.5113212423313827, 0.8788544766289639, 0.8631763499310252, 0.6902452928947975, 0.5002932673556972, 0.6699833331186591, 0.9830693792343401, 0.9125964783302439, 0.976098418713527, 0.6068208467836195, 0.5738029257656632, 0.9602709730617138, 0.9761257266671011, 0.5926931778107408, 0.6039002355271068, 0.9363827101965949, 0.8391470086780113, 0.7271005276830275, 0.9438222393724723, 0.9191951050886242, 0.965655369188759, 0.9607206746319372, 0.9891497379631418, 0.590267690190696, 0.7691608020807291, 0.6202570965673009, 0.8779146064890113, 0.8915422548764107, 0.5582555838804492, 0.9887565060512847, 0.6808985315129603, 0.6780904879817358, 0.9431936801921463, 0.6943102632675389, 0.7073167973216656, 0.8574956389861217, 0.7847687973060429, 0.5131721965572029, 0.7899475667803786, 0.7297938718275819, 0.887141500308148, 0.6983713594921788, 0.8765572729434505, 0.6635200917881793, 0.5588085611464034, 0.6945609523669046, 0.9440410337055974, 0.9263758194854002, 0.7279648628981503, 0.860285285236757, 0.9967203988953974, 0.9031016257929423, 0.7499683942918617, 0.8802112184939407, 0.6197195089287939, 0.5483603577645257, 0.8601534567115772, 0.6753509078878976, 0.7580176397439957, 0.7112204817981999, 0.9798372629932202, 0.9424044089800492, 0.8841441284169852, 0.8431374098137173, 0.8679426544452944, 0.5931418581513306, 0.9028686012008194, 0.5378541620879542, 0.5468294437889182, 0.5869017899882125, 0.5612921155170848, 0.9715905837196805, 0.6495025133181425, 0.807175172399673, 0.6004874578188786, 0.7600911871292666, 0.6835039738357858, 0.6811069104346723, 0.636107694949906, 0.9880810819081518, 0.7192183698586829, 0.5078663346763566, 0.9413997813769248, 0.8677808187036294, 0.6763078037036763, 0.5387941957054161, 0.6666974311667802, 0.818167393034636, 0.7056919362184677, 0.8704697270738977, 0.5532366500397484, 0.9660567512785778, 0.6490773225480391, 0.9158029172346083, 0.5853822750299754, 0.8495349426642504, 0.6668240702596113, 0.691656007160719, 0.793403778771304, 0.7539151200987984, 0.8304693598117774, 0.6038004715699934, 0.7153805445183568, 0.655476242634359, 0.672071124941901, 0.7943870963103388, 0.8068425049708275, 0.6003217884109888, 0.7545761978448249, 0.5976950577223663, 0.7192492627726466, 0.6894498449536772, 0.5980424638668672, 0.7731596059362674, 0.8838212669143884, 0.9044732855007597, 0.859179459085719, 0.681863240584964, 0.9058355462662806, 0.8252297277115037, 0.9041987022000184, 0.8522552625391172, 0.767873263506839, 0.6428001398588523, 0.9847297815601814, 0.9190633932663144, 0.6985481912223538, 0.5415465823578371, 0.6087860005298014, 0.8072920026494789, 0.5155258061775465, 0.6057326240387242, 0.5300588151651567, 0.9324146694359026, 0.8278550611177454, 0.5660208704093165, 0.7074502713230244, 0.9966381636373745, 0.5920477815909168, 0.6158835079892702, 0.6527731623460106, 0.7193597590529484, 0.5389858259306313, 0.7971431664337929, 0.8551039612029121, 0.5185653757513464, 0.672256946415641, 0.778048768891322, 0.6933511289120848, 0.5902053238283589, 0.661613230468427, 0.7759031566723855, 0.8399606552032914, 0.9461171439041077, 0.7569508842427684, 0.6075805663074615, 0.8445709638213381, 0.8596212692584175, 0.8449804613039602, 0.8623439818499129, 0.596929844526028, 0.6192015597588536, 0.6066472283953097, 0.9427687045537138, 0.6622038747648666, 0.566154667616728, 0.9684390278204253, 0.8426832851488073, 0.5267153776473288, 0.7114425126948898, 0.9622383058152612, 0.9728321706625682, 0.8309978751782905, 0.5956345400449659, 0.8950128774665772, 0.8853182750955975, 0.533796391768735, 0.8362783671355332, 0.7452086791519269, 0.5790206156250055, 0.5554725568703753, 0.6917387516977643, 0.9658330608542169, 0.6051257186987414, 0.9611457973093569, 0.6869546205362261, 0.7454416718666044, 0.8359584346174795, 0.7571280122549986, 0.5093154941537119, 0.7940247509739431, 0.534313005586148, 0.8298508825637878, 0.8267284067373262, 0.7145175037730345, 0.9134654869323389, 0.6612044930882357, 0.7950019862188771, 0.7529784776602328, 0.6138679986625449, 0.990095276254968, 0.6129403450884154, 0.7463928164410486, 0.7466300047540688, 0.905133377477495, 0.9030364565064954, 0.9598573764942414, 0.5828475252129748, 0.6953484862848005, 0.6454538988269147, 0.7783618862748787, 0.7628924991137626, 0.9696243330276286, 0.6573017470360757, 0.8761559769365003, 0.8775918470435582, 0.7561039527834437, 0.764681678242371, 0.9990565496816359, 0.8551932083378849, 0.9396717597835924, 0.927951333149854, 0.6649047585731072, 0.7641283960036159, 0.9320350445105465, 0.8020194512388472, 0.9009497492218244, 0.5965691867104356, 0.6669410305149217, 0.8353735062188965, 0.762202319663484, 0.9053275995210421, 0.8787048117263478, 0.6640046919893978, 0.7863378158703211, 0.6364813917316823, 0.86938123558411, 0.6196119626941168, 0.9358091662695883, 0.7173574551613422, 0.862224124132827, 0.7491622528697237, 0.6133020912852927, 0.6338265530240601, 0.5960948222957505, 0.6415666749497195, 0.5003952828469943, 0.8572038603040825, 0.8270267811663428, 0.9405132495711639, 0.8301306333264257, 0.6820500600344468, 0.6698939074279284, 0.9745086615330585, 0.741635278139196, 0.5838941392345418, 0.7854640114795108, 0.7943368837931499, 0.524156120333509, 0.6199213241725539, 0.8270726584419947, 0.6290656199312408, 0.6448631636637788, 0.9564537400768465, 0.5816448169755557, 0.5883605428402708, 0.6998385459976527, 0.6787187882935379, 0.6078159938177299, 0.7304418078703955, 0.9570622959461086, 0.8665340864806057, 0.5510222459965644, 0.5925388036389012, 0.9096544376600291, 0.8186971277773736, 0.9825624866055855, 0.5521482141560248, 0.8600061847419096, 0.7102801819561063, 0.9767712958464336, 0.5416641049162718, 0.9090154871779523, 0.6868776394397816, 0.9008448665833234, 0.9623282710257586, 0.8226186585660052, 0.7174490934064821, 0.8501543707493251, 0.9426579927979162, 0.6332666902528334, 0.8152625157974123, 0.5625588164297559, 0.6246070113006872, 0.5629493167307078, 0.964040374770708, 0.5152287251229697, 0.5101943231556118, 0.8489376796701888, 0.5834025753591829, 0.9224238980341202, 0.7171126312470409, 0.5635656048504689, 0.935439564687768, 0.6657632846986257, 0.5888992620691489, 0.8988837229995051, 0.9436190312279185, 0.7492293915476556, 0.5059630479255054, 0.8460160193427528, 0.865008852010378, 0.7118533303845065, 0.521730884346205, 0.6661550890232002, 0.7467780277900766, 0.774053933349873, 0.8602576621914676, 0.8596505357491517, 0.9341131368446346, 0.9579546445529002, 0.7992733427332268, 0.7359554302778926, 0.5388709080571685, 0.9894793713707364, 0.7440436362622542, 0.7394038256115281, 0.7545635750747091, 0.7738728302547437, 0.8236132103953593, 0.931528920571612, 0.8706308028963283, 0.8689309380066077, 0.6984351669942703, 0.868871895066868, 0.8816463076965192, 0.9182483775703998, 0.9058771741321097, 0.7841117748751014, 0.5578865122553589, 0.7566198691594386, 0.5575091084104478, 0.5303226493084634, 0.8709526273870809, 0.9173200276469722, 0.5929035687117614, 0.9062992430911867, 0.7333840984417879, 0.9026470295919158, 0.8254199011659211, 0.6707102924903132, 0.6072367913420698, 0.8799279840853549, 0.7857471915535938, 0.8627133030744373, 0.7473316157199443, 0.7767973842415277, 0.7944563626966269, 0.8309279037713004, 0.5957483821018104, 0.8956181327303184, 0.9261736884738746, 0.7914655367322878, 0.8009266192452238, 0.5936505237858878, 0.648585172609058, 0.8808604500066658, 0.8349020260935895, 0.8083105520958117, 0.9099639022838923, 0.7280865630814379, 0.9715166530209434, 0.7863570085939362, 0.6684295249486879, 0.8975119449817344, 0.6005892349725472, 0.5101570937163173, 0.5709248477063, 0.881890364761053, 0.7513253338197395, 0.758930631373608, 0.7621370250386175, 0.5957707531972836, 0.7904654589410263, 0.5854314026920033, 0.5942296600250955, 0.7569516013173874, 0.7685412522026873, 0.6958930935546463, 0.763115643871064, 0.8129420542419759, 0.9835902737599711, 0.6468195645603061, 0.8821023804889715, 0.5115334053596947, 0.7969285735015379, 0.871205404714577, 0.5480254124506738, 0.5386898429325209, 0.8882627750406475, 0.5671710150138377, 0.8268673090934238, 0.8619577308321824, 0.6072461479273565, 0.9879263923349262, 0.6432935769493999, 0.6951266036747119, 0.9987847728845793, 0.8317874360839208, 0.5276908420633297, 0.5698733623348109, 0.5887278085804243, 0.5345963898583972, 0.7160922871974544, 0.625570007351363, 0.6365581764630097, 0.8547370543432704, 0.5786239425670523, 0.896562650013682, 0.9478657705968252, 0.6190570353881679, 0.9635394066448565, 0.8859765609406609, 0.5047897542097026, 0.9732585331703432, 0.854462645850234, 0.569853616650613, 0.7723252590169485, 0.8086640210699418, 0.7816740390620551, 0.8624011810354446, 0.6147482666349657, 0.8931859685369725, 0.8160320194488732, 0.9343649390103443, 0.862640027871784, 0.9526760778469907, 0.7573681590026949, 0.70363183857999, 0.8131414074321675, 0.6538682885521225, 0.7018336809954179, 0.7605134564028193, 0.5023795707945028, 0.9895241164972908, 0.5269437152145118, 0.9660986907047726, 0.7609594929063787, 0.8416823854043767, 0.9104026165980458, 0.5530729617607303, 0.8017599181461894, 0.768696603080434, 0.8962786133098972, 0.6190744259208949, 0.9660524459372632, 0.8406688486040896, 0.822906277121455, 0.8304173311212069, 0.6152974885257868, 0.6907922234102075, 0.7020846453517392, 0.9925461213257997, 0.7846739562578742, 0.807651115392384, 0.6876014729680573, 0.6496294224343444, 0.7243064945556226, 0.8557370037993534, 0.5245067911111319, 0.5958653028405608, 0.6465466900687193, 0.5046535654671831, 0.6017998247173344, 0.8195369690470853, 0.8732469096379398, 0.8315347689638444, 0.603815781906033, 0.9162328776508146, 0.8666114888686249, 0.9035621231829658, 0.7502494412286315, 0.778242930441438, 0.7798860204370508, 0.6359198087185332, 0.7352363077484417, 0.8681351033943496, 0.8314048559500182, 0.5440560711152189, 0.9264356235313067, 0.8431724485833136, 0.5353801628132264, 0.7575492868570874, 0.7437870279570997, 0.5709713449786196, 0.5226420757584656, 0.9816524350089719, 0.8705738260969165, 0.6215492935241271, 0.7780157186565406, 0.9620417169499433, 0.7330827843401182, 0.7777385552099503, 0.5678508066376582, 0.5963722145444998, 0.7036688321821457, 0.8384959408221337, 0.8812346923128096, 0.7217477099374632, 0.7235541576858924, 0.7764570736544134, 0.9374292776813615, 0.876547848081275, 0.6273236871716409, 0.5530965770411309, 0.7518525617190932, 0.5256869262390544, 0.8243459865773193, 0.9171866384864462, 0.7296722919177357, 0.9933014582004576, 0.507656044970251, 0.8665030055037115, 0.6925375743253755, 0.9350253938015177, 0.7422170938057033, 0.6625114947031592, 0.7644528961937866, 0.8399649692004707, 0.6125590495983637, 0.9499767000753034, 0.7497327227056166, 0.6045040208849176, 0.8156935943393827, 0.8077098374388731, 0.9220639823690382, 0.8510969156275627, 0.8517896349217948, 0.6772617704975713, 0.5936600164263004, 0.769421776809715, 0.8223723862433043, 0.8558526349341877, 0.5245069587973908, 0.711027126581071, 0.5536122679428088, 0.8499073662636327, 0.8603570538311873, 0.9565157743430116, 0.7879384654027164, 0.7045036890621961, 0.6129945761645152, 0.9167797837912457, 0.6971146953878679, 0.6312411157718915, 0.6378369047669097, 0.7012138207844503, 0.7252119350825216, 0.9509537963530996, 0.627434907103486, 0.6359426233518294, 0.8944177483676379, 0.9498381598938236, 0.7784435299999098, 0.6089982048852074, 0.831935373086049, 0.6973362393965153, 0.9408036102168189, 0.5722029672115994, 0.5566339150208448, 0.7690803712810057, 0.7303855202806238, 0.5985031393355201, 0.7276925713259781, 0.6723232940181676, 0.617338695792846, 0.8592207019321334, 0.6316299927745637, 0.6692748265546966, 0.6995973767377249, 0.7939099477128658, 0.6290443546237979, 0.7246093910133953, 0.5209586372964449, 0.8418200234759201, 0.9002739782703975, 0.6803168394385086, 0.8554656699076333, 0.5775928092017409, 0.9048291397469481, 0.8367400418665907, 0.6673383696543507, 0.872848146637082, 0.6765811792203785, 0.794459271860982, 0.7690292561704238, 0.6248529401117155, 0.8674385672733433, 0.643802463500715, 0.9219059557542502, 0.8129405707503818, 0.9530859614740145, 0.6960295598550993, 0.5094110714726865, 0.8450921925374505, 0.8745866561375105, 0.7175396587834318, 0.8899518468436733, 0.6087160854576021, 0.9933995442243203, 0.8385231897503831, 0.9245926902745071, 0.8289782126251694, 0.877291475245553, 0.801193337002615, 0.7819328823797803, 0.9081353008096511, 0.9551603477618312, 0.6128097441268395, 0.584007699431236, 0.9857491125965201, 0.5438047285700615, 0.6136100984013142, 0.6233378115885742, 0.7598874839135952, 0.6734190402344169, 0.6453681549859229, 0.8796794807419483, 0.6662431393513817, 0.5916527247678501, 0.6321210691076732, 0.6460286190179696, 0.8626528291030078, 0.9111047561009645, 0.7992136887308039, 0.9034555994988311, 0.6168248260737099, 0.6620366641298747, 0.6101445089267896, 0.6149594004124888, 0.5972412132150533, 0.7877386979130435, 0.6556900208396084, 0.667862936934311, 0.9894274058322867, 0.7537624691685416, 0.5212564633057679, 0.7477307130974271, 0.7031592817298207, 0.6922826722686254, 0.9937240262045468, 0.5659387822869577, 0.9193073226728132, 0.6493110628108124, 0.8350431298998308, 0.794782039018318, 0.9182904480863321, 0.6895092265341589, 0.7734338116363078, 0.866526807795384, 0.887327753787256, 0.617254218469117, 0.5490225206220682, 0.7639251044906183, 0.5264253074413998, 0.7070498808055414, 0.5050832755368774, 0.7895250975997798, 0.822576978320567, 0.5980313484584694, 0.513120920162467, 0.873678650509705, 0.6006435338730781, 0.9790127626338107, 0.6179657302836925, 0.5877683367535178, 0.6471472112543922, 0.7447917621340487, 0.5922930538361, 0.8690019429422972, 0.9659261928186397, 0.9027604335559543, 0.9098718224657458, 0.9982390474224712, 0.6997622804275936, 0.9643998405714456, 0.9989453582499492, 0.648034849524796, 0.6389825406885443, 0.5737294376781147, 0.8504634652994554, 0.8326275015260189, 0.6022327502297073, 0.8346665475110446, 0.7394771806063438, 0.5798241344872892, 0.9828859990148768, 0.7654911117965641, 0.968083491771211, 0.8887007820904662, 0.555288721948208, 0.6315385698934428, 0.9318895280754284, 0.9101484243870153, 0.8205962254279602, 0.5706199860725045, 0.8084597910460173, 0.9443907945386367, 0.7140956306117261, 0.6208144584139552, 0.9510278563579098, 0.7799223522331937, 0.5072604463550745, 0.5381808455056202, 0.5342710363980974, 0.5753171939521432, 0.9599140434329108, 0.6834158979048599, 0.8361142486295712, 0.7262518078588011, 0.6932374643091603, 0.7216630938033701, 0.6338289705463567, 0.6377931411297235, 0.9435771989782762, 0.6521776110085656, 0.6417888441274264, 0.6965537623208148, 0.7269518645088804, 0.5772102279773241, 0.5600151943834533, 0.9358247054393758, 0.6074988851461084, 0.7350340643830022, 0.8383126727028974, 0.7236179198094861, 0.8615732464383756, 0.9772650337823082, 0.6183270299591247, 0.6160854904210891, 0.8055034342990812, 0.6407457272656495, 0.6747783785980777, 0.8217370798927827, 0.5400846840672566, 0.98430703072235, 0.5756665157791971, 0.8924440478005871, 0.8777585920286461, 0.573350710515997, 0.5818456043505498, 0.7666347894341374, 0.6411209077601734, 0.6312924014001522, 0.5683214929918552, 0.7335888779858979, 0.5639215743636355, 0.7973914203482002, 0.6184937309999324, 0.6024487964404086, 0.5627096343603504, 0.8976347568230989, 0.9268252586647809, 0.9204706419674992, 0.6564998727252189, 0.9196652322595229, 0.7226807064690467, 0.5171495104695389, 0.6788967233919612, 0.7493019044572002, 0.7912445199441005, 0.7459776509307628, 0.8930980126000083, 0.9834876283499882, 0.8099150744158776, 0.9743037191439115, 0.5756687392511414, 0.5147165201862415, 0.5237237704613527, 0.6002857851515371, 0.5586467499444157, 0.6582165729387227, 0.7999284542511873, 0.7110088674981816, 0.7712475281562803, 0.5944539142503718, 0.6006646876255874, 0.7208391787735482, 0.698907688290638, 0.69296686302506, 0.8120916942110181, 0.5292184072375338, 0.7391152857852505, 0.7358883489673038, 0.5533499994159252, 0.9200309476426081, 0.6915500801179912, 0.8691651653824899, 0.8101365442250115, 0.507580994799062, 0.8627453357424657, 0.8532185400168272, 0.6269382526968919, 0.7003068614515155, 0.8323631901735623, 0.7316194236697143, 0.7654136605401172, 0.9177903158202233, 0.9654185436439127, 0.6220872807404692, 0.6216614278466386, 0.7878266975974918, 0.6852953226718912, 0.9190007215480043, 0.8286883813367516, 0.9903927537310773, 0.7992360521478894, 0.7813278509036401, 0.5877985300024613, 0.5481475171708909, 0.8556330351614754, 0.9102715537009244, 0.7936083799184847, 0.8570188056056105, 0.745100623392055, 0.5098321331142581, 0.9151443966325388, 0.8588285179202477, 0.5770391871192977, 0.8293419948328102, 0.8673847153884677, 0.9927830323767668, 0.6005141617655576, 0.837208950038351, 0.9507267424183493, 0.6409344146920379, 0.6878247619445568, 0.8773160819059627, 0.7712516949910846, 0.66988150370631, 0.5689232442287124, 0.6729043678934095, 0.5118297407366457, 0.8843264768121673, 0.7941017433298414, 0.7737339574730142, 0.6256287318710436, 0.9887479903401133, 0.7992794923752726, 0.9980783999551985, 0.8555408768611158, 0.6885956095245966, 0.5917777433400473, 0.5185885771840739, 0.7130155832398951, 0.9900674050204386, 0.6088833148819199, 0.6169236478611835, 0.6236398923081621, 0.6520154242800567, 0.9599358775404703, 0.9505024902429958, 0.9858623925619598, 0.724740380031277, 0.8160274641245708, 0.75152812214068, 0.5061036387253498, 0.7819056627742649, 0.6794913315836921, 0.8507031003745547, 0.959646465183577, 0.8263106501593116, 0.6913980657141746, 0.7069592915381102, 0.9097814465637664, 0.610700014816528, 0.5344859606317687, 0.9904371185174062, 0.8868982094279101, 0.6617323848000742, 0.5402868840297934, 0.5618888752698745, 0.7444822506200812, 0.5155526495169975, 0.8560145413701583, 0.9604105250166641, 0.8447453483953827, 0.8748154356567088, 0.5351914617162857, 0.6366532757119099, 0.8676214410134924, 0.9057168134735947, 0.9475462558466221, 0.7942503935530058, 0.8386192242717325, 0.6921888614868961, 0.7510056561314405, 0.5484453483270433, 0.5823971012831094, 0.7781783175680168, 0.7209912021331828, 0.984747311475352, 0.5587433979299667, 0.6763794960753146, 0.6316810327243505, 0.6010686335771331, 0.6490165667155483, 0.8594500209687153, 0.8105739456140902, 0.5424962078051108, 0.6352026991185549, 0.5532660918795331, 0.9787847187039063, 0.5861534906010024, 0.9933532880976379, 0.5120889278804144, 0.6134511873930693, 0.9973873352877154, 0.9109542615951625, 0.8647610671496168, 0.84650901343555, 0.5123477093445146, 0.6629793973698492, 0.8153949082704837, 0.8963352021712987, 0.9979731127479285, 0.8381000218285015, 0.5621162060849896, 0.7140827989004175, 0.5833148165867483, 0.5887473335867675, 0.8571759273728234, 0.9711942153543605, 0.7019655889114933, 0.5278345300456255, 0.7139105482286621, 0.6129396679590209, 0.61132808055462, 0.8020805406346503, 0.6585943048006824, 0.5368639542605371, 0.7077744021595136, 0.8894540483215132, 0.5348216913676189, 0.8497467594786525, 0.5414697347670949, 0.5483966640311655, 0.8709919712340795, 0.692404238600801, 0.7298983094946754, 0.7593946770185243, 0.9423448890572628, 0.6181052805150478, 0.579750453955557, 0.7558120739344618, 0.6306356376997955, 0.920067984938572, 0.7364187509330344, 0.874387478362256, 0.7360316138663395, 0.6446700286057276, 0.6702547178685723, 0.8745889978355024, 0.7700691806010791, 0.8389391623059934, 0.7448014532574654, 0.9357093027479493, 0.8594041950527298, 0.9743913212800144, 0.6631971301116879, 0.6103291709121128, 0.5291832182848506, 0.954572679240125, 0.9570330080586688, 0.849709102850871, 0.6786198031910761, 0.5887884919862107, 0.7955294239435736, 0.870813940993487, 0.6833585362838552, 0.9043642996497683, 0.5132073970701354, 0.569098313223412, 0.9017079415714424, 0.813867078979926, 0.8938918824642892, 0.8127201832182811, 0.7454875670141051, 0.8203148013804881, 0.9450521266388772, 0.9571200409078402, 0.7019992366657473, 0.5803342544299414, 0.9329596901716807, 0.7367222955954864, 0.900857571153989, 0.8138758271674673, 0.516710943479106, 0.6332303726883188, 0.8183340089965274, 0.7965447296960603, 0.5883853342712242, 0.8037877718063213, 0.6031778213269812, 0.6329162594827153, 0.9906903393715333, 0.8451872228015429, 0.6968941851302545, 0.9307175746172529, 0.7072470757256855, 0.7189923426397443, 0.5590673283124713, 0.8000595899330607, 0.690345343255539, 0.71549833862395, 0.9472306736547997, 0.5027615121861355, 0.5334089938602107, 0.7835472563439783, 0.9178104628721184, 0.6706215378816301, 0.6089738301800387, 0.5209231706694977, 0.8847689631536251, 0.9141348515857035, 0.9073303451558689, 0.8005633788110664, 0.8435592899431834, 0.7895313330697782, 0.9492856966781857, 0.9970745350049093, 0.9576820859945809, 0.8362340966966479, 0.6007632775213185, 0.8244241907584916, 0.5892201524706404, 0.9992271648884304, 0.7127368927950735, 0.938611671728552, 0.9140601328567965, 0.7060734391728595, 0.5193780680351998, 0.5791819053501798, 0.8556418612985732, 0.6247617651865636, 0.7724182415036487, 0.5720117774605582, 0.96800013077054, 0.9749833244703563, 0.9480967703315191, 0.8205598294151286, 0.8717565975631307, 0.9122159472086894, 0.8268333506463756, 0.8777812364346301, 0.7702767087888504, 0.552284837133316, 0.600167849678446, 0.7933290948839695, 0.8065468540287584, 0.6623529815654314, 0.5687905866343606, 0.5938135151163813, 0.5379370680341005, 0.8296543674457001, 0.8069007705354961, 0.8948859710664665, 0.6064078182956272, 0.8986960887556118, 0.9427598523026017, 0.8829167093559167, 0.7072031719359915, 0.7630716010363928, 0.6243223127647057, 0.5449893811162807, 0.8240435624666476, 0.6150001169571602, 0.9899955788364514, 0.501917484276391, 0.7255248631272955, 0.8181473720218282, 0.554482808033065, 0.8010064355668588, 0.6369663936005845, 0.5921161010743704, 0.6330960731980999, 0.5250494368704279, 0.8924745194684592, 0.9110451869308931, 0.5879443473879366, 0.7057721665016141, 0.6782448959790817, 0.58973495032277, 0.964936362884824, 0.8895373750886071, 0.9821244724880269, 0.6375825098522878, 0.5997426240262371, 0.9104607404594621, 0.5723480216733532, 0.7885167258687843, 0.9768622364278164, 0.5044945876536091, 0.5083148742360513, 0.9565384179827119, 0.9644297603516598, 0.6788580284613673, 0.5002917164514916, 0.7684452661469721, 0.8511783239486894, 0.846443260216643, 0.7100839205036451, 0.9896914387470613, 0.8625847427726572, 0.9893400587232605, 0.979546019498354, 0.5848982927138044, 0.5641831658377883, 0.7586131004106383, 0.8945664563258622, 0.6053878294861609, 0.716127090145583, 0.9604070868703733, 0.5668339661682786, 0.6294800658403961, 0.7946184249390114, 0.7883852866725356, 0.907203975078851, 0.9740130997959981, 0.868502912207314, 0.6831734892589166, 0.8023088789182932, 0.5969731751754217, 0.8133750551822845, 0.8534235625756881, 0.6435554264930299, 0.974907456635939, 0.6853109227541138, 0.8561034222678163, 0.5194969667836034, 0.8216916275703909, 0.8688888748875818, 0.743870762279667, 0.8900789902854427, 0.9786729626622055, 0.8733221477837583, 0.5346799610448831, 0.8208358336596033, 0.9135949028268757, 0.5857480600546778, 0.617235437065498, 0.7625187666523411, 0.8361823387525315, 0.8987592109707303, 0.9085344639738266, 0.689194736113258, 0.597736725996814, 0.8277488620508411, 0.9516480238602573, 0.7464105634002514, 0.5476395089979584, 0.5190682391053698, 0.9613292402373652, 0.9870503686030733, 0.7085461721108324, 0.9244507227359975, 0.557459442859443, 0.9492230318660746, 0.6248472512454089, 0.7727167320407082, 0.8029630774041882, 0.5698867357841217, 0.8704477944666356, 0.7195004102675697, 0.9351405772824083, 0.6926578176561602, 0.5118158169219732, 0.9175528801676209, 0.9226795570709331, 0.6506506979827703, 0.6683704462375778, 0.6968266654009032, 0.649642810711488, 0.5556705449177752, 0.8907021352316257, 0.9020723417092282, 0.6650918697029692, 0.9268775844064279, 0.5901292910363231, 0.8178856869676298, 0.983214365713128, 0.7355098173724581, 0.8053358313072922, 0.6788429971798213, 0.571086692620961, 0.9624079041468276, 0.5116681328221083, 0.5144785686231762, 0.6419235460650592, 0.9430651399075991, 0.618986329356413, 0.5492775098228715, 0.9376437202026864, 0.8434950071494958, 0.6486613315274525, 0.6219194955882723, 0.6583399163274924, 0.9055063971253277, 0.7253905385270966, 0.938788579296798, 0.8586960413819604, 0.5199416540761992, 0.5119303955514334, 0.9274141612606142, 0.7268627286148852, 0.5574901395402309, 0.9149676393109694, 0.857571930278928, 0.6673196563261252, 0.567939670106058, 0.9000589165861121, 0.9252762107790794, 0.7769958557254917, 0.7927888578449023, 0.7647133511572528, 0.865853132992962, 0.7734917432709436, 0.7929861102409193, 0.8371507245208836, 0.9010776396374648, 0.5933517864378668, 0.8519386477668314, 0.7020437697720459, 0.5545859049806172, 0.5982018730830958, 0.6363166680682468, 0.9165722086048989, 0.9840613777380922, 0.9333329777025282, 0.662075634835306, 0.8678891088532812, 0.7107206992987272, 0.5335223924353453, 0.7294836255047006, 0.6322270945810579, 0.8370191771320761, 0.9505948914986705, 0.7504518899953395, 0.7244561260079073, 0.5221640470913285, 0.7600203336447093, 0.7979988481848904, 0.5413847728075876, 0.885913507883598, 0.8824883462246578, 0.631871415070017, 0.6817680068423126, 0.6896729223207192, 0.714035808044162, 0.8164284518278557, 0.9069654536080061, 0.5418181071674344, 0.5294638179199125, 0.8062305997936181, 0.7356214472431029, 0.849791267645503, 0.9063948497234009, 0.8787603151813677, 0.8997537916126237, 0.9748450016020732, 0.7152777177907448, 0.9354338998266849, 0.6721341817864661, 0.7009880410753777, 0.769868860837807, 0.5002127434006596, 0.6483943277293029, 0.6886686576352914, 0.6520856122307404, 0.7595897219610731, 0.8087746614986242, 0.6134515754344212, 0.5337475328009063, 0.6209557557035676, 0.773246001980388, 0.5030161961344661, 0.7766012356688883, 0.6893979491329265, 0.6355752553346807, 0.7171732917264645, 0.5908174476948578, 0.5318136712155832, 0.9480229037695171, 0.8731068836559108, 0.6623700888489583, 0.6767364752585525, 0.9638567296697111, 0.5057525737716662, 0.6588393249699716, 0.5246658562043558, 0.9830118886626013, 0.8232245311225348, 0.7493122726360073, 0.8444901727675556, 0.6873603057274805, 0.9289730195550255, 0.8489898785119552, 0.7337995452761006, 0.653046170177884, 0.9863944267137302, 0.7298557877464436, 0.5256479715275489, 0.7805933313055038, 0.618919288369163, 0.7196718123942608, 0.9758372933178091, 0.7003106702963919, 0.9066725629206627, 0.5931644467156028, 0.527660834984185, 0.9489419544632294, 0.6379621795411005, 0.964473267809663, 0.910035148284689, 0.7018199627103836, 0.9882796064082452, 0.7093521889892918, 0.7193547726325593, 0.8441718649216665, 0.8675548257770385, 0.8512106355707175, 0.9782639573130413, 0.6892396599311488, 0.5649022781471975, 0.8619720115918454, 0.8811155235340582, 0.6304711886526952, 0.8230944111162296, 0.7570656404959111, 0.8558665771205514, 0.9550897590346856, 0.9030001708775139, 0.5271523703313805, 0.9064439127141558, 0.5883265596490341, 0.8119656658408244, 0.5918947998000226, 0.6153722897103691, 0.6785792954715519, 0.7489519122074411, 0.831698010731547, 0.6284078188337675, 0.8676061934849366, 0.8801508800323077, 0.8103300636954216, 0.9940800668305262, 0.6762531418375833, 0.5744743164488869, 0.8663664313495829, 0.9549089799906835, 0.9002797456572678, 0.6722820952347063, 0.9460584463112984, 0.9247433482062188, 0.8431115469101109, 0.5409730448230348, 0.7516883055280353, 0.5496314626624899, 0.8318330028750123, 0.9518045558433982, 0.8084006204440026, 0.8439807108416062, 0.6382782429870448, 0.741261507425887, 0.511014734679067, 0.501555512745271, 0.7431796161696806, 0.6552414506165003, 0.810809788161884, 0.5863489456980536, 0.5173736442161561, 0.9866409036359781, 0.8193481127487158, 0.575584432129526, 0.624642923949509, 0.6505061085393005, 0.9622791801910202, 0.9848814148477063, 0.6281132962050138, 0.5281765068182929, 0.8509374898393955, 0.6228355902427404, 0.7144384477194903, 0.8431200321755903, 0.8805842529373265, 0.7683511841471196, 0.6124544063045727, 0.8445680128480495, 0.7594620675774788, 0.7639179589511105, 0.7661008208829652, 0.8640160888593029, 0.9770109408640208, 0.85747064978883, 0.7515535127182575, 0.6881322220682928, 0.8952560081804084, 0.674570384388803, 0.8994160513666338, 0.8824863848551046, 0.513766706166384, 0.5258136346467026, 0.8217375563167224, 0.8532739799054238, 0.5011233692460335, 0.5269922568004279, 0.7550403032234638, 0.7824973340786731, 0.8996224277896994, 0.9355552544982293, 0.9093852127423963, 0.7396369516357871, 0.6539304106742265, 0.6466188589980091, 0.721570345566116, 0.7156974544381534, 0.9681994097940574, 0.8348890142352571, 0.5525061431997098, 0.7124856717550982, 0.6038213269988761, 0.7100697823222231, 0.7753773199424162, 0.5307150393195201, 0.6732341787315754, 0.7959577348715278, 0.5982037540649219, 0.889096970709176, 0.8399220739957309, 0.5589329659013567, 0.9461650926629438, 0.9939480590351916, 0.6603391781299655, 0.9809768329638735, 0.7356206354254453, 0.8302774513484005, 0.6236170471096376, 0.6719632524741002, 0.677938880057736, 0.7132998510132904, 0.7027724023212834, 0.6435650385216343, 0.8532466021169407, 0.7912991001777787, 0.9499156916499638, 0.5421467740893251, 0.937068246040328, 0.6278037287068394, 0.7114568279994316, 0.6897690759610269, 0.7755296053522882, 0.6821150086596971, 0.7239907002966508, 0.6696387696409972, 0.6834023189966404, 0.5304320028048357, 0.8248721466393033, 0.8980923486470331, 0.7974133320014292, 0.5548098696632866, 0.8424253012224194, 0.8482771013123436, 0.7247273730898902, 0.72366684701505, 0.7150644192792135, 0.80135001285121, 0.8917348738116866, 0.9913116855273458, 0.8081994348768815, 0.501493765955147, 0.8452774274190298, 0.9124481066286625, 0.6346076355364745, 0.6843359149854651, 0.9295781088008839, 0.9843277309564342, 0.7127423097497738, 0.8637396326405586, 0.7556573936726436, 0.674777797983169, 0.941609964095196, 0.9333855532361996, 0.9545329271988587, 0.6914289355360228, 0.8108355177453025, 0.6032948594486427, 0.7113239990730014, 0.6563461220406069, 0.9653899999017397, 0.7387937421016579, 0.8982650328333095, 0.8916282636091677, 0.5321276132383811, 0.7883426252334438, 0.5648961625162572, 0.6300210865093331, 0.6706801690506052, 0.659595280428376, 0.9728972303248533, 0.8943746912216932, 0.5893174048235454, 0.5429643109855341, 0.8426549816306259, 0.6070994722516108, 0.525902401439514, 0.6118621796638357, 0.6152185391331173, 0.6128814927330891, 0.8005979976862899, 0.5711616359561322, 0.5821388409092748, 0.6930566294287142, 0.8164772229416963, 0.6790711742316116, 0.6833106465257863, 0.7126773154807354, 0.5058022813994176, 0.5440473111352009, 0.9264085508739333, 0.5727459020909811, 0.939639125845261, 0.8970694806544064, 0.8485947863531627, 0.7859658511672309, 0.5232426315264203, 0.9837808627747333, 0.5211679957210569, 0.9630046445006147, 0.6426698420686155, 0.9025112467341871, 0.7350792612715944, 0.6199410453381545, 0.9859322322629817, 0.8676881315150679, 0.566635167171611, 0.7878619997298053, 0.6389817537749938, 0.6446235268390077, 0.5978138073894631, 0.9586978935860138, 0.6393864856792695, 0.5785406253976866, 0.751833321706034, 0.6143336541603561, 0.760473946270227, 0.871467710854122, 0.5780528319101952, 0.5148224557944275, 0.7738773601340256, 0.7802943043440203, 0.723464063711734, 0.6539695757847308, 0.6430007293339557, 0.8429517483120601, 0.6889248843863733, 0.5480965666923784, 0.5249196237881253, 0.8395257465081583, 0.8821258531777777, 0.6278090803743691, 0.7952658848385561, 0.9784983316958409, 0.5301288468645279, 0.5256749080499008, 0.5772824008450961, 0.8319493537748031, 0.759991026910067, 0.7003086090816986, 0.890078826998028, 0.5617529424262004, 0.9455382189275106, 0.6397402872017806, 0.5321380237236525, 0.9035620213038742, 0.6973118304755577, 0.8786174758845124, 0.799424847169155, 0.609020278800604, 0.7914316713344834, 0.7689934332374737, 0.5024025713718536, 0.5795415533945577, 0.5758670269741921, 0.788386321207506, 0.6121167862339288, 0.6663342540103391, 0.9242971654357984, 0.8272513090415647, 0.8219317939670162, 0.6511543229055461, 0.5048494221009723, 0.602444984799185, 0.6726049246806756, 0.6401367022000786, 0.6110401392227525, 0.5216349515223213, 0.731509175116038, 0.8412152335367531, 0.6983703793542975, 0.6811702350586462, 0.640763559047421, 0.5889223019110461, 0.7653973592187413, 0.6893142306765523, 0.7232613453662029, 0.9918442246008948, 0.9835500883761238, 0.9373663629333564, 0.9351648208606871, 0.557290742075131, 0.6728975486132608, 0.9292933778547254, 0.9793691978528818, 0.7261959276075338, 0.8532356993261602, 0.6789803390939761, 0.8637709264004793, 0.9992368038007157, 0.826667425625508, 0.7578603578443721, 0.6659649441956744, 0.9177859709958326, 0.8581575015902408, 0.6130976402946422, 0.8918968112206755, 0.6581240301998865, 0.7369598532034713, 0.6157577019381304, 0.5835472449433388, 0.9571510308632831, 0.7387087085484951, 0.7702836933295718, 0.6203129130933958, 0.6751032735466527, 0.5213359728936334, 0.7514915849104826, 0.9370294668860262, 0.982592726217555, 0.6446594755931137, 0.684104269665581, 0.9644286684602051, 0.9554354847962885, 0.7412092667865477, 0.722641127494926, 0.6090691307225784, 0.9664977910568603, 0.6692731015561968, 0.9311988143920555, 0.5132179496717462, 0.7298604294991171, 0.7173826604628815, 0.6211575759935251, 0.9214563924432642, 0.9135088382596366, 0.8477983064428931, 0.9497156505760395, 0.7182197794022397, 0.8151373813345866, 0.6430853766043143, 0.5638089339224046, 0.5610912319223191, 0.9817479216535492, 0.7073533089277538, 0.6644202948709297, 0.9349445380961116, 0.7270670612128038, 0.6635687478877437, 0.9957243374707185, 0.6669555914946299, 0.6373712152434239, 0.5439290879037891, 0.9043620908903758, 0.6544029220893737, 0.5839969731717927, 0.7001633018993549, 0.9766538737717476, 0.7113854827830082, 0.8549719470753672, 0.8139844523971052, 0.9831737480034015, 0.6474547871914541, 0.9418121435622318, 0.8059996222833009, 0.8748063023915764, 0.8805305792416315, 0.7039602081471642, 0.6414375457057012, 0.5437993929795651, 0.7167703368379628, 0.6526870189907612, 0.8594315025397573, 0.646406083820676, 0.9257137415607467, 0.8474023988990664, 0.7708164683930934, 0.6995947599170464, 0.7204634450206793, 0.7560353843274019, 0.8266807872779474, 0.7072610495490523, 0.7272231489577438, 0.9382977988088173, 0.5510214070297568, 0.8990862095015985, 0.9527431500135455, 0.8812616601844618, 0.6953006757222061, 0.7161166302364994, 0.7199754600727173, 0.6304412949391536, 0.5397413771604589, 0.6923226741200379, 0.5212793651431267, 0.9409182490797421, 0.5433751207753472, 0.6151099994709887, 0.6868575691022403, 0.7229006050608182, 0.8247690030203823, 0.9905292946454274, 0.650066923831783, 0.8050501303984257, 0.510074445151506, 0.8123761822083637, 0.6951902500136048, 0.8885069786612292, 0.8368688243143634, 0.6823765264822864, 0.6086931457460241, 0.784891474761919, 0.7947863643651001, 0.7432840676578831, 0.9525557653896293, 0.8552195194775186, 0.64149551934729, 0.881360350565298, 0.748310136101044, 0.928973614708984, 0.8173346806689983, 0.8240949270110405, 0.6160615873397965, 0.9689073775668497, 0.5532140185155965, 0.8314023553606453, 0.7752818499443699, 0.9353313371194011, 0.907487118786787, 0.7512501750455205, 0.5079773160781467, 0.5083193303405675, 0.7864080491810737, 0.5332941828103026, 0.9415857347123741, 0.7038872573448305, 0.7613161468191041, 0.8865343243669175, 0.5074025556010181, 0.6521942160787173, 0.5474985614577507, 0.7798400822528055, 0.8262250825377462, 0.730695137849162, 0.754629090586177, 0.771046942818742, 0.7909929434943797, 0.6749625924840734, 0.8092548424625879, 0.540459821178162, 0.6616147747230653, 0.8549917793527815, 0.5319925292936376, 0.5955026788766535, 0.8490502550403796, 0.8765994559933756, 0.7474047039651552, 0.6433186168246114, 0.7188182398550917, 0.6441483439587097, 0.5199843206954418, 0.9470715351226388, 0.7636613856429184, 0.7037976435232516, 0.8185165324262683, 0.7882806259837727, 0.8498348042880133, 0.6994458623480273, 0.9544949610734962, 0.8085076202071091, 0.7665624695874327, 0.7238589784172631, 0.8493171788031011, 0.5134112976811237, 0.7641815539628105, 0.7890176873373959, 0.6263600670739173, 0.7516350454923084, 0.5907934442817164, 0.9617829918503321, 0.8959254377453072, 0.8483477916506399, 0.6815582287956805, 0.7555673059143834, 0.5831537982165227, 0.8604974658048605, 0.9054264509959601, 0.8185912584138659, 0.7192758264144415, 0.5173070325726261, 0.6325609925517406, 0.6659077017658862, 0.5878280067244315, 0.8814806946854529, 0.9607191380272634, 0.8248794071114544, 0.8831354866515942, 0.6456908689381934, 0.5377156644168197, 0.5350885206877314, 0.9482641072263742, 0.8254677420588283, 0.9420900696220516, 0.5288476358772061, 0.6482621154570685, 0.6583731254274947, 0.8661131805947728, 0.6059262345155012, 0.9021180475799214, 0.6330373737744848, 0.6138337376161421, 0.839032091663235, 0.7262301185345872, 0.8320258769018833, 0.762869854286125, 0.8066490007917098, 0.5896621972805294, 0.6236440082356585, 0.525280972550177, 0.5009318036763173, 0.7138072166222996, 0.8063828984610715, 0.7972852487654762, 0.9822968213346098, 0.6066025220413864, 0.8666442485573408, 0.5959073922657653, 0.9691212587789095, 0.832507388452639, 0.587770452044341, 0.5437346063327249, 0.9734099919529107, 0.9468451306594706, 0.9317328606462002, 0.5632251374035493, 0.5699938221332868, 0.6580442433003415, 0.5191613494817289, 0.9659463094655669, 0.7399503589163773, 0.9962975529402407, 0.5864770146526987, 0.9022068026677544, 0.9049721474781997, 0.5624004889852346, 0.8168260152581102, 0.8062473312525802, 0.7800153358320083, 0.877906960377332, 0.5973038473029606, 0.5340641811596223, 0.6648838802136595, 0.5287415185959952, 0.8907879385133624, 0.5256560778423587, 0.9596934997585951, 0.8377350059267488, 0.5875471940576376, 0.5041294512762339, 0.6306995109522391, 0.5134325288330058, 0.7172484807366403, 0.5654219426024458, 0.8713638421381933, 0.6886079066000308, 0.9304639912673327, 0.6248247135874982, 0.8052520152369822, 0.5339010552223573, 0.9793807053059682, 0.9269489700109935, 0.5709836776794677, 0.5670963915336726, 0.807288134531069, 0.8400149188629529, 0.8664652456066086, 0.5160921979390358, 0.7134243271308539, 0.8388223538783963, 0.8546639766833118, 0.9532224634283086, 0.9060890330838949, 0.5405656254341455, 0.7435247302660022, 0.9159162481533623, 0.7646247354469684, 0.9583614751356242, 0.623309264823493, 0.9184452571359432, 0.6623647388933571, 0.7034117339647723, 0.5122868193142744, 0.5781420248582885, 0.6633169808180301, 0.8278373131916054, 0.8181204711587449, 0.918669467275442, 0.7783527999956268, 0.7192664120010513, 0.6416034001990579, 0.5640810804099721, 0.982896849155648, 0.8732059149792633, 0.939348034350733, 0.6954093639788693, 0.7028782800147769, 0.7833776638982536, 0.9987070176582609, 0.9543991637077216, 0.6976294517022328, 0.6051413238688013, 0.610617799696525, 0.5364657690079275, 0.5676252953005362, 0.5274371909864615, 0.6215346066334944, 0.6647771912191476, 0.8449624514504689, 0.6285070669634572, 0.7172212092223691, 0.9999430118288561, 0.7985485536995547, 0.9847400794940777, 0.7332006793170749, 0.546668866173075, 0.6857656449816043, 0.7783658807936165, 0.837765396414478, 0.5209341335260957, 0.7568274765035891, 0.9947105663160937, 0.7319806433420226, 0.7174397006057762, 0.6973700371291698, 0.5761095895493871, 0.9433361991025576, 0.9990700901760352, 0.5238119785145732, 0.7801159209569057, 0.892404053595844, 0.661852237535712, 0.9947760526904648, 0.8913008856531668, 0.548755279475997, 0.6972483283782325, 0.5405526826393892, 0.5702870291787332, 0.5604452926636136, 0.8775616095890955, 0.5547604875798086, 0.9288498396486355, 0.7929958510215627, 0.5165500036214319, 0.7493135463576486, 0.9128518108152763, 0.5391167419318812, 0.7758526799383929, 0.5979175154570164, 0.8324411066871319, 0.6955009235131246, 0.8353565145616988, 0.5583970915153653, 0.6246277528574047, 0.658165290573093, 0.9658733772157253, 0.9970172866288899, 0.9643499772083313, 0.7086216763051347, 0.9674704136273212, 0.8812205085329092, 0.9407996990219705, 0.6164539435698835, 0.5166352612633298, 0.5179434207604656, 0.9128181879455679, 0.9758510387495614, 0.7714645943910674, 0.5590788368934271, 0.8745966460188811, 0.5215744957245225, 0.5652286814475121, 0.9564788864343992, 0.6001857714498047, 0.7732955996826758, 0.9814255668790163, 0.999271698144587, 0.5477773645221391, 0.5457958958629365, 0.6868796714030767, 0.5939036706916387, 0.8727303445158416, 0.8376097814268002, 0.7894233789683307, 0.5677519210246667, 0.9046205949615576, 0.8354268340467257, 0.699410163835237, 0.6731948116649958, 0.782808322579419, 0.8551355011135253, 0.6324250635093784, 0.9099590410718117, 0.5869396485733447, 0.8129098252384901, 0.6015242541763147, 0.7059744820188487, 0.9913205461988964, 0.6113405600639912, 0.7775835725688236, 0.7780537879397607, 0.8276280406774343, 0.58861235859619, 0.5202134217780113, 0.7430758783569642, 0.8078890651142052, 0.9235228412257859, 0.6150857659091674, 0.7912504179267946, 0.5331306435566006, 0.9998403134621587, 0.6159419731343374, 0.5710696246643482, 0.7956652459353322, 0.7290588477705446, 0.6691366117180102, 0.5161619811543678, 0.9731593784145353, 0.9800212671553763, 0.611240311808702, 0.8826972920788424, 0.9583379585638856, 0.6103494910837314, 0.7875736457564981, 0.9191454373140793, 0.7691346712023854, 0.5666616641751565, 0.7825068649680558, 0.5964301159364958, 0.6027110419317641, 0.8969295993337005, 0.9404113937773431, 0.7076902655939726, 0.5336749036549899, 0.8039759080817919, 0.9559939364215067, 0.5232872322766052, 0.5185596178904011, 0.5913550389225415, 0.8962355445807508, 0.8672791674349005, 0.6852795527964132, 0.8379703749288215, 0.510326025163278, 0.6663671144822159, 0.5234154647239826, 0.8454893944919539, 0.958487237266699, 0.5842478659323733, 0.6821088146594524, 0.7022017720029623, 0.7060893524887042, 0.5346808729558372, 0.5523668020470565, 0.9402228722307693, 0.8278056194361973, 0.643418402810708, 0.833804735242437, 0.7488982091706434, 0.7337411960049425, 0.8690506680973358, 0.9676526901687111, 0.9027121279064009, 0.7315177618302221, 0.5532288055816261, 0.7992635100682606, 0.972747858864986, 0.5918298117405935, 0.8141987309322664, 0.7388967815693757, 0.9029551357246939, 0.9982963349356866, 0.7415974516920774, 0.8251644801471407, 0.6780898662867214, 0.5258611720441485, 0.672576362210121, 0.8508511679453843, 0.8224617053325503, 0.9913133443709015, 0.6966961759409358, 0.7389570054783023, 0.5947672168663795, 0.5383205828860795, 0.7093826628738054, 0.8260021188635265, 0.8829540329748069, 0.8347796912065865, 0.7687633059144882, 0.9881243061481947, 0.7288600492151185, 0.5216997156966923, 0.5292358689919688, 0.7221194881675207, 0.8310981116287686, 0.539922469973896, 0.580884190695206, 0.7094873007585457, 0.9901893683023507, 0.7866978997771013, 0.5423416096636439, 0.5376394769059611, 0.5327198527968371, 0.7532635071778138, 0.7838854866994684, 0.8326857604427058, 0.9587054937152708, 0.9379216763437832, 0.8598096786168932, 0.5410166808906138, 0.7115332097819302, 0.6694439051190646, 0.809438344045563, 0.9953440375390272, 0.6600376891834856, 0.7723536884480755, 0.9904983434522778, 0.7646423921237215, 0.5423673485323701, 0.8953445775668241, 0.5558104350428221, 0.7057881726136708, 0.8211317570442884, 0.6154202147379628, 0.9976569540277123, 0.8629717992902914, 0.8302690633192458, 0.5112216811527908, 0.7667559696121349, 0.7614799164070024, 0.5031500320661184, 0.5426648690810545, 0.8544673390611999, 0.5661721199655381, 0.8403196909141717, 0.7680200614976203, 0.5785604879301338, 0.7648134423235893, 0.5720973568620809, 0.7137209902934171, 0.5077178556289288, 0.6121433521936925, 0.5235101144757757, 0.6646710941309257, 0.9998418170272887, 0.6501893619445431, 0.5521057441567779, 0.6649858381848011, 0.6688524785839052, 0.987401997070339, 0.5082699752878421, 0.7396692379629951, 0.6579254176441987, 0.7592842307201142, 0.7611171399787091, 0.8705482464502152, 0.9530093657045312, 0.606727215328323, 0.9988264677624188, 0.9502648971233677, 0.5276325987367112, 0.8380060063444315, 0.7755011922736453, 0.5782220026652908, 0.9108855510075851, 0.7485023670173184, 0.9425371372835152, 0.7358691038588925, 0.5005989246859539, 0.9979358348622916, 0.9897543137988786, 0.8354712305813945, 0.718245931051074, 0.8309315679409526, 0.8436410098821344, 0.8530722455253272, 0.7719487159882039, 0.9690170032697014, 0.671021706469261, 0.6531084984646491, 0.8986444157127755, 0.5952109170484898, 0.9266027077207505, 0.5501171827345471, 0.9071891450359043, 0.5221346158125104, 0.5100445048774027, 0.8547068435358622, 0.5860071613456828, 0.9965810400484296, 0.7280731177148969, 0.9525373220392874, 0.597503667004679, 0.9735509473174089, 0.905622528164987, 0.6838081032547796, 0.9884006048265183, 0.9587206339231886, 0.8627517429932822, 0.5992931618443897, 0.6620377290906045, 0.8211092116709344, 0.7564036268969486, 0.9033947037729173, 0.7419312140012713, 0.8446349710605575, 0.7311606869851413, 0.6406057493069021, 0.6967493661526842, 0.9840246435072448, 0.8256538517253557, 0.5196183069991808, 0.6705094730371726, 0.5520310270815025, 0.6704820721325644, 0.5290653483402443, 0.6956644209837355, 0.7497663729764641, 0.5053419744811078, 0.8682390366686106, 0.7693940870495992, 0.5729442871981074, 0.7020055547306744, 0.7926898581752562, 0.9702294563856768, 0.5395555262510389, 0.9026906633182077, 0.8089708979900112, 0.7150276984935444, 0.5120221761748183, 0.7237346727973915, 0.6246919286098005, 0.649527388761302, 0.5242731986456686, 0.871116946108252, 0.6925648800288089, 0.579744794852836, 0.5706331298449248, 0.7700912370710087, 0.9725342126882011, 0.9912460869540975, 0.7348808111040084, 0.8913975366537605, 0.8263671452578716, 0.8540427348005138, 0.6528597324709726, 0.5721996495639436, 0.6087310473648453, 0.5486520287829619, 0.7322177732715769, 0.6008303964532025, 0.6643336985727513, 0.6786601803747804, 0.8906553056210949, 0.5489562167924756, 0.5306638739700216, 0.6969396968064366, 0.7318520943766366, 0.8752731706469579, 0.8824021696665169, 0.6165646781055327, 0.8157745664978426, 0.6124775120451142, 0.5638157144205753, 0.952070605675112, 0.8477867808095931, 0.7818077020191376, 0.994712378914639, 0.6355368003067908, 0.8482534250296523, 0.7022840276823501, 0.5232198893010139, 0.7107881820503854, 0.5219915420102912, 0.7659794515912357, 0.5517249608113818, 0.8334674403094858, 0.7142306916576487, 0.5072478432112395, 0.744446059658029, 0.619401620779999, 0.7608866889156004, 0.8840092780582165, 0.779658891382057, 0.698003224731965, 0.5636556926147398, 0.9904864134178069, 0.5725630051155381, 0.771199583835817, 0.7112873884984945, 0.8095475768349332, 0.657578025803269, 0.5973930847559845, 0.50368817198165, 0.6304890164012826, 0.5507398373464318, 0.6558329897246435, 0.8365144122574465, 0.5365814541046274, 0.98795946684114, 0.8753359666018807, 0.6480594652491787, 0.9813884491600133, 0.5886692837311155, 0.8306878010740196, 0.6920224690480686, 0.5598957355345964, 0.5032869516834084, 0.632137368018487, 0.8642687380195253, 0.7848542524769107, 0.543409921356916, 0.8541113711868522, 0.6212804901069388, 0.6820323793519726, 0.9828024433944449, 0.645034432459828, 0.9652286754538499, 0.6985505720426651, 0.7940430901171184, 0.654970371280108, 0.707576789777031, 0.9376146357888093, 0.9575276126341108, 0.8316929039180564, 0.5485456765422512, 0.9521623472995103, 0.9019071370224929, 0.8177932523410957, 0.8699021901867977, 0.5711474520374467, 0.6704076237808965, 0.8763480028989077, 0.8823354737820768, 0.6439554370816003, 0.7656028518258986, 0.5159621858929357, 0.540633944214711, 0.6036367828009088, 0.8496723216215671, 0.5095530395954377, 0.5286293340269403, 0.5777044290759314, 0.597837923141768, 0.927572786407624, 0.59906541746645, 0.6369050942036574, 0.8267797272846056, 0.6322304083112784, 0.9021363373367484, 0.928191407486244, 0.8335517570445405, 0.6358510987606121, 0.579494216139647, 0.7136873401657953, 0.5340102620356136, 0.7291365247424416, 0.7232156158805645, 0.5208097078245765, 0.8364643212684912, 0.9958393066571017, 0.8727592760095915, 0.7608532222956264, 0.9787666352730775, 0.5898841246531974, 0.576894047935407, 0.9100794097359889, 0.8049153274469875, 0.7149768928355247, 0.7536379553735504, 0.9549126188684471, 0.8284858599974916, 0.5056627925989371, 0.8810333251129306, 0.8330780857103399, 0.8816872886696852, 0.967645622080255, 0.9068400478228867, 0.5547034989244839, 0.5995822515019352, 0.7134550476707819, 0.8845851182173459, 0.6165609517593852, 0.9518160955995485, 0.582667242728704, 0.6895294080407022, 0.9782077482204258, 0.6729411429781098, 0.5946739649523658, 0.5534905120043028, 0.5926065460025096, 0.5775527785222554, 0.7554955721844148, 0.8922331418859993, 0.6654235705394828, 0.6957299414315903, 0.8513195646000642, 0.5626800434529171, 0.9356934296390194, 0.5926392941645828, 0.790279539563351, 0.9270033769090285, 0.8571172433435452, 0.9175308639511615, 0.5727635305703167, 0.6647072966614567, 0.7673104459976183, 0.9997032262338619, 0.9552637149545722, 0.7672561257770038, 0.9370790280272674, 0.6603569790150688, 0.7760415783677599, 0.8337241265025108, 0.6232564170953243, 0.6717249491099884, 0.6795389590318754, 0.9020851384966803, 0.6446266633870373, 0.5054073351861661, 0.5553146144438283, 0.820817835937012, 0.649057636597102, 0.9391356306491128, 0.624853512224377, 0.8470875382236442, 0.9836458742047853, 0.6910217111713817, 0.8315356484560728, 0.8094657256662611, 0.5999296919382562, 0.8788268327294312, 0.6974726640346522, 0.8260574808459669, 0.6170704670562985, 0.9009237386160757, 0.7519357639548991, 0.6622245028000371, 0.5893403691607935, 0.5850611598629863, 0.7410979883575154, 0.9765220926185643, 0.8707510704669379, 0.6101580094165033, 0.6426409419528117, 0.6883108083847771, 0.9059194922390521, 0.5685435646968946, 0.7510875103558465, 0.6596230680446993, 0.6581885061210577, 0.7515603199490287, 0.5161355992032137, 0.5442076196694906, 0.9578212299221378, 0.9866490146016067, 0.8462962683899731, 0.7985744963741033, 0.6101052614593887, 0.5548269777122226, 0.6521988122897456, 0.538312053094505, 0.7124677835953608, 0.5605862295940174, 0.6788841995120267, 0.5616430407837305, 0.6635471360328686, 0.998303203587162, 0.8348051031235129, 0.5589642757984701, 0.6534729808412474, 0.9388782543313676, 0.904116526590391, 0.5050888108361745, 0.9090242096357319, 0.5238189518528851, 0.8669769541201715, 0.8308409600814213, 0.6531533993863723, 0.5355082355897787, 0.9223302003784886, 0.9800913682987169, 0.788376622473859, 0.7932543621926617, 0.7616974409191077, 0.9071264327023645, 0.9843901989285879, 0.872104721121119, 0.5103824081345156, 0.6242711971115376, 0.6001389033735195, 0.9674509224965298, 0.9402603989183256, 0.652596457713472, 0.578511865193585, 0.5853383690900044, 0.5263060986525849, 0.6825265420646927, 0.7215675488839999, 0.5727468929951647, 0.5621922329145819, 0.9342687440853166, 0.6737721725081731, 0.6282353962757155, 0.5381908579329275, 0.8079400256860146, 0.5127361155755544, 0.6871069105218495, 0.923291788570405, 0.8951619611030006, 0.620210632481955, 0.8533121876574186, 0.8595137997743155, 0.8229125933043424, 0.6569171485860299, 0.5060578265600846, 0.8576954532363406, 0.885159065067173, 0.7139469562182688, 0.7903063406087052, 0.8216468276618235, 0.9115924090493897, 0.9605627073723234, 0.7900429263786974, 0.8220870302380987, 0.538414986652229, 0.972282221230911, 0.8875806842076017, 0.8234674026283192, 0.6340675609525033, 0.9523129709685824, 0.98179118733316, 0.8805569222035294, 0.7214453699194368, 0.6465604660300701, 0.851588956179927, 0.8448337567908875, 0.6812859613981013, 0.774261619799534, 0.6222444911331972, 0.7794777837776552, 0.9571331611686583, 0.7680953254622377, 0.9304444903454541, 0.5133112765746173, 0.6533575074461776, 0.9851995257217653, 0.9843886828903237, 0.9579010552866054, 0.501686115148466, 0.7246984685330893, 0.8908549503969345, 0.6816004307172409, 0.8063512130321764, 0.9818822878001947, 0.7735637819000518, 0.7996211577244194, 0.9992319736844131, 0.579028022713308, 0.7882402542029663, 0.7655261852247957, 0.8577679640347137, 0.6245161123296095, 0.7509496836846314, 0.5342456099791812, 0.7138146837266535, 0.888433705024551, 0.538324166209071, 0.8103457952288217, 0.7331969562944413, 0.5301490519470201, 0.6434950758567091, 0.533319771251413, 0.550756952002696, 0.9639077145409072, 0.5491807417960133, 0.7050143159618723, 0.7915204376837851, 0.8651805740298247, 0.8136707199678522, 0.8500698766889647, 0.6921911872527557, 0.7974125362742398, 0.8548894333929179, 0.801616412624465, 0.6498544571792189, 0.9757278606714257, 0.8843214093720686, 0.5105120501985518, 0.8847649081652083, 0.739964259091572, 0.7180511885496155, 0.8954361770191783, 0.795109469914664, 0.7365977104952317, 0.9152639354507309, 0.7303240819029043, 0.7114673566400596, 0.7145556350163136, 0.8726613231888889, 0.728648342031144, 0.9432796220911278, 0.9222637305461923, 0.6353399249511604, 0.6218912890852792, 0.5488022621616773, 0.6059107833667972, 0.5915141836696376, 0.7801784119150919, 0.7559307171799887, 0.7886331349221725, 0.9886579261836441, 0.8410290479544924, 0.8922721108187348, 0.6870668973095722, 0.9029404049390932, 0.7009629047788222, 0.6965777304078158, 0.9276824742612253, 0.7578641258859635, 0.8919399989080044, 0.6772121646193516, 0.8571207153047107, 0.8964708972238684, 0.7614918025825961, 0.8968243588244226, 0.9533869839746159, 0.5610080060793354, 0.8640868706937148, 0.540481741547861, 0.8825377431612267, 0.7438745747558106, 0.7136696807979948, 0.8333049982732375, 0.7328803454059967, 0.7267187061101474, 0.8574551195662727, 0.993302233936264, 0.6910465877663989, 0.9230730638957423, 0.9326439880619973, 0.8195005536798272, 0.6065791332353253, 0.838942019032148, 0.7749393982539173, 0.7588201632867111, 0.5480783033940831, 0.9562778826160134, 0.9097785835761123, 0.6627721067766197, 0.7294558129100703, 0.9338258250122222, 0.7574063442995986, 0.5012533576059461, 0.7652898404157779, 0.5569704157478437, 0.7964662029193508, 0.917010383165403, 0.6508531643630384, 0.9093421016547275, 0.9152616577864007, 0.5350487191383109, 0.8034929449197665, 0.6384697514276416, 0.8297273466713471, 0.6556056119158978, 0.9766866330911438, 0.5657628772157759, 0.7793652220576892, 0.7994091959605908, 0.5103594681005466, 0.8543086429453053, 0.6400132763808298, 0.5256896626799148, 0.9130871700068429, 0.6907521621009403, 0.9546835597181678, 0.907244554614394, 0.6858117237743886, 0.569947735702984, 0.6066201726133085, 0.5427958656689909, 0.7677224974744964, 0.9539331887370479, 0.8435181628500059, 0.9524901757734264, 0.8132011016110363, 0.8025800107427693, 0.8874404585967931, 0.9351901015764279, 0.6808294911667401, 0.5111758781431768, 0.5304917420752746, 0.6280643037031535, 0.9014927515888936, 0.5417519823861956, 0.9482269821693561, 0.9293809850377861, 0.5808543578992791, 0.8044983480138808, 0.5607375715582654, 0.6465806105509494, 0.6465101515996563, 0.5610070722541084, 0.7048241152694564, 0.8941795262884822, 0.5444631369280646, 0.9103139746863643, 0.5339095493398074, 0.906230679424161, 0.8680296294731344, 0.5428966957841819, 0.6590031123561226, 0.9505537358539932, 0.777664195224042, 0.9612671631393708, 0.7285977802994356, 0.9632070484650526, 0.7566776880012273, 0.763591710539762, 0.528991661235035, 0.8269029185058464, 0.7905298686627067, 0.8427575639569498, 0.6709942382061552, 0.8072384994589372, 0.8401279934407279, 0.7276438838315028, 0.6133936012801839, 0.582334053303356, 0.7778446579840537, 0.5028125247415289, 0.5555207829015503, 0.5193908530103206, 0.5468016212055538, 0.9247036742963426, 0.8229810486794309, 0.6571327131445748, 0.6450007790582494, 0.9782144475427158, 0.6322475131761318, 0.7767322542412443, 0.6615291554983589, 0.7428946102229751, 0.6980265221812592, 0.5085658424440624, 0.9627102560906747, 0.7203667695928575, 0.8518631137483043, 0.8460572012700961, 0.9620410804425532, 0.8111672640050447, 0.6449476045694122, 0.8953882977734902, 0.5581533249247536, 0.9498264851344428, 0.5266883592394183, 0.7898241001822544, 0.6565171227515494, 0.8002728361831293, 0.9867974898021481, 0.5059249140632137, 0.7646429586117223, 0.775537131871114, 0.7172868737336202, 0.9420196225209746, 0.8913465557922616, 0.8470927843356428, 0.5872653268927435, 0.5205178134733616, 0.6080579611815935, 0.6969589638134923, 0.7406452897530496, 0.94082249766497, 0.8060831705864255, 0.7137706435134812, 0.9749782294632803, 0.8121643082152619, 0.9509254383097441, 0.6678509135115185, 0.951632676716292, 0.9037113960735759, 0.7222910569583065, 0.7115209067580774, 0.9429994388994642, 0.6838079862461883, 0.5107436398301248, 0.5426109124967611, 0.6955363277407676, 0.7350891185460983, 0.8353317079574214, 0.6268104391300019, 0.5429079823301421, 0.9178837866181553, 0.7299884223714808, 0.7613356762567625, 0.5367576163007177, 0.8662062520372125, 0.7922356188039945, 0.5518885545636891, 0.683927507343628, 0.5441264949272474, 0.8495545145732757, 0.8845558329912178, 0.5820454192154167, 0.750344137493275, 0.7601492972875652, 0.7046100243288105, 0.8065862098128953, 0.9973888619978657, 0.7933319613107879, 0.5822164868153235, 0.9098910963111189, 0.7091410075690023, 0.6598550932829986, 0.8533964301159771, 0.6026518691014564, 0.8496495115137951, 0.7221349818938889, 0.75386583082754, 0.558814132934897, 0.5122962547556964, 0.6195730250248084, 0.7500713041222916, 0.6503463044624753, 0.9839633664731064, 0.6668811183251492, 0.8702455580133313, 0.5117403039803297, 0.6879301643445762, 0.5267608446110068, 0.5948284685286683, 0.9455375300706921, 0.594007447011319, 0.9177307066176188, 0.568372691382313, 0.6045389116558726, 0.5686095005604939, 0.7372043086479516, 0.958753783146113, 0.9995682544078902, 0.7669565106042531, 0.7227435709245447, 0.9372402498569765, 0.9859015961108273, 0.8456893445788589, 0.5452760603625855, 0.8896858082825754, 0.744516125635478, 0.8052262243668517, 0.6789003960874793, 0.7417138191516387, 0.8588865400272838, 0.9047432148826136, 0.839849289093474, 0.7839181822028423, 0.7198708059227932, 0.7215081023146168, 0.8660136013730155, 0.5182594485976436, 0.7615944825484666, 0.9605137689454769, 0.5688734644067419, 0.7698074287732297, 0.646770472486207, 0.9904966398246253, 0.8089136604140819, 0.5543626030370066, 0.6356736582732262, 0.980060330887695, 0.8329867729494393, 0.8933906536031965, 0.9123218814055121, 0.8103794284194754, 0.8740016333922963, 0.8569963958324034, 0.7645515931325699, 0.5026744753396295, 0.886010718325184, 0.6519080894594786, 0.5057818611683098, 0.9305014581954798, 0.5116824573974064, 0.6206709226637711, 0.7880380328880181, 0.7802865040504989, 0.7881911874647574, 0.6652927065957759, 0.6532897947290526, 0.9518920447293338, 0.8704287119972662, 0.7512900074992654, 0.5595654277798381, 0.6532308543856811, 0.6072364808779083, 0.5561149000395103, 0.7346866205504399, 0.9189562181429248, 0.5134384044898428, 0.8037863650494654, 0.6513336865520376, 0.7332051771431471, 0.9305392016723528, 0.7807542755005115, 0.6471025977699244, 0.6613720610448579, 0.8488048393261656, 0.7591449451615262, 0.5473749498552667, 0.659353372239504, 0.7501128466231602, 0.8921158871870298, 0.9246232412561082, 0.7413222419660612, 0.7725685431574073, 0.7007722681110966, 0.6028809887169468, 0.534936857989901, 0.6418930770901636, 0.7131049205787342, 0.6338598017727383, 0.9271876923370992, 0.8505154477904825, 0.6285793663513548, 0.5158442726418024, 0.7219835480735599, 0.5777288874960506, 0.5770344081133962, 0.712550217060247, 0.9258012834819578, 0.5470212456235917, 0.8327175586007081, 0.8935595562450085, 0.632917425407797, 0.7938356272932088, 0.861790907571782, 0.8244603153600332, 0.9765047410767886, 0.6135097313640283, 0.7930836789758808, 0.7587406185394259, 0.7290398568593579, 0.5695702592926952, 0.512007485645608, 0.850641780041559, 0.7039468561100315, 0.669453020785871, 0.8246130733495962, 0.5126534990159963, 0.8603687146411421, 0.566437779794043, 0.9583308180571009, 0.6915227413244163, 0.8012624080115516, 0.8046333881101224, 0.5498263213611339, 0.8906998597189402, 0.6696409071765992, 0.7173553222233489, 0.8012717963023344, 0.9241507267008292, 0.655918565991243, 0.6121072984995225, 0.5705446339975976, 0.7480628681539891, 0.8413678512703304, 0.8717643110476324, 0.526633062303042, 0.7136136234575485, 0.5939557187546696, 0.895085960700194, 0.9884714919599248, 0.8552931612854361, 0.7732801753723708, 0.8917814247841034, 0.8228010733219092, 0.5503739282727851, 0.7470864417724862, 0.6607404438284372, 0.9770010062303245, 0.8202752741905701, 0.9704329023948983, 0.5021667943444039, 0.8319880361753019, 0.6868721476235784, 0.6812927777556519, 0.6083645745193917, 0.6947703880392634, 0.7308728497361827, 0.6775534004886755, 0.6168382159228669, 0.8923323130029811, 0.596896642045116, 0.7365795464184259, 0.9376125219274343, 0.684612889471937, 0.9211278183087523, 0.887050253861341, 0.6140649688892725, 0.8851578349605219, 0.710056870026461, 0.557272796827156, 0.6531699927386665, 0.9842373937564374, 0.9542239290448282, 0.711333815512398, 0.6966332374208628, 0.5937393802996502, 0.8219140878951707, 0.8874926865708996, 0.8003897352359943, 0.9700034324966558, 0.8774583050995337, 0.7590052673131591, 0.5898093037381278, 0.813157792884277, 0.6272462322193101, 0.7510590018267292, 0.5838584727498992, 0.662674313071618, 0.9289504013224111, 0.6279763476258218, 0.5466245446700597, 0.5350691667377943, 0.8295641651047114, 0.99676886230547, 0.5110112275712559, 0.6289229723447592, 0.5416954504330105, 0.8163029668931658, 0.947650947086523, 0.9419759143782149, 0.5689496873607234, 0.7105412755490714, 0.8255787301867145, 0.5657934277554155, 0.6640876549849893, 0.9181925784835134, 0.6471717106401831, 0.9336250848558023, 0.6631851425188939, 0.6809765715920693, 0.5830412688176121, 0.9756791597200682, 0.6736462122354796, 0.6109328402666664, 0.8959821564559258, 0.7313692162536718, 0.7233559855058823, 0.8117735024750026, 0.8721884450020783, 0.7848020881409047, 0.9082114290114849, 0.8776908190410937, 0.6697369296887477, 0.8695026414728927, 0.6515935986039771, 0.5853189781862089, 0.9061434738688354, 0.5023343437853451, 0.9301072564684578, 0.911825975640143, 0.827090067391119, 0.6608868436370343, 0.9433218588720702, 0.9462546733125521, 0.7251442803179029, 0.7840707836638406, 0.675470293894199, 0.6527317018424826, 0.9929384030883537, 0.7892890358363867, 0.7439829329386353, 0.5888205335822098, 0.6430369079715337, 0.7190616488748076, 0.786566269853608, 0.5711783602328055, 0.7910520672201329, 0.9165731481522998, 0.501037720625555, 0.7649214007497965, 0.6900848564956432, 0.8817959157390396, 0.8464801254732787, 0.9404360584152998, 0.9473622665244982, 0.7608625390764505, 0.8741444664355811, 0.5767301453783016, 0.6466476336513582, 0.6887405348401978, 0.5084471547085309, 0.7839175908135848, 0.8318872895369673, 0.5087402556314746, 0.5338028311916865, 0.7772467859803067, 0.6374356540489805, 0.8058402892744163, 0.7868668546515437, 0.9116588107755423, 0.8944140535206204, 0.6898652396309617, 0.782583381454592, 0.9387261659436257, 0.9838852532985485, 0.8007918319898168, 0.6091135413503177, 0.8937029972651875, 0.9850795872760172, 0.9282498566849643, 0.7436377475516174, 0.5633575951975631, 0.7240543474174005, 0.7887301362603787, 0.5547218865384039, 0.9044204675834651, 0.745168103410485, 0.9212212626755949, 0.6319219588006039, 0.5942146759714433, 0.9797317743160543, 0.7371803076898676, 0.7010309895101516, 0.9116705680636575, 0.5753865206711999, 0.9627990894014009, 0.5151664079834648, 0.7589834196893945, 0.5499315928740864, 0.6743124009460874, 0.818326965892143, 0.8373815379208884, 0.7555138312153333, 0.9475134948890667, 0.6353183157773049, 0.568707493115822, 0.5423798738078092, 0.8142608851407065, 0.8347577347700852, 0.50719776049057, 0.630236596838625, 0.8774232324476317, 0.8680706369187703, 0.6079873731562597, 0.7605802889939908, 0.8837721695465204, 0.8479371959809334, 0.877254349607109, 0.7708415851967938, 0.8127037131761962, 0.8070511727232392, 0.6694161849718664, 0.5218858689155204, 0.813546102307704, 0.5376493047531501, 0.9850005089410067, 0.5314389185905803, 0.7007260056208475, 0.5475573713789486, 0.7405138222716972, 0.7683206071401596, 0.6482004660944785, 0.5504634354859742, 0.9899860683637285, 0.69321537107885, 0.5462984385575692, 0.5657773081778918, 0.6570223470706449, 0.7373724041253902, 0.6409356518846411, 0.678550425659316, 0.6308077056828112, 0.909572374642077, 0.5722535214429518, 0.9440398742435273, 0.7094908292438982, 0.8029947440543377, 0.872276881623173, 0.6972247270556122, 0.8856677746279215, 0.6397942607176013, 0.6669404114877282, 0.7152110910946882, 0.749984950863483, 0.7729628588877946, 0.9897892185178295, 0.906967079194462, 0.74226830551795, 0.9951637859572824, 0.9883162252620373, 0.9237130882602584, 0.869021035850053, 0.7877513443039574, 0.9792666256619228, 0.6034127251838033, 0.8283077061137918, 0.6277127238923816, 0.8370079900526881, 0.5608758100567972, 0.6070697067297814, 0.5178784886864487, 0.8166956213551253, 0.6429796748807823, 0.647894326337578, 0.5931766276608604, 0.5311256891550531, 0.6860981231540011, 0.7256826587848972, 0.7669980998290005, 0.7776064084883344, 0.7891099729891011, 0.5327163246279008, 0.724888957686872, 0.7940730206390794, 0.8820026012248747, 0.8873771796118954, 0.6677798644829387, 0.824789831829744, 0.7927998301688972, 0.6576156793720515, 0.9887343651572733, 0.5369695304558981, 0.6843811586183981, 0.8869035086557278, 0.8369655372375342, 0.609206776207533, 0.851809112299476, 0.9204757706207348, 0.5938946168119177, 0.8812045254743566, 0.7622154466787567, 0.956728044253969, 0.605219183626835, 0.5742323000272022, 0.8822011598451273, 0.7501409005709592, 0.5267865673802704, 0.5251883511124622, 0.9748968451160365, 0.9894887884128656, 0.552051290179154, 0.8867803648789463, 0.6158583652344192, 0.5487754989173845, 0.8415256442645975, 0.5659471650649408, 0.7866772672944762, 0.7589002242300122, 0.5096918860732762, 0.5157199961427952, 0.9392641088584852, 0.5604511991891808, 0.8131735862115715, 0.6250191335482461, 0.7416531902175976, 0.8123845859803144, 0.8064190958812057, 0.709547610129746, 0.8479897559932104, 0.9763408490141828, 0.5010676745092387, 0.5561389229614011, 0.587563511264757, 0.6111157555546718, 0.793721390824974, 0.8184551132900549, 0.8032731453538997, 0.9798962316786053, 0.6593800779666479, 0.9016885022236424, 0.5075060782622981, 0.992291788676612, 0.7075733027990916, 0.8349894197583545, 0.7661808847779157, 0.6757812890928098, 0.564873710884741, 0.9378492973021582, 0.503922237293581, 0.6193495146083964, 0.7006721525170385, 0.970011053772269, 0.827566017611139, 0.6176101459467738, 0.6826696190788826, 0.8338549003289566, 0.9287751622738138, 0.8626900901859718, 0.9246949836733015, 0.6917998425127094, 0.5370834070485202, 0.8722695108094249, 0.5704012963243781, 0.5819971793668192, 0.8890372474455475, 0.9975978878097165, 0.9945239463090676, 0.7244592394867644, 0.7172164229770058, 0.5102657733650777, 0.7545541145540697, 0.5299824120556709, 0.616507619124309, 0.6146283154626042, 0.9728695282621447, 0.6092921817844741, 0.6530802711788517, 0.8053061729636701, 0.6340180505328469, 0.7779747059373541, 0.6115396908841376, 0.7123558454314634, 0.8366179191489049, 0.7966225881653366, 0.8250670057693359, 0.7297682582978666, 0.5258425064964527, 0.9347254274174113, 0.7808596529391001, 0.997961113519136, 0.9861959243758252, 0.5853384810841176, 0.5982495663638598, 0.5329372795167717, 0.9957682487477273, 0.9162071788554838, 0.6566097920438674, 0.6704825521739533, 0.7203705771079594, 0.8489165740626283, 0.6626074043958661, 0.782771032254461, 0.6855575087987037, 0.7811138392220269, 0.9471879965628567, 0.6392146887174825, 0.6060210993345359, 0.7066146462154714, 0.9356710718748835, 0.8359926652523815, 0.8454220425172022, 0.6349787741340303, 0.5133109971799781, 0.7562332491761037, 0.9583184575076338, 0.807017107812011, 0.8648643798402507, 0.9271580966372135, 0.5720352213413324, 0.6512218821804514, 0.6898573733745021, 0.9956875107657595, 0.813271992403294, 0.680902398826012, 0.9484789549770256, 0.7566976444574629, 0.805627581944026, 0.7646591233823795, 0.5856766623276813, 0.5476389422195898, 0.6116176454978808, 0.6160950345200178, 0.8479151238703453, 0.5019064720992064, 0.797658592778076, 0.9063262809889723, 0.5432360062972271, 0.7882129911600481, 0.8538452339340372, 0.8391444274907944, 0.6083819324283766, 0.6063316007195357, 0.6315668099947978, 0.8579571671668755, 0.9764205135187924, 0.9493533152202771, 0.5132572945558646, 0.8293116281348594, 0.9694134161284206, 0.5393375065427135, 0.6539911080083675, 0.9650921659317315, 0.7774965862088623, 0.8268276904063409, 0.7214554465882934, 0.9570314787422032, 0.8431782516817655, 0.5217768240196899, 0.689981414645249, 0.5360740873837158, 0.6178002120014552, 0.9275976462639558, 0.6530464595872676, 0.8633160592045288, 0.5244803742413896, 0.9404234481947691, 0.9339968142377901, 0.9387418022643086, 0.570037459677692, 0.9543056981925182, 0.5961370211269531, 0.8621877029412341, 0.758911488063473, 0.8705520152725703, 0.5087031181798957, 0.5466813811781974, 0.5114387841980139, 0.8522260484936147, 0.7690682885049993, 0.7512156777370791, 0.9870820651615673, 0.9855820959508145, 0.5803416484531192, 0.9735750330487709, 0.9498810839716701, 0.5022574141951097, 0.7631031113307729, 0.785157182868864, 0.9943851195986071, 0.6861451566481647, 0.9385431060073839, 0.5729024815136241, 0.5152394731944865, 0.8745236833117918, 0.7058165797572198, 0.6924741715566627, 0.5690526853968654, 0.9861749865272083, 0.8764332485958162, 0.9675138446405862, 0.5734780259045618, 0.6430368830736107, 0.893509731737378, 0.6804569168327805, 0.594862591182822, 0.811207645314955, 0.7305893760570483, 0.7442410729666936, 0.7543857988781265, 0.5768911881025658, 0.6891070712117314, 0.7577300670796765, 0.7502383613732905, 0.9053317914290089, 0.6479223993564132, 0.8642429626658411, 0.666363404365649, 0.8094915059146496, 0.7587890510722595, 0.8060238185418442, 0.6894634693357, 0.7193809809015697, 0.6335233815288341, 0.8315432328252415, 0.9708781583964627, 0.8539081296245885, 0.5089661904274185, 0.9556448641936282, 0.5424277138033311, 0.5189682463413435, 0.7916514422876322, 0.5460810937289055, 0.5496458658179795, 0.7458507856769057, 0.5448228193857826, 0.9710826000993061, 0.8349972676545026, 0.953028041369528, 0.5173004369766653, 0.967788114390187, 0.6762446928905749, 0.7014497067981864, 0.7562696602727024, 0.7609363804540203, 0.6561840365305546, 0.7529553455997554, 0.9420485006147492, 0.7462053922252327, 0.664038501058948, 0.7187646505561467, 0.9859828621307758, 0.6095702590656464, 0.921576084725066, 0.9814947524846904, 0.6580876002318473, 0.5937127107639294, 0.6162747021181381, 0.7197821166624516, 0.669954173887971, 0.6665425812567989, 0.969057571742115, 0.7493687540829548, 0.8772051236542745, 0.6207072128686919, 0.8614137922338982, 0.9736746751522434, 0.8420149925724025, 0.7803152120030696, 0.7080244118652926, 0.8035865081083648, 0.6305099078216625, 0.8638057064895639, 0.8808445904480489, 0.7299133803629506, 0.5461047770816603, 0.9852466845993215, 0.5480899994659181, 0.5171619995991129, 0.5388657553232232, 0.9100557461911571, 0.8745198867304553, 0.6520169519377319, 0.9658783620502872, 0.7816363178846368, 0.9307903886129474, 0.9669090056703329, 0.8039602544844375, 0.9310768449412375, 0.8851003268378416, 0.8032093332592977, 0.6573212472782205, 0.7629950474542468, 0.723151531587463, 0.6816112522231029, 0.9473393749835037, 0.9468769895632771, 0.9627776740693825, 0.9387767939756986, 0.5936713502492945, 0.5756708241070407, 0.6535183570627341, 0.7918822915175227, 0.9476461314822568, 0.8919520545394368, 0.5697276886783493, 0.9752825384044824, 0.7327991853589048, 0.6017138740804412, 0.7785099850887374, 0.8383057435725825, 0.8363281081918077, 0.6032755483026961, 0.5489611592590151, 0.886208752462762, 0.6617429166338642, 0.6814907576302334, 0.5605891606224164, 0.612999077859176, 0.8559214932006816, 0.8146870869378227, 0.5649204795143467, 0.9104241098294998, 0.5012520408632613, 0.6508416484408592, 0.8345962887474092, 0.7927013291963508, 0.6032027289656978, 0.5242877545608238, 0.9499479715407421, 0.7632119143924354, 0.8997054070536585, 0.7199218350867927, 0.7769638063271176, 0.673664622933301, 0.9336331740737376, 0.5815651445975341, 0.8698356291049248, 0.641389482871308, 0.976390785582121, 0.6710780659190632, 0.8222738864105196, 0.7315338828235393, 0.5646360455442674, 0.7629878587509312, 0.8642557611415709, 0.8857995328006476, 0.544356031527837, 0.7523608035858547, 0.8444466725742293, 0.7220651419769231, 0.8217872667493402, 0.5112181507501916, 0.5289860447975308, 0.7737726024591915, 0.5894229127451346, 0.8096041577575513, 0.8083243161703924, 0.770437060682082, 0.8678367618548263, 0.8754392433930867, 0.6066899819420575, 0.8464129546188706, 0.7492920883584034, 0.7375811781192791, 0.6455197051971657, 0.8450412818703191, 0.7160450159171625, 0.65818368152516, 0.7074909655377679, 0.8601868295843214, 0.5019022386426111, 0.8776682436813759, 0.9862694723640381, 0.5054389275934129, 0.8728952255594629, 0.6686129273840127, 0.8565574384158103, 0.5756397799685573, 0.8145464671036072, 0.5237963397266737, 0.8694038309149625, 0.5825847884274101, 0.5938988262167408, 0.9181597065457554, 0.9355377100514601, 0.5903817398936548, 0.6598014148243897, 0.8548405640069394, 0.7371588277427037, 0.6233844129634063, 0.5672697993502486, 0.7967354937999716, 0.7685623545464084, 0.8607387905969035, 0.7538276214202135, 0.8508682900671064, 0.5939545301463107, 0.9412093314493664, 0.9253775094274372, 0.7138163347668396, 0.7685182305588578, 0.6315025656463435, 0.6894021304594702, 0.6087767130330033, 0.685154811893568, 0.6716551084769173, 0.866694343348025, 0.5780618128577103, 0.7359749400291251, 0.6933785856267953, 0.7451746269334578, 0.6959431589671348, 0.9436764085555023, 0.5517599998058191, 0.7603243874285308, 0.7844346235899513, 0.98525711728244, 0.852383841757073, 0.9614894851351307, 0.8366070536178315, 0.8927594279938016, 0.5144767098490031, 0.9228832413545427, 0.7057251208192423, 0.5642611263294026, 0.5987224096351877, 0.5234405858030418, 0.8010739213335465, 0.6404416611841925, 0.51655532345466, 0.7366165660721349, 0.6524399132120018, 0.6114523414679681, 0.5174029484294533, 0.6368211273504412, 0.6505099739338338, 0.902757039962724, 0.5456252579258822, 0.6144871643053393, 0.6348853957549494, 0.8620898795398495, 0.9088274371465985, 0.7278085709817803, 0.8929988104960744, 0.5535996186108413, 0.5631227621530077, 0.5450044792544193, 0.7775677216278811, 0.6528232885435183, 0.7960708968233567, 0.702871519047463, 0.7974808139232573, 0.5930192094068805, 0.7901008139599452, 0.888392836522464, 0.7699004022791114, 0.967097279349704, 0.5261073496110966, 0.6531452944983389, 0.7094990544866134, 0.9498576731652248, 0.9175348303597894, 0.7991050950499801, 0.7712236658007857, 0.7786877915482614, 0.6752536842715045, 0.7886456229859008, 0.6572304110882607, 0.5109190045339264, 0.8325554279310291, 0.9433112214627364, 0.6252753366708701, 0.8395704445061586, 0.7721562056562954, 0.96320515103124, 0.9378595313582005, 0.5973645327889384, 0.8298419755901894, 0.6626775641157447, 0.9659458866028616, 0.9174001153951066, 0.6610549541053627, 0.7968912099175249, 0.9083590631748493, 0.6159456238924985, 0.8475571182451213, 0.6245095440419435, 0.9996488845605775, 0.8590882046656994, 0.7989806924423702, 0.5373079369622733, 0.8388911117655448, 0.501235897251981, 0.8426889019625718, 0.6643720487130624, 0.8253421244215471, 0.8297830026857074, 0.5385901264107089, 0.6135520941711048, 0.665776171865594, 0.9774496273963835, 0.6132379972790591, 0.606537666619622, 0.751708236829548, 0.7089628055729399, 0.6652348750041357, 0.5610822170789089, 0.7518626899574457, 0.7835332928313751, 0.7578692037933854, 0.7963480432907856, 0.6677523793074862, 0.6628795811544835, 0.7811901664561836, 0.7691112379704961, 0.5712211815599333, 0.6878481708262062, 0.9600775020363452, 0.6858382448609142, 0.6389303157340076, 0.5053805120475152, 0.9279461423588983, 0.6682812065963162, 0.520581562080723, 0.855465560302031, 0.6928885057691756, 0.565691680729391, 0.7307317724817666, 0.5793142264986759, 0.553095561217064, 0.5219072800385454, 0.6484187342879437, 0.6952561529625633, 0.7705613121433678, 0.589225225524914, 0.802592300251493, 0.6192286890333344, 0.8242895020184557, 0.7608398904310684, 0.8018028421937377, 0.9995877350101303, 0.51156443409509, 0.9214886873379822, 0.6736465777495164, 0.717500594724495, 0.6710322673804106, 0.9839152727046391, 0.5508511129706546, 0.5013471679554677, 0.6119953229056664, 0.8441392835601245, 0.7797613371471621, 0.872496050380629, 0.8709148713613292, 0.9368754003708069, 0.8243470462664603, 0.8399138123615704, 0.8152673397840791, 0.6307720538286892, 0.509034530096339, 0.7025490873202717, 0.9345589055558043, 0.7242473474252757, 0.8715074760286813, 0.6048979904057876, 0.5905233911803887, 0.5889937345185075, 0.6809856468905204, 0.718121175077844, 0.5134121098087343, 0.8505676531357014, 0.751200439906326, 0.6980142924816505, 0.8604232996899853, 0.8885838813018087, 0.8477098946353266, 0.5054858387163961, 0.8830774502211949, 0.7813031599100284, 0.7786969407140178, 0.7982434172741736, 0.5337743659203132, 0.6878069314570161, 0.9385327499659262, 0.5606022970572467, 0.5888019644233096, 0.917487010838046, 0.6031947353958695, 0.8016959222666789, 0.6474820820676415, 0.8533733689810798, 0.8160680455592673, 0.6969532126559876, 0.9342709868152161, 0.6181190599076718, 0.7672481628924267, 0.9285281008605233, 0.5122408406524455, 0.5638445220588028, 0.5160573031266811, 0.6807406765128561, 0.6388136422081605, 0.888594362399227, 0.8334422179740105, 0.5746864538981817, 0.6538440605529732, 0.6829736053319115, 0.6915867502315929, 0.8055087921795455, 0.5367759820005091, 0.8107028311877645, 0.751956241575855, 0.5007213791158263, 0.8046859763193976, 0.5255254633294938, 0.9091190670048573, 0.8844975028832529, 0.5799642354941237, 0.6151076319652432, 0.8794479603792984, 0.5921772599502916, 0.836117102939582, 0.5108041852697289, 0.9341196099169937, 0.9282700249818944, 0.5483300776309996, 0.6261211919166452, 0.8620212026937879, 0.6735944081661303, 0.9714113068508148, 0.8461527944589444, 0.5772620898796974, 0.7868519361497417, 0.914140703951515, 0.6221495221755322, 0.6932739894316484, 0.5509176181460785, 0.9286322197311079, 0.9493060923686647, 0.5015098027200287, 0.793380897027937, 0.7133657198930335, 0.5836990695977246, 0.8018003527691493, 0.5177635123307891, 0.911705689943328, 0.9015368692714274, 0.6238503826660269, 0.566967355569544, 0.9704155581948236, 0.600480602688003, 0.631798872431127, 0.7368626765080407, 0.7015731139192241, 0.929768236050138, 0.9388923819080832, 0.5724402764067487, 0.7454353707452673, 0.6956402561813937, 0.5297370928560563, 0.6437376807160791, 0.756838584703617, 0.7559816628308875, 0.8317803193343645, 0.6120530609769966, 0.5510832682394693, 0.928966079487548, 0.9255631818251926, 0.626128982240395, 0.9213097699703043, 0.5538005283196605, 0.8555879439081491, 0.9201818191102048, 0.9159249361811317, 0.8837585671302671, 0.9386832588863356, 0.8577559991958468, 0.7901978998810116, 0.5541805653707006, 0.8965555875282096, 0.7390347804659562, 0.9851312022215141, 0.7511674066054992, 0.6264422163648103, 0.728961028631536, 0.8137746081324553, 0.5044998276806261, 0.742243832507277, 0.7214184087655968, 0.6599227540072539, 0.6116160496864853, 0.6194547321996857, 0.8458126455027679, 0.6420633011684469, 0.6929639798383045, 0.9653143632208374, 0.9606292384452269, 0.7581482659165493, 0.992023056964487, 0.985273930839361, 0.8703384980440904, 0.8175597134301262, 0.5828885474845455, 0.6330638197342935, 0.5747670604743208, 0.670064053650357, 0.8826733117345282, 0.8092224995472892, 0.9478206189568852, 0.9477050036220112, 0.6969892320201548, 0.7148021024973035, 0.7976030519391205, 0.5874811840808136, 0.8443747367089843, 0.596473195105654, 0.6285060948435262, 0.5004943821854702, 0.7490579532725661, 0.8877799254866405, 0.8855964359155337, 0.5407014930513949, 0.6811109345552947, 0.7886532611249177, 0.6335738044566555, 0.8263165667684316, 0.7024729374266723, 0.6208172857403329, 0.6907202404145308, 0.9643565246313923, 0.9729453478711158, 0.6427132235654545, 0.746564142633618, 0.5389072172560485, 0.7230921532607519, 0.6552343056234133, 0.697140316217189, 0.5580057690705299, 0.9189763500075185, 0.6063313421907043, 0.6420754948998053, 0.7702259922962013, 0.5013571979199122, 0.7795897258389027, 0.5730214703501864, 0.8267790954735772, 0.9321243065062902, 0.591901530879759, 0.6055147107296583, 0.5880449687590721, 0.9720502187839108, 0.749935972422159, 0.6052481658269439, 0.6058785646334506, 0.5041030785477765, 0.506497686146006, 0.8076331237650319, 0.8843973357750333, 0.8370880759815332, 0.7650565509012506, 0.9144586803786506, 0.5357394442484786, 0.6320924058358783, 0.9739157585712177, 0.5582117313188879, 0.6149716705348067, 0.9117257233444466, 0.5826668666052179, 0.6743784478815902, 0.9599321492245588, 0.6997518535478318, 0.6267034434195902, 0.5516224676508501, 0.6413222443466877, 0.6997684682707243, 0.8256339611808442, 0.5958903109758383, 0.7059882362727328, 0.7616077919197625, 0.5845411052554106, 0.6896296413033813, 0.5822665162036131, 0.7381379411126574, 0.8954905304521689, 0.7556448880078701, 0.9003973482811316, 0.9563574532841663, 0.6850658958836966, 0.8652728681189863, 0.7570214285695176, 0.9391050209576499, 0.5220966667382576, 0.7173020942067909, 0.5673666614321926, 0.5611694409008248, 0.9718855337186383, 0.5102754318347043, 0.6123835016437795, 0.5527731768653095, 0.5785519184523429, 0.5433290833960813, 0.8760998861594573, 0.915798586642016, 0.9474586179233484, 0.8190359594785002, 0.6647525609708816, 0.5510702521035159, 0.6918583896912626, 0.9375744082540658, 0.8780330285565219, 0.6100214820359235, 0.920220946158645, 0.5639754104405943, 0.8647799428264534, 0.8302938788179355, 0.5127144461107516, 0.7481837740391727, 0.9195704407436562, 0.9805891968472803, 0.6188841547521109, 0.6022554617446378, 0.5810540260549937, 0.6485107568527454, 0.6589491456874057, 0.5779336037180197, 0.7594860186902188, 0.9251955467610911, 0.5873865192058232, 0.804312192529792, 0.7718518143934143, 0.9260460741492134, 0.6581396635417122, 0.8434639782460439, 0.6572803685543311, 0.6543860505791439, 0.5510814797640347, 0.8258060206612332, 0.6067105171240676, 0.9575210883786062, 0.6066622244899275, 0.8708224600629151, 0.508110462365931, 0.9510956125844924, 0.9836752671038655, 0.8546300043919524, 0.6215894924637837, 0.6096913482013657, 0.9782456490604248, 0.7858490946072669, 0.9549644919506846, 0.9969689192266706, 0.5600840244233323, 0.8210507077042508, 0.6256980746133257, 0.8523787419649629, 0.9895793973884484, 0.6065575361545119, 0.9533799544381852, 0.9865964267442663, 0.9279537071962303, 0.673421391667282, 0.8936284859520507, 0.9371471764091437, 0.7419218898975002, 0.6278808837024084, 0.9099294203038051, 0.5068962831986403, 0.7269850085267517, 0.8951567705507911, 0.9159295643746219, 0.5897832149445317, 0.8934467544166496, 0.507079037264134, 0.715632499694931, 0.6864027783629995, 0.6237707285534551, 0.7684867581489764, 0.6470475751332234, 0.8789081868074472, 0.9189618875973423, 0.7775565315509093, 0.9195712294298821, 0.5857505465205226, 0.8078522766368144, 0.7423703421529521, 0.6680047934895976, 0.539469808466599, 0.7165981228210017, 0.8357589852946894, 0.5312748069961071, 0.5709170622890836, 0.9836245538556919, 0.8861722829859138, 0.8221809128355708, 0.9478365589859576, 0.998152505944369, 0.8651997649230234, 0.83871877186633, 0.9590498699433501, 0.5318545553936941, 0.6278813755318908, 0.7715208702479037, 0.7349614239340654, 0.9513208643239068, 0.9553776264727101, 0.690566130917998, 0.7289353204141474, 0.9806619553165311, 0.9583826353997776, 0.9755718249464891, 0.6928223799810977, 0.9613036188085531, 0.6845160343884907, 0.5984766368545067, 0.6364113834862108, 0.7815713810985083, 0.9805835544781065, 0.911473938270078, 0.9650621212380448, 0.8278067871442516, 0.9336887845371338, 0.7315778057343314, 0.660149086418338, 0.6054942187780881, 0.9422108720341373, 0.8690549053499061, 0.576710210110782, 0.6096456970635044, 0.6239747714983022, 0.6617991313230644, 0.9491339515758183, 0.8641957072494584, 0.5005603946259408, 0.9127776943180178, 0.6657537765118506, 0.8804853661324512, 0.5765409502682499, 0.774514197265509, 0.9923527441085505, 0.6876137105500232, 0.689296877943532, 0.8731777376264243, 0.708756272457306, 0.5463376978338623, 0.9977830871051221, 0.859071338038078, 0.8235652450002656, 0.5781460841888633, 0.6317456855862535, 0.6746748345953985, 0.7266130947069231, 0.8311735570342649, 0.5368205981602319, 0.7750565279500221, 0.7456771805355364, 0.6265682422649621, 0.6451351764131268, 0.9712694867002452, 0.7285029180493843, 0.9781972779483563, 0.9588784030068891, 0.6142130456017016, 0.5347305879767188, 0.8938803367561652, 0.7511439509950022, 0.6451177374368473, 0.8217726724884604, 0.7514345930508809, 0.603565237728755, 0.7102321319086459, 0.5697884542966203, 0.695291742828876, 0.8766415835721318, 0.707287687308576, 0.6170588957463226, 0.8920135403763318, 0.5955353673207218, 0.7037989152462749, 0.8376063232482349, 0.7540039067484354, 0.7486438930416262, 0.7815414394245289, 0.7875953592445415, 0.6776291430623322, 0.7417306574553062, 0.5594323331224174, 0.7642191196548112, 0.5591390577898787, 0.647740582837329, 0.5960773663423493, 0.8225345852585986, 0.694102780390092, 0.798938135463696, 0.5519849548102733, 0.769756833774559, 0.6839939329943532, 0.6459098014961075, 0.98636951471995, 0.5874697205509515, 0.9080238817995945, 0.6681951522196663, 0.9091599632822147, 0.7557765016535978, 0.7047357510926522, 0.5849913079316773, 0.6998230678478707, 0.8466325335963315, 0.5019196752216333, 0.9234183603528803, 0.8968284573270269, 0.7698578573491188, 0.8251712766610326, 0.6815568491300733, 0.6766912975352704, 0.9312190998397294, 0.9931986448378176, 0.5614687216436984, 0.5360776890404831, 0.7482991043148776, 0.6992653863170475, 0.9589084078934502, 0.5774866278122754, 0.6007048956753916, 0.6884982418889831, 0.5264359220763166, 0.9090188943599717, 0.7109648334552252, 0.7005582586071504, 0.83864899450147, 0.6155566069005012, 0.825784345802109, 0.5475093702411893, 0.6818396138131146, 0.6218052506062307, 0.5539302083202876, 0.818988157581439, 0.969548092482904, 0.8375863185494636, 0.8681253209168796, 0.9843724144342805, 0.8794425040803364, 0.7681427464923849, 0.8175245324815181, 0.6178439646768568, 0.9353290126084264, 0.9519719959737396, 0.8641215360272356, 0.8562624957777818, 0.9122388160627749, 0.8047895835784031, 0.6902317896956128, 0.6919709110071455, 0.6182390027664161, 0.9614836330839847, 0.572534579331925, 0.7888642708930078, 0.9695718278226292, 0.8798462287045227, 0.9799365498571528, 0.6963644929176608, 0.5727904271099342, 0.5691791676180933, 0.8268147817926306, 0.6532237868991868, 0.6725587934895069, 0.5550619835029886, 0.8636384576739226, 0.5305083543740463, 0.8497793725551381, 0.7259602788631137, 0.6253106180734049, 0.808843511635547, 0.7877801545291456, 0.8863369165712507, 0.7434988910444318, 0.9312977434852998, 0.7753300509653437, 0.7630437214255498, 0.8851717774508188, 0.9285458387518075, 0.9860968264691217, 0.9227766405131357, 0.5561105570200122, 0.6982143332575378, 0.8347392975911527, 0.6923603209987848, 0.6953314158990179, 0.8000801421531851, 0.8024903797525387, 0.5167648111485099, 0.5516379007875141, 0.654385107684339, 0.9678932434187182, 0.5501543452188188, 0.5894597832393045, 0.5723880245205913, 0.6108708556773459, 0.5707978796011403, 0.9208088020137439, 0.9227436539667639, 0.8899714514291597, 0.6274749888892113, 0.7046750692639678, 0.7985782847498468, 0.9656544259821993, 0.7617459930339856, 0.801965546326812, 0.7502286717044302, 0.7371895907943848, 0.7832484836718762, 0.6128831800516544, 0.821198428137283, 0.7740892714243885, 0.5247150048278756, 0.6709607399064288, 0.537569630266111, 0.974029761852802, 0.804915717810468, 0.6537179350085471, 0.6769080415317104, 0.7068124326599949, 0.7884782353955195, 0.5579153747212484, 0.704405743704303, 0.7106531125952371, 0.9860515829201792, 0.8371541003827743, 0.7125318048119008, 0.7308582211491875, 0.5038358568533041, 0.6792887536148149, 0.883932633403316, 0.8203110305215486, 0.909840314053, 0.8060029576282295, 0.7056937108292346, 0.9811934602958761, 0.5094428293818971, 0.562530652038284, 0.552980618235945, 0.7580009834457067, 0.6726735982335319, 0.5952226617715295, 0.6823386762992393, 0.6747302771552774, 0.9814527911563959, 0.635721261447823, 0.5640811887917269, 0.8749006036548336, 0.6109970146631745, 0.658665503704891, 0.796511578683589, 0.5776399339605334, 0.9724480314626853, 0.9614596607172947, 0.7202124450089289, 0.8876394278699518, 0.8274502894870446, 0.7402051045711839, 0.9222253377855425, 0.8884648774804895, 0.6886890289611795, 0.7610474007018313, 0.9461248595055267, 0.5207622605806135, 0.8600530832553055, 0.7290565098709484, 0.7388523883756748, 0.9951101389855601, 0.637009925828627, 0.8820455298343406, 0.9637476911433192, 0.745773651592623, 0.9573849313256436, 0.8492821038871265, 0.7989819986981599, 0.5248187650820774, 0.8989152154025176, 0.7345891921895191, 0.8310399118012615, 0.9804598153609758, 0.7764313258888449, 0.5366689203833583, 0.730101376512098, 0.897404381406912, 0.65871187034686, 0.5020573125649338, 0.8086669790567165, 0.9086153959304539, 0.7139057916886686, 0.651167536676226, 0.8801880120483406, 0.8773525341221121, 0.809236535451082, 0.7887328208494291, 0.613793170179039, 0.8147865491362778, 0.5628835988268148, 0.6754728953891127, 0.7107910120780117, 0.6347502253878747, 0.6441257250945281, 0.6922062898633732, 0.5534427239985288, 0.7934651401538524, 0.5474231481943598, 0.9379356290948795, 0.8820033415998987, 0.9164630650083003, 0.6729120860617922, 0.5710398843255328, 0.5596844515786541, 0.6586060265050078, 0.7298854733364986, 0.6897660593728943, 0.9739482541626123, 0.9465123692823845, 0.7262286624942664, 0.5222020817825357, 0.5006908276498364, 0.5932202981062926, 0.8199661124917001, 0.5451913049409021, 0.530234927341559, 0.7267180195402421, 0.5616312234641812, 0.5345639500740287, 0.8084873926259277, 0.5982754039524016, 0.7204338818402427, 0.800304445092404, 0.8076929444597616, 0.5085937847946875, 0.6928435849692232, 0.8583962042715905, 0.7243221582067731, 0.5564384537906483, 0.5291349539155583, 0.6354154938761788, 0.5760134206864032, 0.9255979542830352, 0.855762423090129, 0.9258804452256424, 0.9927791807607236, 0.8656236010133046, 0.5539769243711243, 0.922005633538217, 0.5361547854350254, 0.5580520461831502, 0.5246408739092374, 0.7318551829554012, 0.9971349094283504, 0.9408058604361162, 0.7956735819659264, 0.8353138819801034, 0.8868541676877152, 0.5658562548698516, 0.7442054813654627, 0.5953586077402966, 0.8799253456856478, 0.7947525328915725, 0.9108361337226488, 0.9513073647399085, 0.6153600666860737, 0.6999296959083012, 0.5043786503947831, 0.6613310103440965, 0.5965073501357623, 0.8667340816161165, 0.851970733736019, 0.6690930641903517, 0.8781757857067827, 0.8566265135899223, 0.7871756879335782, 0.7596173876171184, 0.5880435510475188, 0.7615931340421578, 0.7551717414531226, 0.65388427514621, 0.7256556746374394, 0.610572947774837, 0.8091457173502425, 0.7292947372597421, 0.753210641333903, 0.5179106617364624, 0.916474885324094, 0.7926221167288081, 0.643112457714375, 0.8072622192707406, 0.5749300500231267, 0.6601621102508899, 0.7084297692945525, 0.7064777175783317, 0.6584196034019216, 0.9396444026033303, 0.9985735480766099, 0.9969343142498428, 0.6811080954264631, 0.7317066749979981, 0.5573501331251285, 0.7302719526105443, 0.5831058558946467, 0.7258636378963621, 0.8609063767200533, 0.9103125323581335, 0.9060873568522054, 0.9696508286809641, 0.6131808106748268, 0.8568205461304915, 0.5578435679540544, 0.9095267154707858, 0.7396640492069223, 0.5108842708695875, 0.7774328268675439, 0.6149633958608591, 0.8157635324967218, 0.7966949979228688, 0.6352242247764693, 0.7906384160592927, 0.5374639735658854, 0.5266323848400798, 0.5500297136629482, 0.595273680413445, 0.8376234810945863, 0.7703965943733608, 0.9980038728444727, 0.9989425878171931, 0.7834146401596054, 0.9019787204065186, 0.7409688654753336, 0.945173294037573, 0.8285579135003824, 0.544142338335197, 0.683699938930779, 0.8504113510861885, 0.6898078096700504, 0.6940174439020232, 0.7980386828330832, 0.8233520196414843, 0.6253240555594939, 0.9856910700261217, 0.7897204182109344, 0.6366127109504489, 0.6285825706167505, 0.8591544620822595, 0.757391636923294, 0.8351233093012282, 0.6155032399703132, 0.5543971200624096, 0.7642200278271882, 0.6697708489963856, 0.6086191514795387, 0.8025978879265574, 0.5601072450547673, 0.7649415552275753, 0.883108148306787, 0.9951463824563247, 0.7140590754670126, 0.7020673308547261, 0.8917997924044571, 0.8578680650989359, 0.5328865795372772, 0.9038762809572916, 0.6140941686638173, 0.513799105520458, 0.8600487647421853, 0.82365139368303, 0.5435569724771876, 0.7352373704827618, 0.8567401487186836, 0.631090545719908, 0.6511793756811669, 0.6196463338694284, 0.6432379978213294, 0.770020551526086, 0.9365817322804999, 0.8328595687436313, 0.8347802086418012, 0.7511322516855287, 0.6611704418012196, 0.7632302671108271, 0.7434000568990182, 0.5613706814230395, 0.9007492654352625, 0.5317911851671722, 0.5633168670544588, 0.9446962312831904, 0.8644138652136177, 0.7999771365677635, 0.6798347310563786, 0.7073468565924328, 0.8556379779392256, 0.8861819545011945, 0.7274233692122933, 0.6024609764384801, 0.9193003965684405, 0.7440428040741769, 0.8659334728918233, 0.763143561050647, 0.7221118464619652, 0.5637984735798829, 0.9024114107027845, 0.5958512087700909, 0.7486446746897694, 0.5748871641805703, 0.7814802777413141, 0.9001019231963396, 0.8649995810315017, 0.9306649169713885, 0.9849606749883406, 0.7450367253289641, 0.9590023620276514, 0.7809151656995372, 0.6906467520705672, 0.5399341016566621, 0.9364116238870828, 0.7889007106568928, 0.9086117315333195, 0.91160682674909, 0.891404824510001, 0.7965248261704516, 0.8096626129774211, 0.9212248142150774, 0.8416894541616722, 0.9526093863513252, 0.6850201811577749, 0.8276745498993134, 0.6860322364182744, 0.717791183170048, 0.9836871036187324, 0.9518004835571792, 0.6004659379836192, 0.7829307542248372, 0.6456743437167687, 0.6896579142100849, 0.8513694985170599, 0.615439541745797, 0.9419036372815708, 0.9229522883730923, 0.9879750209556395, 0.5857347971416103, 0.9831317525856875, 0.7887993642480193, 0.9272167438426864, 0.6265515162201711, 0.6375727223932113, 0.6012018091524798, 0.8421273823810627, 0.8458881555610533, 0.8695847071712366, 0.5067580743935672, 0.7405688941641655, 0.7623834604576113, 0.7611221652157255, 0.7180081873743263, 0.6815956006723498, 0.9395832251848666, 0.5567102041162326, 0.6639864535840162, 0.5434089119449015, 0.9919350595787371, 0.7677107410651915, 0.9679885005714934, 0.662937422400156, 0.9880863930739546, 0.9044407516300015, 0.9995386885688713, 0.608707888582248, 0.9331405635084253, 0.6936847659365285, 0.9147985549960987, 0.7037417723130788, 0.9700632168225884, 0.82705255133877, 0.8770332660192847, 0.9493441002388263, 0.7540112713335216, 0.6353365554281241, 0.8356812714402417, 0.8393281018076544, 0.8120652574896035, 0.6098478406634276, 0.85932552408518, 0.8231252789247879, 0.7776565729385088, 0.8219837061363824, 0.9732859932775603, 0.9529475155417444, 0.9831224568902739, 0.9859250149232761, 0.9474185401137802, 0.7710456257100056, 0.8906984689101307, 0.8125884327154598, 0.985558575157178, 0.8112848924834832, 0.636058462242237, 0.8006586108828959, 0.8364897107704133, 0.8503176319216867, 0.8503495871825716, 0.6478398291203553, 0.7205182182668901, 0.9695281278738959, 0.9056632237857043, 0.6997139495350866, 0.6725292659886484, 0.8960212866359554, 0.6007583336059337, 0.8587392954384249, 0.8047064049718466, 0.5684543153250796, 0.7211481324125026, 0.674981743562647, 0.7522245071884717, 0.7864771017273963, 0.6442740976012655, 0.7673494677695603, 0.7655151276817754, 0.868969526094729, 0.5277555559503505, 0.6215480890290305, 0.6566267678927804, 0.8057259187704277, 0.8523609510007322, 0.626138588385547, 0.6913421718267161, 0.98138074941859, 0.8322663925230542, 0.5838538395211692, 0.6493916857723434, 0.9478332939722915, 0.9084830191651447, 0.7744131111666608, 0.530528412886186, 0.9774726791169248, 0.9226104161636905, 0.8722595711297363, 0.6401900240273832, 0.5619515139447817, 0.7853056106373657, 0.6911054246640356, 0.6371774934512393, 0.9040297269792439, 0.9601916211056276, 0.7644734336302861, 0.5348616724984908, 0.8903860781987719, 0.9088358063670232, 0.6881428252179075, 0.5185765772444335, 0.9122323768086588, 0.5102954358950206, 0.8350413550804298, 0.6488948370522475, 0.5585505549707285, 0.900226646068521, 0.5209160159657658, 0.7622953190759747, 0.563992446832785, 0.5631979011336699, 0.5564252950846469, 0.799846586090103, 0.5470521192104658, 0.8603693943152586, 0.6558191526132309, 0.6038614536925702, 0.5361978645805953, 0.9119258412982407, 0.787883021769002, 0.5199370533415808, 0.8690243108316649, 0.8154498835093843, 0.5281722205741896, 0.8605873607341432, 0.5238284817103105, 0.9754372314594061, 0.613594043653294, 0.8741221857400168, 0.8478874167930541, 0.5253024484052919, 0.9752288772077009, 0.5166274072221304, 0.8966472767698416, 0.610453691782415, 0.8470969832093425, 0.8925650146369111, 0.6731431286296273, 0.5141484391117914, 0.7900569772967979, 0.8123255034313364, 0.5698365466455468, 0.6000312064937817, 0.7212606079416808, 0.9399123320957415, 0.8572882553600429, 0.7375940544902866, 0.5926633405449548, 0.9987921854480732, 0.9395591469864806, 0.7277746872458051, 0.5078445087483257, 0.7281542612294223, 0.5255865684727754, 0.9381374995706417, 0.8986895970166405, 0.5701399082517311, 0.9973513305370398, 0.948587394453587, 0.7601503538308355, 0.7078165828532016, 0.5609787527155206, 0.7413186406508241, 0.6416035982413038, 0.6459983170190052, 0.960667023070505, 0.8289909533194204, 0.6940300966002286, 0.799670697912702, 0.583829699411801, 0.76474757818823, 0.5824618793633861, 0.787200342996395, 0.7787226513369302, 0.7477477082426713, 0.886353123357662, 0.8390394043094185, 0.9566338293469006, 0.7598365252294764, 0.5630094265431085, 0.8504913703010316, 0.6849043422221601, 0.8756553374521424, 0.7012625506426957, 0.6902023347785405, 0.7041735220660266, 0.9206319199599973, 0.9170487901632642, 0.6142220360254886, 0.9077697823504608, 0.6010384428765172, 0.8876975991325707, 0.7888033472965867, 0.9007252864049737, 0.7937947930405174, 0.5856283588261529, 0.6358088486012612, 0.7166476324741842, 0.8659686068418697, 0.7572726695416525, 0.8979688036727873, 0.6173617725309749, 0.8078997233545516, 0.7454344004261618, 0.5950325215745133, 0.7634139125368875, 0.7753986543749296, 0.7946077615294754, 0.557340816524966, 0.8363946407112356, 0.9348428671543619, 0.7411267678521334, 0.9103470783910468, 0.5182951128890677, 0.9797382231280536, 0.6461332031533661, 0.9508995441633856, 0.8862058909358091, 0.9133692042967446, 0.5467240136617126, 0.811838099149044, 0.5727804331256554, 0.6166357098135143, 0.5645004785240566, 0.6263178247504498, 0.7027328170780038, 0.5628887925896814, 0.5897962382958439, 0.5761631729334913, 0.6171648685924069, 0.6419101063953525, 0.5397938429622878, 0.820970636470091, 0.7842245842690148, 0.9645880547640433, 0.5262803868145881, 0.9302961282213531, 0.7057298426154148, 0.9375240457558428, 0.5094122779073171, 0.9326004387552114, 0.7416080597287387, 0.7471438260659193, 0.7739880922289809, 0.8434360268281835, 0.8991899996122203, 0.5997093068731527, 0.7693700045015014, 0.8267166460991402, 0.5802773347387415, 0.6693871560074784, 0.868828066474888, 0.7189068830253442, 0.612160288133146, 0.6919578527506587, 0.9318779071381613, 0.6893739289030256, 0.9616140278625216, 0.8922027718091453, 0.6604784336087667, 0.8012728618596114, 0.771021763190439, 0.9532136445886998, 0.9206453408534365, 0.781545687985985, 0.6021278008615355, 0.6488017108878014, 0.8922778653917356, 0.7493938882183875, 0.83779080973306, 0.9326417648963351, 0.7615353250771978, 0.6371552012411648, 0.95966939847196, 0.7960681725562047, 0.7256755929113026, 0.7429900414726716, 0.9983301079254064, 0.9935931305529591, 0.7033260874093092, 0.7182023124531823, 0.7250279522038556, 0.6028291387428151, 0.7055734577195028, 0.9591924045334057, 0.8301936102180716, 0.5987347665208111, 0.7308979546383846, 0.519899173295431, 0.6815185597509221, 0.7602590100662873, 0.7388990582104384, 0.691985490947023, 0.7754260335989128, 0.5141538483601222, 0.9430125090414126, 0.605318780767915, 0.7719929999314137, 0.8246828491234967, 0.6729771011232506, 0.7492644116743132, 0.787734593132029, 0.7948008058847, 0.7763768720201687, 0.8239661580877358, 0.5977981358505831, 0.9329046392290743, 0.9456131311905968, 0.762195710570092, 0.8745374647540599, 0.6242018202871193, 0.584935203970321, 0.7313441340278417, 0.9356575305994801, 0.506597549771181, 0.7862780536018517, 0.9367650244869128, 0.8088768406840972, 0.7755897363914648, 0.8354690946444063, 0.8055303085750959, 0.9405754899499332, 0.5607951937681166, 0.5598247121465749, 0.763295770391907, 0.6230209569127736, 0.8858435620782859, 0.702458059607717, 0.59531264469128, 0.8102734664677665, 0.8137489457763776, 0.9227092344136648, 0.710118464336019, 0.8310659997250058, 0.8040703110818023, 0.8506379081534553, 0.7599201027178817, 0.9929622745634237, 0.6887391264217058, 0.9864871729946025, 0.7953223771088904, 0.9562592747415573, 0.8707140618860405, 0.7852169627979217, 0.7132460843145855, 0.786598186820666, 0.7349016328878453, 0.5145657405599756, 0.8589083784640006, 0.7993141231720572, 0.9176256376784191, 0.522322203624608, 0.7134357134826552, 0.5220835660343535, 0.8256424965081661, 0.9513544644842664, 0.6275314267129827, 0.6006152976165646, 0.6699194374926196, 0.9466774524365812, 0.773395176600382, 0.5796633971559408, 0.613941585483059, 0.5005647329433196, 0.7358852113999479, 0.8318262044397868, 0.8150297484830857, 0.6344964382789692, 0.6746644723867162, 0.5880767899953545, 0.6462482219616753, 0.7147077155316002, 0.9267942786307606, 0.8676961361633051, 0.8198820706860246, 0.9980431541113375, 0.5221900279637667, 0.8646016785514077, 0.6609082237015131, 0.6786631298029777, 0.5750415108763101, 0.9776780779905313, 0.9765241206939195, 0.9857159185815648, 0.5770993844361697, 0.9106924278422421, 0.9032288224719001, 0.5430276199329309, 0.8721061281364576, 0.7314514010347705, 0.6817876723243254, 0.6551023723386412, 0.9596269783946971, 0.5481779807373691, 0.9238219524795723, 0.839129760308325, 0.7238200034168483, 0.9553354343796427, 0.8494226976703111, 0.5750129472228513, 0.5875628152820387, 0.7612182923165117, 0.7209880483726014, 0.5898308482954395, 0.8827384461952477, 0.5738504398964793, 0.9796342930236459, 0.7692065377595896, 0.6392806068606159, 0.9976621232954422, 0.868800314865223, 0.9117398753891592, 0.5914927992473062, 0.7795839526783526, 0.572649051956853, 0.6282560582111436, 0.683697898826507, 0.6058091986336236, 0.7642649541926381, 0.6705508847605254, 0.8541880488046258, 0.6510875771636138, 0.9834268195255151, 0.7843050363914946, 0.5602467430941092, 0.9049258726366958, 0.849518649108203, 0.6644053157213616, 0.9407126612421484, 0.700699234083854, 0.8867729889420177, 0.6666754298967494, 0.6448968574881178, 0.617005029910825, 0.5840275133935598, 0.897057026334561, 0.540967978288629, 0.8863330797939752, 0.54111713410148, 0.5891446083704228, 0.825102067083002, 0.942837435602308, 0.6846752177680054, 0.8788456093746877, 0.81689327126163, 0.989598197687265, 0.9972165123893533, 0.5507903715557552, 0.9132657329661067, 0.5250627603247424, 0.8097453980287622, 0.5447545745781357, 0.9897931481906064, 0.5065987568686933, 0.8395342042451663, 0.6454342912515576, 0.9591911045728441, 0.7493801739277048, 0.7862997476501066, 0.5463054826610381, 0.5643090825396644, 0.5617358925539353, 0.7439194366045716, 0.9253688267703467, 0.9973760668390541, 0.7415491524801188, 0.9575681151713817, 0.6928687551567243, 0.9678071546768691, 0.9242138779129361, 0.537246987799612, 0.9426118271768702, 0.7194684594024099, 0.530584530616976, 0.5389141502139, 0.5773563455249151, 0.644778347515816, 0.852680315797848, 0.6068045897247101, 0.6591893633885348, 0.6759086647555326, 0.7124334587465165, 0.6697141118027616, 0.8155796295743529, 0.7555042185579695, 0.7375570120970267, 0.9603396482287538, 0.6418100111057683, 0.5617225657998963, 0.858601051897108, 0.7824523798566333, 0.9369139007560823, 0.9249896561985822, 0.8938214943834919, 0.8537883574200857, 0.9383835922570564, 0.6797197423161668, 0.744204367640919, 0.7233659116286663, 0.6893149904503397, 0.587854558714149, 0.5998499854471526, 0.5477032184068387, 0.7283617682815953, 0.8826214235387349, 0.8501778429533263, 0.7975108315589834, 0.8740679631469652, 0.9460997011037207, 0.8829992834759692, 0.6792699294499454, 0.9558392075430415, 0.8863676340173845, 0.9968963561675084, 0.5796953246894749, 0.855539386538493, 0.7317157864799878, 0.6020398538625558, 0.626728935507658, 0.6093633817617454, 0.5875708732412842, 0.7971964293433224, 0.5970844938568463, 0.6338413714612036, 0.5113461877091537, 0.8431270105091395, 0.7587932892629761, 0.5120189499866112, 0.5554540483176743, 0.7537832094729358, 0.7547597034938286, 0.7639286210967803, 0.7875347385304126, 0.6444266592470071, 0.8545495579332061, 0.7286415993003819, 0.9687404133876107, 0.9916779141897956, 0.5460774537455524, 0.8221221441861483, 0.7582627668711766, 0.5449036079651421, 0.9647398527302489, 0.5236285800673308, 0.8409367857514486, 0.7333084461796664, 0.7783418813336658, 0.6339572804796542, 0.7080975342056297, 0.9952762805663975, 0.9130889567080356, 0.5822735283842281, 0.7843005803637317, 0.7415840423024933, 0.8597263034603726, 0.7315291282611843, 0.9284074470245545, 0.6062536333168421, 0.9962623740780874, 0.508784540882442, 0.9529889796256255, 0.5707708845391891, 0.6429455582499541, 0.6565672582676331, 0.5841176843491844, 0.5553877062942509, 0.5468162207049849, 0.8477063211130724, 0.8502120911981335, 0.9035530066361148, 0.891411213726953, 0.6264205083487269, 0.614938235377996, 0.994815230104171, 0.5130948943217815, 0.590173690018504, 0.7419624765496211, 0.811675667488414, 0.5087419642527384, 0.5670677269935916, 0.9610686117562008, 0.9416067675838534, 0.7454907376582289, 0.5542666802979737, 0.7013691022565041, 0.8650825598362561, 0.8018814475565783, 0.541372311100627, 0.523990300924245, 0.6033475657523745, 0.8417797470215087, 0.9528623778189884, 0.6905985297859409, 0.7433507654688623, 0.6909018818061333, 0.7468483146878642, 0.7063931361446605, 0.8412606297263465, 0.5857528572484572, 0.9212585328912108, 0.7606286436891379, 0.802071453281104, 0.6136461257701082, 0.711940131051124, 0.6255969639551002, 0.9284247778740653, 0.7605700653820644, 0.7840753392946864, 0.5012949287010129, 0.8080905779784171, 0.8051040955231414, 0.930228697356928, 0.8476441477496239, 0.7284065933396042, 0.8091971402999649, 0.9786780060202565, 0.7891780412429332, 0.7295026254731796, 0.7872487921990237, 0.533116890525646, 0.9814638762462331, 0.6850935084210329, 0.504414145751465, 0.9091093822155454, 0.8811519754316381, 0.8796945829952881, 0.5444651040502335, 0.6252376519199436, 0.9210636081233661, 0.746607218158926, 0.7657674728350312, 0.8239428003469434, 0.7613254219751785, 0.5322451585868797, 0.5937980964350824, 0.9558939442948753, 0.6615201590383994, 0.7543497276512685, 0.5989039335201989, 0.8585349262100748, 0.7094451164341167, 0.9558150358991574, 0.689662737430767, 0.539475699557228, 0.9844764191159598, 0.5918963136566306, 0.5611812692589164, 0.6226282988007724, 0.6558482491720565, 0.5430353554904549, 0.9241301956008993, 0.7555105347282216, 0.874839725542506, 0.8973007403096707, 0.6588843381747425, 0.5123623798837198, 0.716069236110862, 0.5945640946415418, 0.7680231138389437, 0.6500501046736047, 0.6163897194765878, 0.839342095546812, 0.6450003720280548, 0.5167569127186535, 0.731315939379613, 0.7995404465231523, 0.8230652946733357, 0.9082837793481651, 0.6384055047328405, 0.8423690176627177, 0.6817461262730908, 0.5720473988355055, 0.8438296800408975, 0.9956184741795495, 0.7689070185590247, 0.6229943746684024, 0.791426015354578, 0.6084065637055749, 0.9571290927324662, 0.966316998920216, 0.8438594815983811, 0.6104251022310652, 0.7833909575126816, 0.8073637964169066, 0.5576041153111722, 0.7149925596852769, 0.8795863574363396, 0.9780847799414187, 0.9428970090741797, 0.5649127963305881, 0.760199653695032, 0.5748731132898255, 0.6222076068328792, 0.8846949755958771, 0.5866533815360403, 0.6093986611960143, 0.8265058061629302, 0.5297791886087171, 0.8580879397108507, 0.9886715861162773, 0.8558142278706573, 0.8616547281579718, 0.5399145268609847, 0.7690603205430128, 0.8560658624237462, 0.5826604236363362, 0.8799191960915693, 0.7879359616307475, 0.5137544740351621, 0.8385311392530415, 0.8460064084009613, 0.7301798234759012, 0.8999879947789433, 0.8910199485069152, 0.7570381396668527, 0.8795122814426755, 0.5222650067113139, 0.7912930198251722, 0.8285099924752386, 0.739250556321262, 0.6391597761716276, 0.9042934509246916, 0.6590530240995133, 0.7508978154597893, 0.9749828203303805, 0.5893937063963063, 0.5667859778418775, 0.5607005642476959, 0.8488482410635976, 0.594138363182459, 0.6430540416738633, 0.7617497702131635, 0.9840542995246864, 0.8278066637038388, 0.7657218955689811, 0.6475987461400974, 0.9725866503338165, 0.8092776951164005, 0.6908574385524431, 0.680330620973515, 0.8222639953698028, 0.696452436267456, 0.5558351330069242, 0.6602513244273545, 0.5912657663323342, 0.6677046005982468, 0.8804986284437311, 0.5025670182819042, 0.554941790062665, 0.8051112288663819, 0.9796697403155792, 0.6115990941621208, 0.8233210359279568, 0.6296765679601293, 0.953427322210477, 0.8163585875318053, 0.7557280972784932, 0.530583925432847, 0.9821189176023786, 0.5736579726577657, 0.7502758498611122, 0.9417595025260348, 0.9476622294283682, 0.9979398072696635, 0.7148568401400736, 0.9085299664302288, 0.8972732848833822, 0.6976254094237176, 0.6895341590392627, 0.8541593078254044, 0.8251939068010039, 0.8329537319724472, 0.99240822450515, 0.8203727567878538, 0.5340620535637101, 0.9345535900296074, 0.7709799244552513, 0.7013829131411204, 0.617078990733138, 0.9888176561553448, 0.9646235302761558, 0.5827455907501307, 0.6015662222960725, 0.9377046196234669, 0.7162157096649047, 0.6218769064252689, 0.672681072750862, 0.6523308659823541, 0.9845776400564792, 0.5216047561380317, 0.8703652692346635, 0.8776860235855586, 0.7186104359882167, 0.5773423491427652, 0.7070817994934975, 0.6018541868754785, 0.651807436726558, 0.7546607633083733, 0.9222188085737915, 0.5921486895974258, 0.925392245661746, 0.9241351597113354, 0.5745703710489812, 0.7239179628309036, 0.7265846484882268, 0.5658700741317475, 0.6877618887118289, 0.6516403801423316, 0.9901990857097487, 0.5391517079468899, 0.9399199544505481, 0.6493419985759916, 0.9224440438027641, 0.6480245175582691, 0.9455633844762035, 0.8781166979205176, 0.544769769599954, 0.8459685680755376, 0.5442040401444577, 0.5358029520087797, 0.5494246265177137, 0.9249783163963493, 0.939097379668431, 0.9719170949551608, 0.6846134496938251, 0.5374777077134596, 0.5021056701164063, 0.8060667285864709, 0.5501516355458222, 0.9525729234845386, 0.9484701686630632, 0.7409521400072172, 0.5697303764082238, 0.7505769395565827, 0.7482873862334041, 0.9669635146443969, 0.9903983689349412, 0.8047034811231467, 0.8862097452655713, 0.5395779876139943, 0.8057414393706889, 0.6775129891604679, 0.8568592102355591, 0.5588062653493672, 0.800843611305609, 0.6968976606314514, 0.9686953068633286, 0.6476779222415041, 0.6217301430147654, 0.7530543618293095, 0.6195507768900416, 0.8809862723922464, 0.9755066304593571, 0.6242095697451853, 0.6081225209586514, 0.8519209796718068, 0.8711723285903863, 0.8246152837424597, 0.576647687183438, 0.5635486660393265, 0.5721549793333041, 0.9910673790851106, 0.5944327739069879, 0.9715978741585187, 0.9550145448624433, 0.7543508291196894, 0.8865985577758255, 0.8771379920036526, 0.6545589427744769, 0.728105407099887, 0.6446502550393436, 0.9768436115986272, 0.681816273199157, 0.5895564323717708, 0.803854811577982, 0.9296101576404703, 0.8893148375535253, 0.517236151396195, 0.800837085829218, 0.7513356936496247, 0.9623727840972762, 0.5544756660944512, 0.5794606550086603, 0.5203544680976371, 0.7140191374741073, 0.8812423066411696, 0.9722089066208899, 0.731735437025081, 0.5758689856632562, 0.9725110861148318, 0.8698391510472615, 0.9646080769489097, 0.8638453894631297, 0.815705184211478, 0.9419975278451307, 0.6276197039908026, 0.6219596724764407, 0.702568949628822, 0.7813732112414058, 0.8778928403977375, 0.9431398712122109, 0.615854896593611, 0.9816569132789299, 0.8587560630982016, 0.6789812663238015, 0.7057265181190211, 0.9282141999261007, 0.8842762421341797, 0.6401499547503466, 0.7847238538605699, 0.5065229579879521, 0.94786240653872, 0.544936016271738, 0.8215143954233961, 0.9956264290830807, 0.7284596079247828, 0.8905201741432782, 0.8012979009809437, 0.9829124109808572, 0.5569817413837408, 0.6792631872658452, 0.761950369112719, 0.5063446142264503, 0.8045476477803148, 0.9062175695548587, 0.7114268021700068, 0.8429885037867737, 0.5591096464818746, 0.8702709460601303, 0.5492657706283851, 0.6320816672655023, 0.54751860474724, 0.6827122655747807, 0.8665092565271179, 0.8820376640827212, 0.8919587600307487, 0.9459192461880717, 0.7190578722888109, 0.6231356029019761, 0.5707027526961918, 0.5703906632950093, 0.944219961911251, 0.501139949997139, 0.7938534783895864, 0.8144190587844742, 0.5767228014230564, 0.7302570751541453, 0.6433831023002008, 0.9619287994360586, 0.9494915701478698, 0.5927575190641068, 0.521949647807727, 0.7703379760599718, 0.8988959041360085, 0.7387309188853468, 0.8128059592333132, 0.6427820654839588, 0.9403043208649771, 0.5729892131516157, 0.6526647317252028, 0.9456537724350695, 0.6865123619068526, 0.5399394306506012, 0.8175173917703611, 0.9787295620619056, 0.9980100322744441, 0.6589519489373156, 0.907527005429025, 0.9912737570264587, 0.9496542663404797, 0.9665116226502285, 0.573889327775872, 0.6676828216852365, 0.955365473066294, 0.5613137781040296, 0.934520611393942, 0.588806448306428, 0.5819094457978219, 0.8050674790662217, 0.8238161625583837, 0.6628190732273942, 0.9095863536032223, 0.7847535432266334, 0.6643256714659785, 0.847688444845256, 0.5623804278747642, 0.6121340379299062, 0.9127565591358238, 0.8588741912595936, 0.665385318466323, 0.5977609955189243, 0.6462884188472962, 0.8117871502792178, 0.9137033020620402, 0.631503578342139, 0.8629570374802131, 0.8036210111204021, 0.5728514199641754, 0.7134054625632276, 0.6360349035194529, 0.9189009238754052, 0.7900378617644672, 0.992409756177699, 0.7686406194067094, 0.841019129114535, 0.501862591815933, 0.5676809046891415, 0.5686051200753487, 0.7711852893590334, 0.9722888535466815, 0.8266180140185553, 0.5650894359637264, 0.867086034951206, 0.8808480166878903, 0.9974766830379578, 0.9483893553497376, 0.5589458915979778, 0.5491556429124671, 0.7848283369957306, 0.6072869709569997, 0.7835464235746773, 0.9938485915605135, 0.5725038749315186, 0.9295262905594239, 0.5280285344401829, 0.8833486544816477, 0.8123796919611963, 0.8525336111371782, 0.9177861951290203, 0.8308969391059509, 0.7086347157369227, 0.9510203559589923, 0.7660326139318037, 0.6024462591248447, 0.5084702925947351, 0.687113931017272, 0.8292286659275343, 0.6125419944044024, 0.7966888399752965, 0.6654783811367904, 0.6407675368823575, 0.6771449145868675, 0.7015872392584033, 0.7046932704596298, 0.6281909544160725, 0.5434061216278985, 0.7579950484217622, 0.557677213513487, 0.8029238062134774, 0.745601506975035, 0.7952932725926007, 0.5480189507188895, 0.8084733380312337, 0.7070780511641259, 0.7989621571439904, 0.8539712619645372, 0.6702489199738003, 0.632435862313766, 0.8765234369936339, 0.8362798965468217, 0.9734105247178204, 0.6673341092120821, 0.9644279789471785, 0.8728027344600443, 0.887994676765467, 0.7828482810008677, 0.8334954038670583, 0.7263467954742155, 0.7423478128796372, 0.6358010107959983, 0.5296956539449148, 0.8989568330277626, 0.9967283146986392, 0.6856772437333962, 0.8433956858763582, 0.9437946378955753, 0.7335671241900228, 0.7872846066459211, 0.8190704253636778, 0.784203486725233, 0.8620941820088193, 0.9646192266017917, 0.873515648927429, 0.5064517346386016, 0.6004787404180452, 0.8533394033795392, 0.8441044059600953, 0.7353128444400512, 0.5325555020353576, 0.7105728320505751, 0.9968141463121338, 0.7221151665752472, 0.5111257018237803, 0.9747424678595674, 0.7380225518277563, 0.8572703779874495, 0.6324445844597584, 0.7083526721916327, 0.7960744504741568, 0.7256721254637222, 0.8979882851679413, 0.7829249689139788, 0.9537871679125496, 0.8045384985340804, 0.5534988253891968, 0.5379934135558033, 0.9405708183915062, 0.9212129509201521, 0.6099924156279868, 0.723720208573162, 0.7848386445341717, 0.6756735796364288, 0.5776877220295413, 0.9852974378021379, 0.8934763646502988, 0.658136584348126, 0.971040937039185, 0.8665331853941682, 0.6554169234755419, 0.6363564767061782, 0.9954401828662143, 0.9221570042880349, 0.68355173755115, 0.7381584842370102, 0.5888075215589601, 0.9582615543226551, 0.8949436870257403, 0.808748861501555, 0.9152112918031378, 0.5884311314212541, 0.8212813355157293, 0.8140132440816267, 0.863413632688422, 0.9094405874244129, 0.6857383838880211, 0.6847535720199237, 0.5804019505267459, 0.5962283982492962, 0.5233123132297766, 0.8754670738749643, 0.7532609415534133, 0.8547291164489886, 0.9296598225324448, 0.8969404034882813, 0.6691039087241454, 0.6201639480991055, 0.7960315559501432, 0.8728852853281719, 0.5672300681337248, 0.5825536412541898, 0.9115159479825001, 0.7396533872324671, 0.6029151283865606, 0.6599844758300035, 0.8834580959348818, 0.5938220832327075, 0.5669923569748625, 0.8468812821321833, 0.7220989198705002, 0.7210657526114965, 0.9143471555343887, 0.5721594348167258, 0.7839756280931407, 0.588511713947673, 0.7324458637278943, 0.516738618657492, 0.5234559948194035, 0.7635693531630128, 0.6500715383186064, 0.6938404659216401, 0.9413808897338867, 0.9979374486715127, 0.853698657865794, 0.7768357419446562, 0.9340420655305336, 0.6499479222971771, 0.7574824876484507, 0.5469698701173671, 0.6598423305957735, 0.5246890571853426, 0.5591835365102991, 0.628335783949616, 0.5706708229341595, 0.7245589812894827, 0.9203872770877392, 0.9358478700594215, 0.6879324243544733, 0.7836721436228188, 0.923517490436333, 0.9767783953941029, 0.8580096956579032, 0.7275659402381107, 0.5027755066342835, 0.9240140776772557, 0.5438118059936157, 0.7329314134029208, 0.6360797012270707, 0.6291577303812719, 0.9897112888632325, 0.7480331072585528, 0.7314180809104924, 0.6080507065281961, 0.5852441906236996, 0.6600573365819352, 0.9900771133278635, 0.5850646183515507, 0.8012188448268622, 0.7995366381972753, 0.5789807057351525, 0.5010132034694899, 0.6545189996023174, 0.6225553097064872, 0.9513994336788056, 0.7699480931443795, 0.8784961651466603, 0.7249084037291422, 0.989090184279529, 0.6424294698864765, 0.9515173553595019, 0.7842179158573126, 0.8543339902466756, 0.767333469985529, 0.768206328489434, 0.927975859103575, 0.866664671236747, 0.5325097001668959, 0.5818487777026924, 0.7990732343208586, 0.5604148912998344, 0.786871937318518, 0.5392031349648141, 0.9850626437744259, 0.7493506462614875, 0.7106604423170786, 0.9261830381702376, 0.6981524254464119, 0.833253776636504, 0.8946448068642541, 0.5135320260798617, 0.7651512588187793, 0.5114817137896334, 0.9033166013706928, 0.7906833984069717, 0.9852380120775801, 0.5549793641452223, 0.7395655495786568, 0.8336507328549552, 0.724123563764019, 0.9815058660692566, 0.7156311538996297, 0.5191013723514318, 0.8038658421141905, 0.945459973273426, 0.8177172500898583, 0.5907042953549761, 0.8266760323546313, 0.9478913229031267, 0.9350819552891528, 0.8748194870229952, 0.8622589722130557, 0.8987178013623927, 0.8338845222306814, 0.9583890394124138, 0.5518633879513308, 0.5436036992636571, 0.6817239418986648, 0.7098257922841417, 0.9418297019023317, 0.7417772094828463, 0.564351934266277, 0.7822853826711516, 0.9448804221474019, 0.9833954778528821, 0.7461718178470542, 0.6326909378555754, 0.9897798321984538, 0.5760077133922537, 0.9038572814921582, 0.5142629720738193, 0.6364660796506423, 0.7598696322812128, 0.6518266563147037, 0.6066235980568853, 0.958291311577968, 0.5101328444454334, 0.8501701148506458, 0.7282352564864856, 0.5818746712679979, 0.6212280489749507, 0.9020704206634806, 0.5035880138084836, 0.7086410922883559, 0.5134961478651094, 0.7972953230199915, 0.8519860970958215, 0.9561094012534619, 0.7016095136646263, 0.9419625694980932, 0.5114777074981887, 0.6818332460343581, 0.6713605273318787, 0.6128141909676755, 0.7634358550445566, 0.8196674720966233, 0.7418893010614329, 0.6126490280056073, 0.6789322456548816, 0.656418578735645, 0.8320064347396459, 0.7387431718052907, 0.9811398857757923, 0.5560350468990634, 0.6138558288302027, 0.6595396506455069, 0.5636503154310317, 0.6009589848042542, 0.9087764240514449, 0.9759960186166291, 0.6306733892460463, 0.9019934881115435, 0.5237376181265094, 0.8556319934248157, 0.623114376120954, 0.9181860385787239, 0.5499862582722097, 0.8325247689613036, 0.5266081251887487, 0.7288161936603537, 0.68595076398112, 0.7440477181453924, 0.6104343870449968, 0.7906982984946149, 0.5454879524616846, 0.7918040902787136, 0.540226179525599, 0.6895269628672296, 0.983424768335405, 0.6635668109686506, 0.5049508996648091, 0.7564534907910615, 0.7920836179676629, 0.9336902649988514, 0.6346387322096686, 0.8119487731896525, 0.539268171375816, 0.7184894942433366, 0.7621864462305541, 0.7772745813666735, 0.7152737365558194, 0.7330579243711013, 0.7321755574154276, 0.5870304060588275, 0.6842899539176637, 0.7828126010189285, 0.7205463959678399, 0.7706867788180771, 0.8890200838031492, 0.5126927392813923, 0.8996056114921179, 0.8120168143584479, 0.6347977449156532, 0.7439351155704896, 0.6666032543973328, 0.5224114505658879, 0.9736322238082642, 0.728494825707012, 0.5484375673728166, 0.732141500055685, 0.7623979822708594, 0.5683921907673947, 0.6704650805201007, 0.9103330114830077, 0.6863195087825561, 0.7205432833343681, 0.8739394466739627, 0.8504798436109176, 0.5353133586204973, 0.9529729955389656, 0.9784584301878076, 0.7419468446932349, 0.7915739663178707, 0.7496713882801233, 0.660077157345272, 0.8232954990935883, 0.6655774917874444, 0.5434845512502671, 0.7326620463661343, 0.5786975631908302, 0.5815788741448635, 0.9539898805601379, 0.759411317554276, 0.8465872081807503, 0.7507097310160158, 0.9714746777892754, 0.7842554310633877, 0.9043308809304496, 0.5873614243830095, 0.7068233324136277, 0.9959717854975992, 0.8918671651712974, 0.9784761905323303, 0.6829061443036225, 0.6981058295799929, 0.6747459608005846, 0.9771404149333935, 0.936696376362954, 0.9891725873133432, 0.91632847649376, 0.7290748197234933, 0.7608584718742969, 0.8485610749175863, 0.9097326062989186, 0.7271972572593148, 0.7475434410200028, 0.5344073562519047, 0.6327122846381489, 0.6227282746045792, 0.7841526282738533, 0.6325116697481363, 0.622285663432124, 0.5475121856269196, 0.5708123826724234, 0.5998254746249847, 0.9913759197067, 0.8471875894475359, 0.6669240518817197, 0.6280759696870732, 0.7578517168007322, 0.5940883790008706, 0.5229216610517331, 0.8783461445260641, 0.7825788633542409, 0.9393891524080842, 0.9469911966554581, 0.5484760770802215, 0.5100423251171331, 0.8780258127723527, 0.8940659928003567, 0.8883003764658406, 0.6102270385014308, 0.8035630349860776, 0.8589062168977568, 0.6931461016628259, 0.6366269628952411, 0.5496707054773176, 0.6657008659730812, 0.9341991770162111, 0.8344110052121301, 0.5236440559277415, 0.6055249168044898, 0.8639383120637613, 0.9146461421931245, 0.8193003768000289, 0.8729440822359371, 0.9381057805678037, 0.7763624973237142, 0.9495089826835059, 0.8026801566198745, 0.9421163283859444, 0.945135489574299, 0.7372562645738272, 0.7396970128011258, 0.9355504628381961, 0.7143904559049756, 0.9379027867389266, 0.9358659449456823, 0.7649787170140449, 0.5965534933648604, 0.8834474504986106, 0.5824408426826375, 0.7455005581791212, 0.8630290498303727, 0.5673354673360729, 0.9324142562961553, 0.5632372527184608, 0.8418016285483463, 0.9550018452158231, 0.5524524956979706, 0.8667271775178684, 0.9380036354508547, 0.7097901765811283, 0.8153418555713265, 0.6560836265435304, 0.8569873189745134, 0.669795889113629, 0.6294985535028775, 0.8251533687682003, 0.9034887948937841, 0.9881896415094757, 0.6136765177853261, 0.7984232076441244, 0.6758723163914118, 0.886993903399975, 0.7908942208264564, 0.5871533471890364, 0.6295236004191743, 0.5334682238614408, 0.5017678167112265, 0.6970827587457649, 0.905875003755063, 0.8503101117072818, 0.7706160557423163, 0.7722656170030054, 0.6288218725675487, 0.9523290386069697, 0.9809347712980083, 0.7490944456665326, 0.7591580410995032, 0.6826091047957883, 0.9721887226044242, 0.8488787189704705, 0.6112073540153744, 0.649232816407694, 0.7349903629855329, 0.9342388810847579, 0.7078396115781473, 0.5203401798647942, 0.7413965456826982, 0.7994915510342546, 0.7444837320508181, 0.6679604223981499, 0.7066554092885984, 0.781022470770433, 0.6399313282905568, 0.8037405121971146, 0.9511349097351973, 0.7199445185024163, 0.9064423198513203, 0.8892715971937353, 0.5940465056152154, 0.8528369402245698, 0.8653863277369326, 0.9146826171405447, 0.9616627897841477, 0.6919850091167448, 0.5442233755762664, 0.7335221137940917, 0.757902649612842, 0.7538661471813761, 0.5108746506657788, 0.7485275751946359, 0.5304071022916352, 0.6428858127232573, 0.8494711939335425, 0.5406532202041736, 0.6353083556731787, 0.5651882611847188, 0.7290013451773949, 0.8439972486845506, 0.6912538455282273, 0.8903297336846066, 0.5024264917595546, 0.7021277048262047, 0.7817666727137896, 0.8233053389420619, 0.7940261063694216, 0.7669615382895176, 0.7592292249735602, 0.8854871882158801, 0.5450803701965419, 0.8485705421702554, 0.8698066134732898, 0.5978618467204896, 0.6312432419519592, 0.7910581284809172, 0.542332889996606, 0.8508904114401493, 0.9358566292323185, 0.515178888902992, 0.6170128403647772, 0.9311013476515176, 0.8722834603540658, 0.6332160084109067, 0.785655617513959, 0.5381404081898415, 0.5243427049101552, 0.7636066499371659, 0.5985013744159657, 0.9476021495909839, 0.8969272825686792, 0.9902741865556555, 0.9708628178864589, 0.5012976175178594, 0.6480673131298227, 0.5188675260519633, 0.5950131242313075, 0.5538551079393587, 0.9875507475855638, 0.9254943292570869, 0.9751373823535069, 0.6331389690489353, 0.59796167007537, 0.7706752326854615, 0.7972592437157379, 0.5532121968489485, 0.5308231587817955, 0.5219857547679059, 0.9424053123812913, 0.5159721955167285, 0.7140238239550178, 0.7681022063497072, 0.6190522748862262, 0.8176830341251446, 0.6198922048693178, 0.6587801386444923, 0.702130745050797, 0.8923935698091333, 0.5322060683257928, 0.9306546467176817, 0.9461494654270457, 0.7418893115418635, 0.7705145620888894, 0.6199977440558251, 0.5970350100484381, 0.8810404738431745, 0.7513523059497376, 0.9077637480219561, 0.5840425662258611, 0.5612026725066867, 0.7763673024787334, 0.9804194750978621, 0.6208575064284081, 0.994880583438691, 0.8186635404164185, 0.9920176448791629, 0.7243419809864595, 0.846598403670356, 0.7420898237215298, 0.7556029155159552, 0.9058285067673375, 0.9917411471204449, 0.7825783829952611, 0.6531290218396544, 0.9156804158121692, 0.7380954100924428, 0.5378198885721199, 0.62201683537881, 0.6159648107901936, 0.8413897194829214, 0.6696200447268147, 0.5836637081549979, 0.7528185335427447, 0.8033656611197872, 0.6267566870659681, 0.5583302314382326, 0.9869857036299194, 0.6357481449060551, 0.508904699327636, 0.599236118390559, 0.7991211966940299, 0.5077108897086403, 0.9834908365911961, 0.9490465827723633, 0.8267464005375604, 0.5092565798144371, 0.5623881030492155, 0.6696572084898502, 0.7642980583758451, 0.5619417169990761, 0.5594505908363494, 0.9707795641799803, 0.8414978682657188, 0.9807136165910972, 0.7111424852549064, 0.5675304663525624, 0.8948943650845288, 0.9655047907792628, 0.5796255209310561, 0.9039996105978901, 0.5831927315773212, 0.9821558753863227, 0.6792321783211375, 0.8794752810227366, 0.6657143014547422, 0.6992854582308037, 0.8058979525985615, 0.8745357585226173, 0.5595131627065737, 0.5443816450709132, 0.6393396594865273, 0.9660548999725083, 0.952471210868356, 0.780069686084335, 0.8158792438318971, 0.8927330253442078, 0.783466153492632, 0.7935874376930567, 0.7066927683649717, 0.7099270146799532, 0.9610963906640457, 0.8414448425288569, 0.5693924956304446, 0.9309839756489594, 0.581478075208224, 0.6827805238464687, 0.918229803589907, 0.5499701072715548, 0.665281429086392, 0.9510758026858585, 0.6541788121355941, 0.5586958487471723, 0.8891432153629051, 0.7120129642598152, 0.6209064376302369, 0.818283274650917, 0.6355406178857732, 0.5940580081269038, 0.5606780172963985, 0.9422133724010087, 0.8210569310733503, 0.8841964915321419, 0.544755553754456, 0.9566236911022973, 0.5403897542326982, 0.5729097908822063, 0.796201437207835, 0.665177342679516, 0.9480985039469298, 0.8719810895278688, 0.5587371576840681, 0.8526554535282057, 0.6389983367909263, 0.9380482150845494, 0.5738407555373902, 0.8255020396323967, 0.7254993477697573, 0.9218964738721709, 0.6380798545459577, 0.5446525997470979, 0.6198483594540938, 0.9610424421303876, 0.9254269899177552, 0.8124911590677912, 0.5266994451937536, 0.9735846674890702, 0.7186249002105183, 0.5870295363188998, 0.6936773772431049, 0.5767706509177151, 0.8145320964171363, 0.9953793154358404, 0.9453745376345253, 0.6334629400699616, 0.9211627971135379, 0.8247853464039261, 0.8767862324129765, 0.5580942658052361, 0.9526577630868751, 0.8327622461480577, 0.8601446274121194, 0.9136938730873624, 0.8580440431793064, 0.68827558276692, 0.6897904032083776, 0.6236886185468616, 0.6403255383581443, 0.5425707972997734, 0.6897174145400581, 0.5439747737815582, 0.9306511607742971, 0.7961098452632412, 0.6666062332784894, 0.5652439355135747, 0.830649262651673, 0.7161665424767291, 0.9081226372649682, 0.5847446699714443, 0.9830170847072253, 0.9777157812157621, 0.957305477507632, 0.5319134688329912, 0.6148797304220683, 0.9922277520155887, 0.8582572731491737, 0.9584461342636035, 0.9542062551340119, 0.7032777244141506, 0.7094765577005897, 0.9911148292511744, 0.8088119725759307, 0.5963558986404165, 0.8963030849144367, 0.7028564893030299, 0.5471214823287858, 0.8349093441549753, 0.509691057593222, 0.6318590920083235, 0.8211043550611176, 0.7164522553063959, 0.6717902834384438, 0.5355902671415129, 0.699258237463372, 0.652628917356685, 0.6447898187415542, 0.5889918412665008, 0.9607744134816945, 0.6359062428455327, 0.5381225054556125, 0.57373941927679, 0.7173122508141283, 0.9262499750688205, 0.9383101398987965, 0.8230438315362372, 0.787793660151449, 0.653035090878457, 0.6130967274545098, 0.9772538866845804, 0.772706307310182, 0.819005525800877, 0.7757231122194441, 0.6031794591098517, 0.8311247603478757, 0.6765218781994606, 0.6841708571607495, 0.9753452455953161, 0.8309691917298156, 0.8725375799006203, 0.5703940424455096, 0.5540063200220862, 0.6527865124093798, 0.5337342034728587, 0.8117815116577678, 0.9550167185139931, 0.8770390503783543, 0.5143136495349674, 0.6787003454395043, 0.9614007380733276, 0.8315103798390611, 0.5245326995303812, 0.9994436169031523, 0.5486864967630318, 0.6203644885473881, 0.606674777812065, 0.6564324151959944, 0.504166729251281, 0.8505362771840104, 0.7804758120179323, 0.9654698308783509, 0.756658096757546, 0.5794476430403572, 0.5260082924193972, 0.6112848399173432, 0.7618979066522249, 0.6293087159944315, 0.7214017314199536, 0.8270208715614072, 0.9113196900763187, 0.9648292064909878, 0.5606234941985349, 0.6340351719350363, 0.9732591018480068, 0.8897994130313804, 0.9351020241884549, 0.65583416146778, 0.6211235272115655, 0.6597037778525139, 0.6749517158218001, 0.896757757742197, 0.5355886859191733, 0.6074674226539754, 0.6213514582849997, 0.7437197917593052, 0.6235568914098232, 0.6399886958658796, 0.939227693779089, 0.9270316618626291, 0.9291439101366372, 0.9557025510761928, 0.8147974583939901, 0.5923276020612612, 0.999595035852824, 0.5099088373539299, 0.87116753025024, 0.7947986235337248, 0.563742729105997, 0.6106153048718345, 0.9967067307288694, 0.6224618254001728, 0.7351352162272107, 0.5857756618419647, 0.9834309082007032, 0.9439409133547192, 0.6140276233770852, 0.6560947667347627, 0.6156278872694271, 0.6012299756913189, 0.681392304519596, 0.7869401938758124, 0.5629907094701492, 0.7568101724483454, 0.9251254558155968, 0.5088558966221266, 0.8636580902737734, 0.7123314586302552, 0.8610384629371721, 0.7023915677603568, 0.7288988806587191, 0.5711941591580457, 0.6562410923460718, 0.6613175513561534, 0.7509419487658712, 0.5959921108827846, 0.5929365508383213, 0.9445498730243833, 0.8125777582990523, 0.5199350279284312, 0.8502153155027456, 0.8012687213782678, 0.8113271202899925, 0.5045064511695003, 0.9613796651662159, 0.6681659898148353, 0.99992331508397, 0.5911629013711788, 0.5316179027121803, 0.6131700043224401, 0.7789827214866227, 0.7653157169016691, 0.5975373098308574, 0.6076757061859637, 0.5896971876292016, 0.7305486016806402, 0.5578487523844857, 0.6810725796226651, 0.8922376412417374, 0.9442862428562618, 0.5106627340230439, 0.6725826839753279, 0.8892593729037169, 0.7368902539921902, 0.6376355895282974, 0.5979921259860856, 0.9859513129550298, 0.773693444585019, 0.5304746187817324, 0.9602799054627641, 0.8151941032751575, 0.8459532066562276, 0.6760696807841078, 0.9246014834839844, 0.6733558153696195, 0.8738250306148442, 0.7413713582679672, 0.8001686477336286, 0.8435607415757411, 0.8552167745151505, 0.6757071595411434, 0.942437711509359, 0.9295235247378217, 0.7554466995312776, 0.7976953049957429, 0.8720021311099552, 0.9407577483220267, 0.9494854091093731, 0.9115659894037171, 0.7001373575127445, 0.7930308131647592, 0.8512913997191677, 0.7129273537822505, 0.6497680377505255, 0.712672193480819, 0.9105461666417038, 0.5828816563995343, 0.5515734598044071, 0.9580070046718345, 0.6339072053124757, 0.5657559654369937, 0.5397897184573497, 0.5660646374252282, 0.9055478838763424, 0.508842166811712, 0.6145701167959753, 0.5198078248326459, 0.5642087718015725, 0.9576270898104551, 0.9952660925150354, 0.9802154665399216, 0.6116760752072068, 0.8110774604827411, 0.8780414090208832, 0.626726950403383, 0.9345185433159127, 0.7996459189293363, 0.609242228250026, 0.5259297675076231, 0.6926290886224556, 0.6941459159295278, 0.5151665509152534, 0.8815079038363545, 0.679676378393909, 0.795506424929636, 0.8299008437808781, 0.8119048878041597, 0.6942386538075328, 0.6377753662456258, 0.9307668666305313, 0.7442731843412859, 0.8132339784577831, 0.7181268600702579, 0.9257923116649501, 0.8507630500283974, 0.6979668085777069, 0.9672708989481582, 0.5570336211049906, 0.875109437240686, 0.6215414291919343, 0.8404226619703224, 0.7149252019664856, 0.6896926693505898, 0.5876332624193432, 0.7494605800830192, 0.7386315052737976, 0.6732992711802102, 0.8295459862924477, 0.8100983662172927, 0.8366448208583006, 0.5248900258494873, 0.7216264626080331, 0.5560529240547234, 0.9897243065985741, 0.64394422585687, 0.5712612520059063, 0.9231581743881457, 0.8450797298808281, 0.9816955898167659, 0.8386727334284582, 0.9949868685743202, 0.8984974842246176, 0.5509946563213525, 0.767880941072206, 0.7907004555343129, 0.5028271564476137, 0.5104542578695976, 0.8622317284918124, 0.8522864145065281, 0.8287961548260215, 0.9399570024096995, 0.8594926403239275, 0.9666220869419058, 0.9788167670985031, 0.6029964317518582, 0.8080465937768647, 0.6647393977781904, 0.8164851793045222, 0.7723230301693627, 0.9734064753843868, 0.6915791895489178, 0.778822748560714, 0.5191113110339978, 0.9672240696424532, 0.579076585492516, 0.7197285084224676, 0.9761597867922283, 0.9882205957718722, 0.5175252653526765, 0.5315968949643667, 0.7733082758970568, 0.7513630164508476, 0.8008596877280569, 0.9188640440341065, 0.9563504921318, 0.7591006109709795, 0.8199433658694248, 0.7851610399909286, 0.7676232953743742, 0.7250216416358531, 0.9861210963303768, 0.9930542425691667, 0.6520455333283657, 0.8991921093790851, 0.69392878591642, 0.6514003646793846, 0.9386296180557596, 0.7300898341920805, 0.9419233183428737, 0.9847464468948486, 0.7287253703700598, 0.527856499219314, 0.7063960298680391, 0.962158188343964, 0.9246368280570287, 0.8231051092709328, 0.7501593561141928, 0.5978176177436059, 0.5821975942884745, 0.5478915412634462, 0.8593172051166726, 0.5102574609002737, 0.6733832400797137, 0.6063709540078333, 0.9885972467126509, 0.7595665252207381, 0.8562647905995584, 0.948629621434764, 0.5936017849061959, 0.7801426514929698, 0.8384105803189927, 0.5335156343625624, 0.6970404846978699, 0.6890324974785966, 0.6877663919107294, 0.965876861069157, 0.5678829464809221, 0.7807954226047039, 0.846127662816861, 0.9336740584564429, 0.8959512986218157, 0.6483743128488287, 0.8181536188097593, 0.8678711944943157, 0.7378040676752555, 0.5822859528589934, 0.7816039585237164, 0.985982780751008, 0.8865202517089242, 0.7605929817397385, 0.6002841014880742, 0.6365336073049026, 0.7162398798516785, 0.8087502516524965, 0.9999688379464782, 0.5983732069184438, 0.6555860567616214, 0.7619753134600021, 0.7418107657135959, 0.9192844990988716, 0.6167572509095103, 0.8125425756927618, 0.6199562385283188, 0.896828472722037, 0.9127201585758531, 0.9604039041838596, 0.6136176711094155, 0.9816130788761569, 0.7309405405377627, 0.7156524109550246, 0.8803362316641034, 0.7934764188776489, 0.9506874206543625, 0.8910152233001649, 0.8574622129890993, 0.5721435624119509, 0.5903613002758589, 0.7259378245587684, 0.6820786067142147, 0.6826831936400986, 0.6535099165814966, 0.7625757256862529, 0.7846322309513393, 0.6497259940989344, 0.7600110446355204, 0.5999128440836741, 0.5931979160762425, 0.556392755350051, 0.9275571132583968, 0.5294599556776205, 0.7829629659772802, 0.7932866204379782, 0.623739253897609, 0.7054550142753551, 0.9477513446624041, 0.8860286345376762, 0.5709508458614196, 0.514045707729424, 0.9229919138008575, 0.8581479624484709, 0.6269724743252093, 0.7085503988846023, 0.8626345705907731, 0.8963431265312121, 0.9507646484187274, 0.9316399719766315, 0.647860207884658, 0.6179131143440144, 0.7442821804679236, 0.7082249304840375, 0.9567287783013225, 0.675981334789377, 0.781299411180788, 0.6342971925371927, 0.9466062839105609, 0.841109484384197, 0.8296958855220644, 0.9998650783911991, 0.7169368911403378, 0.8295235980246638, 0.787829201192171, 0.6694234502830729, 0.5073148455469727, 0.7176634575359527, 0.8881711035697978, 0.9197106930278498, 0.6664060175975072, 0.8066285640307895, 0.8773027286372209, 0.9922287398201635, 0.8287333093042518, 0.8227982403713782, 0.9685302901670707, 0.9859443773829113, 0.6985194936894246, 0.679648554225873, 0.5068509761573345, 0.6333824841601025, 0.7871121343089584, 0.9880982195750392, 0.9684730843352867, 0.7564213870076804, 0.7633743589690825, 0.795884089871518, 0.5141470395416863, 0.9007000365816745, 0.6688409253783241, 0.837887717229672, 0.6395846000978328, 0.9568551524697061, 0.8434574951675731, 0.6875153983398083, 0.6414029409959047, 0.6038777999826581, 0.5010834841612832, 0.5805063184446517, 0.829766048978573, 0.711629415320778, 0.6048627086963635, 0.7027477526939099, 0.915613443593106, 0.6564804376566193, 0.9987578280798457, 0.6981097933186742, 0.893226346678825, 0.6401675201287875, 0.7115063019808462, 0.537843238747173, 0.933603214879884, 0.6573382773034375, 0.5373221198548757, 0.860995230194556, 0.9583380175616604, 0.610753783466415, 0.794887470274253, 0.5869899291712, 0.5189304826312122, 0.612353037064308, 0.6267263610580831, 0.5148033537724512, 0.6030056014597607, 0.8846958291917535, 0.7625353487649108, 0.9741775870991407, 0.9038606386350565, 0.6425355091504246, 0.8839278723699842, 0.5088733125466043, 0.5156527695835464, 0.8007316017064678, 0.6637045689737152, 0.7428584498518269, 0.9779621475424807, 0.5925284572675669, 0.5205965189912436, 0.7079385989428195, 0.5015801555557517, 0.543428561903573, 0.6069000480946702, 0.6243230805592559, 0.667091538104934, 0.941290710816796, 0.6159798815315352, 0.954842605286748, 0.7576111391738571, 0.7927637529397126, 0.6488814584824705, 0.6509919299002096, 0.5632531229435196, 0.6498920922657404, 0.59713457096496, 0.6778654295364857, 0.9361775621975053, 0.8528492642866714, 0.8768242439101452, 0.8715421389532245, 0.839264488883528, 0.8237917369755947, 0.5285430928469668, 0.6912566439663038, 0.9803365530704304, 0.7470586001817926, 0.7160302667892386, 0.5238000617717732, 0.7486106244118408, 0.9730794246026769, 0.5312922972211402, 0.6038257017520863, 0.7440719176511128, 0.6650780571022741, 0.8561921669819912, 0.8559360444980134, 0.6301168604697023, 0.5764311576933374, 0.8981768429754817, 0.8739646285516802, 0.8665867788909816, 0.6154595015786638, 0.690219866414547, 0.9573850236822363, 0.9782182302417328, 0.6034851605813099, 0.7569466819585636, 0.9766958992377754, 0.9872338108136787, 0.5006139187235285, 0.6648296925591617, 0.732929095194931, 0.9556182870714092, 0.8362115668978192, 0.6811261807045096, 0.6113686698405023, 0.6466644316408443, 0.7598171176170628, 0.673935059410541, 0.5407853356259221, 0.7148847112999794, 0.8321125006252645, 0.9631110356858544, 0.6952078097714165, 0.8466482293895381, 0.7594360209524259, 0.7661878763256322, 0.5721668194803199, 0.6426124799336119, 0.6549125693567442, 0.7052713030750579, 0.5184842530956213, 0.6144592506422668, 0.7429314581418398, 0.8082859835488545, 0.6304376907271492, 0.5611194071390291, 0.8024036856973422, 0.5341652176438088, 0.8684951510568313, 0.8528427530123796, 0.710433240174004, 0.806346715090874, 0.7404823555836243, 0.9561296924826609, 0.6261562847387983, 0.5209738073732846, 0.5739155740417758, 0.9632949627590133, 0.6162163571603283, 0.6545534536327764, 0.8425144596128389, 0.8390513901212582, 0.744888828121435, 0.6051732694833667, 0.9084676800164394, 0.9888763189521914, 0.640145069638719, 0.730494773349416, 0.5253601966586081, 0.5514945808101812, 0.8666640795899436, 0.9297602315811779, 0.7428181230890556, 0.5703935830880595, 0.9014176094311497, 0.6061217058055075, 0.6278506435994391, 0.8163815226052573, 0.6889134072608052, 0.5400548369524687, 0.8282666631219513, 0.5880377651535335, 0.853816420466475, 0.9296589963527806, 0.5266842364784208, 0.7317729551053529, 0.9405513419004361, 0.8980164074846513, 0.6584149850467172, 0.9195311491407725, 0.60770059761898, 0.9421973273849871, 0.803753003883942, 0.9985897437557151, 0.7220251516282131, 0.815952993014843, 0.5289481479798313, 0.9549569969315107, 0.5620542082505698, 0.5435459191069268, 0.6234890137219027, 0.5752405744483085, 0.9902320996050893, 0.8184238288428174, 0.6158113918306543, 0.8431249962851923, 0.8224307848280049, 0.5596481913826776, 0.7816789781608282, 0.7428593672186475, 0.7269807943395413, 0.6582499191003099, 0.6989127769894408, 0.7799127624736685, 0.8733961863689795, 0.8869506569374948, 0.7669348944149805, 0.8740099389465553, 0.8062534714786216, 0.9387298109994338, 0.7001326845422893, 0.8044304098736909, 0.874344884560849, 0.5538912201624553, 0.6936083996987166, 0.6038819102996571, 0.695988390909462, 0.8636686008723837, 0.749560454706685, 0.9729824935919389, 0.9809319386744926, 0.7742596327591266, 0.9371774078901836, 0.7540708130468206, 0.9190128775241031, 0.8187826212396251, 0.8735878571237444, 0.6554105119577223, 0.7375831725427755, 0.500136305082148, 0.7427823306932386, 0.6639922206393054, 0.7393677876478292, 0.7318143350957739, 0.5550564644164308, 0.9129427770921303, 0.812792957330471, 0.8854058811623595, 0.6752954663179441, 0.8384856867857274, 0.6079593234453846, 0.7426390722140698, 0.5615186472885404, 0.5347630289472525, 0.7939604283190963, 0.6985392107114115, 0.9196773332074363, 0.6278992972795305, 0.772088050527053, 0.8120508797276118, 0.8316765876230807, 0.8157910566128452, 0.6286419744715107, 0.7850278336988046, 0.6365567840672637, 0.9691785524553735, 0.9231916198030645, 0.6733465839476882, 0.7376365595275411, 0.6322321299434972, 0.6536412391134725, 0.5308223128410041, 0.6240916688994838, 0.5614416488813716, 0.5010691469864805, 0.8482285142894174, 0.7731777052344067, 0.9633555785287036, 0.8499403396048967, 0.5164438943867853, 0.9749266516315327, 0.7321649339217833, 0.8966328779542848, 0.7130299475157968, 0.8789187924771582, 0.7042928550692854, 0.6480467667003272, 0.636266357454863, 0.5252420263939737, 0.8901044016597472, 0.9259798560396302, 0.5959367024797151, 0.6461349884378205, 0.8297399730645907, 0.858965872944648, 0.6299810000993376, 0.7999581172969732, 0.7229689607472871, 0.8196811464151625, 0.9097290581118774, 0.8890654514232876, 0.6625177134589275, 0.5595575503713514, 0.8261300041299529, 0.634174526963699, 0.8895498263144784, 0.9401055420060537, 0.7603678484736909, 0.9150345504432511, 0.7405726644631989, 0.6392768492946579, 0.6064087547441401, 0.9411300020333155, 0.9446206482334409, 0.5823272148239621, 0.7513812399676306, 0.5892422227550413, 0.9576465576739248, 0.6789718381230848, 0.7352467245640498, 0.5667483119203107, 0.6318936808701536, 0.9304403872644214, 0.6041212204528311, 0.7987671877399782, 0.9778794288955968, 0.682442546732026, 0.8420617739335358, 0.5371780551188021, 0.9136576623243002, 0.843949203211081, 0.5769594730231674, 0.6621280764177297, 0.9288223963978978, 0.8580919596263605, 0.528799993460255, 0.8350338345484752, 0.7281087967967671, 0.8652021977189083, 0.7717683016152274, 0.696054697877645, 0.7713327029471053, 0.5050909578266032, 0.9737176146575302, 0.5454242418397626, 0.5003370885184089, 0.7143343887968916, 0.6588038751177427, 0.8431824674823907, 0.5983969877071773, 0.8355695718734302, 0.9763810625870184, 0.6559356717779375, 0.7973520297712401, 0.6891368616489836, 0.9949032093143093, 0.6293651482104301, 0.5542480088118293, 0.992602666476686, 0.805862898838582, 0.706804949542578, 0.678107934699234, 0.8865445389852926, 0.7365810121108958, 0.6638109479601402, 0.971915304402312, 0.8691990699043426, 0.866243588900945, 0.5347404808091041, 0.8027647676672658, 0.644654262099257, 0.6358856622385858, 0.6434637864150393, 0.9867439677213468, 0.8617830797210578, 0.7527128373627366, 0.7467834896594912, 0.8355259209746481, 0.6694384958676627, 0.8492840342398571, 0.8752000624028242, 0.8904470484836325, 0.8977191340662543, 0.7317669961065099, 0.8164504355541076, 0.51085587805728, 0.8512505810328967, 0.9907329304765682, 0.8478072020439231, 0.5628764263381946, 0.645203204931839, 0.8734206429169019, 0.8882857138830688, 0.7160446904420968, 0.6494721638466758, 0.6997972842935778, 0.8591288901002546, 0.914870827787486, 0.690242679860722, 0.5628517440647269, 0.6692816701688913, 0.6257996366386281, 0.8197989461236104, 0.7901603116987304, 0.6537812838449995, 0.7334918218109902, 0.5070796424396797, 0.5687660337261718, 0.5532144502641101, 0.5383562214579919, 0.6340883176141318, 0.6268624147706312, 0.9769214413566973, 0.5855060424825895, 0.9641928597033149, 0.5451893264384549, 0.9610314455154265, 0.9121099010698233, 0.5102796332610483, 0.9442442249656418, 0.945547198985586, 0.7423091068090544, 0.5985071798785466, 0.7119224925954971, 0.5211692585633351, 0.7080958813499003, 0.8277607626922819, 0.6160294325999871, 0.5584329026942159, 0.707518176790394, 0.862569195606254, 0.9029898085303101, 0.8912393606274218, 0.5377616686206848, 0.9026261547288867, 0.5177568219173307, 0.8672035942099798, 0.7962247982742086, 0.6500238620637071, 0.676925107503715, 0.5001602860478125, 0.5347604384454336, 0.8100930830264373, 0.8327004760740084, 0.7091550007227103, 0.6341060112837151, 0.893218857063665, 0.7093982920905039, 0.9770563878845673, 0.9569790223608372, 0.7247122931465393, 0.5494016263730406, 0.9806247120905313, 0.8264896942556175, 0.7351190834943998, 0.9841948980404203, 0.596388782558612, 0.9115224940878784, 0.8888070614937137, 0.6786644275255902, 0.5828137759184078, 0.5307300347486201, 0.7294695196410432, 0.9514288368470355, 0.9915409079426345, 0.8319499814741694, 0.8777609795361113, 0.5556064815230366, 0.5772004505126527, 0.7387609939329363, 0.6227046843027044, 0.6747061860466425, 0.7615001341058252, 0.6221814215528232, 0.6152706052962829, 0.8951693456605422, 0.5679851622669645, 0.5367091712296752, 0.7349987403453855, 0.9691276715099155, 0.5781078496851514, 0.7288921545599456, 0.9851365104798094, 0.8776906894820413, 0.9851106455251981, 0.9115109324907104, 0.8439443547174137, 0.6978627508340776, 0.66919239652127, 0.9119883399473107, 0.9615346513277183, 0.733405189202502, 0.8129888689586017, 0.6082963590461414, 0.70416474451598, 0.8779526303011622, 0.8090626825337762, 0.9681551510829444, 0.6358953312801868, 0.8096571690079366, 0.5811684448488653, 0.8811760494433664, 0.6226175327688295, 0.5077305032135955, 0.6174848465066316, 0.7640615045376362, 0.9909339349662583, 0.7077095700729439, 0.5829496411470025, 0.6281409882982008, 0.9402131508934595, 0.7681766736327822, 0.9584370536077542, 0.6850419524809752, 0.7756437694934002, 0.7899256205906731, 0.8208738220082304, 0.5994202288554482, 0.9595585683554746, 0.992752600662973, 0.5205235860356678, 0.8739182553681382, 0.9823946487367576, 0.8488057472018795, 0.6248025201890459, 0.7558672127242556, 0.539519510738877, 0.5369938836916901, 0.7510394182995093, 0.5195534057624507, 0.8004932359826269, 0.5479758695593224, 0.607471923949816, 0.6649394315405774, 0.7296687440285412, 0.5766039152484579, 0.7507131702703056, 0.7084230060366292, 0.9111921691486761, 0.9622916216543038, 0.9973476774118444, 0.9133997314114104, 0.6519389812624785, 0.6755489230708076, 0.7517376231623546, 0.8291270506942291, 0.5244278164436991, 0.5979802977423709, 0.7359310169163924, 0.9389136619775839, 0.681009753485869, 0.8566049747804507, 0.6919231942465074, 0.9508962378119581, 0.8254515314755195, 0.6334021615671773, 0.9108392418712526, 0.8772462999955091, 0.6540626972709668, 0.8290025129514706, 0.9733202855585434, 0.9235197505001538, 0.766608349145607, 0.5117187860745325, 0.9053912205823398, 0.6154901104907591, 0.8123354955789461, 0.5880561053691526, 0.8250215575827987, 0.5291411636751577, 0.5011231435045741, 0.7287292608631388, 0.964877868400081, 0.558208249354319, 0.6469510541288659, 0.6838131083664785, 0.5590814794898595, 0.8384063687566672, 0.8576807555431831, 0.6218050007380436, 0.6968915649729455, 0.6744874980296007, 0.6192680870424192, 0.7307055133290061, 0.8991865595311536, 0.8748910086402089, 0.9555311209587676, 0.5683034631846087, 0.5860504458821638, 0.6204381747620669, 0.8826860193199031, 0.5326363055919, 0.5480670511082639, 0.6458316628469833, 0.8539570695369254, 0.8863962661824858, 0.6649205735715139, 0.6843745462620316, 0.6569926999461771, 0.7896404154190624, 0.6627623194315974, 0.6585690728544666, 0.7015013320734744, 0.5178636138586701, 0.8547716484278944, 0.6401319818273937, 0.5017202943726504, 0.9469577040851241, 0.9473564147139866, 0.5690104234930988, 0.5525494299091807, 0.9309665061087835, 0.5699795564539238, 0.5737371740027457, 0.7403598488470042, 0.9281582729993451, 0.8936244747382066, 0.7001988908615264, 0.739245736100387, 0.9942379729997297, 0.8696240941271344, 0.5087610651249264, 0.6033119080317888, 0.522222603744886, 0.6926988151789488, 0.7880805857001926, 0.5488719699040034, 0.7280075819579002, 0.9521342969252555, 0.7126330553104693, 0.8111506581227084, 0.529471305365542, 0.7232303667498362, 0.6447969375983489, 0.6121330495415666, 0.6046765155967233, 0.5641619990420603, 0.5861118103868079, 0.7878129863018559, 0.7731866001849048, 0.911995468245386, 0.5106521978016281, 0.8727815433562931, 0.8245065800118885, 0.5477604366697817, 0.6376485883696491, 0.7920019696452727, 0.904686011600746, 0.7548079284812386, 0.7550498207731016, 0.8832047280908342, 0.6964731571351368, 0.5602730119685617, 0.809783920577039, 0.7888655582647119, 0.7961589081801053, 0.9855148697723917, 0.5344029961974528, 0.6223894398160956, 0.8110878502556256, 0.5784516085144379, 0.9312579335561353, 0.6326962059902655, 0.8000527486069372, 0.8785100868210692, 0.7793121049684841, 0.5167701432123207, 0.5456701809973528, 0.7833665619478412, 0.589517937260085, 0.6589491250978616, 0.6007281238879403, 0.5788155182757708, 0.9743059094786337, 0.8297666113732907, 0.8238139134459176, 0.7560192584139649, 0.8680719607567813, 0.5738691358184402, 0.797845160242727, 0.5030260734634938, 0.8946295245617887, 0.8676581062901723, 0.7577164135850365, 0.9328706864466672, 0.7614225131985601, 0.7409113124185289, 0.7270673356732585, 0.6553272279369546, 0.6759101121647425, 0.7341458444282899, 0.591491351651094, 0.6346377956514164, 0.902039710591038, 0.5847569466795541, 0.810643274153702, 0.7248794972226036, 0.9851910020167449, 0.974108233209174, 0.8996735639873363, 0.7189550642111113, 0.6726945594544077, 0.7975859987026017, 0.7539550624245716, 0.6025324404677534, 0.7458109797190549, 0.5340524773251214, 0.5902008441213525, 0.7398141283946909, 0.6436788439680411, 0.8244833951331823, 0.893496387726715, 0.521131207672267, 0.9139404095824555, 0.9310741290219822, 0.5366131388213402, 0.5158462214387398, 0.6704844567644836, 0.5719822989095462, 0.6894917465592058, 0.6490947606206057, 0.592413216854905, 0.7494926503484484, 0.6507121894024441, 0.9319204001161614, 0.8948947906617349, 0.5994756507589505, 0.7573880497091189, 0.6607247718957361, 0.5509934377219222, 0.7838309300071689, 0.6699671658330989, 0.6296472892809386, 0.767883382469432, 0.7005668694235145, 0.5198222474844474, 0.7007157134308544, 0.6789868269294864, 0.609883919267308, 0.8788058881600811, 0.6727180026940404, 0.9890438909716195, 0.8714066234859259, 0.6721567709424561, 0.6129041285102618, 0.6912101230165019, 0.7025173477803943, 0.6859971538599936, 0.8337005068494121, 0.8426179484342124, 0.9401605683571224, 0.8355126312065666, 0.8735604276279149, 0.9230516920580657, 0.546723715425713, 0.7611571853473365, 0.9431780278831889, 0.7973272926594916, 0.5929137528245966, 0.6928505324774287, 0.7511457761157865, 0.9715687802605462, 0.933003242419588, 0.8333725193125672, 0.8444465037613154, 0.9172132215427706, 0.7583646671552786, 0.9301999998391037, 0.7118534312749725, 0.7836569756989453, 0.9809313751274604, 0.6217033637601092, 0.6043074584483898, 0.8026142789943584, 0.9470545429076338, 0.8304762555333711, 0.8910631637280797, 0.9144658960331373, 0.6564866623389775, 0.5285901784788218, 0.9056605591193237, 0.6124212363644685, 0.8537639482649876, 0.7285721684864821, 0.8842692016844698, 0.6038003635943747, 0.6211254663070214, 0.62461564160265, 0.6293820049961845, 0.691845330661145, 0.8515086552358622, 0.7780912197423193, 0.7814521495888558, 0.8000082827972712, 0.7406678566977294, 0.9641287997403938, 0.533977216085709, 0.5655906676035005, 0.8201337406377791, 0.5571549819304618, 0.6785951426163155, 0.7506452982958713, 0.5952286797650543, 0.8311097964236339, 0.7393984962961864, 0.7476028785488815, 0.6401746434527135, 0.9734687036165403, 0.8788543926784247, 0.812946164672053, 0.8211899683752848, 0.6831601110174317, 0.8521375470021814, 0.6699133871306807, 0.6015975500351495, 0.5741381843940536, 0.7827599829261702, 0.9140465014253147, 0.8775078599555002, 0.8520776624523783, 0.7689255902189925, 0.5663302730943721, 0.9532096581477901, 0.7760844314498458, 0.6377690687602495, 0.6576529270362603, 0.6204421692081219, 0.9950660982045607, 0.9646988415099238, 0.6585835170757519, 0.8313732255014408, 0.6062471098949472, 0.6129468391622096, 0.5062754686551614, 0.5971432009638766, 0.9140514740082983, 0.511645950320906, 0.8447993936991479, 0.9576141581152966, 0.7944210183734988, 0.9548954465073225, 0.7608210816875915, 0.6017465679700761, 0.6845316138289886, 0.985756212146776, 0.749358343655223, 0.6140922672387797, 0.8042978528468008, 0.8730212188556037, 0.5438472118360927, 0.7893720110008702, 0.5977875663266969, 0.8753466687559124, 0.8336441810156066, 0.8161556831539533, 0.8770809962564321, 0.5841942679825275, 0.6736506688833577, 0.5833248592577442, 0.8596592033054482, 0.6686245841606062, 0.8631938635016589, 0.6988782333493843, 0.7545079887059265, 0.8182284179772162, 0.7723901010220819, 0.6104173712596812, 0.513144784230431, 0.6674059486268197, 0.6640266113815857, 0.5435501695429124, 0.5214832591302988, 0.7121106740968643, 0.7151595462274862, 0.9430530402367194, 0.9854655780439668, 0.7565306675227566, 0.9823018815334774, 0.5454165126941195, 0.6446929562650395, 0.940047463917674, 0.6522357013700826, 0.7293320277407145, 0.6264563771790139, 0.7086699277911618, 0.8403334492292648, 0.6063252551923183, 0.5220520083706571, 0.5628259381432527, 0.7717329992641586, 0.8271115354078611, 0.8566459636530683, 0.5322264945598738, 0.511576403189071, 0.8981709769381252, 0.5442882257355026, 0.811267629725817, 0.5991611679514584, 0.885032670334714, 0.929592333280562, 0.9884437000422939, 0.6172494021957299, 0.7114240808428248, 0.6404108792017926, 0.7994269012730311, 0.5329259160712951, 0.6096805505599459, 0.7500666537978162, 0.6648695987675921, 0.6912324740533308, 0.7173304359493472, 0.6276658721263764, 0.8583812723539853, 0.556377241564924, 0.7064103791674115, 0.9304597346113401, 0.7436964252800466, 0.8888532025170692, 0.6882877367706828, 0.832479694834632, 0.814155770605033, 0.8952464379881295, 0.6569693820134099, 0.7064498285214956, 0.5314190007483596, 0.8093403715961156, 0.7576800254118627, 0.7683770295868537, 0.8972825844655965, 0.5222444820276411, 0.9977973249421015, 0.8371736975268154, 0.9370827059876226, 0.5187759761578419, 0.8845625356757731, 0.6963849644298458, 0.8905175118462972, 0.9447710287995589, 0.776850373343386, 0.8602182449042017, 0.9992757547629828, 0.5882837026417587, 0.8811690048293099, 0.6795257088449153, 0.8496397912066563, 0.9132318314758018, 0.6022720919898101, 0.5517327610529823, 0.9659123473269101, 0.7086795034330787, 0.994827106009856, 0.7560570353181948, 0.7344813563806722, 0.5477084910216335, 0.7201459683634714, 0.6439689710446219, 0.5772532689225901, 0.747255684844209, 0.9383134851322248, 0.698418439682315, 0.5502705700306723, 0.593859284395911, 0.5879262571452352, 0.9946714046060974, 0.9381316507326001, 0.8076599089304282, 0.5822218828005572, 0.7907534194089236, 0.6416844863765928, 0.6468710632332879, 0.7668697864625839, 0.5027880695206164, 0.8050208281664886, 0.5866100990139134, 0.7149644064869708, 0.952436169769745, 0.8726017491469398, 0.7898793204017253, 0.6132775053825525, 0.801329505000627, 0.9984717929253555, 0.6518992836902469, 0.5151023929653871, 0.8578411319596294, 0.7649488993287454, 0.9190656384151333, 0.7954555477197737, 0.7318159856067317, 0.5866201285279053, 0.5043208422797141, 0.6260411067125626, 0.857818490540313, 0.6610848275432177, 0.6156646124125897, 0.811314174621945, 0.9202722647922931, 0.7758621451793986, 0.7317514956219102, 0.6332175991587932, 0.9917157803343769, 0.6738901423915205, 0.6222763413953241, 0.6094570722102552, 0.6417503586223894, 0.7974143366973815, 0.734048320976953, 0.5679081124589678, 0.8369620648522222, 0.7503951140990712, 0.9838183332421067, 0.6804861391475056, 0.8697702428162489, 0.6635056995176782, 0.6896033603687493, 0.737271956071353, 0.9353634008755691, 0.6902913325034484, 0.706362916830907, 0.6424573739694506, 0.7111087878244919, 0.9012532717635633, 0.9460248982600084, 0.600692414735801, 0.8480151730451873, 0.5052542943735205, 0.8052474333048736, 0.9617645405353825, 0.9968101081309995, 0.6361059535196847, 0.7702358790266166, 0.6968501936237239, 0.7162463654945574, 0.5159768587341408, 0.9502418902501633, 0.5049998478556017, 0.7753614472140964, 0.7113590992032635, 0.9022231429358443, 0.6254288322719112, 0.6982108807150662, 0.6443911540416636, 0.6115671724065238, 0.5485694428212873, 0.5658394673493838, 0.955059588775337, 0.9521353301279767, 0.6952891727984243, 0.5195181849492996, 0.5753167907083726, 0.5505116667951915, 0.752858422838375, 0.6038004668421002, 0.8702614313758725, 0.8048372023627135, 0.6687225291889185, 0.7242700104042954, 0.507256080386608, 0.8085976168301041, 0.9630641438931637, 0.8069389383579983, 0.7134944229323898, 0.771995872272895, 0.5719707750900784, 0.9954606934114352, 0.874658615197935, 0.7141413237800871, 0.8481821343290099, 0.9010454700727808, 0.7847878510755243, 0.5448042812261158, 0.5498382353869209, 0.6703533776396711, 0.8802344278281974, 0.5604695162579902, 0.7069035642804944, 0.7054006415316336, 0.6003612382162696, 0.56877019820303, 0.9228178381095244, 0.9280384150708374, 0.734600435599411, 0.8728319747103046, 0.852462569062576, 0.8859846142785309, 0.774482649499283, 0.800256664530171, 0.5248378117214196, 0.9822829396742572, 0.941591937083508, 0.931749519175397, 0.6924379191312665, 0.992266718008648, 0.6717750460142807, 0.7935321118206136, 0.972801857319729, 0.6327338170613819, 0.9352170207010254, 0.5137983454558295, 0.6193534434458468, 0.933106085232762, 0.8761060385098316, 0.5871184198287199, 0.8712832893069783, 0.7924886019471926, 0.6742820320852072, 0.9035992613886799, 0.7834963721862296, 0.5264481433895223, 0.6552172285338351, 0.7277534711083852, 0.6136924187842296, 0.5519507579538909, 0.7601748694101653, 0.8046541864581034, 0.9953304091555865, 0.8704570470659281, 0.6432304689707659, 0.7669900773189666, 0.8411142498848904, 0.5014376597614467, 0.7194204258106359, 0.9717587420954501, 0.6798473494545605, 0.997397143507001, 0.6289458528429324, 0.7643120105944337, 0.9405479691679692, 0.6271541616409109, 0.6767622081512494, 0.7078204745830101, 0.5155983829427138, 0.7106001940099957, 0.5579170629398684, 0.6397356265598313, 0.8290192699804146, 0.8815700125156098, 0.7155344158238228, 0.6209650713742187, 0.513099494209309, 0.6842083125988687, 0.5971583228930772, 0.5640279074482499, 0.9960623164849151, 0.774739845775445, 0.5795034680209707, 0.7415071132665714, 0.7393571937498428, 0.7694482161130864, 0.8971266341825714, 0.6339655161597846, 0.6098205841050524, 0.6598430485767144, 0.7284833883734915, 0.8603285869242543, 0.8488685424483817, 0.6763917042506463, 0.94255800991985, 0.7388471263424186, 0.6751889074750103, 0.5930744157158565, 0.791413412891262, 0.9378551651165934, 0.9043971983578023, 0.9232728145207161, 0.9886159856799822, 0.9877101835653972, 0.8801033041421027, 0.884713735519723, 0.5498905891642747, 0.8290671136078394, 0.7833152001201097, 0.593551328460068, 0.5852044143286304, 0.8586174918768741, 0.6328057207678117, 0.8665803043638528, 0.8958670205466313, 0.9243440407355998, 0.8913858198587992, 0.9804682786003709, 0.757284173650357, 0.6832023185171701, 0.7056031140197465, 0.9541435298181382, 0.7076482931079615, 0.8231074606775108, 0.6081016360801115, 0.9220000661261873, 0.6497584196012407, 0.9076446465046566, 0.506712345795324, 0.8828210012733082, 0.9270092654221935, 0.9845468261847212, 0.9982215333064233, 0.5762008607518241, 0.7307506211964312, 0.7401013283912827, 0.9953077104411308, 0.6959550083181425, 0.6285635230225128, 0.8608368173985981, 0.762574993024557, 0.7239110658874541, 0.8649317728861102, 0.8064144899476362, 0.743579724749611, 0.8344453617410557, 0.5681445276241587, 0.7474695163277727, 0.6284808954348324, 0.6477104736157655, 0.9033246738437665, 0.7673336774031141, 0.7623637023489318, 0.9798317674467718, 0.803553809586668, 0.8442038077345968, 0.7242766417873532, 0.5488776110834923, 0.5356784660126767, 0.7200981448016628, 0.5494741912335747, 0.7404711454417123, 0.7431225452625256, 0.6498228678691853, 0.5438309953747307, 0.7190916994191453, 0.914628194481282, 0.5494178747937316, 0.9563847631490736, 0.691164982254358, 0.8663682776313661, 0.7409604533913842, 0.6664792692394452, 0.8641627625249844, 0.90255468337361, 0.7686908388140774, 0.6520868587210613, 0.9203218401664451, 0.594800866755832, 0.6433402778240802, 0.8115124770849634, 0.5828459071563528, 0.573653684850564, 0.6499900586803776, 0.9013053657120507, 0.9869232554462986, 0.9319506614512986, 0.7920337682167018, 0.9403599270531651, 0.7787610171338802, 0.5118256967029646, 0.6320747180890653, 0.6275229548651646, 0.8790611419979626, 0.9809713721857212, 0.9996038358472761, 0.9784365815288617, 0.8727323131711523, 0.5145785613303144, 0.5950211819850045, 0.920971951448894, 0.5272778301799984, 0.7138393750921139, 0.6358123330058798, 0.9306027595831927, 0.6863589840351553, 0.8464376293905752, 0.557514281896568, 0.9522924333836751, 0.5612768574453209, 0.6528665404227034, 0.6627837869272788, 0.9951433225088457, 0.6454881295597013, 0.5967280114463612, 0.8288985287304795, 0.6864986466068744, 0.5783965606168864, 0.8191421997499844, 0.8786306292170589, 0.5416505101535416, 0.6712491640186065, 0.552282807736536, 0.7630313349609714, 0.576853026377258, 0.7333564291553637, 0.5417156631429656, 0.63256676780218, 0.6352536574914722, 0.994372229896235, 0.9802749832628741, 0.7630580869466501, 0.7652927687157078, 0.7449316521275671, 0.8383520729857618, 0.9849912942439782, 0.6139117540703737, 0.9068107080413907, 0.7018180943843606, 0.5470626960100344, 0.6579404681866436, 0.5184910237426579, 0.5419710123677561, 0.5680180807794475, 0.9575525238472273, 0.7072167526754363, 0.5162000903147967, 0.5147663059983034, 0.7918111421797736, 0.6155268961079412, 0.7957558225048438, 0.6700645333162245, 0.7280033789385063, 0.5168605037525131, 0.9998151879293941, 0.9452268341075435, 0.6268747501172283, 0.9402733179872005, 0.8946449339129509, 0.8978697911345911, 0.9360510032343891, 0.8701736333476526, 0.874072777570924, 0.6136812785256378, 0.8586279130215053, 0.6656387431962179, 0.9142690240332, 0.6466635850610858, 0.8924380463316528, 0.915963627693876, 0.5245105994684633, 0.7725055574101434, 0.7690581945717339, 0.6488934239159257, 0.648024852729062, 0.8692716035437238, 0.8786743409638607, 0.7025485408592982, 0.6909628491557305, 0.622890216725564, 0.6734918534415538, 0.5037373690416687, 0.9683001490580971, 0.8422105522609251, 0.6775853277293065, 0.9346680743078515, 0.6260441382483615, 0.9121063193926471, 0.5436223170900559, 0.5490004247893119, 0.6131474731220318, 0.9824621354336116, 0.8209459368215128, 0.6974184129268384, 0.6258827273849996, 0.6459863048929853, 0.8132374685921049, 0.5480062208432432, 0.70100893705258, 0.9379434123453034, 0.7362037571141533, 0.6674943278198262, 0.7840476034115151, 0.5942470731607243, 0.5856740870857282, 0.6660293976835616, 0.9154754941513925, 0.7625841913709235, 0.7747589550549828, 0.8379285029381317, 0.8078564474358878, 0.9338170140121751, 0.5838236625227486, 0.7250962214542963, 0.8549653339225038, 0.8233092917608765, 0.5138162631465917, 0.9647265657588988, 0.6835843642586836, 0.713298927586081, 0.762639447385744, 0.8493553881843443, 0.5511624037673113, 0.6867170400112935, 0.8427459971052966, 0.9916627784934482, 0.6565896395854078, 0.7185500607377142, 0.7399655357818424, 0.8179022853011707, 0.899350761774695, 0.8634055161853929, 0.926205292914328, 0.9473101713118337, 0.7450869900607254, 0.6531565219999991, 0.7692778464926617, 0.8830819780390415, 0.8049592573811573, 0.7403057334337797, 0.6166270246627454, 0.5510604759406365, 0.7697418848798305, 0.9372291595350095, 0.9751738248668389, 0.7676062530422774, 0.8752887827577759, 0.9975539310522348, 0.5044621450870546, 0.9761074660994944, 0.7885665793867369, 0.95471841962632, 0.9638525125885904, 0.622102046474585, 0.9843707515663094, 0.579640500091065, 0.8859735773357109, 0.6497765157948854, 0.8238704251644977, 0.6674475038816292, 0.7265625923410413, 0.8739619973018605, 0.9533712630111223, 0.6804370061165604, 0.9037349351858139, 0.7956765195106414, 0.6666476798391975, 0.7695720557790668, 0.9272900746218908, 0.7261823249183474, 0.7530365116195104, 0.5056130246059318, 0.814293870578772, 0.8874411703002739, 0.9015828205795823, 0.7228725661309676, 0.8235495995302731, 0.9060686318567721, 0.7271476957161803, 0.5450808997354805, 0.6683353200471662, 0.9157206173802226, 0.8472875583863932, 0.8855210902162864, 0.9675494236561153, 0.6006759991512969, 0.6945616792480096, 0.8357333498617641, 0.7371350169231452, 0.516195860431026, 0.7679863244340649, 0.6180797837520927, 0.5469497230202351, 0.9668423059666816, 0.5507999889808586, 0.5294535191292576, 0.973947074321516, 0.6776823489418908, 0.6453632338187232, 0.9472745458969964, 0.7165312760347526, 0.7033806164089496, 0.9850807585427956, 0.8502367208424368, 0.5458727201889731, 0.6332830424470608, 0.6520449402653221, 0.8648252450206746, 0.8410969055552047, 0.7668220660209317, 0.5112011915430527, 0.5076307177698981, 0.9485558454224725, 0.9629211153955535, 0.6787320753538462, 0.9562403457019842, 0.5025541259718065, 0.5023818082415273, 0.7395832314975681, 0.9516248703289054, 0.9195489671690602, 0.6225482349012361, 0.6922037071866409, 0.9511792560865622, 0.8215477800345742, 0.5172435174370169, 0.7093935556908132, 0.7541452344706974, 0.9574777504467152, 0.7455738728616956, 0.8828280427806025, 0.5772287941959394, 0.5993196803107559, 0.901933421452217, 0.8160647262845722, 0.8484946757601572, 0.7577378286097513, 0.5327045123889738, 0.5309439642424345, 0.7938523184009509, 0.9165328180746277, 0.7456677005628716, 0.761600542381998, 0.5476807198773874, 0.8173086152146922, 0.7228267446248267, 0.9955644312293095, 0.8491996922297684, 0.5676778344612463, 0.9077779391927285, 0.9326034454763508, 0.9967669633126147, 0.7620167486385084, 0.5865261314237648, 0.9208479178418996, 0.900430852912351, 0.9908766838628598, 0.7879246376911699, 0.6703332003524107, 0.52813538312383, 0.9365780170174189, 0.8398814543256303, 0.84957729649461, 0.8537494171991131, 0.7492598910131985, 0.5286038491946603, 0.6515976082738377, 0.5357571710982243, 0.9604314900177271, 0.6566374003047449, 0.6633382495971432, 0.7583060114276385, 0.5369557166404788, 0.5748201334923246, 0.7730986061871377, 0.9978255489351351, 0.7321019591129233, 0.738291218428144, 0.5781274224384219, 0.6796153048039155, 0.6014388661190334, 0.7244279440239987, 0.9971579245118876, 0.5595942708120937, 0.7785680805916722, 0.9260818827535867, 0.5182648715631128, 0.6684423164514417, 0.7788795823911905, 0.8306808673516505, 0.9411958208486664, 0.9167709486776696, 0.9430362143422667, 0.5663509257424248, 0.539588146910615, 0.8849748421447023, 0.5619006809721616, 0.8091428148191069, 0.7644501249322545, 0.7638203959835093, 0.7233371164439155, 0.6100323066080731, 0.7492937635930013, 0.5499306971344593, 0.9464625240414495, 0.5758860923661422, 0.613862304299079, 0.9553572745568649, 0.6336420626890878, 0.8876980659017991, 0.9315066327752684, 0.6547623827725997, 0.7478208301932214, 0.7630677627094367, 0.7048948309677578, 0.5115648799188822, 0.59938832990388, 0.7891647991489174, 0.6119248547758005, 0.5541916473943873, 0.8769769932643494, 0.8542180189284616, 0.6034139376641667, 0.788065360332031, 0.8948021010984257, 0.7659560068152385, 0.5688228911117674, 0.9488273543571439, 0.6069996636129944, 0.7984622085152221, 0.8917708282795254, 0.5742430627559553, 0.8055620868823756, 0.7385290062245986, 0.553382898271066, 0.5376279466886917, 0.6859283097957851, 0.5491069161205966, 0.6255217172082328, 0.7157219733816349, 0.7405109336728675, 0.7574290431511677, 0.9042108723380273, 0.7969165900693388, 0.6068545435632711, 0.9827359302980728, 0.9047644004949581, 0.5791579831379571, 0.7305596187157191, 0.7535770671599662, 0.6287666387071993, 0.705447073490163, 0.9248704706380144, 0.9771082876499319, 0.7917841506251353, 0.9240083431672652, 0.9073482374990213, 0.6466636022957362, 0.837486646926257, 0.8535734695838353, 0.8934027048015196, 0.5483362980092874, 0.8736929639298758, 0.7926440325642603, 0.8887918565682817, 0.7865591091964172, 0.5085699650920266, 0.6701194669029567, 0.7450340047523571, 0.6151562148540621, 0.7989472960157425, 0.7812980872631216, 0.775591829208564, 0.8077584817003235, 0.5004555962406658, 0.562709173557156, 0.7259217559142133, 0.8413029788418, 0.7016212195525204, 0.9382401855398573, 0.9505319340160188, 0.5754341356523625, 0.8403114832576272, 0.6520464719409871, 0.7559086181086105, 0.8692340714653981, 0.7294817689818855, 0.6792566592020298, 0.906483290867975, 0.9050499657844464, 0.5385169798141782, 0.7696318369850506, 0.7824141644630225, 0.5985631064228605, 0.580987622204213, 0.5874111376317847, 0.7689826979055819, 0.5722095540774282, 0.5344198991492008, 0.611496691322293, 0.5982360215182345, 0.7625598579745688, 0.7704194619329978, 0.8710237533034856, 0.556880013629648, 0.9263469631450887, 0.8683107101534633, 0.5490398202602489, 0.9088937492567124, 0.6256175109616806, 0.5260304281009734, 0.639070483820648, 0.9181383377338894, 0.5015672421162218, 0.8856622824529908, 0.8116196213942641, 0.5717862715463973, 0.5922180989118349, 0.7106538339551791, 0.8845490861747293, 0.9482096224729889, 0.9935424467458507, 0.867389129728515, 0.5835343710251888, 0.7415458558947106, 0.9535191357016356, 0.97899640512557, 0.8350654871140226, 0.9321502569598286, 0.6828064804064173, 0.8122623702750402, 0.9435675542984715, 0.9566208438660693, 0.6246818329097212, 0.7816654983131335, 0.7726920170568818, 0.7786650875535523, 0.54971547644318, 0.5153068345875578, 0.9623350421899077, 0.5589152264861186, 0.6629496481099504, 0.7376595054777506, 0.7245535518692483, 0.6922687570260397, 0.736441177191526, 0.7705382881478189, 0.7901564295899131, 0.8379776823825904, 0.7555649339547319, 0.5063706781928149, 0.8525275186031186, 0.7370813539964257, 0.5802771884384751, 0.7955852701779539, 0.9469229594208106, 0.9200372298635723, 0.5480907073779295, 0.6053291125818138, 0.7106471733922082, 0.9961810914527953, 0.6059105555681851, 0.9405733888285335, 0.5088378524187993, 0.5835280691857239, 0.9839505783969011, 0.6908971293510948, 0.7665638243448223, 0.6024346700034238, 0.5814038882695796, 0.6095933084921361, 0.624180601591428, 0.9585718452388486, 0.8790011815794083, 0.6491567963567295, 0.7368191359406597, 0.7311925676452942, 0.6983061116930331, 0.6851844200081771, 0.9306729195546332, 0.9302336135411591, 0.8489159958771244, 0.8918191909561735, 0.58053166761601, 0.6098695952598288, 0.554698120664652, 0.5776306561769086, 0.6454045465322151, 0.5739048555994937, 0.7451802453330516, 0.9136059207560383, 0.6768990420216244, 0.8325189929274914, 0.5209269551245878, 0.7342022669428709, 0.941793044523549, 0.6627567285455362, 0.5549691645456043, 0.569985063202914, 0.7057792482788314, 0.7009582071721097, 0.6901348504842091, 0.9072413834714795, 0.8693428444287387, 0.6181822126717678, 0.8602410935387983, 0.919075450145713, 0.7990982266961024, 0.7861943236148135, 0.7020950763806303, 0.6984741886624428, 0.7320241265359675, 0.5783918943996869, 0.7845784677056041, 0.9188222711563425, 0.96848251121776, 0.6080679551588213, 0.5002171607768038, 0.8382120017035606, 0.7559963628010409, 0.9810032149403483, 0.6274692210350543, 0.6934253398323381, 0.6023272740156342, 0.5193280245552592, 0.8055056376111238, 0.9166255413388651, 0.7884856966879166, 0.9719772417061978, 0.8394246971952835, 0.9297464557389015, 0.6187434019863827, 0.8717080748454218, 0.8693160845619954, 0.8119368531888582, 0.7906399144921217, 0.6598357894029541, 0.8258836758947328, 0.6467162704925633, 0.700124475642244, 0.8772843840892317, 0.6094761430973603, 0.7055447362813041, 0.9014591680407541, 0.8425432203263423, 0.7372131537045079, 0.9457413215833708, 0.5786326706943495, 0.7766404770363061, 0.5836020163995518, 0.5882379389434713, 0.7065681780157933, 0.8275580085362092, 0.7333808416043202, 0.7830849667587743, 0.5310616866029412, 0.6661990812849855, 0.9866817021506065, 0.9368513307568653, 0.7969248701311322, 0.5435516334209324, 0.7966496437007442, 0.9462768782002297, 0.633162677738013, 0.5843969491232377, 0.6743479782062761, 0.5100772474495734, 0.7341689814650865, 0.6298086467700228, 0.5902039264466891, 0.567955064457117, 0.9038891650273397, 0.7970028277790946, 0.565039114798324, 0.5768079064973313, 0.822318758710139, 0.8397685679556823, 0.9993938677965786, 0.9139547855019301, 0.5139517482807001, 0.6079513396173684, 0.8794287926760385, 0.6383440511553176, 0.9547869781845686, 0.9533770027836612, 0.9074990087622294, 0.6365743726796026, 0.5006555019733395, 0.5184107691597462, 0.594345944429149, 0.8564045791111584, 0.6588200278241148, 0.8285807386346393, 0.5423765926950155, 0.6852792232477587, 0.8649713392990999, 0.7895321391042296, 0.6724573297246634, 0.5940686130772529, 0.89816690563047, 0.6842420795431505, 0.694118864931538, 0.7263031226266654, 0.8498955426338188, 0.7383027591959315, 0.8851258333753371, 0.904955316061598, 0.6401615975813526, 0.804164745582301, 0.5357192475852781, 0.5762925566915941, 0.5426955779004973, 0.6931029628915666, 0.7487826093223475, 0.7776120523812333, 0.9873596036434971, 0.6276056892675334, 0.5526166854245657, 0.889470924266518, 0.8419780601022768, 0.6759585910331867, 0.8784519941873572, 0.9443390024553818, 0.7324530341071256, 0.7877791522591677, 0.7627412085179555, 0.5302186659901593, 0.6882786468790745, 0.5548351732934307, 0.9762624598931426, 0.6909799181202438, 0.9873595130488704, 0.75902407008831, 0.7128841750005397, 0.7739148487333243, 0.5502716371238563, 0.705134605177732, 0.6858144782088551, 0.9086976384575016, 0.6809805473395245, 0.7385773899983468, 0.7859034952215138, 0.8893469003274721, 0.9074825194519759, 0.8193945778575402, 0.6479313192671169, 0.9850605030644473, 0.9320309247596322, 0.774664463581742, 0.8201549734164784, 0.8980283094185099, 0.7100109526732059, 0.8435608557207332, 0.8545200637393338, 0.8867078914152199, 0.691054358060734, 0.914749767399855, 0.8639402319884465, 0.7857432549272987, 0.8417396800344229, 0.9865428101054511, 0.5354765879619807, 0.5536103983813878, 0.932619991975369, 0.7994832456387004, 0.668876707610889, 0.5436142031946285, 0.8437374635342112, 0.9851269064047055, 0.5527477454053901, 0.8342572463513847, 0.6456166567264645, 0.9664380887173232, 0.5872689289165447, 0.7423343173294181, 0.5635506912260276, 0.6009766871376925, 0.6974370916304452, 0.5795340711935226, 0.9304690281522902, 0.8081518744447534, 0.7296409146752816, 0.645534569168462, 0.962867756378669, 0.5884002382799667, 0.7725431966702292, 0.8259113460003236, 0.6978608072669445, 0.9440879480440301, 0.8216713031291953, 0.8482114988892568, 0.7333418345666025, 0.6725040281917766, 0.8064279402321218, 0.7329926360889676, 0.6015235428479896, 0.7015702004020938, 0.7864325434960158, 0.5928659070717214, 0.6433229813143979, 0.5082061848677685, 0.8761997886953019, 0.9955533510867443, 0.5474352252748051, 0.7647505625452009, 0.7557986719317376, 0.9262407425641183, 0.6615481112566886, 0.5674575968099875, 0.9121562604555038, 0.9576619507648584, 0.69690112414425, 0.8601410861650018, 0.6975306108885355, 0.6403423148535695, 0.5007940908171243, 0.9362446772899077, 0.8361326375296702, 0.8145676586767381, 0.6053668540033897, 0.8337331128569719, 0.5385125091364003, 0.6188894589055919, 0.983473268162451, 0.9351130728181336, 0.674156076921518, 0.7424655414208712, 0.9803583870517182, 0.6051920106845252, 0.8260302101666829, 0.8162041818236996, 0.9636556481948184, 0.5014043634313432, 0.5453234081131102, 0.5658440575026003, 0.6602827008166513, 0.8683936778447254, 0.5394244846260794, 0.5816039767319159, 0.6662333618789353, 0.5358948315426162, 0.7272991177628405, 0.7936022294369736, 0.9990361227957769, 0.5173036619680503, 0.6160055273244736, 0.8754800786074666, 0.6266795781504371, 0.9769957911332126, 0.6369768374148765, 0.5392365204183089, 0.9994526933524925, 0.9010345039065655, 0.5223708328730283, 0.7150268861904407, 0.958434121930518, 0.8053504353557425, 0.9078056429014751, 0.7780830564393366, 0.7539267714642771, 0.9317836055475786, 0.7702353132879403, 0.6327926812768963, 0.9621120285592584, 0.6522171372395273, 0.8450773389947464, 0.5471502011228311, 0.8418430613220551, 0.6492839528519505, 0.8964113347596332, 0.7534621192884102, 0.8987725894992785, 0.963492530184951, 0.8284531956429007, 0.6323635213373241, 0.9574171495094033, 0.7505532305497078, 0.5120419602958224, 0.7869664021292362, 0.777387182100505, 0.7227981640507903, 0.7746455565904447, 0.594632671042371, 0.8587568478240288, 0.5391220115008584, 0.6466986326467391, 0.8062636147613593, 0.7891028947268862, 0.6579752499947645, 0.6850812962209314, 0.8762439952778969, 0.761348887001938, 0.8216498544657529, 0.9780630841510898, 0.8591646794053471, 0.5454181397828022, 0.6834321276936597, 0.9867705764410165, 0.7625675707345297, 0.8020748587561364, 0.6507900156964439, 0.6023692905681174, 0.8370481877910063, 0.8244760069087883, 0.9606218078143365, 0.6849584816593324, 0.9904660818249733, 0.9863372884474957, 0.8148461083114042, 0.6995367431039688, 0.7294073844907916, 0.7355900311006592, 0.507350412894604, 0.5699174062069159, 0.7580983409233231, 0.6598952767231396, 0.8280073182484733, 0.8951351102051226, 0.5150183068937597, 0.9344174825915053, 0.8968491429284782, 0.6141672719237774, 0.5471381707213916, 0.7152798922179338, 0.9298496260627191, 0.8633373947925945, 0.7418190463753622, 0.7687065177527761, 0.8799784138697118, 0.6293906089294581, 0.7215590413272042, 0.7298188656458724, 0.7232531330685541, 0.5972433913522637, 0.9104799841655928, 0.6535920662222638, 0.7378575840917956, 0.5175606460695215, 0.8749469857161454, 0.9995246173443322, 0.7030749412217867, 0.5807340107482535, 0.5105787647173281, 0.9355846095029994, 0.5303279613778543, 0.5213464906627789, 0.6800516961844238, 0.605616316528544, 0.6943614796645802, 0.6906546939995025, 0.9657170793814746, 0.8592144886078947, 0.7043629004183267, 0.5432689889179076, 0.7172937402173096, 0.705910030151982, 0.9686201877205298, 0.526691826882181, 0.9836772528624498, 0.975554220605179, 0.9371354833547767, 0.7329720052180168, 0.629659701137357, 0.7148899264818918, 0.7859018345796858, 0.525066459363437, 0.9646160066098777, 0.9151208757092528, 0.9733215839439154, 0.9899713309790782, 0.5055745869174296, 0.9009287532560211, 0.7932629417386348, 0.6108373368690732, 0.9913172352570889, 0.8662510253522533, 0.7533379224102293, 0.5530296276096813, 0.8357045031276289, 0.7965002069976401, 0.5667470452645087, 0.6315464724323071, 0.6022801770043426, 0.948198797952101, 0.5788981662483048, 0.9405979599961067, 0.5813797326798626, 0.8898716605247017, 0.8130664884490553, 0.9206786939153759, 0.7220632412435455, 0.9236767739254144, 0.7569755742694104, 0.5116640080208101, 0.7863919589639432, 0.8873765727783743, 0.7642675084423026, 0.9310274747629337, 0.6115432302345791, 0.8011222270038799, 0.5106092297983574, 0.8798563239692777, 0.9630385032540394, 0.5502395781670637, 0.6415383817228042, 0.7376661471441361, 0.7282315198760944, 0.8439866691516629, 0.9740834582481921, 0.7656916834305252, 0.8257832812424959, 0.7951525993466576, 0.7520072717676087, 0.6604913177522252, 0.9805373838379747, 0.7917965813246794, 0.8159712235985437, 0.9497673578104433, 0.8468392104676967, 0.6575789407855035, 0.8883990877655115, 0.6250791315318488, 0.7289045802097227, 0.8899581613176196, 0.9716669746813233, 0.9682246982997986, 0.7751649049056553, 0.5899708803212003, 0.9729706553019082, 0.9294865759466016, 0.558983725745342, 0.6399642223503887, 0.9413976018102352, 0.8595768983637886, 0.9236337848435532, 0.7321531446388453, 0.7992327430230473, 0.9370599337473033, 0.5960776926465919, 0.7037374930628112, 0.6110031522389585, 0.9754628258683968, 0.6905007036088642, 0.8796517569782463, 0.8238835966290352, 0.7926514446766371, 0.9801293070497359, 0.8220252722989969, 0.7991524709444899, 0.8163153573551318, 0.6366505372589486, 0.8464935725286598, 0.6917986685834946, 0.8127162529915011, 0.8688417078150829, 0.7346651890040313, 0.6286472565459793, 0.5788450984860809, 0.6726898392579341, 0.9775035312527263, 0.5453841174567166, 0.5704675295667778, 0.5723808889902651, 0.5262139709939868, 0.9339784218802202, 0.7766146242429981, 0.6669431558508268, 0.6293327318757416, 0.7061676584860777, 0.5768423559660678, 0.9687703692974465, 0.8308721760711735, 0.5902092412658761, 0.9747457131365154, 0.8036886671185105, 0.7754340616592108, 0.9767609848389671, 0.9626907212213549, 0.7775568867837419, 0.7815368760822192, 0.9603906673831188, 0.5512855775491983, 0.7151502607911489, 0.6754192080730439, 0.7525390383398216, 0.9200022739885672, 0.766060992857535, 0.5745674385095323, 0.5112559947823638, 0.8017643450291392, 0.7332587629154288, 0.6244100525742877, 0.7870373067834823, 0.574696848401964, 0.5235514924759102, 0.8306812502882117, 0.7828084644888877, 0.5555423879491286, 0.656128199057731, 0.5994473410755747, 0.9684849428326974, 0.7337787887584808, 0.7309085575140464, 0.5719430484090979, 0.5577321946746605, 0.7727955792306092, 0.8699662260145566, 0.812735948251532, 0.9663184039773038, 0.7989759545564737, 0.8443593319158333, 0.6028840658154988, 0.8644875543243941, 0.9553783444746881, 0.6539764030858808, 0.7503449314502075, 0.8963813159667046, 0.5680691973810483, 0.6406853302406679, 0.5451907945216179, 0.7277370315018894, 0.98844853365349, 0.8719387023623819, 0.807099241604686, 0.8732166063915939, 0.6082011879990307, 0.8119614657846557, 0.7910589374007386, 0.8683897550464661, 0.5355999864053781, 0.7381703487589131, 0.6176282687460938, 0.9582097667982654, 0.6505971796681274, 0.8612052566603994, 0.5402791649307774, 0.6196226365840887, 0.6322689410233446, 0.9569139351167719, 0.7587493411846812, 0.9782333434474875, 0.5011824677285754, 0.5670714529250829, 0.502725617149681, 0.6820163248336117, 0.5152354703469887, 0.8671358613389133, 0.5509916068738737, 0.5588442607784649, 0.6494041594484379, 0.9811146151399928, 0.800687637208543, 0.6950150561747077, 0.8587739005937807, 0.5429406566619865, 0.7844186681879393, 0.7290338821487444, 0.7709981927736493, 0.8470247872085042, 0.7799418900957951, 0.5320921684256974, 0.7152940547750202, 0.5905407055400931, 0.7836312356148689, 0.8552957888643631, 0.7971658780990974, 0.901350522514438, 0.5828984234301451, 0.6418765504463396, 0.8269847275098929, 0.551323277198307, 0.6786401106653241, 0.7567618931443874, 0.8902687402122645, 0.6710173793739407, 0.5613909822618848, 0.5142340577188652, 0.708205315934695, 0.625185045081054, 0.8943110299902282, 0.995520601681635, 0.7123173018854758, 0.7089569176607575, 0.6900145755820772, 0.8819245417021908, 0.7897391967723987, 0.8276291236900528, 0.6010234362790992, 0.7656165446964285, 0.7598952249266886, 0.865073542233229, 0.853238994673574, 0.7683908674857949, 0.7512799041367751, 0.5153533503255361, 0.9024830630358746, 0.7751084862675888, 0.7680668420830647, 0.8188942561142873, 0.9868182195277053, 0.8920961132457766, 0.7301921952409545, 0.6101989336399378, 0.6083909352918015, 0.7824958314109192, 0.9980892178540454, 0.8645169566962191, 0.669805939978017, 0.6031726311616001, 0.5083416947448509, 0.8072304717097063, 0.7895992630528816, 0.8632037984701131, 0.7810526661768871, 0.5879635878760315, 0.9012179490203727, 0.5541583550869257, 0.6084218993941484, 0.606044093473667, 0.7441928494562735, 0.9558183078557778, 0.6916167931054412, 0.9362603222067876, 0.9656634506603388, 0.5495172915441362, 0.8245139547443933, 0.6927216003350025, 0.5629867840058705, 0.8072602073403596, 0.7482228653779501, 0.978595001561348, 0.6412785692221822, 0.7652519353448202, 0.5485196730533133, 0.6224944977370748, 0.6938962448690138, 0.5370369598806413, 0.8681467331021047, 0.7231709751974782, 0.8629069807956011, 0.5686682632544838, 0.8551760319218267, 0.5076338638937304, 0.8401334507785557, 0.5610323176229459, 0.6348219879874628, 0.7575329168206735, 0.6472417303341322, 0.6765126417731618, 0.5126141118960125, 0.5000544458887732, 0.6391924112318902, 0.6145330446454773, 0.6873511597130354, 0.9759610304544273, 0.542197564228541, 0.9451757094183348, 0.6541829316786689, 0.6023047769818719, 0.5285989954833189, 0.5933117439108893, 0.9658833160717379, 0.9524194489617586, 0.9507736934401056, 0.7307216777190613, 0.6156643599689944, 0.6246613362141884, 0.5486528551527005, 0.8415550873569476, 0.5753938409849118, 0.8615955081267455, 0.661838838572878, 0.5543303963025116, 0.6117727134949003, 0.741518226384867, 0.8610343563924413, 0.6295053306134606, 0.6356712476387631, 0.9504612183275014, 0.7458738753097536, 0.9345324027702351, 0.9193029767384049, 0.9363751657154176, 0.9164100364363537, 0.6408190002754819, 0.9596304890074913, 0.9891262007182366, 0.9153799822048837, 0.8323497488119244, 0.9283952100402411, 0.791274504251984, 0.6104986422582966, 0.8597918097167044, 0.7913301101226518, 0.8869437892036249, 0.7117268150777469, 0.8762600222188016, 0.7657465591557728, 0.725390347970873, 0.6229456289623376, 0.8440453917043256, 0.7300384776507552, 0.9011290527818347, 0.9032099188197824, 0.82362626589771, 0.7554618518517577, 0.7763805198592579, 0.8480443082524312, 0.9631352936291453, 0.6566559592418189, 0.8518952532845643, 0.9960825935404491, 0.8866922183536898, 0.8505595782284804, 0.9175107539618683, 0.5136102326098884, 0.819269181433276, 0.8178995612031563, 0.9581275060645347, 0.6465291333742588, 0.562123359536206, 0.9879485660894713, 0.6802884500555366, 0.866108910151194, 0.5898890991348908, 0.643837669803009, 0.7656202066344553, 0.5939702375424082, 0.9373222494362028, 0.5906119319864603, 0.6732096902146306, 0.8446516127970075, 0.6666456840256119, 0.5367145268690126, 0.6623021722878955, 0.6976315632088006, 0.8265450359234472, 0.9875095337987883, 0.5378296498167987, 0.7775667747325051, 0.6793156982756683, 0.6948649410439719, 0.8047319920022062, 0.9412532896052819, 0.776953569962559, 0.991205347979143, 0.5928471291120021, 0.8022991255835403, 0.7760747921549596, 0.8867099547703111, 0.5576341243747691, 0.5518825545419412, 0.9548849303535838, 0.8581095713571967, 0.5074755076129118, 0.5977370333349742, 0.8750046876058972, 0.9020399010147933, 0.8387980277249447, 0.8106035363254196, 0.9212186185191957, 0.9391711453090172, 0.5390070599748816, 0.6608018629652386, 0.7655125947472339, 0.9708184359623173, 0.590693348960359, 0.7862087785722736, 0.6441409830063028, 0.5008052722102312, 0.7384687714434077, 0.5911874722292842, 0.6774988391522146, 0.6907126628272973, 0.8926647143837338, 0.6866669580495377, 0.8781483963641299, 0.6337080485614955, 0.7200939920432303, 0.812705134136932, 0.7029096733669589, 0.9811845728002306, 0.7590896342590188, 0.6448760972536385, 0.6280843038499961, 0.7399059235716181, 0.8603135766252603, 0.9128600101644695, 0.7052085803154611, 0.8455735010488927, 0.5363859012826401, 0.7798039653113329, 0.5310549623122882, 0.7466680024175303, 0.5098530300500661, 0.783972384863904, 0.6073703775729211, 0.9637886123535708, 0.6386014568755198, 0.9962829817739209, 0.7006848453119531, 0.8938754344684106, 0.5183177612908293, 0.5047509086936736, 0.6546528335424853, 0.6320380834831285, 0.8545680459461127, 0.993036429153513, 0.9870535134155176, 0.7795500348396422, 0.9156836798600199, 0.9697170948818712, 0.8801815664372785, 0.5963004246395127, 0.8850315869798864, 0.7318898198888806, 0.8144373451578149, 0.8162368663707751, 0.7932343328428788, 0.8920004382635573, 0.7241435280649483, 0.6084192692942684, 0.7833002719437303, 0.5241206998934596, 0.6024909864327379, 0.5414351440692933, 0.6431410105510962, 0.9021759867122419, 0.669396180121939, 0.624583838777853, 0.5864584065481547, 0.5095128538273441, 0.8284743459098153, 0.7595255844499291, 0.8447741987181295, 0.9717265437631146, 0.829165354027718, 0.7866148108821227, 0.7852483894470799, 0.5504797554844382, 0.8651206538413767, 0.594313608441277, 0.7751333376249541, 0.6689329952439504, 0.5160209493565175, 0.8286554685956817, 0.582894444696826, 0.7611700366924263, 0.9391137271071005, 0.712682152357685, 0.5710884544835559, 0.716118979558616, 0.7984292943393791, 0.7590208292369961, 0.761293163470087, 0.9882563757241326, 0.9979750416449391, 0.6492602641053455, 0.79014518363303, 0.5581123532234752, 0.8493989362711107, 0.5879927803554915, 0.8470234301498736, 0.8459289028690335, 0.5598371282644873, 0.936678028168175, 0.763754658232159, 0.5987127680085786, 0.7561316849789642, 0.6491674181119877, 0.85225232054974, 0.8989499168239399, 0.5721248326157167, 0.5288667410971116, 0.646677749956752, 0.5007822592937312, 0.9668385810371891, 0.7708342508966083, 0.8761938608990201, 0.5378029591793672, 0.902648402287126, 0.5704762653192608, 0.5643851981009622, 0.8415048774928005, 0.7295230151142001, 0.9369082448088099, 0.5284879049454887, 0.9743018368718362, 0.9424091755581955, 0.9968245106502971, 0.9105702645243681, 0.9545832815643491, 0.8405605458568683, 0.6919282567623612, 0.7880195052834709, 0.9092437916798343, 0.7761000998898485, 0.646016753209447, 0.8226305110105584, 0.9192020959640721, 0.9599013662937916, 0.8906150244604238, 0.8272077250924155, 0.640550247846692, 0.8880959380568185, 0.726300233418832, 0.9829747338018882, 0.9807280763576807, 0.679123682244773, 0.754845819134628, 0.7824457144769396, 0.8201319161996494, 0.7727032858278688, 0.6814581635620609, 0.9852947684375339, 0.7347897541582161, 0.9785015576853835, 0.7163700163614435, 0.6454205005809983, 0.5593024025648337, 0.8243814343107647, 0.9039229980482222, 0.8876892544100556, 0.8437174077371422, 0.5694152152256782, 0.6446360564998158, 0.7410035004759179, 0.8815177864870225, 0.8400079329594049, 0.841520517820611, 0.9373156905944605, 0.5534216017414648, 0.9017074042069865, 0.9276262919258775, 0.8901773854177751, 0.9725746224322387, 0.6242635129579976, 0.8515666371332702, 0.9184682254517861, 0.9174878738206376, 0.9373557580853139, 0.5883643469750717, 0.7044399660156019, 0.7198872657283684, 0.9188379594015783, 0.8837393965943106, 0.9954925695806438, 0.615283666216933, 0.817555799337101, 0.9027848947641623, 0.9118902969900131, 0.5832730705341627, 0.9809224690523597, 0.7684977266614947, 0.606319222259443, 0.9303242231418954, 0.8199018793083646, 0.7068951482002964, 0.6408729226492806, 0.9827033420552722, 0.7004990544371901, 0.8520861005156943, 0.6952709996936692, 0.6130034569840129, 0.9785079454015446, 0.6762735425139557, 0.832699230242113, 0.9200818688895485, 0.7774742043854813, 0.655825018597266, 0.593101870846536, 0.6742171886518762, 0.7119997692809887, 0.6813576231333922, 0.8613167918213392, 0.9127859368406774, 0.8687575343948916, 0.5235836101178006, 0.6002242997724856, 0.9857201518641232, 0.5828033671511743, 0.7854966376923618, 0.9470050859666297, 0.7627857161702725, 0.853641064622269, 0.7159480370391818, 0.8392353018862624, 0.5619631778682074, 0.9026906140615671, 0.9456386594432983, 0.8820667489490459, 0.5423200734726886, 0.8421092388034219, 0.9551830892654651, 0.5093509105123395, 0.9767617316005648, 0.6650307771205662, 0.5595850154175466, 0.587440658467464, 0.6753278744552206, 0.958931039594215, 0.6535259670872093, 0.7096381646783887, 0.6277857504420754, 0.9522727923502934, 0.9764294371379182, 0.6124788396653507, 0.5293028108560129, 0.6740316920225743, 0.5571818563883721, 0.8975228002572393, 0.7501081654979883, 0.5457320701350014, 0.9699081700107779, 0.5544098102249904, 0.6186225654231501, 0.6912617682694147, 0.7428519548346154, 0.6856637000141437, 0.6986462886261167, 0.7968960912709915, 0.6543227480365332, 0.8095314744728891, 0.9198057426035455, 0.8121548340373952, 0.8376445576364167, 0.578000090720149, 0.8351968526322462, 0.845065053377774, 0.6329174793154388, 0.8628828619357178, 0.5059083342534145, 0.8482850781883284, 0.5832695262832082, 0.6962752986558788, 0.6031395315924994, 0.7889449146078038, 0.8944476627006457, 0.8670635939394948, 0.584287540771032, 0.5174496704657887, 0.6369404755619001, 0.7816439038937077, 0.5596168074111871, 0.8213051807887513, 0.8596362910660327, 0.580942929779519, 0.8411276895134749, 0.8101260069438277, 0.7522841238278777, 0.717639466488893, 0.817222608555318, 0.6118553940193727, 0.8025389091699524, 0.7134756337994942, 0.574752368129047, 0.7578820136020252, 0.5133676970191687, 0.9427264927628254, 0.6170228669007166, 0.6532380985973723, 0.8039909507064131, 0.8245921668124245, 0.6338225877610361, 0.8537600922960495, 0.7950650887262131, 0.5863861075961385, 0.5764082988696102, 0.5400546531580556, 0.9156603972823324, 0.8049169706794916, 0.6582607211484113, 0.5713226698587488, 0.5032532332406358, 0.571077902763167, 0.6385397656104432, 0.9225469059582159, 0.9706858933357279, 0.751789155266277, 0.8532705740711374, 0.7583616942070499, 0.9987661563143604, 0.9430532778219222, 0.8403275847525332, 0.6018660375040048, 0.7287067437031884, 0.9467730080067279, 0.654737548799474, 0.6298690627526152, 0.737234428830216, 0.874289808117726, 0.9620929150893386, 0.6618640120763251, 0.5638657457646603, 0.9139831840741022, 0.9518166888267445, 0.7441716715522733, 0.7344669685719671, 0.9983063200678579, 0.5399267393109874, 0.6611555347757778, 0.7591136715238226, 0.723676416130284, 0.6767509729833917, 0.9813653564030362, 0.7726553846890172, 0.5816561108381577, 0.6024258027901925, 0.9456916724275282, 0.9774335990122973, 0.5283984626759357, 0.9042961223487926, 0.5022690055492055, 0.6756314325524142, 0.9667054917332769, 0.9848423497556398, 0.6950248005874624, 0.6179797814576569, 0.7331473546590797, 0.6207816743279159, 0.5910260989700268, 0.9612855681119341, 0.7047021523178669, 0.5959154838932159, 0.7123837008712846, 0.87042391578978, 0.8857066753578753, 0.5769582180746666, 0.7475790423292894, 0.764858380232037, 0.955543086955176, 0.5268530141529342, 0.7678996815531062, 0.5634608550947762, 0.8027394881289208, 0.870411902233257, 0.573511737295169, 0.6947873611367427, 0.8159913072279208, 0.525297145688826, 0.5502201783443397, 0.7497087123445059, 0.6547266009377928, 0.8300591885510935, 0.9274756263728214, 0.6395281688068364, 0.6823649942450963, 0.610303871764811, 0.9235050089720078, 0.9553983678702148, 0.5002784485611336, 0.5271785019745907, 0.6465719080559298, 0.6716489698465292, 0.8587083825756112, 0.9708408375878492, 0.9252574141564021, 0.7670835051882503, 0.7890679534678824, 0.546261975408687, 0.7217908211829529, 0.6679159676456553, 0.8446937407997512, 0.7053637034097102, 0.8063119312332456, 0.6642971590094892, 0.6654017579915884, 0.8842506685952596, 0.8140337506026833, 0.509060751286859, 0.6694100376127896, 0.6359034889626888, 0.6245701074440795, 0.5596329315620415, 0.698654466242326, 0.9931620670506498, 0.7255360915870346, 0.7263963237348035, 0.7201027754822495, 0.5597743193891653, 0.634793990211211, 0.6412236402037296, 0.9756889716748093, 0.6594945612515553, 0.6547024448504597, 0.5386669911320662, 0.9989577992956148, 0.5689964837155195, 0.8363793812710822, 0.9191113431168307, 0.6816971029902487, 0.5148038632829655, 0.6146599156326424, 0.9429266624325287, 0.9876522755897155, 0.7430896173295565, 0.510142253106855, 0.7673459195058803, 0.9933773003409069, 0.658150564027092, 0.6951927804124894, 0.8722102181468595, 0.589860933048041, 0.5299265325990199, 0.6138462174162655, 0.5457577252199305, 0.5887020359008264, 0.8243501960042927, 0.7564156188915585, 0.8920771616295675, 0.7850862588245207, 0.694017141620709, 0.8744786612961739, 0.7656309686902196, 0.6654326246649871, 0.5107228375303184, 0.9979604302663101, 0.9647066766710252, 0.7706552999071888, 0.6598477436729979, 0.9029446500588121, 0.78146995462001, 0.6537469564113858, 0.7178276816441352, 0.8070925441454652, 0.5979232561567294, 0.7970616000459674, 0.841524381629661, 0.8325898413304185, 0.8820543380152728, 0.6231978172589713, 0.790115886645641, 0.8794673912204383, 0.7396724615932604, 0.8131160330709144, 0.857087317834475, 0.7136297901548603, 0.9276253263439336, 0.6456362571708043, 0.5194421709810852, 0.9271835706304388, 0.8318212222016816, 0.5579484951294916, 0.963254444630967, 0.5193480340027586, 0.9396611403209402, 0.6747721684297446, 0.5479676167894951, 0.5519339882982726, 0.9874029561585719, 0.8339633110063711, 0.691276054514063, 0.9244344313808817, 0.8210438019502044, 0.7440387729846177, 0.9798248562725168, 0.8380651437018447, 0.5777539349145211, 0.748857398989764, 0.6480711612145694, 0.9930575536341228, 0.9535411286703431, 0.895091924562832, 0.9375922685868809, 0.7587849927966337, 0.6807122331675917, 0.6867226035958773, 0.6638115129184776, 0.9014834471523339, 0.7725554277168809, 0.6974852240481348, 0.9795949840574509, 0.6845861156170308, 0.9273984781196002, 0.5955937540031776, 0.8800035478728708, 0.7701433639331361, 0.5439673896399635, 0.7389381985078012, 0.6035789671234473, 0.9231204879623969, 0.6547163520880168, 0.7232307144216805, 0.5987592545836633, 0.717725067323377, 0.9398512987782763, 0.702497554804825, 0.5682692095079929, 0.9451284463772083, 0.8088328905362516, 0.7227413782349215, 0.7742846182919549, 0.7682808358836339, 0.5603163312029356, 0.6533818069657248, 0.5125185920377717, 0.6845347148523551, 0.9021284525773072, 0.6443502389530567, 0.5073568099497552, 0.9502096430100162, 0.8771651978374199, 0.7181254796039483, 0.9921322454915753, 0.7953690491442877, 0.8768059444944495, 0.7540325543527193, 0.9831731105992833, 0.9026521790364689, 0.718423269008208, 0.8124435195013775, 0.7684217773100777, 0.8909056895796087, 0.8911213144052562, 0.7555780577676606, 0.5504441556490247, 0.7143291194660379, 0.9491230856953635, 0.9408416100775889, 0.5143860748863243, 0.8209382746933378, 0.9296059674936439, 0.6001119375670102, 0.50738061613264, 0.9529313633287524, 0.6949832037473871, 0.6944666973864406, 0.5535288750536229, 0.965459451655187, 0.5926765130088862, 0.6298745973083053, 0.9970616095600091, 0.815446803090569, 0.7271401811050964, 0.5236360462831405, 0.7335317784829777, 0.7772604584876679, 0.9231505030099685, 0.621713150053558, 0.6543326289571565, 0.740140863985356, 0.5484238359059569, 0.9785785548275301, 0.6584257383178476, 0.7079760449270959, 0.8037669138387222, 0.8941328522481355, 0.6543908812486303, 0.7393740068092107, 0.8859642135217387, 0.7962477647024284, 0.606307096474506, 0.656840677862526, 0.6960039127192413, 0.6539276850979336, 0.9093238646678847, 0.557634163261642, 0.8791917575017265, 0.9511049040386591, 0.507839037703409, 0.7482705527768085, 0.6323131069284785, 0.9094237930345073, 0.6923945903480132, 0.9070111034772212, 0.5296864926054439, 0.6243157047450811, 0.8720033973357019, 0.5685711622022349, 0.6673652687463912, 0.5605153276950536, 0.9979831216694317, 0.6969286833403192, 0.6146449780543048, 0.8624597660463598, 0.6783266089222917, 0.8821121057641638, 0.6375377940996417, 0.8346544990320224, 0.8137199289160331, 0.8597943411675011, 0.9243336950846021, 0.875176392431543, 0.8014219711034885, 0.7819379974950732, 0.7812463046177858, 0.5625899879725954, 0.8297382196070757, 0.6821069590062891, 0.5356563662402702, 0.5987664190882236, 0.8419479852655102, 0.9619661638908138, 0.6647220054667535, 0.9238212177510183, 0.5848807292517402, 0.7435081153117493, 0.9694576867706447, 0.5970729673259001, 0.6354238982822362, 0.857109443295907, 0.6798238123926867, 0.5370172418458262, 0.8370886746493451, 0.8054228340049181, 0.7763841169038368, 0.6577312816123682, 0.5578458427804185, 0.763524410311248, 0.8079098932320647, 0.5829296699168522, 0.8079684260614606, 0.6039058671438358, 0.5755528141868026, 0.7463402515478332, 0.7950324943131547, 0.5287412781143315, 0.7501491606441746, 0.7474205081589869, 0.6030177577644136, 0.5058274433148158, 0.9666702513876595, 0.5392285079580946, 0.9359658260652115, 0.9178506907725674, 0.7379853794385627, 0.8853935986509796, 0.8126471884768803, 0.7554840536490847, 0.9303578561189783, 0.7570778402956488, 0.9008690183568777, 0.8206167481607445, 0.8968117897460712, 0.9291731414807458, 0.575271762324606, 0.8372315989515691, 0.8217619840800349, 0.7407088300427953, 0.6658965263359949, 0.9192345830816013, 0.8571002904218117, 0.813133337647075, 0.6650197310773593, 0.8341730674302531, 0.7423878331383096, 0.5770502346679934, 0.8212906343458666, 0.6991520588916043, 0.7187442990510879, 0.575894065957933, 0.5936932551990483, 0.9408213150376157, 0.50633432874545, 0.5396371717176184, 0.7915352328231153, 0.9450462316495762, 0.6994209843921522, 0.7018577331423306, 0.6300868390477011, 0.5282443643599071, 0.7848025810718389, 0.5244885569581459, 0.9664783641970736, 0.7248397081573317, 0.5425991724667742, 0.5487424796913093, 0.9118916352437063, 0.6326306286297143, 0.5959946413066068, 0.5820849704214119, 0.944890264229003, 0.8437570974784527, 0.5200293908082838, 0.5787917363079493, 0.5642909449000519, 0.6408849358536566, 0.7474905947026704, 0.5086695501069459, 0.6699695523582301, 0.9154882492893236, 0.5539310148910047, 0.9388421295148996, 0.5571306507316675, 0.7613808053548985, 0.9299284061551693, 0.7329773676026217, 0.959403548380108, 0.6849514799361233, 0.5508209518092121, 0.6748995849766923, 0.8388748926528953, 0.9873051277457745, 0.5016824341240823, 0.8652432077333061, 0.8218290797319125, 0.9182016460358631, 0.7071425751049334, 0.7142440263849097, 0.9555105152602497, 0.9354805432384595, 0.7986681083696341, 0.9255346651833833, 0.9684658496529333, 0.6943355609320603, 0.6286321382679192, 0.9019664790209883, 0.9362790293057113, 0.5289744464017021, 0.6253468043437302, 0.6149265459590838, 0.5047732460191912, 0.5551181976510855, 0.8880262788021237, 0.8364050349599881, 0.5456517074655802, 0.614337569039473, 0.5482609679356881, 0.6342026871425906, 0.8208369864111387, 0.757509472533682, 0.5540820524289842, 0.9571555041411219, 0.9118420031997254, 0.5621132997338608, 0.9824437275808546, 0.6054977703054799, 0.6282805518788313, 0.5772269786505018, 0.5216955369423661, 0.6058662917464368, 0.5286596789398921, 0.902559025505014, 0.7974734280256239, 0.7459337557238135, 0.8148498608162342, 0.5996109756772371, 0.8021123330495903, 0.6197810173725012, 0.762284204132385, 0.6294264936236726, 0.7439171236975243, 0.506700318350336, 0.8992665147353249, 0.9775225337924653, 0.7818807737874834, 0.8216191606723205, 0.9724238468367427, 0.9940350207987181, 0.7478556175318367, 0.8198701796797898, 0.7872651288909529, 0.7748471326581539, 0.6806933105377799, 0.9239464479253019, 0.5932197484375452, 0.7706878289515401, 0.5648966280953421, 0.7768886219064863, 0.6802377414510884, 0.8401183740631866, 0.5843642425492417, 0.5591836601838369, 0.925941798663982, 0.5342846658276016, 0.5552858946602162, 0.5515055534003793, 0.6469615010590253, 0.7429475547185372, 0.5313836929670098, 0.5315262159317167, 0.7329101194367519, 0.7993867671394833, 0.989814862072641, 0.9994628897741942, 0.9330166132057411, 0.917180760804044, 0.7497822205702203, 0.711663599075687, 0.8327815754112335, 0.6519970352341933, 0.9660864681679378, 0.6343969754156827, 0.9342606272502547, 0.527179054864408, 0.9199800145182204, 0.9731305976909627, 0.762844404959876, 0.9735762249890925, 0.9069980551701784, 0.7713648405248279, 0.8272306149857886, 0.8122479031963853, 0.88046184281297, 0.8501346130489982, 0.6152076900892004, 0.5069829017995777, 0.735894267152951, 0.9490899613661978, 0.7910902075436772, 0.984504952900398, 0.9183859538549954, 0.9722462792171325, 0.596071251954458, 0.7451092215659011, 0.9651866340019499, 0.9644397023829684, 0.9203279654130669, 0.9477956374537809, 0.8983520271056181, 0.7884352720092184, 0.8502232389742617, 0.606920657140898, 0.889956848542452, 0.7353202013092199, 0.7302163999044842, 0.5151071882515873, 0.7895056185248401, 0.8965247015049636, 0.9786946785818238, 0.6790605144584048, 0.880837416330932, 0.8658615428781842, 0.9082042808975063, 0.8326204455218946, 0.9475656652691216, 0.6403505628952388, 0.5876385074542418, 0.6531026687443702, 0.699999089105688, 0.8302519094349939, 0.5857254635738498, 0.7790757786327085, 0.8823912782279965, 0.9214154491597883, 0.7283615184695518, 0.572591885575124, 0.6648706254943351, 0.9439095672733605, 0.5253407672500108, 0.7863690515129997, 0.5455443278861344, 0.6438136344667222, 0.9374785353493906, 0.8972977047308985, 0.6004819835522256, 0.6395590259775534, 0.8987983499976934, 0.9675072056319514, 0.5633308293726884, 0.8883649203832633, 0.5829654476253352, 0.5013164107323628, 0.7002038083946834, 0.8027518369398386, 0.7215795913003811, 0.5859748694978305, 0.7470136911412459, 0.5582081240957555, 0.799261501548656, 0.6686134702916434, 0.5208705942370586, 0.7449911940535414, 0.8950199102343919, 0.7134236429211035, 0.5779958710026889, 0.9368402820634836, 0.8502208813441919, 0.8491445101319519, 0.7513150657356016, 0.7172601775233629, 0.547086084104076, 0.8632288276386928, 0.7585948127655777, 0.891218077092473, 0.6311271173774031, 0.5241552109128934, 0.5803068018549067, 0.7238705053994479, 0.9661773491980747, 0.8517562205993452, 0.711786301185078, 0.8296536054881389, 0.8558790217822125, 0.5323903899360951, 0.8262630994857088, 0.6903907295961049, 0.7469083552118995, 0.8342707665813881, 0.5462122200305988, 0.8672879710074772, 0.5758876419313687, 0.869605157463223, 0.6592178551205133, 0.6973622229466734, 0.5444106541748334, 0.9909327421621097, 0.8996499604197771, 0.768465382292338, 0.5776504464538238, 0.8114383726714889, 0.7593553266364711, 0.6314834660656488, 0.6918555032946907, 0.700083151240229, 0.9681912256954939, 0.7846189051407151, 0.516513730913807, 0.7023207431215169, 0.7321651052498201, 0.7940881390388713, 0.9372859755510003, 0.9023663558219934, 0.7555736982410377, 0.8905900598157874, 0.8865461570653275, 0.7337637966758268, 0.6816429747871868, 0.5452709612913318, 0.7197302428770824, 0.9438830610381373, 0.9291262762784609, 0.7302872935553663, 0.7929056794151729, 0.5013611390274417, 0.5372735738466381, 0.9153212080882209, 0.9583464807849685, 0.7037102267809356, 0.5598576553428354, 0.8863800357403175, 0.9724423318814701, 0.9564224447330456, 0.8677905698760117, 0.9003301494165303, 0.5657129447860059, 0.798467791704494, 0.9401498438014178, 0.6823359766613204, 0.5169539393374736, 0.7342695165754785, 0.795095758702276, 0.9614107155586284, 0.8670781239460646, 0.8906947141397663, 0.6614170704904325, 0.859461661479137, 0.6665389064922671, 0.9693794334437136, 0.6139655511434061, 0.9288914488787332, 0.5396670982855992, 0.5624244361579509, 0.5469663494910185, 0.5236062110442327, 0.5152344446349895, 0.5296556394241256, 0.8443916034898653, 0.797509423693785, 0.7713180227232399, 0.8402495278829447, 0.8336262728326702, 0.8370090884910961, 0.9281733845509879, 0.7863816078493793, 0.8846075440145162, 0.8428802350410953, 0.9899069857483777, 0.676146913458611, 0.5069454353593996, 0.5037838546347488, 0.6610588010800987, 0.8708305864786401, 0.5229473107472871, 0.7186536996502952, 0.9543379527341599, 0.5244920026126567, 0.7766618825933342, 0.7608328615256252, 0.8831102953474137, 0.6940810220216176, 0.5333676146512109, 0.9761363101399565, 0.6378405154218351, 0.6082935140314678, 0.981202186455274, 0.8245352685285013, 0.6856205466565846, 0.7403575396246995, 0.6906158501879436, 0.7205168960064088, 0.8098689935826404, 0.982614484586956, 0.5883568660391013, 0.9222524734307183, 0.5446886284894845, 0.7929076054618344, 0.7941175390618026, 0.9832317130076127, 0.5240559639585616, 0.5991277846742225, 0.5378314021393389, 0.7833053173354318, 0.5155962746491738, 0.6578837701459107, 0.7338072069374738, 0.6148064664736551, 0.8511326317298731, 0.650017395123197, 0.84438605166194, 0.8804958327061956, 0.965081814330646, 0.6435326947874628, 0.6859080412011882, 0.7422444962935304, 0.5269780803535288, 0.6027197927652561, 0.5527556681128968, 0.8256191392220095, 0.852553880327363, 0.8575192571670468, 0.9097911376931316, 0.7782762919068716, 0.9968082332412347, 0.9881974708156538, 0.9995806799412106, 0.767991853175288, 0.7444533876419199, 0.8394174196445332, 0.8078678404281556, 0.9068389036251978, 0.8477362376140594, 0.5284009390700173, 0.5781693972964606, 0.8041474480683733, 0.5680171668448175, 0.819848096520603, 0.9545895895616169, 0.5533396127084483, 0.5834213793694355, 0.5051049214741941, 0.7664986609305161, 0.8430453215822035, 0.6094766426536279, 0.6831079862056135, 0.6259620571407525, 0.5474972135490375, 0.7127406197928766, 0.861550668606208, 0.8523766113835715, 0.8521930711225006, 0.9790451983107569, 0.7385221557574319, 0.5234069651293946, 0.7205098947606349, 0.8249448851673404, 0.7659185192129242, 0.8303847036490912, 0.5622555130292365, 0.9308027611777011, 0.5616539888537022, 0.7319383197954372, 0.5061269943029434, 0.9426735312079031, 0.7826005559391673, 0.9197263623481077, 0.7100242324565307, 0.7560394523468977, 0.8550501242571193, 0.796814928254245, 0.785994766090303, 0.9248928556152485, 0.8179112362832484, 0.6449497842652434, 0.6089001159333592, 0.5420393736598408, 0.6826536958815741, 0.8801436649474956, 0.6654322893816281, 0.8953558094437972, 0.8015779510584211, 0.7640023620144297, 0.8091059867026058, 0.5991964845073501, 0.9382272364814858, 0.6143011320040478, 0.8730869795622367, 0.5150515353100726, 0.6393414364501309, 0.7734783804714509, 0.7046863886661519, 0.9052940937732548, 0.7796985060243291, 0.6074647520555484, 0.6365357790335463, 0.8385112000984151, 0.8732143714642794, 0.7049051078727842, 0.9572401676467395, 0.9618408715772635, 0.8415257754437142, 0.9554688475078221, 0.5285860774285429, 0.962776106411459, 0.8031072972268947, 0.7945445291217914, 0.6977790422882477, 0.6762561163923575, 0.8314563335555931, 0.600706334214631, 0.8154947812910812, 0.5981870835882845, 0.8753222927491456, 0.5908008990640313, 0.8580794515403676, 0.6413665017230687, 0.6986033114615935, 0.8483254093575165, 0.6723660076982181, 0.8154656465110323, 0.7987938607059342, 0.770209206438285, 0.7464233964515289, 0.8561073756584063, 0.649902106066766, 0.9831066661186172, 0.8800623782776971, 0.617635958547702, 0.7130346521069819, 0.7619438378163561, 0.6250207113316084, 0.7638354012065066, 0.823852852952252, 0.7735471961279943, 0.5369002481090861, 0.6211808505561002, 0.8982083556787313, 0.6718427710895418, 0.9280130600617931, 0.8140280142061238, 0.9679206396033802, 0.8838050367726409, 0.7205677020170126, 0.9425354222404121, 0.7020785062668413, 0.747832714913678, 0.5640599535520416, 0.6199108087754157, 0.660880798016565, 0.6446472508705119, 0.9341524751004308, 0.6246645876994303, 0.8511955223915197, 0.9131765111097774, 0.9674797758822187, 0.8358580718405626, 0.6503799016783753, 0.9156610509271208, 0.6719442005216296, 0.9168411041564094, 0.9823782423757811, 0.7943192397570101, 0.8002030534718996, 0.6138005830285533, 0.9966532879246821, 0.9218142202060416, 0.6111047832272472, 0.5107886273384015, 0.7066643591009043, 0.5324804976936317, 0.782254768451019, 0.6926906483442623, 0.7019715312380815, 0.9571238459454776, 0.9418624921079136, 0.903331917647665, 0.8965127748591281, 0.9928844887655248, 0.7509821302376921, 0.9470496430460422, 0.7400790151957862, 0.5589455059997835, 0.9112044751261599, 0.8732069319444539, 0.8852361901058599, 0.8612065823880574, 0.5962290262854784, 0.6946276316775621, 0.6097538003846591, 0.8005141272637994, 0.5823798928930293, 0.6260994393552735, 0.5832317825084814, 0.6472333666934127, 0.8132164869195939, 0.9510345406422426, 0.525910425617248, 0.8729234904567376, 0.5338493268761877, 0.9957678897732622, 0.76522317293978, 0.5954152993485142, 0.5753687577102655, 0.8076171778553736, 0.7243259231349843, 0.8664092857301835, 0.997002745565357, 0.7548616581381258, 0.926386621110858, 0.5613188842612256, 0.9274671419506799, 0.8423049882893523, 0.7130138885216316, 0.6479984036035871, 0.7491863792955296, 0.5923775471672915, 0.8015792819504799, 0.5154502153370468, 0.5514992046960526, 0.7312015066162371, 0.7892285051959617, 0.9738067271452171, 0.93761537396627, 0.5888392215891104, 0.812357962293455, 0.8895170377953473, 0.9384563892587261, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0};
int h_B[]= {
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, 866, 868, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 904, 906, 908, 910, 912, 914, 916, 918, 920, 922, 924, 926, 928, 930, 932, 934, 936, 938, 940, 942, 944, 946, 948, 950, 952, 954, 956, 958, 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1220, 1222, 1224, 1226, 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, 1244, 1246, 1248, 1250, 1252, 1254, 1256, 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368, 1370, 1372, 1374, 1376, 1378, 1380, 1382, 1384, 1386, 1388, 1390, 1392, 1394, 1396, 1398, 1400, 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474, 1476, 1478, 1480, 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496, 1498, 1500, 1502, 1504, 1506, 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534, 1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592, 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722, 1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1742, 1744, 1746, 1748, 1750, 1752, 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768, 1770, 1772, 1774, 1776, 1778, 1780, 1782, 1784, 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816, 1818, 1820, 1822, 1824, 1826, 1828, 1830, 1832, 1834, 1836, 1838, 1840, 1842, 1844, 1846, 1848, 1850, 1852, 1854, 1856, 1858, 1860, 1862, 1864, 1866, 1868, 1870, 1872, 1874, 1876, 1878, 1880, 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896, 1898, 1900, 1902, 1904, 1906, 1908, 1910, 1912, 1914, 1916, 1918, 1920, 1922, 1924, 1926, 1928, 1930, 1932, 1934, 1936, 1938, 1940, 1942, 1944, 1946, 1948, 1950, 1952, 1954, 1956, 1958, 1960, 1962, 1964, 1966, 1968, 1970, 1972, 1974, 1976, 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992, 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008, 2010, 2013, 2015, 2017, 2019, 2021, 2023, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2039, 2042, 2044, 2046, 2048, 2050, 2052, 2054, 2056, 2058, 2060, 2062, 2064, 2066, 2068, 2070, 2072, 2074, 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094, 2096, 2098, 2100, 2102, 2104, 2106, 2108, 2110, 2112, 2114, 2116, 2118, 2120, 2122, 2124, 2126, 2128, 2130, 2132, 2134, 2136, 2138, 2140, 2142, 2144, 2146, 2148, 2150, 2152, 2154, 2156, 2158, 2160, 2162, 2164, 2166, 2168, 2170, 2172, 2174, 2176, 2178, 2180, 2182, 2184, 2186, 2188, 2190, 2192, 2194, 2196, 2198, 2200, 2202, 2204, 2206, 2208, 2210, 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, 2228, 2230, 2232, 2234, 2236, 2238, 2240, 2242, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260, 2262, 2264, 2266, 2268, 2271, 2273, 2275, 2277, 2280, 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300, 2302, 2304, 2306, 2308, 2310, 2312, 2314, 2316, 2318, 2320, 2322, 2324, 2326, 2328, 2330, 2332, 2334, 2336, 2338, 2340, 2342, 2344, 2346, 2348, 2350, 2352, 2354, 2356, 2358, 2360, 2362, 2364, 2366, 2368, 2370, 2372, 2374, 2376, 2378, 2380, 2382, 2384, 2386, 2388, 2390, 2392, 2394, 2396, 2398, 2400, 2402, 2404, 2406, 2408, 2410, 2412, 2414, 2416, 2418, 2420, 2422, 2424, 2426, 2428, 2430, 2432, 2434, 2436, 2438, 2440, 2442, 2444, 2446, 2448, 2450, 2452, 2454, 2456, 2458, 2460, 2462, 2464, 2466, 2468, 2470, 2472, 2474, 2476, 2478, 2480, 2482, 2484, 2486, 2488, 2490, 2492, 2494, 2496, 2498, 2500, 2502, 2504, 2506, 2508, 2510, 2512, 2514, 2516, 2518, 2520, 2522, 2524, 2526, 2528, 2530, 2532, 2534, 2536, 2538, 2540, 2542, 2544, 2546, 2548, 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568, 2570, 2572, 2574, 2576, 2578, 2580, 2582, 2584, 2586, 2588, 2590, 2592, 2594, 2596, 2598, 2600, 2602, 2604, 2606, 2608, 2610, 2612, 2614, 2616, 2618, 2620, 2622, 2624, 2626, 2628, 2630, 2632, 2634, 2636, 2638, 2640, 2642, 2644, 2646, 2648, 2650, 2652, 2654, 2656, 2658, 2660, 2662, 2664, 2666, 2668, 2670, 2672, 2674, 2676, 2678, 2680, 2682, 2684, 2686, 2688, 2690, 2692, 2694, 2696, 2698, 2700, 2702, 2704, 2706, 2708, 2710, 2712, 2714, 2716, 2718, 2720, 2722, 2724, 2726, 2728, 2730, 2732, 2734, 2736, 2738, 2740, 2742, 2744, 2746, 2748, 2750, 2752, 2754, 2756, 2758, 2760, 2762, 2764, 2766, 2768, 2770, 2772, 2774, 2776, 2778, 2780, 2782, 2784, 2786, 2788, 2790, 2792, 2794, 2796, 2798, 2800, 2802, 2804, 2806, 2808, 2810, 2812, 2814, 2816, 2818, 2820, 2822, 2824, 2826, 2828, 2830, 2832, 2834, 2836, 2838, 2840, 2842, 2844, 2846, 2848, 2850, 2852, 2854, 2856, 2858, 2860, 2862, 2864, 2866, 2868, 2870, 2872, 2874, 2876, 2878, 2880, 2882, 2884, 2886, 2888, 2890, 2892, 2894, 2896, 2898, 2900, 2902, 2904, 2906, 2908, 2910, 2912, 2914, 2916, 2918, 2920, 2922, 2924, 2926, 2928, 2930, 2932, 2934, 2936, 2938, 2940, 2942, 2944, 2946, 2948, 2950, 2952, 2954, 2956, 2958, 2960, 2962, 2964, 2966, 2968, 2970, 2972, 2974, 2976, 2978, 2980, 2982, 2984, 2986, 2988, 2990, 2992, 2994, 2996, 2998, 3000, 3002, 3004, 3006, 3008, 3010, 3012, 3014, 3016, 3018, 3020, 3022, 3024, 3026, 3028, 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, 3046, 3048, 3050, 3052, 3054, 3056, 3058, 3060, 3062, 3064, 3066, 3068, 3070, 3072, 3074, 3076, 3078, 3080, 3082, 3084, 3086, 3088, 3090, 3092, 3094, 3096, 3098, 3100, 3102, 3104, 3106, 3108, 3110, 3112, 3114, 3116, 3118, 3120, 3122, 3124, 3126, 3128, 3130, 3132, 3134, 3136, 3138, 3140, 3142, 3144, 3146, 3148, 3150, 3152, 3154, 3156, 3158, 3160, 3162, 3164, 3166, 3168, 3170, 3172, 3174, 3176, 3178, 3180, 3182, 3184, 3186, 3188, 3190, 3192, 3194, 3196, 3198, 3200, 3202, 3204, 3206, 3208, 3210, 3212, 3214, 3216, 3218, 3220, 3222, 3224, 3226, 3228, 3230, 3232, 3234, 3236, 3238, 3240, 3242, 3244, 3246, 3248, 3250, 3252, 3254, 3256, 3258, 3260, 3262, 3264, 3266, 3268, 3270, 3272, 3274, 3276, 3278, 3280, 3282, 3284, 3286, 3288, 3290, 3292, 3294, 3296, 3298, 3300, 3302, 3304, 3306, 3308, 3310, 3312, 3314, 3316, 3318, 3320, 3322, 3324, 3326, 3328, 3330, 3332, 3334, 3336, 3338, 3340, 3342, 3344, 3346, 3348, 3350, 3352, 3354, 3356, 3358, 3360, 3362, 3364, 3366, 3368, 3370, 3372, 3374, 3376, 3378, 3380, 3382, 3384, 3386, 3388, 3390, 3392, 3394, 3396, 3398, 3400, 3402, 3404, 3406, 3408, 3410, 3412, 3414, 3416, 3418, 3420, 3422, 3424, 3426, 3428, 3430, 3432, 3434, 3436, 3438, 3440, 3442, 3444, 3446, 3448, 3450, 3452, 3454, 3456, 3458, 3460, 3462, 3464, 3466, 3468, 3470, 3472, 3474, 3476, 3478, 3480, 3482, 3484, 3486, 3488, 3490, 3492, 3494, 3496, 3498, 3500, 3502, 3504, 3506, 3508, 3510, 3512, 3514, 3516, 3518, 3520, 3522, 3524, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542, 3544, 3546, 3548, 3550, 3552, 3554, 3556, 3558, 3560, 3562, 3564, 3566, 3568, 3570, 3572, 3574, 3576, 3578, 3580, 3582, 3584, 3586, 3588, 3590, 3592, 3594, 3596, 3598, 3600, 3602, 3604, 3606, 3608, 3610, 3612, 3614, 3616, 3618, 3620, 3622, 3624, 3626, 3628, 3630, 3632, 3634, 3636, 3638, 3640, 3642, 3644, 3646, 3648, 3650, 3652, 3654, 3656, 3658, 3660, 3662, 3664, 3666, 3668, 3670, 3672, 3674, 3676, 3678, 3680, 3682, 3684, 3686, 3688, 3690, 3692, 3694, 3696, 3698, 3700, 3702, 3704, 3706, 3708, 3710, 3712, 3714, 3716, 3718, 3720, 3722, 3724, 3726, 3728, 3730, 3732, 3734, 3736, 3738, 3740, 3742, 3744, 3746, 3748, 3750, 3752, 3754, 3756, 3758, 3760, 3762, 3764, 3766, 3768, 3770, 3772, 3774, 3776, 3778, 3780, 3782, 3784, 3786, 3788, 3790, 3792, 3794, 3796, 3798, 3800, 3802, 3804, 3806, 3808, 3810, 3812, 3814, 3816, 3818, 3820, 3822, 3824, 3826, 3828, 3830, 3832, 3834, 3836, 3838, 3840, 3842, 3844, 3846, 3848, 3850, 3852, 3854, 3857, 3859, 3861, 3863, 3865, 3867, 3869, 3871, 3873, 3875, 3877, 3879, 3881, 3883, 3885, 3887, 3889, 3891, 3893, 3895, 3897, 3899, 3901, 3903, 3905, 3907, 3909, 3911, 3913, 3915, 3917, 3919, 3921, 3923, 3925, 3927, 3929, 3931, 3933, 3935, 3937, 3939, 3941, 3943, 3945, 3947, 3949, 3951, 3953, 3955, 3957, 3959, 3961, 3963, 3965, 3967, 3969, 3971, 3973, 3975, 3977, 3979, 3981, 3983, 3985, 3987, 3989, 3991, 3993, 3995, 3997, 3999, 4001, 4003, 4005, 4007, 4009, 4011, 4013, 4015, 4017, 4019, 4021, 4023, 4025, 4027, 4029, 4031, 4033, 4035, 4037, 4039, 4041, 4043, 4045, 4047, 4049, 4051, 4053, 4055, 4057, 4059, 4061, 4063, 4065, 4067, 4069, 4071, 4073, 4075, 4077, 4079, 4081, 4083, 4085, 4087, 4089, 4091, 4093, 4095, 4097, 4099, 4101, 4103, 4105, 4107, 4109, 4111, 4113, 4115, 4117, 4119, 4121, 4123, 4125, 4127, 4129, 4131, 4133, 4135, 4137, 4139, 4141, 4143, 4145, 4147, 4149, 4151, 4153, 4155, 4157, 4159, 4161, 4163, 4165, 4167, 4169, 4171, 4173, 4175, 4177, 4179, 4181, 4183, 4185, 4187, 4189, 4191, 4193, 4195, 4197, 4199, 4201, 4203, 4205, 4207, 4209, 4211, 4213, 4215, 4217, 4219, 4221, 4223, 4225, 4227, 4229, 4231, 4233, 4235, 4237, 4239, 4241, 4243, 4245, 4247, 4250, 4252, 4254, 4256, 4258, 4260, 4262, 4264, 4266, 4268, 4270, 4272, 4274, 4276, 4278, 4280, 4282, 4284, 4286, 4288, 4290, 4292, 4295, 4297, 4301, 4303, 4305, 4307, 4309, 4311, 4313, 4315, 4318, 4320, 4323, 4325, 4331, 4333, 4335, 4337, 4340, 4342, 4344, 4346, 4350, 4352, 4354, 4356, 4358, 4360, 4362, 4364, 4366, 4368, 4370, 4372, 4374, 4376, 4378, 4380, 4382, 4384, 4386, 4388, 4390, 4392, 4394, 4396, 4399, 4401, 4403, 4405, 4407, 4409, 4412, 4414, 4416, 4418, 4421, 4423, 4426, 4428, 4433, 4435, 4437, 4439, 4442, 4444, 4447, 4449, 4454, 4456, 4458, 4460, 4463, 4465, 4467, 4469, 4473, 4475, 4477, 4479, 4481, 4483, 4486, 4488, 4490, 4492, 4494, 4496, 4498, 4500, 4503, 4505, 4508, 4510, 4513, 4515, 4517, 4519, 4521, 4523, 4525, 4527, 4530, 4532, 4535, 4537, 4542, 4544, 4546, 4548, 4551, 4553, 4556, 4558, 4571, 4573, 4575, 4577, 4579, 4581, 4583, 4585, 4587, 4589, 4591, 4593, 4595, 4597, 4599, 4601, 4603, 4605, 4607, 4609, 4611, 4613, 4615, 4617, 4619, 4621, 4623, 4625, 4627, 4629, 4631, 4633, 4635, 4637, 4639, 4641, 4643, 4645, 4647, 4649, 4651, 4653, 4655, 4657, 4660, 4662, 4664, 4666, 4668, 4670, 4672, 4674, 4676, 4678, 4680, 4682, 4684, 4686, 4688, 4690, 4692, 4694, 4696, 4698, 4700, 4702, 4704, 4706, 4708, 4710, 4713, 4715, 4717, 4719, 4722, 4724, 4726, 4728, 4732, 4734, 4737, 4739, 4742, 4744, 4747, 4749, 4752, 4754, 4757, 4759, 4762, 4764, 4766, 4768, 4771, 4773, 4776, 4778, 4783, 4785, 4787, 4789, 4792, 4794, 4797, 4799, 4804, 4806, 4808, 4810, 4812, 4814, 4816, 4818, 4820, 4822, 4824, 4826, 4828, 4830, 4832, 4834, 4836, 4838, 4840, 4842, 4844, 4846, 4848, 4850, 4852, 4854, 4856, 4858, 4860, 4862, 4864, 4866, 4868, 4870, 4872, 4874, 4876, 4878, 4880, 4882, 4884, 4886, 4888, 4890, 4892, 4894, 4896, 4898, 4900, 4902, 4904, 4906, 4908, 4910, 4912, 4914, 4916, 4918, 4920, 4922, 4924, 4926, 4928, 4930, 4932, 4934, 4936, 4938, 4940, 4942, 4944, 4946, 4948, 4950, 4952, 4954, 4956, 4958, 4960, 4962, 4964, 4966, 4968, 4970, 4972, 4974, 4976, 4978, 4980, 4982, 4984, 4986, 4988, 4990, 4992, 4994, 4996, 4998, 5000, 5002, 5004, 5006, 5008, 5010, 5012, 5014, 5016, 5018, 5020, 5022, 5024, 5026, 5028, 5030, 5032, 5034, 5036, 5038, 5040, 5042, 5044, 5046, 5048, 5050, 5052, 5054, 5056, 5058, 5060, 5062, 5064, 5066, 5068, 5070, 5072, 5074, 5076, 5078, 5080, 5082, 5084, 5086, 5088, 5090, 5092, 5094, 5096, 5098, 5100, 5102, 5104, 5106, 5108, 5110, 5112, 5114, 5116, 5118, 5120, 5122, 5124, 5126, 5128, 5130, 5132, 5134, 5136, 5138, 5140, 5142, 5144, 5146, 5148, 5150, 5152, 5154, 5156, 5158, 5160, 5162, 5164, 5166, 5168, 5170, 5172, 5174, 5176, 5178, 5180, 5182, 5184, 5186, 5188, 5190, 5192, 5194, 5196, 5198, 5200, 5202, 5204, 5206, 5208, 5210, 5212, 5214, 5216, 5218, 5220, 5222, 5224, 5226, 5228, 5230, 5232, 5234, 5236, 5238, 5240, 5242, 5244, 5246, 5248, 5250, 5252, 5254, 5256, 5258, 5260, 5262, 5264, 5266, 5268, 5270, 5272, 5274, 5276, 5278, 5280, 5282, 5284, 5286, 5288, 5290, 5292, 5294, 5296, 5298, 5300, 5302, 5304, 5306, 5308, 5310, 5312, 5314, 5316, 5318, 5320, 5322, 5324, 5326, 5328, 5330, 5332, 5334, 5336, 5338, 5340, 5342, 5344, 5346, 5348, 5350, 5352, 5354, 5356, 5358, 5360, 5362, 5364, 5366, 5368, 5370, 5372, 5374, 5376, 5378, 5380, 5382, 5384, 5386, 5388, 5390, 5392, 5394, 5396, 5398, 5400, 5402, 5404, 5406, 5408, 5410, 5412, 5414, 5416, 5418, 5420, 5422, 5424, 5426, 5428, 5430, 5432, 5434, 5436, 5438, 5440, 5442, 5444, 5446, 5448, 5450, 5452, 5454, 5456, 5458, 5460, 5462, 5464, 5466, 5468, 5470, 5472, 5474, 5476, 5478, 5480, 5482, 5484, 5486, 5488, 5490, 5492, 5494, 5496, 5498, 5500, 5502, 5504, 5506, 5508, 5510, 5512, 5514, 5516, 5518, 5520, 5522, 5524, 5526, 5528, 5530, 5532, 5534, 5536, 5538, 5540, 5542, 5544, 5546, 5548, 5550, 5552, 5554, 5556, 5558, 5560, 5562, 5564, 5566, 5568, 5570, 5572, 5574, 5576, 5578, 5580, 5582, 5584, 5586, 5588, 5590, 5592, 5594, 5596, 5598, 5600, 5602, 5604, 5606, 5608, 5610, 5612, 5614, 5616, 5618, 5620, 5622, 5624, 5626, 5628, 5630, 5632, 5634, 5636, 5638, 5640, 5642, 5644, 5646, 5648, 5650, 5652, 5654, 5656, 5658, 5660, 5662, 5664, 5666, 5668, 5670, 5672, 5674, 5676, 5678, 5680, 5682, 5684, 5686, 5688, 5690, 5692, 5694, 5696, 5698, 5700, 5702, 5704, 5706, 5708, 5710, 5712, 5714, 5716, 5718, 5720, 5722, 5724, 5726, 5728, 5730, 5732, 5734, 5736, 5738, 5740, 5742, 5744, 5746, 5748, 5750, 5752, 5754, 5756, 5758, 5760, 5762, 5764, 5766, 5768, 5770, 5772, 5774, 5776, 5778, 5780, 5782, 5784, 5786, 5788, 5790, 5792, 5794, 5796, 5798, 5800, 5802, 5804, 5806, 5808, 5810, 5812, 5814, 5816, 5818, 5820, 5822, 5824, 5826, 5828, 5830, 5832, 5834, 5836, 5838, 5840, 5842, 5844, 5846, 5848, 5850, 5852, 5854, 5856, 5858, 5860, 5862, 5864, 5866, 5868, 5870, 5873, 5875, 5877, 5879, 5881, 5883, 5885, 5887, 5889, 5891, 5893, 5895, 5897, 5899, 5901, 5903, 5905, 5907, 5909, 5911, 5914, 5916, 5918, 5920, 5922, 5924, 5926, 5928, 5930, 5932, 5934, 5936, 5938, 5940, 5942, 5944, 5946, 5948, 5950, 5952, 5954, 5956, 5958, 5960, 5962, 5964, 5966, 5968, 5970, 5972, 5974, 5976, 5978, 5980, 5982, 5984, 5986, 5988, 5990, 5992, 5994, 5996, 5998, 6000, 6002, 6004, 6006, 6008, 6010, 6012, 6014, 6016, 6018, 6020, 6022, 6024, 6026, 6028, 6030, 6032, 6034, 6036, 6038, 6040, 6042, 6044, 6046, 6048, 6050, 6052, 6054, 6056, 6058, 6060, 6062, 6064, 6066, 6068, 6070, 6072, 6074, 6076, 6078, 6080, 6082, 6084, 6086, 6088, 6090, 6092, 6094, 6096, 6098, 6100, 6102, 6104, 6106, 6108, 6110, 6112, 6114, 6116, 6118, 6120, 6122, 6124, 6126, 6128, 6130, 6132, 6134, 6136, 6138, 6140, 6142, 6144, 6146, 6148, 6150, 6152, 6154, 6156, 6158, 6160, 6162, 6164, 6166, 6168, 6170, 6172, 6174, 6176, 6178, 6180, 6182, 6184, 6186, 6188, 6190, 6192, 6195, 6197, 6199, 6201, 6203, 6205, 6207, 6209, 6211, 6213, 6215, 6217, 6219, 6221, 6223, 6225, 6228, 6230, 6232, 6234, 6236, 6238, 6241, 6243, 6245, 6247, 6251, 6253, 6256, 6258, 6261, 6263, 6266, 6268, 6274, 6276, 6279, 6281, 6283, 6285, 6287, 6289, 6291, 6293, 6296, 6298, 6300, 6302, 6305, 6307, 6310, 6312, 6317, 6319, 6321, 6323, 6326, 6328, 6331, 6333, 6338, 6340, 6342, 6344, 6346, 6348, 6350, 6352, 6354, 6356, 6358, 6360, 6362, 6364, 6366, 6368, 6370, 6372, 6374, 6376, 6378, 6380, 6382, 6384, 6386, 6388, 6390, 6392, 6394, 6396, 6398, 6400, 6402, 6404, 6406, 6408, 6410, 6412, 6414, 6416, 6418, 6420, 6422, 6424, 6426, 6428, 6430, 6432, 6434, 6436, 6438, 6440, 6442, 6444, 6446, 6448, 6450, 6452, 6455, 6457, 6459, 6461, 6463, 6465, 6468, 6470, 6472, 6474, 6477, 6479, 6482, 6484, 6489, 6491, 6493, 6495, 6498, 6500, 6503, 6505, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 6526, 6528, 4561, 4563, 4803, 3856, 4803, 3856, 4563, 4561, 4565, 4563, 4561, 4570, 4568, 6629, 6631, 6633, 6635, 6637, 6639, 6641, 6643, 6645, 6647, 6649, 6651, 6653, 6655, 6664, 6666, 6668, 6670, 4570, 4568, 4567, 4565, 4563, 4561, 4563, 4561, 4563, 4561, 4567, 4565, 4567, 4565, 4567, 4565, 4570, 4568, 6698, 6700, 6702, 6704, 6706, 6708, 6710, 6712, 6714, 6716, 6718, 6720, 6722, 6724, 6726, 6728, 6730, 6732, 6734, 6736, 6738, 6740, 6750, 6752, 6754, 6756, 6758, 6760, 6774, 6776, 6778, 6780, 6782, 6784, 6786, 6788, 6792, 6794, 6796, 6798, 4563, 4561, 6812, 6814, 6816, 6818, 6820, 6822, 6824, 6826, 6828, 6830, 6832, 6834, 6836, 6838, 6273, 6271, 6273, 6271, 6855, 6857, 6859, 6861, 6863, 6865, 6867, 6869, 6871, 6873, 4563, 4561, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4567, 4565, 4567, 4565, 4567, 4565, 4567, 4565, 6938, 6940, 6942, 6944, 4330, 4328, 4567, 4565, 4563, 4561, 4567, 4565, 4563, 4561, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 6983, 6985, 6987, 6989, 6991, 6993, 6995, 6997, 6999, 7001, 7003, 7005, 7007, 7009, 7011, 7013, 7023, 7025, 7027, 7029, 7031, 7033, 7035, 7037, 7039, 7041, 7043, 7045, 7047, 7049, 7051, 7053, 7055, 7057, 7059, 7061, 7063, 7065, 7067, 7069, 7071, 7073, 6273, 6271, 7084, 7086, 7088, 7090, 7092, 7094, 7096, 7098, 7100, 7102, 7104, 7106, 7120, 7122, 7124, 7126, 7128, 7130, 7132, 7134, 7136, 7138, 7140, 7142, 7144, 7146, 7148, 7150, 7152, 7154, 7156, 7158, 7160, 7162, 7164, 7166, 6273, 6271, 6273, 6271, 6509, 6497, 7197, 7199, 7201, 7203, 7205, 7207, 7209, 7211, 7213, 7215, 7217, 7219, 7238, 7240, 7242, 7244, 7246, 7248, 7250, 7252, 7254, 7256, 7258, 7260, 7262, 7264, 7266, 7268, 7277, 7279, 7281, 7283, 4563, 4561, 7313, 7315, 7317, 7319, 7321, 7323, 7325, 7327, 7329, 7331, 7333, 7335, 7337, 7339, 4570, 4568, 4570, 4568, 4563, 4561, 4570, 4568, 4563, 4561, 4570, 4568, 4570, 4568, 7440, 7442, 7444, 7446, 7448, 7450, 7452, 7454, 7456, 7458, 7460, 7462, 7464, 7466, 7468, 7470, 4563, 4561, 4570, 4568, 4570, 4568, 4563, 4561, 4563, 4561, 4570, 4568, 4563, 4561, 4563, 4561, 4570, 4568, 7572, 7574, 7576, 7578, 7580, 7582, 7584, 7586, 7588, 7590, 7592, 7594, 7596, 7598, 7600, 7602, 7604, 7606, 7608, 7610, 7612, 7614, 7616, 7618, 7620, 7622, 7624, 7626, 7628, 7630, 7632, 7634, 7652, 7654, 7656, 7658, 7660, 7662, 7664, 7666, 7668, 7670, 7672, 7674, 7676, 7678, 7680, 7682, 7684, 7686, 6273, 6271, 6273, 6271, 7751, 7753, 7755, 7757, 7759, 7761, 7763, 7765, 7767, 7769, 7771, 7773, 7775, 7777, 7779, 7781, 7783, 7785, 7787, 7789, 7791, 7793, 7795, 7797, 7799, 7801, 6335, 6330, 6335, 6330, 6335, 6330, 6335, 6330, 7837, 7839, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859, 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7890, 7892, 7895, 7897, 7899, 7901, 4330, 4328, 4563, 4561, 4565, 4563, 4561, 4563, 4561, 4567, 4570, 4568, 4563, 4561, 4567, 4565, 4330, 4328, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4761, 4761, 8016, 8018, 8020, 8022, 4330, 4328, 4563, 4561, 4563, 4561, 4563, 4561, 4563, 4561, 8100, 8102, 8104, 8106, 8108, 8110, 8112, 8114, 4330, 4328, 4563, 4561, 4563, 4561, 4330, 4328, 4563, 4561, 4563, 4561, 8251, 8253, 8255, 8257, 8259, 8261, 8263, 8265, 8267, 8269, 8271, 8273, 8275, 8277, 8279, 8281, 4570, 4568, 4563, 4561, 8344, 8346, 8348, 8350, 8352, 8354, 8356, 8358, 4563, 4561, 4563, 4561, 4570, 4568, 4568, 4570, 3856, 3856, 4746, 4746, 4803, 3856, 4803, 3856, 8508, 8510, 8512, 8514, 8516, 8518, 8520, 8522, 8524, 8526, 8528, 8530, 8532, 8534, 4330, 4328, 4563, 4561, 4567, 4565, 4330, 4328, 4561, 4563, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4330, 4328, 4339, 4349, 4328, 4330, 4330, 4328, 4339, 4349, 4411, 4411, 4398, 4398, 4432, 4432, 4453, 4453, 4472, 4472, 4529, 4541, 4529, 4541, 4563, 4561, 4563, 4561, 4567, 4565, 4568, 4567, 4565, 4570, 4567, 4565, 4570, 4568, 4659, 4659, 4731, 4731, 4782, 4782, 4803, 4803, 8810, 8812, 8814, 8816, 8818, 8820, 8822, 8824, 8827, 8829, 8831, 8833, 8836, 8838, 8841, 8843, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 8879, 8881, 6509, 6497, 8889, 8891, 8893, 8895, 8897, 8899, 8901, 8903, 8905, 8907, 8909, 8911, 8913, 8915, 6509, 6497, 8933, 8935, 8937, 8939, 8941, 8943, 8945, 8947, 8949, 8951, 8953, 8955, 8957, 8959, 8965, 8967, 8969, 8971, 8973, 8975, 8977, 8979, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 9045, 9047, 9049, 9051, 9053, 9055, 9057, 9059, 9061, 9063, 9065, 9067, 9069, 9071, 9073, 9075, 9077, 9079, 9081, 9083, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 9119, 9121, 9123, 9125, 9127, 9129, 9131, 9133, 9135, 9137, 9139, 9141, 9143, 9145, 9147, 9149, 9151, 9153, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6509, 6497, 9264, 9266, 9268, 9270, 9272, 9274, 9276, 9278, 9280, 9282, 9285, 9287, 9289, 9291, 6270, 6278, 6270, 6278, 6467, 6509, 6497, 9406, 9408, 9410, 9412, 9414, 9416, 9418, 9420, 9422, 9424, 9426, 9428, 9431, 9433, 9435, 9437, 9441, 9443, 9445, 9447, 6265, 6265, 6194, 6194, 6273, 6271, 6273, 6271, 6250, 6250, 6273, 6271, 6273, 6271, 6295, 6295, 6316, 6316, 6337, 6337, 6497, 6509, 9551, 9553, 6467, 6488, 6467, 6509, 6497, 6488, 6488, 6497, 6509, 9589, 9591, 9593, 9595, 9598, 9600, 9603, 9605, 9612, 9614, 9617, 9619, 9622, 9624, 9633, 9635, 9637, 9639, 9642, 9644, 9647, 9649, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 9621, 9616, 9641, 9653, 9621, 9616, 9621, 9616, 9641, 9653, 9651, 9646, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9630, 9628, 9586, 9584, 9586, 9584, 9616, 9621, 9616, 9621, 9586, 9584, 9586, 9584, 9616, 9621, 9616, 9621, 9630, 9628, 9630, 9628, 9641, 9653, 7889, 9630, 9628, 9630, 9628, 9651, 9646, 9641, 9653, 9630, 9628, 9630, 9628, 9651, 9646, 9641, 9653, 9621, 9616, 7889, 9621, 9616, 8852, 8850, 8852, 8850, 8854, 8849, 8854, 8849, 9611, 7889, 9630, 9628, 9611, 7889, 9611, 7889, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9630, 9628, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9611, 7889, 9586, 9584, 9586, 9584, 9611, 7889, 9611, 7889, 9641, 9653, 9611, 7889, 9611, 7889, 9630, 9628, 9586, 9584, 9611, 7889, 9586, 9584, 9586, 9584, 9611, 7889, 9630, 9628, 8854, 8849, 8850, 8852, 8850, 8854, 8849, 8852, 8852, 8850, 8854, 8849, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9630, 9628, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9611, 7889, 9630, 9628, 9630, 9628, 9630, 9628, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 7836, 9586, 9584, 7836, 9611, 7889, 9611, 7889, 9630, 9628, 9630, 9628, 9630, 9628, 9630, 9628, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 8852, 8850, 8849, 8852, 8850, 8854, 8852, 8850, 8826, 8826, 8847, 8847, 8852, 8850, 8854, 8849, 8852, 8850, 8849, 8852, 8850, 8854, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9630, 9628, 9630, 9628, 9621, 9616, 9621, 9616, 9630, 9628, 9641, 9609, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9641, 9653, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9597, 9611, 9621, 9616, 9630, 9628, 9626, 9630, 9628, 9630, 9628, 9626, 9630, 9628, 9653, 9586, 9584, 9586, 9584, 9588, 9586, 9584, 9588, 9597, 9609, 9611, 9630, 9628, 9630, 9628, 9632, 9630, 9628, 9632, 9641, 9653, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14624, 14626, 14628, 14630, 14632, 14634, 14636, 14638, 14640, 14642, 14644, 14646, 14648, 14650, 14652, 14654, 14656, 14658, 14660, 14662, 14664, 14666, 14668, 14670, 14672, 14674, 14676, 14678, 14680, 14682, 14684, 14686, 14688, 14690, 14692, 14694, 14696, 14698, 14700, 14702, 14704, 14706, 14708, 14710, 14712, 14714, 14716, 14718, 14720, 14722, 14724, 14726, 14728, 14730, 14732, 14734, 14736, 14738, 14740, 14742, 14744, 14746, 14748, 14750, 14752, 14754, 14756, 14758, 14760, 14762, 14764, 14766, 14768, 14770, 14772, 14774, 14776, 14778, 14780, 14782, 14784, 14786, 14788, 14790, 14792, 14794, 14796, 14798, 14800, 14802, 14804, 14806, 14808, 14810, 14812, 14814, 14816, 14818, 14820, 14822, 14824, 14826, 14828, 14830, 14832, 14834, 14836, 14838, 14840, 14842, 14844, 14846, 14848, 14850, 14852, 14854, 14856, 14858, 14860, 14862, 14864, 14866, 14868, 14870, 14872, 14874, 14876, 14878, 14880, 14882, 14884, 14886, 14888, 14890, 14892, 14894, 14896, 14898, 14900, 14902, 14904, 14906, 14908, 14910, 14912, 14914, 14916, 14918, 14920, 14922, 14924, 14926, 14928, 14930, 14932, 14934, 14936, 14938, 14940, 14942, 14944, 14946, 14948, 14950, 14952, 14954, 14956, 14958, 14960, 14962, 14964, 14966, 14968, 14970, 14972, 14974, 14976, 14978, 14980, 14982, 14984, 14986, 14988, 14990, 14992, 14994, 14996, 14998, 15000, 15002, 15004, 15006, 15008, 15010, 15012, 15014, 15016, 15018, 15020, 15022, 15024, 15026, 15028, 15030, 15032, 15034, 15036, 15038, 15040, 15042, 15044, 15046, 15048, 15050, 15052, 15054, 15056, 15058, 15060, 15062, 15064, 15066, 15068, 15070, 15072, 15074, 15076, 15078, 15080, 15082, 15084, 15086, 15088, 15090, 15092, 15094, 15096, 15098, 15100, 15102, 15104, 15106, 15108, 15110, 15112, 15114, 15116, 15118, 15120, 15122, 15124, 15126, 15128, 15130, 15132, 15134, 15136, 15138, 15140, 15142, 15144, 15146, 15148, 15150, 15152, 15154, 15156, 15158, 15160, 15162, 15164, 15166, 15168, 15170, 15172, 15174, 15176, 15178, 15180, 15182, 15184, 15186, 15188, 15190, 15192, 15194, 15196, 15198, 15200, 15202, 15204, 15206, 15208, 15210, 15212, 15214, 15216, 15218, 15220, 15222, 15224, 15226, 15228, 15230, 15232, 15234, 15236, 15238, 15240, 15242, 15244, 15246, 15248, 15250, 15252, 15254, 15256, 15258, 15260, 15262, 15264, 15266, 15268, 15270, 15272, 15274, 15276, 15278, 15280, 15282, 15284, 15286, 15288, 15290, 15292, 15294, 15296, 15298, 15300, 15302, 15304, 15306, 15308, 15310, 15312, 15314, 15316, 15318, 15320, 15322, 15324, 15326, 15328, 15330, 15332, 15334, 15336, 15338, 15340, 15342, 15344, 15346, 15348, 15350, 15352, 15354, 15356, 15358, 15360, 15362, 15364, 15366, 15368, 15370, 15372, 15374, 15376, 15378, 15380, 15382, 15384, 15386, 15388, 15390, 15392, 15394, 15396, 15398, 15400, 15402, 15404, 15406, 15408, 15410, 15412, 15414, 15416, 15418, 15420, 15422, 15424, 15426, 15428, 15430, 15432, 15434, 15436, 15438, 15440, 15442, 15444, 15446, 15448, 15450, 15452, 15454, 15456, 15458, 15460, 15462, 15464, 15466, 15468, 15470, 15472, 15474, 15476, 15478, 15480, 15482, 15484, 15486, 15488, 15490, 15492, 15494, 15496, 15498, 15500, 15502, 15504, 15506, 15508, 15510, 15512, 15514, 15516, 15518, 15520, 15522, 15524, 15526, 15528, 15530, 15532, 15534, 15536, 15538, 15540, 15542, 15544, 15546, 15548, 15550, 15552, 15554, 15556, 15558, 15560, 15562, 15564, 15566, 15568, 15570, 15572, 15574, 15576, 15578, 15580, 15582, 15584, 15586, 15588, 15590, 15592, 15594, 15596, 15598, 15600, 15602, 15604, 15606, 15608, 15610, 15612, 15614, 15616, 15618, 15620, 15622, 15624, 15626, 15628, 15630, 15632, 15634, 15636, 15638, 15640, 15642, 15644, 15646, 15648, 15650, 15652, 15654, 15656, 15658, 15660, 15662, 15664, 15666, 15668, 15670, 15672, 15674, 15676, 15678, 15680, 15682, 15684, 15686, 15688, 15690, 15692, 15694, 15696, 15698, 15700, 15702, 15704, 15706, 15708, 15710, 15712, 15714, 15716, 15718, 15720, 15722, 15724, 15726, 15728, 15730, 15732, 15734, 15736, 15738, 15740, 15742, 15744, 15746, 15748, 15750, 15752, 15754, 15756, 15758, 15760, 15762, 15764, 15766, 15768, 15770, 15772, 15774, 15776, 15778, 15780, 15782, 15784, 15786, 15788, 15790, 15792, 15794, 15796, 15798, 15800, 15802, 15804, 15806, 15808, 15810, 15812, 15814, 15816, 15818, 15820, 15822, 15824, 15826, 15828, 15830, 15832, 15834, 15836, 15838, 15840, 15842, 15844, 15846, 15848, 15850, 15852, 15854, 15856, 15858, 15860, 15862, 15864, 15866, 15868, 15870, 15872, 15874, 15876, 15878, 15880, 15882, 15884, 15886, 15888, 15890, 15892, 15894, 15896, 15898, 15900, 15902, 15904, 15906, 15908, 15910, 15912, 15914, 15916, 15918, 15920, 15922, 15924, 15926, 15928, 15930, 15932, 15934, 15936, 15938, 15940, 15942, 15944, 15946, 15948, 15950, 15952, 15954, 15956, 15958, 15960, 15962, 15964, 15966, 15968, 15970, 15972, 15974, 15976, 15978, 15980, 15982, 15984, 15986, 15988, 15990, 15992, 15994, 15996, 15998, 16000, 16002, 16004, 16006, 16008, 16010, 16012, 16014, 16016, 16018, 16020, 16022, 16024, 16026, 16028, 16030, 16032, 16034, 16036, 16038, 16040, 16042, 16044, 16046, 16048, 16050, 16052, 16054, 16056, 16058, 16060, 16062, 16064, 16066, 16068, 16070, 16072, 16074, 16076, 16078, 16080, 16082, 16084, 16086, 16088, 16090, 16092, 16094, 16096, 16098, 16100, 16102, 16104, 16106, 16108, 16110, 16112, 16114, 16116, 16118, 16120, 16122, 16124, 16126, 16128, 16130, 16132, 16134, 16136, 16138, 16140, 16142, 16144, 16146, 16148, 16150, 16152, 16154, 16156, 16158, 16160, 16162, 16164, 16166, 16168, 16170, 16172, 16174, 16176, 16178, 16180, 16182, 16184, 16186, 16188, 16190, 16192, 16194, 16196, 16198, 16200, 16202, 16204, 16206, 16208, 16210, 16212, 16214, 16216, 16218, 16220, 16222, 16224, 16226, 16228, 16230, 16232, 16234, 16236, 16238, 16240, 16242, 16244, 16246, 16248, 16250, 16252, 16254, 16256, 16258, 16260, 16262, 16264, 16266, 16268, 16270, 16272, 16274, 16276, 16278, 16280, 16282, 16284, 16286, 16288, 16290, 16292, 16294, 16296, 16298, 16300, 16302, 16304, 16306, 16308, 16310, 16312, 16314, 16316, 16318, 16320, 16322, 16324, 16326, 16328, 16330, 16332, 16334, 16336, 16338, 16340, 16342, 16344, 16346, 16348, 16350, 16352, 16354, 16356, 16358, 16360, 16362, 16364, 16366, 16368, 16370, 16372, 16374, 16376, 16378, 16380, 16382, 16384, 16386, 16388, 16390, 16392, 16394, 16396, 16398, 16400, 16402, 16404, 16406, 16408, 16410, 16412, 16414, 16416, 16418, 16420, 16422, 16424, 16426, 16428, 16430, 16432, 16434, 16436, 16438, 16440, 16442, 16444, 16446, 16448, 16450, 16452, 16454, 16456, 16458, 16460, 16462, 16464, 16466, 16468, 16470, 16472, 16474, 16476, 16478, 16480, 16482, 16484, 16486, 16488, 16490, 16492, 16494, 16496, 16498, 16500, 16502, 16504, 16506, 16508, 16510, 16512, 16514, 16516, 16518, 16520, 16522, 16524, 16526, 16528, 16530, 16532, 16534, 16536, 16538, 16540, 16542, 16544, 16546, 16548, 16550, 16552, 16554, 16556, 16558, 16560, 16562, 16564, 16566, 16568, 16570, 16572, 16574, 16576, 16578, 16580, 16582, 16584, 16586, 16588, 16590, 16592, 16594, 16596, 16598, 16600, 16602, 16604, 16606, 16608, 16610, 16612, 16614, 16616, 16618, 16620, 16622, 16624, 16626, 16628, 16630, 16632, 16634, 16636, 16638, 16640, 16642, 16644, 16646, 16648, 16650, 16652, 16654, 16656, 16658, 16660, 16662, 16664, 16666, 16668, 16670, 16672, 16674, 16676, 16678, 16680, 16682, 16684, 16686, 16688, 16690, 16692, 16694, 16696, 16698, 16700, 16702, 16704, 16706, 16708, 16710, 16712, 16714, 16716, 16718, 16720, 16722, 16724, 16726, 16728, 16730, 16732, 16734, 16736, 16738, 16740, 16742, 16744, 16746, 16748, 16750, 16752, 16754, 16756, 16758, 16760, 16762, 16764, 16766, 16768, 16770, 16772, 16774, 16776, 16778, 16780, 16782, 16784, 16786, 16788, 16790, 16792, 16794, 16796, 16798, 16800, 16802, 16804, 16806, 16808, 16810, 16812, 16814, 16816, 16818, 16820, 16822, 16824, 16826, 16828, 16830, 16832, 16834, 16836, 16838, 16840, 16842, 16844, 16846, 16848, 16850, 16852, 16854, 16856, 16858, 16860, 16862, 16864, 16866, 16868, 16870, 16872, 16874, 16876, 16878, 16880, 16882, 16884, 16886, 16888, 16890, 16892, 16894, 16896, 16898, 16900, 16902, 16904, 16906, 16908, 16910, 16912, 16914, 16916, 16918, 16920, 16922, 16924, 16926, 16928, 16930, 16932, 16934, 16936, 16938, 16940, 16942, 16944, 16946, 16948, 16950, 16952, 16954, 16956, 16958, 16960, 16962, 16964, 16966, 16968, 16970, 16972, 16974, 16976, 16978, 16980, 16982, 16984, 16986, 16988, 16990, 16992, 16994, 16996, 16998, 17000, 17002, 17004, 17006, 17008, 17010, 17012, 17014, 17016, 17018, 17020, 17022, 17024, 17026, 17028, 17030, 17032, 17034, 17036, 17038, 17040, 17042, 17044, 17046, 17048, 17050, 17052, 17054, 17056, 17058, 17060, 17062, 17064, 17066, 17068, 17070, 17072, 17074, 17076, 17078, 17080, 17082, 17084, 17086, 17088, 17090, 17092, 17094, 17096, 17098, 17100, 17102, 17104, 17106, 17108, 17110, 17112, 17114, 17116, 17118, 17120, 17122, 17124, 17126, 17128, 17130, 17132, 17134, 17136, 17138, 17140, 17142, 17144, 17146, 17148, 17150, 17152, 17154, 17156, 17158, 17160, 17162, 17164, 17166, 17168, 17170, 17172, 17174, 17176, 17178, 17180, 17182, 17184, 17186, 17188, 17190, 17192, 17194, 17196, 17198, 17200, 17202, 17204, 17206, 17208, 17210, 17212, 17214, 17216, 17218, 17220, 17222, 17224, 17226, 17228, 17230, 17232, 17234, 17236, 17238, 17240, 17242, 17244, 17246, 17248, 17250, 17252, 17254, 17256, 17258, 17260, 17262, 17264, 17266, 17268, 17270, 17272, 17274, 17276, 17278, 17280, 17282, 17284, 17286, 17288, 17290, 17292, 17294, 17296, 17298, 17300, 17302, 17304, 17306, 17308, 17310, 17312, 17314, 17316, 17318, 17320, 17322, 17324, 17326, 17328, 17330, 17332, 17334, 17336, 17338, 17340, 17342, 17344, 17346, 17348, 17350, 17352, 17354, 17356, 17358, 17360, 17362, 17364, 17366, 17368, 17370, 17372, 17374, 17376, 17378, 17380, 17382, 17384, 17386, 17388, 17390, 17392, 17394, 17396, 17398, 17400, 17402, 17404, 17406, 17408, 17410, 17412, 17414, 17416, 17418, 17420, 17422, 17424, 17426, 17428, 17430, 17432, 17434, 17436, 17438, 17440, 17442, 17444, 17446, 17448, 17450, 17452, 17454, 17456, 17458, 17460, 17462, 17464, 17466, 17468, 17470, 17472, 17474, 17476, 17478, 17480, 17482, 17484, 17486, 17488, 17490, 17492, 17494, 17496, 17498, 17500, 17502, 17504, 17506, 17508, 17510, 17512, 17514, 17516, 17518, 17520, 17522, 17524, 17526, 17528, 17530, 17532, 17534, 17536, 17538, 17540, 17542, 17544, 17546, 17548, 17550, 17552, 17554, 17556, 17558, 17560, 17562, 17564, 17566, 17568, 17570, 17572, 17574, 17576, 17578, 17580, 17582, 17584, 17586, 17588, 17590, 17592, 17594, 17596, 17598, 17600, 17602, 17604, 17606, 17608, 17610, 17612, 17614, 17616, 17618, 17620, 17622, 17624, 17626, 17628, 17630, 17632, 17634, 17636, 17638, 17640, 17642, 17644, 17646, 17648, 17650, 17652, 17654, 17656, 17658, 17660, 17662, 17664, 17666, 17668, 17670, 17672, 17674, 17676, 17678, 17680, 17682, 17684, 17686, 17688, 17690, 17692, 17694, 17696, 17698, 17700, 17702, 17704, 17706, 17708, 17710, 17712, 17714, 17716, 17718, 17720, 17722, 17724, 17726, 17728, 17730, 17732, 17734, 17736, 17738, 17740, 17742, 17744, 17746, 17748, 17750, 17752, 17754, 17756, 17758, 17760, 17762, 17764, 17766, 17768, 17770, 17772, 17774, 17776, 17778, 17780, 17782, 17784, 17786, 17788, 17790, 17792, 17794, 17796, 17798, 17800, 17802, 17804, 17806, 17808, 17810, 17812, 17814, 17816, 17818, 17820, 17822, 17823, 17824, 17825, 17826, 17827, 17828, 17829, 17830, 17831, 17832, 17833, 17834, 17835, 17836, 17837, 17838, 17840, 17841, 17842, 17843, 17844, 17845, 17846, 17847, 17848, 17849, 17850, 17851, 17852, 17853, 17855, 17857, 17859, 17861, 17863, 17865, 17867, 17869, 17871, 17872, 17873, 17874, 17875, 17876, 17877, 17878, 17879, 17880, 17881, 17882, 17883, 17884, 17885, 17886, 17887, 17888, 17889, 17891, 17893, 17895, 17897, 17899, 17901, 17903, 17905, 17907, 17909, 17911, 17913, 17915, 17917, 17919, 17921, 17923, 17925, 17927, 17929, 17930, 17931, 17933, 17935, 17937, 17939, 17941, 17943, 17945, 17946, 17947, 17948, 17949, 17951, 17953, 17955, 17957, 17959, 17960, 17961, 17962, 17963, 17964, 17965, 17966, 17967, 17968, 17969, 17970, 17971, 17972, 17973, 17974, 17975, 17976, 17977, 17979, 17981, 17982, 17983, 17984, 17985, 17986, 17987, 17988, 17989, 17990, 17991, 17992, 17993, 17994, 17995, 17996, 17997, 17998, 17999, 18000, 18001, 18003, 18005, 18007, 18009, 18011, 18013, 18015, 18017, 18019, 18021, 18023, 18025, 18027, 18029, 18031, 18033, 18035, 18037, 18039, 18041, 18043, 18044, 18045, 18047, 18049, 18051, 18053, 18055, 18057, 18059, 18061, 18063, 18065, 18067, 18069, 18071, 18073, 18075, 18077, 18079, 18081, 18082, 18083, 18084, 18085, 18086, 18087, 18089, 18091, 18093, 18095, 18097, 18099, 18101, 18103, 18105, 18107, 18109, 18111, 18113, 18115, 18117, 18119, 18120, 18121, 18123, 18125, 18127, 18129, 18131, 18133, 18135, 18136, 18137, 18138, 18139, 18140, 18141, 18142, 18143, 18144, 18145, 18146, 18147, 18148, 18149, 18151, 18153, 18155, 18157, 18159, 18161, 18163, 18165, 18166, 18167, 18168, 18169, 18170, 18171, 18172, 18173, 18174, 18175, 18176, 18177, 18178, 18179, 18180, 18181, 18182, 18183, 18185, 18187, 18189, 18191, 18193, 18195, 18197, 18199, 18201, 18203, 18205, 18207, 18209, 18211, 18213, 18215, 18217, 18219, 18221, 18223, 18225, 18227, 18229, 18231, 18233, 18234, 18235, 18236, 18237, 18239, 18241, 18243, 18245, 18247, 18249, 18251, 18253, 18255, 18257, 18259, 18261, 18263, 18264, 18265, 18266, 18267, 18268, 18269, 18270, 18271, 18273, 18275, 18277, 18279, 18281, 18283, 18285, 18287, 18289, 18291, 18293, 18295, 18297, 18299, 18301, 18303, 18304, 18305, 18306, 18307, 18308, 18309, 18310, 18311, 18312, 18313, 18314, 18315, 18316, 18317, 18318, 18319, 18320, 18321, 18322, 18323, 18324, 18325, 18326, 18327, 18328, 18329, 18330, 18331, 18332, 18333, 18335, 18337, 18338, 18339, 18340, 18341, 18342, 18343, 18344, 18345, 18346, 18347, 18349, 18351, 18353, 18355, 18356, 18357, 18358, 18359, 18360, 18361, 18362, 18363, 18364, 18365, 18366, 18367, 18369, 18371, 18373, 18375, 18377, 18379, 18381, 18383, 18384, 18385, 18386, 18387, 18389, 18391, 18393, 18395, 18396, 18397, 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406, 18407, 18408, 18409, 18410, 18411, 18413, 18415, 18417, 18419, 18421, 18423, 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433, 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442, 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451, 18452, 18453, 18454, 18455, 18456, 18457, 18458, 18459, 18460, 18461, 18462, 18463, 18464, 18465, 18466, 18467, 18468, 18469, 18470, 18471, 18472, 18473, 18474, 18475, 18476, 18477, 18478, 18479, 18480, 18481, 18482, 18483, 18484, 18485, 18486, 18487, 18488, 18489, 18490, 18491, 18493, 18495, 18497, 18499, 18501, 18503, 18505, 18507, 18508, 18509, 18510, 18511, 18512, 18513, 18514, 18515, 18517, 18518, 18519, 18521, 18523, 18525, 18527, 18529, 18531, 18533, 18534, 18535, 18537, 18539, 18541, 18543, 18545, 18547, 18549, 18551, 18553, 18555, 18557, 18558, 18559, 18560, 18561, 18562, 18563, 18564, 18565, 18567, 18569, 18571, 18573, 18575, 18577, 18579, 18581, 18583, 18585, 18586, 18587, 18588, 18589, 18590, 18591, 18592, 18593, 18595, 18597, 18599, 18601, 18603, 18605, 18607, 18609, 18611, 18612, 18613, 18614, 18615, 18616, 18617, 18618, 18619, 18620, 18621, 18622, 18623, 18624, 18625, 18627, 18629, 18631, 18633, 18635, 18637, 18639, 18640, 18641, 18642, 18643, 18644, 18645, 18646, 18648, 18650, 18652, 18654, 18656, 18658, 18660, 18662, 18664, 18666, 18667, 18668, 18669, 18670, 18671, 18672, 18673, 18674, 18675, 18676, 18677, 18678, 18679, 18680, 18681, 18682, 18683, 18684, 18685, 18686, 18687, 18688, 18690, 18691, 18692, 18693, 18694, 18695, 18696, 18697, 18698, 18699, 18701, 18703, 18705, 18707, 18709, 18711, 18713, 18715, 18717, 18719, 18721, 18722, 18723, 18724, 18725, 18726, 18727, 18728, 18729, 18730, 18731, 18732, 18733, 18734, 18735, 18736, 18737, 18738, 18739, 18740, 18741, 18742, 18743, 18744, 18745, 18746, 18747, 18748, 18749, 18750, 18751, 18752, 18753, 18754, 18755, 18756, 18757, 18758, 18759, 18760, 18761, 18762, 18763, 18764, 18765, 18766, 18767, 18768, 18769, 18770, 18771, 18772, 18773, 18774, 18775, 18776, 18777, 18778, 18779, 18780, 18781, 18782, 18783, 18784, 18785, 18786, 18787, 18788, 18789, 18790, 18791, 18792, 18793, 18794, 18795, 18796, 18797, 18798, 18799, 18800, 18801, 18802, 18803, 18804, 18805, 18806, 18807, 18808, 18809, 18810, 18811, 18812, 18813, 18814, 18815, 18816, 18817, 18818, 18819, 18820, 18821, 18822, 18823, 18824, 18825, 18826, 18827, 18828, 18829, 18830, 18831, 18832, 18833, 18834, 18835, 18836, 18837, 18838, 18839, 18840, 18841, 18842, 18843, 18844, 18845, 18846, 18847, 18848, 18849, 18850, 18851, 18852, 18853, 18854, 18855, 18856, 18857, 18858, 18859, 18860, 18861, 18862, 18863, 18864, 18865, 18866, 18867, 18868, 18869, 18870, 18871, 18872, 18873, 18874, 18875, 18876, 18877, 18878, 18879, 18880, 18881, 18882, 18883, 18884, 18885, 18886, 18887, 18888, 18889, 18890, 18891, 18892, 18893, 18894, 18895, 18896, 18897, 18898, 18899, 18900, 18901, 18902, 18903, 18904, 18905, 18906, 18907, 18908, 18909, 18910, 18911, 18912, 18913, 18914, 18915, 18916, 18917, 18918, 18919, 18920, 18921, 18922, 18923, 18924, 18925, 18926, 18927, 18928, 18929, 18930, 18931, 18932, 18933, 18934, 18935, 18936, 18937, 18938, 18939, 18940, 18941, 18942, 18943, 18944, 18945, 18946, 18947, 18948, 18949, 18950, 18951, 18952, 18953, 18954, 18955, 18956, 18957, 18958, 18959, 18960, 18961, 18962, 18963, 18964, 18965, 18966, 18967, 18968, 18969, 18970, 18971, 18972, 18973, 18974, 18975, 18976, 18977, 18978, 18979, 18980, 18981, 18982, 18983, 18984, 18985, 18986, 18987, 18988, 18989, 18990, 18991, 18992, 18993, 18994, 18995, 18996, 18997, 18998, 18999, 19000, 19001, 19002, 19003, 19004, 19005, 19006, 19007, 19008, 19009, 19010, 19011, 19012, 19013, 19014, 19015, 19016, 19017, 19018, 19019, 19020, 19021, 19022, 19023, 19024, 19025, 19026, 19027, 19028, 19029, 19030, 19031, 19032, 19033, 19034, 19035, 19036, 19037, 19038, 19039, 19040, 19041, 19042, 19043, 19044, 19045, 19046, 19047, 19048, 19049, 19050, 19051, 19052, 19053, 19054, 19055, 19056, 19057, 19058, 19059, 19060, 19061, 19062, 19063, 19064, 19065, 19066, 19067, 19068, 19069, 19070, 19071, 19072, 19073, 19074, 19075, 19076, 19077, 19078, 19079, 19080, 19081, 19082, 19083, 19084, 19085, 19086, 19087, 19088, 19089, 19090, 19091, 19092, 19093, 19094, 19095, 19096, 19097, 19098, 19099, 19100, 19101, 19102, 19103, 19104, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 20735, 20737, 20739, 20741, 20743, 20745, 20747, 20749, 4801, 4796, 4299, 4294, 4555, 4555, 4567, 4565, 4567, 4565, 4451, 4446, 4539, 4539, 4539, 4539, 4560, 4555, 4567, 4565, 4299, 4294, 4327, 4322, 4534, 4534, 4472, 4534, 4534, 4567, 4565, 4560, 4560, 4567, 4565, 4567, 4565, 4780, 4775, 4780, 4775, 4801, 4796, 20754, 4801, 4796, 20756, 4327, 4322, 4512, 4507, 4539, 4534, 4430, 4425, 4430, 4425, 4430, 4425, 4512, 4507, 4539, 4534, 4512, 4507, 20758, 4451, 4446, 4485, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 20761, 4567, 4567, 4567, 20763, 4736, 4736, 4736, 4746, 4756, 4751, 4712, 4756, 4751, 4761, 4756, 4751, 4761, 4796, 4801, 19214, 4761, 4430, 4425, 4451, 4446, 20774, 20776, 4539, 4534, 20778, 20780, 20782, 4560, 4555, 20784, 20786, 20788, 20790, 6335, 6330, 6335, 6330, 6507, 6502, 6507, 6502, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 4539, 4534, 4560, 4555, 4560, 4555, 4560, 4555, 20812, 4796, 4801, 6273, 6271, 20821, 20823, 6335, 6330, 6486, 6481, 6486, 6481, 6507, 6502, 6467, 4299, 4294, 4327, 4322, 4539, 4534, 20830, 4567, 4565, 4327, 4322, 4539, 4534, 4327, 4322, 4485, 4560, 4555, 20832, 20834, 20836, 20838, 20840, 4327, 4322, 4299, 4294, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4539, 4534, 4560, 4555, 20842, 20844, 20846, 4741, 4736, 4731, 4736, 4741, 4746, 4741, 4736, 4731, 4736, 4741, 4746, 20850, 19300, 4451, 4446, 4451, 4446, 4512, 4507, 4512, 4507, 4539, 4534, 20852, 20854, 20856, 4299, 4294, 4512, 4507, 4512, 4507, 20858, 20860, 20862, 20864, 20866, 20868, 4451, 4446, 4451, 4446, 4780, 4775, 4780, 4775, 6260, 6255, 20891, 6270, 6335, 6330, 6335, 6330, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6273, 6271, 6270, 20911, 6270, 20913, 6278, 6335, 6330, 6335, 6330, 6502, 6507, 20915, 19361, 4712, 4756, 4751, 4761, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4756, 4751, 4712, 19377, 4761, 4299, 4294, 4299, 4294, 19384, 4780, 4775, 4451, 4446, 4485, 4539, 4534, 4539, 4534, 4560, 4555, 4560, 4555, 20933, 4736, 4746, 4736, 4731, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4512, 4507, 19416, 4451, 4446, 4451, 4446, 4539, 4534, 4567, 4565, 20942, 4567, 4565, 20944, 4756, 4751, 4761, 19431, 4712, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4761, 4327, 4322, 19446, 4299, 4294, 4327, 4322, 4327, 4322, 4430, 4425, 4451, 4446, 4451, 4446, 4560, 4555, 20946, 4567, 4565, 4567, 4565, 20948, 4327, 4322, 4560, 4555, 4560, 4555, 20950, 4567, 4565, 20952, 4567, 4565, 20954, 4741, 4736, 4731, 4736, 4741, 4746, 4756, 4751, 4761, 19484, 4712, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4796, 4801, 4756, 4751, 4761, 4327, 4322, 19504, 4299, 4294, 4299, 4294, 4327, 4322, 19512, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4451, 4446, 4512, 4507, 19526, 4539, 4534, 4560, 4555, 4560, 4555, 20964, 4567, 4565, 20966, 4567, 4565, 20968, 4327, 4322, 4327, 4322, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4451, 4446, 4451, 4446, 4539, 4534, 4560, 4555, 20970, 4560, 4555, 20972, 4567, 4565, 20974, 4560, 4555, 20976, 4560, 4555, 20978, 4567, 4565, 20980, 4756, 4751, 4712, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4780, 4775, 4780, 4775, 4801, 4796, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6271, 6273, 6270, 6309, 6309, 6309, 6309, 6335, 6330, 6330, 6335, 6260, 6255, 6260, 6255, 6260, 6255, 6255, 6260, 6273, 6271, 6273, 6271, 6273, 6271, 6270, 6314, 6314, 6314, 6314, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21007, 6270, 21009, 6278, 6335, 6330, 6335, 6330, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 21024, 21026, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 21028, 21030, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 21048, 21050, 4327, 4322, 19660, 4512, 4507, 4512, 4507, 21053, 21055, 21058, 19666, 4411, 4485, 4560, 4555, 21060, 21062, 4299, 4294, 4327, 4322, 21064, 19676, 4560, 4555, 21066, 21068, 21070, 21072, 21074, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4741, 4736, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4741, 4736, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4756, 4751, 19706, 4712, 19709, 4780, 4775, 4801, 4796, 4327, 4322, 21080, 4560, 4555, 21082, 4567, 4299, 4294, 4327, 4322, 4411, 4451, 4446, 4512, 4507, 4512, 4507, 4512, 4507, 4485, 4539, 4534, 4539, 4534, 4512, 4507, 4560, 4555, 21084, 4560, 4555, 21086, 4560, 4555, 21088, 4741, 4731, 4741, 4746, 4741, 4741, 4741, 4746, 4756, 4751, 4761, 4741, 4741, 4741, 4746, 19760, 4761, 4801, 4796, 4327, 4322, 4327, 4322, 19769, 4430, 4425, 4451, 4446, 4485, 4539, 4534, 4539, 4534, 4567, 4565, 4327, 4322, 4327, 4322, 4327, 4322, 21094, 4327, 4322, 4451, 4446, 4430, 4425, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4512, 4507, 4472, 4485, 4539, 4534, 4539, 4534, 21096, 4560, 4555, 21098, 4565, 4565, 4565, 4299, 4294, 4299, 4294, 21100, 19824, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4411, 4430, 4425, 4512, 4507, 19841, 19843, 4539, 4534, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4560, 4555, 21102, 4560, 4555, 21104, 4567, 4567, 4567, 4567, 4741, 4731, 4741, 4746, 4756, 4751, 4712, 4741, 4741, 4741, 4741, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4741, 4741, 4741, 4746, 19892, 4761, 4741, 4741, 4741, 4746, 4756, 4751, 4712, 19902, 4780, 4775, 4801, 4796, 4801, 4796, 4430, 4425, 4327, 4322, 4327, 4322, 4430, 4425, 4430, 4425, 4430, 4425, 4567, 4565, 21114, 4567, 4565, 4567, 4565, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 19933, 19935, 4451, 4446, 4430, 4425, 4451, 4446, 4485, 21116, 4567, 4565, 4567, 4565, 4567, 4565, 19948, 4712, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4327, 4322, 4430, 4425, 4512, 4507, 4472, 4512, 4507, 4565, 4327, 4322, 4299, 4294, 4327, 4322, 19981, 4430, 4425, 4430, 4425, 4430, 4425, 4485, 4539, 4534, 21122, 4560, 4555, 4565, 4565, 4565, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 4327, 4322, 4327, 4322, 20009, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4472, 4539, 4534, 4539, 4534, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4560, 4555, 4560, 4555, 4560, 4555, 21124, 4567, 21126, 4567, 4567, 4736, 4736, 4736, 4746, 4756, 4751, 4712, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4736, 4736, 4736, 4736, 4756, 4751, 4712, 20089, 4761, 4780, 4775, 4780, 4775, 4801, 4796, 21134, 4801, 4796, 21136, 4327, 4322, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 21145, 4327, 4322, 4327, 4322, 4299, 4294, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4430, 4425, 4411, 4485, 4539, 4534, 20134, 4539, 4534, 21147, 21149, 4327, 4322, 4327, 4322, 4327, 4322, 4327, 4322, 4299, 4294, 4299, 4294, 4327, 4322, 21151, 4327, 4322, 4327, 4322, 20156, 20158, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4411, 4430, 4425, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4512, 4507, 20190, 4560, 4555, 4560, 4555, 4560, 4555, 21155, 21157, 21159, 21161, 21163, 4327, 4322, 20200, 4327, 4322, 4327, 4322, 4299, 4294, 4299, 4294, 4327, 4322, 4327, 4322, 4327, 4322, 21171, 20216, 20218, 4430, 4425, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4411, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4512, 4507, 4512, 4507, 4485, 4539, 4534, 4539, 4534, 4512, 4507, 20256, 20258, 4539, 4534, 4560, 4555, 21189, 4560, 4555, 21191, 21193, 21196, 21199, 21201, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4736, 4741, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4803, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 20298, 4712, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4761, 20311, 4780, 4775, 4801, 4796, 4801, 4796, 6335, 6330, 6335, 6330, 21219, 6270, 21221, 6278, 21223, 6270, 21225, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6486, 6481, 6507, 6502, 21228, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6502, 6507, 21237, 6335, 6330, 6335, 6330, 6273, 6271, 6273, 6271, 6273, 6271, 6278, 6335, 6330, 6335, 6330, 6260, 6255, 6265, 6260, 6255, 6250, 21250, 21252, 6260, 6255, 6265, 6260, 6255, 6250, 21254, 21256, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6488, 6486, 6481, 6273, 6271, 6273, 6271, 21268, 6270, 21270, 6278, 21272, 21274, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21285, 21287, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21289, 21291, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21293, 6270, 21295, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6502, 6507, 21297, 6486, 6481, 6488, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6486, 6481, 6467, 6486, 6481, 6486, 6481, 6260, 6255, 6265, 6260, 6255, 6250, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 6273, 6271, 6273, 6271, 6260, 6255, 6265, 6260, 6255, 6250, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6486, 6481, 6488, 6467, 6502, 6507, 21311, 6486, 6481, 6467, 6486, 6481, 6488, 6507, 6502, 6507, 6502, 6486, 6481, 6488, 6467, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6270, 6273, 6271, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21327, 6270, 21329, 6278, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21333, 6270, 21335, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 6502, 6507, 6502, 6507, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 6507, 6502, 6507, 6502, 6486, 6481, 6486, 6481, 6486, 6481, 21347, 6507, 6502, 21349, 6486, 6481, 6467, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 8845, 8845, 8845, 8845, 21366, 21368, 21129, 21128, 21129, 21128, 8845, 8840, 8845, 8840, 8845, 8840, 8826, 21370, 21372, 8845, 8840, 21374, 21376, 21378, 21380, 8840, 8840, 8840, 8840, 21382, 21384, 21386, 21388, 21390, 9651, 9646, 9602, 9607, 9607, 9602, 9616, 9621, 21392, 9602, 9607, 9607, 9602, 21394, 21396, 21398, 21400, 21402, 21404, 9621, 9616, 21406, 21408, 9621, 9616, 21410, 21412, 21414, 21416, 9597, 9621, 9616, 21422, 21424, 9607, 9602, 9607, 9602, 21426, 21428, 21430, 21432, 9651, 9646, 21434, 9607, 9602, 9607, 9602, 9621, 9616, 21437, 21439, 21441, 21443, 21445, 21447, 21449, 21451, 9607, 9602, 21453, 21456, 21458, 21460, 21462, 21464, 8845, 8840, 21466, 9621, 21468, 21470, 9621, 21472, 9621, 9621, 9651, 9646, 21474, 21476, 21478, 21480, 21482, 21484, 21486, 21488, 21490, 21492, 21494, 7836, 21496, 21498, 9607, 9602, 9607, 9602, 7836, 21500, 21502, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21504, 9621, 9607, 9602, 9651, 9646, 21506, 21508, 9607, 9602, 21510, 9621, 9607, 9602, 21512, 9621, 21514, 9607, 9602, 9609, 9607, 9602, 9607, 9602, 21516, 9621, 21518, 9621, 21520, 21522, 21524, 9621, 9651, 9646, 21526, 7836, 9588, 21528, 9607, 9602, 9607, 9602, 21530, 9621, 21532, 9651, 9646, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21534, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8847, 21537, 21539, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21542, 21544, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21546, 21548, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21550, 21552, 21554, 21556, 21558, 21560, 9609, 9607, 9602, 9607, 9602, 9607, 9602, 21562, 9651, 9646, 21564, 7836, 21566, 21568, 9588, 21570, 21572, 9607, 9602, 9607, 9602, 9609, 9602, 9607, 21574, 9616, 9597, 9616, 21576, 9626, 21578, 21580, 9651, 9646, 21582, 21584, 21586, 21588, 21590, 21592, 21595, 9607, 9602, 9607, 9602, 9609, 9607, 9602, 21598, 9616, 9607, 9602, 9607, 9602, 9609, 21600, 9616, 21602, 21604, 21606, 21608, 9651, 9646, 21198, 21195, 21198, 21195, 8845, 8840, 21610, 8845, 8840, 8845, 8840, 21612, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21614, 21616, 21618, 21620, 8845, 8840, 8845, 8840, 21622, 8845, 8840, 8845, 8840, 8845, 8840, 8826, 21625, 21628, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21634, 21636, 21638, 21641, 21644, 9588, 21646, 9588, 9607, 9602, 9607, 9602, 21648, 21650, 9651, 9646, 21652, 21654, 9588, 21656, 9607, 9602, 21658, 21660, 21662, 21664, 9651, 9646, 9651, 9646, 9607, 9602, 21666, 9651, 9646, 9607, 9602, 9609, 21668, 21670, 9607, 9602, 9607, 9602, 21672, 9626, 9651, 9646, 9607, 9602, 9607, 9602, 9621, 9616, 9626, 9651, 9646, 21676, 21678, 21680, 21682, 21684, 9607, 9602, 9607, 9602, 21686, 21688, 21690, 21692, 9651, 9646, 21694, 9607, 9602, 9607, 9602, 21696, 21698, 21700, 21702, 9651, 9646, 21704, 21706, 21708, 21710, 9588, 9607, 9602, 9597, 21712, 9607, 9602, 9607, 9602, 21716, 21718, 21721, 21723, 21726, 9651, 9646, 21729, 9588, 21731, 21734, 9607, 9602, 9607, 9602, 9621, 9616, 21740, 9626, 21742, 21745, 9651, 9646, 9651, 9646, 21421, 21420, 21421, 21420, 21419, 21418, 21643, 21640, 21643, 21640, 21643, 21640, 21643, 21640, 28, 29, 30, 31, 21768, 21769, 21770, 21771, 21772, 21773, 21774, 21775, 21776, 21777, 21778, 21779, 21780, 21781, 21782, 21783, 21784, 21785, 21786, 21787, 21788, 21789, 21790, 21791, 21792, 21793, 21794, 21795, 21796, 21797, 21798, 21799, 21800, 21801, 21802, 21803, 21804, 21805, 21806, 21807, 21808, 21809, 21810, 21812, 21813, 21815, 21816, 21817, 21818, 21819, 21820, 21821, 21822, 21823, 21824, 21825, 21826, 21827, 21828, 21829, 21830, 21831, 21832, 21834, 21835, 21836, 21837, 21838, 21839, 21840, 21841, 21842, 21843, 21845, 21846, 21847, 21849, 21850, 21851, 21852, 21853, 21854, 21855, 21856, 21857, 21858, 21859, 21860, 21861, 21862, 21863, 21864, 21865, 21866, 21867, 21868, 21869, 21872, 21873, 21877, 21878, 21883, 21884, 21885, 21886, 21887, 21888, 21889, 21890, 21891, 21892, 21893, 21894, 21895, 21896, 21897, 21898, 21899, 21900, 21901, 21902, 21903, 21904, 21905, 21906, 21907, 21908, 21909, 21910, 21912, 21913, 21914, 21915, 21918, 21919, 21920, 21921, 21922, 21923, 21924, 21925, 21926, 21927, 21928, 21929, 21930, 21931, 21932, 21934, 21935, 21936, 21937, 21938, 21939, 21940, 21941, 21942, 21943, 21944, 21950, 21951, 21952, 21953, 21954, 21955, 21956, 21957, 21958, 21959, 21960, 21961, 21962, 21963, 21964, 21965, 21969, 21970, 21971, 21972, 21973, 21974, 21975, 21976, 21977, 21978, 21979, 21980, 21982, 21983, 21984, 21985, 21986, 21987, 21988, 21989, 21990, 21991, 21992, 21996, 21997, 21998, 21999, 22000, 22001, 22008, 22009, 22010, 22011, 22012, 22013, 22014, 22015, 22016, 22017, 22019, 22020, 22021, 22022, 22023, 22024, 22025, 22026, 22027, 22028, 22029, 22030, 22031, 22032, 22033, 22034, 22035, 22036, 22037, 22038, 22039, 22040, 22041, 22042, 22043, 22044, 22045, 22046, 22047, 22048, 22049, 22050, 22052, 22054, 22055, 22056, 22057, 22058, 22059, 22060, 22062, 22063, 22064, 22065, 22066, 22067, 22068, 22069, 22070, 22071, 22072, 22073, 22074, 22075, 22076, 22077, 22078, 22079, 22080, 22081, 22082, 22083, 22084, 22085, 22086, 22087, 22088, 22089, 22090, 22091, 22092, 22093, 22094, 22095, 22096, 22098, 22099, 22100, 22101, 22102, 22103, 22104, 22105, 22106, 22107, 22108, 22109, 22110, 22111, 22112, 22113, 22114, 22115, 22116, 22117, 22118, 22119, 22120, 22121, 22122, 22123, 22125, 22126, 22128, 22129, 22130, 22131, 22132, 22133, 22134, 22135, 22136, 22137, 22138, 22139, 22140, 22141, 22142, 22143, 22144, 22145, 22146, 22147, 22148, 22149, 22150, 22151, 22152, 22153, 22154, 22155, 22156, 22157, 22158, 22159, 22161, 22162, 22163, 22164, 22166, 22167, 22168, 22169, 22170, 22171, 22173, 22174, 22176, 22177, 22179, 22180, 22181, 22182, 22183, 22184, 22185, 22186, 22187, 22188, 22189, 22190, 22191, 22192, 22193, 22194, 22195, 22196, 22197, 22198, 22199, 22200, 22201, 22202, 22203, 22204, 22205, 22206, 22207, 22208, 22209, 22210, 22211, 22212, 22213, 22214, 22215, 22216, 22217, 22218, 22219, 22220, 22221, 22222, 22223, 22224, 22225, 22226, 22227, 22228, 22229, 22230, 22231, 22232, 22233, 22235, 22236, 22238, 22239, 22241, 22242, 22243, 22244, 22245, 22246, 22247, 22248, 22249, 22250, 22251, 22252, 22253, 22254, 22255, 22256, 22257, 22258, 22259, 22260, 22262, 22263, 22265, 22266, 22268, 22269, 22271, 22272, 22274, 22275, 22277, 22278, 22279, 22280, 22281, 22282, 22283, 22284, 22285, 22286, 22287, 22288, 22289, 22290, 22291, 22292, 22293, 22294, 22295, 22296, 22297, 22298, 22299, 22300, 22301, 22302, 22303, 22304, 22305, 22306, 22307, 22308, 22309, 22310, 22311, 22312, 22313, 22314, 22315, 22316, 22317, 22318, 22319, 22320, 22321, 22322, 22323, 22324, 22325, 22326, 22327, 22328, 22329, 22330, 22331, 22332, 22333, 22334, 22335, 22336, 22337, 22338, 22339, 22340, 22341, 22342, 22343, 22344, 22345, 22346, 22347, 22348, 22349, 22350, 22351, 22352, 22353, 22354, 22355, 22356, 22357, 22358, 22359, 22360, 22361, 22362, 22363, 22364, 22366, 22368, 22369, 22370, 22371, 22372, 22373, 22374, 22375, 22376, 22377, 22378, 22379, 22382, 22383, 22384, 22385, 22386, 22387, 22388, 22391, 22392, 22393, 22394, 22395, 22396, 22397, 22398, 22399, 22400, 22401, 22404, 22405, 22406, 22407, 22408, 22409, 22410, 22414, 22415, 22416, 22417, 22418, 22421, 22422, 22423, 22424, 22426, 22427, 22428, 22434, 22435, 22436, 22437, 22438, 22439, 22440, 22441, 22442, 22443, 22444, 22445, 22446, 22447, 22448, 22449, 22450, 22451, 22452, 22453, 22454, 22455, 22456, 22457, 22458, 22459, 22460, 22461, 22462, 22463, 22464, 22465, 22466, 22467, 22468, 22469, 22470, 22471, 22472, 22473, 22474, 22475, 22476, 22477, 22478, 22479, 22480, 22481, 22482, 22483, 22484, 22485, 22486, 22487, 22488, 22489, 22490, 22491, 22492, 22493, 22494, 22495, 22496, 22497, 22498, 22499, 22501, 22502, 22504, 22505, 22506, 22507, 22508, 22509, 22510, 22511, 22512, 22513, 22514, 22515, 22516, 22517, 22518, 22519, 22520, 22521, 22522, 22523, 22524, 22525, 22526, 22528, 22529, 22531, 22532, 22534, 22535, 22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22545, 22546, 22547, 22548, 22549, 22550, 22551, 22552, 22553, 22554, 22555, 22556, 22557, 22558, 22559, 22560, 22561, 22562, 22563, 22564, 22565, 22566, 22567, 22568, 22569, 22570, 22571, 22572, 22573, 22574, 22576, 22577, 22578, 22579, 22580, 22581, 22582, 22583, 22584, 22585, 22586, 22587, 22588, 22589, 22590, 22591, 22592, 22593, 22594, 22595, 22596, 22597, 22598, 22599, 22600, 22601, 22602, 22604, 22605, 22607, 22608, 22609, 22610, 22611, 22612, 22613, 22615, 22616, 22617, 22618, 22619, 22620, 22621, 22622, 22623, 22624, 22625, 22626, 22627, 22628, 22629, 22630, 22631, 22632, 22633, 22634, 22635, 22636, 22637, 22638, 22639, 22640, 22641, 22642, 22643, 22644, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22654, 22655, 22656, 22657, 22658, 22659, 22660, 22661, 22662, 22663, 22664, 22665, 22666, 22667, 22668, 22669, 22670, 22671, 22672, 22673, 22674, 22675, 22676, 22677, 22678, 22679, 22680, 22681, 22682, 22683, 22684, 22685, 22686, 22687, 22688, 22689, 22690, 22691, 22692, 22693, 22694, 22695, 22696, 22697, 22698, 22699, 22700, 22701, 22702, 22703, 22704, 22705, 22706, 22707, 22708, 22709, 22710, 22711, 22713, 22714, 22715, 22716, 22717, 22718, 22719, 22720, 22721, 22722, 22723, 22724, 22725, 22726, 22727, 22728, 22729, 22730, 22731, 22732, 22733, 22735, 22736, 22737, 22738, 22739, 22740, 22741, 22742, 22743, 22744, 22745, 22746, 22747, 22748, 22749, 22750, 22751, 22752, 22753, 22754, 22755, 22756, 22757, 22758, 22759, 22760, 22761, 22762, 22763, 22764, 22765, 22766, 22767, 22768, 22769, 22770, 22771, 22772, 22773, 22774, 22775, 22776, 22777, 22778, 22779, 22780, 22781, 22782, 22784, 22785, 22786, 22787, 22788, 22789, 22790, 22791, 22792, 22793, 22794, 22795, 22796, 22797, 22798, 22799, 22800, 22801, 22802, 22803, 22804, 22805, 22806, 22807, 22808, 22809, 22810, 22811, 22812, 22813, 22814, 22815, 22816, 22817, 22818, 22819, 22820, 22821, 22822, 22823, 22824, 22825, 22826, 22827, 22828, 22829, 22830, 22831, 22832, 22833, 22834, 22835, 22836, 22837, 22838, 22839, 22840, 22841, 22842, 22843, 22844, 22845, 22846, 22847, 22848, 22850, 22852, 22853, 22854, 22855, 22856, 22857, 22858, 22859, 22860, 22861, 22862, 22863, 22864, 22865, 22866, 22867, 22868, 22869, 22870, 22871, 22872, 22873, 22874, 22875, 22876, 22877, 22878, 22879, 22880, 22881, 22882, 22883, 22884, 22885, 22886, 22887, 22888, 22889, 22891, 22892, 22894, 22895, 22896, 22897, 22898, 22899, 22900, 22901, 22902, 22903, 22905, 22906, 22907, 22908, 22909, 22910, 22911, 22912, 22913, 22914, 22915, 22916, 22917, 22918, 22919, 22920, 22921, 22922, 22923, 22924, 22925, 22926, 22927, 22928, 22929, 22930, 22931, 22934, 22935, 22936, 22937, 22938, 22939, 22940, 22941, 22942, 22943, 22944, 22945, 22946, 22947, 22949, 22950, 22951, 22952, 22953, 22954, 22955, 22956, 22957, 22958, 22959, 22960, 22961, 22962, 22963, 22964, 22965, 22966, 22967, 22968, 22969, 22970, 22971, 22972, 22973, 22974, 22975, 22976, 22977, 22978, 22979, 22980, 22981, 22982, 22983, 22984, 22985, 22986, 22987, 22988, 22989, 22990, 22991, 22997, 22998, 22999, 23000, 23001, 23002, 23003, 23004, 23005, 23006, 23007, 23008, 23009, 23010, 23011, 23012, 23013, 23015, 23016, 23017, 23018, 23019, 23020, 23021, 23022, 23023, 23024, 23025, 23026, 23027, 23028, 23029, 23030, 23031, 23032, 23033, 23034, 23035, 23036, 23037, 23038, 23039, 23040, 23041, 23042, 23043, 23044, 23045, 23046, 23047, 23048, 23049, 23050, 23051, 23052, 23053, 23054, 23055, 23056, 23057, 23058, 23060, 23061, 23067, 23068, 23069, 23070, 23071, 23072, 23073, 23074, 23075, 23076, 23077, 23078, 23079, 23080, 23081, 23082, 23083, 23084, 23085, 23086, 23087, 23088, 23089, 23090, 23091, 23092, 23093, 23094, 23095, 23096, 23097, 23098, 23099, 23100, 23101, 23102, 23103, 23104, 23105, 23106, 23107, 23108, 23109, 23110, 23111, 23112, 23113, 23114, 23115, 23116, 23117, 23118, 23119, 23120, 23122, 23124, 23126, 23128, 23129, 23130, 23131, 23132, 23133, 23134, 23135, 23136, 23137, 23138, 23139, 23140, 23142, 23143, 23144, 23145, 23146, 23147, 23148, 23149, 23150, 23151, 23152, 23153, 23154, 23155, 23157, 23158, 23159, 23160, 23161, 23162, 23163, 23164, 23165, 23166, 23167, 23168, 23169, 23170, 23171, 23172, 23173, 23174, 23175, 23176, 23177, 23180, 23181, 23182, 23183, 23184, 23185, 23188, 23189, 23190, 23191, 23192, 23193, 23194, 23195, 23196, 23197, 23198, 23199, 23200, 23201, 23202, 23203, 23204, 23205, 23206, 23207, 23208, 23209, 23210, 23211, 23212, 23213, 23214, 23215, 23216, 23217, 23218, 23219, 23220, 23221, 23222, 23223, 23224, 23226, 23228, 23231, 23232, 23233, 23234, 23235, 23236, 23237, 23238, 23239, 23240, 23241, 23242, 23243, 23244, 23245, 23246, 23247, 23248, 23249, 23250, 23251, 23252, 23253, 23254, 23255, 23256, 23257, 23258, 23259, 23260, 23261, 23262, 23263, 23264, 23265, 23266, 23267, 23268, 23269, 23270, 23271, 23272, 23273, 23274, 23275, 23276, 23277, 23278, 23279, 23280, 23281, 23282, 23283, 23284, 23285, 23286, 23287, 23288, 23289, 23290, 23291, 23292, 23293, 23296, 23297, 23298, 23299, 23300, 23301, 23302, 23305, 23306, 23307, 23308, 23309, 23310, 23311, 23313, 23315, 23316, 23317, 23318, 23319, 23320, 23321, 23322, 23323, 23324, 23325, 23326, 23327, 23328, 23329, 23331, 23332, 23333, 23334, 23335, 23336, 23337, 23338, 23339, 23340, 23341, 23342, 23343, 23344, 23345, 23346, 23347, 23348, 23349, 23350, 23351, 23352, 23353, 23354, 23355, 23356, 23357, 23358, 23359, 23360, 23361, 23362, 23363, 23364, 23365, 23366, 23367, 23368, 23369, 23370, 23371, 23372, 23373, 23374, 23375, 23376, 23377, 23378, 23379, 23380, 23381, 23382, 23383, 23384, 23385, 23386, 23387, 23388, 23389, 23390, 23391, 23392, 23393, 23394, 23395, 23396, 23397, 23398, 23399, 23400, 23401, 23402, 23403, 23404, 23405, 23406, 23407, 23408, 23409, 23410, 23411, 23412, 23413, 23414, 23415, 23416, 23417, 23418, 23419, 23420, 23421, 23422, 23423, 23424, 23425, 23426, 23427, 23428, 23429, 23430, 23431, 23432, 23433, 23434, 23435, 23436, 23437, 23438, 23439, 23440, 23441, 23442, 23443, 23444, 23446, 23447, 23448, 23449, 23450, 23451, 23452, 23453, 23454, 23455, 23456, 23457, 23458, 23459, 23460, 23461, 23462, 23463, 23464, 23465, 23466, 23467, 23468, 23469, 23470, 23471, 23472, 23473, 23474, 23475, 23476, 23477, 23478, 23479, 23480, 23481, 23482, 23483, 23484, 23485, 23486, 23487, 23488, 23489, 23490, 23491, 23492, 23494, 23496, 23497, 23498, 23499, 23500, 23501, 23502, 23503, 23505, 23507, 23508, 23509, 23510, 23511, 23512, 23513, 23514, 23515, 23516, 23517, 23518, 23519, 23520, 23521, 23522, 23523, 23524, 23525, 23526, 23527, 23528, 23529, 23530, 23531, 23532, 23533, 23534, 23535, 23536, 23537, 23538, 23539, 23540, 23541, 23542, 23543, 23544, 23545, 23546, 23547, 23549, 23550, 23552, 23553, 23554, 23555, 23556, 23557, 23558, 23559, 23560, 23561, 23562, 21763, 21761, 21767, 21765, 23563, 23564, 23565, 23566, 21848, 23569, 23570, 21848, 23571, 23572, 23573, 23574, 23575, 23576, 23577, 23578, 23579, 23582, 23583, 22431, 21870, 22433, 22431, 21882, 21129, 21128, 23588, 23589, 23590, 23591, 23597, 23598, 23599, 23600, 23601, 23602, 23603, 23604, 23606, 23607, 23608, 23609, 23616, 23617, 23620, 23621, 23626, 23627, 23628, 23631, 23632, 23633, 23634, 23639, 23640, 23642, 23643, 23644, 23645, 23646, 23647, 23656, 23657, 23664, 23665, 23667, 23670, 23672, 23673, 23674, 23675, 21309, 21307, 23687, 23690, 23691, 23692, 23693, 23694, 21129, 21128, 21947, 21129, 21128, 22851, 23697, 23698, 22005, 22276, 22005, 22007, 23699, 23700, 23701, 23702, 23703, 23704, 23705, 23706, 23707, 23708, 23709, 23710, 23711, 23712, 23713, 23714, 23716, 23717, 23718, 23719, 23720, 23723, 23724, 23726, 23727, 23728, 23730, 23732, 23733, 23734, 23735, 23736, 23737, 23738, 23740, 23742, 23746, 23747, 23748, 23750, 23751, 23753, 23754, 23755, 23756, 23758, 23760, 23761, 23762, 23763, 23764, 23765, 23766, 23767, 23768, 23769, 23771, 23772, 23773, 23774, 23775, 23776, 23777, 23778, 23779, 23782, 23783, 23784, 23785, 23786, 23787, 23788, 23789, 23792, 23793, 23794, 23795, 23796, 23797, 23798, 23799, 23802, 23803, 23804, 23805, 23806, 23807, 23808, 23809, 23816, 23817, 23818, 23819, 23820, 23821, 23822, 23824, 23825, 23827, 23830, 23833, 23834, 23835, 23836, 23837, 23838, 23839, 23841, 23842, 23843, 23845, 23848, 23849, 21326, 21325, 21326, 21325, 23857, 23858, 23859, 23860, 23861, 23862, 23863, 23865, 23866, 23867, 23868, 23869, 23870, 23872, 23877, 23878, 22413, 23879, 23880, 22413, 23881, 23882, 22431, 22433, 22433, 22431, 23883, 23884, 23886, 23887, 23888, 23889, 23891, 23892, 23893, 23894, 23895, 23896, 23897, 23898, 23903, 23904, 23905, 23906, 23908, 23909, 23910, 23911, 23912, 23913, 23914, 22996, 22994, 22996, 22994, 23066, 21198, 21195, 23917, 23918, 23919, 23920, 23921, 23922, 23923, 23924, 23930, 23932, 23933, 23934, 23935, 23936, 23939, 23940, 23943, 23945, 23946, 23951, 23952, 23953, 23954, 23955, 23956, 23958, 23959, 21309, 21308, 21309, 21308, 23960, 23961, 23962, 23965, 23966, 23967, 23968, 23970, 23971, 23972, 21309, 21308, 23973, 23974, 23975, 23976, 23977, 23978, 23979, 23980, 23981, 21309, 21308, 21307, 21306, 23987, 23988, 23989, 23990, 23995, 23996, 23998, 23999, 24000, 24001, 24006, 24007, 24012, 24013, 24014, 24015, 24017, 24018, 24019, 24020, 24026, 24027, 24029, 24032, 24033, 24034, 24035, 24036, 24037, 24039, 24042, 24043, 24044, 24045, 23595, 21643, 21640, 23587, 21643, 21640, 21640, 21624, 21643, 21627, 23587, 21643, 21640, 23595, 21643, 21640, 21597, 21736, 21733, 21594, 21594, 21597, 23596, 23622, 21725, 21744, 21736, 21733, 21597, 21594, 21736, 21733, 21594, 21597, 21744, 21725, 23611, 23610, 21747, 21720, 23612, 21747, 21720, 23614, 21594, 21597, 21736, 21733, 21597, 21594, 21733, 21736, 21597, 21594, 21597, 21594, 23622, 24046, 24047, 21747, 21597, 21594, 23659, 23658, 21747, 21744, 21594, 21597, 21736, 21733, 21594, 21597, 24048, 24049, 24050, 24051, 21720, 21736, 21733, 21594, 21597, 21736, 21733, 21597, 21594, 23636, 23635, 21744, 21725, 21747, 21720, 23651, 21747, 21720, 23655, 21594, 21597, 23659, 23658, 21747, 21744, 21624, 21640, 23662, 21643, 21640, 23663, 23926, 21643, 21640, 21747, 21720, 21720, 21747, 21594, 21597, 21747, 21720, 21747, 21720, 21594, 21597, 21594, 21597, 21594, 21597, 21597, 21594, 21594, 21597, 21594, 21597, 21597, 21594, 21594, 21597, 21594, 21597, 21594, 21597, 24016, 24021, 21747, 21720, 21725, 21744, 21594, 21597, 21594, 21597, 23791, 24052, 24053, 23791, 24054, 24055, 21725, 21744, 21736, 21733, 21594, 21597, 21744, 21725, 21725, 21744, 21597, 21594, 21744, 21725, 21594, 21597, 21744, 21725, 23770, 24056, 24057, 23781, 24058, 24059, 23791, 21624, 21640, 21627, 21643, 21736, 21733, 21597, 21594, 21597, 21594, 21736, 21733, 21747, 21744, 21736, 21733, 21594, 21597, 21747, 21744, 21594, 21597, 21736, 21733, 21597, 21594, 21720, 21725, 21747, 21744, 23926, 21643, 21640, 23902, 21643, 21640, 21624, 21640, 23902, 21643, 21640, 21640, 21624, 21643, 21627, 21643, 21640, 23926, 23938, 23937, 21747, 21744, 21736, 21733, 23944, 23947, 21744, 21747, 21720, 21725, 21736, 21733, 24016, 24021, 21747, 21744, 21725, 21720, 21736, 21733, 23964, 23963, 21744, 21747, 21736, 21733, 21736, 21733, 21744, 21747, 21736, 21733, 21736, 21733, 23992, 23991, 21744, 21725, 24003, 24002, 21720, 21747, 21736, 21733, 24016, 24021, 21747, 21725, 21744, 21720, 21736, 21733, 21747, 21744, 30, 31, 24064, 24066, 24070, 24072, 24074, 24080, 24082, 24084, 24086, 24093, 24097, 24099, 24101, 24103, 24105, 24107, 24109, 24111, 24113, 24115, 24117, 24119, 24121, 24123, 24125, 24127, 24130, 24132, 24135, 24144, 24147, 24150, 24153, 24157, 24159, 24161, 24163, 24165, 24167, 24169, 24171, 24173, 24175, 24177, 24179, 24181, 24183, 24185, 24187, 24189, 24191, 24193, 24195, 24197, 24199, 24201, 24203, 24206, 24208, 24210, 24212, 24214, 24216, 24218, 24221, 24223, 24225, 24227, 24229, 24231, 24233, 24235, 24237, 24239, 24242, 24245, 24248, 24252, 24254, 24256, 24258, 24260, 24262, 24264, 24266, 24268, 24270, 24272, 24274, 24276, 24279, 24281, 24283, 24285, 24287, 24289, 24291, 24293, 24295, 24297, 24299, 24301, 24303, 24305, 24307, 24312, 24314, 24316, 24320, 24323, 24325, 24327, 24330, 24335, 24337, 24340, 24342, 24345, 24347, 24349, 24351, 24357, 24359, 24361, 24363, 24365, 24368, 24371, 24373, 24375, 24377, 24379, 24381, 24386, 24388, 24390, 24393, 24396, 24399, 24401, 24403, 24405, 24407, 24409, 24411, 24413, 24415, 24417, 24419, 24421, 24423, 24425, 24427, 24430, 24433, 24438, 24440, 24442, 24444, 24446, 24448, 24450, 24453, 24456, 24458, 24460, 24463, 24465, 24467, 24469, 24471, 24473, 24476, 24478, 24480, 24482, 24484, 24486, 24488, 24490, 24492, 24494, 24496, 24498, 24500, 24502, 24504, 24506, 24508, 24510, 24512, 24514, 24516, 24519, 24521, 24523, 24525, 24527, 24529, 24531, 24533, 24535, 24537, 24539, 24541, 24543, 24545, 24547, 24549, 24551, 24553, 24555, 24557, 24559, 24561, 24563, 24570, 24572, 24574, 24576, 24578, 24580, 24582, 24584, 24586, 24593, 24595, 24597, 24599, 24601, 24606, 24608, 24610, 24612, 24614, 24617, 24619, 24621, 24624, 24626, 24628, 24630, 24632, 24635, 24638, 24640, 24645, 24647, 24649, 24652, 24654, 24657, 24662, 24665, 24668, 24671, 24673, 24675, 24677, 24680, 24685, 24688, 24691, 24694, 24696, 24698, 24700, 24702, 24704, 24707, 24709, 24714, 24716, 24718, 24720, 24723, 24725, 24728, 24730, 24732, 24734, 24737, 24739, 24741, 24743, 24745, 24747, 24757, 24766, 24768, 24770, 24773, 24775, 24778, 24780, 24782, 24784, 24786, 24788, 24790, 24792, 24794, 24796, 24798, 24801, 24803, 24805, 24807, 24809, 24811, 24813, 24815, 24817, 24822, 24824, 24827, 24829, 24831, 24833, 24835, 24838, 24840, 24844, 24846, 24849, 24851, 24853, 24855, 24857, 24859, 24869, 24876, 24879, 24881, 24883, 24885, 24897, 24901, 24903, 24905, 24907, 24909, 24911, 24913, 24915, 24917, 24919, 24921, 24923, 24925, 24927, 24929, 24931, 24935, 24937, 24939, 24942, 24944, 24946, 24950, 24953, 24955, 24957, 24959, 24961, 24964, 24966, 24968, 24971, 24974, 24976, 24978, 24981, 24983, 24985, 24988, 24990, 24995, 24997, 24999, 25001, 25003, 25005, 25008, 25010, 25012, 25014, 25016, 25018, 25020, 25022, 25024, 25026, 25028, 25031, 25034, 25036, 25038, 25041, 25043, 25045, 25047, 25049, 25051, 25053, 25062, 25065, 25068, 25070, 25072, 25074, 25076, 25083, 25088, 25090, 25092, 25094, 25096, 25098, 25100, 25102, 25104, 25106, 25108, 25110, 25112, 25114, 25116, 25118, 25120, 25122, 25124, 25128, 25131, 25133, 25135, 25137, 25139, 25141, 25143, 25145, 25147, 25149, 25153, 25155, 25157, 25159, 25161, 25163, 25165, 25168, 25170, 25172, 25175, 25177, 25179, 25181, 25184, 25186, 25188, 25190, 25193, 25195, 25197, 25199, 25201, 25203, 25205, 25209, 25211, 25213, 25215, 25217, 25219, 25221, 25224, 25226, 25228, 25230, 25232, 25234, 25236, 25239, 25241, 25243, 25247, 25249, 25251, 25253, 25256, 25261, 25264, 25267, 25270, 25272, 25274, 25277, 25279, 25281, 25286, 25288, 25290, 25293, 25297, 25299, 25301, 25303, 25305, 25311, 25313, 25315, 25317, 25319, 25321, 25323, 25325, 25327, 25329, 25331, 25333, 25335, 25337, 25339, 25341, 25343, 25345, 25348, 25350, 25352, 25355, 25358, 25361, 25364, 25366, 25368, 25370, 25372, 25374, 25376, 25378, 25380, 25382, 25384, 25386, 25388, 25390, 25392, 25395, 25397, 25399, 25403, 25405, 25407, 25409, 25411, 25413, 25415, 25417, 25419, 25421, 25423, 25425, 25427, 25429, 25431, 25433, 25435, 25437, 25439, 25441, 25443, 25445, 25447, 25449, 25451, 25453, 25455, 25457, 25459, 25461, 25463, 25466, 25468, 25470, 25473, 25475, 25477, 25482, 25484, 25486, 25488, 25490, 25492, 25494, 25496, 25499, 25501, 25503, 25505, 25507, 25509, 25511, 25514, 25516, 25518, 25521, 25524, 25526, 25528, 25530, 25532, 25534, 25536, 25538, 25540, 25542, 25544, 25546, 25548, 25550, 25552, 25555, 25557, 25559, 25561, 25563, 25566, 25568, 25570, 25573, 25576, 25578, 25580, 25582, 25584, 25586, 25588, 25590, 25592, 25594, 25596, 25598, 25600, 25602, 25604, 25606, 25608, 25610, 25613, 25616, 25618, 25620, 25622, 25624, 25626, 25628, 25630, 25632, 25635, 25638, 25640, 25642, 25644, 25646, 25648, 25650, 25652, 25654, 25659, 25661, 25663, 25668, 25670, 25672, 25674, 25676, 25678, 25680, 25682, 25684, 25687, 25689, 25691, 25693, 25695, 25698, 25700, 25702, 25704, 25706, 25708, 25710, 25713, 25715, 25717, 25719, 25721, 25722, 25723, 25724, 21173, 21174, 21154, 21153, 21174, 21173, 21154, 21153, 21173, 21185, 21186, 21187, 21188, 21173, 21185, 21186, 21187, 21188, 21173, 21174, 21185, 21186, 21187, 21188, 21173, 21174, 21154, 21153, 21173, 21174, 25729, 21174, 21173, 25732, 21174, 21173, 21848, 21129, 21128, 21173, 21174, 21848, 21129, 21128, 24143, 21206, 21205, 25735, 25737, 25739, 21187, 24156, 25742, 21173, 21174, 21187, 25744, 25745, 21173, 25746, 25747, 25748, 25749, 25750, 25755, 25757, 25759, 25761, 25763, 25765, 25767, 25769, 25772, 25774, 25776, 25778, 25780, 25782, 25784, 25786, 25788, 25794, 25657, 25796, 25797, 25667, 24278, 25799, 25801, 21174, 21173, 21173, 21174, 21174, 21173, 25804, 25805, 25806, 21174, 21173, 25807, 25808, 25809, 25810, 21169, 21173, 21174, 25812, 25813, 21169, 21174, 21173, 25814, 25815, 25816, 25818, 25820, 25822, 25824, 25826, 25828, 25830, 25833, 25835, 25667, 24278, 25837, 25840, 25843, 25846, 25848, 25853, 24311, 24310, 25857, 25859, 25862, 24319, 24334, 25864, 25866, 25868, 25870, 21207, 25872, 24356, 24354, 25874, 25876, 25878, 24385, 21166, 21169, 21173, 21174, 21187, 21169, 21174, 21173, 24437, 25881, 25883, 25885, 25887, 21169, 21173, 21174, 21169, 21174, 21173, 25889, 25891, 25893, 25895, 25897, 25899, 25901, 25903, 25906, 25908, 25910, 25912, 21340, 21339, 21338, 21337, 21340, 21339, 21338, 21337, 24605, 24604, 25916, 25918, 25921, 25927, 25929, 25930, 25931, 25932, 25933, 25935, 25938, 25941, 25943, 25947, 21169, 21174, 21173, 21187, 25949, 21169, 21174, 21173, 21187, 25952, 21173, 21174, 21187, 25955, 25956, 21173, 21187, 25957, 25958, 24661, 24684, 24712, 21207, 25959, 21173, 21174, 21187, 21129, 21198, 21195, 21128, 21173, 21187, 21129, 21128, 21198, 21195, 24752, 24750, 24756, 21206, 21205, 24763, 21206, 21205, 24765, 21174, 21173, 25961, 25963, 21173, 21174, 22994, 21198, 21195, 21173, 21187, 21129, 21128, 21198, 21195, 24868, 24866, 21206, 21205, 21133, 21132, 24890, 21206, 21205, 24892, 24896, 21206, 21205, 21207, 25965, 25967, 25969, 25971, 21173, 21174, 21173, 21174, 21173, 21174, 24949, 25973, 25975, 21173, 21174, 21129, 21128, 22851, 21173, 21174, 21129, 21128, 22851, 21173, 21174, 21129, 21128, 22851, 25061, 21206, 21205, 21206, 21205, 21133, 21132, 25087, 25977, 25979, 25981, 21173, 21174, 25984, 21173, 25985, 21173, 21174, 21187, 25986, 25987, 21169, 21174, 21173, 21187, 25988, 25989, 25990, 25260, 25285, 21207, 25991, 25993, 25995, 25997, 25308, 25307, 25310, 25309, 26001, 26003, 26005, 26008, 26010, 26012, 26014, 26016, 26018, 26019, 26020, 26021, 26022, 26025, 26027, 26030, 25402, 25401, 26032, 26033, 26034, 26036, 26038, 26041, 26043, 26044, 26045, 26046, 25481, 25480, 26047, 26049, 26051, 26053, 26055, 26057, 26060, 26063, 26065, 26067, 25658, 25657, 25667, 25666, 26070, 26072, 26074, 26077, 26079, 21633, 21632, 21630, 21631, 26081, 26082, 26083, 26084, 26085, 26086, 26087, 26088, 26089, 26090, 26091, 26092, 26093, 21633, 21632, 21630, 21631, 26094, 26095, 26096, 26097, 26098, 26099, 26100, 26101, 26007, 26102, 26103, 26104, 26105, 26106, 26107, 26108, 26109, 26110, 26111, 26112, 26113, 26114, 26115, 26116, 26117, 26118, 26119, 26120, 26121, 26122, 26123, 26124, 26125, 26126, 26127, 26128, 26007, 26129, 26130, 26131, 26132, 26133, 26134, 26007, 26135, 26136, 26137, 26140, 25914, 25856, 26141, 25915, 26142, 26143, 26144, 26145, 26146, 26029, 26147, 26148, 26149, 26150, 26151, 26007, 26152, 26153, 26155, 26157, 26158, 26159, 26160, 26161, 26162, 26163, 26164, 26165, 26166, 26167, 26168, 26169, 26170, 26171, 26172, 26173, 26174, 26175, 25856, 25855, 25915, 26176, 26177, 26178, 26179, 26180, 26181, 26029, 26182, 26183, 26184, 26185, 26186, 26187, 26188, 26189, 26190, 25790, 25792, 26191, 26192, 25791, 25792, 26193, 26194, 25914, 25999, 26195, 26007, 26196, 25793, 25842, 26197, 26198, 26199, 26200, 26201, 26202, 26203, 26204, 26205, 26206, 26207, 26208, 26209, 26210, 26211, 26212, 26213, 26214, 26215, 26216, 26217, 26218, 26219, 26220, 26221, 26222, 26223, 26224, 26225, 26226, 25798, 26227, 26228, 25803, 26229, 26230, 26231, 26234, 25832, 25850, 26237, 26238, 26239, 26240, 25914, 26007, 26241, 26242, 25839, 25842, 26243, 26244, 25850, 25851, 26245, 26246, 25999, 25914, 26007, 26247, 26248, 25852, 26249, 26250, 25856, 25855, 26251, 26007, 26252, 25861, 26253, 26254, 26255, 26256, 26258, 26259, 26261, 26262, 26263, 26264, 26265, 26266, 26267, 26268, 26269, 26270, 26271, 26272, 26273, 25940, 25946, 26274, 25926, 26275, 26276, 26277, 25914, 26278, 26279, 25915, 25923, 25925, 26280, 26281, 25926, 26282, 26283, 26284, 26285, 26286, 26287, 26059, 25940, 25946, 26288, 26289, 26290, 26291, 26292, 26293, 26294, 26295, 26296, 26297, 26298, 26299, 26300, 26301, 26302, 26303, 26304, 26305, 26306, 26307, 26308, 26309, 25999, 26000, 26310, 26311, 26312, 26313, 26029, 26314, 26315, 26007, 26316, 26317, 26318, 26319, 26320, 26321, 26322, 26323, 26059, 26324, 26325, 26326, 26327, 26328, 26329, 26330, 26331, 26059, 26332, 26333, 26029, 26334, 26335, 26336, 26337, 26338, 26339, 26340, 26040, 26341, 26342, 26343, 26344, 26345, 26346, 26347, 26348, 26349, 26350, 26351, 26352, 26353, 26354, 26355, 26059, 26356, 26357, 26358, 26359, 26360, 26361, 26069, 26362, 26363, 26364, 26365, 26076, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27064, 21178, 21177, 27066, 25276, 21210, 21209, 21169, 21170, 21166, 21165, 21167, 21168, 21170, 21165, 21166, 21169, 27068, 27069, 21179, 21176, 21180, 21175, 21182, 21181, 21176, 21179, 21175, 21180, 21178, 21177, 24800, 21183, 21184, 21185, 24970, 25030, 21187, 27070, 27071, 21128, 21848, 21129, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27072, 27073, 21175, 21176, 21180, 21179, 21182, 21181, 21175, 21180, 21179, 21176, 21177, 21178, 24800, 21183, 21184, 21186, 21185, 24941, 24970, 21188, 21187, 27074, 27075, 21129, 21128, 22851, 21165, 21169, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27076, 21174, 21175, 21176, 21180, 21179, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 24344, 21184, 21183, 27077, 27078, 24090, 25030, 27079, 27080, 20752, 21848, 21128, 21129, 21165, 21169, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27081, 21174, 21175, 21176, 21180, 21179, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 21184, 21183, 24344, 27082, 27083, 24090, 25030, 27084, 27085, 20753, 21848, 21128, 21129, 21169, 21170, 21166, 21165, 21167, 21168, 21169, 21165, 21166, 21170, 27086, 27087, 21179, 21176, 21180, 21175, 21182, 21181, 21179, 21180, 21175, 21176, 21177, 21178, 21183, 21184, 24220, 27088, 27089, 24941, 24090, 27090, 27091, 21945, 21129, 21128, 21848, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 21165, 21166, 27092, 27093, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21176, 21179, 21180, 21177, 21178, 24800, 21184, 21183, 21186, 24970, 25030, 21188, 27094, 27095, 21129, 21128, 21848, 21204, 21203, 21814, 21811, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21169, 21166, 21165, 27096, 27097, 21179, 21176, 21180, 21175, 21182, 21181, 21175, 21176, 21179, 21180, 21178, 21177, 21184, 24134, 21183, 21185, 21186, 24941, 24970, 21187, 21188, 21154, 21833, 21153, 27098, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21169, 21166, 21165, 27099, 27100, 21179, 21176, 21180, 21175, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 21184, 21183, 24129, 21186, 21185, 24941, 24970, 21188, 21187, 21154, 21833, 21153, 27101, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21165, 21166, 21170, 27102, 27103, 21179, 21175, 21180, 21176, 21182, 21181, 21179, 21175, 21176, 21180, 21178, 21177, 21184, 21183, 24129, 21185, 21186, 24941, 24970, 21188, 21187, 21154, 21153, 27104, 27105, 27106, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21165, 21166, 21170, 27107, 27108, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21175, 21176, 21180, 21178, 21177, 21184, 21183, 24134, 21185, 21186, 24941, 24970, 21188, 21187, 21844, 27109, 27110, 27111, 27112, 27113, 27114, 24149, 24146, 21177, 21178, 21188, 27118, 24152, 21131, 21130, 27119, 21131, 21130, 21166, 21170, 21169, 21165, 21167, 21168, 21169, 21170, 21981, 27121, 27122, 21175, 21176, 21179, 21180, 21178, 21177, 21179, 25167, 21180, 21181, 21182, 24651, 27123, 21183, 21184, 24800, 21185, 22419, 22429, 27124, 21165, 21170, 21166, 21169, 21168, 21167, 21169, 21170, 22904, 21174, 27126, 21175, 21176, 21180, 21179, 21177, 21178, 25167, 21180, 21179, 21181, 21182, 24651, 21188, 21183, 21184, 24800, 21186, 21875, 21874, 27127, 26677, 24800, 21184, 21183, 22411, 21876, 27129, 21341, 21342, 21354, 21353, 21340, 21339, 21338, 21337, 21341, 21342, 21210, 21130, 21210, 21130, 21186, 21911, 21154, 21153, 21209, 21131, 21209, 21131, 21131, 21130, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25656, 21332, 21331, 27150, 25665, 21332, 21331, 27153, 27154, 21340, 21339, 21338, 21337, 21341, 21342, 25686, 21352, 21351, 21344, 21343, 25697, 25498, 21354, 21353, 23548, 21346, 21352, 23551, 21352, 21351, 24205, 21354, 21353, 21166, 21169, 21165, 21170, 21167, 21168, 21169, 21170, 21166, 21165, 27157, 27158, 21179, 21176, 21175, 21180, 21178, 21177, 21179, 21175, 21176, 21180, 21182, 21181, 25030, 25033, 21188, 21187, 21154, 21153, 21933, 21129, 22851, 21128, 21169, 21165, 21170, 21166, 21168, 21167, 21169, 21170, 21165, 21166, 27159, 27160, 21175, 21176, 21180, 21179, 21178, 21177, 21179, 21175, 21180, 21176, 21182, 21181, 21184, 24344, 21183, 21185, 21186, 21154, 21153, 21945, 21129, 21128, 22851, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21165, 21166, 21169, 27161, 27162, 21179, 21175, 21180, 21176, 21178, 21177, 21179, 21175, 21176, 21180, 21181, 21182, 21184, 24220, 21183, 21186, 21185, 25030, 25033, 21187, 21188, 21154, 21153, 21945, 27163, 21165, 21166, 21170, 21169, 21167, 21168, 21170, 21166, 21169, 21165, 27166, 27167, 21179, 21175, 21180, 21176, 21178, 21177, 21179, 21175, 21176, 21180, 21182, 21181, 21183, 21184, 24344, 21186, 21185, 25030, 25033, 21188, 21187, 22097, 21154, 21153, 27168, 24244, 24241, 24250, 24247, 27172, 21166, 21170, 21165, 21168, 21167, 21170, 21169, 21981, 27173, 27174, 21179, 21176, 21180, 21175, 21177, 21178, 24837, 21180, 21179, 21182, 21181, 21184, 24848, 21183, 21185, 21186, 22261, 22003, 22273, 21994, 27177, 21170, 21166, 21165, 21168, 21167, 21170, 21169, 22948, 27178, 27179, 21179, 21176, 21180, 21175, 21178, 21177, 21180, 21179, 25223, 21181, 21182, 24848, 21184, 21183, 21185, 21186, 22003, 22002, 22273, 22270, 21177, 21178, 21204, 21203, 21326, 21325, 25656, 21332, 21331, 27192, 27193, 21341, 21342, 21340, 21339, 21338, 21337, 21326, 21325, 21332, 21331, 21324, 21323, 24309, 21309, 21307, 27200, 27201, 21341, 21342, 22061, 21186, 21185, 24322, 27205, 24329, 21131, 21130, 27206, 24332, 21167, 21168, 21208, 27211, 21178, 21177, 21182, 21181, 21184, 21183, 24344, 21187, 21188, 22097, 21154, 21153, 27213, 27214, 21204, 21203, 24367, 21131, 21130, 24370, 21178, 21177, 21188, 22127, 22124, 24383, 27218, 24392, 21206, 21205, 24395, 21165, 27219, 21170, 27220, 21167, 21168, 22575, 21169, 21170, 27221, 27222, 21180, 21175, 21176, 21179, 21177, 21178, 21179, 21180, 24837, 21182, 21181, 24651, 27223, 21183, 21184, 24800, 21185, 22160, 22411, 22165, 21198, 21195, 21165, 21166, 21170, 27224, 21168, 21167, 21170, 22614, 21169, 27225, 27226, 21179, 21175, 21176, 21180, 21178, 21177, 21179, 21180, 25223, 21181, 21182, 24475, 21188, 21184, 21183, 24848, 21186, 22172, 21154, 21153, 22178, 22175, 24432, 24429, 24435, 27227, 21204, 21203, 21130, 21131, 21209, 21210, 24452, 21165, 27232, 21166, 21170, 21167, 21168, 21170, 22575, 21169, 27233, 27234, 21179, 21180, 21176, 21175, 21178, 21177, 21180, 21179, 24837, 21181, 21182, 24475, 21188, 21187, 22234, 21154, 21153, 22240, 22237, 21165, 21166, 21170, 27235, 21168, 21167, 21170, 21169, 22948, 27236, 27237, 21175, 21176, 21180, 21179, 21178, 21177, 24837, 21180, 21179, 21181, 21182, 21184, 21183, 24848, 21186, 21185, 22264, 22261, 22267, 22273, 22270, 22276, 24518, 21204, 21203, 21130, 21131, 21209, 21210, 21208, 21207, 21210, 21130, 21209, 21131, 21340, 21339, 21338, 21337, 21326, 21325, 21309, 21308, 21332, 21331, 21324, 21323, 24565, 21309, 21307, 27250, 27251, 27252, 27253, 21326, 21325, 21332, 21331, 21324, 21323, 24588, 21309, 21307, 27254, 27255, 27256, 27257, 21326, 21325, 24603, 21332, 21331, 27258, 27259, 21341, 21342, 24616, 21340, 21339, 27264, 24623, 21340, 21339, 27266, 21341, 21342, 24634, 21352, 21351, 21165, 21166, 21170, 27274, 21168, 21167, 21170, 21169, 22402, 27275, 27276, 21179, 21175, 21176, 21180, 21177, 21178, 24837, 21180, 21179, 21181, 21182, 26677, 21188, 27277, 21184, 21183, 24644, 21186, 21185, 22412, 22403, 27278, 21165, 21170, 27279, 21166, 21168, 21167, 21170, 21169, 23014, 27280, 27281, 21179, 21176, 21180, 21175, 21178, 21177, 24837, 21180, 21179, 21182, 21181, 26677, 21188, 27282, 24800, 21184, 21183, 21186, 21185, 22412, 22411, 27283, 21170, 21165, 21169, 21166, 21167, 21168, 21170, 21169, 22425, 27284, 27285, 21175, 21176, 21180, 21179, 21178, 21177, 21180, 24643, 21179, 21181, 21182, 21183, 21184, 24644, 21185, 21186, 24651, 27286, 21188, 22419, 27287, 21169, 21165, 21170, 21166, 21168, 21167, 22425, 21169, 21170, 27289, 21174, 21180, 21179, 21176, 21175, 21177, 21178, 25167, 21179, 21180, 21181, 21182, 21183, 21184, 24800, 21185, 21186, 24651, 27290, 21188, 22429, 27291, 24659, 24656, 27293, 24667, 24664, 24670, 21204, 21203, 21130, 24682, 24679, 27294, 24690, 24687, 24693, 21204, 21203, 21131, 24706, 21206, 21205, 21077, 21076, 27295, 21208, 27296, 21131, 21130, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22500, 27298, 27299, 21179, 21180, 21175, 21176, 21177, 21178, 24837, 21179, 21180, 21181, 21182, 21183, 24848, 21184, 21185, 21186, 24842, 21188, 27300, 22503, 27301, 27302, 27303, 27304, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21170, 22948, 27305, 21174, 21179, 21175, 21176, 21180, 21177, 21178, 21179, 21180, 24727, 21181, 21182, 24736, 21184, 21183, 21185, 21186, 24842, 21188, 27306, 22527, 27307, 27308, 27309, 27310, 22533, 22530, 27311, 27312, 27313, 27314, 27315, 24759, 25276, 27316, 27317, 27318, 27319, 21209, 21210, 21165, 21166, 21170, 21169, 21168, 21167, 21169, 21165, 21166, 21170, 27320, 27321, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21176, 21175, 21180, 21177, 21178, 25030, 25033, 21187, 21188, 21184, 21183, 24777, 21186, 21185, 22849, 21154, 21153, 21129, 21128, 22851, 21170, 21169, 21165, 21166, 21167, 21168, 21170, 21169, 22575, 27324, 27325, 21175, 21176, 21180, 21179, 21178, 21177, 24837, 21180, 21179, 21182, 21181, 21183, 21184, 24800, 21186, 21185, 26677, 21188, 21187, 22606, 22603, 27326, 27327, 27328, 21169, 21165, 21170, 21166, 21168, 21167, 22614, 21170, 21169, 21174, 27329, 21175, 21176, 21180, 21179, 21177, 21178, 21180, 24837, 21179, 21181, 21182, 24842, 21188, 27330, 21183, 21184, 24848, 21186, 21185, 22651, 22648, 27331, 27332, 27333, 27334, 27335, 27336, 24871, 27337, 27338, 27339, 27340, 24878, 21204, 21203, 21131, 21130, 27341, 27342, 27343, 27344, 27345, 27346, 27347, 24899, 21208, 27348, 21131, 21130, 21170, 21169, 21165, 21166, 21168, 21167, 21169, 21166, 21165, 21170, 27353, 27354, 21175, 21176, 21179, 21180, 21182, 21181, 21176, 21175, 21179, 21180, 21177, 21178, 21184, 21183, 24987, 21185, 21186, 21154, 21153, 21129, 21128, 22712, 21170, 21169, 21165, 21166, 21168, 21167, 21169, 21166, 21165, 21170, 27355, 27356, 21175, 21176, 21179, 21180, 21182, 21181, 21176, 21180, 21175, 21179, 21177, 21178, 21184, 21183, 25040, 21185, 21186, 22849, 21129, 21128, 22712, 21169, 21170, 21166, 21165, 21168, 21167, 21169, 21170, 21165, 21166, 27357, 27358, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21179, 21180, 21176, 21178, 21177, 24970, 24941, 21187, 21188, 21154, 21153, 22734, 22851, 21128, 21129, 24952, 27359, 21204, 21203, 24963, 21131, 21130, 21169, 21166, 21170, 21165, 21167, 21168, 21165, 21166, 21170, 21169, 27362, 27363, 21179, 21175, 21180, 21176, 21182, 21181, 21175, 21176, 21180, 21179, 21177, 21178, 25030, 24970, 21187, 21188, 21154, 21153, 22783, 27364, 27365, 27366, 21169, 21170, 21165, 21166, 21168, 21167, 21165, 21166, 21170, 21169, 27367, 27368, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21176, 21180, 21179, 21177, 21178, 21184, 21183, 24987, 21185, 21186, 21154, 21153, 22783, 27369, 27370, 27371, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27372, 27373, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21176, 21180, 21175, 21177, 21178, 25033, 25030, 21187, 21188, 21184, 21183, 25040, 21185, 21186, 22849, 21154, 21153, 27374, 27375, 27376, 27377, 27378, 27379, 25067, 25064, 21204, 21203, 25078, 21131, 21130, 27380, 27381, 27382, 27383, 27384, 25085, 21208, 21207, 22893, 22890, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22904, 27388, 27389, 21175, 21180, 21179, 21176, 21177, 21178, 21179, 21180, 25126, 21181, 21182, 21183, 21184, 25127, 21186, 25130, 21188, 22992, 21154, 21153, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22904, 27391, 21174, 21175, 21180, 21179, 21176, 21177, 21178, 25126, 21179, 21180, 21181, 21182, 21183, 21184, 25127, 21186, 25130, 21188, 21154, 21153, 22932, 21169, 21166, 21170, 21165, 21167, 21168, 21170, 21169, 22948, 27393, 27394, 21175, 21176, 21179, 21180, 21177, 21178, 21179, 25167, 21180, 21181, 21182, 21183, 21184, 25174, 21185, 25183, 27395, 22992, 21154, 21153, 27396, 21166, 21170, 27398, 21165, 21168, 21167, 23014, 21170, 21169, 27399, 27400, 21176, 21180, 21175, 21179, 21178, 21177, 21180, 21179, 25223, 21182, 21181, 25238, 21184, 21183, 21186, 21185, 25245, 21188, 27401, 23062, 23059, 27402, 25258, 25255, 27405, 25266, 25263, 25269, 21204, 21203, 25276, 25283, 21206, 21205, 27406, 25292, 21206, 21205, 25295, 21208, 27407, 21210, 21209, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25665, 21332, 21331, 27412, 27413, 27414, 27415, 21340, 21339, 21338, 21337, 21344, 21343, 23548, 21352, 21346, 23141, 21309, 21307, 21324, 21323, 21332, 21331, 23156, 21326, 21325, 21306, 21308, 25347, 21326, 21325, 25357, 25354, 27424, 25363, 25360, 27426, 21332, 21331, 21324, 21323, 21307, 21306, 21340, 21339, 21338, 21337, 21341, 21342, 25394, 21346, 21310, 21352, 21351, 25712, 21308, 21309, 27432, 27433, 27434, 21340, 21339, 21338, 21337, 21342, 21341, 21352, 21346, 21351, 21310, 21344, 21343, 21332, 21331, 21324, 21323, 21308, 21309, 21332, 21331, 21324, 21323, 21306, 21307, 21340, 21339, 21338, 21337, 21326, 21325, 25465, 21332, 21331, 27440, 25472, 21332, 21331, 27442, 25479, 21332, 21331, 27444, 27445, 21340, 21339, 21338, 21337, 21341, 21342, 25686, 21352, 21351, 23330, 25697, 25498, 21354, 21353, 21352, 21346, 21351, 21310, 21344, 21343, 21352, 21351, 25513, 25523, 25520, 21308, 21324, 21323, 21332, 21331, 21306, 21324, 21323, 21332, 21331, 21309, 21307, 25554, 21340, 21339, 21326, 21325, 25565, 21332, 21331, 21307, 21306, 25575, 25572, 21309, 21308, 21340, 21339, 21338, 21337, 21341, 21342, 21352, 21351, 21346, 21310, 21354, 21353, 27013, 23445, 25615, 25612, 21344, 21343, 27020, 21354, 21353, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25656, 21332, 21331, 27456, 27457, 25665, 21332, 21331, 27458, 27459, 21340, 21339, 21338, 21337, 21342, 21341, 25686, 21352, 21351, 21344, 21343, 25697, 21352, 21351, 21354, 21353, 23548, 21346, 21352, 23551, 21352, 21351, 25712, 21354, 21353, 27465, 27466, 27467, 27468, 27469, 21630, 21631, 21633, 21632, 27472, 21630, 21631, 21633, 21632, 27475, 25741, 21633, 21632, 27477, 21630, 21631, 21633, 21632, 27479, 27482, 27483, 27484, 27485, 27486, 27489, 27491, 27494, 25771, 27139, 21737, 21714, 27496, 27498, 21674, 21728, 27500, 27502, 27504, 27506, 21738, 21675, 27135, 27508, 23605, 21738, 21675, 27510, 27512, 27515, 27518, 27520, 27522, 27140, 27138, 27525, 27527, 27529, 26062, 27139, 21737, 21714, 27532, 21674, 21728, 27534, 27535, 27537, 21738, 21675, 21737, 21714, 27539, 27543, 27541, 21748, 27544, 27546, 27549, 25771, 27140, 21737, 21714, 27551, 21728, 21674, 27554, 27556, 27558, 27560, 21737, 21714, 27562, 27564, 23641, 21737, 21714, 27146, 27566, 27569, 27572, 27573, 27574, 21738, 21675, 21737, 21714, 27577, 27581, 27579, 21749, 27582, 21632, 21631, 21630, 21633, 27585, 21633, 21632, 21630, 21631, 27588, 27591, 27592, 27593, 27595, 27596, 27597, 21728, 27599, 27600, 27602, 21714, 21675, 27604, 21714, 21675, 27605, 27606, 23676, 27608, 27610, 27612, 27614, 27616, 27618, 27620, 27622, 27624, 27626, 27628, 26062, 21737, 21714, 27632, 27634, 21728, 21674, 27636, 27637, 21738, 21737, 27639, 27640, 25880, 21630, 21631, 21632, 21631, 21630, 21633, 27642, 21630, 21631, 21633, 21632, 21632, 21630, 21631, 21633, 27643, 27644, 25905, 21714, 21737, 27645, 27646, 21728, 27650, 27648, 27651, 21737, 21738, 27654, 21738, 21737, 27655, 27656, 23731, 21737, 21714, 25845, 27658, 27659, 27660, 21674, 27662, 27663, 27664, 21714, 21675, 27667, 27668, 23850, 27670, 27671, 27673, 21714, 21675, 27675, 27676, 23850, 21630, 21631, 21633, 21632, 21632, 21630, 21631, 21633, 25880, 21630, 21631, 21633, 21632, 21630, 21631, 21633, 21632, 21630, 21631, 21630, 21631, 21633, 21632, 27683, 21630, 21631, 21633, 21632, 27685, 27687, 27689, 27691, 27693, 21714, 25905, 21737, 27695, 25945, 21737, 21714, 27696, 27698, 21674, 27702, 27700, 27705, 27703, 21737, 25920, 21714, 27706, 21738, 21675, 25924, 27707, 27710, 27708, 23850, 27711, 27713, 27717, 27715, 21737, 25937, 21714, 27718, 25945, 21737, 21714, 27719, 27720, 27722, 21728, 21632, 21631, 21633, 21630, 27724, 21630, 21631, 21632, 21633, 27727, 21630, 21631, 27730, 21630, 21631, 21632, 21633, 27732, 21633, 21632, 27735, 25983, 21633, 21632, 27737, 21633, 21632, 21631, 21630, 27739, 27742, 27743, 21675, 21714, 27744, 27748, 27746, 21748, 21749, 27749, 27751, 26062, 21737, 21714, 27754, 27756, 21674, 21728, 27758, 27760, 26062, 21737, 21714, 27763, 27765, 21674, 27767, 27769, 26024, 27770, 21738, 21675, 27438, 27772, 21674, 21728, 27775, 27777, 21738, 21675, 27438, 27780, 23982, 27782, 27784, 21737, 21714, 27786, 27788, 23997, 21737, 21714, 27790, 27792, 24008, 27794, 27796, 26062, 21737, 21714, 27799, 27801, 21728, 27803, 27804, 21738, 21737, 27462, 27808, 27806, 21749, 21748, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27841, 27842, 27844, 27845, 27846, 27847, 27848, 27849, 27850, 27851, 27852, 27853, 27854, 27855, 27856, 27857, 27859, 27860, 27861, 27862, 27863, 27864, 27865, 27866, 27867, 27868, 27869, 27870, 27871, 27872, 27873, 27874, 27875, 27876, 27877, 27878, 27880, 27881, 27882, 27883, 27884, 27885, 27886, 27887, 27888, 27889, 27890, 27891, 27892, 27893, 27895, 27896, 27897, 27898, 27899, 27900, 27901, 27902, 27903, 27904, 27905, 27906, 27907, 27908, 27909, 27910, 27911, 27912, 27913, 27914, 27915, 27916, 27918, 27919, 27920, 27921, 27922, 27923, 27924, 27925, 27926, 27927, 27928, 27929, 27930, 27932, 27933, 27934, 27935, 27936, 27937, 27938, 27939, 27940, 27941, 27942, 27943, 27944, 27945, 27946, 27947, 27948, 27950, 27951, 27952, 27954, 27955, 27956, 27957, 27958, 27959, 27960, 27961, 27962, 27963, 27964, 27965, 27966, 27967, 27969, 27970, 27971, 27972, 27973, 27974, 27975, 27976, 27977, 27978, 27979, 27980, 27981, 27982, 27983, 27984, 27985, 27987, 27988, 27989, 27991, 27992, 27993, 27994, 27995, 27996, 27997, 27998, 27999, 28000, 28001, 28002, 28003, 28004, 28005, 28007, 28008, 28009, 28010, 28011, 28012, 28013, 28014, 28015, 28016, 28017, 28018, 28019, 28020, 28021, 28022, 28024, 28025, 28026, 28028, 28029, 28030, 28031, 28032, 28033, 28034, 28035, 28036, 28037, 28038, 28039, 28040, 28041, 28042, 28044, 28045, 28046, 28047, 28048, 28049, 28050, 28051, 28052, 28053, 28054, 28055, 28056, 28057, 28058, 28059, 28060, 28061, 28062, 28063, 28065, 28066, 28067, 28068, 28069, 28070, 28071, 28072, 28073, 28074, 28075, 28076, 28077, 28078, 28079, 28080, 28081, 28082, 28084, 28085, 28086, 28087, 28088, 28089, 28090, 28091, 28092, 28093, 28094, 28095, 28096, 28097, 28098, 28099, 28100, 28101, 28102, 28103, 28104, 28105, 28106, 28107, 28108, 28109, 28110, 28111, 28112, 28113, 28114, 28115, 28116, 28117, 28118, 28119, 28121, 28122, 28123, 28124, 28125, 28126, 28127, 28128, 28129, 28130, 28131, 28132, 28133, 28134, 28135, 28136, 28137, 28138, 28139, 28140, 28141, 28142, 28143, 28144, 28145, 28146, 28147, 28148, 28149, 28150, 28151, 28152, 28153, 28154, 28155, 28156, 28158, 28159, 28160, 28161, 28162, 28163, 28164, 28165, 28166, 28167, 28168, 28169, 28170, 28171, 28172, 28173, 28174, 28175, 28176, 28177, 28178, 28179, 28180, 28181, 28184, 28185, 28186, 28187, 28188, 28189, 28190, 28191, 28192, 28193, 28194, 28196, 28197, 28198, 28199, 28200, 28201, 28202, 28203, 28204, 28205, 28206, 28207, 28208, 28209, 28210, 28211, 28212, 28213, 28214, 28215, 28216, 28217, 28218, 28221, 28224, 28225, 28226, 28227, 28228, 28230, 28231, 28232, 28234, 28235, 28236, 28237, 28238, 28239, 28240, 28241, 28242, 28243, 28244, 28245, 28247, 28248, 28249, 28250, 28251, 28252, 28253, 28254, 28255, 28256, 28257, 28258, 28260, 28261, 28262, 28263, 28264, 28265, 28267, 28268, 28269, 28270, 28271, 28272, 28273, 28274, 28275, 28276, 28278, 28279, 28280, 28281, 28282, 28283, 28284, 28285, 28286, 28287, 28288, 28289, 28290, 28291, 28292, 28293, 28294, 28295, 28296, 28298, 28299, 28300, 28301, 28302, 28303, 28304, 28305, 28306, 28307, 28308, 28309, 28310, 28311, 28312, 28313, 28314, 28315, 28316, 28317, 28318, 28319, 28320, 28321, 28322, 28323, 28324, 28325, 28326, 28327, 28328, 28329, 28330, 28331, 28332, 28333, 28334, 28335, 28336, 28337, 28338, 28339, 28340, 28341, 28342, 28343, 28344, 28345, 28346, 28347, 28348, 28350, 28351, 28352, 28353, 28354, 28355, 28356, 28357, 28358, 28359, 28360, 28361, 28362, 28363, 28364, 28365, 28366, 28367, 28368, 28369, 28370, 28371, 28372, 28373, 28374, 28375, 28376, 28377, 28378, 28379, 28380, 28381, 28382, 28383, 28384, 28386, 28387, 28388, 28389, 28390, 28391, 28392, 28393, 28394, 28395, 28396, 28397, 28398, 28399, 28400, 28401, 28402, 28403, 28404, 28405, 28406, 28407, 28408, 28409, 28410, 28411, 28412, 28413, 28414, 28415, 28416, 28417, 28418, 28420, 28421, 28422, 28423, 28424, 28425, 28426, 28427, 28428, 28429, 28430, 28431, 28432, 28433, 28434, 28435, 28436, 28437, 28438, 28439, 28440, 28441, 28442, 28443, 28444, 28445, 28446, 28447, 28448, 28449, 28450, 28451, 28452, 28453, 28455, 28456, 28457, 28458, 28459, 28460, 28461, 28462, 28463, 28464, 28465, 28466, 28467, 28468, 28469, 28470, 28471, 28472, 28473, 28474, 28475, 28476, 28477, 28478, 28479, 28480, 28481, 28482, 28483, 28484, 28485, 28486, 28487, 28488, 28489, 28490, 28492, 28493, 28494, 28495, 28496, 28497, 28498, 28499, 28500, 28501, 28502, 28503, 28504, 28505, 28506, 28507, 28508, 28509, 28510, 28511, 28512, 28513, 28514, 28515, 28516, 28517, 28518, 28519, 28520, 28522, 28523, 28524, 28525, 28526, 28527, 28528, 28529, 28530, 28532, 28533, 28534, 28535, 28536, 28537, 28538, 28539, 28540, 28541, 28542, 28543, 28544, 28545, 28546, 28547, 28548, 28549, 28550, 28551, 28553, 28554, 28555, 28556, 28557, 28558, 28559, 28560, 28561, 28563, 28564, 28565, 28566, 28567, 28568, 28569, 28570, 28571, 28572, 28573, 28574, 28575, 28576, 28577, 28578, 28579, 28580, 28581, 28582, 28583, 28584, 28585, 28586, 28587, 28588, 28589, 28590, 28591, 28592, 28594, 28595, 28596, 28597, 28598, 28599, 28600, 28601, 28602, 28603, 28604, 28605, 28606, 28607, 28608, 28609, 28611, 28612, 28613, 28614, 28615, 28616, 28618, 28619, 28620, 28622, 28623, 28624, 28625, 28627, 28628, 28629, 28630, 28631, 28632, 28633, 28634, 28635, 28636, 28637, 28638, 28639, 28641, 28642, 28643, 28644, 28645, 28646, 28647, 28648, 28649, 28650, 28651, 28652, 28654, 28655, 28656, 28657, 28658, 28660, 28662, 28663, 28664, 28665, 28666, 28667, 28669, 28670, 28671, 28672, 28673, 28674, 28675, 28676, 28677, 28678, 28679, 28680, 28682, 28683, 28684, 28685, 28686, 28687, 28688, 28689, 28690, 28691, 28692, 28693, 28695, 28696, 28697, 28698, 28699, 28700, 28702, 28703, 28704, 28705, 28706, 28707, 28708, 28709, 28710, 28711, 28712, 28713, 28714, 28715, 28716, 28717, 28718, 28719, 28720, 28721, 28722, 28723, 28724, 28725, 28726, 28728, 28729, 28730, 28731, 28732, 28733, 28734, 28735, 28737, 28738, 28739, 28740, 28741, 28742, 28743, 28744, 28746, 28747, 28748, 28749, 28750, 28751, 28752, 28753, 28754, 28755, 28756, 28757, 28758, 28759, 28760, 28761, 28762, 28763, 28764, 28765, 28766, 28767, 28769, 28770, 28771, 28772, 28773, 28774, 28776, 28777, 28778, 28779, 28780, 28781, 28782, 28783, 28784, 28785, 28786, 28787, 28788, 28789, 28790, 28791, 28792, 28793, 28794, 28795, 28796, 28797, 28798, 28799, 28800, 28801, 28802, 28803, 28804, 28805, 28806, 28807, 28808, 28809, 28810, 28811, 28812, 28813, 28814, 28815, 28816, 28817, 28818, 28819, 28820, 28821, 28822, 28823, 28824, 28825, 28826, 28828, 28830, 28831, 28832, 28833, 28834, 28835, 28836, 28837, 28838, 28839, 28841, 28843, 28844, 28845, 28846, 28847, 28848, 28850, 28851, 28852, 28853, 28854, 28856, 28857, 28858, 28860, 28861, 28862, 28863, 28864, 28865, 28866, 28867, 28869, 28870, 28871, 28872, 28873, 28874, 28876, 28877, 28878, 28879, 28880, 28881, 28882, 28883, 28884, 28885, 28886, 28887, 28888, 28890, 28891, 28892, 28893, 28894, 28895, 28896, 28897, 28898, 28899, 28901, 28902, 28903, 28904, 28905, 28906, 28907, 28909, 28910, 28911, 28912, 28913, 28914, 28915, 28916, 28917, 28918, 28919, 28920, 28921, 28923, 28924, 28925, 28926, 28927, 28928, 28929, 28930, 28931, 28932, 28933, 28934, 28935, 28936, 28937, 28938, 28939, 28940, 28942, 28943, 28944, 28945, 28946, 28947, 28948, 28949, 28950, 28951, 28952, 28953, 28954, 28955, 28956, 28957, 28958, 28960, 28961, 28963, 28964, 28965, 28966, 28967, 28968, 28969, 28970, 28971, 28973, 28974, 28975, 28976, 28977, 28978, 28979, 28980, 28981, 28982, 28983, 28984, 28985, 28986, 28987, 28988, 28989, 28990, 28992, 28993, 28995, 28996, 28998, 28999, 29000, 29001, 29002, 29003, 29004, 29005, 29007, 29008, 29009, 29010, 29011, 29012, 29013, 29014, 29015, 29016, 29017, 29019, 29021, 29022, 29023, 29024, 29025, 29026, 29027, 29028, 29029, 29030, 29031, 29032, 29034, 29035, 29036, 29037, 29038, 29039, 29040, 29041, 29042, 29043, 29044, 29045, 29046, 29047, 29048, 29049, 29050, 29051, 29053, 29054, 29056, 29058, 29059, 29060, 29061, 29062, 29063, 29064, 29065, 29066, 29068, 29069, 29070, 29071, 29072, 29073, 29074, 29075, 29076, 29077, 29078, 29079, 29080, 29081, 29082, 29083, 29084, 29085, 29086, 29088, 29089, 29091, 29093, 29094, 29095, 29097, 29100, 29101, 29102, 29106, 29107, 29108, 29109, 29110, 29111, 29112, 29113, 29114, 29115, 29116, 29117, 29118, 29120, 29121, 29122, 29123, 29124, 29125, 29126, 29127, 29128, 29129, 29130, 29131, 29132, 29133, 29134, 29135, 29136, 29137, 29138, 29139, 29140, 29141, 29142, 29143, 29144, 29145, 29146, 29147, 29148, 29149, 29150, 29151, 29152, 29153, 29154, 29155, 29156, 29158, 29159, 29160, 29161, 29162, 29163, 29164, 29165, 29166, 29167, 29168, 29169, 29170, 29171, 29172, 29173, 29174, 29175, 29176, 29177, 29178, 29179, 29182, 29183, 29184, 29185, 29186, 29187, 29188, 29189, 29190, 29191, 29193, 29194, 29195, 29196, 29197, 29198, 29199, 29200, 29201, 29202, 29203, 29204, 29205, 29207, 29208, 29209, 29210, 29211, 29212, 29213, 29214, 29216, 29218, 29220, 29221, 29223, 29225, 29226, 29227, 29228, 29229, 29230, 29234, 29237, 29238, 29240, 29241, 29242, 29243, 29244, 29245, 29246, 29247, 29248, 29249, 29250, 29251, 29252, 29254, 29255, 29256, 29257, 29258, 29259, 29260, 29261, 29262, 29263, 29264, 29265, 29266, 29267, 29268, 29269, 29270, 29271, 29272, 29273, 29274, 29275, 29276, 29277, 29278, 29279, 29280, 29281, 29282, 29283, 29284, 29285, 29286, 29288, 29289, 29290, 29291, 29292, 29293, 29294, 29295, 29296, 29297, 29298, 29299, 29300, 29301, 29302, 29303, 29304, 29305, 29306, 29307, 29308, 29309, 29310, 29311, 29312, 29313, 29314, 29315, 29316, 29317, 29318, 29319, 29321, 29322, 29323, 29324, 29325, 29326, 29327, 29328, 29329, 29330, 29331, 29332, 29333, 29334, 29335, 29336, 29337, 29338, 29339, 29340, 29341, 29342, 29343, 29345, 29346, 29347, 29348, 29349, 29350, 29351, 29352, 29353, 29354, 29355, 29356, 29357, 29358, 29359, 29360, 29362, 29363, 29364, 29365, 29366, 29367, 29368, 29369, 29370, 29371, 29372, 29373, 29374, 29375, 29376, 29377, 29378, 29379, 29380, 29381, 29384, 29385, 29386, 29387, 29388, 29389, 29390, 29391, 29392, 29393, 29394, 29396, 29397, 29398, 29399, 29400, 29401, 29402, 29403, 29404, 29405, 29406, 29407, 29408, 29409, 29410, 29411, 29412, 29413, 29414, 29415, 29416, 29419, 29420, 29421, 29422, 29423, 29424, 29425, 29426, 29427, 29428, 29429, 29431, 29432, 29433, 29434, 29435, 29436, 29437, 29438, 29439, 29440, 29441, 29442, 29443, 29444, 29445, 29446, 29447, 29448, 29449, 29450, 29451, 29452, 29453, 29454, 29455, 29458, 29461, 29462, 29463, 29464, 29465, 29466, 29467, 29468, 29470, 29473, 29474, 29475, 29476, 29477, 29478, 29479, 29480, 29481, 29482, 29483, 29484, 29485, 29486, 29487, 29489, 29490, 29491, 29492, 29493, 29494, 29495, 29496, 29497, 29498, 29499, 29500, 29501, 29502, 29503, 29504, 29505, 29506, 29507, 29508, 29509, 29510, 29511, 29512, 29513, 29514, 29515, 29516, 29517, 29519, 29520, 29521, 29522, 29523, 29524, 29525, 29526, 29527, 29528, 29529, 29530, 29531, 29532, 29533, 29534, 29535, 29536, 29537, 29538, 29539, 29540, 29541, 29542, 29543, 29544, 29545, 29546, 29547, 29548, 29549, 29551, 29552, 29553, 29554, 29555, 29556, 29557, 29558, 29559, 29560, 29561, 29562, 29563, 29564, 29565, 29566, 29568, 29569, 29570, 29572, 29573, 29575, 29576, 29577, 29578, 29579, 29580, 29581, 29583, 29584, 29585, 29586, 29587, 29588, 29589, 29590, 29591, 29592, 29593, 29594, 29595, 29596, 29597, 29598, 29599, 29600, 29602, 29603, 29604, 29605, 29606, 29608, 29609, 29610, 29611, 29612, 29613, 29614, 29615, 29616, 29618, 29619, 29620, 29621, 29622, 29624, 29625, 29626, 29627, 29628, 29629, 29630, 29631, 29632, 29633, 29634, 29635, 29636, 29637, 29638, 29639, 29640, 29641, 29643, 29645, 29646, 29647, 29648, 29649, 29650, 29651, 29652, 29653, 29654, 29655, 29656, 29657, 29658, 29659, 29660, 29661, 29662, 29663, 29664, 29665, 29666, 29667, 29668, 29669, 29670, 29672, 29673, 29675, 29676, 29677, 29678, 29679, 29680, 29681, 29682, 29683, 29684, 29685, 29686, 29687, 29688, 29689, 29690, 29691, 29692, 29693, 29694, 29695, 29698, 29699, 29700, 29701, 29702, 29703, 29704, 29705, 29706, 29707, 29708, 29709, 29710, 29711, 29712, 29713, 29714, 29715, 29716, 29717, 29718, 29719, 29720, 29721, 29722, 29723, 29724, 29725, 29726, 29727, 29728, 29729, 29730, 29732, 29733, 29734, 29736, 29737, 29738, 29739, 29741, 29742, 29743, 29744, 29745, 29746, 29747, 29748, 29749, 29750, 29751, 29752, 29753, 29754, 29755, 29756, 29757, 29758, 29759, 29760, 29761, 29762, 29763, 29764, 29765, 29766, 29767, 29768, 29769, 29770, 29771, 29772, 29773, 29774, 29775, 29776, 29777, 29778, 29779, 29780, 29781, 29782, 29783, 29784, 29785, 29786, 29787, 29788, 29789, 29790, 29791, 29792, 29793, 29794, 29795, 29796, 29797, 29798, 29799, 29800, 29801, 29802, 29803, 29804, 29805, 29806, 29807, 29808, 29809, 29810, 29811, 29812, 29813, 29814, 29815, 29816, 29817, 29818, 29819, 29820, 29821, 29822, 29823, 29824, 29825, 29826, 29827, 29828, 29830, 29831, 29832, 29833, 29835, 29836, 29837, 29838, 29839, 29840, 29841, 29842, 29843, 29844, 29845, 29846, 29847, 29848, 29849, 29850, 29851, 29852, 29853, 29854, 29855, 29856, 29857, 29858, 29859, 29860, 29862, 29864, 29865, 29866, 29867, 29868, 29869, 29870, 29871, 29872, 29873, 29875, 29876, 29877, 29879, 29880, 29881, 29882, 29883, 29884, 29886, 29888, 29889, 27493, 29892, 29893, 29894, 29895, 29898, 29899, 29900, 29902, 29904, 29905, 29906, 29908, 29909, 29910, 29914, 29916, 29917, 29918, 29919, 29921, 29922, 29923, 29924, 29925, 29926, 29927, 29928, 29929, 27536, 29932, 29933, 29934, 29935, 29938, 29939, 29940, 27548, 29943, 29944, 29945, 29946, 29948, 29949, 29950, 29952, 29954, 29955, 29958, 29959, 29960, 29961, 29964, 29966, 29967, 29968, 29969, 29970, 29973, 29974, 29976, 29977, 29978, 29979, 29980, 29981, 29982, 29983, 29984, 29985, 29992, 29993, 27601, 29996, 29997, 29999, 30000, 30003, 30015, 30016, 30017, 30018, 30020, 30021, 30024, 30025, 30028, 30029, 30030, 30031, 30032, 30033, 30034, 30035, 30036, 30037, 30038, 30039, 30040, 30041, 30042, 30043, 30044, 30046, 30047, 30048, 30051, 30053, 30054, 30055, 30056, 30058, 30059, 30062, 30063, 30064, 30065, 30069, 30070, 30072, 30073, 30074, 30077, 30078, 27672, 30081, 30082, 30085, 30086, 30087, 30088, 30089, 30090, 30091, 30092, 30093, 30094, 30095, 30096, 30097, 30098, 30099, 30100, 30101, 30102, 30103, 30104, 30105, 30106, 30107, 30108, 30110, 30111, 30112, 30113, 30115, 30117, 30119, 30120, 30121, 30123, 30124, 30125, 27697, 30128, 30130, 30132, 30133, 30134, 30135, 30137, 30138, 30139, 30142, 30143, 30144, 30147, 30148, 30149, 30150, 30152, 30153, 30154, 30156, 30158, 30159, 30160, 30161, 30162, 30163, 30164, 30165, 30166, 30167, 30168, 30169, 30170, 30172, 30173, 30174, 30175, 30176, 30177, 30178, 30180, 30181, 30182, 30184, 30185, 30186, 30187, 30188, 30191, 30192, 30195, 30196, 30197, 30200, 30201, 30202, 30203, 30205, 30206, 30209, 30210, 30211, 30212, 30214, 30217, 30219, 30220, 30221, 30222, 30223, 30224, 30227, 30228, 30229, 27779, 30231, 30234, 30235, 30238, 30239, 30240, 30243, 30246, 30247, 30248, 30249, 30251, 30254, 30255, 30256, 30258, 30259, 30260, 27517, 27514, 27571, 27568, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30272, 30275, 30277, 30279, 30281, 30283, 30285, 30288, 30290, 30292, 30294, 30296, 30298, 30300, 30304, 30308, 30311, 30313, 30315, 30317, 30319, 30322, 30324, 30326, 30328, 30330, 30332, 30334, 30337, 30339, 30341, 30344, 30347, 30349, 30351, 30353, 30355, 27931, 30358, 30360, 30362, 30364, 30366, 30368, 30370, 30374, 30378, 30381, 30383, 30385, 30387, 30389, 27968, 30392, 30394, 30396, 30398, 30400, 30402, 30404, 30408, 30412, 30415, 30417, 30419, 30421, 30423, 30426, 30428, 30430, 30432, 30434, 30436, 30438, 30442, 30446, 30449, 30451, 30453, 30455, 30457, 30460, 30462, 30464, 30466, 30468, 30470, 30472, 30476, 30480, 30483, 30485, 30487, 30489, 30491, 30493, 30495, 30498, 30500, 30502, 30504, 30506, 30508, 30510, 30513, 30515, 30517, 30519, 30523, 30525, 30527, 30529, 30531, 30534, 30536, 30538, 30540, 30542, 30544, 30546, 30549, 30551, 30553, 30555, 30559, 30561, 30563, 30565, 30567, 30570, 30572, 30574, 30576, 30578, 30580, 30582, 30585, 30587, 30589, 30591, 30593, 30594, 30596, 30598, 30600, 30602, 30605, 30607, 30609, 30611, 30613, 30615, 30617, 30620, 30622, 30624, 30627, 30628, 30629, 30631, 30633, 30635, 30637, 30639, 30641, 30643, 30645, 30649, 30651, 30653, 30655, 30658, 30661, 30665, 30667, 30669, 30671, 30673, 30676, 30677, 30679, 30681, 30683, 30686, 30690, 30694, 30697, 30700, 30703, 30705, 30707, 30709, 30711, 30713, 30715, 30718, 30721, 30723, 30725, 30727, 30729, 30731, 30733, 30735, 30737, 30739, 30742, 30743, 30747, 30749, 30751, 30753, 30756, 30758, 30760, 30762, 30766, 30769, 30771, 30773, 30775, 30777, 30779, 30782, 30784, 30786, 30788, 30790, 30792, 30794, 30796, 30798, 30801, 30804, 30806, 30808, 30810, 30812, 30815, 30817, 30819, 30821, 30823, 30825, 30827, 30830, 30832, 30835, 30838, 30840, 30842, 30844, 30846, 30849, 30851, 30853, 30855, 30857, 30859, 30861, 30864, 30866, 30868, 30870, 30874, 30876, 30878, 30880, 30882, 30885, 30887, 30889, 30891, 30893, 30895, 30897, 30900, 30902, 30904, 30906, 30910, 30912, 28521, 30915, 30917, 30919, 30923, 30925, 30927, 30929, 30932, 30934, 30937, 30939, 30941, 28552, 30944, 30946, 30948, 30952, 30954, 30956, 30958, 30961, 30963, 30966, 30968, 30970, 30972, 30974, 30976, 30978, 30982, 30984, 30986, 30988, 30990, 30992, 30994, 30998, 31001, 31003, 31004, 28621, 31008, 31010, 31011, 31013, 31015, 31018, 31020, 31024, 31026, 31030, 31033, 31036, 31040, 31041, 31042, 31044, 31048, 31050, 31052, 31054, 31057, 31060, 31064, 31066, 31069, 31071, 31072, 31074, 31078, 31080, 31082, 31084, 31087, 31091, 31095, 31098, 31100, 31103, 31105, 31107, 31110, 31111, 31113, 31115, 31119, 31121, 31123, 31125, 31128, 31131, 31133, 31136, 31138, 31140, 31141, 31143, 31147, 31149, 31151, 31153, 31156, 31158, 31161, 31163, 31166, 31170, 31172, 31174, 31176, 31178, 31180, 31182, 31184, 31186, 31188, 31190, 31192, 31194, 31197, 31199, 31201, 31203, 31205, 31208, 31210, 31212, 31216, 31218, 31221, 31224, 31226, 31229, 31231, 31232, 31234, 31238, 31240, 31242, 31244, 31247, 31250, 31251, 31254, 31256, 31259, 28900, 31262, 31264, 31268, 31270, 31272, 31274, 31277, 31280, 31281, 31284, 31286, 31289, 31291, 31293, 31295, 31299, 31301, 31303, 31305, 31308, 31310, 31313, 28959, 31318, 31320, 31322, 31324, 28972, 31328, 31330, 31332, 31334, 31337, 31339, 31342, 28991, 31347, 31349, 31352, 31355, 31357, 31360, 31363, 31366, 31368, 31369, 31371, 31373, 31375, 31377, 31381, 31383, 31385, 31387, 31390, 31392, 31395, 31398, 31400, 31402, 31404, 31406, 31408, 29067, 31412, 31414, 31416, 31418, 31421, 31423, 31426, 31429, 31431, 31433, 31436, 31439, 31440, 31442, 31444, 31446, 31448, 31450, 31453, 31455, 31457, 31459, 31461, 31463, 31465, 31467, 31469, 31472, 31474, 31477, 31480, 31482, 31484, 31486, 31490, 31492, 31494, 31496, 31499, 31501, 31504, 31507, 31509, 31511, 31512, 31514, 31516, 31518, 31521, 31522, 31524, 31526, 31528, 31531, 31534, 31535, 31538, 31540, 31542, 31546, 31549, 31551, 31553, 31554, 31556, 31557, 31559, 31561, 31563, 31565, 31567, 31570, 31572, 31574, 31576, 31578, 31580, 31582, 31585, 31587, 31589, 31592, 31594, 31596, 31598, 31600, 31603, 31605, 31607, 31609, 31611, 31613, 31615, 31618, 31621, 31624, 31626, 31628, 31630, 31632, 31635, 31637, 31639, 31641, 31643, 31645, 31647, 31649, 31651, 31654, 31657, 31658, 31660, 31663, 31665, 31667, 31669, 31671, 31674, 31676, 31678, 31680, 31682, 31684, 31686, 31688, 31690, 31693, 31694, 31696, 31698, 31700, 31702, 31705, 31707, 31709, 31711, 31713, 31715, 31717, 31720, 31722, 31725, 31726, 31728, 31730, 31732, 31734, 31737, 31739, 31741, 31743, 31745, 31747, 31749, 31751, 31753, 31756, 31758, 31761, 31762, 31763, 31765, 31767, 31770, 29472, 31773, 31775, 31777, 31779, 31781, 31783, 31787, 31789, 31791, 31793, 31796, 31798, 31804, 31807, 31809, 31811, 31813, 29518, 31817, 31819, 31821, 31823, 31826, 31828, 31834, 31837, 31839, 31841, 31843, 31847, 31849, 31851, 31853, 31856, 31858, 31863, 31866, 29574, 31869, 31871, 31875, 31877, 31879, 31881, 31884, 31886, 31889, 31892, 31893, 31896, 31898, 31901, 31904, 31907, 31911, 31912, 31914, 31916, 31918, 31920, 31922, 31924, 31926, 31931, 31933, 31935, 31937, 31941, 31943, 31945, 31948, 31953, 31955, 31957, 31959, 31961, 31963, 31965, 31967, 31969, 31971, 31974, 31977, 31980, 31982, 31984, 31986, 31988, 31990, 31992, 31994, 31996, 31998, 32000, 32002, 32004, 32006, 32008, 32010, 32013, 32016, 32020, 32022, 32024, 32026, 32030, 32032, 32034, 32036, 32038, 32040, 32043, 32046, 32048, 32051, 32053, 32055, 32057, 32060, 32062, 32065, 32067, 32069, 32071, 32073, 32075, 32077, 32079, 32081, 32085, 32087, 32090, 32092, 32094, 32096, 32098, 32100, 32102, 32104, 32108, 32112, 32114, 32116, 32118, 32121, 32123, 32126, 32128, 32132, 32135, 28259, 30689, 32137, 31545, 32140, 32142, 32145, 32147, 32149, 31169, 32152, 32154, 28259, 30689, 32157, 31000, 32161, 32164, 32166, 32170, 32174, 32177, 31947, 32181, 32184, 32187, 32190, 32191, 32193, 31000, 32198, 32201, 32203, 32207, 32210, 32214, 32215, 32217, 28681, 31090, 32221, 32223, 28681, 31090, 32226, 32228, 32233, 32234, 32236, 32084, 32240, 32243, 32245, 32247, 28681, 31090, 32250, 32252, 32255, 32257, 28681, 31032, 32259, 32261, 32264, 32269, 32270, 32272, 32275, 32280, 32281, 32285, 32286, 32289, 32291, 28681, 31090, 32293, 32295, 32297, 28681, 31032, 32300, 32302, 28681, 31090, 32304, 32306, 31169, 32308, 32310, 32312, 32314, 32318, 32321, 32324, 32328, 32331, 31947, 32338, 32341, 28962, 28994, 32346, 32348, 31545, 32351, 32353, 32356, 31545, 32358, 32360, 32363, 32365, 31803, 31833, 29567, 32368, 32370, 32373, 32376, 31947, 32379, 32382, 32084, 32385, 32390, 32393, 32394, 32396, 32399, 32401, 32404, 32084, 32408, 32412, 32416, 32163, 32173, 32418, 32419, 32178, 32183, 32196, 32200, 32209, 32420, 32421, 32220, 32278, 32231, 32238, 32274, 30218, 27752, 32403, 32406, 27630, 32267, 32274, 32278, 32283, 32288, 32335, 32345, 27752, 27761, 32388, 30218, 32403, 32406, 27797, 32411, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32450, 32453, 32455, 32458, 32461, 32463, 32464, 32467, 32469, 32472, 32475, 32479, 32480, 32483, 32486, 32489, 32492, 32494, 32495, 32498, 32501, 32504, 32507, 32509, 32510, 32513, 32515, 32518, 32521, 32523, 32524, 32527, 32529, 32532, 32535, 32537, 32540, 32543, 32545, 32548, 32551, 32555, 32556, 32559, 32561, 32564, 32567, 32571, 32572, 32575, 32577, 32580, 32583, 32589, 32592, 32594, 32597, 32600, 32611, 32614, 32615, 32618, 32620, 32622, 32625, 32627, 32630, 32632, 32634, 32638, 32643, 32647, 32650, 32653, 32655, 32656, 32659, 32663, 32664, 32666, 32669, 32671, 32674, 32679, 32680, 32681, 32684, 32686, 32689, 32692, 32694, 32695, 32696, 32699, 32701, 32704, 32707, 32711, 32712, 32715, 32717, 32720, 32723, 32727, 32730, 32733, 32734, 32737, 32739, 32743, 32746, 32747, 32750, 32752, 32759, 32761, 32764, 32766, 32770, 32776, 32778, 32780, 32783, 32784, 32787, 32788, 32791, 32793, 32795, 32796, 32799, 32800, 32803, 32805, 32806, 32810, 32812, 32815, 32816, 32819, 32822, 32824, 32827, 32828, 32831, 32833, 32838, 32841, 32843, 32847, 32849, 32852, 32854, 32857, 32859, 32860, 32862, 32863, 32866, 32867, 32870, 32873, 32876, 32879, 32880, 32883, 32886, 32889, 32892, 32893, 32896, 32898, 32901, 32904, 32906, 32909, 32911, 32920, 32924, 32927, 32928, 32931, 32933, 32937, 32940, 32942, 32945, 32947, 32955, 32958, 32960, 32963, 32968, 32970, 32971, 32972, 32975, 32976, 32979, 32981, 32986, 32989, 32991, 32994, 32997, 33008, 33011, 33013, 33016, 33019, 33022, 33023, 33026, 33028, 33031, 33034, 33036, 33037, 33040, 33042, 33045, 33050, 33051, 33054, 33055, 33058, 33060, 33063, 33068, 33070, 33073, 33075, 33078, 33081, 33083, 33085, 33088, 33090, 33093, 33098, 33100, 33105, 33110, 33113, 33114, 33117, 33119, 33120, 33121, 33124, 33126, 33129, 33131, 33132, 33133, 33136, 33137, 33140, 33142, 33143, 33144, 33147, 33148, 33151, 33153, 33160, 33161, 33164, 33167, 33170, 33171, 33174, 33176, 33182, 33185, 33188, 33189, 33191, 33194, 33197, 33200, 33203, 33206, 33207, 33208, 33209, 33212, 33215, 33218, 33220, 33222, 33225, 33227, 33231, 33234, 33240, 33243, 33246, 33247, 33248, 33251, 33253, 33255, 33256, 33258, 27840, 33259, 28297, 33155, 27843, 31102, 28727, 32983, 32985, 32996, 33000, 31548, 33261, 30274, 31555, 29233, 32449, 33262, 30306, 32478, 30376, 30410, 30444, 30478, 32769, 32771, 32539, 33264, 32554, 32570, 32586, 32588, 32603, 32604, 32606, 33266, 32983, 32985, 32608, 33000, 30634, 33267, 32609, 31555, 28233, 32610, 33268, 33270, 28266, 33271, 28297, 33155, 30702, 31102, 28727, 31951, 33230, 33273, 33239, 33214, 31951, 33230, 33280, 33239, 33238, 33214, 33285, 31951, 33230, 33287, 33239, 33238, 33214, 33214, 33294, 33296, 33297, 31900, 29607, 32641, 32642, 33298, 33300, 33301, 31900, 28653, 32644, 32645, 33302, 33214, 31900, 29607, 32646, 32045, 33230, 33307, 33239, 33238, 32662, 32678, 32710, 32726, 33311, 33312, 33313, 31102, 28727, 33314, 27176, 27175, 27181, 27180, 33316, 33318, 33319, 28653, 31035, 33320, 33322, 33214, 33326, 33214, 33214, 32777, 32769, 32771, 33109, 33331, 33333, 33334, 28653, 31035, 33335, 32777, 33103, 33107, 33109, 33337, 33338, 33339, 28653, 31035, 33340, 33342, 33343, 28727, 31102, 33344, 32821, 31168, 31165, 31548, 33346, 29233, 31555, 33347, 33349, 31951, 32846, 33351, 33352, 32851, 32856, 33214, 33354, 33355, 32045, 33230, 33356, 33239, 33238, 33357, 33358, 32872, 31258, 32885, 31288, 32900, 33359, 32913, 33360, 31351, 28997, 31354, 31359, 29006, 31362, 32923, 33361, 32935, 32936, 32949, 32950, 32983, 32985, 31437, 33363, 31438, 31555, 29105, 32954, 33364, 32967, 33052, 33107, 33109, 32983, 32985, 32996, 33000, 31548, 33367, 33003, 31555, 29233, 33007, 33368, 33049, 33052, 33107, 33109, 33067, 33097, 33103, 33107, 33109, 33371, 33372, 33373, 33374, 33155, 31895, 31900, 29607, 31903, 33163, 33375, 33214, 32045, 33230, 33379, 33239, 33238, 32045, 33230, 33382, 33239, 33238, 31951, 29674, 29671, 33214, 33214, 32045, 33230, 33391, 33239, 33238, 32139, 32159, 29896, 33395, 33276, 32172, 33396, 29911, 33397, 32179, 33399, 33386, 32186, 33400, 33283, 33401, 29947, 33402, 33290, 29956, 33403, 32212, 33404, 33406, 33407, 33408, 30001, 29998, 33409, 30060, 30057, 33410, 30171, 30179, 32392, 33411, 33386, 27753, 33412, 33381, 32398, 32400, 30236, 33413, 30241, 33414, 27631, 33415, 33309, 32414, 33394, 30193, 33378, 33416, 30060, 30057, 33417, 33418, 30075, 33419, 30083, 33420, 32325, 33421, 33422, 30171, 30179, 30193, 33378, 27753, 33423, 33381, 27762, 33424, 33425, 32392, 33426, 33386, 32398, 32400, 30236, 33427, 30241, 33428, 27798, 33429, 33430, 32414, 33394, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30648, 32613, 32619, 32617, 30664, 33745, 32626, 32624, 32631, 32629, 30693, 33747, 31874, 33146, 33152, 32448, 33154, 33748, 33749, 33750, 33751, 33575, 31109, 29018, 33587, 31489, 32974, 32980, 32978, 33752, 32982, 33753, 32990, 32988, 32995, 32607, 32998, 33754, 33755, 33756, 33758, 33759, 33760, 33761, 30287, 32452, 32460, 32457, 33763, 30303, 33445, 30321, 32466, 32474, 32471, 33764, 32476, 33451, 32485, 32482, 32491, 32488, 33765, 30373, 33457, 32500, 32497, 32506, 32503, 33766, 30407, 33463, 30425, 32512, 32520, 32517, 33767, 30441, 33469, 30459, 32526, 32534, 32531, 33768, 30475, 33475, 33769, 33558, 33770, 33771, 30497, 32542, 32550, 32547, 33773, 32552, 30522, 30533, 32558, 32566, 32563, 33774, 32568, 30558, 30569, 32574, 32582, 32579, 33775, 32584, 33776, 30604, 32591, 32599, 32596, 33777, 32601, 33778, 33779, 33558, 31489, 32974, 32980, 32978, 33781, 32982, 33782, 32990, 32988, 32995, 32607, 33783, 32998, 33784, 33785, 33787, 33788, 33789, 33790, 30648, 32613, 32619, 32617, 30664, 33793, 32626, 32624, 32631, 32629, 30693, 33795, 31874, 33146, 33152, 33150, 33154, 33796, 33797, 33798, 33799, 33586, 31109, 29018, 33587, 33800, 32050, 33175, 33178, 33801, 33228, 32636, 32637, 33238, 33803, 33190, 33202, 32758, 29697, 29735, 31979, 33193, 33804, 32029, 33239, 33196, 33805, 33224, 32050, 33178, 33806, 33228, 32636, 33236, 33808, 33809, 33166, 32758, 30981, 31930, 33193, 33810, 33173, 33239, 31940, 33812, 33224, 32050, 33226, 33813, 33228, 32636, 32637, 33815, 33816, 33202, 33199, 33205, 32019, 29697, 29735, 32640, 33817, 32029, 33239, 33217, 33166, 32758, 31929, 30997, 33211, 33818, 33173, 33239, 31940, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 30717, 32782, 33822, 33823, 33824, 29018, 32921, 33825, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32781, 30717, 32782, 33829, 33830, 33831, 32921, 29617, 33832, 33557, 33169, 31929, 30997, 32767, 32084, 33834, 33239, 33217, 33835, 33836, 33837, 33224, 32050, 33838, 33178, 33839, 33228, 33233, 33236, 33841, 33842, 32649, 32652, 30746, 32654, 32658, 33843, 32660, 32665, 30765, 30781, 32668, 32676, 32673, 33844, 33524, 30814, 32683, 32691, 32688, 32693, 33531, 30848, 32698, 32706, 32703, 33845, 32708, 30873, 30884, 32714, 32722, 32719, 33846, 32724, 30909, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33850, 33851, 33586, 31109, 29617, 33587, 30922, 32732, 32738, 32736, 32740, 33853, 33854, 30951, 32745, 32751, 32749, 32753, 33855, 33856, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33860, 33861, 33575, 29018, 31039, 33587, 33166, 32758, 30981, 31930, 32760, 33864, 32029, 33239, 31940, 32763, 33557, 33169, 31930, 31929, 32767, 32084, 33866, 33239, 33217, 33557, 33169, 31929, 30997, 32767, 33867, 31000, 33239, 33217, 31452, 32957, 32775, 32774, 33868, 32768, 33634, 33869, 33558, 33870, 33871, 31047, 32772, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32781, 31094, 32782, 33875, 33876, 33586, 29018, 31039, 33587, 31452, 32957, 32775, 32774, 33878, 32969, 33634, 33879, 33561, 33880, 33881, 31047, 32786, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32781, 31094, 32782, 33885, 33886, 33586, 29018, 31039, 33587, 31047, 32786, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33890, 33891, 33575, 31109, 29018, 33587, 31118, 32814, 32820, 32818, 33893, 32823, 31146, 32826, 32832, 32830, 32834, 33894, 33895, 33896, 33586, 33898, 33899, 33587, 31952, 33902, 31950, 32845, 33184, 33903, 33233, 32084, 33214, 33239, 33238, 33590, 33906, 33592, 33907, 32019, 31215, 32858, 32084, 33908, 33217, 33239, 33224, 33911, 32050, 28859, 28855, 33912, 33184, 32861, 33236, 33914, 33915, 31237, 32865, 32871, 32869, 32874, 33918, 33919, 31267, 32878, 32884, 32882, 32887, 33920, 33921, 31298, 32891, 32897, 32895, 33922, 32899, 32905, 32903, 32910, 32908, 33924, 32912, 33926, 33927, 33928, 33929, 33930, 33931, 29018, 32921, 33932, 31380, 32926, 32932, 32930, 33934, 32934, 33935, 32941, 32939, 32946, 32944, 33936, 32948, 33937, 31489, 32974, 32980, 32978, 33938, 32982, 33939, 33940, 33942, 33943, 33944, 33945, 31452, 32957, 32965, 32962, 32969, 33947, 33634, 33948, 33663, 33949, 33950, 31489, 32974, 32980, 32978, 33951, 32982, 33952, 32990, 32988, 32995, 32993, 32998, 33953, 33954, 33955, 33957, 33958, 33959, 33960, 31569, 33010, 33018, 33015, 33020, 33650, 31602, 33025, 33033, 33030, 33035, 33656, 31634, 33039, 33047, 33044, 33962, 33662, 33963, 33663, 33964, 33965, 31673, 33057, 33065, 33062, 33966, 33069, 31704, 33072, 33080, 33077, 33082, 33084, 31736, 33087, 33095, 33092, 33099, 33967, 33101, 33968, 33681, 33969, 33970, 31786, 33112, 33118, 33116, 31801, 27390, 33125, 33123, 33130, 33128, 31831, 27392, 31846, 33135, 33141, 33139, 31861, 29571, 31874, 33146, 33152, 33150, 33975, 33154, 33976, 33977, 33978, 33979, 31910, 29617, 33980, 33166, 33169, 31930, 31929, 33211, 33982, 33173, 33239, 31940, 33983, 32050, 33175, 33226, 33984, 33228, 33233, 33236, 33986, 33987, 33224, 32050, 33988, 33178, 33989, 33228, 33233, 33236, 33991, 33992, 31952, 33993, 31950, 33179, 33184, 33994, 33995, 33187, 33214, 32029, 33239, 33196, 33190, 33202, 33205, 29697, 29735, 31979, 33193, 33996, 32029, 33196, 33239, 33202, 33199, 33205, 32019, 29735, 29731, 33211, 33997, 32029, 33239, 33217, 33224, 32050, 33998, 33226, 33999, 33228, 33233, 33236, 34001, 34002, 33242, 33245, 32111, 32107, 33250, 33254, 33252, 33257, 32131, 34003, 32144, 29874, 29878, 32156, 34004, 34005, 34007, 34008, 34010, 34012, 34014, 34015, 34017, 29936, 34019, 34021, 34022, 34024, 29971, 30114, 29975, 27584, 27678, 32225, 32230, 29987, 29986, 29990, 29989, 34029, 34030, 34032, 34033, 34035, 30183, 34036, 32362, 32355, 32350, 32372, 34037, 34039, 34040, 34042, 34043, 34044, 34045, 34047, 34049, 34051, 34052, 34053, 34054, 34055, 27680, 27678, 32254, 30114, 30109, 32263, 30049, 30045, 34057, 34058, 30067, 30066, 34061, 34063, 27678, 27679, 27680, 27681, 27682, 30114, 30109, 30126, 30122, 34065, 30140, 30136, 30155, 30151, 32350, 32355, 34068, 32362, 34069, 30183, 32372, 34070, 34071, 34072, 34074, 34075, 34078, 34080, 34081, 34082, 34083, 34085, 34087, 34090, 34091, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 34112, 34113, 34114, 34115, 34116, 34118, 34119, 34120, 34121, 34122, 34124, 34125, 34126, 34127, 34128, 34131, 34133, 34134, 34135, 34136, 34137, 34138, 34139, 34140, 34142, 34144, 34145, 34146, 34147, 34148, 34151, 34153, 34156, 34157, 34158, 34159, 34161, 34162, 34163, 34164, 34165, 34166, 34168, 34169, 34170, 34171, 34172, 34173, 34175, 34176, 34177, 34178, 34179, 34180, 34182, 34183, 34184, 34185, 34186, 34187, 34189, 34190, 34191, 34192, 34193, 34194, 34196, 34197, 34199, 34202, 34203, 34204, 34205, 34207, 34208, 34209, 34210, 34211, 34212, 34214, 34215, 34216, 34217, 34218, 34219, 34221, 34223, 34224, 34225, 34226, 34228, 34231, 34232, 34233, 34234, 34235, 34237, 34239, 34240, 34241, 34242, 34244, 34246, 34248, 34251, 34252, 34253, 34254, 34255, 34257, 34258, 34259, 34260, 34261, 34263, 34264, 34265, 34266, 34267, 34270, 34272, 34273, 34274, 34275, 34277, 34278, 34279, 34281, 34282, 34283, 34284, 34286, 34287, 34288, 34289, 34290, 34291, 34292, 34294, 34295, 34296, 34298, 34299, 34300, 34302, 34303, 34304, 34305, 34307, 34308, 34309, 34310, 34311, 34313, 34314, 34315, 34317, 34318, 34319, 34321, 34322, 34323, 34324, 34326, 34327, 34328, 34329, 34330, 34331, 34332, 34334, 34335, 34336, 34337, 34338, 34339, 34340, 34341, 34343, 34344, 34345, 34346, 34347, 34348, 34349, 34350, 34351, 34352, 34353, 34354, 34355, 34356, 34357, 34358, 34361, 34362, 34364, 34365, 34366, 34367, 34368, 34369, 34370, 34371, 34372, 34373, 34374, 34375, 34376, 34379, 34380, 34382, 34383, 34384, 34385, 34386, 34387, 34389, 34390, 34391, 34394, 34395, 34397, 34399, 34400, 34401, 34402, 34404, 34405, 34406, 34407, 34408, 34410, 34411, 34412, 34413, 34414, 34415, 34416, 34418, 34419, 34420, 34421, 34422, 34423, 34424, 34425, 34426, 34427, 34428, 34430, 34431, 34432, 34433, 34434, 34435, 34437, 34438, 34439, 34440, 34441, 34442, 34443, 34444, 34445, 34446, 34447, 34448, 34449, 34450, 34451, 34453, 34454, 34455, 34456, 34457, 34458, 34459, 34460, 34461, 34462, 34464, 34465, 34466, 34467, 34468, 34469, 34471, 34472, 34473, 34474, 34475, 34476, 34477, 34478, 34479, 34480, 34481, 34482, 34483, 34485, 34486, 34487, 34488, 34489, 34490, 34491, 34492, 34493, 34495, 34496, 34497, 34498, 34499, 34500, 34501, 34502, 34503, 34504, 34506, 34507, 34508, 34509, 34510, 34511, 34512, 34514, 34515, 34516, 34517, 34518, 34519, 34520, 34522, 34523, 34525, 34528, 34529, 34530, 34531, 34532, 34533, 34534, 34535, 34536, 34537, 34538, 34539, 34540, 34542, 34543, 34544, 34545, 34546, 34547, 34548, 34549, 34551, 34552, 34554, 34557, 34558, 34559, 34560, 34561, 34562, 34563, 34564, 34565, 34566, 34567, 34568, 34569, 34571, 34572, 34573, 34574, 34575, 34576, 34577, 34578, 34579, 34580, 34581, 34582, 34583, 34584, 34585, 34586, 34587, 34589, 34590, 34591, 34592, 34593, 34594, 34595, 34596, 34598, 34599, 34600, 34601, 34602, 34603, 34604, 34606, 34607, 34608, 34610, 34611, 34613, 34614, 34615, 34617, 34618, 34619, 34620, 34621, 34622, 34624, 34626, 34627, 34628, 34629, 34631, 34632, 34633, 34635, 34636, 34637, 34639, 34640, 34641, 34642, 34644, 34645, 34646, 34647, 34648, 34651, 34652, 34653, 34654, 34655, 34658, 34659, 34660, 34661, 34663, 34664, 34665, 34666, 34667, 34669, 34670, 34673, 34676, 34677, 34679, 34680, 34681, 34682, 34684, 34686, 34687, 34688, 34689, 34691, 34693, 34694, 34695, 34696, 34698, 34700, 34702, 34705, 34706, 34707, 34708, 34709, 34711, 34713, 34716, 34717, 34718, 34719, 34721, 34723, 34724, 34725, 34726, 34727, 34730, 34732, 34735, 34736, 34737, 34738, 34739, 34740, 34741, 34742, 34743, 34744, 34745, 34746, 34747, 34748, 34749, 34750, 34752, 34754, 34757, 34758, 34759, 34760, 34762, 34763, 34764, 34765, 34766, 34767, 34768, 34769, 34770, 34771, 34772, 34773, 34775, 34777, 34780, 34781, 34782, 34783, 34784, 34785, 34786, 34787, 34788, 34789, 34790, 34791, 34792, 34793, 34794, 34795, 34796, 34797, 34798, 34799, 34800, 34801, 34803, 34805, 34808, 34809, 34811, 34812, 34813, 34814, 34815, 34817, 34818, 34819, 34821, 34822, 34823, 34825, 34826, 34827, 34828, 34830, 34831, 34833, 34835, 34836, 34837, 34838, 34840, 34842, 34843, 34844, 34847, 34848, 34849, 34850, 34851, 34852, 34853, 34854, 34855, 34856, 34857, 34858, 34860, 34861, 34862, 34863, 34864, 34865, 34866, 34867, 34868, 34869, 34871, 34872, 34873, 34874, 34875, 34877, 34879, 34880, 34881, 34882, 34884, 34885, 34886, 34887, 34888, 34889, 34890, 34891, 34892, 34894, 34201, 34895, 34779, 34896, 34897, 34899, 34903, 34905, 34907, 34908, 34912, 34913, 34914, 34556, 34915, 34527, 34916, 34917, 34918, 34919, 34920, 34921, 34922, 34923, 34925, 34715, 34779, 34928, 34756, 34930, 34931, 34932, 34933, 34934, 34936, 34942, 34556, 34948, 34527, 34949, 34950, 34951, 34952, 34953, 34954, 34955, 34956, 34958, 34959, 34527, 34962, 34963, 34556, 34964, 34965, 34966, 34967, 34968, 34969, 34970, 34972, 34973, 34974, 34975, 34976, 34977, 34715, 34979, 34756, 34779, 34981, 34982, 34985, 34987, 34988, 34994, 34011, 34009, 34025, 34023, 34939, 34048, 34046, 34945, 34947, 34062, 34064, 34984, 34991, 34086, 34084, 34996, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35008, 35010, 35012, 35013, 35015, 35017, 35018, 35020, 35022, 35025, 35028, 35030, 34141, 35033, 35035, 35037, 35040, 35042, 34160, 35046, 35048, 34167, 35052, 35054, 34174, 35058, 35060, 34181, 35064, 35066, 34188, 35070, 35072, 34195, 35077, 35079, 34206, 35083, 35085, 34213, 35089, 35091, 34220, 35094, 35096, 34227, 35100, 35102, 34236, 35105, 35107, 34243, 35112, 35114, 35116, 35117, 35119, 35121, 35122, 35124, 35126, 35129, 34276, 34280, 35137, 35138, 35139, 35142, 34293, 35147, 34297, 34301, 35154, 35158, 34312, 35162, 34316, 34320, 35169, 35171, 35174, 34333, 35179, 35183, 34342, 35187, 35189, 35191, 35193, 35195, 35197, 33821, 35202, 35204, 35206, 35208, 35210, 35212, 33828, 35217, 35221, 35224, 35225, 35228, 34398, 33840, 35237, 34409, 35241, 35243, 35245, 35248, 35250, 35254, 35256, 34429, 35260, 35262, 34436, 35266, 35268, 35270, 35272, 35274, 35276, 35280, 35283, 35285, 35289, 35291, 35295, 35297, 35299, 35301, 35303, 35305, 35309, 35314, 34494, 35318, 35323, 35326, 35327, 35331, 34513, 35335, 35337, 35339, 34521, 35344, 35346, 35348, 35350, 35352, 35354, 35358, 35361, 35363, 34550, 35368, 35370, 35372, 35374, 35376, 35378, 35382, 35385, 35387, 35389, 35391, 35393, 35395, 35399, 35402, 35404, 35407, 35409, 35417, 35420, 35422, 35424, 35428, 35431, 35432, 35434, 35436, 34638, 35440, 35442, 35444, 35446, 35447, 35449, 35451, 35452, 35454, 34662, 35457, 35459, 34668, 35464, 35466, 35468, 34683, 35471, 35473, 34690, 35476, 35478, 34697, 35483, 35485, 35487, 35490, 35492, 34720, 35495, 35497, 35499, 35502, 35504, 35508, 35510, 35514, 35516, 35520, 35522, 35525, 35527, 35531, 35533, 35535, 35538, 35540, 33972, 35544, 35546, 33973, 35550, 35552, 33974, 35556, 35558, 34802, 35562, 35566, 34816, 35570, 34820, 34824, 35577, 35579, 34834, 33990, 35586, 35589, 35591, 35593, 35595, 35598, 34859, 35603, 35605, 35608, 34870, 35613, 35615, 34878, 34000, 35624, 35627, 35629, 35024, 34155, 34152, 35632, 35076, 35634, 35099, 34250, 34247, 35128, 33281, 35157, 33288, 35182, 35406, 35412, 35416, 35414, 35643, 35645, 35367, 35647, 35343, 34360, 34378, 35651, 32337, 35653, 35220, 35313, 35657, 35489, 35524, 35530, 35658, 35537, 35507, 35513, 35518, 35660, 35519, 34734, 34731, 34704, 34701, 34393, 34807, 30008, 30014, 35236, 35565, 35247, 35253, 35668, 35367, 35670, 35343, 35279, 35288, 35294, 35406, 35416, 35414, 35673, 35308, 32337, 35676, 35313, 35679, 35322, 35330, 35681, 35343, 35357, 35684, 35367, 35381, 35398, 35406, 35412, 35416, 35414, 35688, 35690, 34625, 34623, 35692, 32337, 35694, 34675, 34672, 34704, 34701, 35698, 35489, 34734, 34731, 35507, 35513, 35518, 35700, 35519, 35524, 35530, 35701, 35537, 34807, 35565, 30199, 30208, 30245, 35623, 34900, 35708, 35709, 34904, 34906, 34018, 34909, 35710, 35711, 34026, 34031, 34034, 34935, 34937, 35712, 35713, 35714, 34943, 35715, 35716, 34059, 35717, 35718, 35719, 34986, 34077, 34989, 35720, 35721, 35722, 34089, 35723, 35806, 35811, 35814, 35820, 35824, 35847, 35921, 35928, 35992, 35995, 35998, 35999, 36003, 36007, 36010, 35745, 34117, 35748, 34123, 35751, 34130, 35027, 36016, 35755, 34143, 35758, 34150, 36017, 36018, 35761, 35045, 35764, 35051, 35767, 35057, 35770, 35063, 35773, 35069, 35776, 35075, 36020, 35779, 35082, 35782, 35088, 35785, 34222, 35788, 34229, 36022, 35791, 34238, 35794, 34245, 36023, 36024, 35797, 34256, 35800, 34262, 35803, 34269, 35131, 36025, 35136, 33274, 32160, 35141, 32169, 32168, 33279, 32176, 35153, 36026, 32180, 35160, 36027, 33284, 32189, 35168, 36028, 32197, 35173, 32206, 32205, 35185, 36029, 33293, 32213, 35918, 36030, 35920, 36031, 36032, 36033, 35901, 35366, 36036, 35891, 35342, 36038, 35831, 35194, 35834, 35200, 34363, 36039, 35838, 35209, 35841, 35215, 34381, 36040, 35421, 32317, 32316, 35439, 36042, 32336, 35223, 36044, 33304, 32232, 35316, 36045, 33323, 32268, 35955, 35488, 36047, 35970, 36048, 35972, 36049, 35974, 35536, 36051, 35964, 36052, 35966, 36053, 35968, 36054, 36056, 35958, 34722, 35961, 34729, 36057, 36058, 35946, 34685, 35949, 34692, 35952, 34699, 36059, 36060, 35933, 34650, 35936, 34657, 35939, 33923, 35942, 33925, 34678, 36061, 35977, 35543, 35980, 35549, 35983, 35555, 35986, 34804, 34810, 36062, 30006, 30005, 35576, 36063, 30007, 35597, 30010, 30009, 35607, 30012, 30011, 35232, 36064, 30013, 35239, 36065, 30023, 30022, 35568, 36066, 30027, 30026, 35854, 36067, 35856, 36068, 36070, 35858, 35259, 35861, 35265, 36072, 35864, 35271, 35867, 35277, 35282, 36073, 35871, 36074, 35873, 36075, 35918, 36076, 36077, 36078, 35875, 35300, 35878, 35306, 35311, 36080, 35439, 36081, 32336, 35316, 36083, 33323, 32268, 35421, 32317, 32316, 35325, 36085, 33327, 32279, 35333, 36086, 33329, 32284, 35891, 35342, 36088, 35894, 35349, 35897, 35355, 35360, 36089, 35901, 35366, 36091, 35904, 35373, 35907, 35379, 35384, 36092, 35911, 35390, 35914, 35396, 35401, 36093, 35918, 36094, 35920, 36095, 36096, 36097, 35421, 32317, 32316, 35430, 36100, 36101, 32327, 32326, 35439, 36103, 32336, 35933, 34650, 35936, 34657, 35939, 33923, 35942, 33925, 34678, 36105, 36106, 35946, 34685, 35949, 34692, 35952, 34699, 36107, 36108, 35955, 35488, 36110, 35958, 34722, 35961, 34729, 36111, 36112, 35964, 36113, 35966, 36114, 35968, 36115, 36117, 35970, 36118, 35972, 36119, 35974, 35536, 36121, 35977, 35543, 35980, 35549, 35983, 35555, 35986, 34804, 34810, 36122, 35568, 36123, 30190, 30189, 35576, 36124, 30198, 35583, 36125, 30207, 30216, 30215, 35597, 30226, 30225, 35607, 30233, 30232, 35619, 36126, 30244, 35626, 36127, 30253, 30252, 36128, 36129, 36131, 36132, 36133, 36134, 36135, 36137, 34027, 34028, 36138, 36139, 36140, 36141, 36143, 36145, 34056, 36148, 34060, 34971, 34066, 34067, 36152, 36153, 36154, 36156, 36158, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36175, 36176, 36177, 36178, 36179, 36180, 36181, 36183, 36184, 36185, 36186, 36187, 36189, 36190, 36191, 36192, 36193, 36194, 36195, 36196, 36197, 36198, 36199, 36200, 36019, 36202, 36203, 36204, 36205, 36206, 36207, 36208, 36209, 36021, 36211, 36212, 36213, 36214, 36215, 36217, 36218, 36219, 36220, 36221, 36222, 36223, 36225, 35134, 36226, 36227, 35145, 36228, 36229, 36230, 35590, 35588, 36231, 36232, 36233, 35151, 36235, 36236, 36238, 36239, 36240, 35166, 36242, 35177, 36243, 36244, 36245, 36246, 36248, 36249, 36250, 36252, 36254, 36256, 36257, 36035, 36259, 36260, 36037, 36262, 36263, 36264, 36265, 36266, 36268, 36269, 36270, 36271, 36272, 36274, 35419, 36275, 36276, 36277, 35929, 36279, 36280, 36282, 36283, 36284, 36286, 36287, 36288, 36289, 36046, 36291, 36293, 36295, 36296, 36050, 36298, 36300, 36302, 36055, 36305, 36306, 36307, 36308, 36309, 36311, 36312, 36313, 36314, 36315, 36316, 36317, 36319, 36320, 36321, 36322, 36323, 36324, 36325, 36326, 36327, 36329, 36330, 36331, 36332, 36333, 36334, 36335, 36336, 36337, 35590, 35588, 36339, 36340, 36341, 35574, 36343, 35601, 36344, 36345, 36346, 35611, 36347, 36348, 36349, 36350, 35230, 36352, 36353, 36355, 36356, 36357, 36359, 36360, 36361, 36363, 36069, 36366, 36367, 36368, 36369, 36071, 36371, 36372, 36373, 36374, 36375, 36377, 36379, 36381, 36383, 36385, 36386, 36387, 36388, 36389, 36391, 35929, 36393, 36394, 36396, 36397, 36398, 35320, 36399, 36400, 36401, 36403, 36404, 36405, 36407, 36408, 36409, 36410, 36087, 36412, 36413, 36414, 36415, 36416, 36418, 36419, 36090, 36421, 36422, 36423, 36424, 36425, 36427, 36428, 36429, 36430, 36431, 36433, 36435, 36437, 36439, 35419, 36440, 36441, 36442, 36445, 36446, 36447, 35929, 36449, 36450, 36451, 36452, 36453, 36454, 36455, 36456, 36457, 36458, 36461, 36462, 36463, 36464, 36465, 36466, 36467, 36469, 36470, 36109, 36472, 36473, 36474, 36475, 36476, 36478, 36480, 36482, 36116, 36485, 36487, 36489, 36490, 36120, 36492, 36493, 36494, 36495, 36496, 36497, 36498, 36499, 36500, 36502, 36504, 36505, 36506, 35574, 36508, 36509, 35581, 36511, 35590, 35588, 36512, 36513, 35601, 36514, 36515, 36516, 35611, 36517, 36518, 36519, 36520, 35617, 36522, 36523, 36525, 36526, 36535, 36536, 36543, 36545, 36546, 36547, 36548, 36582, 36621, 36623, 36624, 36626, 36628, 36630, 36631, 36632, 36635, 36234, 36637, 36638, 36641, 36241, 36643, 36645, 36647, 36648, 36663, 36668, 36670, 36671, 36674, 36278, 36676, 36677, 36679, 36680, 36714, 36723, 36724, 36725, 36726, 36729, 36342, 36731, 36733, 36735, 36737, 36740, 36351, 36742, 36743, 36745, 36746, 36760, 36769, 36771, 36392, 36773, 36774, 36777, 36778, 36780, 36781, 36783, 36784, 36793, 36801, 36806, 36811, 36812, 36814, 36815, 36818, 36448, 36828, 36861, 36862, 36863, 36866, 36507, 36869, 36510, 36871, 36872, 36873, 36875, 36877, 36879, 36881, 36884, 36521, 36886, 36887, 36581, 36579, 36577, 36586, 36584, 35631, 36591, 36589, 36599, 36595, 36597, 36593, 35633, 36608, 36606, 36604, 36602, 35635, 36613, 36611, 35636, 36620, 36618, 36616, 36253, 36251, 36034, 36654, 35646, 36657, 35648, 36662, 36660, 36667, 36665, 36683, 34927, 36688, 36294, 36292, 35659, 36303, 36301, 36299, 34929, 36697, 36695, 35661, 36704, 36702, 36700, 35662, 36713, 36711, 36709, 36707, 36722, 36720, 36718, 36716, 36364, 36362, 35669, 36754, 36752, 35671, 36759, 36757, 36382, 36380, 36378, 36079, 36768, 36766, 36787, 35682, 36792, 36790, 36795, 35685, 36800, 36798, 36805, 36803, 36436, 36434, 36098, 36827, 36825, 36823, 36821, 36834, 36832, 36830, 35697, 36837, 34978, 36842, 36840, 35699, 36483, 36481, 36479, 34980, 36851, 36488, 36486, 35702, 36860, 36858, 36856, 36854, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36622, 36900, 36902, 36634, 36640, 36911, 36669, 36673, 36927, 36728, 36932, 36934, 36739, 36770, 36776, 36810, 36959, 36817, 36963, 36865, 36868, 36971, 36974, 36976, 36883, 36982, 36983, 36984, 34893, 36985, 36986, 36987, 36988, 36989, 36990, 36991, 36992, 36993, 36994, 36995, 36996, 36997, 36998, 36999, 37000, 37001, 37002, 37003, 37004, 37005, 34898, 36908, 36914, 37006, 37007, 37008, 37009, 37010, 37011, 37012, 37013, 37014, 35649, 37015, 37016, 35650, 36922, 36924, 37017, 37018, 37019, 37020, 37021, 37022, 37023, 37024, 37025, 37026, 37027, 37028, 37029, 37030, 37031, 37032, 37033, 37034, 37035, 37036, 37037, 35663, 37038, 37039, 37040, 37041, 35664, 36939, 36941, 37042, 37043, 37044, 37045, 37046, 37047, 37048, 37049, 35672, 37050, 37051, 37052, 37053, 37054, 37055, 35675, 36947, 36951, 36953, 37056, 37057, 37058, 37059, 35683, 37060, 37061, 37062, 37063, 35686, 37064, 37065, 35687, 37066, 37067, 37068, 37069, 37070, 37071, 37072, 37073, 37074, 37075, 37076, 37077, 37078, 37079, 37080, 37081, 37082, 37083, 37084, 37085, 37086, 37087, 37088, 37089, 37090, 37091, 37092, 37093, 35703, 36966, 36981, 37145, 37148, 37149, 37152, 37154, 37156, 37159, 37161, 37164, 37167, 37170, 36899, 36901, 36904, 36906, 37171, 36910, 36912, 37172, 37173, 37180, 37182, 37183, 37185, 36918, 36920, 37186, 37187, 37190, 37194, 37198, 37201, 37205, 37207, 37209, 37210, 37212, 37214, 36929, 36931, 36933, 36935, 36937, 37215, 37216, 37217, 37220, 37223, 37225, 37226, 37230, 37232, 36945, 37233, 36949, 37234, 37235, 37238, 37240, 37243, 37245, 37246, 37248, 37249, 36958, 36960, 36962, 37252, 37254, 35696, 37256, 37262, 37265, 37269, 37273, 37275, 37277, 37278, 36968, 36970, 36973, 36975, 36977, 36979, 37279, 37179, 37177, 37189, 37242, 37237, 37261, 27, 28, 29, 30, 31, 37280, 37283, 37286, 37289, 37291, 37292, 37293, 37294, 37296, 37297, 37304, 37305, 37308, 37309, 37311, 37312, 37315, 37318, 37319, 37320, 37321, 37322, 37329, 37332, 37334, 37344, 37345, 37346, 37347, 37349, 37350, 37352, 37353, 37354, 37358, 37359, 37360, 37361, 37362, 37363, 37166, 37151, 36531, 36534, 37175, 37303, 37365, 37301, 37366, 36538, 36537, 37367, 37200, 36147, 36146, 37328, 37331, 37222, 37219, 36150, 36149, 36544, 37340, 37368, 37251, 37369, 37338, 37342, 37370, 37264, 36159, 36151, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37377, 37163, 37416, 37417, 37281, 37290, 37418, 36530, 36533, 36528, 36527, 36529, 37419, 36532, 37420, 37421, 37423, 37425, 37426, 36890, 36889, 37197, 37204, 37193, 37314, 37317, 37428, 36541, 36540, 37429, 36539, 37430, 36142, 36542, 37229, 37431, 37432, 37433, 37434, 37435, 37436, 37437, 36891, 36892, 37438, 37440, 37442, 37443, 36895, 36894, 36893, 37405, 37259, 37272, 37445, 37356, 37268, 36155, 37446, 36551, 36549, 36552, 37447, 36550, 36553, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37473, 37476, 37477, 37158, 37479, 37480, 37481, 37482, 37483, 37485, 37486, 37422, 37491, 37492, 37489, 37493, 37494, 37495, 37496, 37497, 37499, 37500, 37502, 37504, 37505, 37506, 37508, 37514, 37515, 37511, 37516, 37517, 37518, 37520, 37521, 37522, 37523, 37524, 37525, 37527, 37528, 37529, 37531, 37532, 37533, 37535, 37536, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37571, 37568, 37475, 37478, 37573, 37575, 37484, 37578, 37580, 37583, 37585, 37427, 37588, 37501, 37503, 37593, 37513, 37598, 37601, 37604, 37606, 37526, 37609, 37610, 37612, 37613, 26, 27, 28, 29, 30, 31, 37570, 37633, 37635, 37637, 37639, 37582, 37641, 37643, 37644, 37646, 37647, 37597, 37649, 37650, 37651, 37653, 37654, 37656, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37665, 37666, 37670, 37672, 37674, 37675, 37678, 37680, 37669, 37677, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37701, 37704, 37699, 37703, 37697, 37705, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37728, 37730, 37731, 37732, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37760, 37761, 37763, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37792, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37824, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
int h_C[]= {
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, 677, 679, 681, 683, 685, 687, 689, 691, 693, 695, 697, 699, 701, 703, 705, 707, 709, 711, 713, 715, 717, 719, 721, 723, 725, 727, 729, 731, 733, 735, 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, 757, 759, 761, 763, 765, 767, 769, 771, 773, 775, 777, 779, 781, 783, 785, 787, 789, 791, 793, 795, 797, 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, 821, 823, 825, 827, 829, 831, 833, 835, 837, 839, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 869, 871, 873, 875, 877, 879, 881, 883, 885, 887, 889, 891, 893, 895, 897, 899, 901, 903, 905, 907, 909, 911, 913, 915, 917, 919, 921, 923, 925, 927, 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, 949, 951, 953, 955, 957, 959, 961, 963, 965, 967, 969, 971, 973, 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, 1165, 1167, 1169, 1171, 1173, 1175, 1177, 1179, 1181, 1183, 1185, 1187, 1189, 1191, 1193, 1195, 1197, 1199, 1201, 1203, 1205, 1207, 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, 1229, 1231, 1233, 1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249, 1251, 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1297, 1299, 1301, 1303, 1305, 1307, 1309, 1311, 1313, 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, 1333, 1335, 1337, 1339, 1341, 1343, 1345, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, 1413, 1415, 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433, 1435, 1437, 1439, 1441, 1443, 1445, 1447, 1449, 1451, 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471, 1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495, 1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, 1521, 1523, 1525, 1527, 1529, 1531, 1533, 1535, 1537, 1539, 1541, 1543, 1545, 1547, 1549, 1551, 1553, 1555, 1557, 1559, 1561, 1563, 1565, 1567, 1569, 1571, 1573, 1575, 1577, 1579, 1581, 1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, 1623, 1625, 1627, 1629, 1631, 1633, 1635, 1637, 1639, 1641, 1643, 1645, 1647, 1649, 1651, 1653, 1655, 1657, 1659, 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675, 1677, 1679, 1681, 1683, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699, 1701, 1703, 1705, 1707, 1709, 1711, 1713, 1715, 1717, 1719, 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, 1755, 1757, 1759, 1761, 1763, 1765, 1767, 1769, 1771, 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1789, 1791, 1793, 1795, 1797, 1799, 1801, 1803, 1805, 1807, 1809, 1811, 1813, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835, 1837, 1839, 1841, 1843, 1845, 1847, 1849, 1851, 1853, 1855, 1857, 1859, 1861, 1863, 1865, 1867, 1869, 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889, 1891, 1893, 1895, 1897, 1899, 1901, 1903, 1905, 1907, 1909, 1911, 1913, 1915, 1917, 1919, 1921, 1923, 1925, 1927, 1929, 1931, 1933, 1935, 1937, 1939, 1941, 1943, 1945, 1947, 1949, 1951, 1953, 1955, 1957, 1959, 1961, 1963, 1965, 1967, 1969, 1971, 1973, 1975, 1977, 1979, 1981, 1983, 1985, 1987, 1989, 1991, 1993, 1995, 1997, 1999, 2001, 2003, 2005, 2007, 2009, 2011, 2014, 2016, 2018, 2020, 2022, 2024, 2026, 2028, 2030, 2032, 2034, 2036, 2038, 2040, 2043, 2045, 2047, 2049, 2051, 2053, 2055, 2057, 2059, 2061, 2063, 2065, 2067, 2069, 2071, 2073, 2075, 2077, 2079, 2081, 2083, 2085, 2087, 2089, 2091, 2093, 2095, 2097, 2099, 2101, 2103, 2105, 2107, 2109, 2111, 2113, 2115, 2117, 2119, 2121, 2123, 2125, 2127, 2129, 2131, 2133, 2135, 2137, 2139, 2141, 2143, 2145, 2147, 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167, 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2187, 2189, 2191, 2193, 2195, 2197, 2199, 2201, 2203, 2205, 2207, 2209, 2211, 2213, 2215, 2217, 2219, 2221, 2223, 2225, 2227, 2229, 2231, 2233, 2235, 2237, 2239, 2241, 2243, 2245, 2247, 2249, 2251, 2253, 2255, 2257, 2259, 2261, 2263, 2265, 2267, 2269, 2272, 2274, 2276, 2278, 2281, 2283, 2285, 2287, 2289, 2291, 2293, 2295, 2297, 2299, 2301, 2303, 2305, 2307, 2309, 2311, 2313, 2315, 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335, 2337, 2339, 2341, 2343, 2345, 2347, 2349, 2351, 2353, 2355, 2357, 2359, 2361, 2363, 2365, 2367, 2369, 2371, 2373, 2375, 2377, 2379, 2381, 2383, 2385, 2387, 2389, 2391, 2393, 2395, 2397, 2399, 2401, 2403, 2405, 2407, 2409, 2411, 2413, 2415, 2417, 2419, 2421, 2423, 2425, 2427, 2429, 2431, 2433, 2435, 2437, 2439, 2441, 2443, 2445, 2447, 2449, 2451, 2453, 2455, 2457, 2459, 2461, 2463, 2465, 2467, 2469, 2471, 2473, 2475, 2477, 2479, 2481, 2483, 2485, 2487, 2489, 2491, 2493, 2495, 2497, 2499, 2501, 2503, 2505, 2507, 2509, 2511, 2513, 2515, 2517, 2519, 2521, 2523, 2525, 2527, 2529, 2531, 2533, 2535, 2537, 2539, 2541, 2543, 2545, 2547, 2549, 2551, 2553, 2555, 2557, 2559, 2561, 2563, 2565, 2567, 2569, 2571, 2573, 2575, 2577, 2579, 2581, 2583, 2585, 2587, 2589, 2591, 2593, 2595, 2597, 2599, 2601, 2603, 2605, 2607, 2609, 2611, 2613, 2615, 2617, 2619, 2621, 2623, 2625, 2627, 2629, 2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647, 2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667, 2669, 2671, 2673, 2675, 2677, 2679, 2681, 2683, 2685, 2687, 2689, 2691, 2693, 2695, 2697, 2699, 2701, 2703, 2705, 2707, 2709, 2711, 2713, 2715, 2717, 2719, 2721, 2723, 2725, 2727, 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, 2745, 2747, 2749, 2751, 2753, 2755, 2757, 2759, 2761, 2763, 2765, 2767, 2769, 2771, 2773, 2775, 2777, 2779, 2781, 2783, 2785, 2787, 2789, 2791, 2793, 2795, 2797, 2799, 2801, 2803, 2805, 2807, 2809, 2811, 2813, 2815, 2817, 2819, 2821, 2823, 2825, 2827, 2829, 2831, 2833, 2835, 2837, 2839, 2841, 2843, 2845, 2847, 2849, 2851, 2853, 2855, 2857, 2859, 2861, 2863, 2865, 2867, 2869, 2871, 2873, 2875, 2877, 2879, 2881, 2883, 2885, 2887, 2889, 2891, 2893, 2895, 2897, 2899, 2901, 2903, 2905, 2907, 2909, 2911, 2913, 2915, 2917, 2919, 2921, 2923, 2925, 2927, 2929, 2931, 2933, 2935, 2937, 2939, 2941, 2943, 2945, 2947, 2949, 2951, 2953, 2955, 2957, 2959, 2961, 2963, 2965, 2967, 2969, 2971, 2973, 2975, 2977, 2979, 2981, 2983, 2985, 2987, 2989, 2991, 2993, 2995, 2997, 2999, 3001, 3003, 3005, 3007, 3009, 3011, 3013, 3015, 3017, 3019, 3021, 3023, 3025, 3027, 3029, 3031, 3033, 3035, 3037, 3039, 3041, 3043, 3045, 3047, 3049, 3051, 3053, 3055, 3057, 3059, 3061, 3063, 3065, 3067, 3069, 3071, 3073, 3075, 3077, 3079, 3081, 3083, 3085, 3087, 3089, 3091, 3093, 3095, 3097, 3099, 3101, 3103, 3105, 3107, 3109, 3111, 3113, 3115, 3117, 3119, 3121, 3123, 3125, 3127, 3129, 3131, 3133, 3135, 3137, 3139, 3141, 3143, 3145, 3147, 3149, 3151, 3153, 3155, 3157, 3159, 3161, 3163, 3165, 3167, 3169, 3171, 3173, 3175, 3177, 3179, 3181, 3183, 3185, 3187, 3189, 3191, 3193, 3195, 3197, 3199, 3201, 3203, 3205, 3207, 3209, 3211, 3213, 3215, 3217, 3219, 3221, 3223, 3225, 3227, 3229, 3231, 3233, 3235, 3237, 3239, 3241, 3243, 3245, 3247, 3249, 3251, 3253, 3255, 3257, 3259, 3261, 3263, 3265, 3267, 3269, 3271, 3273, 3275, 3277, 3279, 3281, 3283, 3285, 3287, 3289, 3291, 3293, 3295, 3297, 3299, 3301, 3303, 3305, 3307, 3309, 3311, 3313, 3315, 3317, 3319, 3321, 3323, 3325, 3327, 3329, 3331, 3333, 3335, 3337, 3339, 3341, 3343, 3345, 3347, 3349, 3351, 3353, 3355, 3357, 3359, 3361, 3363, 3365, 3367, 3369, 3371, 3373, 3375, 3377, 3379, 3381, 3383, 3385, 3387, 3389, 3391, 3393, 3395, 3397, 3399, 3401, 3403, 3405, 3407, 3409, 3411, 3413, 3415, 3417, 3419, 3421, 3423, 3425, 3427, 3429, 3431, 3433, 3435, 3437, 3439, 3441, 3443, 3445, 3447, 3449, 3451, 3453, 3455, 3457, 3459, 3461, 3463, 3465, 3467, 3469, 3471, 3473, 3475, 3477, 3479, 3481, 3483, 3485, 3487, 3489, 3491, 3493, 3495, 3497, 3499, 3501, 3503, 3505, 3507, 3509, 3511, 3513, 3515, 3517, 3519, 3521, 3523, 3525, 3527, 3529, 3531, 3533, 3535, 3537, 3539, 3541, 3543, 3545, 3547, 3549, 3551, 3553, 3555, 3557, 3559, 3561, 3563, 3565, 3567, 3569, 3571, 3573, 3575, 3577, 3579, 3581, 3583, 3585, 3587, 3589, 3591, 3593, 3595, 3597, 3599, 3601, 3603, 3605, 3607, 3609, 3611, 3613, 3615, 3617, 3619, 3621, 3623, 3625, 3627, 3629, 3631, 3633, 3635, 3637, 3639, 3641, 3643, 3645, 3647, 3649, 3651, 3653, 3655, 3657, 3659, 3661, 3663, 3665, 3667, 3669, 3671, 3673, 3675, 3677, 3679, 3681, 3683, 3685, 3687, 3689, 3691, 3693, 3695, 3697, 3699, 3701, 3703, 3705, 3707, 3709, 3711, 3713, 3715, 3717, 3719, 3721, 3723, 3725, 3727, 3729, 3731, 3733, 3735, 3737, 3739, 3741, 3743, 3745, 3747, 3749, 3751, 3753, 3755, 3757, 3759, 3761, 3763, 3765, 3767, 3769, 3771, 3773, 3775, 3777, 3779, 3781, 3783, 3785, 3787, 3789, 3791, 3793, 3795, 3797, 3799, 3801, 3803, 3805, 3807, 3809, 3811, 3813, 3815, 3817, 3819, 3821, 3823, 3825, 3827, 3829, 3831, 3833, 3835, 3837, 3839, 3841, 3843, 3845, 3847, 3849, 3851, 3853, 3855, 3858, 3860, 3862, 3864, 3866, 3868, 3870, 3872, 3874, 3876, 3878, 3880, 3882, 3884, 3886, 3888, 3890, 3892, 3894, 3896, 3898, 3900, 3902, 3904, 3906, 3908, 3910, 3912, 3914, 3916, 3918, 3920, 3922, 3924, 3926, 3928, 3930, 3932, 3934, 3936, 3938, 3940, 3942, 3944, 3946, 3948, 3950, 3952, 3954, 3956, 3958, 3960, 3962, 3964, 3966, 3968, 3970, 3972, 3974, 3976, 3978, 3980, 3982, 3984, 3986, 3988, 3990, 3992, 3994, 3996, 3998, 4000, 4002, 4004, 4006, 4008, 4010, 4012, 4014, 4016, 4018, 4020, 4022, 4024, 4026, 4028, 4030, 4032, 4034, 4036, 4038, 4040, 4042, 4044, 4046, 4048, 4050, 4052, 4054, 4056, 4058, 4060, 4062, 4064, 4066, 4068, 4070, 4072, 4074, 4076, 4078, 4080, 4082, 4084, 4086, 4088, 4090, 4092, 4094, 4096, 4098, 4100, 4102, 4104, 4106, 4108, 4110, 4112, 4114, 4116, 4118, 4120, 4122, 4124, 4126, 4128, 4130, 4132, 4134, 4136, 4138, 4140, 4142, 4144, 4146, 4148, 4150, 4152, 4154, 4156, 4158, 4160, 4162, 4164, 4166, 4168, 4170, 4172, 4174, 4176, 4178, 4180, 4182, 4184, 4186, 4188, 4190, 4192, 4194, 4196, 4198, 4200, 4202, 4204, 4206, 4208, 4210, 4212, 4214, 4216, 4218, 4220, 4222, 4224, 4226, 4228, 4230, 4232, 4234, 4236, 4238, 4240, 4242, 4244, 4246, 4248, 4251, 4253, 4255, 4257, 4259, 4261, 4263, 4265, 4267, 4269, 4271, 4273, 4275, 4277, 4279, 4281, 4283, 4285, 4287, 4289, 4291, 4293, 4296, 4298, 4302, 4304, 4306, 4308, 4310, 4312, 4314, 4316, 4319, 4321, 4324, 4326, 4332, 4334, 4336, 4338, 4341, 4343, 4345, 4347, 4351, 4353, 4355, 4357, 4359, 4361, 4363, 4365, 4367, 4369, 4371, 4373, 4375, 4377, 4379, 4381, 4383, 4385, 4387, 4389, 4391, 4393, 4395, 4397, 4400, 4402, 4404, 4406, 4408, 4410, 4413, 4415, 4417, 4419, 4422, 4424, 4427, 4429, 4434, 4436, 4438, 4440, 4443, 4445, 4448, 4450, 4455, 4457, 4459, 4461, 4464, 4466, 4468, 4470, 4474, 4476, 4478, 4480, 4482, 4484, 4487, 4489, 4491, 4493, 4495, 4497, 4499, 4501, 4504, 4506, 4509, 4511, 4514, 4516, 4518, 4520, 4522, 4524, 4526, 4528, 4531, 4533, 4536, 4538, 4543, 4545, 4547, 4549, 4552, 4554, 4557, 4559, 4572, 4574, 4576, 4578, 4580, 4582, 4584, 4586, 4588, 4590, 4592, 4594, 4596, 4598, 4600, 4602, 4604, 4606, 4608, 4610, 4612, 4614, 4616, 4618, 4620, 4622, 4624, 4626, 4628, 4630, 4632, 4634, 4636, 4638, 4640, 4642, 4644, 4646, 4648, 4650, 4652, 4654, 4656, 4658, 4661, 4663, 4665, 4667, 4669, 4671, 4673, 4675, 4677, 4679, 4681, 4683, 4685, 4687, 4689, 4691, 4693, 4695, 4697, 4699, 4701, 4703, 4705, 4707, 4709, 4711, 4714, 4716, 4718, 4720, 4723, 4725, 4727, 4729, 4733, 4735, 4738, 4740, 4743, 4745, 4748, 4750, 4753, 4755, 4758, 4760, 4763, 4765, 4767, 4769, 4772, 4774, 4777, 4779, 4784, 4786, 4788, 4790, 4793, 4795, 4798, 4800, 4805, 4807, 4809, 4811, 4813, 4815, 4817, 4819, 4821, 4823, 4825, 4827, 4829, 4831, 4833, 4835, 4837, 4839, 4841, 4843, 4845, 4847, 4849, 4851, 4853, 4855, 4857, 4859, 4861, 4863, 4865, 4867, 4869, 4871, 4873, 4875, 4877, 4879, 4881, 4883, 4885, 4887, 4889, 4891, 4893, 4895, 4897, 4899, 4901, 4903, 4905, 4907, 4909, 4911, 4913, 4915, 4917, 4919, 4921, 4923, 4925, 4927, 4929, 4931, 4933, 4935, 4937, 4939, 4941, 4943, 4945, 4947, 4949, 4951, 4953, 4955, 4957, 4959, 4961, 4963, 4965, 4967, 4969, 4971, 4973, 4975, 4977, 4979, 4981, 4983, 4985, 4987, 4989, 4991, 4993, 4995, 4997, 4999, 5001, 5003, 5005, 5007, 5009, 5011, 5013, 5015, 5017, 5019, 5021, 5023, 5025, 5027, 5029, 5031, 5033, 5035, 5037, 5039, 5041, 5043, 5045, 5047, 5049, 5051, 5053, 5055, 5057, 5059, 5061, 5063, 5065, 5067, 5069, 5071, 5073, 5075, 5077, 5079, 5081, 5083, 5085, 5087, 5089, 5091, 5093, 5095, 5097, 5099, 5101, 5103, 5105, 5107, 5109, 5111, 5113, 5115, 5117, 5119, 5121, 5123, 5125, 5127, 5129, 5131, 5133, 5135, 5137, 5139, 5141, 5143, 5145, 5147, 5149, 5151, 5153, 5155, 5157, 5159, 5161, 5163, 5165, 5167, 5169, 5171, 5173, 5175, 5177, 5179, 5181, 5183, 5185, 5187, 5189, 5191, 5193, 5195, 5197, 5199, 5201, 5203, 5205, 5207, 5209, 5211, 5213, 5215, 5217, 5219, 5221, 5223, 5225, 5227, 5229, 5231, 5233, 5235, 5237, 5239, 5241, 5243, 5245, 5247, 5249, 5251, 5253, 5255, 5257, 5259, 5261, 5263, 5265, 5267, 5269, 5271, 5273, 5275, 5277, 5279, 5281, 5283, 5285, 5287, 5289, 5291, 5293, 5295, 5297, 5299, 5301, 5303, 5305, 5307, 5309, 5311, 5313, 5315, 5317, 5319, 5321, 5323, 5325, 5327, 5329, 5331, 5333, 5335, 5337, 5339, 5341, 5343, 5345, 5347, 5349, 5351, 5353, 5355, 5357, 5359, 5361, 5363, 5365, 5367, 5369, 5371, 5373, 5375, 5377, 5379, 5381, 5383, 5385, 5387, 5389, 5391, 5393, 5395, 5397, 5399, 5401, 5403, 5405, 5407, 5409, 5411, 5413, 5415, 5417, 5419, 5421, 5423, 5425, 5427, 5429, 5431, 5433, 5435, 5437, 5439, 5441, 5443, 5445, 5447, 5449, 5451, 5453, 5455, 5457, 5459, 5461, 5463, 5465, 5467, 5469, 5471, 5473, 5475, 5477, 5479, 5481, 5483, 5485, 5487, 5489, 5491, 5493, 5495, 5497, 5499, 5501, 5503, 5505, 5507, 5509, 5511, 5513, 5515, 5517, 5519, 5521, 5523, 5525, 5527, 5529, 5531, 5533, 5535, 5537, 5539, 5541, 5543, 5545, 5547, 5549, 5551, 5553, 5555, 5557, 5559, 5561, 5563, 5565, 5567, 5569, 5571, 5573, 5575, 5577, 5579, 5581, 5583, 5585, 5587, 5589, 5591, 5593, 5595, 5597, 5599, 5601, 5603, 5605, 5607, 5609, 5611, 5613, 5615, 5617, 5619, 5621, 5623, 5625, 5627, 5629, 5631, 5633, 5635, 5637, 5639, 5641, 5643, 5645, 5647, 5649, 5651, 5653, 5655, 5657, 5659, 5661, 5663, 5665, 5667, 5669, 5671, 5673, 5675, 5677, 5679, 5681, 5683, 5685, 5687, 5689, 5691, 5693, 5695, 5697, 5699, 5701, 5703, 5705, 5707, 5709, 5711, 5713, 5715, 5717, 5719, 5721, 5723, 5725, 5727, 5729, 5731, 5733, 5735, 5737, 5739, 5741, 5743, 5745, 5747, 5749, 5751, 5753, 5755, 5757, 5759, 5761, 5763, 5765, 5767, 5769, 5771, 5773, 5775, 5777, 5779, 5781, 5783, 5785, 5787, 5789, 5791, 5793, 5795, 5797, 5799, 5801, 5803, 5805, 5807, 5809, 5811, 5813, 5815, 5817, 5819, 5821, 5823, 5825, 5827, 5829, 5831, 5833, 5835, 5837, 5839, 5841, 5843, 5845, 5847, 5849, 5851, 5853, 5855, 5857, 5859, 5861, 5863, 5865, 5867, 5869, 5871, 5874, 5876, 5878, 5880, 5882, 5884, 5886, 5888, 5890, 5892, 5894, 5896, 5898, 5900, 5902, 5904, 5906, 5908, 5910, 5912, 5915, 5917, 5919, 5921, 5923, 5925, 5927, 5929, 5931, 5933, 5935, 5937, 5939, 5941, 5943, 5945, 5947, 5949, 5951, 5953, 5955, 5957, 5959, 5961, 5963, 5965, 5967, 5969, 5971, 5973, 5975, 5977, 5979, 5981, 5983, 5985, 5987, 5989, 5991, 5993, 5995, 5997, 5999, 6001, 6003, 6005, 6007, 6009, 6011, 6013, 6015, 6017, 6019, 6021, 6023, 6025, 6027, 6029, 6031, 6033, 6035, 6037, 6039, 6041, 6043, 6045, 6047, 6049, 6051, 6053, 6055, 6057, 6059, 6061, 6063, 6065, 6067, 6069, 6071, 6073, 6075, 6077, 6079, 6081, 6083, 6085, 6087, 6089, 6091, 6093, 6095, 6097, 6099, 6101, 6103, 6105, 6107, 6109, 6111, 6113, 6115, 6117, 6119, 6121, 6123, 6125, 6127, 6129, 6131, 6133, 6135, 6137, 6139, 6141, 6143, 6145, 6147, 6149, 6151, 6153, 6155, 6157, 6159, 6161, 6163, 6165, 6167, 6169, 6171, 6173, 6175, 6177, 6179, 6181, 6183, 6185, 6187, 6189, 6191, 6193, 6196, 6198, 6200, 6202, 6204, 6206, 6208, 6210, 6212, 6214, 6216, 6218, 6220, 6222, 6224, 6226, 6229, 6231, 6233, 6235, 6237, 6239, 6242, 6244, 6246, 6248, 6252, 6254, 6257, 6259, 6262, 6264, 6267, 6269, 6275, 6277, 6280, 6282, 6284, 6286, 6288, 6290, 6292, 6294, 6297, 6299, 6301, 6303, 6306, 6308, 6311, 6313, 6318, 6320, 6322, 6324, 6327, 6329, 6332, 6334, 6339, 6341, 6343, 6345, 6347, 6349, 6351, 6353, 6355, 6357, 6359, 6361, 6363, 6365, 6367, 6369, 6371, 6373, 6375, 6377, 6379, 6381, 6383, 6385, 6387, 6389, 6391, 6393, 6395, 6397, 6399, 6401, 6403, 6405, 6407, 6409, 6411, 6413, 6415, 6417, 6419, 6421, 6423, 6425, 6427, 6429, 6431, 6433, 6435, 6437, 6439, 6441, 6443, 6445, 6447, 6449, 6451, 6453, 6456, 6458, 6460, 6462, 6464, 6466, 6469, 6471, 6473, 6475, 6478, 6480, 6483, 6485, 6490, 6492, 6494, 6496, 6499, 6501, 6504, 6506, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 4566, 4566, 4569, 4569, 4566, 4566, 4564, 4564, 6527, 6529, 4562, 4562, 4802, 4802, 4791, 4791, 4562, 4562, 4249, 4562, 4562, 4564, 4564, 6630, 6632, 6634, 6636, 6638, 6640, 6642, 6644, 6646, 6648, 6650, 6652, 6654, 6656, 6665, 6667, 6669, 6671, 4569, 4569, 4249, 4249, 4562, 4562, 4550, 4550, 4562, 4562, 4566, 4566, 4566, 4566, 4566, 4566, 4564, 4564, 6699, 6701, 6703, 6705, 6707, 6709, 6711, 6713, 6715, 6717, 6719, 6721, 6723, 6725, 6727, 6729, 6731, 6733, 6735, 6737, 6739, 6741, 6751, 6753, 6755, 6757, 6759, 6761, 6775, 6777, 6779, 6781, 6783, 6785, 6787, 6789, 6793, 6795, 6797, 6799, 4562, 4562, 6813, 6815, 6817, 6819, 6821, 6823, 6825, 6827, 6829, 6831, 6833, 6835, 6837, 6839, 6227, 6227, 6227, 6227, 6856, 6858, 6860, 6862, 6864, 6866, 6868, 6870, 6872, 6874, 4562, 4562, 4562, 4562, 4566, 4566, 4564, 4564, 4566, 4566, 4566, 4566, 4249, 4249, 4249, 4249, 4249, 4249, 6939, 6941, 6943, 6945, 4329, 4329, 4566, 4566, 4562, 4562, 4566, 4566, 4562, 4562, 4550, 4550, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 6984, 6986, 6988, 6990, 6992, 6994, 6996, 6998, 7000, 7002, 7004, 7006, 7008, 7010, 7012, 7014, 7024, 7026, 7028, 7030, 7032, 7034, 7036, 7038, 7040, 7042, 7044, 7046, 7048, 7050, 7052, 7054, 7056, 7058, 7060, 7062, 7064, 7066, 7068, 7070, 7072, 7074, 6272, 6272, 7085, 7087, 7089, 7091, 7093, 7095, 7097, 7099, 7101, 7103, 7105, 7107, 7121, 7123, 7125, 7127, 7129, 7131, 7133, 7135, 7137, 7139, 7141, 7143, 7145, 7147, 7149, 7151, 7153, 7155, 7157, 7159, 7161, 7163, 7165, 7167, 6227, 6227, 6227, 6227, 6454, 6454, 7198, 7200, 7202, 7204, 7206, 7208, 7210, 7212, 7214, 7216, 7218, 7220, 7239, 7241, 7243, 7245, 7247, 7249, 7251, 7253, 7255, 7257, 7259, 7261, 7263, 7265, 7267, 7269, 7278, 7280, 7282, 7284, 4562, 4562, 7314, 7316, 7318, 7320, 7322, 7324, 7326, 7328, 7330, 7332, 7334, 7336, 7338, 7340, 4569, 4569, 4564, 4564, 4562, 4562, 4569, 4569, 4562, 4562, 4569, 4569, 4564, 4564, 7441, 7443, 7445, 7447, 7449, 7451, 7453, 7455, 7457, 7459, 7461, 7463, 7465, 7467, 7469, 7471, 4562, 4562, 4564, 4564, 4569, 4569, 4562, 4562, 4550, 4550, 4564, 4564, 4562, 4562, 4550, 4550, 4569, 4569, 7573, 7575, 7577, 7579, 7581, 7583, 7585, 7587, 7589, 7591, 7593, 7595, 7597, 7599, 7601, 7603, 7605, 7607, 7609, 7611, 7613, 7615, 7617, 7619, 7621, 7623, 7625, 7627, 7629, 7631, 7633, 7635, 7653, 7655, 7657, 7659, 7661, 7663, 7665, 7667, 7669, 7671, 7673, 7675, 7677, 7679, 7681, 7683, 7685, 7687, 6272, 6272, 6272, 6272, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 2012, 2012, 2012, 2012, 2041, 2041, 2041, 2041, 7838, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7891, 7893, 7896, 7898, 7900, 7902, 4329, 4329, 4550, 4550, 4566, 4550, 4550, 4562, 4562, 4566, 4569, 4569, 4550, 4550, 4249, 4249, 4329, 4329, 4562, 4562, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 2270, 2279, 8017, 8019, 8021, 8023, 4329, 4329, 4550, 4550, 4562, 4562, 4550, 4550, 4562, 4562, 8101, 8103, 8105, 8107, 8109, 8111, 8113, 8115, 4329, 4329, 4550, 4550, 4562, 4562, 4329, 4329, 4562, 4562, 4550, 4550, 8252, 8254, 8256, 8258, 8260, 8262, 8264, 8266, 8268, 8270, 8272, 8274, 8276, 8278, 8280, 8282, 4564, 4564, 4562, 4562, 8345, 8347, 8349, 8351, 8353, 8355, 8357, 8359, 4562, 4562, 4562, 4562, 4564, 4564, 4569, 4569, 4802, 4791, 4721, 4730, 4802, 4802, 4791, 4791, 8509, 8511, 8513, 8515, 8517, 8519, 8521, 8523, 8525, 8527, 8529, 8531, 8533, 8535, 4329, 4329, 4562, 4562, 4249, 4249, 4329, 4329, 4550, 4550, 4562, 4562, 4249, 4249, 4569, 4569, 4249, 4249, 4564, 4564, 4329, 4329, 4300, 4300, 4317, 4317, 4329, 4329, 4348, 4348, 4420, 4431, 4452, 4441, 4420, 4431, 4441, 4452, 4462, 4471, 4502, 4502, 4540, 4540, 4550, 4550, 4562, 4562, 4566, 4566, 4564, 4566, 4566, 4564, 4566, 4566, 4569, 4569, 4770, 4781, 4721, 4730, 4770, 4781, 4791, 4802, 8811, 8813, 8815, 8817, 8819, 8821, 8823, 8825, 8828, 8830, 8832, 8834, 8837, 8839, 8842, 8844, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 8880, 8882, 6454, 6454, 8890, 8892, 8894, 8896, 8898, 8900, 8902, 8904, 8906, 8908, 8910, 8912, 8914, 8916, 6454, 6454, 8934, 8936, 8938, 8940, 8942, 8944, 8946, 8948, 8950, 8952, 8954, 8956, 8958, 8960, 8966, 8968, 8970, 8972, 8974, 8976, 8978, 8980, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 9046, 9048, 9050, 9052, 9054, 9056, 9058, 9060, 9062, 9064, 9066, 9068, 9070, 9072, 9074, 9076, 9078, 9080, 9082, 9084, 6227, 6227, 6227, 6227, 6272, 6272, 6272, 6272, 9120, 9122, 9124, 9126, 9128, 9130, 9132, 9134, 9136, 9138, 9140, 9142, 9144, 9146, 9148, 9150, 9152, 9154, 6272, 6272, 6272, 6272, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 6454, 6454, 9265, 9267, 9269, 9271, 9273, 9275, 9277, 9279, 9281, 9283, 9286, 9288, 9290, 9292, 5872, 5872, 5913, 5913, 6476, 6454, 6454, 9407, 9409, 9411, 9413, 9415, 9417, 9419, 9421, 9423, 9425, 9427, 9429, 9432, 9434, 9436, 9438, 9442, 9444, 9446, 9448, 6240, 6249, 6336, 6325, 6227, 6227, 6227, 6227, 6240, 6249, 6272, 6272, 6272, 6272, 6304, 6315, 6304, 6315, 6325, 6336, 6454, 6454, 9552, 9554, 6487, 6476, 6476, 6454, 6454, 6476, 6487, 6508, 6508, 9590, 9592, 9594, 9596, 9599, 9601, 9604, 9606, 9613, 9615, 9618, 9620, 9623, 9625, 9634, 9636, 9638, 9640, 9643, 9645, 9648, 9650, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8848, 8848, 8851, 8851, 8851, 8851, 8851, 8851, 8848, 8848, 9440, 9440, 9652, 9652, 9284, 9284, 9440, 9440, 9652, 9652, 6791, 6791, 9652, 9652, 9585, 9585, 9550, 9550, 9550, 9550, 9284, 9284, 9629, 9629, 9550, 9550, 9585, 9585, 9284, 9284, 9440, 9440, 9585, 9585, 9585, 9585, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9439, 9629, 9629, 9629, 9629, 6790, 6790, 9652, 9652, 9629, 9629, 9629, 9629, 6791, 6791, 9652, 9652, 9284, 9284, 9610, 9440, 9440, 8536, 8536, 8536, 8536, 8853, 8853, 8848, 8848, 9439, 9439, 7894, 7894, 9439, 9439, 9610, 9610, 9652, 9652, 9585, 9585, 9550, 9550, 9585, 9585, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9585, 9585, 9629, 9629, 9550, 9550, 9585, 9585, 9585, 9585, 9585, 9585, 9585, 9585, 9610, 9610, 9550, 9550, 9550, 9550, 9439, 9439, 9610, 9610, 9652, 9652, 9439, 9439, 9610, 9610, 7894, 7894, 9585, 9585, 9610, 9610, 9550, 9550, 9585, 9585, 9439, 9439, 7894, 7894, 8848, 8848, 8851, 8536, 8536, 8853, 8853, 8851, 8851, 8851, 8848, 8848, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 7894, 7894, 9550, 9550, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9439, 9439, 7894, 7894, 7894, 7894, 7894, 7894, 9652, 9652, 9550, 9550, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9587, 9585, 9585, 9583, 9439, 9439, 9610, 9610, 7894, 7894, 7894, 7894, 7894, 7894, 7894, 7894, 8851, 8851, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8848, 8848, 8536, 8536, 8848, 8536, 8536, 8848, 8536, 8536, 8846, 8835, 8835, 8846, 8851, 8851, 8848, 8848, 8851, 8851, 8853, 8851, 8851, 8853, 9550, 9550, 9585, 9585, 9284, 9284, 9440, 9440, 9550, 9550, 9585, 9585, 9284, 9284, 9284, 9284, 9629, 9629, 9629, 9629, 9629, 9629, 9629, 9629, 9284, 9284, 9440, 9440, 9629, 9629, 9449, 9430, 9652, 9652, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9550, 9550, 9550, 9550, 9585, 9585, 9440, 9440, 9430, 9439, 9440, 9440, 9629, 9629, 9631, 9629, 9629, 9629, 9629, 9627, 9629, 9629, 9449, 9550, 9550, 9585, 9585, 9583, 9585, 9585, 9587, 9608, 9608, 9610, 9629, 9629, 9629, 9629, 9627, 9629, 9629, 9631, 9652, 9652, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14625, 14627, 14629, 14631, 14633, 14635, 14637, 14639, 14641, 14643, 14645, 14647, 14649, 14651, 14653, 14655, 14657, 14659, 14661, 14663, 14665, 14667, 14669, 14671, 14673, 14675, 14677, 14679, 14681, 14683, 14685, 14687, 14689, 14691, 14693, 14695, 14697, 14699, 14701, 14703, 14705, 14707, 14709, 14711, 14713, 14715, 14717, 14719, 14721, 14723, 14725, 14727, 14729, 14731, 14733, 14735, 14737, 14739, 14741, 14743, 14745, 14747, 14749, 14751, 14753, 14755, 14757, 14759, 14761, 14763, 14765, 14767, 14769, 14771, 14773, 14775, 14777, 14779, 14781, 14783, 14785, 14787, 14789, 14791, 14793, 14795, 14797, 14799, 14801, 14803, 14805, 14807, 14809, 14811, 14813, 14815, 14817, 14819, 14821, 14823, 14825, 14827, 14829, 14831, 14833, 14835, 14837, 14839, 14841, 14843, 14845, 14847, 14849, 14851, 14853, 14855, 14857, 14859, 14861, 14863, 14865, 14867, 14869, 14871, 14873, 14875, 14877, 14879, 14881, 14883, 14885, 14887, 14889, 14891, 14893, 14895, 14897, 14899, 14901, 14903, 14905, 14907, 14909, 14911, 14913, 14915, 14917, 14919, 14921, 14923, 14925, 14927, 14929, 14931, 14933, 14935, 14937, 14939, 14941, 14943, 14945, 14947, 14949, 14951, 14953, 14955, 14957, 14959, 14961, 14963, 14965, 14967, 14969, 14971, 14973, 14975, 14977, 14979, 14981, 14983, 14985, 14987, 14989, 14991, 14993, 14995, 14997, 14999, 15001, 15003, 15005, 15007, 15009, 15011, 15013, 15015, 15017, 15019, 15021, 15023, 15025, 15027, 15029, 15031, 15033, 15035, 15037, 15039, 15041, 15043, 15045, 15047, 15049, 15051, 15053, 15055, 15057, 15059, 15061, 15063, 15065, 15067, 15069, 15071, 15073, 15075, 15077, 15079, 15081, 15083, 15085, 15087, 15089, 15091, 15093, 15095, 15097, 15099, 15101, 15103, 15105, 15107, 15109, 15111, 15113, 15115, 15117, 15119, 15121, 15123, 15125, 15127, 15129, 15131, 15133, 15135, 15137, 15139, 15141, 15143, 15145, 15147, 15149, 15151, 15153, 15155, 15157, 15159, 15161, 15163, 15165, 15167, 15169, 15171, 15173, 15175, 15177, 15179, 15181, 15183, 15185, 15187, 15189, 15191, 15193, 15195, 15197, 15199, 15201, 15203, 15205, 15207, 15209, 15211, 15213, 15215, 15217, 15219, 15221, 15223, 15225, 15227, 15229, 15231, 15233, 15235, 15237, 15239, 15241, 15243, 15245, 15247, 15249, 15251, 15253, 15255, 15257, 15259, 15261, 15263, 15265, 15267, 15269, 15271, 15273, 15275, 15277, 15279, 15281, 15283, 15285, 15287, 15289, 15291, 15293, 15295, 15297, 15299, 15301, 15303, 15305, 15307, 15309, 15311, 15313, 15315, 15317, 15319, 15321, 15323, 15325, 15327, 15329, 15331, 15333, 15335, 15337, 15339, 15341, 15343, 15345, 15347, 15349, 15351, 15353, 15355, 15357, 15359, 15361, 15363, 15365, 15367, 15369, 15371, 15373, 15375, 15377, 15379, 15381, 15383, 15385, 15387, 15389, 15391, 15393, 15395, 15397, 15399, 15401, 15403, 15405, 15407, 15409, 15411, 15413, 15415, 15417, 15419, 15421, 15423, 15425, 15427, 15429, 15431, 15433, 15435, 15437, 15439, 15441, 15443, 15445, 15447, 15449, 15451, 15453, 15455, 15457, 15459, 15461, 15463, 15465, 15467, 15469, 15471, 15473, 15475, 15477, 15479, 15481, 15483, 15485, 15487, 15489, 15491, 15493, 15495, 15497, 15499, 15501, 15503, 15505, 15507, 15509, 15511, 15513, 15515, 15517, 15519, 15521, 15523, 15525, 15527, 15529, 15531, 15533, 15535, 15537, 15539, 15541, 15543, 15545, 15547, 15549, 15551, 15553, 15555, 15557, 15559, 15561, 15563, 15565, 15567, 15569, 15571, 15573, 15575, 15577, 15579, 15581, 15583, 15585, 15587, 15589, 15591, 15593, 15595, 15597, 15599, 15601, 15603, 15605, 15607, 15609, 15611, 15613, 15615, 15617, 15619, 15621, 15623, 15625, 15627, 15629, 15631, 15633, 15635, 15637, 15639, 15641, 15643, 15645, 15647, 15649, 15651, 15653, 15655, 15657, 15659, 15661, 15663, 15665, 15667, 15669, 15671, 15673, 15675, 15677, 15679, 15681, 15683, 15685, 15687, 15689, 15691, 15693, 15695, 15697, 15699, 15701, 15703, 15705, 15707, 15709, 15711, 15713, 15715, 15717, 15719, 15721, 15723, 15725, 15727, 15729, 15731, 15733, 15735, 15737, 15739, 15741, 15743, 15745, 15747, 15749, 15751, 15753, 15755, 15757, 15759, 15761, 15763, 15765, 15767, 15769, 15771, 15773, 15775, 15777, 15779, 15781, 15783, 15785, 15787, 15789, 15791, 15793, 15795, 15797, 15799, 15801, 15803, 15805, 15807, 15809, 15811, 15813, 15815, 15817, 15819, 15821, 15823, 15825, 15827, 15829, 15831, 15833, 15835, 15837, 15839, 15841, 15843, 15845, 15847, 15849, 15851, 15853, 15855, 15857, 15859, 15861, 15863, 15865, 15867, 15869, 15871, 15873, 15875, 15877, 15879, 15881, 15883, 15885, 15887, 15889, 15891, 15893, 15895, 15897, 15899, 15901, 15903, 15905, 15907, 15909, 15911, 15913, 15915, 15917, 15919, 15921, 15923, 15925, 15927, 15929, 15931, 15933, 15935, 15937, 15939, 15941, 15943, 15945, 15947, 15949, 15951, 15953, 15955, 15957, 15959, 15961, 15963, 15965, 15967, 15969, 15971, 15973, 15975, 15977, 15979, 15981, 15983, 15985, 15987, 15989, 15991, 15993, 15995, 15997, 15999, 16001, 16003, 16005, 16007, 16009, 16011, 16013, 16015, 16017, 16019, 16021, 16023, 16025, 16027, 16029, 16031, 16033, 16035, 16037, 16039, 16041, 16043, 16045, 16047, 16049, 16051, 16053, 16055, 16057, 16059, 16061, 16063, 16065, 16067, 16069, 16071, 16073, 16075, 16077, 16079, 16081, 16083, 16085, 16087, 16089, 16091, 16093, 16095, 16097, 16099, 16101, 16103, 16105, 16107, 16109, 16111, 16113, 16115, 16117, 16119, 16121, 16123, 16125, 16127, 16129, 16131, 16133, 16135, 16137, 16139, 16141, 16143, 16145, 16147, 16149, 16151, 16153, 16155, 16157, 16159, 16161, 16163, 16165, 16167, 16169, 16171, 16173, 16175, 16177, 16179, 16181, 16183, 16185, 16187, 16189, 16191, 16193, 16195, 16197, 16199, 16201, 16203, 16205, 16207, 16209, 16211, 16213, 16215, 16217, 16219, 16221, 16223, 16225, 16227, 16229, 16231, 16233, 16235, 16237, 16239, 16241, 16243, 16245, 16247, 16249, 16251, 16253, 16255, 16257, 16259, 16261, 16263, 16265, 16267, 16269, 16271, 16273, 16275, 16277, 16279, 16281, 16283, 16285, 16287, 16289, 16291, 16293, 16295, 16297, 16299, 16301, 16303, 16305, 16307, 16309, 16311, 16313, 16315, 16317, 16319, 16321, 16323, 16325, 16327, 16329, 16331, 16333, 16335, 16337, 16339, 16341, 16343, 16345, 16347, 16349, 16351, 16353, 16355, 16357, 16359, 16361, 16363, 16365, 16367, 16369, 16371, 16373, 16375, 16377, 16379, 16381, 16383, 16385, 16387, 16389, 16391, 16393, 16395, 16397, 16399, 16401, 16403, 16405, 16407, 16409, 16411, 16413, 16415, 16417, 16419, 16421, 16423, 16425, 16427, 16429, 16431, 16433, 16435, 16437, 16439, 16441, 16443, 16445, 16447, 16449, 16451, 16453, 16455, 16457, 16459, 16461, 16463, 16465, 16467, 16469, 16471, 16473, 16475, 16477, 16479, 16481, 16483, 16485, 16487, 16489, 16491, 16493, 16495, 16497, 16499, 16501, 16503, 16505, 16507, 16509, 16511, 16513, 16515, 16517, 16519, 16521, 16523, 16525, 16527, 16529, 16531, 16533, 16535, 16537, 16539, 16541, 16543, 16545, 16547, 16549, 16551, 16553, 16555, 16557, 16559, 16561, 16563, 16565, 16567, 16569, 16571, 16573, 16575, 16577, 16579, 16581, 16583, 16585, 16587, 16589, 16591, 16593, 16595, 16597, 16599, 16601, 16603, 16605, 16607, 16609, 16611, 16613, 16615, 16617, 16619, 16621, 16623, 16625, 16627, 16629, 16631, 16633, 16635, 16637, 16639, 16641, 16643, 16645, 16647, 16649, 16651, 16653, 16655, 16657, 16659, 16661, 16663, 16665, 16667, 16669, 16671, 16673, 16675, 16677, 16679, 16681, 16683, 16685, 16687, 16689, 16691, 16693, 16695, 16697, 16699, 16701, 16703, 16705, 16707, 16709, 16711, 16713, 16715, 16717, 16719, 16721, 16723, 16725, 16727, 16729, 16731, 16733, 16735, 16737, 16739, 16741, 16743, 16745, 16747, 16749, 16751, 16753, 16755, 16757, 16759, 16761, 16763, 16765, 16767, 16769, 16771, 16773, 16775, 16777, 16779, 16781, 16783, 16785, 16787, 16789, 16791, 16793, 16795, 16797, 16799, 16801, 16803, 16805, 16807, 16809, 16811, 16813, 16815, 16817, 16819, 16821, 16823, 16825, 16827, 16829, 16831, 16833, 16835, 16837, 16839, 16841, 16843, 16845, 16847, 16849, 16851, 16853, 16855, 16857, 16859, 16861, 16863, 16865, 16867, 16869, 16871, 16873, 16875, 16877, 16879, 16881, 16883, 16885, 16887, 16889, 16891, 16893, 16895, 16897, 16899, 16901, 16903, 16905, 16907, 16909, 16911, 16913, 16915, 16917, 16919, 16921, 16923, 16925, 16927, 16929, 16931, 16933, 16935, 16937, 16939, 16941, 16943, 16945, 16947, 16949, 16951, 16953, 16955, 16957, 16959, 16961, 16963, 16965, 16967, 16969, 16971, 16973, 16975, 16977, 16979, 16981, 16983, 16985, 16987, 16989, 16991, 16993, 16995, 16997, 16999, 17001, 17003, 17005, 17007, 17009, 17011, 17013, 17015, 17017, 17019, 17021, 17023, 17025, 17027, 17029, 17031, 17033, 17035, 17037, 17039, 17041, 17043, 17045, 17047, 17049, 17051, 17053, 17055, 17057, 17059, 17061, 17063, 17065, 17067, 17069, 17071, 17073, 17075, 17077, 17079, 17081, 17083, 17085, 17087, 17089, 17091, 17093, 17095, 17097, 17099, 17101, 17103, 17105, 17107, 17109, 17111, 17113, 17115, 17117, 17119, 17121, 17123, 17125, 17127, 17129, 17131, 17133, 17135, 17137, 17139, 17141, 17143, 17145, 17147, 17149, 17151, 17153, 17155, 17157, 17159, 17161, 17163, 17165, 17167, 17169, 17171, 17173, 17175, 17177, 17179, 17181, 17183, 17185, 17187, 17189, 17191, 17193, 17195, 17197, 17199, 17201, 17203, 17205, 17207, 17209, 17211, 17213, 17215, 17217, 17219, 17221, 17223, 17225, 17227, 17229, 17231, 17233, 17235, 17237, 17239, 17241, 17243, 17245, 17247, 17249, 17251, 17253, 17255, 17257, 17259, 17261, 17263, 17265, 17267, 17269, 17271, 17273, 17275, 17277, 17279, 17281, 17283, 17285, 17287, 17289, 17291, 17293, 17295, 17297, 17299, 17301, 17303, 17305, 17307, 17309, 17311, 17313, 17315, 17317, 17319, 17321, 17323, 17325, 17327, 17329, 17331, 17333, 17335, 17337, 17339, 17341, 17343, 17345, 17347, 17349, 17351, 17353, 17355, 17357, 17359, 17361, 17363, 17365, 17367, 17369, 17371, 17373, 17375, 17377, 17379, 17381, 17383, 17385, 17387, 17389, 17391, 17393, 17395, 17397, 17399, 17401, 17403, 17405, 17407, 17409, 17411, 17413, 17415, 17417, 17419, 17421, 17423, 17425, 17427, 17429, 17431, 17433, 17435, 17437, 17439, 17441, 17443, 17445, 17447, 17449, 17451, 17453, 17455, 17457, 17459, 17461, 17463, 17465, 17467, 17469, 17471, 17473, 17475, 17477, 17479, 17481, 17483, 17485, 17487, 17489, 17491, 17493, 17495, 17497, 17499, 17501, 17503, 17505, 17507, 17509, 17511, 17513, 17515, 17517, 17519, 17521, 17523, 17525, 17527, 17529, 17531, 17533, 17535, 17537, 17539, 17541, 17543, 17545, 17547, 17549, 17551, 17553, 17555, 17557, 17559, 17561, 17563, 17565, 17567, 17569, 17571, 17573, 17575, 17577, 17579, 17581, 17583, 17585, 17587, 17589, 17591, 17593, 17595, 17597, 17599, 17601, 17603, 17605, 17607, 17609, 17611, 17613, 17615, 17617, 17619, 17621, 17623, 17625, 17627, 17629, 17631, 17633, 17635, 17637, 17639, 17641, 17643, 17645, 17647, 17649, 17651, 17653, 17655, 17657, 17659, 17661, 17663, 17665, 17667, 17669, 17671, 17673, 17675, 17677, 17679, 17681, 17683, 17685, 17687, 17689, 17691, 17693, 17695, 17697, 17699, 17701, 17703, 17705, 17707, 17709, 17711, 17713, 17715, 17717, 17719, 17721, 17723, 17725, 17727, 17729, 17731, 17733, 17735, 17737, 17739, 17741, 17743, 17745, 17747, 17749, 17751, 17753, 17755, 17757, 17759, 17761, 17763, 17765, 17767, 17769, 17771, 17773, 17775, 17777, 17779, 17781, 17783, 17785, 17787, 17789, 17791, 17793, 17795, 17797, 17799, 17801, 17803, 17805, 17807, 17809, 17811, 17813, 17815, 17817, 17819, 17821, 6510, 6511, 6512, 6513, 6514, 6515, 6516, 6517, 6518, 6519, 6520, 6521, 6522, 6523, 6524, 6525, 17839, 6538, 6549, 6575, 6576, 6579, 6580, 6599, 6600, 6601, 6612, 6613, 6617, 6618, 17854, 17856, 17858, 17860, 17862, 17864, 17866, 17868, 17870, 6676, 6677, 6678, 6679, 6682, 6683, 6684, 6685, 6686, 6687, 6690, 6691, 6692, 6693, 6694, 6695, 6696, 6697, 17890, 17892, 17894, 17896, 17898, 17900, 17902, 17904, 17906, 17908, 17910, 17912, 17914, 17916, 17918, 17920, 17922, 17924, 17926, 17928, 6808, 6809, 17932, 17934, 17936, 17938, 17940, 17942, 17944, 6842, 6843, 6844, 6845, 17950, 17952, 17954, 17956, 17958, 6881, 6882, 6894, 6895, 6896, 6897, 6898, 6899, 6900, 6901, 6902, 6903, 6920, 6921, 6922, 6923, 6924, 6925, 17978, 17980, 6946, 6947, 6959, 6960, 6961, 6962, 6963, 6964, 6971, 6972, 6973, 6974, 6975, 6976, 6977, 6978, 6979, 6980, 6981, 6982, 18002, 18004, 18006, 18008, 18010, 18012, 18014, 18016, 18018, 18020, 18022, 18024, 18026, 18028, 18030, 18032, 18034, 18036, 18038, 18040, 18042, 7077, 7078, 18046, 18048, 18050, 18052, 18054, 18056, 18058, 18060, 18062, 18064, 18066, 18068, 18070, 18072, 18074, 18076, 18078, 18080, 7183, 7184, 7186, 7187, 7195, 7196, 18088, 18090, 18092, 18094, 18096, 18098, 18100, 18102, 18104, 18106, 18108, 18110, 18112, 18114, 18116, 18118, 7296, 7297, 18122, 18124, 18126, 18128, 18130, 18132, 18134, 7352, 7353, 7356, 7357, 7390, 7391, 7396, 7397, 7404, 7405, 7408, 7409, 7412, 7413, 18150, 18152, 18154, 18156, 18158, 18160, 18162, 18164, 7501, 7502, 7505, 7506, 7509, 7510, 7531, 7532, 7535, 7536, 7539, 7540, 7543, 7544, 7547, 7548, 7551, 7552, 18184, 18186, 18188, 18190, 18192, 18194, 18196, 18198, 18200, 18202, 18204, 18206, 18208, 18210, 18212, 18214, 18216, 18218, 18220, 18222, 18224, 18226, 18228, 18230, 18232, 7741, 7742, 7744, 7745, 18238, 18240, 18242, 18244, 18246, 18248, 18250, 18252, 18254, 18256, 18258, 18260, 18262, 7810, 7811, 7812, 7813, 7821, 7822, 7823, 7824, 18272, 18274, 18276, 18278, 18280, 18282, 18284, 18286, 18288, 18290, 18292, 18294, 18296, 18298, 18300, 18302, 7903, 7904, 7905, 7906, 7907, 7915, 7916, 7917, 7918, 7919, 7920, 7921, 7927, 7928, 7929, 7930, 7935, 7936, 7940, 7941, 7942, 7943, 7944, 7945, 7946, 7947, 7948, 7949, 8005, 8008, 18334, 18336, 8026, 8027, 8030, 8031, 8055, 8056, 8059, 8060, 8063, 8064, 18348, 18350, 18352, 18354, 8122, 8123, 8151, 8152, 8155, 8156, 8164, 8165, 8199, 8200, 8203, 8204, 18368, 18370, 18372, 18374, 18376, 18378, 18380, 18382, 8297, 8298, 8320, 8321, 18388, 18390, 18392, 18394, 8386, 8387, 8453, 8454, 8456, 8457, 8459, 8461, 8478, 8481, 8486, 8488, 8502, 8503, 8506, 8507, 18412, 18414, 18416, 18418, 18420, 18422, 18424, 8547, 8548, 8576, 8577, 8578, 8579, 8594, 8595, 8635, 8638, 8641, 8642, 8643, 8644, 8645, 8646, 8647, 8648, 8649, 8650, 8653, 8659, 8662, 8665, 8668, 8671, 8674, 8675, 8677, 8679, 8684, 8689, 8692, 8695, 8701, 8704, 8707, 8710, 8713, 8716, 8722, 8725, 8730, 8733, 8736, 8737, 8740, 8741, 8742, 8743, 8744, 8745, 8746, 8747, 8748, 8749, 8750, 8751, 8771, 8774, 8789, 8792, 8800, 8803, 8806, 8809, 18492, 18494, 18496, 18498, 18500, 18502, 18504, 18506, 8859, 8860, 8862, 8863, 8865, 8866, 8868, 8869, 18516, 8887, 8888, 18520, 18522, 18524, 18526, 18528, 18530, 18532, 8931, 8932, 18536, 18538, 18540, 18542, 18544, 18546, 18548, 18550, 18552, 18554, 18556, 8998, 8999, 9000, 9001, 9008, 9009, 9010, 9011, 18566, 18568, 18570, 18572, 18574, 18576, 18578, 18580, 18582, 18584, 9089, 9090, 9092, 9093, 9095, 9096, 9097, 9098, 18594, 18596, 18598, 18600, 18602, 18604, 18606, 18608, 18610, 9198, 9199, 9200, 9201, 9209, 9210, 9211, 9212, 9220, 9221, 9223, 9224, 9240, 9241, 18626, 18628, 18630, 18632, 18634, 18636, 18638, 9343, 9346, 9355, 9358, 9373, 9390, 9391, 18647, 18649, 18651, 18653, 18655, 18657, 18659, 18661, 18663, 18665, 9452, 9455, 9476, 9479, 9487, 9488, 9490, 9491, 9495, 9498, 9502, 9503, 9505, 9506, 9510, 9513, 9516, 9519, 9522, 9525, 9535, 9538, 18689, 9559, 9562, 9563, 9566, 9567, 9573, 9576, 9579, 9582, 18700, 18702, 18704, 18706, 18708, 18710, 18712, 18714, 18716, 18718, 18720, 9892, 9893, 9894, 9895, 10061, 10062, 10063, 10064, 10077, 10078, 10079, 10080, 10081, 10082, 10083, 10084, 10162, 10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10180, 10181, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10200, 10201, 10202, 10203, 10206, 10207, 10208, 10209, 10214, 10215, 10216, 10217, 10221, 10222, 10223, 10224, 10231, 10232, 10233, 10234, 10239, 10240, 10241, 10242, 10243, 10244, 10245, 10246, 10249, 10250, 10255, 10258, 10259, 10260, 10261, 10262, 10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10276, 10277, 10278, 10279, 10280, 10281, 10282, 10283, 10284, 10285, 10286, 10291, 10292, 10303, 10304, 10306, 10307, 10308, 10309, 10311, 10312, 10317, 10318, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10377, 10378, 10389, 10390, 10391, 10392, 10398, 10399, 10400, 10401, 10641, 10642, 10657, 10658, 10659, 10660, 10663, 10664, 10668, 10669, 10671, 10672, 10686, 10687, 10689, 10690, 10692, 10693, 10694, 10695, 10696, 10697, 10713, 10714, 10717, 10718, 10723, 10724, 10726, 10727, 10747, 10748, 10755, 10782, 10783, 10784, 10785, 10798, 10884, 10885, 10886, 10887, 10972, 10973, 10974, 10975, 10984, 10985, 10986, 10987, 10996, 10997, 10998, 10999, 11000, 11001, 11002, 11003, 11011, 11012, 11048, 11049, 11051, 11052, 11053, 11054, 11056, 11057, 11058, 11059, 11067, 11068, 11072, 11073, 11075, 11076, 11077, 11078, 11081, 11082, 11098, 11099, 11100, 11101, 11102, 11103, 11104, 11105, 11106, 11107, 11108, 11109, 11110, 11111, 11119, 11120, 11127, 11128, 11130, 11131, 11132, 11133, 11134, 11135, 11136, 11137, 11306, 11307, 11436, 11437, 11541, 11542, 11543, 11544, 11545, 11546, 11547, 11548, 11661, 11662, 11663, 11799, 11800, 11801, 11802, 11803, 11959, 11962, 11965, 11968, 11969, 11970, 11971, 11972, 11973, 11974, 11975, 11976, 11977, 11978, 12004, 12005, 12011, 12012, 12018, 12019, 12020, 12021, 12031, 12032, 12033, 12034, 12036, 12037, 12040, 12041, 12042, 12043, 12044, 12045, 12046, 12047, 12056, 12057, 12094, 12095, 12096, 12097, 12102, 12103, 12107, 12128, 12136, 12137, 12185, 12186, 12187, 12188, 12198, 12199, 12200, 12201, 12206, 12207, 12208, 12209, 12210, 12211, 12212, 12213, 12216, 12217, 12222, 12223, 12224, 12225, 12226, 12227, 12228, 12229, 12232, 12233, 12276, 12277, 12278, 12279, 12287, 12288, 12293, 12294, 12297, 12300, 12301, 12302, 12303, 12304, 12305, 12306, 12307, 12308, 12309, 12310, 12311, 12312, 12315, 12354, 12355, 12366, 12367, 12368, 12369, 12370, 12371, 12374, 12377, 12378, 12381, 12382, 12384, 12385, 12386, 12387, 12388, 12389, 12392, 12395, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 20736, 20738, 20740, 20742, 20744, 20746, 20748, 20750, 19137, 19136, 19139, 19138, 19296, 19396, 19141, 19140, 19143, 19142, 19145, 19144, 19310, 19803, 19391, 19811, 19147, 19146, 19149, 19148, 19151, 19150, 19153, 19152, 19309, 19802, 19154, 19390, 19810, 19156, 19155, 19157, 19397, 19159, 19158, 19161, 19160, 19163, 19162, 19165, 19164, 19167, 19166, 20755, 19169, 19168, 20757, 19171, 19170, 19173, 19172, 19175, 19174, 19177, 19176, 19179, 19178, 19181, 19180, 19183, 19182, 19185, 19184, 19187, 19186, 20759, 19189, 19188, 19190, 19192, 19191, 19194, 19193, 19195, 19197, 19196, 20762, 20058, 20059, 19922, 20764, 19198, 19199, 19200, 19201, 19203, 19202, 19204, 19206, 19205, 19207, 19209, 19208, 19210, 19212, 19211, 19213, 19215, 19217, 19216, 19219, 19218, 20775, 20777, 19221, 19220, 20779, 20781, 20783, 19223, 19222, 20785, 20787, 20789, 20791, 19225, 19224, 19227, 19226, 19229, 19228, 19231, 19230, 19233, 19232, 19235, 19234, 19237, 19236, 19239, 19238, 19241, 19240, 19243, 19242, 19245, 19244, 19247, 19246, 19249, 19248, 19251, 19250, 20813, 19253, 19252, 19255, 19254, 20822, 20824, 19257, 19256, 19259, 19258, 19261, 19260, 19263, 19262, 19264, 19266, 19265, 19268, 19267, 19270, 19269, 20831, 19272, 19271, 19274, 19273, 19276, 19275, 19278, 19277, 19279, 19281, 19280, 20833, 20835, 20837, 20839, 20841, 19283, 19282, 19285, 19284, 19287, 19286, 19289, 19288, 19291, 19290, 19293, 19292, 19295, 19294, 19297, 19296, 20843, 20845, 20847, 19683, 19682, 19684, 19686, 19679, 19687, 19689, 19688, 19690, 19298, 19692, 19693, 20851, 19299, 19302, 19301, 19304, 19303, 19306, 19305, 19308, 19307, 19310, 19309, 20853, 20855, 20857, 19312, 19311, 19314, 19313, 19316, 19315, 20859, 20861, 20863, 20865, 20867, 20869, 19318, 19317, 19320, 19319, 19322, 19321, 19324, 19323, 19326, 19325, 20892, 19327, 19329, 19328, 19331, 19330, 19333, 19332, 19335, 19334, 19337, 19336, 19339, 19338, 19341, 19340, 19343, 19342, 19345, 19344, 19347, 19346, 19349, 19348, 19351, 19350, 19609, 19608, 19611, 19610, 19613, 19604, 19614, 20912, 19352, 20914, 19353, 19355, 19354, 19357, 19356, 19359, 19358, 20916, 19360, 19362, 19364, 19363, 19365, 19367, 19366, 19369, 19368, 19371, 19370, 19372, 19374, 19373, 19375, 19376, 19378, 19380, 19379, 19382, 19381, 19383, 19386, 19385, 19388, 19387, 19389, 19391, 19390, 19393, 19392, 19395, 19394, 19397, 19396, 20934, 19398, 19399, 19400, 19401, 19403, 19402, 19405, 19404, 19407, 19406, 19409, 19408, 19411, 19410, 19412, 19414, 19413, 19415, 19418, 19417, 19420, 19419, 19422, 19421, 19424, 19423, 20943, 19426, 19425, 20945, 19428, 19427, 19429, 19430, 19432, 19434, 19433, 19436, 19435, 19438, 19437, 19439, 19441, 19440, 19442, 19444, 19443, 19445, 19448, 19447, 19450, 19449, 19452, 19451, 19454, 19453, 19456, 19455, 19458, 19457, 19460, 19459, 20947, 19462, 19461, 19464, 19463, 20949, 19466, 19465, 19468, 19467, 19470, 19469, 20951, 19471, 19818, 20953, 19473, 19472, 20955, 19475, 19474, 19476, 19478, 19477, 19479, 19481, 19480, 19482, 19483, 19485, 19487, 19486, 19489, 19488, 19491, 19490, 19493, 19492, 19495, 19494, 19497, 19496, 19499, 19498, 19500, 19502, 19501, 19503, 19506, 19505, 19508, 19507, 19510, 19509, 19511, 19514, 19513, 19516, 19515, 19518, 19517, 19520, 19519, 19522, 19521, 19524, 19523, 19525, 19528, 19527, 19530, 19529, 19532, 19531, 20965, 19534, 19533, 20967, 19536, 19535, 20969, 19538, 19537, 19540, 19539, 19542, 19541, 19544, 19543, 19546, 19545, 19548, 19547, 19550, 19549, 19552, 19551, 19554, 19553, 19556, 19555, 20971, 19558, 19557, 20973, 19560, 19559, 20975, 19562, 19561, 20977, 19564, 19563, 20979, 19566, 19565, 20981, 19568, 19567, 19569, 19571, 19570, 19573, 19572, 19575, 19574, 19577, 19576, 19579, 19578, 19581, 19580, 19583, 19582, 19585, 19584, 19587, 19586, 19589, 19588, 19591, 19590, 19593, 19592, 19595, 19594, 19597, 19596, 19599, 19598, 19601, 19600, 20640, 19606, 20642, 20641, 20644, 20643, 20646, 20645, 19609, 19602, 19611, 19610, 19604, 19603, 19614, 20653, 20655, 20657, 20659, 19616, 19615, 19617, 19605, 20640, 19606, 20642, 20641, 20644, 20643, 20645, 19607, 19609, 19608, 19611, 19610, 19613, 19612, 19614, 20654, 20656, 20658, 20660, 19616, 19615, 19618, 19617, 19620, 19619, 19622, 19621, 19624, 19623, 19625, 21008, 19626, 21010, 19627, 19629, 19628, 19631, 19630, 19633, 19632, 19635, 19634, 19637, 19636, 19638, 21025, 21027, 19640, 19639, 19642, 19641, 19644, 19643, 19645, 21029, 21031, 19647, 19646, 19649, 19648, 19651, 19650, 19653, 19652, 19655, 19654, 19656, 21049, 21051, 19658, 19657, 19659, 19662, 19661, 19664, 19663, 21054, 21056, 21059, 19665, 19667, 19668, 19670, 19669, 21061, 21063, 19672, 19671, 19674, 19673, 21065, 19675, 19678, 19677, 21067, 21069, 21071, 21073, 21075, 19683, 19682, 19684, 19686, 19679, 19680, 20271, 19681, 19689, 19688, 19690, 19692, 19691, 19693, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 19884, 19883, 19683, 19682, 19684, 19686, 19685, 19687, 20271, 20273, 19689, 19688, 19690, 19692, 19691, 19693, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 19886, 19885, 19695, 19694, 19697, 19696, 19699, 19698, 19700, 19702, 19701, 19704, 19703, 19705, 19707, 19708, 19711, 19710, 19713, 19712, 19715, 19714, 21081, 19717, 19716, 21083, 19718, 19720, 19719, 19722, 19721, 19723, 19725, 19724, 19726, 20244, 19728, 19727, 19730, 19729, 19731, 19733, 19732, 19735, 19734, 19737, 19736, 19739, 19738, 21085, 19741, 19740, 21087, 19743, 19742, 21089, 19744, 19745, 19746, 19747, 19748, 19749, 19750, 19751, 19753, 19752, 19754, 19755, 19756, 19757, 19758, 19759, 19761, 19763, 19762, 19765, 19764, 19767, 19766, 19768, 19771, 19770, 19773, 19772, 19774, 19776, 19775, 19778, 19777, 19780, 19779, 19782, 19781, 19784, 19783, 19786, 19785, 21095, 19788, 19787, 19790, 19789, 19792, 19791, 19794, 19793, 19796, 19795, 19797, 19799, 19798, 19801, 19800, 19803, 19802, 19805, 19804, 19807, 19806, 19809, 19808, 19811, 19810, 19813, 19812, 21097, 19815, 19814, 21099, 19816, 19817, 19818, 19820, 19819, 19822, 19821, 21101, 19823, 19826, 19825, 19828, 19827, 19830, 19829, 19832, 19831, 19834, 19833, 19835, 19837, 19836, 19839, 19838, 19840, 19842, 19845, 19844, 19847, 19846, 19848, 19850, 19849, 19852, 19851, 19854, 19853, 19856, 19855, 19858, 19857, 21103, 19860, 19859, 21105, 19861, 19862, 19863, 19864, 19865, 19866, 19867, 19868, 19870, 19869, 19871, 19872, 19873, 19874, 19875, 19877, 19876, 19878, 19880, 19879, 19882, 19881, 19884, 19883, 19886, 19885, 19887, 19888, 19889, 19890, 19891, 19893, 19894, 19895, 19896, 19897, 19899, 19898, 19900, 19901, 19904, 19903, 19906, 19905, 19908, 19907, 19910, 19909, 19912, 19911, 19914, 19913, 19916, 19915, 19918, 19917, 19920, 19919, 19922, 19921, 21115, 20058, 19923, 20059, 19995, 19925, 19924, 19927, 19926, 19929, 19928, 19931, 19930, 19932, 19934, 19937, 19936, 19939, 19938, 19941, 19940, 19942, 21117, 19944, 19943, 19946, 19945, 20057, 19973, 19947, 19949, 19951, 19950, 19952, 19954, 19953, 19956, 19955, 19958, 19957, 19960, 19959, 19962, 19961, 19963, 19965, 19964, 19967, 19966, 19969, 19968, 19970, 19972, 19971, 19973, 19975, 19974, 19977, 19976, 19979, 19978, 19980, 19983, 19982, 19985, 19984, 19987, 19986, 19988, 19990, 19989, 21123, 19992, 19991, 19993, 19994, 19995, 19997, 19996, 19999, 19998, 20001, 20000, 20003, 20002, 20005, 20004, 20007, 20006, 20008, 20011, 20010, 20013, 20012, 20015, 20014, 20017, 20016, 20019, 20018, 20021, 20020, 20023, 20022, 20025, 20024, 20027, 20026, 20029, 20028, 20031, 20030, 20032, 20034, 20033, 20035, 20037, 20036, 20039, 20038, 20041, 20040, 20042, 20044, 20043, 20046, 20045, 20048, 20047, 20050, 20049, 20052, 20051, 20054, 20053, 20056, 20055, 21125, 20057, 21127, 20058, 20059, 20060, 20061, 20062, 20063, 20065, 20064, 20066, 20068, 20067, 20069, 20071, 20070, 20073, 20072, 20075, 20074, 20077, 20076, 20079, 20078, 20080, 20081, 20082, 20083, 20084, 20086, 20085, 20087, 20088, 20090, 20092, 20091, 20094, 20093, 20096, 20095, 21135, 20098, 20097, 21137, 20100, 20099, 20102, 20101, 20104, 20103, 20106, 20105, 20108, 20107, 21146, 20110, 20109, 20112, 20111, 20114, 20113, 20116, 20115, 20118, 20117, 20120, 20119, 20122, 20121, 20124, 20123, 20126, 20125, 20128, 20127, 20129, 20130, 20132, 20131, 20133, 20136, 20135, 21148, 21150, 20138, 20137, 20140, 20139, 20142, 20141, 20144, 20143, 20146, 20145, 20148, 20147, 20150, 20149, 21152, 20152, 20151, 20154, 20153, 20155, 20157, 20160, 20159, 20162, 20161, 20164, 20163, 20166, 20165, 20168, 20167, 20170, 20169, 20172, 20171, 20173, 20175, 20174, 20177, 20176, 20179, 20178, 20180, 20182, 20181, 20184, 20183, 20186, 20185, 20188, 20187, 20189, 20192, 20191, 20194, 20193, 20196, 20195, 21156, 21158, 21160, 21162, 21164, 20198, 20197, 20199, 20202, 20201, 20204, 20203, 20206, 20205, 20208, 20207, 20210, 20209, 20212, 20211, 20214, 20213, 21172, 20215, 20217, 20220, 20219, 20222, 20221, 20224, 20223, 20226, 20225, 20228, 20227, 20230, 20229, 20232, 20231, 20233, 20235, 20234, 20237, 20236, 20239, 20238, 20241, 20240, 20243, 20242, 20245, 20244, 20247, 20246, 20248, 20250, 20249, 20252, 20251, 20254, 20253, 20255, 20257, 20260, 20259, 20262, 20261, 21190, 20264, 20263, 21192, 21194, 21197, 21200, 21202, 20266, 20265, 20267, 20269, 20268, 20270, 20271, 20273, 20275, 20274, 20276, 20278, 20277, 20279, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 20288, 20287, 20289, 20291, 20290, 20293, 20292, 20295, 20294, 20296, 20297, 20299, 20301, 20300, 20303, 20302, 20305, 20304, 20306, 20308, 20307, 20309, 20310, 20313, 20312, 20315, 20314, 20317, 20316, 20319, 20318, 20321, 20320, 21220, 20322, 21222, 20323, 21224, 20324, 21226, 20325, 20327, 20326, 20329, 20328, 20331, 20330, 20333, 20332, 20335, 20334, 20337, 20336, 21229, 20339, 20338, 20341, 20340, 20343, 20342, 20345, 20344, 20347, 20346, 20349, 20348, 20351, 20350, 21238, 20353, 20352, 20355, 20354, 20357, 20356, 20359, 20358, 20361, 20360, 20362, 20364, 20363, 20366, 20365, 20368, 20367, 20369, 20371, 20370, 20372, 21251, 21253, 20374, 20373, 20375, 20377, 20376, 20378, 21255, 21257, 20380, 20379, 20382, 20381, 20384, 20383, 20386, 20385, 20388, 20387, 20390, 20389, 20392, 20391, 20394, 20393, 20396, 20395, 20398, 20397, 20400, 20399, 20402, 20401, 20404, 20403, 20406, 20405, 20408, 20407, 20409, 20411, 20410, 20413, 20412, 20415, 20414, 21269, 20416, 21271, 20417, 21273, 21275, 20419, 20418, 20421, 20420, 20423, 20422, 20425, 20424, 20427, 20426, 20429, 20428, 20431, 20430, 20433, 20432, 20435, 20434, 20437, 20436, 20439, 20438, 20441, 20440, 20443, 20442, 20445, 20444, 20447, 20446, 20449, 20448, 20451, 20450, 20453, 20452, 20455, 20454, 20457, 20456, 20459, 20458, 20461, 20460, 20463, 20462, 20465, 20464, 20467, 20466, 20469, 20468, 20471, 20470, 20473, 20472, 20475, 20474, 20477, 20476, 20479, 20478, 20480, 21286, 21288, 20482, 20481, 20484, 20483, 20486, 20485, 20487, 21290, 21292, 20489, 20488, 20491, 20490, 20493, 20492, 20494, 21294, 20495, 21296, 20496, 20498, 20497, 20500, 20499, 20502, 20501, 20504, 20503, 20506, 20505, 20508, 20507, 20510, 20509, 21298, 20512, 20511, 20513, 20515, 20514, 20517, 20516, 20519, 20518, 20521, 20520, 20523, 20522, 20525, 20524, 20527, 20526, 20528, 20530, 20529, 20532, 20531, 20534, 20533, 20535, 20537, 20536, 20538, 20540, 20539, 20542, 20541, 20544, 20543, 20546, 20545, 20548, 20547, 20550, 20549, 20552, 20551, 20554, 20553, 20556, 20555, 20558, 20557, 20560, 20559, 20562, 20561, 20564, 20563, 20566, 20565, 20568, 20567, 20569, 20571, 20570, 20573, 20572, 20575, 20574, 20577, 20576, 20579, 20578, 20580, 20582, 20581, 20584, 20583, 20586, 20585, 20587, 20589, 20588, 20590, 20592, 20591, 20594, 20593, 20596, 20595, 20598, 20597, 20600, 20599, 20602, 20601, 20604, 20603, 20606, 20605, 20608, 20607, 20610, 20609, 20612, 20611, 20614, 20613, 20616, 20615, 20618, 20617, 20620, 20619, 20622, 20621, 20624, 20623, 21312, 20626, 20625, 20627, 20629, 20628, 20630, 20632, 20631, 20634, 20633, 20636, 20635, 20638, 20637, 20640, 20639, 20642, 20641, 20644, 20643, 20646, 20645, 20648, 20647, 20649, 20651, 20650, 20652, 20654, 20653, 20656, 20655, 20658, 20657, 20660, 20659, 20662, 20661, 20664, 20663, 20666, 20665, 20668, 20667, 20670, 20669, 20671, 21328, 20672, 21330, 20673, 20675, 20674, 20677, 20676, 20679, 20678, 20680, 21334, 20681, 21336, 20682, 20684, 20683, 20686, 20685, 20688, 20687, 20690, 20689, 20692, 20691, 20694, 20693, 20696, 20695, 20698, 20697, 20700, 20699, 20701, 20703, 20702, 20705, 20704, 20725, 20706, 20708, 20707, 20710, 20709, 20711, 20713, 20712, 20715, 20714, 20717, 20716, 20719, 20718, 20721, 20720, 21348, 20723, 20722, 21350, 20725, 20724, 20726, 20728, 20727, 20730, 20729, 20732, 20731, 20734, 20733, 21214, 20751, 21216, 21218, 21367, 21369, 21052, 21052, 20760, 20760, 20766, 20765, 20768, 20767, 20770, 20769, 20771, 21371, 21373, 20773, 20772, 21375, 21377, 21379, 21381, 20792, 20793, 20794, 20795, 21383, 21385, 21387, 21389, 21391, 20797, 20796, 21276, 20799, 21279, 21278, 20808, 20798, 21393, 21276, 20799, 21279, 20800, 21395, 21397, 21399, 21401, 21403, 21405, 20809, 20808, 21407, 21409, 20802, 20801, 21411, 21413, 21415, 21417, 20803, 20805, 20804, 21423, 21425, 21301, 21300, 21303, 21299, 21427, 21429, 21431, 21433, 20807, 20806, 21435, 21301, 21300, 21303, 21299, 20809, 20808, 21438, 21440, 21442, 21444, 21446, 21448, 21450, 21452, 20811, 20810, 21454, 21457, 21459, 21461, 21463, 21465, 20815, 20814, 21467, 20816, 21469, 21471, 20817, 21473, 20898, 20818, 20820, 20819, 21475, 21477, 21479, 21481, 21483, 21485, 21487, 21489, 21491, 21493, 21495, 21011, 21497, 21499, 20826, 20825, 20828, 20827, 20829, 21501, 21503, 20849, 20848, 20871, 20870, 20873, 20872, 20875, 20874, 20877, 20876, 20879, 20878, 20881, 20880, 20883, 20882, 20885, 20884, 21505, 20886, 20888, 20887, 20890, 20889, 21507, 21509, 20894, 20893, 21511, 20895, 20897, 20896, 21513, 20898, 21515, 20900, 20899, 20901, 20903, 20902, 20905, 20904, 21517, 20906, 21519, 20907, 21521, 21523, 21525, 20908, 20910, 20909, 21527, 20917, 21345, 21529, 20919, 20918, 21301, 21300, 21531, 20920, 21533, 20922, 20921, 20924, 20923, 20926, 20925, 20928, 20927, 20930, 20929, 21535, 20932, 20931, 20936, 20935, 20938, 20937, 20940, 20939, 20941, 21538, 21540, 20957, 20956, 20959, 20958, 20961, 20960, 20963, 20962, 21543, 21545, 20983, 20982, 20985, 20984, 20987, 20986, 20989, 20988, 21547, 21549, 20991, 20990, 20993, 20992, 20995, 20994, 20997, 20996, 21551, 21553, 21555, 21557, 21559, 21561, 20998, 21000, 20999, 21002, 21001, 21004, 21003, 21563, 21006, 21005, 21565, 21011, 21567, 21569, 21012, 21571, 21573, 21014, 21013, 21016, 21015, 21017, 21299, 21018, 21575, 21019, 21020, 21045, 21577, 21021, 21579, 21581, 21023, 21022, 21583, 21585, 21587, 21589, 21591, 21593, 21596, 21033, 21032, 21035, 21034, 21036, 21038, 21037, 21599, 21039, 21041, 21040, 21043, 21042, 21044, 21601, 21045, 21603, 21605, 21607, 21609, 21047, 21046, 21052, 21052, 21057, 21057, 21079, 21078, 21611, 21091, 21090, 21093, 21092, 21613, 21107, 21106, 21109, 21108, 21111, 21110, 21113, 21112, 21615, 21617, 21619, 21621, 21119, 21118, 21121, 21120, 21623, 21139, 21138, 21141, 21140, 21143, 21142, 21144, 21626, 21629, 21212, 21211, 21214, 21213, 21216, 21215, 21218, 21217, 21635, 21637, 21639, 21642, 21645, 21227, 21647, 21230, 21232, 21231, 21234, 21233, 21649, 21651, 21236, 21235, 21653, 21655, 21239, 21657, 21241, 21240, 21659, 21661, 21663, 21665, 21243, 21242, 21245, 21244, 21247, 21246, 21667, 21249, 21248, 21259, 21258, 21260, 21669, 21671, 21262, 21261, 21264, 21263, 21673, 21265, 21267, 21266, 21277, 21276, 21279, 21278, 21281, 21280, 21282, 21284, 21283, 21677, 21679, 21681, 21683, 21685, 21301, 21300, 21303, 21299, 21687, 21689, 21691, 21693, 21305, 21304, 21695, 21301, 21300, 21303, 21302, 21697, 21699, 21701, 21703, 21305, 21304, 21705, 21707, 21709, 21711, 21313, 21315, 21314, 21316, 21713, 21318, 21317, 21320, 21319, 21717, 21719, 21722, 21724, 21727, 21322, 21321, 21730, 21345, 21732, 21735, 21356, 21355, 21358, 21357, 21360, 21359, 21741, 21361, 21743, 21746, 21363, 21362, 21365, 21364, 21436, 21436, 21436, 21436, 21436, 21436, 21536, 21536, 21541, 21541, 21536, 21536, 21541, 21541, 28, 29, 30, 31, 6530, 6531, 6532, 6533, 6534, 6535, 6536, 6537, 6539, 6540, 6541, 6542, 6543, 6544, 6545, 6546, 6547, 6548, 6550, 6551, 6552, 6553, 6554, 6555, 6556, 6557, 6558, 6559, 6560, 6561, 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6570, 6571, 6572, 6573, 6574, 6577, 6578, 6581, 6582, 6583, 6584, 6585, 6586, 6587, 6588, 6589, 6590, 6591, 6592, 6593, 6594, 6595, 6596, 6597, 6598, 6602, 6603, 6604, 6605, 6606, 6607, 6608, 6609, 6610, 6611, 6614, 6615, 6616, 6619, 6620, 6621, 6622, 6623, 6624, 6625, 6626, 6627, 6628, 6657, 6658, 6659, 6660, 6661, 6662, 6663, 6672, 6673, 6674, 6675, 6680, 6681, 6688, 6689, 6742, 6743, 6744, 6745, 6746, 6747, 6748, 6749, 6762, 6763, 6764, 6765, 6766, 6767, 6768, 6769, 6770, 6771, 6772, 6773, 6800, 6801, 6802, 6803, 6804, 6805, 6806, 6807, 6810, 6811, 6840, 6841, 6846, 6847, 6848, 6849, 6850, 6851, 6852, 6853, 6854, 6875, 6876, 6877, 6878, 6879, 6880, 6883, 6884, 6885, 6886, 6887, 6888, 6889, 6890, 6891, 6892, 6893, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911, 6912, 6913, 6914, 6915, 6916, 6917, 6918, 6919, 6926, 6927, 6928, 6929, 6930, 6931, 6932, 6933, 6934, 6935, 6936, 6937, 6948, 6949, 6950, 6951, 6952, 6953, 6954, 6955, 6956, 6957, 6958, 6965, 6966, 6967, 6968, 6969, 6970, 7015, 7016, 7017, 7018, 7019, 7020, 7021, 7022, 7075, 7076, 7079, 7080, 7081, 7082, 7083, 7108, 7109, 7110, 7111, 7112, 7113, 7114, 7115, 7116, 7117, 7118, 7119, 7168, 7169, 7170, 7171, 7172, 7173, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7185, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7221, 7222, 7223, 7224, 7225, 7226, 7227, 7228, 7229, 7230, 7231, 7232, 7233, 7234, 7235, 7236, 7237, 7270, 7271, 7272, 7273, 7274, 7275, 7276, 7285, 7286, 7287, 7288, 7289, 7290, 7291, 7292, 7293, 7294, 7295, 7298, 7299, 7300, 7301, 7302, 7303, 7304, 7305, 7306, 7307, 7308, 7309, 7310, 7311, 7312, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7350, 7351, 7354, 7355, 7358, 7359, 7360, 7361, 7362, 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, 7371, 7372, 7373, 7374, 7375, 7376, 7377, 7378, 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, 7387, 7388, 7389, 7392, 7393, 7394, 7395, 7398, 7399, 7400, 7401, 7402, 7403, 7406, 7407, 7410, 7411, 7414, 7415, 7416, 7417, 7418, 7419, 7420, 7421, 7422, 7423, 7424, 7425, 7426, 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7438, 7439, 7472, 7473, 7474, 7475, 7476, 7477, 7478, 7479, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7487, 7488, 7489, 7490, 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, 7499, 7500, 7503, 7504, 7507, 7508, 7511, 7512, 7513, 7514, 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, 7523, 7524, 7525, 7526, 7527, 7528, 7529, 7530, 7533, 7534, 7537, 7538, 7541, 7542, 7545, 7546, 7549, 7550, 7553, 7554, 7555, 7556, 7557, 7558, 7559, 7560, 7561, 7562, 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7571, 7636, 7637, 7638, 7639, 7640, 7641, 7642, 7643, 7644, 7645, 7646, 7647, 7648, 7649, 7650, 7651, 7688, 7689, 7690, 7691, 7692, 7693, 7694, 7695, 7696, 7697, 7698, 7699, 7700, 7701, 7702, 7703, 7704, 7705, 7706, 7707, 7708, 7709, 7710, 7711, 7712, 7713, 7714, 7715, 7716, 7717, 7718, 7719, 7720, 7721, 7722, 7723, 7724, 7725, 7726, 7727, 7728, 7729, 7730, 7731, 7732, 7733, 7734, 7735, 7736, 7737, 7738, 7739, 7740, 7743, 7746, 7747, 7748, 7749, 7750, 7803, 7804, 7805, 7806, 7807, 7808, 7809, 7814, 7815, 7816, 7817, 7818, 7819, 7820, 7825, 7826, 7827, 7828, 7829, 7830, 7831, 7832, 7833, 7834, 7835, 7908, 7909, 7910, 7911, 7912, 7913, 7914, 7922, 7923, 7924, 7925, 7926, 7931, 7932, 7933, 7934, 7937, 7938, 7939, 7950, 7951, 7952, 7953, 7954, 7955, 7956, 7957, 7958, 7959, 7960, 7961, 7962, 7963, 7964, 7965, 7966, 7967, 7968, 7969, 7970, 7971, 7972, 7973, 7974, 7975, 7976, 7977, 7978, 7979, 7980, 7981, 7982, 7983, 7984, 7985, 7986, 7987, 7988, 7989, 7990, 7991, 7992, 7993, 7994, 7995, 7996, 7997, 7998, 7999, 8000, 8001, 8002, 8003, 8004, 8006, 8007, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8024, 8025, 8028, 8029, 8032, 8033, 8034, 8035, 8036, 8037, 8038, 8039, 8040, 8041, 8042, 8043, 8044, 8045, 8046, 8047, 8048, 8049, 8050, 8051, 8052, 8053, 8054, 8057, 8058, 8061, 8062, 8065, 8066, 8067, 8068, 8069, 8070, 8071, 8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8116, 8117, 8118, 8119, 8120, 8121, 8124, 8125, 8126, 8127, 8128, 8129, 8130, 8131, 8132, 8133, 8134, 8135, 8136, 8137, 8138, 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8153, 8154, 8157, 8158, 8159, 8160, 8161, 8162, 8163, 8166, 8167, 8168, 8169, 8170, 8171, 8172, 8173, 8174, 8175, 8176, 8177, 8178, 8179, 8180, 8181, 8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189, 8190, 8191, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8201, 8202, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310, 8311, 8312, 8313, 8314, 8315, 8316, 8317, 8318, 8319, 8322, 8323, 8324, 8325, 8326, 8327, 8328, 8329, 8330, 8331, 8332, 8333, 8334, 8335, 8336, 8337, 8338, 8339, 8340, 8341, 8342, 8343, 8360, 8361, 8362, 8363, 8364, 8365, 8366, 8367, 8368, 8369, 8370, 8371, 8372, 8373, 8374, 8375, 8376, 8377, 8378, 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8388, 8389, 8390, 8391, 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8410, 8411, 8412, 8413, 8414, 8415, 8416, 8417, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8425, 8426, 8427, 8428, 8429, 8430, 8431, 8432, 8433, 8434, 8435, 8436, 8437, 8438, 8439, 8440, 8441, 8442, 8443, 8444, 8445, 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8455, 8458, 8460, 8462, 8463, 8464, 8465, 8466, 8467, 8468, 8469, 8470, 8471, 8472, 8473, 8474, 8475, 8476, 8477, 8479, 8480, 8482, 8483, 8484, 8485, 8487, 8489, 8490, 8491, 8492, 8493, 8494, 8495, 8496, 8497, 8498, 8499, 8500, 8501, 8504, 8505, 8537, 8538, 8539, 8540, 8541, 8542, 8543, 8544, 8545, 8546, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580, 8581, 8582, 8583, 8584, 8585, 8586, 8587, 8588, 8589, 8590, 8591, 8592, 8593, 8596, 8597, 8598, 8599, 8600, 8601, 8602, 8603, 8604, 8605, 8606, 8607, 8608, 8609, 8610, 8611, 8612, 8613, 8614, 8615, 8616, 8617, 8618, 8619, 8620, 8621, 8622, 8623, 8624, 8625, 8626, 8627, 8628, 8629, 8630, 8631, 8632, 8633, 8634, 8636, 8637, 8639, 8640, 8651, 8652, 8654, 8655, 8656, 8657, 8658, 8660, 8661, 8663, 8664, 8666, 8667, 8669, 8670, 8672, 8673, 8676, 8678, 8680, 8681, 8682, 8683, 8685, 8686, 8687, 8688, 8690, 8691, 8693, 8694, 8696, 8697, 8698, 8699, 8700, 8702, 8703, 8705, 8706, 8708, 8709, 8711, 8712, 8714, 8715, 8717, 8718, 8719, 8720, 8721, 8723, 8724, 8726, 8727, 8728, 8729, 8731, 8732, 8734, 8735, 8738, 8739, 8752, 8753, 8754, 8755, 8756, 8757, 8758, 8759, 8760, 8761, 8762, 8763, 8764, 8765, 8766, 8767, 8768, 8769, 8770, 8772, 8773, 8775, 8776, 8777, 8778, 8779, 8780, 8781, 8782, 8783, 8784, 8785, 8786, 8787, 8788, 8790, 8791, 8793, 8794, 8795, 8796, 8797, 8798, 8799, 8801, 8802, 8804, 8805, 8807, 8808, 8855, 8856, 8857, 8858, 8861, 8864, 8867, 8870, 8871, 8872, 8873, 8874, 8875, 8876, 8877, 8878, 8883, 8884, 8885, 8886, 8917, 8918, 8919, 8920, 8921, 8922, 8923, 8924, 8925, 8926, 8927, 8928, 8929, 8930, 8961, 8962, 8963, 8964, 8981, 8982, 8983, 8984, 8985, 8986, 8987, 8988, 8989, 8990, 8991, 8992, 8993, 8994, 8995, 8996, 8997, 9002, 9003, 9004, 9005, 9006, 9007, 9012, 9013, 9014, 9015, 9016, 9017, 9018, 9019, 9020, 9021, 9022, 9023, 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032, 9033, 9034, 9035, 9036, 9037, 9038, 9039, 9040, 9041, 9042, 9043, 9044, 9085, 9086, 9087, 9088, 9091, 9094, 9099, 9100, 9101, 9102, 9103, 9104, 9105, 9106, 9107, 9108, 9109, 9110, 9111, 9112, 9113, 9114, 9115, 9116, 9117, 9118, 9155, 9156, 9157, 9158, 9159, 9160, 9161, 9162, 9163, 9164, 9165, 9166, 9167, 9168, 9169, 9170, 9171, 9172, 9173, 9174, 9175, 9176, 9177, 9178, 9179, 9180, 9181, 9182, 9183, 9184, 9185, 9186, 9187, 9188, 9189, 9190, 9191, 9192, 9193, 9194, 9195, 9196, 9197, 9202, 9203, 9204, 9205, 9206, 9207, 9208, 9213, 9214, 9215, 9216, 9217, 9218, 9219, 9222, 9225, 9226, 9227, 9228, 9229, 9230, 9231, 9232, 9233, 9234, 9235, 9236, 9237, 9238, 9239, 9242, 9243, 9244, 9245, 9246, 9247, 9248, 9249, 9250, 9251, 9252, 9253, 9254, 9255, 9256, 9257, 9258, 9259, 9260, 9261, 9262, 9263, 9293, 9294, 9295, 9296, 9297, 9298, 9299, 9300, 9301, 9302, 9303, 9304, 9305, 9306, 9307, 9308, 9309, 9310, 9311, 9312, 9313, 9314, 9315, 9316, 9317, 9318, 9319, 9320, 9321, 9322, 9323, 9324, 9325, 9326, 9327, 9328, 9329, 9330, 9331, 9332, 9333, 9334, 9335, 9336, 9337, 9338, 9339, 9340, 9341, 9342, 9344, 9345, 9347, 9348, 9349, 9350, 9351, 9352, 9353, 9354, 9356, 9357, 9359, 9360, 9361, 9362, 9363, 9364, 9365, 9366, 9367, 9368, 9369, 9370, 9371, 9372, 9374, 9375, 9376, 9377, 9378, 9379, 9380, 9381, 9382, 9383, 9384, 9385, 9386, 9387, 9388, 9389, 9392, 9393, 9394, 9395, 9396, 9397, 9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9450, 9451, 9453, 9454, 9456, 9457, 9458, 9459, 9460, 9461, 9462, 9463, 9464, 9465, 9466, 9467, 9468, 9469, 9470, 9471, 9472, 9473, 9474, 9475, 9477, 9478, 9480, 9481, 9482, 9483, 9484, 9485, 9486, 9489, 9492, 9493, 9494, 9496, 9497, 9499, 9500, 9501, 9504, 9507, 9508, 9509, 9511, 9512, 9514, 9515, 9517, 9518, 9520, 9521, 9523, 9524, 9526, 9527, 9528, 9529, 9530, 9531, 9532, 9533, 9534, 9536, 9537, 9539, 9540, 9541, 9542, 9543, 9544, 9545, 9546, 9547, 9548, 9549, 9555, 9556, 9557, 9558, 9560, 9561, 9564, 9565, 9568, 9569, 9570, 9571, 9572, 9574, 9575, 9577, 9578, 9580, 9581, 21762, 21760, 21766, 21764, 9660, 9661, 9662, 9663, 21052, 9933, 9934, 20760, 9972, 9973, 10054, 10055, 10056, 10057, 10058, 10059, 10060, 10075, 10076, 21871, 22432, 22432, 22430, 21881, 21880, 21879, 10158, 10159, 10160, 10161, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10182, 10183, 10184, 10185, 10198, 10199, 10204, 10205, 10218, 10219, 10220, 10235, 10236, 10237, 10238, 10247, 10248, 10251, 10252, 10253, 10254, 10256, 10257, 10274, 10275, 10301, 10302, 10305, 10310, 10313, 10314, 10315, 10316, 21917, 21916, 10379, 10393, 10394, 10395, 10396, 10397, 21949, 21948, 21946, 21968, 21967, 21966, 10553, 10554, 21993, 21995, 22004, 22006, 10621, 10622, 10623, 10624, 10625, 10626, 10627, 10628, 10633, 10634, 10635, 10636, 10637, 10638, 10639, 10640, 10643, 10644, 10645, 10646, 10647, 10661, 10662, 10665, 10666, 10667, 10670, 10679, 10680, 10681, 10682, 10683, 10684, 10685, 10688, 10691, 10698, 10699, 10700, 10715, 10716, 10719, 10720, 10721, 10722, 10725, 10728, 10729, 10739, 10740, 10741, 10742, 10743, 10744, 10745, 10746, 10753, 10754, 10775, 10776, 10777, 10778, 10779, 10780, 10781, 10876, 10877, 10878, 10879, 10880, 10881, 10882, 10883, 10964, 10965, 10966, 10967, 10968, 10969, 10970, 10971, 10976, 10977, 10978, 10979, 10980, 10981, 10982, 10983, 11004, 11005, 11006, 11007, 11008, 11009, 11010, 11013, 11014, 11050, 11055, 11060, 11061, 11062, 11063, 11064, 11065, 11066, 11069, 11070, 11071, 11074, 11079, 11080, 22381, 22380, 22390, 22389, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11121, 11122, 11123, 11124, 11125, 11126, 11129, 11138, 11139, 21052, 11173, 11174, 21057, 11208, 11209, 22430, 22420, 22432, 22430, 11304, 11305, 11432, 11433, 11434, 11435, 11533, 11534, 11535, 11536, 11537, 11538, 11539, 11540, 11657, 11658, 11659, 11660, 11792, 11793, 11794, 11795, 11796, 11797, 11798, 22995, 22933, 22995, 22993, 23065, 23064, 23063, 11957, 11958, 11960, 11961, 11963, 11964, 11966, 11967, 12006, 12013, 12014, 12015, 12016, 12017, 12022, 12023, 12035, 12038, 12039, 12048, 12049, 12050, 12051, 12054, 12055, 12058, 12059, 23179, 23178, 23187, 23186, 12091, 12092, 12093, 12098, 12099, 12100, 12101, 12104, 12105, 12106, 23230, 23229, 12126, 12127, 12129, 12130, 12131, 12132, 12133, 12134, 12135, 23295, 23294, 23304, 23303, 12202, 12203, 12204, 12205, 12214, 12215, 12218, 12219, 12220, 12221, 12230, 12231, 12289, 12290, 12291, 12292, 12295, 12296, 12298, 12299, 12313, 12314, 12356, 12372, 12373, 12375, 12376, 12379, 12380, 12383, 12390, 12391, 12393, 12394, 23594, 23593, 23592, 23586, 23585, 23584, 23568, 23567, 23581, 23580, 23586, 23585, 23584, 23594, 23593, 23592, 23852, 24010, 24009, 23812, 23684, 23683, 21436, 21436, 23969, 23950, 23984, 23983, 23681, 23680, 23986, 23985, 23629, 23679, 23638, 23637, 21436, 21436, 23649, 23648, 23650, 23653, 23652, 23613, 23853, 23852, 24010, 23941, 23683, 23615, 24009, 23624, 23619, 23618, 23625, 23677, 21436, 12700, 12701, 24025, 23630, 23696, 21455, 21455, 24041, 24040, 23853, 23852, 23624, 23941, 23684, 23625, 12751, 12752, 12753, 12754, 23969, 23984, 23983, 23678, 23681, 23986, 23985, 23630, 23629, 21436, 21436, 23638, 23637, 23649, 23648, 23650, 23653, 23652, 23654, 23696, 23679, 21455, 21455, 24041, 24040, 23661, 23660, 23916, 23928, 23927, 23885, 23885, 23928, 23927, 23847, 23668, 23876, 23874, 23832, 23752, 23847, 23759, 23847, 23844, 23853, 23852, 23684, 23683, 23853, 23813, 23683, 23677, 23678, 23681, 23682, 23679, 23681, 23680, 23682, 23695, 23853, 23813, 23684, 23683, 21739, 21715, 24025, 23685, 24024, 24023, 23689, 23688, 23696, 23695, 21536, 13024, 13025, 21541, 13069, 13070, 23875, 23743, 23722, 23721, 23832, 23831, 23846, 23759, 23823, 23743, 23752, 23744, 23846, 23759, 23832, 23752, 23846, 23759, 23907, 13192, 13193, 23780, 13233, 13234, 23790, 23801, 23800, 23811, 23810, 24010, 23851, 23813, 23812, 23856, 23855, 23815, 23814, 23847, 23873, 23829, 23828, 23832, 23831, 23847, 23846, 23853, 23852, 24010, 23851, 23856, 23855, 23876, 23875, 23874, 23873, 23885, 23928, 23927, 23901, 23900, 23899, 23907, 23890, 23901, 23900, 23899, 23916, 23907, 23916, 23915, 23928, 23927, 23925, 21739, 21739, 24041, 24040, 24010, 23941, 21739, 21715, 23950, 24025, 23949, 23948, 24010, 24009, 21739, 21715, 24025, 24023, 23957, 24022, 24010, 24009, 21739, 21739, 24040, 24025, 23984, 23983, 23986, 23985, 24040, 24025, 23984, 23983, 23986, 23985, 21715, 21715, 23994, 23993, 21715, 21715, 24005, 24004, 24010, 24009, 21739, 21715, 24025, 24024, 24023, 24022, 24031, 24030, 24041, 24040, 30, 31, 24065, 24067, 24071, 24073, 24075, 24081, 24083, 24085, 24087, 24094, 24098, 24100, 24102, 24104, 24106, 24108, 24110, 24112, 24114, 24116, 24118, 24120, 24122, 24124, 24126, 24128, 24131, 24133, 24136, 24145, 24148, 24151, 24154, 24158, 24160, 24162, 24164, 24166, 24168, 24170, 24172, 24174, 24176, 24178, 24180, 24182, 24184, 24186, 24188, 24190, 24192, 24194, 24196, 24198, 24200, 24202, 24204, 24207, 24209, 24211, 24213, 24215, 24217, 24219, 24222, 24224, 24226, 24228, 24230, 24232, 24234, 24236, 24238, 24240, 24243, 24246, 24249, 24253, 24255, 24257, 24259, 24261, 24263, 24265, 24267, 24269, 24271, 24273, 24275, 24277, 24280, 24282, 24284, 24286, 24288, 24290, 24292, 24294, 24296, 24298, 24300, 24302, 24304, 24306, 24308, 24313, 24315, 24317, 24321, 24324, 24326, 24328, 24331, 24336, 24338, 24341, 24343, 24346, 24348, 24350, 24352, 24358, 24360, 24362, 24364, 24366, 24369, 24372, 24374, 24376, 24378, 24380, 24382, 24387, 24389, 24391, 24394, 24397, 24400, 24402, 24404, 24406, 24408, 24410, 24412, 24414, 24416, 24418, 24420, 24422, 24424, 24426, 24428, 24431, 24434, 24439, 24441, 24443, 24445, 24447, 24449, 24451, 24454, 24457, 24459, 24461, 24464, 24466, 24468, 24470, 24472, 24474, 24477, 24479, 24481, 24483, 24485, 24487, 24489, 24491, 24493, 24495, 24497, 24499, 24501, 24503, 24505, 24507, 24509, 24511, 24513, 24515, 24517, 24520, 24522, 24524, 24526, 24528, 24530, 24532, 24534, 24536, 24538, 24540, 24542, 24544, 24546, 24548, 24550, 24552, 24554, 24556, 24558, 24560, 24562, 24564, 24571, 24573, 24575, 24577, 24579, 24581, 24583, 24585, 24587, 24594, 24596, 24598, 24600, 24602, 24607, 24609, 24611, 24613, 24615, 24618, 24620, 24622, 24625, 24627, 24629, 24631, 24633, 24636, 24639, 24641, 24646, 24648, 24650, 24653, 24655, 24658, 24663, 24666, 24669, 24672, 24674, 24676, 24678, 24681, 24686, 24689, 24692, 24695, 24697, 24699, 24701, 24703, 24705, 24708, 24710, 24715, 24717, 24719, 24721, 24724, 24726, 24729, 24731, 24733, 24735, 24738, 24740, 24742, 24744, 24746, 24748, 24758, 24767, 24769, 24771, 24774, 24776, 24779, 24781, 24783, 24785, 24787, 24789, 24791, 24793, 24795, 24797, 24799, 24802, 24804, 24806, 24808, 24810, 24812, 24814, 24816, 24818, 24823, 24825, 24828, 24830, 24832, 24834, 24836, 24839, 24841, 24845, 24847, 24850, 24852, 24854, 24856, 24858, 24860, 24870, 24877, 24880, 24882, 24884, 24886, 24898, 24902, 24904, 24906, 24908, 24910, 24912, 24914, 24916, 24918, 24920, 24922, 24924, 24926, 24928, 24930, 24932, 24936, 24938, 24940, 24943, 24945, 24947, 24951, 24954, 24956, 24958, 24960, 24962, 24965, 24967, 24969, 24972, 24975, 24977, 24979, 24982, 24984, 24986, 24989, 24991, 24996, 24998, 25000, 25002, 25004, 25006, 25009, 25011, 25013, 25015, 25017, 25019, 25021, 25023, 25025, 25027, 25029, 25032, 25035, 25037, 25039, 25042, 25044, 25046, 25048, 25050, 25052, 25054, 25063, 25066, 25069, 25071, 25073, 25075, 25077, 25084, 25089, 25091, 25093, 25095, 25097, 25099, 25101, 25103, 25105, 25107, 25109, 25111, 25113, 25115, 25117, 25119, 25121, 25123, 25125, 25129, 25132, 25134, 25136, 25138, 25140, 25142, 25144, 25146, 25148, 25150, 25154, 25156, 25158, 25160, 25162, 25164, 25166, 25169, 25171, 25173, 25176, 25178, 25180, 25182, 25185, 25187, 25189, 25191, 25194, 25196, 25198, 25200, 25202, 25204, 25206, 25210, 25212, 25214, 25216, 25218, 25220, 25222, 25225, 25227, 25229, 25231, 25233, 25235, 25237, 25240, 25242, 25244, 25248, 25250, 25252, 25254, 25257, 25262, 25265, 25268, 25271, 25273, 25275, 25278, 25280, 25282, 25287, 25289, 25291, 25294, 25298, 25300, 25302, 25304, 25306, 25312, 25314, 25316, 25318, 25320, 25322, 25324, 25326, 25328, 25330, 25332, 25334, 25336, 25338, 25340, 25342, 25344, 25346, 25349, 25351, 25353, 25356, 25359, 25362, 25365, 25367, 25369, 25371, 25373, 25375, 25377, 25379, 25381, 25383, 25385, 25387, 25389, 25391, 25393, 25396, 25398, 25400, 25404, 25406, 25408, 25410, 25412, 25414, 25416, 25418, 25420, 25422, 25424, 25426, 25428, 25430, 25432, 25434, 25436, 25438, 25440, 25442, 25444, 25446, 25448, 25450, 25452, 25454, 25456, 25458, 25460, 25462, 25464, 25467, 25469, 25471, 25474, 25476, 25478, 25483, 25485, 25487, 25489, 25491, 25493, 25495, 25497, 25500, 25502, 25504, 25506, 25508, 25510, 25512, 25515, 25517, 25519, 25522, 25525, 25527, 25529, 25531, 25533, 25535, 25537, 25539, 25541, 25543, 25545, 25547, 25549, 25551, 25553, 25556, 25558, 25560, 25562, 25564, 25567, 25569, 25571, 25574, 25577, 25579, 25581, 25583, 25585, 25587, 25589, 25591, 25593, 25595, 25597, 25599, 25601, 25603, 25605, 25607, 25609, 25611, 25614, 25617, 25619, 25621, 25623, 25625, 25627, 25629, 25631, 25633, 25636, 25639, 25641, 25643, 25645, 25647, 25649, 25651, 25653, 25655, 25660, 25662, 25664, 25669, 25671, 25673, 25675, 25677, 25679, 25681, 25683, 25685, 25688, 25690, 25692, 25694, 25696, 25699, 25701, 25703, 25705, 25707, 25709, 25711, 25714, 25716, 25718, 25720, 9654, 9655, 9658, 9659, 25207, 24251, 24096, 24095, 24772, 25207, 24069, 24068, 25152, 24077, 24076, 24079, 24078, 25152, 24077, 24076, 24079, 24078, 24934, 24642, 24089, 24088, 24092, 24091, 24637, 24980, 24096, 24095, 25152, 24251, 9932, 24772, 25152, 9971, 24772, 25152, 24139, 24138, 24137, 25152, 25007, 24139, 24138, 24137, 24142, 24141, 24140, 25736, 25738, 25740, 25246, 24155, 25743, 24826, 24642, 25246, 10115, 10116, 24826, 10147, 10148, 10155, 10156, 10157, 25756, 25758, 25760, 25762, 25764, 25766, 25768, 25770, 25773, 25775, 25777, 25779, 25781, 25783, 25785, 25787, 25789, 25795, 23493, 10355, 10356, 23506, 22018, 25800, 25802, 24772, 24826, 24826, 25007, 24772, 24826, 10507, 10508, 10509, 24772, 24826, 10546, 10547, 10548, 25811, 24455, 24934, 24251, 10584, 10587, 24455, 24772, 24934, 10617, 10620, 25817, 25819, 25821, 25823, 25825, 25827, 25829, 25831, 25834, 25836, 23506, 22018, 25838, 25841, 25844, 25847, 25849, 25854, 22053, 22051, 25858, 25860, 25863, 24318, 24333, 25865, 25867, 25869, 25871, 24339, 25873, 24355, 24353, 25875, 25877, 25879, 24384, 24398, 24455, 24462, 25208, 25246, 25192, 24772, 25207, 24436, 25882, 25884, 25886, 25888, 24455, 24462, 25208, 25192, 24772, 24934, 25890, 25892, 25894, 25896, 25898, 25900, 25902, 25904, 25907, 25909, 25911, 25913, 24569, 24568, 24567, 24566, 24592, 24591, 24590, 24589, 22367, 22365, 25917, 25919, 25922, 25928, 11086, 11087, 11091, 11092, 25934, 25936, 25939, 25942, 25944, 25948, 25192, 25208, 25207, 25246, 11172, 25192, 25208, 24637, 25246, 11207, 25152, 24642, 25246, 11241, 11242, 25152, 25246, 11274, 11275, 24660, 24683, 24711, 24713, 25960, 25152, 25151, 25246, 24864, 24862, 24861, 24722, 25152, 25246, 24864, 24863, 24862, 24861, 24751, 24749, 24755, 24754, 24753, 24762, 24761, 24760, 24764, 24772, 24826, 25962, 25964, 25152, 24933, 24821, 24820, 24819, 24826, 24843, 24864, 24863, 24862, 24861, 24867, 24865, 24875, 24874, 24873, 24872, 24889, 24888, 24887, 24891, 24895, 24894, 24893, 24900, 25966, 25968, 25970, 25972, 25152, 24980, 25152, 24980, 24934, 24933, 24948, 25974, 25976, 25152, 24980, 24994, 24993, 24973, 25152, 24980, 24994, 24993, 24992, 25152, 25007, 25057, 25056, 25055, 25060, 25059, 25058, 25082, 25081, 25080, 25079, 25086, 25978, 25980, 25982, 25152, 25151, 11835, 25152, 11867, 25152, 25151, 25246, 11899, 11900, 25192, 25208, 25207, 25246, 11933, 11934, 11935, 25259, 25284, 25296, 25992, 25994, 25996, 25998, 23123, 23121, 23127, 23125, 26002, 26004, 26006, 26009, 26011, 26013, 26015, 26017, 12067, 12068, 12071, 12072, 26023, 26026, 26028, 26031, 23227, 23225, 12112, 12113, 26035, 26037, 26039, 26042, 12159, 12160, 12164, 12165, 23314, 23312, 26048, 26050, 26052, 26054, 26056, 26058, 26061, 26064, 26066, 26068, 23495, 23493, 23506, 23504, 26071, 26073, 26075, 26078, 26080, 25728, 25727, 25726, 25725, 12427, 12428, 12429, 12454, 12455, 12456, 12507, 12508, 12542, 12543, 12568, 12569, 12570, 25754, 25753, 25752, 25751, 12602, 12603, 12604, 12614, 12615, 12616, 12617, 12620, 24011, 12622, 12627, 12628, 12629, 12630, 12642, 12643, 12644, 12645, 12648, 12649, 12650, 12651, 12655, 12656, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 24011, 12673, 12674, 12686, 12687, 12688, 12689, 24011, 12693, 12694, 12699, 12702, 23749, 23929, 12716, 23931, 12718, 12723, 12724, 12725, 12726, 23623, 12738, 12739, 12740, 12741, 12744, 24011, 12746, 26154, 26156, 12755, 12767, 12768, 12769, 12770, 12773, 12774, 12775, 12776, 12779, 12780, 12781, 12782, 12787, 12788, 12789, 12790, 12791, 12792, 23929, 23749, 23931, 12805, 12806, 12811, 12812, 12813, 12814, 24038, 12817, 12818, 12819, 12844, 12845, 12846, 12871, 12872, 12873, 23666, 23671, 12876, 12877, 23669, 23671, 12880, 12881, 23749, 23929, 12894, 23931, 12896, 23725, 23729, 12903, 12904, 12906, 12907, 12911, 12912, 12913, 12914, 12915, 12916, 12917, 12918, 12919, 12920, 12921, 12922, 12923, 12924, 12925, 12926, 12936, 12937, 12940, 12941, 12943, 12946, 12947, 12948, 12949, 12950, 23686, 12963, 12964, 23749, 12968, 12969, 13023, 13068, 23715, 23739, 13076, 13077, 13086, 13087, 23826, 23854, 13092, 13093, 23725, 23729, 13100, 13101, 23739, 23741, 13109, 13110, 23929, 23826, 23931, 13124, 13125, 23745, 13129, 13130, 23929, 23749, 13143, 23931, 13145, 23757, 13149, 13150, 13167, 26257, 13208, 26260, 13259, 13283, 13284, 13289, 13290, 13300, 13301, 13302, 13303, 13306, 13307, 13308, 13309, 23864, 23871, 13318, 23823, 13320, 13331, 13332, 23826, 13336, 13337, 23854, 23840, 23871, 13347, 13348, 23844, 13361, 13362, 13363, 13364, 13367, 13368, 23854, 23864, 23871, 13378, 13379, 13380, 13381, 13424, 13425, 13426, 13458, 13459, 13460, 13474, 13475, 13500, 13501, 13502, 13527, 13528, 13555, 13556, 13595, 13596, 13597, 23929, 23931, 13611, 13612, 13613, 13614, 24038, 13627, 13628, 23942, 13633, 13636, 13637, 13638, 13639, 13640, 13652, 13653, 24011, 13658, 13661, 13662, 13663, 13664, 13665, 13677, 13678, 24011, 13683, 13684, 23969, 13689, 13690, 13702, 13703, 13706, 13707, 13711, 24038, 13713, 13724, 13725, 13728, 13729, 13732, 13733, 13734, 13735, 13739, 13740, 13741, 13742, 13753, 13754, 24011, 13759, 13762, 13763, 13764, 13765, 13766, 24028, 13778, 13779, 13783, 13784, 24038, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27065, 26795, 26815, 27067, 26863, 26873, 26368, 26805, 26718, 26785, 26802, 26615, 26369, 26790, 26710, 26750, 26515, 9677, 9678, 26818, 26752, 26751, 26387, 26755, 26721, 26839, 26812, 26837, 26708, 26660, 26723, 26613, 26673, 26672, 26694, 26392, 26761, 26486, 9698, 9699, 26379, 26370, 26724, 26805, 26746, 26718, 26804, 26831, 26369, 26791, 26720, 26667, 26426, 9713, 9714, 26753, 26752, 26388, 26843, 26755, 26721, 26813, 26811, 26509, 26435, 26760, 26668, 26613, 26673, 26672, 26675, 26674, 26396, 26735, 26485, 26439, 9736, 9737, 26716, 26379, 26370, 26787, 26709, 26786, 26785, 26643, 26788, 26791, 26720, 26644, 26710, 9751, 26792, 26753, 26752, 26751, 26711, 26755, 26721, 26758, 26742, 26389, 26793, 26759, 26372, 26613, 26452, 26451, 9768, 9769, 26762, 26396, 9772, 9773, 26432, 26714, 26715, 26371, 26787, 26709, 26786, 26785, 26643, 26788, 26791, 26720, 26644, 26710, 9788, 26792, 26753, 26752, 26751, 26711, 26755, 26721, 26758, 26742, 26389, 26793, 26759, 26372, 26452, 26451, 26395, 9805, 9806, 26762, 26396, 9809, 9810, 26373, 26714, 26715, 26374, 26805, 26718, 26804, 26787, 26643, 26375, 26791, 26739, 26720, 26376, 9825, 9826, 26818, 26752, 26751, 26387, 26755, 26721, 26758, 26742, 26389, 26793, 26393, 26668, 26673, 26438, 26448, 9842, 9843, 26396, 26392, 9846, 9847, 26680, 26377, 26725, 26663, 26805, 26746, 26718, 26785, 26615, 26434, 26791, 26790, 26710, 26750, 9862, 9863, 26818, 26753, 26752, 26751, 26755, 26721, 26813, 26839, 26812, 26742, 26760, 26759, 26613, 26672, 26451, 26675, 26392, 26761, 26679, 9883, 9884, 26716, 26379, 26378, 26381, 26380, 26383, 26382, 26805, 26746, 26733, 26803, 26719, 26681, 26667, 26616, 26750, 26384, 9906, 9907, 26818, 26752, 26388, 26387, 26755, 26754, 26389, 26435, 26836, 26659, 26759, 26393, 26612, 26671, 26385, 26661, 26386, 26396, 26392, 26486, 26679, 26488, 26680, 26487, 25730, 26805, 26746, 26733, 26803, 26719, 26681, 26667, 26616, 26750, 26748, 9945, 9946, 26818, 26752, 26388, 26387, 26755, 26754, 26758, 26742, 26389, 26435, 26759, 26394, 26612, 26390, 26671, 26391, 26661, 26396, 26392, 26679, 26427, 26488, 26680, 26487, 25733, 26718, 26804, 26665, 26433, 26615, 26434, 26791, 26739, 26720, 26790, 9984, 9985, 26818, 26753, 26751, 26734, 26755, 26721, 26758, 26813, 26839, 26742, 26759, 26393, 26612, 26673, 26613, 26769, 26430, 26396, 26762, 26540, 26427, 26488, 26440, 10009, 10010, 10011, 26718, 26804, 26665, 26433, 26615, 26434, 26791, 26739, 26720, 26790, 10022, 10023, 26818, 26753, 26752, 26751, 26755, 26721, 26758, 26813, 26839, 26659, 26759, 26394, 26612, 26673, 26395, 26769, 26743, 26396, 26762, 26540, 26439, 26680, 10046, 10047, 10048, 10049, 10050, 10051, 26398, 26397, 26760, 26759, 26853, 10068, 26399, 26703, 26400, 10072, 26707, 26706, 26804, 26803, 26657, 26429, 26643, 26806, 26791, 26810, 26666, 10094, 10095, 26813, 26839, 26509, 26401, 26795, 26402, 26818, 26817, 26816, 26819, 26645, 26689, 10108, 26693, 26692, 26691, 26850, 26512, 26617, 27125, 26746, 26718, 26804, 26433, 26682, 26643, 26791, 26810, 26666, 26792, 10127, 26813, 26839, 26794, 26812, 26796, 26795, 26817, 26816, 26798, 26819, 26846, 26651, 26801, 26693, 26692, 26691, 26403, 26512, 26617, 27128, 26676, 26613, 26612, 26673, 26404, 26617, 27130, 26406, 26405, 26408, 26407, 26412, 26411, 26410, 26409, 26414, 26413, 26863, 26702, 26873, 26640, 26415, 26418, 26417, 26416, 26419, 26565, 26872, 26568, 26703, 26702, 27024, 27023, 27022, 27021, 27026, 26420, 27030, 27029, 27028, 27027, 27032, 27031, 27035, 27034, 27033, 10354, 27038, 27037, 27036, 10360, 10361, 27042, 27041, 27040, 27039, 26421, 27044, 27047, 27046, 27045, 27049, 27048, 26422, 26962, 27054, 27053, 27057, 27056, 26423, 26424, 27061, 27060, 26915, 27063, 27062, 26733, 26657, 26429, 26431, 26807, 26425, 26791, 26810, 26750, 26426, 10412, 10413, 26758, 26839, 26756, 26708, 26795, 26484, 26818, 26753, 26752, 26751, 26551, 26845, 26736, 26735, 26485, 26427, 26488, 26487, 26680, 26716, 26663, 26428, 26657, 26429, 26431, 26737, 26719, 26738, 26791, 26810, 26739, 26750, 10446, 10447, 26813, 26839, 26742, 26836, 26795, 26436, 26818, 26753, 26751, 26734, 26551, 26845, 26612, 26613, 26447, 26661, 26430, 26488, 26487, 26432, 26716, 26715, 26663, 26805, 26746, 26733, 26431, 26719, 26807, 26810, 26739, 26750, 26515, 10481, 10482, 26758, 26813, 26757, 26722, 26814, 26484, 26818, 26753, 26752, 26751, 26437, 26537, 26438, 26448, 26447, 26675, 26674, 26736, 26762, 26486, 26485, 26488, 26487, 26432, 27164, 26746, 26733, 26786, 26433, 26807, 26434, 26810, 26750, 26809, 26748, 10520, 10521, 26758, 26813, 26742, 26435, 26795, 26436, 26818, 26753, 26752, 26751, 26551, 26437, 26673, 26438, 26613, 26675, 26674, 26736, 26762, 26485, 26439, 26680, 26488, 26440, 27169, 26442, 26441, 26444, 26443, 10555, 26830, 26829, 26828, 26719, 26807, 26546, 26545, 26666, 10564, 10565, 26758, 26547, 26684, 26534, 26549, 26445, 26842, 26844, 26669, 26537, 26446, 26612, 26448, 26447, 26674, 26449, 26554, 26555, 26558, 26557, 10588, 26829, 26664, 26828, 26450, 26681, 26546, 26508, 26666, 10597, 10598, 26758, 26547, 26684, 26534, 26550, 26549, 26844, 26669, 26842, 26552, 26551, 26613, 26452, 26451, 26674, 26553, 26555, 26554, 26558, 26557, 26454, 26453, 26456, 26455, 27032, 27031, 27035, 27034, 26457, 10653, 10654, 26459, 26458, 26463, 26462, 26461, 26460, 26465, 26464, 26469, 26468, 26467, 26466, 26472, 26471, 26470, 10708, 10709, 26474, 26473, 26475, 26675, 26674, 26476, 10733, 26479, 26478, 26477, 10737, 26480, 26482, 26481, 26483, 10752, 26795, 26484, 26551, 26845, 26612, 26673, 26613, 26486, 26485, 26680, 26488, 26487, 10768, 10769, 26490, 26489, 26493, 26492, 26491, 26494, 26496, 26495, 26497, 26499, 26498, 26500, 10793, 26503, 26502, 26501, 26504, 26611, 10800, 26505, 10802, 26532, 26506, 26533, 26508, 26507, 10808, 10809, 26535, 26548, 26547, 26509, 26511, 26510, 26818, 26844, 26687, 26670, 26538, 26539, 10822, 26673, 26672, 26671, 26850, 26617, 26512, 26544, 26514, 26513, 26611, 26830, 26829, 10835, 26719, 26807, 26546, 26533, 26515, 10841, 10842, 26758, 26813, 26839, 26838, 26550, 26549, 26818, 26816, 26817, 26552, 26551, 26689, 26853, 26612, 26693, 26691, 26851, 26617, 26517, 26516, 26519, 26518, 26521, 26520, 26522, 10868, 26524, 26523, 26528, 26527, 26526, 26525, 26529, 26611, 10889, 26830, 26530, 26532, 26531, 26546, 26533, 26545, 10897, 10898, 26758, 26535, 26547, 26534, 26550, 26536, 26688, 26669, 26687, 26538, 26537, 26539, 26540, 26678, 26680, 26542, 26541, 26544, 26543, 26611, 26830, 26829, 10921, 26719, 26807, 26546, 26545, 26808, 10927, 10928, 26548, 26547, 26684, 26683, 26550, 26549, 26842, 26844, 26669, 26552, 26551, 26612, 26673, 26613, 26553, 26694, 26555, 26554, 26556, 26558, 26557, 26559, 26560, 26562, 26561, 26702, 26565, 26564, 26563, 26567, 26566, 26873, 26640, 26872, 26568, 26572, 26571, 26570, 26569, 26574, 26573, 26576, 26575, 26580, 26579, 26578, 26577, 26583, 26582, 26581, 11022, 11023, 11024, 11025, 26585, 26584, 26589, 26588, 26587, 26586, 26592, 26591, 26590, 11035, 11036, 11037, 11038, 26594, 26593, 26597, 26596, 26595, 11044, 11045, 26599, 26598, 26602, 26601, 26600, 27265, 26605, 26604, 26603, 27267, 26607, 26606, 26610, 26609, 26608, 26611, 26830, 26829, 11143, 26832, 26831, 26834, 26833, 26641, 11149, 11150, 26758, 26813, 26839, 26838, 26815, 26814, 26842, 26844, 26843, 26845, 26645, 26676, 26853, 11164, 26612, 26673, 26613, 26851, 26850, 26617, 26614, 25950, 26611, 26829, 11177, 26664, 26832, 26831, 26834, 26833, 26641, 11184, 11185, 26758, 26839, 26838, 26756, 26795, 26815, 26842, 26844, 26843, 26846, 26845, 26676, 26853, 11199, 26613, 26612, 26673, 26851, 26850, 26617, 26614, 25953, 26718, 26665, 26657, 26737, 26807, 26806, 26810, 26616, 26808, 11219, 11220, 26813, 26839, 26794, 26812, 26795, 26815, 26816, 26817, 26798, 26819, 26846, 26693, 26692, 26691, 26823, 26800, 26689, 11238, 26801, 26614, 27288, 26805, 26746, 26718, 26804, 26682, 26615, 26666, 26616, 26658, 11252, 26792, 26794, 26812, 26793, 26713, 26796, 26795, 26799, 26711, 26797, 26819, 26846, 26693, 26692, 26691, 26823, 26800, 26689, 11271, 26801, 26617, 27292, 26619, 26618, 11278, 26621, 26620, 26622, 26624, 26623, 26625, 26627, 26626, 11287, 26629, 26628, 26630, 26632, 26631, 26633, 26636, 26635, 26634, 26638, 26637, 11299, 26639, 11301, 26707, 26640, 26805, 26746, 26718, 26804, 26807, 26682, 26791, 26834, 26641, 11317, 11318, 26758, 26684, 26713, 26722, 26686, 26685, 26842, 26818, 26688, 26819, 26846, 26693, 26648, 26647, 26650, 26649, 26651, 26853, 11337, 26642, 11339, 11340, 11341, 11342, 26718, 26804, 26787, 26709, 26643, 26788, 26791, 26644, 26835, 11352, 26792, 26758, 26813, 26839, 26684, 26686, 26685, 26818, 26688, 26842, 26819, 26645, 26648, 26647, 26646, 26650, 26649, 26651, 26853, 11372, 26652, 11374, 11375, 11376, 11377, 26654, 26653, 11380, 11381, 11382, 11383, 11384, 26655, 26863, 11387, 11388, 11389, 11390, 26656, 26873, 26746, 26733, 26786, 26657, 26719, 26807, 26791, 26739, 26750, 26658, 11403, 11404, 26818, 26753, 26752, 26751, 26755, 26721, 26758, 26839, 26837, 26659, 26760, 26660, 26736, 26762, 26764, 26763, 26767, 26766, 26765, 26662, 26661, 26772, 26771, 26744, 26716, 26715, 26663, 26829, 26805, 26665, 26664, 26807, 26832, 26667, 26833, 26666, 11447, 11448, 26813, 26839, 26684, 26683, 26668, 26723, 26842, 26688, 26669, 26670, 26845, 26673, 26672, 26671, 26675, 26674, 26676, 26679, 26678, 26680, 26697, 11470, 11471, 11472, 26805, 26746, 26718, 26804, 26682, 26681, 26835, 26834, 26833, 26792, 11483, 26813, 26839, 26684, 26683, 26686, 26685, 26688, 26687, 26843, 26819, 26846, 26689, 26690, 11497, 26693, 26692, 26691, 26695, 26694, 26697, 26696, 11505, 11506, 11507, 11508, 11509, 11510, 26698, 11512, 11513, 11514, 11515, 26699, 26701, 26700, 26703, 26702, 11521, 11522, 11523, 11524, 11525, 11526, 11527, 26704, 26705, 11530, 26707, 26706, 26718, 26709, 26717, 26745, 26747, 26738, 26791, 26720, 26710, 26749, 11559, 11560, 26753, 26752, 26711, 26740, 26755, 26721, 26839, 26713, 26741, 26708, 26760, 26759, 26767, 26766, 26765, 26769, 26768, 26771, 26770, 26716, 26715, 26714, 26718, 26709, 26717, 26745, 26747, 26738, 26791, 26720, 26710, 26749, 11593, 11594, 26753, 26752, 26711, 26740, 26755, 26721, 26839, 26742, 26713, 26712, 26760, 26759, 26767, 26766, 26765, 26769, 26768, 26772, 26716, 26715, 26714, 26805, 26718, 26733, 26717, 26719, 26831, 26791, 26810, 26739, 26720, 11626, 11627, 26818, 26753, 26752, 26740, 26755, 26721, 26813, 26741, 26757, 26722, 26759, 26723, 26762, 26736, 26764, 26763, 26771, 26744, 26772, 26726, 26725, 26724, 26727, 11651, 26729, 26728, 26732, 26731, 26730, 26805, 26733, 26786, 26802, 26807, 26747, 26739, 26750, 26749, 26809, 11674, 11675, 26818, 26753, 26740, 26734, 26755, 26754, 26813, 26839, 26742, 26741, 26760, 26759, 26736, 26735, 26764, 26763, 26771, 26744, 26772, 11695, 11696, 11697, 26805, 26786, 26802, 26737, 26747, 26738, 26739, 26750, 26749, 26809, 11708, 11709, 26818, 26753, 26752, 26740, 26755, 26754, 26813, 26839, 26742, 26741, 26760, 26759, 26767, 26766, 26765, 26769, 26743, 26771, 26744, 26772, 11730, 11731, 11732, 26805, 26746, 26786, 26745, 26807, 26747, 26791, 26750, 26749, 26748, 11743, 11744, 26818, 26753, 26752, 26751, 26755, 26754, 26758, 26839, 26757, 26756, 26760, 26759, 26762, 26761, 26764, 26763, 26767, 26766, 26765, 26769, 26768, 26772, 26771, 26770, 11769, 11770, 11771, 11772, 11773, 11774, 26774, 26773, 26776, 26775, 26779, 26778, 26777, 11782, 11783, 11784, 11785, 11786, 26780, 26782, 26781, 26784, 26783, 26805, 26787, 26786, 26785, 26807, 26788, 26791, 26790, 26789, 11813, 11814, 26813, 26794, 26812, 26793, 26796, 26795, 26818, 26816, 26799, 26819, 26846, 26822, 26821, 26820, 26800, 26824, 26801, 26827, 26826, 26825, 26805, 26787, 26786, 26785, 26807, 26788, 26791, 26790, 26789, 11845, 26792, 26813, 26794, 26812, 26793, 26796, 26795, 26799, 26798, 26797, 26819, 26846, 26822, 26821, 26820, 26800, 26824, 26801, 26826, 26825, 26827, 26805, 26804, 26803, 26802, 26807, 26806, 26810, 26809, 26808, 11877, 11878, 26813, 26839, 26812, 26811, 26815, 26814, 26818, 26817, 26816, 26819, 26846, 26822, 26821, 26820, 26823, 26824, 11895, 26827, 26826, 26825, 27397, 26830, 26829, 11903, 26828, 26832, 26831, 26835, 26834, 26833, 11910, 11911, 26839, 26838, 26837, 26836, 26841, 26840, 26844, 26843, 26842, 26846, 26845, 26849, 26848, 26847, 26851, 26850, 26852, 26853, 11930, 26855, 26854, 27403, 26857, 26856, 11938, 26859, 26858, 26860, 26862, 26861, 26863, 26866, 26865, 26864, 11948, 26869, 26868, 26867, 26870, 26871, 11954, 26873, 26872, 27024, 27023, 27022, 27021, 27026, 27025, 27030, 27029, 27028, 27027, 26875, 26874, 27038, 27037, 27036, 11994, 11995, 11996, 11997, 26879, 26878, 26877, 26876, 27049, 27048, 27057, 26880, 27056, 26881, 26883, 26882, 26887, 26886, 26885, 26884, 26888, 26890, 26889, 26891, 26892, 26893, 26895, 26894, 26897, 26896, 27425, 26899, 26898, 27427, 26903, 26902, 26901, 26900, 26905, 26904, 26909, 26908, 26907, 26906, 26911, 26910, 26914, 26913, 26912, 27061, 27060, 26915, 26917, 26916, 12110, 12111, 27435, 26921, 26920, 26919, 26918, 27044, 27043, 26925, 26924, 26923, 26922, 26927, 26926, 26931, 26930, 26929, 26928, 26933, 26932, 26937, 26936, 26935, 26934, 26939, 26938, 26943, 26942, 26941, 26940, 26945, 26944, 26948, 26947, 26946, 27441, 26951, 26950, 26949, 27443, 26954, 26953, 26952, 12169, 12170, 26958, 26957, 26956, 26955, 26960, 26959, 27047, 27046, 27045, 26961, 27052, 26962, 27054, 27053, 26966, 26965, 26964, 26963, 26968, 26967, 26971, 26970, 26969, 26973, 26972, 26974, 26978, 26977, 26976, 26975, 26979, 26983, 26982, 26981, 26980, 26985, 26984, 26988, 26987, 26986, 26990, 26989, 26993, 26992, 26991, 26995, 26994, 26997, 26996, 26999, 26998, 27003, 27002, 27001, 27000, 27005, 27004, 27009, 27008, 27007, 27006, 27011, 27010, 27012, 27014, 27016, 27015, 27018, 27017, 27019, 27063, 27062, 27024, 27023, 27022, 27021, 27026, 27025, 27030, 27029, 27028, 27027, 27032, 27031, 27035, 27034, 27033, 12331, 12332, 27038, 27037, 27036, 12336, 12337, 27042, 27041, 27040, 27039, 27044, 27043, 27047, 27046, 27045, 27049, 27048, 27052, 27051, 27050, 27054, 27053, 27057, 27056, 27055, 27058, 27061, 27060, 27059, 27063, 27062, 12423, 12424, 12425, 12426, 27470, 27352, 27351, 27120, 27350, 27473, 27323, 27322, 27361, 27360, 27476, 27117, 27116, 27115, 27478, 27352, 27351, 27120, 27350, 27480, 12598, 12599, 12600, 12601, 27487, 27490, 27492, 12621, 27452, 21455, 27454, 27453, 27497, 27499, 27132, 27420, 27501, 27503, 27505, 27507, 27134, 27133, 21436, 27509, 27143, 27137, 27136, 27511, 27513, 27516, 27519, 27521, 12672, 21455, 21436, 27526, 27528, 12692, 27452, 21455, 27454, 27422, 26138, 27421, 27420, 12712, 12713, 12717, 27461, 27417, 27460, 27147, 27540, 12727, 27542, 27418, 27545, 27547, 12745, 27452, 21455, 27454, 27422, 27552, 27455, 27421, 27555, 27557, 27559, 27561, 27142, 27141, 27563, 27565, 27143, 27145, 27144, 21436, 27567, 27570, 12800, 12801, 12804, 27461, 27417, 27460, 27147, 27578, 12815, 27580, 27464, 27583, 27189, 27187, 27171, 27186, 27586, 27148, 27189, 27188, 27187, 27589, 12874, 12875, 27594, 12878, 12879, 27598, 27455, 12890, 12891, 12895, 27203, 27202, 12899, 27452, 27417, 12902, 27607, 27149, 27609, 27611, 27613, 27615, 27617, 27619, 27621, 27623, 27625, 27627, 27629, 27452, 27454, 27422, 27633, 27635, 27455, 27423, 12960, 27638, 27156, 27155, 12967, 27641, 27217, 27216, 27215, 27189, 27187, 27171, 27186, 26232, 27185, 27184, 27183, 27182, 27189, 27188, 27187, 27186, 26235, 13071, 27261, 27190, 27419, 13075, 27647, 27191, 13088, 27649, 13091, 27262, 27194, 13096, 27461, 27195, 13099, 27657, 27439, 27198, 27197, 27196, 13107, 13108, 27661, 27431, 13119, 13120, 13123, 27452, 27417, 13128, 27669, 27199, 13139, 13140, 13144, 27203, 27202, 13148, 27677, 27204, 27210, 27209, 27208, 27207, 27230, 27229, 27228, 27212, 27217, 27216, 27215, 27231, 27230, 27229, 27228, 27231, 27230, 27229, 27228, 27241, 27240, 27239, 27238, 27684, 27245, 27244, 27243, 27242, 27686, 27688, 27690, 27692, 27694, 27246, 27261, 27419, 13313, 27428, 27248, 27247, 13317, 13319, 27249, 13333, 27701, 13338, 27704, 27262, 27261, 27260, 13342, 27461, 27417, 27452, 13346, 13349, 27709, 27263, 27712, 27714, 13369, 27716, 27270, 27269, 27268, 13373, 27428, 27272, 27271, 13377, 27721, 27723, 27273, 27410, 27409, 27297, 27408, 27725, 27352, 27351, 27350, 27349, 27728, 27323, 27322, 27731, 27352, 27351, 27350, 27349, 27733, 27361, 27360, 27736, 27387, 27386, 27385, 27738, 27411, 27410, 27409, 27408, 27740, 13605, 13608, 27417, 27416, 27745, 13615, 27747, 27418, 27464, 27750, 13631, 27452, 27419, 27453, 27755, 27757, 27421, 27420, 27759, 13656, 27452, 27454, 27422, 27764, 27766, 27423, 27768, 13681, 27428, 27771, 27430, 27429, 21715, 13688, 27431, 27455, 27776, 27778, 27437, 27436, 21715, 13712, 27439, 27783, 27785, 27447, 27446, 27787, 27789, 27448, 27450, 27449, 27791, 27793, 27451, 27795, 13757, 27452, 27454, 27453, 27800, 27802, 27455, 13775, 27805, 27461, 27460, 21739, 13785, 27807, 27464, 27463, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 9656, 9657, 9664, 9665, 9666, 9667, 9668, 9669, 9670, 9671, 9672, 9673, 9674, 9675, 9676, 27858, 9679, 9680, 9681, 9682, 9683, 9684, 9685, 9686, 9687, 9688, 9689, 9690, 9691, 9692, 9693, 9694, 9695, 9696, 9697, 27879, 9700, 9701, 9702, 9703, 9704, 9705, 9706, 9707, 9708, 9709, 9710, 9711, 9712, 27894, 9715, 9716, 9717, 9718, 9719, 9720, 9721, 9722, 9723, 9724, 9725, 9726, 9727, 9728, 9729, 9730, 9731, 9732, 9733, 9734, 9735, 27917, 9738, 9739, 9740, 9741, 9742, 9743, 9744, 9745, 9746, 9747, 9748, 9749, 9750, 9752, 9753, 9754, 9755, 9756, 9757, 9758, 9759, 9760, 9761, 9762, 9763, 9764, 9765, 9766, 9767, 27949, 9770, 9771, 27953, 9774, 9775, 9776, 9777, 9778, 9779, 9780, 9781, 9782, 9783, 9784, 9785, 9786, 9787, 9789, 9790, 9791, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9802, 9803, 9804, 27986, 9807, 9808, 27990, 9811, 9812, 9813, 9814, 9815, 9816, 9817, 9818, 9819, 9820, 9821, 9822, 9823, 9824, 28006, 9827, 9828, 9829, 9830, 9831, 9832, 9833, 9834, 9835, 9836, 9837, 9838, 9839, 9840, 9841, 28023, 9844, 9845, 28027, 9848, 9849, 9850, 9851, 9852, 9853, 9854, 9855, 9856, 9857, 9858, 9859, 9860, 9861, 28043, 9864, 9865, 9866, 9867, 9868, 9869, 9870, 9871, 9872, 9873, 9874, 9875, 9876, 9877, 9878, 9879, 9880, 9881, 9882, 28064, 9885, 9886, 9887, 9888, 9889, 9890, 9891, 9896, 9897, 9898, 9899, 9900, 9901, 9902, 9903, 9904, 9905, 28083, 9908, 9909, 9910, 9911, 9912, 9913, 9914, 9915, 9916, 9917, 9918, 9919, 9920, 9921, 9922, 9923, 9924, 9925, 9926, 9927, 9928, 9929, 9930, 9931, 25731, 9935, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9944, 28120, 9947, 9948, 9949, 9950, 9951, 9952, 9953, 9954, 9955, 9956, 9957, 9958, 9959, 9960, 9961, 9962, 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 25734, 9974, 9975, 9976, 9977, 9978, 9979, 9980, 9981, 9982, 9983, 28157, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 28182, 10012, 10013, 10014, 10015, 10016, 10017, 10018, 10019, 10020, 10021, 28195, 10024, 10025, 10026, 10027, 10028, 10029, 10030, 10031, 10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044, 10045, 28219, 28222, 10052, 10053, 10065, 10066, 10067, 10069, 10070, 10071, 10073, 10074, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 28246, 10096, 10097, 10098, 10099, 10100, 10101, 10102, 10103, 10104, 10105, 10106, 10107, 10109, 10110, 10111, 10112, 10113, 10114, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142, 10143, 10144, 10145, 10146, 10149, 10150, 10151, 10152, 10153, 10154, 27131, 10210, 10211, 10212, 10213, 10225, 10226, 10227, 10228, 10229, 10230, 10287, 10288, 10289, 10290, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10319, 10320, 10339, 10340, 10341, 10342, 10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 27151, 10357, 10358, 10359, 28349, 10362, 10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10380, 10381, 10382, 10383, 10384, 10385, 10386, 10387, 10388, 10402, 10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 28385, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422, 10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442, 10443, 10444, 10445, 28419, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462, 10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 28454, 10483, 10484, 10485, 10486, 10487, 10488, 10489, 10490, 10491, 10492, 10493, 10494, 10495, 10496, 10497, 10498, 10499, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 27165, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10517, 10518, 10519, 28491, 10522, 10523, 10524, 10525, 10526, 10527, 10528, 10529, 10530, 10531, 10532, 10533, 10534, 10535, 10536, 10537, 10538, 10539, 10540, 10541, 10542, 10543, 10544, 10545, 27170, 10549, 10550, 10551, 10552, 10556, 10557, 10558, 10559, 10560, 10561, 10562, 10563, 28531, 10566, 10567, 10568, 10569, 10570, 10571, 10572, 10573, 10574, 10575, 10576, 10577, 10578, 10579, 10580, 10581, 10582, 10583, 10585, 10586, 10589, 10590, 10591, 10592, 10593, 10594, 10595, 10596, 28562, 10599, 10600, 10601, 10602, 10603, 10604, 10605, 10606, 10607, 10608, 10609, 10610, 10611, 10612, 10613, 10614, 10615, 10616, 10618, 10619, 10629, 10630, 10631, 10632, 10648, 10649, 10650, 10651, 10652, 28593, 10655, 10656, 10673, 10674, 10675, 10676, 10677, 10678, 10701, 10702, 10703, 10704, 10705, 10706, 10707, 28610, 10710, 10711, 10712, 10730, 10731, 10732, 10734, 10735, 10736, 10738, 10749, 10750, 10751, 10756, 10757, 10758, 10759, 10760, 10761, 10762, 10763, 10764, 10765, 10766, 10767, 28640, 10770, 10771, 10772, 10773, 10774, 10786, 10787, 10788, 10789, 10790, 10791, 10792, 10794, 10795, 10796, 10797, 10799, 10801, 10803, 10804, 10805, 10806, 10807, 28668, 10810, 10811, 10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 10820, 10821, 10823, 10824, 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10834, 10836, 10837, 10838, 10839, 10840, 28701, 10843, 10844, 10845, 10846, 10847, 10848, 10849, 10850, 10851, 10852, 10853, 10854, 10855, 10856, 10857, 10858, 10859, 10860, 10861, 10862, 10863, 10864, 10865, 10866, 10867, 10869, 10870, 10871, 10872, 10873, 10874, 10875, 10888, 10890, 10891, 10892, 10893, 10894, 10895, 10896, 28745, 10899, 10900, 10901, 10902, 10903, 10904, 10905, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913, 10914, 10915, 10916, 10917, 10918, 10919, 10920, 10922, 10923, 10924, 10925, 10926, 28775, 10929, 10930, 10931, 10932, 10933, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 10941, 10942, 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10988, 10989, 10990, 10991, 10992, 10993, 10994, 10995, 11015, 11016, 11017, 11018, 11019, 11020, 11021, 28827, 28829, 11026, 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 28840, 28842, 11039, 11040, 11041, 11042, 11043, 28849, 11046, 11047, 11083, 11084, 11085, 11088, 11089, 11090, 11093, 11094, 11095, 11096, 11097, 11140, 11141, 11142, 11144, 11145, 11146, 11147, 11148, 28875, 11151, 11152, 11153, 11154, 11155, 11156, 11157, 11158, 11159, 11160, 11161, 11162, 11163, 11165, 11166, 11167, 11168, 11169, 11170, 11171, 25951, 11175, 11176, 11178, 11179, 11180, 11181, 11182, 11183, 28908, 11186, 11187, 11188, 11189, 11190, 11191, 11192, 11193, 11194, 11195, 11196, 11197, 11198, 11200, 11201, 11202, 11203, 11204, 11205, 11206, 25954, 11210, 11211, 11212, 11213, 11214, 11215, 11216, 11217, 11218, 28941, 11221, 11222, 11223, 11224, 11225, 11226, 11227, 11228, 11229, 11230, 11231, 11232, 11233, 11234, 11235, 11236, 11237, 11239, 11240, 11243, 11244, 11245, 11246, 11247, 11248, 11249, 11250, 11251, 11253, 11254, 11255, 11256, 11257, 11258, 11259, 11260, 11261, 11262, 11263, 11264, 11265, 11266, 11267, 11268, 11269, 11270, 11272, 11273, 11276, 11277, 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, 11296, 11297, 11298, 11300, 11302, 11303, 11308, 11309, 11310, 11311, 11312, 11313, 11314, 11315, 11316, 29033, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11338, 29055, 29057, 11343, 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11353, 11354, 11355, 11356, 11357, 11358, 11359, 11360, 11361, 11362, 11363, 11364, 11365, 11366, 11367, 11368, 11369, 11370, 11371, 11373, 29090, 29092, 11378, 11379, 29096, 29098, 11385, 11386, 29103, 11391, 11392, 11393, 11394, 11395, 11396, 11397, 11398, 11399, 11400, 11401, 11402, 29119, 11405, 11406, 11407, 11408, 11409, 11410, 11411, 11412, 11413, 11414, 11415, 11416, 11417, 11418, 11419, 11420, 11421, 11422, 11423, 11424, 11425, 11426, 11427, 11428, 11429, 11430, 11431, 11438, 11439, 11440, 11441, 11442, 11443, 11444, 11445, 11446, 29157, 11449, 11450, 11451, 11452, 11453, 11454, 11455, 11456, 11457, 11458, 11459, 11460, 11461, 11462, 11463, 11464, 11465, 11466, 11467, 11468, 11469, 29180, 11473, 11474, 11475, 11476, 11477, 11478, 11479, 11480, 11481, 11482, 11484, 11485, 11486, 11487, 11488, 11489, 11490, 11491, 11492, 11493, 11494, 11495, 11496, 11498, 11499, 11500, 11501, 11502, 11503, 11504, 29215, 29217, 29219, 11511, 29222, 29224, 11516, 11517, 11518, 11519, 11520, 29231, 29235, 11528, 11529, 11531, 11532, 11549, 11550, 11551, 11552, 11553, 11554, 11555, 11556, 11557, 11558, 29253, 11561, 11562, 11563, 11564, 11565, 11566, 11567, 11568, 11569, 11570, 11571, 11572, 11573, 11574, 11575, 11576, 11577, 11578, 11579, 11580, 11581, 11582, 11583, 11584, 11585, 11586, 11587, 11588, 11589, 11590, 11591, 11592, 29287, 11595, 11596, 11597, 11598, 11599, 11600, 11601, 11602, 11603, 11604, 11605, 11606, 11607, 11608, 11609, 11610, 11611, 11612, 11613, 11614, 11615, 11616, 11617, 11618, 11619, 11620, 11621, 11622, 11623, 11624, 11625, 29320, 11628, 11629, 11630, 11631, 11632, 11633, 11634, 11635, 11636, 11637, 11638, 11639, 11640, 11641, 11642, 11643, 11644, 11645, 11646, 11647, 11648, 11649, 11650, 11652, 11653, 11654, 11655, 11656, 11664, 11665, 11666, 11667, 11668, 11669, 11670, 11671, 11672, 11673, 29361, 11676, 11677, 11678, 11679, 11680, 11681, 11682, 11683, 11684, 11685, 11686, 11687, 11688, 11689, 11690, 11691, 11692, 11693, 11694, 29382, 11698, 11699, 11700, 11701, 11702, 11703, 11704, 11705, 11706, 11707, 29395, 11710, 11711, 11712, 11713, 11714, 11715, 11716, 11717, 11718, 11719, 11720, 11721, 11722, 11723, 11724, 11725, 11726, 11727, 11728, 11729, 29417, 11733, 11734, 11735, 11736, 11737, 11738, 11739, 11740, 11741, 11742, 29430, 11745, 11746, 11747, 11748, 11749, 11750, 11751, 11752, 11753, 11754, 11755, 11756, 11757, 11758, 11759, 11760, 11761, 11762, 11763, 11764, 11765, 11766, 11767, 11768, 29456, 29459, 11775, 11776, 11777, 11778, 11779, 11780, 11781, 29469, 29471, 11787, 11788, 11789, 11790, 11791, 11804, 11805, 11806, 11807, 11808, 11809, 11810, 11811, 11812, 29488, 11815, 11816, 11817, 11818, 11819, 11820, 11821, 11822, 11823, 11824, 11825, 11826, 11827, 11828, 11829, 11830, 11831, 11832, 11833, 11834, 11836, 11837, 11838, 11839, 11840, 11841, 11842, 11843, 11844, 11846, 11847, 11848, 11849, 11850, 11851, 11852, 11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11868, 11869, 11870, 11871, 11872, 11873, 11874, 11875, 11876, 29550, 11879, 11880, 11881, 11882, 11883, 11884, 11885, 11886, 11887, 11888, 11889, 11890, 11891, 11892, 11893, 11894, 11896, 11897, 11898, 11901, 11902, 11904, 11905, 11906, 11907, 11908, 11909, 29582, 11912, 11913, 11914, 11915, 11916, 11917, 11918, 11919, 11920, 11921, 11922, 11923, 11924, 11925, 11926, 11927, 11928, 11929, 11931, 11932, 27404, 11936, 11937, 11939, 11940, 11941, 11942, 11943, 11944, 11945, 11946, 11947, 11949, 11950, 11951, 11952, 11953, 11955, 11956, 11979, 11980, 11981, 11982, 11983, 11984, 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 29642, 29644, 11998, 11999, 12000, 12001, 12002, 12003, 12007, 12008, 12009, 12010, 12024, 12025, 12026, 12027, 12028, 12029, 12030, 12052, 12053, 12060, 12061, 12062, 12063, 12064, 12065, 12066, 12069, 12070, 12073, 12074, 12075, 12076, 12077, 12078, 12079, 12080, 12081, 12082, 12083, 12084, 12085, 12086, 12087, 12088, 12089, 12090, 12108, 12109, 29696, 12114, 12115, 12116, 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12161, 12162, 12163, 12166, 12167, 12168, 29740, 12171, 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12181, 12182, 12183, 12184, 12189, 12190, 12191, 12192, 12193, 12194, 12195, 12196, 12197, 12234, 12235, 12236, 12237, 12238, 12239, 12240, 12241, 12242, 12243, 12244, 12245, 12246, 12247, 12248, 12249, 12250, 12251, 12252, 12253, 12254, 12255, 12256, 12257, 12258, 12259, 12260, 12261, 12262, 12263, 12264, 12265, 12266, 12267, 12268, 12269, 12270, 12271, 12272, 12273, 12274, 12275, 12280, 12281, 12282, 12283, 12284, 12285, 12286, 12316, 12317, 12318, 12319, 12320, 12321, 12322, 12323, 12324, 12325, 12326, 12327, 12328, 12329, 12330, 29829, 12333, 12334, 12335, 29834, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345, 12346, 12347, 12348, 12349, 12350, 12351, 12352, 12353, 12357, 12358, 12359, 12360, 12361, 12362, 12363, 12364, 12365, 29861, 29863, 27471, 12450, 12451, 12452, 12453, 27474, 12503, 12504, 12505, 12506, 12539, 12540, 12541, 12564, 12565, 12566, 12567, 27481, 29885, 29887, 27488, 29890, 29891, 12623, 12624, 12625, 12626, 12631, 12632, 29901, 29903, 12652, 12653, 12654, 12657, 12658, 12659, 29915, 27523, 12675, 12676, 29920, 27530, 12695, 12696, 12697, 12698, 26139, 12703, 12704, 29930, 29931, 12719, 12720, 12721, 12722, 29937, 12728, 29941, 29942, 12747, 12748, 12749, 12750, 12756, 12757, 29951, 29953, 12777, 12778, 12783, 12784, 12785, 12786, 29965, 27575, 12807, 12808, 12809, 12810, 29972, 12816, 12840, 12841, 12842, 12843, 27587, 12867, 12868, 12869, 12870, 27590, 12882, 29994, 29995, 12897, 12898, 12900, 12901, 12905, 12942, 12944, 12945, 30019, 12951, 12952, 12965, 12966, 12996, 12997, 12998, 13019, 13020, 13021, 13022, 26233, 13040, 13041, 13042, 13043, 13064, 13065, 13066, 13067, 26236, 13072, 13073, 13074, 13078, 30052, 27652, 13094, 13095, 13097, 13098, 13102, 13104, 13105, 13106, 13111, 30071, 27665, 13126, 13127, 13131, 30079, 30080, 13146, 13147, 13151, 13163, 13164, 13165, 13166, 13188, 13189, 13190, 13191, 13205, 13206, 13207, 13229, 13230, 13231, 13232, 13255, 13256, 13257, 13258, 13279, 13280, 13281, 13282, 13285, 13286, 13287, 13288, 30116, 30118, 13310, 13311, 13312, 13314, 13315, 13316, 30127, 13321, 30129, 30131, 13339, 13340, 13341, 13343, 13344, 13345, 30141, 13350, 30145, 30146, 13370, 13371, 13372, 13374, 13375, 13376, 30157, 13382, 13420, 13421, 13422, 13423, 27726, 13454, 13455, 13456, 13457, 27729, 13472, 13473, 13496, 13497, 13498, 13499, 27734, 13525, 13526, 13552, 13553, 13554, 13591, 13592, 13593, 13594, 27741, 13609, 13610, 30194, 13616, 13617, 13632, 13634, 13635, 30204, 13641, 13642, 13657, 13659, 13660, 30213, 13666, 13682, 13685, 13686, 13687, 27773, 13691, 13692, 13708, 13709, 13710, 30230, 13714, 13730, 13731, 13736, 13737, 13738, 13743, 13758, 13760, 13761, 30250, 13767, 13780, 13781, 13782, 30257, 13786, 13787, 29913, 29912, 29963, 29962, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30273, 30276, 30278, 30280, 30282, 30284, 30286, 30289, 30291, 30293, 30295, 30297, 30299, 30301, 30305, 30309, 30312, 30314, 30316, 30318, 30320, 30323, 30325, 30327, 30329, 30331, 30333, 30335, 30338, 30340, 30342, 30345, 30348, 30350, 30352, 30354, 30356, 30357, 30359, 30361, 30363, 30365, 30367, 30369, 30371, 30375, 30379, 30382, 30384, 30386, 30388, 30390, 30391, 30393, 30395, 30397, 30399, 30401, 30403, 30405, 30409, 30413, 30416, 30418, 30420, 30422, 30424, 30427, 30429, 30431, 30433, 30435, 30437, 30439, 30443, 30447, 30450, 30452, 30454, 30456, 30458, 30461, 30463, 30465, 30467, 30469, 30471, 30473, 30477, 30481, 30484, 30486, 30488, 30490, 30492, 30494, 30496, 30499, 30501, 30503, 30505, 30507, 30509, 30511, 30514, 30516, 30518, 30520, 30524, 30526, 30528, 30530, 30532, 30535, 30537, 30539, 30541, 30543, 30545, 30547, 30550, 30552, 30554, 30556, 30560, 30562, 30564, 30566, 30568, 30571, 30573, 30575, 30577, 30579, 30581, 30583, 30586, 30588, 30590, 30592, 28183, 30595, 30597, 30599, 30601, 30603, 30606, 30608, 30610, 30612, 30614, 30616, 30618, 30621, 30623, 30625, 28220, 28223, 30630, 30632, 28229, 30636, 30638, 30640, 30642, 30644, 30646, 30650, 30652, 30654, 30656, 30659, 30662, 30666, 30668, 30670, 30672, 30674, 28277, 30678, 30680, 30682, 30684, 30687, 30691, 30695, 30698, 30701, 30704, 30706, 30708, 30710, 30712, 30714, 30716, 30719, 30722, 30724, 30726, 30728, 30730, 30732, 30734, 30736, 30738, 30740, 27152, 30744, 30748, 30750, 30752, 30754, 30757, 30759, 30761, 30763, 30767, 30770, 30772, 30774, 30776, 30778, 30780, 30783, 30785, 30787, 30789, 30791, 30793, 30795, 30797, 30799, 30802, 30805, 30807, 30809, 30811, 30813, 30816, 30818, 30820, 30822, 30824, 30826, 30828, 30831, 30833, 30836, 30839, 30841, 30843, 30845, 30847, 30850, 30852, 30854, 30856, 30858, 30860, 30862, 30865, 30867, 30869, 30871, 30875, 30877, 30879, 30881, 30883, 30886, 30888, 30890, 30892, 30894, 30896, 30898, 30901, 30903, 30905, 30907, 30911, 30913, 30914, 30916, 30918, 30920, 30924, 30926, 30928, 30930, 30933, 30935, 30938, 30940, 30942, 30943, 30945, 30947, 30949, 30953, 30955, 30957, 30959, 30962, 30964, 30967, 30969, 30971, 30973, 30975, 30977, 30979, 30983, 30985, 30987, 30989, 30991, 30993, 30995, 30999, 31002, 28617, 31005, 31007, 31009, 28626, 31012, 31014, 31016, 31019, 31021, 31025, 31027, 31031, 31034, 31037, 28659, 28661, 31043, 31045, 31049, 31051, 31053, 31055, 31058, 31061, 31065, 31067, 31070, 28694, 31073, 31075, 31079, 31081, 31083, 31085, 31088, 31092, 31096, 31099, 31101, 31104, 31106, 31108, 28736, 31112, 31114, 31116, 31120, 31122, 31124, 31126, 31129, 31132, 31134, 31137, 31139, 28768, 31142, 31144, 31148, 31150, 31152, 31154, 31157, 31159, 31162, 31164, 31167, 31171, 31173, 31175, 31177, 31179, 31181, 31183, 31185, 31187, 31189, 31191, 31193, 31195, 31198, 31200, 31202, 31204, 31206, 31209, 31211, 31213, 31217, 31219, 31222, 31225, 31227, 31230, 28868, 31233, 31235, 31239, 31241, 31243, 31245, 31248, 28889, 31252, 31255, 31257, 31260, 31261, 31263, 31265, 31269, 31271, 31273, 31275, 31278, 28922, 31282, 31285, 31287, 31290, 31292, 31294, 31296, 31300, 31302, 31304, 31306, 31309, 31311, 31314, 31316, 31319, 31321, 31323, 31325, 31327, 31329, 31331, 31333, 31335, 31338, 31340, 31343, 31345, 31348, 31350, 31353, 31356, 31358, 31361, 31364, 31367, 29020, 31370, 31372, 31374, 31376, 31378, 31382, 31384, 31386, 31388, 31391, 31393, 31396, 29052, 31401, 31403, 31405, 31407, 31409, 31411, 31413, 31415, 31417, 31419, 31422, 31424, 31427, 29087, 31432, 31434, 29099, 29104, 31441, 31443, 31445, 31447, 31449, 31451, 31454, 31456, 31458, 31460, 31462, 31464, 31466, 31468, 31470, 31473, 31475, 31478, 31481, 31483, 31485, 31487, 31491, 31493, 31495, 31497, 31500, 31502, 31505, 31508, 31510, 29181, 31513, 31515, 31517, 31519, 29192, 31523, 31525, 31527, 31529, 31532, 29206, 31536, 31539, 31541, 31543, 31547, 31550, 31552, 29232, 29236, 29239, 31558, 31560, 31562, 31564, 31566, 31568, 31571, 31573, 31575, 31577, 31579, 31581, 31583, 31586, 31588, 31590, 31593, 31595, 31597, 31599, 31601, 31604, 31606, 31608, 31610, 31612, 31614, 31616, 31619, 31622, 31625, 31627, 31629, 31631, 31633, 31636, 31638, 31640, 31642, 31644, 31646, 31648, 31650, 31652, 31655, 29344, 31659, 31661, 31664, 31666, 31668, 31670, 31672, 31675, 31677, 31679, 31681, 31683, 31685, 31687, 31689, 31691, 29383, 31695, 31697, 31699, 31701, 31703, 31706, 31708, 31710, 31712, 31714, 31716, 31718, 31721, 31723, 29418, 31727, 31729, 31731, 31733, 31735, 31738, 31740, 31742, 31744, 31746, 31748, 31750, 31752, 31754, 31757, 31759, 29457, 29460, 31764, 31766, 31768, 31771, 31772, 31774, 31776, 31778, 31780, 31782, 31784, 31788, 31790, 31792, 31794, 31797, 31799, 31805, 31808, 31810, 31812, 31814, 31816, 31818, 31820, 31822, 31824, 31827, 31829, 31835, 31838, 31840, 31842, 31844, 31848, 31850, 31852, 31854, 31857, 31859, 31864, 31867, 31868, 31870, 31872, 31876, 31878, 31880, 31882, 31885, 31887, 31890, 29601, 31894, 31897, 31899, 31902, 31905, 31908, 29623, 31913, 31915, 31917, 31919, 31921, 31923, 31925, 31927, 31932, 31934, 31936, 31938, 31942, 31944, 31946, 31949, 31954, 31956, 31958, 31960, 31962, 31964, 31966, 31968, 31970, 31972, 31975, 31978, 31981, 31983, 31985, 31987, 31989, 31991, 31993, 31995, 31997, 31999, 32001, 32003, 32005, 32007, 32009, 32011, 32014, 32017, 32021, 32023, 32025, 32027, 32031, 32033, 32035, 32037, 32039, 32041, 32044, 32047, 32049, 32052, 32054, 32056, 32058, 32061, 32063, 32066, 32068, 32070, 32072, 32074, 32076, 32078, 32080, 32082, 32086, 32088, 32091, 32093, 32095, 32097, 32099, 32101, 32103, 32105, 32109, 32113, 32115, 32117, 32119, 32122, 32124, 32127, 32129, 32133, 32136, 30660, 30688, 32138, 31435, 32141, 32143, 32146, 32148, 32150, 31544, 32153, 32155, 30660, 30688, 32158, 32083, 27495, 32165, 32167, 32171, 32175, 27524, 32083, 27531, 32185, 32188, 27538, 32192, 32194, 32083, 27550, 32202, 32204, 32208, 32211, 27576, 32216, 32218, 31029, 31089, 32222, 32224, 31059, 31089, 32227, 32229, 27603, 32235, 32237, 32083, 32241, 32244, 32246, 32248, 31059, 31089, 32251, 32253, 32256, 32258, 31059, 31089, 32260, 32262, 32265, 27653, 32271, 32273, 32276, 27666, 32282, 27674, 32287, 32290, 32292, 31029, 31089, 32294, 32296, 32298, 31029, 31089, 32301, 32303, 31059, 31089, 32305, 32307, 31435, 32309, 32311, 32313, 32315, 32319, 32322, 27699, 32329, 32332, 32083, 32339, 32342, 31317, 31346, 32347, 32349, 31435, 32352, 32354, 32357, 31544, 32359, 32361, 32364, 32366, 31802, 31832, 31862, 32369, 32371, 32374, 32377, 32083, 32380, 32383, 32083, 32386, 32391, 27774, 32395, 32397, 27781, 32402, 32405, 32083, 32409, 32413, 32417, 32162, 29907, 13860, 13861, 32389, 32182, 32195, 32199, 29957, 13896, 13897, 32219, 29988, 29991, 30002, 30004, 32389, 32378, 30237, 30242, 32239, 30050, 30061, 30068, 30076, 30084, 32334, 32344, 32378, 32384, 32387, 32389, 30237, 30242, 32407, 32410, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32451, 32454, 32456, 32459, 30302, 30310, 32465, 32468, 32470, 32473, 30336, 30346, 32481, 32484, 32487, 32490, 30372, 30380, 32496, 32499, 32502, 32505, 30406, 30414, 32511, 32514, 32516, 32519, 30440, 30448, 32525, 32528, 32530, 32533, 30474, 30482, 32541, 32544, 32546, 32549, 30512, 30521, 32557, 32560, 32562, 32565, 30548, 30557, 32573, 32576, 32578, 32581, 30584, 32590, 32593, 32595, 32598, 30619, 32612, 30647, 32616, 30657, 30663, 32623, 30675, 32628, 30685, 30692, 30699, 32639, 30720, 32648, 32651, 30741, 30745, 32657, 30755, 30764, 30768, 32667, 32670, 32672, 32675, 30800, 30803, 32682, 32685, 32687, 32690, 30829, 30834, 30837, 32697, 32700, 32702, 32705, 30863, 30872, 32713, 32716, 32718, 32721, 30899, 30908, 32731, 30921, 32735, 30931, 30936, 32744, 30950, 32748, 30960, 30965, 30980, 32762, 32765, 30996, 31006, 31017, 31022, 31028, 31038, 32785, 31046, 32789, 31056, 31062, 31068, 32797, 31076, 32801, 31086, 31093, 31097, 32811, 32813, 31117, 32817, 31127, 31135, 32825, 31145, 32829, 31155, 31160, 32839, 32842, 32844, 32848, 31196, 32853, 31207, 31214, 31220, 31223, 31228, 32864, 31236, 32868, 31246, 31253, 32877, 31266, 32881, 31276, 31283, 32890, 31297, 32894, 31307, 31312, 32902, 31326, 32907, 31336, 31341, 31365, 32925, 31379, 32929, 31389, 31394, 32938, 31410, 32943, 31420, 31425, 32956, 32959, 32961, 32964, 31471, 31476, 31479, 32973, 31488, 32977, 31498, 31503, 32987, 31520, 32992, 31530, 31537, 33009, 33012, 33014, 33017, 31584, 31591, 33024, 33027, 33029, 33032, 31617, 31623, 33038, 33041, 33043, 33046, 31653, 31656, 31662, 33056, 33059, 33061, 33064, 31692, 33071, 33074, 33076, 33079, 31719, 31724, 33086, 33089, 33091, 33094, 31755, 31760, 31769, 33111, 31785, 33115, 31795, 31800, 31806, 33122, 31815, 33127, 31825, 31830, 31836, 33134, 31845, 33138, 31855, 31860, 31865, 33145, 31873, 33149, 31883, 31888, 31906, 31909, 33165, 33168, 31928, 33172, 31939, 33177, 33183, 33186, 31973, 31976, 33192, 33195, 33198, 33201, 33204, 32012, 32015, 32018, 33210, 32028, 33216, 32042, 33221, 33223, 32059, 32064, 33232, 33235, 33241, 33244, 32106, 32110, 33249, 32120, 32125, 32130, 32134, 12401, 32621, 12408, 32633, 30696, 32635, 32729, 32728, 31506, 32951, 31533, 32999, 32952, 12445, 32837, 33005, 33004, 32840, 33263, 32462, 32477, 32493, 32508, 32522, 32536, 33102, 33106, 33108, 33265, 32553, 32569, 32585, 32587, 32602, 30626, 32605, 32151, 31506, 32984, 31533, 32999, 33001, 12559, 32837, 33005, 33004, 33108, 33269, 12576, 32621, 12583, 32633, 30696, 32635, 32729, 32728, 33219, 33229, 12613, 32089, 33213, 33219, 33229, 12685, 32089, 33237, 33213, 33286, 33219, 33229, 12737, 32089, 33237, 33213, 33213, 33295, 12825, 12831, 33158, 33157, 32809, 32922, 33299, 12852, 12858, 33158, 33157, 33159, 33162, 33303, 33213, 32729, 32728, 33159, 33219, 33229, 12934, 32089, 33237, 32661, 32677, 32709, 32725, 32249, 13004, 13011, 32729, 32728, 33315, 32742, 32741, 32755, 32754, 33317, 13049, 13056, 33157, 32808, 33321, 32266, 33213, 32277, 33213, 33213, 32966, 33102, 33106, 32840, 33332, 13173, 13180, 33157, 32808, 33336, 32966, 31023, 33106, 33108, 32299, 13214, 13221, 33157, 32808, 33341, 13240, 13247, 33157, 32808, 33345, 31130, 32836, 32835, 32952, 13274, 32953, 33005, 33348, 33350, 33219, 33229, 32320, 32323, 32850, 32855, 33213, 32330, 32333, 33219, 33229, 13360, 32089, 33237, 32340, 32343, 31249, 32875, 31279, 32888, 31315, 13403, 31344, 13410, 32915, 32914, 32916, 32918, 32917, 32919, 32922, 33362, 31397, 31399, 31428, 31430, 31506, 32951, 32952, 13449, 33002, 33005, 32953, 33006, 33365, 32966, 33102, 33106, 33108, 31506, 32984, 31533, 32999, 33001, 13491, 33002, 33005, 33004, 33006, 33369, 33048, 33102, 33106, 33108, 33066, 33096, 33102, 33106, 33108, 32367, 13561, 13568, 13575, 31891, 33156, 33158, 33157, 33159, 33162, 33376, 33213, 33219, 33229, 13626, 32089, 33237, 33219, 33229, 13650, 32089, 33237, 33219, 33181, 33180, 33213, 33213, 33219, 33229, 13751, 32089, 33237, 33260, 33272, 33275, 13851, 29897, 33277, 13858, 33278, 33398, 33384, 13867, 33385, 33282, 13874, 27533, 13881, 33289, 13887, 27553, 33291, 13894, 33292, 33405, 13903, 13942, 13949, 33306, 33305, 13956, 33325, 33324, 13963, 33366, 33370, 33384, 14030, 33385, 33380, 14037, 32381, 33387, 33388, 33389, 14050, 33390, 14052, 33308, 14058, 32242, 33310, 32415, 33377, 32375, 14116, 33325, 33324, 14123, 14130, 33328, 14136, 33330, 14142, 33353, 14196, 14203, 33366, 33370, 33377, 32375, 33380, 14277, 32381, 33383, 14284, 14285, 33384, 14291, 33385, 33387, 33388, 33389, 14304, 33390, 14306, 33392, 14312, 14313, 33393, 32415, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33499, 33498, 33501, 33500, 33502, 12402, 33504, 33503, 33506, 33505, 33507, 12409, 33701, 33700, 33703, 33702, 33508, 12415, 12416, 12417, 12418, 32809, 33617, 33705, 32773, 33636, 33635, 33638, 33637, 12434, 33639, 12436, 33641, 33640, 33643, 33642, 33644, 12442, 12443, 12444, 12446, 12447, 12448, 12449, 33441, 33440, 33443, 33442, 12461, 33444, 30307, 33447, 33446, 33449, 33448, 12468, 33450, 30343, 33453, 33452, 33455, 33454, 12475, 33456, 30377, 33459, 33458, 33461, 33460, 12482, 33462, 30411, 33465, 33464, 33467, 33466, 12489, 33468, 30445, 33471, 33470, 33473, 33472, 12496, 33474, 30479, 12499, 32538, 12501, 12502, 33477, 33476, 33479, 33478, 12513, 33480, 33481, 33483, 33482, 33485, 33484, 12520, 33486, 33487, 33489, 33488, 33491, 33490, 12527, 33492, 12529, 33494, 33493, 33496, 33495, 12534, 33497, 12536, 12537, 32779, 33636, 33635, 33638, 33637, 12548, 33639, 12550, 33641, 33640, 33643, 33642, 12555, 33644, 12557, 12558, 12560, 12561, 12562, 12563, 33499, 33498, 33501, 33500, 33502, 12577, 33504, 33503, 33506, 33505, 33507, 12584, 33701, 33700, 33703, 33702, 33508, 12590, 12591, 12592, 12593, 32809, 33617, 33705, 32773, 12605, 33729, 33730, 33731, 12609, 33732, 33733, 33734, 33715, 12619, 33719, 33720, 33555, 33722, 33723, 33724, 33509, 12640, 33726, 33716, 33718, 12677, 33730, 33729, 33731, 12681, 33732, 33733, 33596, 12690, 12691, 33707, 33708, 33709, 33554, 33710, 12710, 33726, 33716, 33718, 12729, 33730, 33712, 33731, 12733, 33732, 33733, 33596, 12742, 12743, 33720, 33719, 33721, 33724, 33722, 33723, 33509, 12765, 33726, 33716, 33727, 33556, 33708, 33709, 33554, 33710, 12798, 33726, 33716, 33718, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33510, 12834, 12835, 12836, 33705, 33562, 12839, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33510, 12861, 12862, 12863, 33706, 33705, 12866, 33556, 33708, 33593, 33724, 33725, 33726, 12889, 33716, 33727, 12908, 12909, 12910, 33730, 33729, 12929, 33731, 12931, 33732, 33733, 33734, 12938, 12939, 33511, 33512, 33514, 33513, 33515, 12958, 33516, 33518, 33517, 33520, 33519, 33522, 33521, 12974, 33523, 33526, 33525, 33528, 33527, 33529, 33530, 33533, 33532, 33535, 33534, 12986, 33536, 33537, 33539, 33538, 33541, 33540, 12993, 33542, 33543, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13013, 13014, 32809, 33617, 33705, 32922, 33545, 33544, 33547, 33546, 33548, 13031, 13032, 33550, 33549, 33552, 33551, 33553, 13038, 13039, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13058, 13059, 32757, 33705, 33562, 32922, 33707, 33708, 33709, 33554, 33710, 13084, 33726, 33716, 33718, 33555, 33707, 33708, 33724, 33593, 33725, 33726, 13118, 33716, 33718, 33556, 33708, 33593, 33724, 33725, 13137, 33726, 33716, 33718, 33629, 33628, 33630, 33631, 13156, 33559, 33560, 13159, 32779, 13161, 13162, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13182, 13183, 32809, 33705, 33562, 32773, 33629, 33628, 33630, 33631, 13198, 33559, 33560, 13201, 32779, 13203, 13204, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13223, 13224, 32809, 33705, 33562, 32922, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13249, 13250, 32809, 33617, 33705, 32922, 33577, 33576, 33579, 33578, 13264, 33580, 33582, 33581, 33584, 33583, 33585, 13271, 13272, 13273, 32837, 13276, 13277, 32840, 33730, 13292, 33729, 33588, 33713, 13296, 33714, 33726, 33734, 33716, 33715, 33589, 13323, 33591, 13325, 33724, 33593, 33725, 33726, 13330, 33718, 33728, 33730, 13352, 33712, 33595, 33594, 13356, 33732, 33733, 33596, 13365, 13366, 33598, 33597, 33600, 33599, 33601, 13388, 13389, 33603, 33602, 33605, 33604, 33606, 13395, 13396, 33608, 33607, 33610, 33609, 13401, 33611, 33613, 33612, 33615, 33614, 13408, 33616, 13411, 13412, 13413, 13414, 13415, 13416, 33705, 33617, 13419, 33619, 33618, 33621, 33620, 13431, 33622, 13433, 33624, 33623, 33626, 33625, 13438, 33627, 13440, 33636, 33635, 33638, 33637, 13445, 33639, 13447, 13448, 13450, 13451, 13452, 13453, 33629, 33628, 33631, 33630, 33632, 13466, 33633, 13468, 33053, 13470, 13471, 33636, 33635, 33638, 33637, 13480, 33639, 13482, 33641, 33640, 33643, 33642, 33644, 13488, 13489, 13490, 13492, 13493, 13494, 13495, 33646, 33645, 33648, 33647, 33649, 33021, 33652, 33651, 33654, 33653, 33655, 31620, 33658, 33657, 33660, 33659, 13519, 33661, 13521, 33053, 13523, 13524, 33665, 33664, 33667, 33666, 13533, 33668, 33670, 33669, 33672, 33671, 33673, 33674, 33676, 33675, 33678, 33677, 33679, 13546, 33680, 13548, 33104, 13550, 13551, 33683, 33682, 33685, 33684, 33686, 33687, 33689, 33688, 33691, 33690, 33692, 33693, 33695, 33694, 33697, 33696, 33698, 33699, 33701, 33700, 33703, 33702, 13582, 33704, 13584, 13585, 13586, 13587, 33706, 33705, 13590, 33707, 33708, 33724, 33709, 33710, 13603, 33726, 33716, 33711, 13618, 33712, 33730, 33731, 13622, 33732, 33733, 33734, 13629, 13630, 33730, 33729, 13645, 33731, 13647, 33732, 33733, 33734, 13654, 13655, 33730, 13668, 33729, 33721, 33713, 13672, 13673, 33714, 33734, 33726, 33716, 33715, 33719, 33720, 33721, 33722, 33723, 33724, 33717, 13700, 33726, 33718, 33728, 33720, 33719, 33721, 33724, 33723, 33722, 33725, 13722, 33726, 33728, 33727, 33730, 33729, 13746, 33731, 13748, 33732, 33733, 33734, 13755, 13756, 33735, 33736, 33738, 33737, 33739, 33741, 33740, 33743, 33742, 13796, 33762, 33772, 33780, 33791, 13845, 13850, 13852, 13857, 13859, 13866, 13868, 13873, 13875, 33811, 13886, 13888, 13893, 13895, 33819, 33901, 33857, 33882, 33847, 33826, 33833, 33905, 33865, 33917, 33863, 13954, 13955, 13961, 13962, 13968, 33971, 13986, 33961, 33946, 33933, 33981, 14029, 14031, 14036, 14038, 14043, 14044, 14049, 14051, 14057, 14059, 14064, 14065, 14070, 14071, 33882, 33847, 33852, 33901, 33857, 33862, 33863, 33917, 14121, 14122, 33905, 33865, 14135, 14141, 33872, 33877, 33882, 33887, 33892, 33901, 33900, 33905, 33904, 14188, 33910, 33909, 33917, 33916, 33933, 33946, 14229, 33961, 14245, 33971, 33981, 14270, 14271, 14276, 14278, 14283, 14290, 14292, 14297, 14298, 14303, 14305, 14311, 14318, 14319, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 12396, 12397, 12398, 12399, 12400, 12403, 12404, 12405, 12406, 12407, 12410, 12411, 12412, 12413, 12414, 34132, 12419, 12420, 12421, 12422, 12430, 12431, 12432, 12433, 12435, 12437, 12438, 12439, 12440, 12441, 33757, 34154, 12457, 12458, 12459, 12460, 12462, 12463, 12464, 12465, 12466, 12467, 12469, 12470, 12471, 12472, 12473, 12474, 12476, 12477, 12478, 12479, 12480, 12481, 12483, 12484, 12485, 12486, 12487, 12488, 12490, 12491, 12492, 12493, 12494, 12495, 12497, 12498, 12500, 12509, 12510, 12511, 12512, 12514, 12515, 12516, 12517, 12518, 12519, 12521, 12522, 12523, 12524, 12525, 12526, 12528, 12530, 12531, 12532, 12533, 12535, 12538, 12544, 12545, 12546, 12547, 12549, 12551, 12552, 12553, 12554, 12556, 33786, 34249, 12571, 12572, 12573, 12574, 12575, 12578, 12579, 12580, 12581, 12582, 12585, 12586, 12587, 12588, 12589, 34271, 12594, 12595, 12596, 12597, 12606, 12607, 12608, 12610, 12611, 12612, 12618, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12641, 12646, 12647, 12678, 12679, 12680, 12682, 12683, 12684, 34306, 12705, 12706, 12707, 12708, 12709, 12711, 12714, 12715, 12730, 12731, 12732, 12734, 12735, 12736, 34325, 12758, 12759, 12760, 12761, 12762, 12763, 12764, 12766, 12771, 12772, 12793, 12794, 12795, 12796, 12797, 12799, 12802, 12803, 12820, 12821, 12822, 12823, 12824, 12826, 12827, 12828, 12829, 12830, 12832, 12833, 34359, 12837, 12838, 12847, 12848, 12849, 12850, 12851, 12853, 12854, 12855, 12856, 12857, 12859, 12860, 34377, 12864, 12865, 12883, 12884, 12885, 12886, 12887, 12888, 12892, 12893, 34392, 12927, 12928, 12930, 12932, 12933, 12935, 34403, 12953, 12954, 12955, 12956, 12957, 12959, 12961, 12962, 12970, 12971, 12972, 12973, 12975, 12976, 12977, 12978, 12979, 12980, 12981, 12982, 12983, 12984, 12985, 12987, 12988, 12989, 12990, 12991, 12992, 12994, 12995, 12999, 13000, 13001, 13002, 13003, 13005, 13006, 13007, 13008, 13009, 13010, 13012, 34452, 13015, 13016, 13017, 13018, 13026, 13027, 13028, 13029, 13030, 34463, 13033, 13034, 13035, 13036, 13037, 34470, 13044, 13045, 13046, 13047, 13048, 13050, 13051, 13052, 13053, 13054, 13055, 13057, 34484, 13060, 13061, 13062, 13063, 13079, 13080, 13081, 13082, 13083, 13085, 13089, 13090, 13103, 13112, 13113, 13114, 13115, 13116, 13117, 13121, 13122, 13132, 13133, 13134, 13135, 13136, 13138, 13141, 13142, 13152, 13153, 13154, 13155, 13157, 13158, 13160, 13168, 13169, 13170, 13171, 13172, 13174, 13175, 13176, 13177, 13178, 13179, 13181, 34541, 13184, 13185, 13186, 13187, 13194, 13195, 13196, 13197, 13199, 13200, 13202, 13209, 13210, 13211, 13212, 13213, 13215, 13216, 13217, 13218, 13219, 13220, 13222, 34570, 13225, 13226, 13227, 13228, 13235, 13236, 13237, 13238, 13239, 13241, 13242, 13243, 13244, 13245, 13246, 13248, 34588, 13251, 13252, 13253, 13254, 13260, 13261, 13262, 13263, 13265, 13266, 13267, 13268, 13269, 13270, 34605, 33897, 13275, 34609, 13278, 13291, 13293, 13294, 13295, 13297, 13298, 13299, 13304, 13305, 13322, 13324, 13326, 13327, 13328, 13329, 13334, 13335, 13351, 13353, 13354, 13355, 13357, 13358, 13359, 34643, 13383, 13384, 13385, 13386, 13387, 13390, 13391, 13392, 13393, 13394, 13397, 13398, 13399, 13400, 13402, 13404, 13405, 13406, 13407, 13409, 34671, 34674, 13417, 13418, 13427, 13428, 13429, 13430, 13432, 13434, 13435, 13436, 13437, 13439, 13441, 13442, 13443, 13444, 13446, 33941, 34703, 13461, 13462, 13463, 13464, 13465, 13467, 13469, 13476, 13477, 13478, 13479, 13481, 13483, 13484, 13485, 13486, 13487, 33956, 34733, 13503, 13504, 13505, 13506, 13507, 13508, 13509, 13510, 13511, 13512, 13513, 13514, 13515, 13516, 13517, 13518, 13520, 13522, 13529, 13530, 13531, 13532, 13534, 13535, 13536, 13537, 13538, 13539, 13540, 13541, 13542, 13543, 13544, 13545, 13547, 13549, 13557, 13558, 13559, 13560, 13562, 13563, 13564, 13565, 13566, 13567, 13569, 13570, 13571, 13572, 13573, 13574, 13576, 13577, 13578, 13579, 13580, 13581, 13583, 34806, 13588, 13589, 13598, 13599, 13600, 13601, 13602, 13604, 13606, 13607, 13619, 13620, 13621, 13623, 13624, 13625, 34829, 13643, 13644, 13646, 13648, 13649, 13651, 34839, 13667, 13669, 13670, 13671, 13674, 13675, 13676, 13679, 13680, 13693, 13694, 13695, 13696, 13697, 13698, 13699, 13701, 13704, 13705, 13715, 13716, 13717, 13718, 13719, 13720, 13721, 13723, 13726, 13727, 13744, 13745, 13747, 13749, 13750, 13752, 34883, 13768, 13769, 13770, 13771, 13772, 13773, 13774, 13776, 13777, 13803, 34200, 13818, 34778, 13829, 13836, 34006, 34013, 34016, 13880, 34020, 13902, 13910, 13911, 34555, 13916, 34526, 13921, 13928, 13935, 13940, 13941, 13947, 13948, 34924, 34926, 34714, 34778, 13977, 34755, 13993, 14002, 14013, 14024, 34038, 34041, 34050, 34555, 14078, 34526, 14085, 14092, 14101, 14102, 14109, 14114, 14115, 34957, 14128, 14129, 34526, 14147, 14154, 34555, 14159, 14166, 14173, 14180, 14181, 14186, 14187, 14194, 14195, 14201, 14202, 14215, 14224, 34714, 14236, 34755, 34778, 14254, 14265, 34073, 34076, 34079, 34088, 34902, 34901, 34911, 34910, 34938, 34941, 34940, 34944, 34946, 34960, 34961, 34983, 34990, 34993, 34992, 34995, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35009, 35011, 33744, 35014, 35016, 33746, 35019, 35021, 34129, 35026, 35029, 35031, 35032, 35034, 35036, 34149, 35041, 35043, 35044, 35047, 35049, 35050, 35053, 35055, 35056, 35059, 35061, 35062, 35065, 35067, 35068, 35071, 35073, 35074, 35078, 35080, 35081, 35084, 35086, 35087, 35090, 35092, 35093, 35095, 35097, 35098, 35101, 35103, 35104, 35106, 35108, 35109, 35113, 35115, 33792, 35118, 35120, 33794, 35123, 35125, 34268, 35130, 35132, 35135, 33802, 34285, 35140, 35143, 35146, 35148, 35149, 35152, 33807, 35159, 35161, 35163, 35164, 35167, 33814, 35172, 35175, 35178, 35180, 35184, 35186, 35188, 35190, 35192, 33820, 35196, 35198, 35199, 35203, 35205, 35207, 33827, 35211, 35213, 35214, 35218, 35222, 34388, 35226, 35229, 35231, 35233, 35238, 35240, 35242, 35244, 35246, 35249, 35251, 35255, 35257, 35258, 35261, 35263, 35264, 35267, 35269, 33848, 35273, 35275, 33849, 35281, 35284, 35286, 35290, 35292, 35296, 35298, 33858, 35302, 35304, 33859, 35310, 35315, 35317, 35319, 35324, 34505, 35328, 35332, 35334, 35336, 35338, 35340, 35341, 35345, 35347, 33873, 35351, 35353, 33874, 35359, 35362, 35364, 35365, 35369, 35371, 33883, 35375, 35377, 33884, 35383, 35386, 35388, 33888, 35392, 35394, 33889, 35400, 35403, 35405, 35408, 35410, 34612, 34616, 35423, 35425, 35429, 34630, 35433, 34634, 35437, 35438, 33913, 35443, 35445, 34649, 35448, 35450, 34656, 35453, 35455, 35456, 35458, 35460, 35461, 35465, 35467, 35469, 35470, 35472, 35474, 35475, 35477, 35479, 35480, 35484, 35486, 34710, 35491, 35493, 35494, 35496, 35498, 34728, 35503, 35505, 35509, 35511, 35515, 35517, 35521, 35523, 35526, 35528, 35532, 35534, 34774, 35539, 35541, 35542, 35545, 35547, 35548, 35551, 35553, 35554, 35557, 35559, 35560, 35563, 35567, 35569, 35571, 35572, 35575, 33985, 35580, 35582, 35584, 34841, 34845, 35592, 35594, 35596, 35599, 35602, 35604, 35606, 35609, 35612, 35614, 35616, 35618, 35620, 35625, 35628, 35630, 35023, 35039, 35038, 13816, 34198, 13827, 34230, 35111, 35110, 35127, 35155, 35156, 35170, 35181, 34597, 35411, 35415, 35413, 35644, 13914, 34553, 13919, 34524, 35201, 35216, 35652, 35441, 35654, 35219, 35312, 13966, 34712, 34761, 35529, 13975, 34776, 35506, 35512, 34751, 13984, 34753, 35501, 35500, 35482, 35481, 35227, 35561, 35578, 35234, 35235, 35564, 34417, 35252, 14076, 34553, 14083, 34524, 35278, 35287, 35293, 34597, 35415, 35413, 35674, 35307, 35441, 35677, 35312, 35680, 35321, 35329, 14145, 34524, 35356, 14157, 34553, 35380, 35397, 34597, 35411, 35415, 35413, 35689, 35691, 35427, 35426, 35693, 35441, 35695, 35463, 35462, 35482, 35481, 14227, 34712, 35501, 35500, 35506, 35512, 34751, 14243, 34753, 34761, 35529, 14252, 34776, 35561, 35564, 35578, 35585, 35621, 35622, 35637, 14349, 14350, 35638, 35639, 35640, 35641, 14360, 14361, 35642, 35655, 35656, 35665, 35666, 14417, 14419, 14420, 35667, 14424, 14426, 35678, 14450, 14452, 14503, 35704, 35705, 35706, 14511, 14513, 14514, 35707, 14518, 35133, 35144, 35150, 35165, 35176, 34396, 35418, 35435, 35573, 34832, 35587, 34846, 35600, 35610, 34876, 35744, 35746, 35747, 35749, 35750, 35752, 35753, 13795, 35754, 35756, 35757, 35759, 13801, 13802, 35760, 35762, 35763, 35765, 35766, 35768, 35769, 35771, 35772, 35774, 35775, 35777, 13817, 35778, 35780, 35781, 35783, 35784, 35786, 35787, 35789, 13828, 35790, 35792, 35793, 35795, 13834, 13835, 35796, 35798, 35799, 35801, 35802, 35804, 35805, 13844, 35807, 35809, 35808, 35810, 35813, 35812, 36001, 36000, 35815, 13871, 35816, 35817, 13877, 35819, 35818, 35821, 13884, 35822, 35823, 35826, 35825, 35827, 13899, 35829, 35828, 35917, 13905, 35919, 13907, 13908, 13909, 35900, 35902, 13915, 35890, 35892, 13920, 35830, 35832, 35833, 35835, 35836, 13927, 35837, 35839, 35840, 35842, 35843, 13934, 35922, 35924, 35923, 35930, 13945, 35931, 35844, 13951, 35846, 35845, 35881, 13958, 35883, 35882, 35954, 35956, 13967, 35969, 13970, 35971, 13972, 35973, 35975, 13976, 35963, 13979, 35965, 13981, 35967, 13983, 13985, 35957, 35959, 35960, 35962, 13991, 13992, 35945, 35947, 35948, 35950, 35951, 35953, 14000, 14001, 35932, 35934, 35935, 35937, 35938, 35940, 35941, 35943, 35944, 14012, 35976, 35978, 35979, 35981, 35982, 35984, 35985, 35987, 35988, 14023, 36001, 36000, 35993, 14034, 35994, 36002, 36005, 36004, 36006, 36009, 36008, 35848, 14055, 35849, 35850, 14061, 35852, 35851, 35989, 14067, 35991, 35990, 35853, 14073, 35855, 14075, 14077, 35857, 35859, 35860, 35862, 14084, 35863, 35865, 35866, 35868, 35869, 14091, 35870, 14094, 35872, 14096, 35917, 14098, 14099, 14100, 35874, 35876, 35877, 35879, 35880, 14108, 35930, 14112, 35931, 35881, 14118, 35883, 35882, 35922, 35924, 35923, 35884, 14132, 35886, 35885, 35887, 14138, 35889, 35888, 35890, 35892, 14146, 35893, 35895, 35896, 35898, 35899, 14153, 35900, 35902, 14158, 35903, 35905, 35906, 35908, 35909, 14165, 35910, 35912, 35913, 35915, 35916, 14172, 35917, 14175, 35919, 14177, 14178, 14179, 35922, 35924, 35923, 35925, 14190, 14191, 35927, 35926, 35930, 14199, 35931, 35932, 35934, 35935, 35937, 35938, 35940, 35941, 35943, 35944, 14213, 14214, 35945, 35947, 35948, 35950, 35951, 35953, 14222, 14223, 35954, 35956, 14228, 35957, 35959, 35960, 35962, 14234, 14235, 35963, 14238, 35965, 14240, 35967, 14242, 14244, 35969, 14247, 35971, 14249, 35973, 35975, 14253, 35976, 35978, 35979, 35981, 35982, 35984, 35985, 35987, 35988, 14264, 35989, 14267, 35991, 35990, 35993, 14274, 35994, 35996, 14281, 35997, 36001, 36000, 36002, 36005, 36004, 36006, 36009, 36008, 36011, 14309, 36012, 36013, 14315, 36015, 36014, 14347, 36130, 14352, 14354, 14356, 14358, 36136, 14363, 36041, 36043, 14382, 14384, 14413, 14415, 36144, 14422, 36082, 14446, 36084, 36099, 36102, 36104, 14505, 14507, 14509, 36157, 14516, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 13788, 13789, 13790, 13791, 13792, 13793, 13794, 13797, 13798, 13799, 13800, 36188, 13804, 13805, 13806, 13807, 13808, 13809, 13810, 13811, 13812, 13813, 13814, 13815, 36201, 13819, 13820, 13821, 13822, 13823, 13824, 13825, 13826, 36210, 13830, 13831, 13832, 13833, 36216, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13846, 36160, 13848, 13849, 36161, 13854, 13855, 13856, 36171, 36170, 13864, 13865, 13869, 36162, 13872, 13876, 13878, 13879, 13882, 36163, 13885, 36164, 13890, 13891, 13892, 13898, 13900, 13901, 13904, 13906, 36255, 13912, 13913, 36258, 13917, 13918, 36261, 13922, 13923, 13924, 13925, 13926, 13929, 13930, 13931, 13932, 13933, 13936, 36166, 13938, 13939, 13943, 36167, 13946, 13950, 13952, 13953, 13957, 13959, 13960, 13964, 13965, 36290, 13969, 13971, 13973, 13974, 36297, 13978, 13980, 13982, 36304, 13987, 13988, 13989, 13990, 36310, 13994, 13995, 13996, 13997, 13998, 13999, 36318, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 36171, 36170, 14027, 14028, 14032, 36168, 14035, 36172, 14040, 14041, 14042, 36173, 14046, 14047, 14048, 14053, 36165, 14056, 14060, 14062, 14063, 14066, 14068, 14069, 14072, 14074, 36365, 14079, 14080, 14081, 14082, 36370, 14086, 14087, 14088, 14089, 14090, 14093, 14095, 14097, 36384, 14103, 14104, 14105, 14106, 14107, 14110, 36167, 14113, 14117, 14119, 14120, 14124, 36166, 14126, 14127, 14131, 14133, 14134, 14137, 14139, 14140, 14143, 14144, 36411, 14148, 14149, 14150, 14151, 14152, 14155, 14156, 36420, 14160, 14161, 14162, 14163, 14164, 14167, 14168, 14169, 14170, 14171, 14174, 14176, 36438, 14182, 36166, 14184, 14185, 14189, 14192, 14193, 14197, 36167, 14200, 14204, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14216, 14217, 14218, 14219, 14220, 14221, 36468, 14225, 14226, 36471, 14230, 14231, 14232, 14233, 36477, 14237, 14239, 14241, 36484, 14246, 14248, 14250, 14251, 36491, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14263, 14266, 14268, 14269, 14272, 36168, 14275, 14279, 36169, 14282, 36171, 36170, 14288, 14289, 36172, 14294, 14295, 14296, 36173, 14300, 14301, 14302, 14307, 36174, 14310, 14314, 14316, 14317, 14378, 14380, 14444, 14448, 14470, 14472, 14474, 36182, 36224, 13847, 36625, 13853, 36629, 13862, 13863, 36633, 13870, 36636, 36237, 36639, 13883, 36642, 13889, 36646, 36247, 36649, 36267, 36273, 13937, 36672, 13944, 36675, 36281, 36678, 36285, 36681, 36328, 36338, 14025, 14026, 36727, 14033, 36730, 14039, 36734, 14045, 36738, 14054, 36741, 36354, 36744, 36358, 36747, 36376, 36390, 14111, 36772, 36395, 36775, 14125, 36779, 36402, 36782, 36406, 36785, 36417, 36426, 36432, 14183, 36813, 36443, 36816, 14198, 36819, 36459, 36501, 36503, 36864, 14273, 36867, 14280, 36870, 14286, 14287, 36874, 14293, 36878, 14299, 36882, 14308, 36885, 36524, 36888, 36580, 36578, 36576, 36585, 36583, 36587, 36590, 36588, 36598, 36594, 36596, 36592, 36600, 36607, 36605, 36603, 36601, 36609, 36612, 36610, 36614, 36619, 36617, 36615, 36651, 36650, 36652, 36653, 36655, 36656, 36658, 36661, 36659, 36666, 36664, 36682, 36684, 36687, 36686, 36685, 36689, 36692, 36691, 36690, 36693, 36696, 36694, 36698, 36703, 36701, 36699, 36705, 36712, 36710, 36708, 36706, 36721, 36719, 36717, 36715, 36749, 36748, 36750, 36753, 36751, 36755, 36758, 36756, 36763, 36762, 36761, 36764, 36767, 36765, 36786, 36788, 36791, 36789, 36794, 36796, 36799, 36797, 36804, 36802, 36808, 36807, 36809, 36826, 36824, 36822, 36820, 36833, 36831, 36829, 36835, 36836, 36838, 36841, 36839, 36843, 36846, 36845, 36844, 36847, 36850, 36849, 36848, 36852, 36859, 36857, 36855, 36853, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36898, 36627, 36903, 36905, 36909, 36644, 36917, 36919, 36928, 36930, 36732, 36736, 36936, 36944, 36948, 36957, 36444, 36961, 36460, 36967, 36969, 36972, 36876, 36880, 36978, 14320, 14321, 14322, 36896, 14324, 14325, 14326, 14327, 14328, 14329, 14330, 14331, 14332, 14333, 14334, 14335, 14336, 14337, 14338, 14339, 14340, 14341, 14342, 14343, 14344, 36897, 36907, 36913, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 36915, 14374, 14375, 36916, 36921, 36923, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398, 14399, 14400, 14401, 14402, 14403, 14404, 14405, 36925, 14407, 14408, 14409, 14410, 36926, 36938, 36940, 14427, 14428, 14429, 14430, 14431, 14432, 14433, 14434, 36942, 14436, 14437, 14438, 14439, 14440, 14441, 36943, 36946, 36950, 36952, 14453, 14454, 14455, 14456, 36954, 14458, 14459, 14460, 14461, 36955, 14463, 14464, 36956, 14466, 14467, 14468, 14475, 14476, 14477, 14478, 14480, 14481, 14482, 14483, 14484, 14485, 14486, 14487, 14488, 14489, 14490, 14491, 14492, 14493, 14494, 14495, 14496, 14497, 14498, 14499, 14500, 36964, 36965, 36980, 37146, 14323, 37150, 37153, 37155, 37157, 37160, 37162, 37165, 37168, 14345, 37120, 37121, 37122, 37123, 14355, 37124, 37125, 14362, 37174, 37181, 14373, 37184, 14376, 37126, 37127, 14381, 14383, 37191, 37195, 37199, 37202, 37206, 37208, 14406, 37211, 37213, 14411, 37128, 37129, 37130, 37131, 37132, 14423, 14425, 37218, 37221, 37224, 14435, 37227, 37231, 14442, 37133, 14445, 37134, 14449, 14451, 37239, 14457, 37244, 14462, 37247, 14465, 37250, 37135, 37136, 37137, 37253, 37255, 37138, 37257, 37263, 37266, 37270, 37274, 37276, 14501, 14502, 37139, 37140, 37141, 37142, 37143, 37144, 14517, 37178, 37176, 37188, 37241, 37236, 37260, 27, 28, 29, 30, 31, 37147, 37284, 37287, 37169, 14346, 14348, 14351, 14353, 14357, 14359, 14377, 14379, 37192, 37196, 37203, 37313, 37316, 14412, 14414, 14416, 14418, 14421, 37228, 14443, 14447, 14469, 14471, 14473, 37348, 14479, 37258, 37267, 37271, 37355, 14504, 14506, 14508, 14510, 14512, 14515, 37288, 37282, 37295, 37298, 37299, 37302, 14535, 37300, 14537, 37307, 37306, 14546, 37310, 37324, 37323, 37327, 37330, 37326, 37325, 37336, 37335, 37333, 37339, 14567, 37343, 14569, 37337, 37341, 14578, 37351, 37364, 37357, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37285, 37378, 14520, 14521, 37376, 37379, 14525, 37383, 37385, 37381, 37380, 37382, 14531, 37384, 14533, 14534, 14536, 14538, 14539, 37387, 37386, 37389, 37390, 37388, 37391, 37392, 14548, 37396, 37394, 14551, 37393, 14553, 37395, 37397, 37398, 14557, 14558, 14559, 14560, 14561, 14562, 14563, 37399, 37400, 14566, 14568, 14570, 14571, 37403, 37402, 37401, 37404, 37406, 37408, 14579, 37409, 37407, 37413, 14583, 37412, 37410, 37414, 14587, 37411, 37415, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14519, 14522, 14523, 37472, 14526, 14527, 14528, 14529, 14530, 14532, 37487, 37488, 14540, 14541, 37490, 14542, 14543, 14544, 14545, 14547, 14549, 14550, 14552, 14554, 14555, 14556, 37509, 14564, 14565, 37512, 37439, 37441, 37519, 14572, 14573, 14574, 14575, 14576, 14577, 14580, 14581, 14582, 14584, 14585, 14586, 14588, 14589, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14524, 37474, 37569, 37572, 37574, 37576, 37577, 37579, 37581, 37584, 37586, 37587, 37589, 37590, 37591, 37507, 37595, 37599, 37602, 37605, 37444, 37607, 37530, 37611, 37534, 37614, 26, 27, 28, 29, 30, 31, 37632, 37634, 37636, 37638, 37424, 37640, 37642, 37498, 37645, 37592, 37594, 37648, 37600, 37603, 37652, 37608, 37655, 37657, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37664, 37667, 37671, 37673, 37510, 37596, 37679, 37681, 37668, 37676, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37700, 14591, 37698, 37702, 37696, 14595, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14590, 14592, 14593, 14594, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37729, 37762, 37733, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37793, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37794, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
bool h_Op[]= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#define THREADS_PER_BLOCK 32
#define BLOCKS_PER_GRID 1
#define SIZE_OF_IN 14624
#define SIZE_OF_AC 23264
__device__ void
ac(float *A, const int *B, const int *C, const bool *Op, int n_iter) {
int i= blockDim.x * blockIdx.x + threadIdx.x;
__shared__ float R[1184*THREADS_PER_BLOCK];
const int t= THREADS_PER_BLOCK;
__shared__ float final;
final=0;
R[i + 0*t] = A[i + 0*t];
R[i + 1*t] = A[i + 1*t];
R[i + 2*t] = A[i + 2*t];
R[i + 3*t] = A[i + 3*t];
R[i + 4*t] = A[i + 4*t];
R[i + 5*t] = A[i + 5*t];
R[i + 6*t] = A[i + 6*t];
R[i + 7*t] = A[i + 7*t];
R[i + 8*t] = A[i + 8*t];
R[i + 9*t] = A[i + 9*t];
R[i + 10*t] = A[i + 10*t];
R[i + 11*t] = A[i + 11*t];
R[i + 12*t] = A[i + 12*t];
R[i + 13*t] = A[i + 13*t];
R[i + 14*t] = A[i + 14*t];
R[i + 15*t] = A[i + 15*t];
R[i + 16*t] = A[i + 16*t];
R[i + 17*t] = A[i + 17*t];
R[i + 18*t] = A[i + 18*t];
R[i + 19*t] = A[i + 19*t];
R[i + 20*t] = A[i + 20*t];
R[i + 21*t] = A[i + 21*t];
R[i + 22*t] = A[i + 22*t];
R[i + 23*t] = A[i + 23*t];
R[i + 24*t] = A[i + 24*t];
R[i + 25*t] = A[i + 25*t];
R[i + 26*t] = A[i + 26*t];
R[i + 27*t] = A[i + 27*t];
R[i + 28*t] = A[i + 28*t];
R[i + 29*t] = A[i + 29*t];
R[i + 30*t] = A[i + 30*t];
R[i + 31*t] = A[i + 31*t];
R[i + 32*t] = A[i + 32*t];
R[i + 33*t] = A[i + 33*t];
R[i + 34*t] = A[i + 34*t];
R[i + 35*t] = A[i + 35*t];
R[i + 36*t] = A[i + 36*t];
R[i + 37*t] = A[i + 37*t];
R[i + 38*t] = A[i + 38*t];
R[i + 39*t] = A[i + 39*t];
R[i + 40*t] = A[i + 40*t];
R[i + 41*t] = A[i + 41*t];
R[i + 42*t] = A[i + 42*t];
R[i + 43*t] = A[i + 43*t];
R[i + 44*t] = A[i + 44*t];
R[i + 45*t] = A[i + 45*t];
R[i + 46*t] = A[i + 46*t];
R[i + 47*t] = A[i + 47*t];
R[i + 48*t] = A[i + 48*t];
R[i + 49*t] = A[i + 49*t];
R[i + 50*t] = A[i + 50*t];
R[i + 51*t] = A[i + 51*t];
R[i + 52*t] = A[i + 52*t];
R[i + 53*t] = A[i + 53*t];
R[i + 54*t] = A[i + 54*t];
R[i + 55*t] = A[i + 55*t];
R[i + 56*t] = A[i + 56*t];
R[i + 57*t] = A[i + 57*t];
R[i + 58*t] = A[i + 58*t];
R[i + 59*t] = A[i + 59*t];
R[i + 60*t] = A[i + 60*t];
R[i + 61*t] = A[i + 61*t];
R[i + 62*t] = A[i + 62*t];
R[i + 63*t] = A[i + 63*t];
R[i + 64*t] = A[i + 64*t];
R[i + 65*t] = A[i + 65*t];
R[i + 66*t] = A[i + 66*t];
R[i + 67*t] = A[i + 67*t];
R[i + 68*t] = A[i + 68*t];
R[i + 69*t] = A[i + 69*t];
R[i + 70*t] = A[i + 70*t];
R[i + 71*t] = A[i + 71*t];
R[i + 72*t] = A[i + 72*t];
R[i + 73*t] = A[i + 73*t];
R[i + 74*t] = A[i + 74*t];
R[i + 75*t] = A[i + 75*t];
R[i + 76*t] = A[i + 76*t];
R[i + 77*t] = A[i + 77*t];
R[i + 78*t] = A[i + 78*t];
R[i + 79*t] = A[i + 79*t];
R[i + 80*t] = A[i + 80*t];
R[i + 81*t] = A[i + 81*t];
R[i + 82*t] = A[i + 82*t];
R[i + 83*t] = A[i + 83*t];
R[i + 84*t] = A[i + 84*t];
R[i + 85*t] = A[i + 85*t];
R[i + 86*t] = A[i + 86*t];
R[i + 87*t] = A[i + 87*t];
R[i + 88*t] = A[i + 88*t];
R[i + 89*t] = A[i + 89*t];
R[i + 90*t] = A[i + 90*t];
R[i + 91*t] = A[i + 91*t];
R[i + 92*t] = A[i + 92*t];
R[i + 93*t] = A[i + 93*t];
R[i + 94*t] = A[i + 94*t];
R[i + 95*t] = A[i + 95*t];
R[i + 96*t] = A[i + 96*t];
R[i + 97*t] = A[i + 97*t];
R[i + 98*t] = A[i + 98*t];
R[i + 99*t] = A[i + 99*t];
R[i + 100*t] = A[i + 100*t];
R[i + 101*t] = A[i + 101*t];
R[i + 102*t] = A[i + 102*t];
R[i + 103*t] = A[i + 103*t];
R[i + 104*t] = A[i + 104*t];
R[i + 105*t] = A[i + 105*t];
R[i + 106*t] = A[i + 106*t];
R[i + 107*t] = A[i + 107*t];
R[i + 108*t] = A[i + 108*t];
R[i + 109*t] = A[i + 109*t];
R[i + 110*t] = A[i + 110*t];
R[i + 111*t] = A[i + 111*t];
R[i + 112*t] = A[i + 112*t];
R[i + 113*t] = A[i + 113*t];
R[i + 114*t] = A[i + 114*t];
R[i + 115*t] = A[i + 115*t];
R[i + 116*t] = A[i + 116*t];
R[i + 117*t] = A[i + 117*t];
R[i + 118*t] = A[i + 118*t];
R[i + 119*t] = A[i + 119*t];
R[i + 120*t] = A[i + 120*t];
R[i + 121*t] = A[i + 121*t];
R[i + 122*t] = A[i + 122*t];
R[i + 123*t] = A[i + 123*t];
R[i + 124*t] = A[i + 124*t];
R[i + 125*t] = A[i + 125*t];
R[i + 126*t] = A[i + 126*t];
R[i + 127*t] = A[i + 127*t];
R[i + 128*t] = A[i + 128*t];
R[i + 129*t] = A[i + 129*t];
R[i + 130*t] = A[i + 130*t];
R[i + 131*t] = A[i + 131*t];
R[i + 132*t] = A[i + 132*t];
R[i + 133*t] = A[i + 133*t];
R[i + 134*t] = A[i + 134*t];
R[i + 135*t] = A[i + 135*t];
R[i + 136*t] = A[i + 136*t];
R[i + 137*t] = A[i + 137*t];
R[i + 138*t] = A[i + 138*t];
R[i + 139*t] = A[i + 139*t];
R[i + 140*t] = A[i + 140*t];
R[i + 141*t] = A[i + 141*t];
R[i + 142*t] = A[i + 142*t];
R[i + 143*t] = A[i + 143*t];
R[i + 144*t] = A[i + 144*t];
R[i + 145*t] = A[i + 145*t];
R[i + 146*t] = A[i + 146*t];
R[i + 147*t] = A[i + 147*t];
R[i + 148*t] = A[i + 148*t];
R[i + 149*t] = A[i + 149*t];
R[i + 150*t] = A[i + 150*t];
R[i + 151*t] = A[i + 151*t];
R[i + 152*t] = A[i + 152*t];
R[i + 153*t] = A[i + 153*t];
R[i + 154*t] = A[i + 154*t];
R[i + 155*t] = A[i + 155*t];
R[i + 156*t] = A[i + 156*t];
R[i + 157*t] = A[i + 157*t];
R[i + 158*t] = A[i + 158*t];
R[i + 159*t] = A[i + 159*t];
R[i + 160*t] = A[i + 160*t];
R[i + 161*t] = A[i + 161*t];
R[i + 162*t] = A[i + 162*t];
R[i + 163*t] = A[i + 163*t];
R[i + 164*t] = A[i + 164*t];
R[i + 165*t] = A[i + 165*t];
R[i + 166*t] = A[i + 166*t];
R[i + 167*t] = A[i + 167*t];
R[i + 168*t] = A[i + 168*t];
R[i + 169*t] = A[i + 169*t];
R[i + 170*t] = A[i + 170*t];
R[i + 171*t] = A[i + 171*t];
R[i + 172*t] = A[i + 172*t];
R[i + 173*t] = A[i + 173*t];
R[i + 174*t] = A[i + 174*t];
R[i + 175*t] = A[i + 175*t];
R[i + 176*t] = A[i + 176*t];
R[i + 177*t] = A[i + 177*t];
R[i + 178*t] = A[i + 178*t];
R[i + 179*t] = A[i + 179*t];
R[i + 180*t] = A[i + 180*t];
R[i + 181*t] = A[i + 181*t];
R[i + 182*t] = A[i + 182*t];
R[i + 183*t] = A[i + 183*t];
R[i + 184*t] = A[i + 184*t];
R[i + 185*t] = A[i + 185*t];
R[i + 186*t] = A[i + 186*t];
R[i + 187*t] = A[i + 187*t];
R[i + 188*t] = A[i + 188*t];
R[i + 189*t] = A[i + 189*t];
R[i + 190*t] = A[i + 190*t];
R[i + 191*t] = A[i + 191*t];
R[i + 192*t] = A[i + 192*t];
R[i + 193*t] = A[i + 193*t];
R[i + 194*t] = A[i + 194*t];
R[i + 195*t] = A[i + 195*t];
R[i + 196*t] = A[i + 196*t];
R[i + 197*t] = A[i + 197*t];
R[i + 198*t] = A[i + 198*t];
R[i + 199*t] = A[i + 199*t];
R[i + 200*t] = A[i + 200*t];
R[i + 201*t] = A[i + 201*t];
R[i + 202*t] = A[i + 202*t];
R[i + 203*t] = A[i + 203*t];
R[i + 204*t] = A[i + 204*t];
R[i + 205*t] = A[i + 205*t];
R[i + 206*t] = A[i + 206*t];
R[i + 207*t] = A[i + 207*t];
R[i + 208*t] = A[i + 208*t];
R[i + 209*t] = A[i + 209*t];
R[i + 210*t] = A[i + 210*t];
R[i + 211*t] = A[i + 211*t];
R[i + 212*t] = A[i + 212*t];
R[i + 213*t] = A[i + 213*t];
R[i + 214*t] = A[i + 214*t];
R[i + 215*t] = A[i + 215*t];
R[i + 216*t] = A[i + 216*t];
R[i + 217*t] = A[i + 217*t];
R[i + 218*t] = A[i + 218*t];
R[i + 219*t] = A[i + 219*t];
R[i + 220*t] = A[i + 220*t];
R[i + 221*t] = A[i + 221*t];
R[i + 222*t] = A[i + 222*t];
R[i + 223*t] = A[i + 223*t];
R[i + 224*t] = A[i + 224*t];
R[i + 225*t] = A[i + 225*t];
R[i + 226*t] = A[i + 226*t];
R[i + 227*t] = A[i + 227*t];
R[i + 228*t] = A[i + 228*t];
R[i + 229*t] = A[i + 229*t];
R[i + 230*t] = A[i + 230*t];
R[i + 231*t] = A[i + 231*t];
R[i + 232*t] = A[i + 232*t];
R[i + 233*t] = A[i + 233*t];
R[i + 234*t] = A[i + 234*t];
R[i + 235*t] = A[i + 235*t];
R[i + 236*t] = A[i + 236*t];
R[i + 237*t] = A[i + 237*t];
R[i + 238*t] = A[i + 238*t];
R[i + 239*t] = A[i + 239*t];
R[i + 240*t] = A[i + 240*t];
R[i + 241*t] = A[i + 241*t];
R[i + 242*t] = A[i + 242*t];
R[i + 243*t] = A[i + 243*t];
R[i + 244*t] = A[i + 244*t];
R[i + 245*t] = A[i + 245*t];
R[i + 246*t] = A[i + 246*t];
R[i + 247*t] = A[i + 247*t];
R[i + 248*t] = A[i + 248*t];
R[i + 249*t] = A[i + 249*t];
R[i + 250*t] = A[i + 250*t];
R[i + 251*t] = A[i + 251*t];
R[i + 252*t] = A[i + 252*t];
R[i + 253*t] = A[i + 253*t];
R[i + 254*t] = A[i + 254*t];
R[i + 255*t] = A[i + 255*t];
R[i + 256*t] = A[i + 256*t];
R[i + 257*t] = A[i + 257*t];
R[i + 258*t] = A[i + 258*t];
R[i + 259*t] = A[i + 259*t];
R[i + 260*t] = A[i + 260*t];
R[i + 261*t] = A[i + 261*t];
R[i + 262*t] = A[i + 262*t];
R[i + 263*t] = A[i + 263*t];
R[i + 264*t] = A[i + 264*t];
R[i + 265*t] = A[i + 265*t];
R[i + 266*t] = A[i + 266*t];
R[i + 267*t] = A[i + 267*t];
R[i + 268*t] = A[i + 268*t];
R[i + 269*t] = A[i + 269*t];
R[i + 270*t] = A[i + 270*t];
R[i + 271*t] = A[i + 271*t];
R[i + 272*t] = A[i + 272*t];
R[i + 273*t] = A[i + 273*t];
R[i + 274*t] = A[i + 274*t];
R[i + 275*t] = A[i + 275*t];
R[i + 276*t] = A[i + 276*t];
R[i + 277*t] = A[i + 277*t];
R[i + 278*t] = A[i + 278*t];
R[i + 279*t] = A[i + 279*t];
R[i + 280*t] = A[i + 280*t];
R[i + 281*t] = A[i + 281*t];
R[i + 282*t] = A[i + 282*t];
R[i + 283*t] = A[i + 283*t];
R[i + 284*t] = A[i + 284*t];
R[i + 285*t] = A[i + 285*t];
R[i + 286*t] = A[i + 286*t];
R[i + 287*t] = A[i + 287*t];
R[i + 288*t] = A[i + 288*t];
R[i + 289*t] = A[i + 289*t];
R[i + 290*t] = A[i + 290*t];
R[i + 291*t] = A[i + 291*t];
R[i + 292*t] = A[i + 292*t];
R[i + 293*t] = A[i + 293*t];
R[i + 294*t] = A[i + 294*t];
R[i + 295*t] = A[i + 295*t];
R[i + 296*t] = A[i + 296*t];
R[i + 297*t] = A[i + 297*t];
R[i + 298*t] = A[i + 298*t];
R[i + 299*t] = A[i + 299*t];
R[i + 300*t] = A[i + 300*t];
R[i + 301*t] = A[i + 301*t];
R[i + 302*t] = A[i + 302*t];
R[i + 303*t] = A[i + 303*t];
R[i + 304*t] = A[i + 304*t];
R[i + 305*t] = A[i + 305*t];
R[i + 306*t] = A[i + 306*t];
R[i + 307*t] = A[i + 307*t];
R[i + 308*t] = A[i + 308*t];
R[i + 309*t] = A[i + 309*t];
R[i + 310*t] = A[i + 310*t];
R[i + 311*t] = A[i + 311*t];
R[i + 312*t] = A[i + 312*t];
R[i + 313*t] = A[i + 313*t];
R[i + 314*t] = A[i + 314*t];
R[i + 315*t] = A[i + 315*t];
R[i + 316*t] = A[i + 316*t];
R[i + 317*t] = A[i + 317*t];
R[i + 318*t] = A[i + 318*t];
R[i + 319*t] = A[i + 319*t];
R[i + 320*t] = A[i + 320*t];
R[i + 321*t] = A[i + 321*t];
R[i + 322*t] = A[i + 322*t];
R[i + 323*t] = A[i + 323*t];
R[i + 324*t] = A[i + 324*t];
R[i + 325*t] = A[i + 325*t];
R[i + 326*t] = A[i + 326*t];
R[i + 327*t] = A[i + 327*t];
R[i + 328*t] = A[i + 328*t];
R[i + 329*t] = A[i + 329*t];
R[i + 330*t] = A[i + 330*t];
R[i + 331*t] = A[i + 331*t];
R[i + 332*t] = A[i + 332*t];
R[i + 333*t] = A[i + 333*t];
R[i + 334*t] = A[i + 334*t];
R[i + 335*t] = A[i + 335*t];
R[i + 336*t] = A[i + 336*t];
R[i + 337*t] = A[i + 337*t];
R[i + 338*t] = A[i + 338*t];
R[i + 339*t] = A[i + 339*t];
R[i + 340*t] = A[i + 340*t];
R[i + 341*t] = A[i + 341*t];
R[i + 342*t] = A[i + 342*t];
R[i + 343*t] = A[i + 343*t];
R[i + 344*t] = A[i + 344*t];
R[i + 345*t] = A[i + 345*t];
R[i + 346*t] = A[i + 346*t];
R[i + 347*t] = A[i + 347*t];
R[i + 348*t] = A[i + 348*t];
R[i + 349*t] = A[i + 349*t];
R[i + 350*t] = A[i + 350*t];
R[i + 351*t] = A[i + 351*t];
R[i + 352*t] = A[i + 352*t];
R[i + 353*t] = A[i + 353*t];
R[i + 354*t] = A[i + 354*t];
R[i + 355*t] = A[i + 355*t];
R[i + 356*t] = A[i + 356*t];
R[i + 357*t] = A[i + 357*t];
R[i + 358*t] = A[i + 358*t];
R[i + 359*t] = A[i + 359*t];
R[i + 360*t] = A[i + 360*t];
R[i + 361*t] = A[i + 361*t];
R[i + 362*t] = A[i + 362*t];
R[i + 363*t] = A[i + 363*t];
R[i + 364*t] = A[i + 364*t];
R[i + 365*t] = A[i + 365*t];
R[i + 366*t] = A[i + 366*t];
R[i + 367*t] = A[i + 367*t];
R[i + 368*t] = A[i + 368*t];
R[i + 369*t] = A[i + 369*t];
R[i + 370*t] = A[i + 370*t];
R[i + 371*t] = A[i + 371*t];
R[i + 372*t] = A[i + 372*t];
R[i + 373*t] = A[i + 373*t];
R[i + 374*t] = A[i + 374*t];
R[i + 375*t] = A[i + 375*t];
R[i + 376*t] = A[i + 376*t];
R[i + 377*t] = A[i + 377*t];
R[i + 378*t] = A[i + 378*t];
R[i + 379*t] = A[i + 379*t];
R[i + 380*t] = A[i + 380*t];
R[i + 381*t] = A[i + 381*t];
R[i + 382*t] = A[i + 382*t];
R[i + 383*t] = A[i + 383*t];
R[i + 384*t] = A[i + 384*t];
R[i + 385*t] = A[i + 385*t];
R[i + 386*t] = A[i + 386*t];
R[i + 387*t] = A[i + 387*t];
R[i + 388*t] = A[i + 388*t];
R[i + 389*t] = A[i + 389*t];
R[i + 390*t] = A[i + 390*t];
R[i + 391*t] = A[i + 391*t];
R[i + 392*t] = A[i + 392*t];
R[i + 393*t] = A[i + 393*t];
R[i + 394*t] = A[i + 394*t];
R[i + 395*t] = A[i + 395*t];
R[i + 396*t] = A[i + 396*t];
R[i + 397*t] = A[i + 397*t];
R[i + 398*t] = A[i + 398*t];
R[i + 399*t] = A[i + 399*t];
R[i + 400*t] = A[i + 400*t];
R[i + 401*t] = A[i + 401*t];
R[i + 402*t] = A[i + 402*t];
R[i + 403*t] = A[i + 403*t];
R[i + 404*t] = A[i + 404*t];
R[i + 405*t] = A[i + 405*t];
R[i + 406*t] = A[i + 406*t];
R[i + 407*t] = A[i + 407*t];
R[i + 408*t] = A[i + 408*t];
R[i + 409*t] = A[i + 409*t];
R[i + 410*t] = A[i + 410*t];
R[i + 411*t] = A[i + 411*t];
R[i + 412*t] = A[i + 412*t];
R[i + 413*t] = A[i + 413*t];
R[i + 414*t] = A[i + 414*t];
R[i + 415*t] = A[i + 415*t];
R[i + 416*t] = A[i + 416*t];
R[i + 417*t] = A[i + 417*t];
R[i + 418*t] = A[i + 418*t];
R[i + 419*t] = A[i + 419*t];
R[i + 420*t] = A[i + 420*t];
R[i + 421*t] = A[i + 421*t];
R[i + 422*t] = A[i + 422*t];
R[i + 423*t] = A[i + 423*t];
R[i + 424*t] = A[i + 424*t];
R[i + 425*t] = A[i + 425*t];
R[i + 426*t] = A[i + 426*t];
R[i + 427*t] = A[i + 427*t];
R[i + 428*t] = A[i + 428*t];
R[i + 429*t] = A[i + 429*t];
R[i + 430*t] = A[i + 430*t];
R[i + 431*t] = A[i + 431*t];
R[i + 432*t] = A[i + 432*t];
R[i + 433*t] = A[i + 433*t];
R[i + 434*t] = A[i + 434*t];
R[i + 435*t] = A[i + 435*t];
R[i + 436*t] = A[i + 436*t];
R[i + 437*t] = A[i + 437*t];
R[i + 438*t] = A[i + 438*t];
R[i + 439*t] = A[i + 439*t];
R[i + 440*t] = A[i + 440*t];
R[i + 441*t] = A[i + 441*t];
R[i + 442*t] = A[i + 442*t];
R[i + 443*t] = A[i + 443*t];
R[i + 444*t] = A[i + 444*t];
R[i + 445*t] = A[i + 445*t];
R[i + 446*t] = A[i + 446*t];
R[i + 447*t] = A[i + 447*t];
R[i + 448*t] = A[i + 448*t];
R[i + 449*t] = A[i + 449*t];
R[i + 450*t] = A[i + 450*t];
R[i + 451*t] = A[i + 451*t];
R[i + 452*t] = A[i + 452*t];
R[i + 453*t] = A[i + 453*t];
R[i + 454*t] = A[i + 454*t];
R[i + 455*t] = A[i + 455*t];
R[i + 456*t] = A[i + 456*t];
__syncthreads();
for (int iter=0; iter< n_iter; iter++) {
R[i + 457*t] = Op[i + 0*t] ? R[B[i + 0*t]] * R[C[i + 0*t]] : R[B[i + 0*t]] + R[C[i + 0*t]];
R[i + 458*t] = Op[i + 1*t] ? R[B[i + 1*t]] * R[C[i + 1*t]] : R[B[i + 1*t]] + R[C[i + 1*t]];
R[i + 459*t] = Op[i + 2*t] ? R[B[i + 2*t]] * R[C[i + 2*t]] : R[B[i + 2*t]] + R[C[i + 2*t]];
R[i + 460*t] = Op[i + 3*t] ? R[B[i + 3*t]] * R[C[i + 3*t]] : R[B[i + 3*t]] + R[C[i + 3*t]];
R[i + 461*t] = Op[i + 4*t] ? R[B[i + 4*t]] * R[C[i + 4*t]] : R[B[i + 4*t]] + R[C[i + 4*t]];
R[i + 462*t] = Op[i + 5*t] ? R[B[i + 5*t]] * R[C[i + 5*t]] : R[B[i + 5*t]] + R[C[i + 5*t]];
R[i + 463*t] = Op[i + 6*t] ? R[B[i + 6*t]] * R[C[i + 6*t]] : R[B[i + 6*t]] + R[C[i + 6*t]];
R[i + 464*t] = Op[i + 7*t] ? R[B[i + 7*t]] * R[C[i + 7*t]] : R[B[i + 7*t]] + R[C[i + 7*t]];
R[i + 465*t] = Op[i + 8*t] ? R[B[i + 8*t]] * R[C[i + 8*t]] : R[B[i + 8*t]] + R[C[i + 8*t]];
R[i + 466*t] = Op[i + 9*t] ? R[B[i + 9*t]] * R[C[i + 9*t]] : R[B[i + 9*t]] + R[C[i + 9*t]];
R[i + 467*t] = Op[i + 10*t] ? R[B[i + 10*t]] * R[C[i + 10*t]] : R[B[i + 10*t]] + R[C[i + 10*t]];
R[i + 468*t] = Op[i + 11*t] ? R[B[i + 11*t]] * R[C[i + 11*t]] : R[B[i + 11*t]] + R[C[i + 11*t]];
R[i + 469*t] = Op[i + 12*t] ? R[B[i + 12*t]] * R[C[i + 12*t]] : R[B[i + 12*t]] + R[C[i + 12*t]];
R[i + 470*t] = Op[i + 13*t] ? R[B[i + 13*t]] * R[C[i + 13*t]] : R[B[i + 13*t]] + R[C[i + 13*t]];
R[i + 471*t] = Op[i + 14*t] ? R[B[i + 14*t]] * R[C[i + 14*t]] : R[B[i + 14*t]] + R[C[i + 14*t]];
R[i + 472*t] = Op[i + 15*t] ? R[B[i + 15*t]] * R[C[i + 15*t]] : R[B[i + 15*t]] + R[C[i + 15*t]];
R[i + 473*t] = Op[i + 16*t] ? R[B[i + 16*t]] * R[C[i + 16*t]] : R[B[i + 16*t]] + R[C[i + 16*t]];
R[i + 474*t] = Op[i + 17*t] ? R[B[i + 17*t]] * R[C[i + 17*t]] : R[B[i + 17*t]] + R[C[i + 17*t]];
R[i + 475*t] = Op[i + 18*t] ? R[B[i + 18*t]] * R[C[i + 18*t]] : R[B[i + 18*t]] + R[C[i + 18*t]];
R[i + 476*t] = Op[i + 19*t] ? R[B[i + 19*t]] * R[C[i + 19*t]] : R[B[i + 19*t]] + R[C[i + 19*t]];
R[i + 477*t] = Op[i + 20*t] ? R[B[i + 20*t]] * R[C[i + 20*t]] : R[B[i + 20*t]] + R[C[i + 20*t]];
R[i + 478*t] = Op[i + 21*t] ? R[B[i + 21*t]] * R[C[i + 21*t]] : R[B[i + 21*t]] + R[C[i + 21*t]];
R[i + 479*t] = Op[i + 22*t] ? R[B[i + 22*t]] * R[C[i + 22*t]] : R[B[i + 22*t]] + R[C[i + 22*t]];
R[i + 480*t] = Op[i + 23*t] ? R[B[i + 23*t]] * R[C[i + 23*t]] : R[B[i + 23*t]] + R[C[i + 23*t]];
R[i + 481*t] = Op[i + 24*t] ? R[B[i + 24*t]] * R[C[i + 24*t]] : R[B[i + 24*t]] + R[C[i + 24*t]];
R[i + 482*t] = Op[i + 25*t] ? R[B[i + 25*t]] * R[C[i + 25*t]] : R[B[i + 25*t]] + R[C[i + 25*t]];
R[i + 483*t] = Op[i + 26*t] ? R[B[i + 26*t]] * R[C[i + 26*t]] : R[B[i + 26*t]] + R[C[i + 26*t]];
R[i + 484*t] = Op[i + 27*t] ? R[B[i + 27*t]] * R[C[i + 27*t]] : R[B[i + 27*t]] + R[C[i + 27*t]];
R[i + 485*t] = Op[i + 28*t] ? R[B[i + 28*t]] * R[C[i + 28*t]] : R[B[i + 28*t]] + R[C[i + 28*t]];
R[i + 486*t] = Op[i + 29*t] ? R[B[i + 29*t]] * R[C[i + 29*t]] : R[B[i + 29*t]] + R[C[i + 29*t]];
R[i + 487*t] = Op[i + 30*t] ? R[B[i + 30*t]] * R[C[i + 30*t]] : R[B[i + 30*t]] + R[C[i + 30*t]];
R[i + 488*t] = Op[i + 31*t] ? R[B[i + 31*t]] * R[C[i + 31*t]] : R[B[i + 31*t]] + R[C[i + 31*t]];
R[i + 489*t] = Op[i + 32*t] ? R[B[i + 32*t]] * R[C[i + 32*t]] : R[B[i + 32*t]] + R[C[i + 32*t]];
R[i + 490*t] = Op[i + 33*t] ? R[B[i + 33*t]] * R[C[i + 33*t]] : R[B[i + 33*t]] + R[C[i + 33*t]];
R[i + 491*t] = Op[i + 34*t] ? R[B[i + 34*t]] * R[C[i + 34*t]] : R[B[i + 34*t]] + R[C[i + 34*t]];
R[i + 492*t] = Op[i + 35*t] ? R[B[i + 35*t]] * R[C[i + 35*t]] : R[B[i + 35*t]] + R[C[i + 35*t]];
R[i + 493*t] = Op[i + 36*t] ? R[B[i + 36*t]] * R[C[i + 36*t]] : R[B[i + 36*t]] + R[C[i + 36*t]];
R[i + 494*t] = Op[i + 37*t] ? R[B[i + 37*t]] * R[C[i + 37*t]] : R[B[i + 37*t]] + R[C[i + 37*t]];
R[i + 495*t] = Op[i + 38*t] ? R[B[i + 38*t]] * R[C[i + 38*t]] : R[B[i + 38*t]] + R[C[i + 38*t]];
R[i + 496*t] = Op[i + 39*t] ? R[B[i + 39*t]] * R[C[i + 39*t]] : R[B[i + 39*t]] + R[C[i + 39*t]];
R[i + 497*t] = Op[i + 40*t] ? R[B[i + 40*t]] * R[C[i + 40*t]] : R[B[i + 40*t]] + R[C[i + 40*t]];
R[i + 498*t] = Op[i + 41*t] ? R[B[i + 41*t]] * R[C[i + 41*t]] : R[B[i + 41*t]] + R[C[i + 41*t]];
R[i + 499*t] = Op[i + 42*t] ? R[B[i + 42*t]] * R[C[i + 42*t]] : R[B[i + 42*t]] + R[C[i + 42*t]];
R[i + 500*t] = Op[i + 43*t] ? R[B[i + 43*t]] * R[C[i + 43*t]] : R[B[i + 43*t]] + R[C[i + 43*t]];
R[i + 501*t] = Op[i + 44*t] ? R[B[i + 44*t]] * R[C[i + 44*t]] : R[B[i + 44*t]] + R[C[i + 44*t]];
R[i + 502*t] = Op[i + 45*t] ? R[B[i + 45*t]] * R[C[i + 45*t]] : R[B[i + 45*t]] + R[C[i + 45*t]];
R[i + 503*t] = Op[i + 46*t] ? R[B[i + 46*t]] * R[C[i + 46*t]] : R[B[i + 46*t]] + R[C[i + 46*t]];
R[i + 504*t] = Op[i + 47*t] ? R[B[i + 47*t]] * R[C[i + 47*t]] : R[B[i + 47*t]] + R[C[i + 47*t]];
R[i + 505*t] = Op[i + 48*t] ? R[B[i + 48*t]] * R[C[i + 48*t]] : R[B[i + 48*t]] + R[C[i + 48*t]];
R[i + 506*t] = Op[i + 49*t] ? R[B[i + 49*t]] * R[C[i + 49*t]] : R[B[i + 49*t]] + R[C[i + 49*t]];
R[i + 507*t] = Op[i + 50*t] ? R[B[i + 50*t]] * R[C[i + 50*t]] : R[B[i + 50*t]] + R[C[i + 50*t]];
R[i + 508*t] = Op[i + 51*t] ? R[B[i + 51*t]] * R[C[i + 51*t]] : R[B[i + 51*t]] + R[C[i + 51*t]];
R[i + 509*t] = Op[i + 52*t] ? R[B[i + 52*t]] * R[C[i + 52*t]] : R[B[i + 52*t]] + R[C[i + 52*t]];
R[i + 510*t] = Op[i + 53*t] ? R[B[i + 53*t]] * R[C[i + 53*t]] : R[B[i + 53*t]] + R[C[i + 53*t]];
R[i + 511*t] = Op[i + 54*t] ? R[B[i + 54*t]] * R[C[i + 54*t]] : R[B[i + 54*t]] + R[C[i + 54*t]];
R[i + 512*t] = Op[i + 55*t] ? R[B[i + 55*t]] * R[C[i + 55*t]] : R[B[i + 55*t]] + R[C[i + 55*t]];
R[i + 513*t] = Op[i + 56*t] ? R[B[i + 56*t]] * R[C[i + 56*t]] : R[B[i + 56*t]] + R[C[i + 56*t]];
R[i + 514*t] = Op[i + 57*t] ? R[B[i + 57*t]] * R[C[i + 57*t]] : R[B[i + 57*t]] + R[C[i + 57*t]];
R[i + 515*t] = Op[i + 58*t] ? R[B[i + 58*t]] * R[C[i + 58*t]] : R[B[i + 58*t]] + R[C[i + 58*t]];
R[i + 516*t] = Op[i + 59*t] ? R[B[i + 59*t]] * R[C[i + 59*t]] : R[B[i + 59*t]] + R[C[i + 59*t]];
R[i + 517*t] = Op[i + 60*t] ? R[B[i + 60*t]] * R[C[i + 60*t]] : R[B[i + 60*t]] + R[C[i + 60*t]];
R[i + 518*t] = Op[i + 61*t] ? R[B[i + 61*t]] * R[C[i + 61*t]] : R[B[i + 61*t]] + R[C[i + 61*t]];
R[i + 519*t] = Op[i + 62*t] ? R[B[i + 62*t]] * R[C[i + 62*t]] : R[B[i + 62*t]] + R[C[i + 62*t]];
R[i + 520*t] = Op[i + 63*t] ? R[B[i + 63*t]] * R[C[i + 63*t]] : R[B[i + 63*t]] + R[C[i + 63*t]];
R[i + 521*t] = Op[i + 64*t] ? R[B[i + 64*t]] * R[C[i + 64*t]] : R[B[i + 64*t]] + R[C[i + 64*t]];
R[i + 522*t] = Op[i + 65*t] ? R[B[i + 65*t]] * R[C[i + 65*t]] : R[B[i + 65*t]] + R[C[i + 65*t]];
R[i + 523*t] = Op[i + 66*t] ? R[B[i + 66*t]] * R[C[i + 66*t]] : R[B[i + 66*t]] + R[C[i + 66*t]];
R[i + 524*t] = Op[i + 67*t] ? R[B[i + 67*t]] * R[C[i + 67*t]] : R[B[i + 67*t]] + R[C[i + 67*t]];
R[i + 525*t] = Op[i + 68*t] ? R[B[i + 68*t]] * R[C[i + 68*t]] : R[B[i + 68*t]] + R[C[i + 68*t]];
R[i + 526*t] = Op[i + 69*t] ? R[B[i + 69*t]] * R[C[i + 69*t]] : R[B[i + 69*t]] + R[C[i + 69*t]];
R[i + 527*t] = Op[i + 70*t] ? R[B[i + 70*t]] * R[C[i + 70*t]] : R[B[i + 70*t]] + R[C[i + 70*t]];
R[i + 528*t] = Op[i + 71*t] ? R[B[i + 71*t]] * R[C[i + 71*t]] : R[B[i + 71*t]] + R[C[i + 71*t]];
R[i + 529*t] = Op[i + 72*t] ? R[B[i + 72*t]] * R[C[i + 72*t]] : R[B[i + 72*t]] + R[C[i + 72*t]];
R[i + 530*t] = Op[i + 73*t] ? R[B[i + 73*t]] * R[C[i + 73*t]] : R[B[i + 73*t]] + R[C[i + 73*t]];
R[i + 531*t] = Op[i + 74*t] ? R[B[i + 74*t]] * R[C[i + 74*t]] : R[B[i + 74*t]] + R[C[i + 74*t]];
R[i + 532*t] = Op[i + 75*t] ? R[B[i + 75*t]] * R[C[i + 75*t]] : R[B[i + 75*t]] + R[C[i + 75*t]];
R[i + 533*t] = Op[i + 76*t] ? R[B[i + 76*t]] * R[C[i + 76*t]] : R[B[i + 76*t]] + R[C[i + 76*t]];
R[i + 534*t] = Op[i + 77*t] ? R[B[i + 77*t]] * R[C[i + 77*t]] : R[B[i + 77*t]] + R[C[i + 77*t]];
R[i + 535*t] = Op[i + 78*t] ? R[B[i + 78*t]] * R[C[i + 78*t]] : R[B[i + 78*t]] + R[C[i + 78*t]];
R[i + 536*t] = Op[i + 79*t] ? R[B[i + 79*t]] * R[C[i + 79*t]] : R[B[i + 79*t]] + R[C[i + 79*t]];
R[i + 537*t] = Op[i + 80*t] ? R[B[i + 80*t]] * R[C[i + 80*t]] : R[B[i + 80*t]] + R[C[i + 80*t]];
R[i + 538*t] = Op[i + 81*t] ? R[B[i + 81*t]] * R[C[i + 81*t]] : R[B[i + 81*t]] + R[C[i + 81*t]];
R[i + 539*t] = Op[i + 82*t] ? R[B[i + 82*t]] * R[C[i + 82*t]] : R[B[i + 82*t]] + R[C[i + 82*t]];
R[i + 540*t] = Op[i + 83*t] ? R[B[i + 83*t]] * R[C[i + 83*t]] : R[B[i + 83*t]] + R[C[i + 83*t]];
R[i + 541*t] = Op[i + 84*t] ? R[B[i + 84*t]] * R[C[i + 84*t]] : R[B[i + 84*t]] + R[C[i + 84*t]];
R[i + 542*t] = Op[i + 85*t] ? R[B[i + 85*t]] * R[C[i + 85*t]] : R[B[i + 85*t]] + R[C[i + 85*t]];
R[i + 543*t] = Op[i + 86*t] ? R[B[i + 86*t]] * R[C[i + 86*t]] : R[B[i + 86*t]] + R[C[i + 86*t]];
R[i + 544*t] = Op[i + 87*t] ? R[B[i + 87*t]] * R[C[i + 87*t]] : R[B[i + 87*t]] + R[C[i + 87*t]];
R[i + 545*t] = Op[i + 88*t] ? R[B[i + 88*t]] * R[C[i + 88*t]] : R[B[i + 88*t]] + R[C[i + 88*t]];
R[i + 546*t] = Op[i + 89*t] ? R[B[i + 89*t]] * R[C[i + 89*t]] : R[B[i + 89*t]] + R[C[i + 89*t]];
R[i + 547*t] = Op[i + 90*t] ? R[B[i + 90*t]] * R[C[i + 90*t]] : R[B[i + 90*t]] + R[C[i + 90*t]];
R[i + 548*t] = Op[i + 91*t] ? R[B[i + 91*t]] * R[C[i + 91*t]] : R[B[i + 91*t]] + R[C[i + 91*t]];
R[i + 549*t] = Op[i + 92*t] ? R[B[i + 92*t]] * R[C[i + 92*t]] : R[B[i + 92*t]] + R[C[i + 92*t]];
R[i + 550*t] = Op[i + 93*t] ? R[B[i + 93*t]] * R[C[i + 93*t]] : R[B[i + 93*t]] + R[C[i + 93*t]];
R[i + 551*t] = Op[i + 94*t] ? R[B[i + 94*t]] * R[C[i + 94*t]] : R[B[i + 94*t]] + R[C[i + 94*t]];
R[i + 552*t] = Op[i + 95*t] ? R[B[i + 95*t]] * R[C[i + 95*t]] : R[B[i + 95*t]] + R[C[i + 95*t]];
R[i + 553*t] = Op[i + 96*t] ? R[B[i + 96*t]] * R[C[i + 96*t]] : R[B[i + 96*t]] + R[C[i + 96*t]];
R[i + 554*t] = Op[i + 97*t] ? R[B[i + 97*t]] * R[C[i + 97*t]] : R[B[i + 97*t]] + R[C[i + 97*t]];
R[i + 555*t] = Op[i + 98*t] ? R[B[i + 98*t]] * R[C[i + 98*t]] : R[B[i + 98*t]] + R[C[i + 98*t]];
R[i + 556*t] = Op[i + 99*t] ? R[B[i + 99*t]] * R[C[i + 99*t]] : R[B[i + 99*t]] + R[C[i + 99*t]];
R[i + 557*t] = Op[i + 100*t] ? R[B[i + 100*t]] * R[C[i + 100*t]] : R[B[i + 100*t]] + R[C[i + 100*t]];
R[i + 558*t] = Op[i + 101*t] ? R[B[i + 101*t]] * R[C[i + 101*t]] : R[B[i + 101*t]] + R[C[i + 101*t]];
R[i + 559*t] = Op[i + 102*t] ? R[B[i + 102*t]] * R[C[i + 102*t]] : R[B[i + 102*t]] + R[C[i + 102*t]];
R[i + 560*t] = Op[i + 103*t] ? R[B[i + 103*t]] * R[C[i + 103*t]] : R[B[i + 103*t]] + R[C[i + 103*t]];
R[i + 561*t] = Op[i + 104*t] ? R[B[i + 104*t]] * R[C[i + 104*t]] : R[B[i + 104*t]] + R[C[i + 104*t]];
R[i + 562*t] = Op[i + 105*t] ? R[B[i + 105*t]] * R[C[i + 105*t]] : R[B[i + 105*t]] + R[C[i + 105*t]];
R[i + 563*t] = Op[i + 106*t] ? R[B[i + 106*t]] * R[C[i + 106*t]] : R[B[i + 106*t]] + R[C[i + 106*t]];
R[i + 564*t] = Op[i + 107*t] ? R[B[i + 107*t]] * R[C[i + 107*t]] : R[B[i + 107*t]] + R[C[i + 107*t]];
R[i + 565*t] = Op[i + 108*t] ? R[B[i + 108*t]] * R[C[i + 108*t]] : R[B[i + 108*t]] + R[C[i + 108*t]];
R[i + 566*t] = Op[i + 109*t] ? R[B[i + 109*t]] * R[C[i + 109*t]] : R[B[i + 109*t]] + R[C[i + 109*t]];
R[i + 567*t] = Op[i + 110*t] ? R[B[i + 110*t]] * R[C[i + 110*t]] : R[B[i + 110*t]] + R[C[i + 110*t]];
R[i + 568*t] = Op[i + 111*t] ? R[B[i + 111*t]] * R[C[i + 111*t]] : R[B[i + 111*t]] + R[C[i + 111*t]];
R[i + 569*t] = Op[i + 112*t] ? R[B[i + 112*t]] * R[C[i + 112*t]] : R[B[i + 112*t]] + R[C[i + 112*t]];
R[i + 570*t] = Op[i + 113*t] ? R[B[i + 113*t]] * R[C[i + 113*t]] : R[B[i + 113*t]] + R[C[i + 113*t]];
R[i + 571*t] = Op[i + 114*t] ? R[B[i + 114*t]] * R[C[i + 114*t]] : R[B[i + 114*t]] + R[C[i + 114*t]];
R[i + 572*t] = Op[i + 115*t] ? R[B[i + 115*t]] * R[C[i + 115*t]] : R[B[i + 115*t]] + R[C[i + 115*t]];
R[i + 573*t] = Op[i + 116*t] ? R[B[i + 116*t]] * R[C[i + 116*t]] : R[B[i + 116*t]] + R[C[i + 116*t]];
R[i + 574*t] = Op[i + 117*t] ? R[B[i + 117*t]] * R[C[i + 117*t]] : R[B[i + 117*t]] + R[C[i + 117*t]];
R[i + 575*t] = Op[i + 118*t] ? R[B[i + 118*t]] * R[C[i + 118*t]] : R[B[i + 118*t]] + R[C[i + 118*t]];
R[i + 576*t] = Op[i + 119*t] ? R[B[i + 119*t]] * R[C[i + 119*t]] : R[B[i + 119*t]] + R[C[i + 119*t]];
R[i + 577*t] = Op[i + 120*t] ? R[B[i + 120*t]] * R[C[i + 120*t]] : R[B[i + 120*t]] + R[C[i + 120*t]];
R[i + 578*t] = Op[i + 121*t] ? R[B[i + 121*t]] * R[C[i + 121*t]] : R[B[i + 121*t]] + R[C[i + 121*t]];
R[i + 579*t] = Op[i + 122*t] ? R[B[i + 122*t]] * R[C[i + 122*t]] : R[B[i + 122*t]] + R[C[i + 122*t]];
R[i + 580*t] = Op[i + 123*t] ? R[B[i + 123*t]] * R[C[i + 123*t]] : R[B[i + 123*t]] + R[C[i + 123*t]];
R[i + 581*t] = Op[i + 124*t] ? R[B[i + 124*t]] * R[C[i + 124*t]] : R[B[i + 124*t]] + R[C[i + 124*t]];
R[i + 582*t] = Op[i + 125*t] ? R[B[i + 125*t]] * R[C[i + 125*t]] : R[B[i + 125*t]] + R[C[i + 125*t]];
R[i + 583*t] = Op[i + 126*t] ? R[B[i + 126*t]] * R[C[i + 126*t]] : R[B[i + 126*t]] + R[C[i + 126*t]];
R[i + 584*t] = Op[i + 127*t] ? R[B[i + 127*t]] * R[C[i + 127*t]] : R[B[i + 127*t]] + R[C[i + 127*t]];
R[i + 585*t] = Op[i + 128*t] ? R[B[i + 128*t]] * R[C[i + 128*t]] : R[B[i + 128*t]] + R[C[i + 128*t]];
R[i + 586*t] = Op[i + 129*t] ? R[B[i + 129*t]] * R[C[i + 129*t]] : R[B[i + 129*t]] + R[C[i + 129*t]];
R[i + 587*t] = Op[i + 130*t] ? R[B[i + 130*t]] * R[C[i + 130*t]] : R[B[i + 130*t]] + R[C[i + 130*t]];
R[i + 588*t] = Op[i + 131*t] ? R[B[i + 131*t]] * R[C[i + 131*t]] : R[B[i + 131*t]] + R[C[i + 131*t]];
R[i + 589*t] = Op[i + 132*t] ? R[B[i + 132*t]] * R[C[i + 132*t]] : R[B[i + 132*t]] + R[C[i + 132*t]];
R[i + 590*t] = Op[i + 133*t] ? R[B[i + 133*t]] * R[C[i + 133*t]] : R[B[i + 133*t]] + R[C[i + 133*t]];
R[i + 591*t] = Op[i + 134*t] ? R[B[i + 134*t]] * R[C[i + 134*t]] : R[B[i + 134*t]] + R[C[i + 134*t]];
R[i + 592*t] = Op[i + 135*t] ? R[B[i + 135*t]] * R[C[i + 135*t]] : R[B[i + 135*t]] + R[C[i + 135*t]];
R[i + 593*t] = Op[i + 136*t] ? R[B[i + 136*t]] * R[C[i + 136*t]] : R[B[i + 136*t]] + R[C[i + 136*t]];
R[i + 594*t] = Op[i + 137*t] ? R[B[i + 137*t]] * R[C[i + 137*t]] : R[B[i + 137*t]] + R[C[i + 137*t]];
R[i + 595*t] = Op[i + 138*t] ? R[B[i + 138*t]] * R[C[i + 138*t]] : R[B[i + 138*t]] + R[C[i + 138*t]];
R[i + 596*t] = Op[i + 139*t] ? R[B[i + 139*t]] * R[C[i + 139*t]] : R[B[i + 139*t]] + R[C[i + 139*t]];
R[i + 597*t] = Op[i + 140*t] ? R[B[i + 140*t]] * R[C[i + 140*t]] : R[B[i + 140*t]] + R[C[i + 140*t]];
__syncthreads();
R[i + 598*t] = Op[i + 141*t] ? R[B[i + 141*t]] * R[C[i + 141*t]] : R[B[i + 141*t]] + R[C[i + 141*t]];
R[i + 599*t] = Op[i + 142*t] ? R[B[i + 142*t]] * R[C[i + 142*t]] : R[B[i + 142*t]] + R[C[i + 142*t]];
R[i + 600*t] = Op[i + 143*t] ? R[B[i + 143*t]] * R[C[i + 143*t]] : R[B[i + 143*t]] + R[C[i + 143*t]];
R[i + 601*t] = Op[i + 144*t] ? R[B[i + 144*t]] * R[C[i + 144*t]] : R[B[i + 144*t]] + R[C[i + 144*t]];
R[i + 602*t] = Op[i + 145*t] ? R[B[i + 145*t]] * R[C[i + 145*t]] : R[B[i + 145*t]] + R[C[i + 145*t]];
R[i + 603*t] = Op[i + 146*t] ? R[B[i + 146*t]] * R[C[i + 146*t]] : R[B[i + 146*t]] + R[C[i + 146*t]];
R[i + 604*t] = Op[i + 147*t] ? R[B[i + 147*t]] * R[C[i + 147*t]] : R[B[i + 147*t]] + R[C[i + 147*t]];
R[i + 605*t] = Op[i + 148*t] ? R[B[i + 148*t]] * R[C[i + 148*t]] : R[B[i + 148*t]] + R[C[i + 148*t]];
R[i + 606*t] = Op[i + 149*t] ? R[B[i + 149*t]] * R[C[i + 149*t]] : R[B[i + 149*t]] + R[C[i + 149*t]];
R[i + 607*t] = Op[i + 150*t] ? R[B[i + 150*t]] * R[C[i + 150*t]] : R[B[i + 150*t]] + R[C[i + 150*t]];
R[i + 608*t] = Op[i + 151*t] ? R[B[i + 151*t]] * R[C[i + 151*t]] : R[B[i + 151*t]] + R[C[i + 151*t]];
R[i + 609*t] = Op[i + 152*t] ? R[B[i + 152*t]] * R[C[i + 152*t]] : R[B[i + 152*t]] + R[C[i + 152*t]];
R[i + 610*t] = Op[i + 153*t] ? R[B[i + 153*t]] * R[C[i + 153*t]] : R[B[i + 153*t]] + R[C[i + 153*t]];
R[i + 611*t] = Op[i + 154*t] ? R[B[i + 154*t]] * R[C[i + 154*t]] : R[B[i + 154*t]] + R[C[i + 154*t]];
R[i + 612*t] = Op[i + 155*t] ? R[B[i + 155*t]] * R[C[i + 155*t]] : R[B[i + 155*t]] + R[C[i + 155*t]];
R[i + 613*t] = Op[i + 156*t] ? R[B[i + 156*t]] * R[C[i + 156*t]] : R[B[i + 156*t]] + R[C[i + 156*t]];
R[i + 614*t] = Op[i + 157*t] ? R[B[i + 157*t]] * R[C[i + 157*t]] : R[B[i + 157*t]] + R[C[i + 157*t]];
R[i + 615*t] = Op[i + 158*t] ? R[B[i + 158*t]] * R[C[i + 158*t]] : R[B[i + 158*t]] + R[C[i + 158*t]];
R[i + 616*t] = Op[i + 159*t] ? R[B[i + 159*t]] * R[C[i + 159*t]] : R[B[i + 159*t]] + R[C[i + 159*t]];
R[i + 617*t] = Op[i + 160*t] ? R[B[i + 160*t]] * R[C[i + 160*t]] : R[B[i + 160*t]] + R[C[i + 160*t]];
R[i + 618*t] = Op[i + 161*t] ? R[B[i + 161*t]] * R[C[i + 161*t]] : R[B[i + 161*t]] + R[C[i + 161*t]];
R[i + 619*t] = Op[i + 162*t] ? R[B[i + 162*t]] * R[C[i + 162*t]] : R[B[i + 162*t]] + R[C[i + 162*t]];
R[i + 620*t] = Op[i + 163*t] ? R[B[i + 163*t]] * R[C[i + 163*t]] : R[B[i + 163*t]] + R[C[i + 163*t]];
R[i + 621*t] = Op[i + 164*t] ? R[B[i + 164*t]] * R[C[i + 164*t]] : R[B[i + 164*t]] + R[C[i + 164*t]];
R[i + 622*t] = Op[i + 165*t] ? R[B[i + 165*t]] * R[C[i + 165*t]] : R[B[i + 165*t]] + R[C[i + 165*t]];
R[i + 623*t] = Op[i + 166*t] ? R[B[i + 166*t]] * R[C[i + 166*t]] : R[B[i + 166*t]] + R[C[i + 166*t]];
R[i + 624*t] = Op[i + 167*t] ? R[B[i + 167*t]] * R[C[i + 167*t]] : R[B[i + 167*t]] + R[C[i + 167*t]];
R[i + 625*t] = Op[i + 168*t] ? R[B[i + 168*t]] * R[C[i + 168*t]] : R[B[i + 168*t]] + R[C[i + 168*t]];
R[i + 626*t] = Op[i + 169*t] ? R[B[i + 169*t]] * R[C[i + 169*t]] : R[B[i + 169*t]] + R[C[i + 169*t]];
R[i + 627*t] = Op[i + 170*t] ? R[B[i + 170*t]] * R[C[i + 170*t]] : R[B[i + 170*t]] + R[C[i + 170*t]];
R[i + 628*t] = Op[i + 171*t] ? R[B[i + 171*t]] * R[C[i + 171*t]] : R[B[i + 171*t]] + R[C[i + 171*t]];
R[i + 629*t] = Op[i + 172*t] ? R[B[i + 172*t]] * R[C[i + 172*t]] : R[B[i + 172*t]] + R[C[i + 172*t]];
R[i + 630*t] = Op[i + 173*t] ? R[B[i + 173*t]] * R[C[i + 173*t]] : R[B[i + 173*t]] + R[C[i + 173*t]];
R[i + 631*t] = Op[i + 174*t] ? R[B[i + 174*t]] * R[C[i + 174*t]] : R[B[i + 174*t]] + R[C[i + 174*t]];
R[i + 632*t] = Op[i + 175*t] ? R[B[i + 175*t]] * R[C[i + 175*t]] : R[B[i + 175*t]] + R[C[i + 175*t]];
R[i + 633*t] = Op[i + 176*t] ? R[B[i + 176*t]] * R[C[i + 176*t]] : R[B[i + 176*t]] + R[C[i + 176*t]];
R[i + 634*t] = Op[i + 177*t] ? R[B[i + 177*t]] * R[C[i + 177*t]] : R[B[i + 177*t]] + R[C[i + 177*t]];
R[i + 635*t] = Op[i + 178*t] ? R[B[i + 178*t]] * R[C[i + 178*t]] : R[B[i + 178*t]] + R[C[i + 178*t]];
R[i + 636*t] = Op[i + 179*t] ? R[B[i + 179*t]] * R[C[i + 179*t]] : R[B[i + 179*t]] + R[C[i + 179*t]];
R[i + 637*t] = Op[i + 180*t] ? R[B[i + 180*t]] * R[C[i + 180*t]] : R[B[i + 180*t]] + R[C[i + 180*t]];
R[i + 638*t] = Op[i + 181*t] ? R[B[i + 181*t]] * R[C[i + 181*t]] : R[B[i + 181*t]] + R[C[i + 181*t]];
R[i + 639*t] = Op[i + 182*t] ? R[B[i + 182*t]] * R[C[i + 182*t]] : R[B[i + 182*t]] + R[C[i + 182*t]];
R[i + 640*t] = Op[i + 183*t] ? R[B[i + 183*t]] * R[C[i + 183*t]] : R[B[i + 183*t]] + R[C[i + 183*t]];
R[i + 641*t] = Op[i + 184*t] ? R[B[i + 184*t]] * R[C[i + 184*t]] : R[B[i + 184*t]] + R[C[i + 184*t]];
R[i + 642*t] = Op[i + 185*t] ? R[B[i + 185*t]] * R[C[i + 185*t]] : R[B[i + 185*t]] + R[C[i + 185*t]];
R[i + 643*t] = Op[i + 186*t] ? R[B[i + 186*t]] * R[C[i + 186*t]] : R[B[i + 186*t]] + R[C[i + 186*t]];
R[i + 644*t] = Op[i + 187*t] ? R[B[i + 187*t]] * R[C[i + 187*t]] : R[B[i + 187*t]] + R[C[i + 187*t]];
R[i + 645*t] = Op[i + 188*t] ? R[B[i + 188*t]] * R[C[i + 188*t]] : R[B[i + 188*t]] + R[C[i + 188*t]];
R[i + 646*t] = Op[i + 189*t] ? R[B[i + 189*t]] * R[C[i + 189*t]] : R[B[i + 189*t]] + R[C[i + 189*t]];
R[i + 647*t] = Op[i + 190*t] ? R[B[i + 190*t]] * R[C[i + 190*t]] : R[B[i + 190*t]] + R[C[i + 190*t]];
R[i + 648*t] = Op[i + 191*t] ? R[B[i + 191*t]] * R[C[i + 191*t]] : R[B[i + 191*t]] + R[C[i + 191*t]];
R[i + 649*t] = Op[i + 192*t] ? R[B[i + 192*t]] * R[C[i + 192*t]] : R[B[i + 192*t]] + R[C[i + 192*t]];
R[i + 650*t] = Op[i + 193*t] ? R[B[i + 193*t]] * R[C[i + 193*t]] : R[B[i + 193*t]] + R[C[i + 193*t]];
R[i + 651*t] = Op[i + 194*t] ? R[B[i + 194*t]] * R[C[i + 194*t]] : R[B[i + 194*t]] + R[C[i + 194*t]];
R[i + 652*t] = Op[i + 195*t] ? R[B[i + 195*t]] * R[C[i + 195*t]] : R[B[i + 195*t]] + R[C[i + 195*t]];
R[i + 653*t] = Op[i + 196*t] ? R[B[i + 196*t]] * R[C[i + 196*t]] : R[B[i + 196*t]] + R[C[i + 196*t]];
R[i + 654*t] = Op[i + 197*t] ? R[B[i + 197*t]] * R[C[i + 197*t]] : R[B[i + 197*t]] + R[C[i + 197*t]];
R[i + 655*t] = Op[i + 198*t] ? R[B[i + 198*t]] * R[C[i + 198*t]] : R[B[i + 198*t]] + R[C[i + 198*t]];
R[i + 656*t] = Op[i + 199*t] ? R[B[i + 199*t]] * R[C[i + 199*t]] : R[B[i + 199*t]] + R[C[i + 199*t]];
R[i + 657*t] = Op[i + 200*t] ? R[B[i + 200*t]] * R[C[i + 200*t]] : R[B[i + 200*t]] + R[C[i + 200*t]];
R[i + 658*t] = Op[i + 201*t] ? R[B[i + 201*t]] * R[C[i + 201*t]] : R[B[i + 201*t]] + R[C[i + 201*t]];
R[i + 659*t] = Op[i + 202*t] ? R[B[i + 202*t]] * R[C[i + 202*t]] : R[B[i + 202*t]] + R[C[i + 202*t]];
R[i + 660*t] = Op[i + 203*t] ? R[B[i + 203*t]] * R[C[i + 203*t]] : R[B[i + 203*t]] + R[C[i + 203*t]];
R[i + 661*t] = Op[i + 204*t] ? R[B[i + 204*t]] * R[C[i + 204*t]] : R[B[i + 204*t]] + R[C[i + 204*t]];
R[i + 662*t] = Op[i + 205*t] ? R[B[i + 205*t]] * R[C[i + 205*t]] : R[B[i + 205*t]] + R[C[i + 205*t]];
R[i + 663*t] = Op[i + 206*t] ? R[B[i + 206*t]] * R[C[i + 206*t]] : R[B[i + 206*t]] + R[C[i + 206*t]];
R[i + 664*t] = Op[i + 207*t] ? R[B[i + 207*t]] * R[C[i + 207*t]] : R[B[i + 207*t]] + R[C[i + 207*t]];
R[i + 665*t] = Op[i + 208*t] ? R[B[i + 208*t]] * R[C[i + 208*t]] : R[B[i + 208*t]] + R[C[i + 208*t]];
R[i + 666*t] = Op[i + 209*t] ? R[B[i + 209*t]] * R[C[i + 209*t]] : R[B[i + 209*t]] + R[C[i + 209*t]];
R[i + 667*t] = Op[i + 210*t] ? R[B[i + 210*t]] * R[C[i + 210*t]] : R[B[i + 210*t]] + R[C[i + 210*t]];
R[i + 668*t] = Op[i + 211*t] ? R[B[i + 211*t]] * R[C[i + 211*t]] : R[B[i + 211*t]] + R[C[i + 211*t]];
R[i + 669*t] = Op[i + 212*t] ? R[B[i + 212*t]] * R[C[i + 212*t]] : R[B[i + 212*t]] + R[C[i + 212*t]];
R[i + 670*t] = Op[i + 213*t] ? R[B[i + 213*t]] * R[C[i + 213*t]] : R[B[i + 213*t]] + R[C[i + 213*t]];
R[i + 671*t] = Op[i + 214*t] ? R[B[i + 214*t]] * R[C[i + 214*t]] : R[B[i + 214*t]] + R[C[i + 214*t]];
R[i + 672*t] = Op[i + 215*t] ? R[B[i + 215*t]] * R[C[i + 215*t]] : R[B[i + 215*t]] + R[C[i + 215*t]];
R[i + 673*t] = Op[i + 216*t] ? R[B[i + 216*t]] * R[C[i + 216*t]] : R[B[i + 216*t]] + R[C[i + 216*t]];
R[i + 674*t] = Op[i + 217*t] ? R[B[i + 217*t]] * R[C[i + 217*t]] : R[B[i + 217*t]] + R[C[i + 217*t]];
R[i + 675*t] = Op[i + 218*t] ? R[B[i + 218*t]] * R[C[i + 218*t]] : R[B[i + 218*t]] + R[C[i + 218*t]];
R[i + 676*t] = Op[i + 219*t] ? R[B[i + 219*t]] * R[C[i + 219*t]] : R[B[i + 219*t]] + R[C[i + 219*t]];
R[i + 677*t] = Op[i + 220*t] ? R[B[i + 220*t]] * R[C[i + 220*t]] : R[B[i + 220*t]] + R[C[i + 220*t]];
R[i + 678*t] = Op[i + 221*t] ? R[B[i + 221*t]] * R[C[i + 221*t]] : R[B[i + 221*t]] + R[C[i + 221*t]];
R[i + 679*t] = Op[i + 222*t] ? R[B[i + 222*t]] * R[C[i + 222*t]] : R[B[i + 222*t]] + R[C[i + 222*t]];
__syncthreads();
R[i + 680*t] = Op[i + 223*t] ? R[B[i + 223*t]] * R[C[i + 223*t]] : R[B[i + 223*t]] + R[C[i + 223*t]];
R[i + 681*t] = Op[i + 224*t] ? R[B[i + 224*t]] * R[C[i + 224*t]] : R[B[i + 224*t]] + R[C[i + 224*t]];
R[i + 682*t] = Op[i + 225*t] ? R[B[i + 225*t]] * R[C[i + 225*t]] : R[B[i + 225*t]] + R[C[i + 225*t]];
R[i + 683*t] = Op[i + 226*t] ? R[B[i + 226*t]] * R[C[i + 226*t]] : R[B[i + 226*t]] + R[C[i + 226*t]];
R[i + 684*t] = Op[i + 227*t] ? R[B[i + 227*t]] * R[C[i + 227*t]] : R[B[i + 227*t]] + R[C[i + 227*t]];
R[i + 685*t] = Op[i + 228*t] ? R[B[i + 228*t]] * R[C[i + 228*t]] : R[B[i + 228*t]] + R[C[i + 228*t]];
R[i + 686*t] = Op[i + 229*t] ? R[B[i + 229*t]] * R[C[i + 229*t]] : R[B[i + 229*t]] + R[C[i + 229*t]];
R[i + 687*t] = Op[i + 230*t] ? R[B[i + 230*t]] * R[C[i + 230*t]] : R[B[i + 230*t]] + R[C[i + 230*t]];
R[i + 688*t] = Op[i + 231*t] ? R[B[i + 231*t]] * R[C[i + 231*t]] : R[B[i + 231*t]] + R[C[i + 231*t]];
R[i + 689*t] = Op[i + 232*t] ? R[B[i + 232*t]] * R[C[i + 232*t]] : R[B[i + 232*t]] + R[C[i + 232*t]];
R[i + 690*t] = Op[i + 233*t] ? R[B[i + 233*t]] * R[C[i + 233*t]] : R[B[i + 233*t]] + R[C[i + 233*t]];
R[i + 691*t] = Op[i + 234*t] ? R[B[i + 234*t]] * R[C[i + 234*t]] : R[B[i + 234*t]] + R[C[i + 234*t]];
R[i + 692*t] = Op[i + 235*t] ? R[B[i + 235*t]] * R[C[i + 235*t]] : R[B[i + 235*t]] + R[C[i + 235*t]];
R[i + 693*t] = Op[i + 236*t] ? R[B[i + 236*t]] * R[C[i + 236*t]] : R[B[i + 236*t]] + R[C[i + 236*t]];
R[i + 694*t] = Op[i + 237*t] ? R[B[i + 237*t]] * R[C[i + 237*t]] : R[B[i + 237*t]] + R[C[i + 237*t]];
R[i + 695*t] = Op[i + 238*t] ? R[B[i + 238*t]] * R[C[i + 238*t]] : R[B[i + 238*t]] + R[C[i + 238*t]];
R[i + 696*t] = Op[i + 239*t] ? R[B[i + 239*t]] * R[C[i + 239*t]] : R[B[i + 239*t]] + R[C[i + 239*t]];
R[i + 697*t] = Op[i + 240*t] ? R[B[i + 240*t]] * R[C[i + 240*t]] : R[B[i + 240*t]] + R[C[i + 240*t]];
R[i + 698*t] = Op[i + 241*t] ? R[B[i + 241*t]] * R[C[i + 241*t]] : R[B[i + 241*t]] + R[C[i + 241*t]];
R[i + 699*t] = Op[i + 242*t] ? R[B[i + 242*t]] * R[C[i + 242*t]] : R[B[i + 242*t]] + R[C[i + 242*t]];
R[i + 700*t] = Op[i + 243*t] ? R[B[i + 243*t]] * R[C[i + 243*t]] : R[B[i + 243*t]] + R[C[i + 243*t]];
R[i + 701*t] = Op[i + 244*t] ? R[B[i + 244*t]] * R[C[i + 244*t]] : R[B[i + 244*t]] + R[C[i + 244*t]];
R[i + 702*t] = Op[i + 245*t] ? R[B[i + 245*t]] * R[C[i + 245*t]] : R[B[i + 245*t]] + R[C[i + 245*t]];
R[i + 703*t] = Op[i + 246*t] ? R[B[i + 246*t]] * R[C[i + 246*t]] : R[B[i + 246*t]] + R[C[i + 246*t]];
R[i + 704*t] = Op[i + 247*t] ? R[B[i + 247*t]] * R[C[i + 247*t]] : R[B[i + 247*t]] + R[C[i + 247*t]];
R[i + 705*t] = Op[i + 248*t] ? R[B[i + 248*t]] * R[C[i + 248*t]] : R[B[i + 248*t]] + R[C[i + 248*t]];
R[i + 706*t] = Op[i + 249*t] ? R[B[i + 249*t]] * R[C[i + 249*t]] : R[B[i + 249*t]] + R[C[i + 249*t]];
R[i + 707*t] = Op[i + 250*t] ? R[B[i + 250*t]] * R[C[i + 250*t]] : R[B[i + 250*t]] + R[C[i + 250*t]];
R[i + 708*t] = Op[i + 251*t] ? R[B[i + 251*t]] * R[C[i + 251*t]] : R[B[i + 251*t]] + R[C[i + 251*t]];
R[i + 709*t] = Op[i + 252*t] ? R[B[i + 252*t]] * R[C[i + 252*t]] : R[B[i + 252*t]] + R[C[i + 252*t]];
R[i + 710*t] = Op[i + 253*t] ? R[B[i + 253*t]] * R[C[i + 253*t]] : R[B[i + 253*t]] + R[C[i + 253*t]];
R[i + 711*t] = Op[i + 254*t] ? R[B[i + 254*t]] * R[C[i + 254*t]] : R[B[i + 254*t]] + R[C[i + 254*t]];
R[i + 712*t] = Op[i + 255*t] ? R[B[i + 255*t]] * R[C[i + 255*t]] : R[B[i + 255*t]] + R[C[i + 255*t]];
R[i + 713*t] = Op[i + 256*t] ? R[B[i + 256*t]] * R[C[i + 256*t]] : R[B[i + 256*t]] + R[C[i + 256*t]];
R[i + 714*t] = Op[i + 257*t] ? R[B[i + 257*t]] * R[C[i + 257*t]] : R[B[i + 257*t]] + R[C[i + 257*t]];
R[i + 715*t] = Op[i + 258*t] ? R[B[i + 258*t]] * R[C[i + 258*t]] : R[B[i + 258*t]] + R[C[i + 258*t]];
R[i + 716*t] = Op[i + 259*t] ? R[B[i + 259*t]] * R[C[i + 259*t]] : R[B[i + 259*t]] + R[C[i + 259*t]];
R[i + 717*t] = Op[i + 260*t] ? R[B[i + 260*t]] * R[C[i + 260*t]] : R[B[i + 260*t]] + R[C[i + 260*t]];
R[i + 718*t] = Op[i + 261*t] ? R[B[i + 261*t]] * R[C[i + 261*t]] : R[B[i + 261*t]] + R[C[i + 261*t]];
R[i + 719*t] = Op[i + 262*t] ? R[B[i + 262*t]] * R[C[i + 262*t]] : R[B[i + 262*t]] + R[C[i + 262*t]];
R[i + 720*t] = Op[i + 263*t] ? R[B[i + 263*t]] * R[C[i + 263*t]] : R[B[i + 263*t]] + R[C[i + 263*t]];
R[i + 721*t] = Op[i + 264*t] ? R[B[i + 264*t]] * R[C[i + 264*t]] : R[B[i + 264*t]] + R[C[i + 264*t]];
R[i + 722*t] = Op[i + 265*t] ? R[B[i + 265*t]] * R[C[i + 265*t]] : R[B[i + 265*t]] + R[C[i + 265*t]];
R[i + 723*t] = Op[i + 266*t] ? R[B[i + 266*t]] * R[C[i + 266*t]] : R[B[i + 266*t]] + R[C[i + 266*t]];
R[i + 724*t] = Op[i + 267*t] ? R[B[i + 267*t]] * R[C[i + 267*t]] : R[B[i + 267*t]] + R[C[i + 267*t]];
R[i + 725*t] = Op[i + 268*t] ? R[B[i + 268*t]] * R[C[i + 268*t]] : R[B[i + 268*t]] + R[C[i + 268*t]];
R[i + 726*t] = Op[i + 269*t] ? R[B[i + 269*t]] * R[C[i + 269*t]] : R[B[i + 269*t]] + R[C[i + 269*t]];
R[i + 727*t] = Op[i + 270*t] ? R[B[i + 270*t]] * R[C[i + 270*t]] : R[B[i + 270*t]] + R[C[i + 270*t]];
R[i + 728*t] = Op[i + 271*t] ? R[B[i + 271*t]] * R[C[i + 271*t]] : R[B[i + 271*t]] + R[C[i + 271*t]];
R[i + 729*t] = Op[i + 272*t] ? R[B[i + 272*t]] * R[C[i + 272*t]] : R[B[i + 272*t]] + R[C[i + 272*t]];
R[i + 730*t] = Op[i + 273*t] ? R[B[i + 273*t]] * R[C[i + 273*t]] : R[B[i + 273*t]] + R[C[i + 273*t]];
R[i + 731*t] = Op[i + 274*t] ? R[B[i + 274*t]] * R[C[i + 274*t]] : R[B[i + 274*t]] + R[C[i + 274*t]];
R[i + 732*t] = Op[i + 275*t] ? R[B[i + 275*t]] * R[C[i + 275*t]] : R[B[i + 275*t]] + R[C[i + 275*t]];
R[i + 733*t] = Op[i + 276*t] ? R[B[i + 276*t]] * R[C[i + 276*t]] : R[B[i + 276*t]] + R[C[i + 276*t]];
R[i + 734*t] = Op[i + 277*t] ? R[B[i + 277*t]] * R[C[i + 277*t]] : R[B[i + 277*t]] + R[C[i + 277*t]];
R[i + 735*t] = Op[i + 278*t] ? R[B[i + 278*t]] * R[C[i + 278*t]] : R[B[i + 278*t]] + R[C[i + 278*t]];
R[i + 736*t] = Op[i + 279*t] ? R[B[i + 279*t]] * R[C[i + 279*t]] : R[B[i + 279*t]] + R[C[i + 279*t]];
R[i + 737*t] = Op[i + 280*t] ? R[B[i + 280*t]] * R[C[i + 280*t]] : R[B[i + 280*t]] + R[C[i + 280*t]];
R[i + 738*t] = Op[i + 281*t] ? R[B[i + 281*t]] * R[C[i + 281*t]] : R[B[i + 281*t]] + R[C[i + 281*t]];
R[i + 739*t] = Op[i + 282*t] ? R[B[i + 282*t]] * R[C[i + 282*t]] : R[B[i + 282*t]] + R[C[i + 282*t]];
R[i + 740*t] = Op[i + 283*t] ? R[B[i + 283*t]] * R[C[i + 283*t]] : R[B[i + 283*t]] + R[C[i + 283*t]];
R[i + 741*t] = Op[i + 284*t] ? R[B[i + 284*t]] * R[C[i + 284*t]] : R[B[i + 284*t]] + R[C[i + 284*t]];
R[i + 742*t] = Op[i + 285*t] ? R[B[i + 285*t]] * R[C[i + 285*t]] : R[B[i + 285*t]] + R[C[i + 285*t]];
R[i + 743*t] = Op[i + 286*t] ? R[B[i + 286*t]] * R[C[i + 286*t]] : R[B[i + 286*t]] + R[C[i + 286*t]];
R[i + 744*t] = Op[i + 287*t] ? R[B[i + 287*t]] * R[C[i + 287*t]] : R[B[i + 287*t]] + R[C[i + 287*t]];
R[i + 745*t] = Op[i + 288*t] ? R[B[i + 288*t]] * R[C[i + 288*t]] : R[B[i + 288*t]] + R[C[i + 288*t]];
R[i + 746*t] = Op[i + 289*t] ? R[B[i + 289*t]] * R[C[i + 289*t]] : R[B[i + 289*t]] + R[C[i + 289*t]];
R[i + 747*t] = Op[i + 290*t] ? R[B[i + 290*t]] * R[C[i + 290*t]] : R[B[i + 290*t]] + R[C[i + 290*t]];
R[i + 748*t] = Op[i + 291*t] ? R[B[i + 291*t]] * R[C[i + 291*t]] : R[B[i + 291*t]] + R[C[i + 291*t]];
R[i + 749*t] = Op[i + 292*t] ? R[B[i + 292*t]] * R[C[i + 292*t]] : R[B[i + 292*t]] + R[C[i + 292*t]];
R[i + 750*t] = Op[i + 293*t] ? R[B[i + 293*t]] * R[C[i + 293*t]] : R[B[i + 293*t]] + R[C[i + 293*t]];
R[i + 751*t] = Op[i + 294*t] ? R[B[i + 294*t]] * R[C[i + 294*t]] : R[B[i + 294*t]] + R[C[i + 294*t]];
__syncthreads();
R[i + 752*t] = Op[i + 295*t] ? R[B[i + 295*t]] * R[C[i + 295*t]] : R[B[i + 295*t]] + R[C[i + 295*t]];
R[i + 753*t] = Op[i + 296*t] ? R[B[i + 296*t]] * R[C[i + 296*t]] : R[B[i + 296*t]] + R[C[i + 296*t]];
R[i + 754*t] = Op[i + 297*t] ? R[B[i + 297*t]] * R[C[i + 297*t]] : R[B[i + 297*t]] + R[C[i + 297*t]];
R[i + 755*t] = Op[i + 298*t] ? R[B[i + 298*t]] * R[C[i + 298*t]] : R[B[i + 298*t]] + R[C[i + 298*t]];
R[i + 756*t] = Op[i + 299*t] ? R[B[i + 299*t]] * R[C[i + 299*t]] : R[B[i + 299*t]] + R[C[i + 299*t]];
R[i + 757*t] = Op[i + 300*t] ? R[B[i + 300*t]] * R[C[i + 300*t]] : R[B[i + 300*t]] + R[C[i + 300*t]];
R[i + 758*t] = Op[i + 301*t] ? R[B[i + 301*t]] * R[C[i + 301*t]] : R[B[i + 301*t]] + R[C[i + 301*t]];
R[i + 759*t] = Op[i + 302*t] ? R[B[i + 302*t]] * R[C[i + 302*t]] : R[B[i + 302*t]] + R[C[i + 302*t]];
R[i + 760*t] = Op[i + 303*t] ? R[B[i + 303*t]] * R[C[i + 303*t]] : R[B[i + 303*t]] + R[C[i + 303*t]];
R[i + 761*t] = Op[i + 304*t] ? R[B[i + 304*t]] * R[C[i + 304*t]] : R[B[i + 304*t]] + R[C[i + 304*t]];
R[i + 762*t] = Op[i + 305*t] ? R[B[i + 305*t]] * R[C[i + 305*t]] : R[B[i + 305*t]] + R[C[i + 305*t]];
R[i + 763*t] = Op[i + 306*t] ? R[B[i + 306*t]] * R[C[i + 306*t]] : R[B[i + 306*t]] + R[C[i + 306*t]];
R[i + 764*t] = Op[i + 307*t] ? R[B[i + 307*t]] * R[C[i + 307*t]] : R[B[i + 307*t]] + R[C[i + 307*t]];
R[i + 765*t] = Op[i + 308*t] ? R[B[i + 308*t]] * R[C[i + 308*t]] : R[B[i + 308*t]] + R[C[i + 308*t]];
R[i + 766*t] = Op[i + 309*t] ? R[B[i + 309*t]] * R[C[i + 309*t]] : R[B[i + 309*t]] + R[C[i + 309*t]];
R[i + 767*t] = Op[i + 310*t] ? R[B[i + 310*t]] * R[C[i + 310*t]] : R[B[i + 310*t]] + R[C[i + 310*t]];
R[i + 768*t] = Op[i + 311*t] ? R[B[i + 311*t]] * R[C[i + 311*t]] : R[B[i + 311*t]] + R[C[i + 311*t]];
R[i + 769*t] = Op[i + 312*t] ? R[B[i + 312*t]] * R[C[i + 312*t]] : R[B[i + 312*t]] + R[C[i + 312*t]];
R[i + 770*t] = Op[i + 313*t] ? R[B[i + 313*t]] * R[C[i + 313*t]] : R[B[i + 313*t]] + R[C[i + 313*t]];
R[i + 771*t] = Op[i + 314*t] ? R[B[i + 314*t]] * R[C[i + 314*t]] : R[B[i + 314*t]] + R[C[i + 314*t]];
R[i + 772*t] = Op[i + 315*t] ? R[B[i + 315*t]] * R[C[i + 315*t]] : R[B[i + 315*t]] + R[C[i + 315*t]];
R[i + 773*t] = Op[i + 316*t] ? R[B[i + 316*t]] * R[C[i + 316*t]] : R[B[i + 316*t]] + R[C[i + 316*t]];
R[i + 774*t] = Op[i + 317*t] ? R[B[i + 317*t]] * R[C[i + 317*t]] : R[B[i + 317*t]] + R[C[i + 317*t]];
R[i + 775*t] = Op[i + 318*t] ? R[B[i + 318*t]] * R[C[i + 318*t]] : R[B[i + 318*t]] + R[C[i + 318*t]];
R[i + 776*t] = Op[i + 319*t] ? R[B[i + 319*t]] * R[C[i + 319*t]] : R[B[i + 319*t]] + R[C[i + 319*t]];
R[i + 777*t] = Op[i + 320*t] ? R[B[i + 320*t]] * R[C[i + 320*t]] : R[B[i + 320*t]] + R[C[i + 320*t]];
R[i + 778*t] = Op[i + 321*t] ? R[B[i + 321*t]] * R[C[i + 321*t]] : R[B[i + 321*t]] + R[C[i + 321*t]];
R[i + 779*t] = Op[i + 322*t] ? R[B[i + 322*t]] * R[C[i + 322*t]] : R[B[i + 322*t]] + R[C[i + 322*t]];
R[i + 780*t] = Op[i + 323*t] ? R[B[i + 323*t]] * R[C[i + 323*t]] : R[B[i + 323*t]] + R[C[i + 323*t]];
R[i + 781*t] = Op[i + 324*t] ? R[B[i + 324*t]] * R[C[i + 324*t]] : R[B[i + 324*t]] + R[C[i + 324*t]];
R[i + 782*t] = Op[i + 325*t] ? R[B[i + 325*t]] * R[C[i + 325*t]] : R[B[i + 325*t]] + R[C[i + 325*t]];
R[i + 783*t] = Op[i + 326*t] ? R[B[i + 326*t]] * R[C[i + 326*t]] : R[B[i + 326*t]] + R[C[i + 326*t]];
R[i + 784*t] = Op[i + 327*t] ? R[B[i + 327*t]] * R[C[i + 327*t]] : R[B[i + 327*t]] + R[C[i + 327*t]];
R[i + 785*t] = Op[i + 328*t] ? R[B[i + 328*t]] * R[C[i + 328*t]] : R[B[i + 328*t]] + R[C[i + 328*t]];
R[i + 786*t] = Op[i + 329*t] ? R[B[i + 329*t]] * R[C[i + 329*t]] : R[B[i + 329*t]] + R[C[i + 329*t]];
R[i + 787*t] = Op[i + 330*t] ? R[B[i + 330*t]] * R[C[i + 330*t]] : R[B[i + 330*t]] + R[C[i + 330*t]];
R[i + 788*t] = Op[i + 331*t] ? R[B[i + 331*t]] * R[C[i + 331*t]] : R[B[i + 331*t]] + R[C[i + 331*t]];
R[i + 789*t] = Op[i + 332*t] ? R[B[i + 332*t]] * R[C[i + 332*t]] : R[B[i + 332*t]] + R[C[i + 332*t]];
R[i + 790*t] = Op[i + 333*t] ? R[B[i + 333*t]] * R[C[i + 333*t]] : R[B[i + 333*t]] + R[C[i + 333*t]];
R[i + 791*t] = Op[i + 334*t] ? R[B[i + 334*t]] * R[C[i + 334*t]] : R[B[i + 334*t]] + R[C[i + 334*t]];
R[i + 792*t] = Op[i + 335*t] ? R[B[i + 335*t]] * R[C[i + 335*t]] : R[B[i + 335*t]] + R[C[i + 335*t]];
R[i + 793*t] = Op[i + 336*t] ? R[B[i + 336*t]] * R[C[i + 336*t]] : R[B[i + 336*t]] + R[C[i + 336*t]];
R[i + 794*t] = Op[i + 337*t] ? R[B[i + 337*t]] * R[C[i + 337*t]] : R[B[i + 337*t]] + R[C[i + 337*t]];
R[i + 795*t] = Op[i + 338*t] ? R[B[i + 338*t]] * R[C[i + 338*t]] : R[B[i + 338*t]] + R[C[i + 338*t]];
R[i + 796*t] = Op[i + 339*t] ? R[B[i + 339*t]] * R[C[i + 339*t]] : R[B[i + 339*t]] + R[C[i + 339*t]];
R[i + 797*t] = Op[i + 340*t] ? R[B[i + 340*t]] * R[C[i + 340*t]] : R[B[i + 340*t]] + R[C[i + 340*t]];
R[i + 798*t] = Op[i + 341*t] ? R[B[i + 341*t]] * R[C[i + 341*t]] : R[B[i + 341*t]] + R[C[i + 341*t]];
R[i + 799*t] = Op[i + 342*t] ? R[B[i + 342*t]] * R[C[i + 342*t]] : R[B[i + 342*t]] + R[C[i + 342*t]];
R[i + 800*t] = Op[i + 343*t] ? R[B[i + 343*t]] * R[C[i + 343*t]] : R[B[i + 343*t]] + R[C[i + 343*t]];
R[i + 801*t] = Op[i + 344*t] ? R[B[i + 344*t]] * R[C[i + 344*t]] : R[B[i + 344*t]] + R[C[i + 344*t]];
R[i + 802*t] = Op[i + 345*t] ? R[B[i + 345*t]] * R[C[i + 345*t]] : R[B[i + 345*t]] + R[C[i + 345*t]];
R[i + 803*t] = Op[i + 346*t] ? R[B[i + 346*t]] * R[C[i + 346*t]] : R[B[i + 346*t]] + R[C[i + 346*t]];
R[i + 804*t] = Op[i + 347*t] ? R[B[i + 347*t]] * R[C[i + 347*t]] : R[B[i + 347*t]] + R[C[i + 347*t]];
R[i + 805*t] = Op[i + 348*t] ? R[B[i + 348*t]] * R[C[i + 348*t]] : R[B[i + 348*t]] + R[C[i + 348*t]];
R[i + 806*t] = Op[i + 349*t] ? R[B[i + 349*t]] * R[C[i + 349*t]] : R[B[i + 349*t]] + R[C[i + 349*t]];
R[i + 807*t] = Op[i + 350*t] ? R[B[i + 350*t]] * R[C[i + 350*t]] : R[B[i + 350*t]] + R[C[i + 350*t]];
R[i + 808*t] = Op[i + 351*t] ? R[B[i + 351*t]] * R[C[i + 351*t]] : R[B[i + 351*t]] + R[C[i + 351*t]];
R[i + 809*t] = Op[i + 352*t] ? R[B[i + 352*t]] * R[C[i + 352*t]] : R[B[i + 352*t]] + R[C[i + 352*t]];
R[i + 810*t] = Op[i + 353*t] ? R[B[i + 353*t]] * R[C[i + 353*t]] : R[B[i + 353*t]] + R[C[i + 353*t]];
R[i + 811*t] = Op[i + 354*t] ? R[B[i + 354*t]] * R[C[i + 354*t]] : R[B[i + 354*t]] + R[C[i + 354*t]];
R[i + 812*t] = Op[i + 355*t] ? R[B[i + 355*t]] * R[C[i + 355*t]] : R[B[i + 355*t]] + R[C[i + 355*t]];
R[i + 813*t] = Op[i + 356*t] ? R[B[i + 356*t]] * R[C[i + 356*t]] : R[B[i + 356*t]] + R[C[i + 356*t]];
R[i + 814*t] = Op[i + 357*t] ? R[B[i + 357*t]] * R[C[i + 357*t]] : R[B[i + 357*t]] + R[C[i + 357*t]];
R[i + 815*t] = Op[i + 358*t] ? R[B[i + 358*t]] * R[C[i + 358*t]] : R[B[i + 358*t]] + R[C[i + 358*t]];
R[i + 816*t] = Op[i + 359*t] ? R[B[i + 359*t]] * R[C[i + 359*t]] : R[B[i + 359*t]] + R[C[i + 359*t]];
R[i + 817*t] = Op[i + 360*t] ? R[B[i + 360*t]] * R[C[i + 360*t]] : R[B[i + 360*t]] + R[C[i + 360*t]];
R[i + 818*t] = Op[i + 361*t] ? R[B[i + 361*t]] * R[C[i + 361*t]] : R[B[i + 361*t]] + R[C[i + 361*t]];
R[i + 819*t] = Op[i + 362*t] ? R[B[i + 362*t]] * R[C[i + 362*t]] : R[B[i + 362*t]] + R[C[i + 362*t]];
R[i + 820*t] = Op[i + 363*t] ? R[B[i + 363*t]] * R[C[i + 363*t]] : R[B[i + 363*t]] + R[C[i + 363*t]];
R[i + 821*t] = Op[i + 364*t] ? R[B[i + 364*t]] * R[C[i + 364*t]] : R[B[i + 364*t]] + R[C[i + 364*t]];
R[i + 822*t] = Op[i + 365*t] ? R[B[i + 365*t]] * R[C[i + 365*t]] : R[B[i + 365*t]] + R[C[i + 365*t]];
R[i + 823*t] = Op[i + 366*t] ? R[B[i + 366*t]] * R[C[i + 366*t]] : R[B[i + 366*t]] + R[C[i + 366*t]];
__syncthreads();
R[i + 824*t] = Op[i + 367*t] ? R[B[i + 367*t]] * R[C[i + 367*t]] : R[B[i + 367*t]] + R[C[i + 367*t]];
R[i + 825*t] = Op[i + 368*t] ? R[B[i + 368*t]] * R[C[i + 368*t]] : R[B[i + 368*t]] + R[C[i + 368*t]];
R[i + 826*t] = Op[i + 369*t] ? R[B[i + 369*t]] * R[C[i + 369*t]] : R[B[i + 369*t]] + R[C[i + 369*t]];
R[i + 827*t] = Op[i + 370*t] ? R[B[i + 370*t]] * R[C[i + 370*t]] : R[B[i + 370*t]] + R[C[i + 370*t]];
R[i + 828*t] = Op[i + 371*t] ? R[B[i + 371*t]] * R[C[i + 371*t]] : R[B[i + 371*t]] + R[C[i + 371*t]];
R[i + 829*t] = Op[i + 372*t] ? R[B[i + 372*t]] * R[C[i + 372*t]] : R[B[i + 372*t]] + R[C[i + 372*t]];
R[i + 830*t] = Op[i + 373*t] ? R[B[i + 373*t]] * R[C[i + 373*t]] : R[B[i + 373*t]] + R[C[i + 373*t]];
R[i + 831*t] = Op[i + 374*t] ? R[B[i + 374*t]] * R[C[i + 374*t]] : R[B[i + 374*t]] + R[C[i + 374*t]];
R[i + 832*t] = Op[i + 375*t] ? R[B[i + 375*t]] * R[C[i + 375*t]] : R[B[i + 375*t]] + R[C[i + 375*t]];
R[i + 833*t] = Op[i + 376*t] ? R[B[i + 376*t]] * R[C[i + 376*t]] : R[B[i + 376*t]] + R[C[i + 376*t]];
R[i + 834*t] = Op[i + 377*t] ? R[B[i + 377*t]] * R[C[i + 377*t]] : R[B[i + 377*t]] + R[C[i + 377*t]];
R[i + 835*t] = Op[i + 378*t] ? R[B[i + 378*t]] * R[C[i + 378*t]] : R[B[i + 378*t]] + R[C[i + 378*t]];
R[i + 836*t] = Op[i + 379*t] ? R[B[i + 379*t]] * R[C[i + 379*t]] : R[B[i + 379*t]] + R[C[i + 379*t]];
R[i + 837*t] = Op[i + 380*t] ? R[B[i + 380*t]] * R[C[i + 380*t]] : R[B[i + 380*t]] + R[C[i + 380*t]];
R[i + 838*t] = Op[i + 381*t] ? R[B[i + 381*t]] * R[C[i + 381*t]] : R[B[i + 381*t]] + R[C[i + 381*t]];
R[i + 839*t] = Op[i + 382*t] ? R[B[i + 382*t]] * R[C[i + 382*t]] : R[B[i + 382*t]] + R[C[i + 382*t]];
R[i + 840*t] = Op[i + 383*t] ? R[B[i + 383*t]] * R[C[i + 383*t]] : R[B[i + 383*t]] + R[C[i + 383*t]];
R[i + 841*t] = Op[i + 384*t] ? R[B[i + 384*t]] * R[C[i + 384*t]] : R[B[i + 384*t]] + R[C[i + 384*t]];
R[i + 842*t] = Op[i + 385*t] ? R[B[i + 385*t]] * R[C[i + 385*t]] : R[B[i + 385*t]] + R[C[i + 385*t]];
R[i + 843*t] = Op[i + 386*t] ? R[B[i + 386*t]] * R[C[i + 386*t]] : R[B[i + 386*t]] + R[C[i + 386*t]];
R[i + 844*t] = Op[i + 387*t] ? R[B[i + 387*t]] * R[C[i + 387*t]] : R[B[i + 387*t]] + R[C[i + 387*t]];
R[i + 845*t] = Op[i + 388*t] ? R[B[i + 388*t]] * R[C[i + 388*t]] : R[B[i + 388*t]] + R[C[i + 388*t]];
R[i + 846*t] = Op[i + 389*t] ? R[B[i + 389*t]] * R[C[i + 389*t]] : R[B[i + 389*t]] + R[C[i + 389*t]];
R[i + 847*t] = Op[i + 390*t] ? R[B[i + 390*t]] * R[C[i + 390*t]] : R[B[i + 390*t]] + R[C[i + 390*t]];
R[i + 848*t] = Op[i + 391*t] ? R[B[i + 391*t]] * R[C[i + 391*t]] : R[B[i + 391*t]] + R[C[i + 391*t]];
R[i + 849*t] = Op[i + 392*t] ? R[B[i + 392*t]] * R[C[i + 392*t]] : R[B[i + 392*t]] + R[C[i + 392*t]];
R[i + 850*t] = Op[i + 393*t] ? R[B[i + 393*t]] * R[C[i + 393*t]] : R[B[i + 393*t]] + R[C[i + 393*t]];
R[i + 851*t] = Op[i + 394*t] ? R[B[i + 394*t]] * R[C[i + 394*t]] : R[B[i + 394*t]] + R[C[i + 394*t]];
R[i + 852*t] = Op[i + 395*t] ? R[B[i + 395*t]] * R[C[i + 395*t]] : R[B[i + 395*t]] + R[C[i + 395*t]];
R[i + 853*t] = Op[i + 396*t] ? R[B[i + 396*t]] * R[C[i + 396*t]] : R[B[i + 396*t]] + R[C[i + 396*t]];
R[i + 854*t] = Op[i + 397*t] ? R[B[i + 397*t]] * R[C[i + 397*t]] : R[B[i + 397*t]] + R[C[i + 397*t]];
R[i + 855*t] = Op[i + 398*t] ? R[B[i + 398*t]] * R[C[i + 398*t]] : R[B[i + 398*t]] + R[C[i + 398*t]];
R[i + 856*t] = Op[i + 399*t] ? R[B[i + 399*t]] * R[C[i + 399*t]] : R[B[i + 399*t]] + R[C[i + 399*t]];
R[i + 857*t] = Op[i + 400*t] ? R[B[i + 400*t]] * R[C[i + 400*t]] : R[B[i + 400*t]] + R[C[i + 400*t]];
R[i + 858*t] = Op[i + 401*t] ? R[B[i + 401*t]] * R[C[i + 401*t]] : R[B[i + 401*t]] + R[C[i + 401*t]];
R[i + 859*t] = Op[i + 402*t] ? R[B[i + 402*t]] * R[C[i + 402*t]] : R[B[i + 402*t]] + R[C[i + 402*t]];
R[i + 860*t] = Op[i + 403*t] ? R[B[i + 403*t]] * R[C[i + 403*t]] : R[B[i + 403*t]] + R[C[i + 403*t]];
R[i + 861*t] = Op[i + 404*t] ? R[B[i + 404*t]] * R[C[i + 404*t]] : R[B[i + 404*t]] + R[C[i + 404*t]];
R[i + 862*t] = Op[i + 405*t] ? R[B[i + 405*t]] * R[C[i + 405*t]] : R[B[i + 405*t]] + R[C[i + 405*t]];
R[i + 863*t] = Op[i + 406*t] ? R[B[i + 406*t]] * R[C[i + 406*t]] : R[B[i + 406*t]] + R[C[i + 406*t]];
R[i + 864*t] = Op[i + 407*t] ? R[B[i + 407*t]] * R[C[i + 407*t]] : R[B[i + 407*t]] + R[C[i + 407*t]];
R[i + 865*t] = Op[i + 408*t] ? R[B[i + 408*t]] * R[C[i + 408*t]] : R[B[i + 408*t]] + R[C[i + 408*t]];
R[i + 866*t] = Op[i + 409*t] ? R[B[i + 409*t]] * R[C[i + 409*t]] : R[B[i + 409*t]] + R[C[i + 409*t]];
R[i + 867*t] = Op[i + 410*t] ? R[B[i + 410*t]] * R[C[i + 410*t]] : R[B[i + 410*t]] + R[C[i + 410*t]];
R[i + 868*t] = Op[i + 411*t] ? R[B[i + 411*t]] * R[C[i + 411*t]] : R[B[i + 411*t]] + R[C[i + 411*t]];
R[i + 869*t] = Op[i + 412*t] ? R[B[i + 412*t]] * R[C[i + 412*t]] : R[B[i + 412*t]] + R[C[i + 412*t]];
__syncthreads();
R[i + 870*t] = Op[i + 413*t] ? R[B[i + 413*t]] * R[C[i + 413*t]] : R[B[i + 413*t]] + R[C[i + 413*t]];
R[i + 871*t] = Op[i + 414*t] ? R[B[i + 414*t]] * R[C[i + 414*t]] : R[B[i + 414*t]] + R[C[i + 414*t]];
R[i + 872*t] = Op[i + 415*t] ? R[B[i + 415*t]] * R[C[i + 415*t]] : R[B[i + 415*t]] + R[C[i + 415*t]];
R[i + 873*t] = Op[i + 416*t] ? R[B[i + 416*t]] * R[C[i + 416*t]] : R[B[i + 416*t]] + R[C[i + 416*t]];
R[i + 874*t] = Op[i + 417*t] ? R[B[i + 417*t]] * R[C[i + 417*t]] : R[B[i + 417*t]] + R[C[i + 417*t]];
R[i + 875*t] = Op[i + 418*t] ? R[B[i + 418*t]] * R[C[i + 418*t]] : R[B[i + 418*t]] + R[C[i + 418*t]];
R[i + 876*t] = Op[i + 419*t] ? R[B[i + 419*t]] * R[C[i + 419*t]] : R[B[i + 419*t]] + R[C[i + 419*t]];
R[i + 877*t] = Op[i + 420*t] ? R[B[i + 420*t]] * R[C[i + 420*t]] : R[B[i + 420*t]] + R[C[i + 420*t]];
R[i + 878*t] = Op[i + 421*t] ? R[B[i + 421*t]] * R[C[i + 421*t]] : R[B[i + 421*t]] + R[C[i + 421*t]];
R[i + 879*t] = Op[i + 422*t] ? R[B[i + 422*t]] * R[C[i + 422*t]] : R[B[i + 422*t]] + R[C[i + 422*t]];
R[i + 880*t] = Op[i + 423*t] ? R[B[i + 423*t]] * R[C[i + 423*t]] : R[B[i + 423*t]] + R[C[i + 423*t]];
R[i + 881*t] = Op[i + 424*t] ? R[B[i + 424*t]] * R[C[i + 424*t]] : R[B[i + 424*t]] + R[C[i + 424*t]];
R[i + 882*t] = Op[i + 425*t] ? R[B[i + 425*t]] * R[C[i + 425*t]] : R[B[i + 425*t]] + R[C[i + 425*t]];
R[i + 883*t] = Op[i + 426*t] ? R[B[i + 426*t]] * R[C[i + 426*t]] : R[B[i + 426*t]] + R[C[i + 426*t]];
R[i + 884*t] = Op[i + 427*t] ? R[B[i + 427*t]] * R[C[i + 427*t]] : R[B[i + 427*t]] + R[C[i + 427*t]];
R[i + 885*t] = Op[i + 428*t] ? R[B[i + 428*t]] * R[C[i + 428*t]] : R[B[i + 428*t]] + R[C[i + 428*t]];
R[i + 886*t] = Op[i + 429*t] ? R[B[i + 429*t]] * R[C[i + 429*t]] : R[B[i + 429*t]] + R[C[i + 429*t]];
R[i + 887*t] = Op[i + 430*t] ? R[B[i + 430*t]] * R[C[i + 430*t]] : R[B[i + 430*t]] + R[C[i + 430*t]];
R[i + 888*t] = Op[i + 431*t] ? R[B[i + 431*t]] * R[C[i + 431*t]] : R[B[i + 431*t]] + R[C[i + 431*t]];
R[i + 889*t] = Op[i + 432*t] ? R[B[i + 432*t]] * R[C[i + 432*t]] : R[B[i + 432*t]] + R[C[i + 432*t]];
R[i + 890*t] = Op[i + 433*t] ? R[B[i + 433*t]] * R[C[i + 433*t]] : R[B[i + 433*t]] + R[C[i + 433*t]];
R[i + 891*t] = Op[i + 434*t] ? R[B[i + 434*t]] * R[C[i + 434*t]] : R[B[i + 434*t]] + R[C[i + 434*t]];
R[i + 892*t] = Op[i + 435*t] ? R[B[i + 435*t]] * R[C[i + 435*t]] : R[B[i + 435*t]] + R[C[i + 435*t]];
R[i + 893*t] = Op[i + 436*t] ? R[B[i + 436*t]] * R[C[i + 436*t]] : R[B[i + 436*t]] + R[C[i + 436*t]];
R[i + 894*t] = Op[i + 437*t] ? R[B[i + 437*t]] * R[C[i + 437*t]] : R[B[i + 437*t]] + R[C[i + 437*t]];
R[i + 895*t] = Op[i + 438*t] ? R[B[i + 438*t]] * R[C[i + 438*t]] : R[B[i + 438*t]] + R[C[i + 438*t]];
R[i + 896*t] = Op[i + 439*t] ? R[B[i + 439*t]] * R[C[i + 439*t]] : R[B[i + 439*t]] + R[C[i + 439*t]];
R[i + 897*t] = Op[i + 440*t] ? R[B[i + 440*t]] * R[C[i + 440*t]] : R[B[i + 440*t]] + R[C[i + 440*t]];
R[i + 898*t] = Op[i + 441*t] ? R[B[i + 441*t]] * R[C[i + 441*t]] : R[B[i + 441*t]] + R[C[i + 441*t]];
R[i + 899*t] = Op[i + 442*t] ? R[B[i + 442*t]] * R[C[i + 442*t]] : R[B[i + 442*t]] + R[C[i + 442*t]];
R[i + 900*t] = Op[i + 443*t] ? R[B[i + 443*t]] * R[C[i + 443*t]] : R[B[i + 443*t]] + R[C[i + 443*t]];
R[i + 901*t] = Op[i + 444*t] ? R[B[i + 444*t]] * R[C[i + 444*t]] : R[B[i + 444*t]] + R[C[i + 444*t]];
R[i + 902*t] = Op[i + 445*t] ? R[B[i + 445*t]] * R[C[i + 445*t]] : R[B[i + 445*t]] + R[C[i + 445*t]];
R[i + 903*t] = Op[i + 446*t] ? R[B[i + 446*t]] * R[C[i + 446*t]] : R[B[i + 446*t]] + R[C[i + 446*t]];
R[i + 904*t] = Op[i + 447*t] ? R[B[i + 447*t]] * R[C[i + 447*t]] : R[B[i + 447*t]] + R[C[i + 447*t]];
R[i + 905*t] = Op[i + 448*t] ? R[B[i + 448*t]] * R[C[i + 448*t]] : R[B[i + 448*t]] + R[C[i + 448*t]];
R[i + 906*t] = Op[i + 449*t] ? R[B[i + 449*t]] * R[C[i + 449*t]] : R[B[i + 449*t]] + R[C[i + 449*t]];
R[i + 907*t] = Op[i + 450*t] ? R[B[i + 450*t]] * R[C[i + 450*t]] : R[B[i + 450*t]] + R[C[i + 450*t]];
R[i + 908*t] = Op[i + 451*t] ? R[B[i + 451*t]] * R[C[i + 451*t]] : R[B[i + 451*t]] + R[C[i + 451*t]];
R[i + 909*t] = Op[i + 452*t] ? R[B[i + 452*t]] * R[C[i + 452*t]] : R[B[i + 452*t]] + R[C[i + 452*t]];
R[i + 910*t] = Op[i + 453*t] ? R[B[i + 453*t]] * R[C[i + 453*t]] : R[B[i + 453*t]] + R[C[i + 453*t]];
R[i + 911*t] = Op[i + 454*t] ? R[B[i + 454*t]] * R[C[i + 454*t]] : R[B[i + 454*t]] + R[C[i + 454*t]];
R[i + 912*t] = Op[i + 455*t] ? R[B[i + 455*t]] * R[C[i + 455*t]] : R[B[i + 455*t]] + R[C[i + 455*t]];
R[i + 913*t] = Op[i + 456*t] ? R[B[i + 456*t]] * R[C[i + 456*t]] : R[B[i + 456*t]] + R[C[i + 456*t]];
R[i + 914*t] = Op[i + 457*t] ? R[B[i + 457*t]] * R[C[i + 457*t]] : R[B[i + 457*t]] + R[C[i + 457*t]];
R[i + 915*t] = Op[i + 458*t] ? R[B[i + 458*t]] * R[C[i + 458*t]] : R[B[i + 458*t]] + R[C[i + 458*t]];
R[i + 916*t] = Op[i + 459*t] ? R[B[i + 459*t]] * R[C[i + 459*t]] : R[B[i + 459*t]] + R[C[i + 459*t]];
R[i + 917*t] = Op[i + 460*t] ? R[B[i + 460*t]] * R[C[i + 460*t]] : R[B[i + 460*t]] + R[C[i + 460*t]];
R[i + 918*t] = Op[i + 461*t] ? R[B[i + 461*t]] * R[C[i + 461*t]] : R[B[i + 461*t]] + R[C[i + 461*t]];
R[i + 919*t] = Op[i + 462*t] ? R[B[i + 462*t]] * R[C[i + 462*t]] : R[B[i + 462*t]] + R[C[i + 462*t]];
R[i + 920*t] = Op[i + 463*t] ? R[B[i + 463*t]] * R[C[i + 463*t]] : R[B[i + 463*t]] + R[C[i + 463*t]];
R[i + 921*t] = Op[i + 464*t] ? R[B[i + 464*t]] * R[C[i + 464*t]] : R[B[i + 464*t]] + R[C[i + 464*t]];
R[i + 922*t] = Op[i + 465*t] ? R[B[i + 465*t]] * R[C[i + 465*t]] : R[B[i + 465*t]] + R[C[i + 465*t]];
R[i + 923*t] = Op[i + 466*t] ? R[B[i + 466*t]] * R[C[i + 466*t]] : R[B[i + 466*t]] + R[C[i + 466*t]];
R[i + 924*t] = Op[i + 467*t] ? R[B[i + 467*t]] * R[C[i + 467*t]] : R[B[i + 467*t]] + R[C[i + 467*t]];
R[i + 925*t] = Op[i + 468*t] ? R[B[i + 468*t]] * R[C[i + 468*t]] : R[B[i + 468*t]] + R[C[i + 468*t]];
R[i + 926*t] = Op[i + 469*t] ? R[B[i + 469*t]] * R[C[i + 469*t]] : R[B[i + 469*t]] + R[C[i + 469*t]];
R[i + 927*t] = Op[i + 470*t] ? R[B[i + 470*t]] * R[C[i + 470*t]] : R[B[i + 470*t]] + R[C[i + 470*t]];
R[i + 928*t] = Op[i + 471*t] ? R[B[i + 471*t]] * R[C[i + 471*t]] : R[B[i + 471*t]] + R[C[i + 471*t]];
R[i + 929*t] = Op[i + 472*t] ? R[B[i + 472*t]] * R[C[i + 472*t]] : R[B[i + 472*t]] + R[C[i + 472*t]];
R[i + 930*t] = Op[i + 473*t] ? R[B[i + 473*t]] * R[C[i + 473*t]] : R[B[i + 473*t]] + R[C[i + 473*t]];
R[i + 931*t] = Op[i + 474*t] ? R[B[i + 474*t]] * R[C[i + 474*t]] : R[B[i + 474*t]] + R[C[i + 474*t]];
R[i + 932*t] = Op[i + 475*t] ? R[B[i + 475*t]] * R[C[i + 475*t]] : R[B[i + 475*t]] + R[C[i + 475*t]];
R[i + 933*t] = Op[i + 476*t] ? R[B[i + 476*t]] * R[C[i + 476*t]] : R[B[i + 476*t]] + R[C[i + 476*t]];
R[i + 934*t] = Op[i + 477*t] ? R[B[i + 477*t]] * R[C[i + 477*t]] : R[B[i + 477*t]] + R[C[i + 477*t]];
R[i + 935*t] = Op[i + 478*t] ? R[B[i + 478*t]] * R[C[i + 478*t]] : R[B[i + 478*t]] + R[C[i + 478*t]];
R[i + 936*t] = Op[i + 479*t] ? R[B[i + 479*t]] * R[C[i + 479*t]] : R[B[i + 479*t]] + R[C[i + 479*t]];
R[i + 937*t] = Op[i + 480*t] ? R[B[i + 480*t]] * R[C[i + 480*t]] : R[B[i + 480*t]] + R[C[i + 480*t]];
R[i + 938*t] = Op[i + 481*t] ? R[B[i + 481*t]] * R[C[i + 481*t]] : R[B[i + 481*t]] + R[C[i + 481*t]];
R[i + 939*t] = Op[i + 482*t] ? R[B[i + 482*t]] * R[C[i + 482*t]] : R[B[i + 482*t]] + R[C[i + 482*t]];
R[i + 940*t] = Op[i + 483*t] ? R[B[i + 483*t]] * R[C[i + 483*t]] : R[B[i + 483*t]] + R[C[i + 483*t]];
R[i + 941*t] = Op[i + 484*t] ? R[B[i + 484*t]] * R[C[i + 484*t]] : R[B[i + 484*t]] + R[C[i + 484*t]];
R[i + 942*t] = Op[i + 485*t] ? R[B[i + 485*t]] * R[C[i + 485*t]] : R[B[i + 485*t]] + R[C[i + 485*t]];
R[i + 943*t] = Op[i + 486*t] ? R[B[i + 486*t]] * R[C[i + 486*t]] : R[B[i + 486*t]] + R[C[i + 486*t]];
R[i + 944*t] = Op[i + 487*t] ? R[B[i + 487*t]] * R[C[i + 487*t]] : R[B[i + 487*t]] + R[C[i + 487*t]];
R[i + 945*t] = Op[i + 488*t] ? R[B[i + 488*t]] * R[C[i + 488*t]] : R[B[i + 488*t]] + R[C[i + 488*t]];
__syncthreads();
R[i + 946*t] = Op[i + 489*t] ? R[B[i + 489*t]] * R[C[i + 489*t]] : R[B[i + 489*t]] + R[C[i + 489*t]];
R[i + 947*t] = Op[i + 490*t] ? R[B[i + 490*t]] * R[C[i + 490*t]] : R[B[i + 490*t]] + R[C[i + 490*t]];
R[i + 948*t] = Op[i + 491*t] ? R[B[i + 491*t]] * R[C[i + 491*t]] : R[B[i + 491*t]] + R[C[i + 491*t]];
R[i + 949*t] = Op[i + 492*t] ? R[B[i + 492*t]] * R[C[i + 492*t]] : R[B[i + 492*t]] + R[C[i + 492*t]];
R[i + 950*t] = Op[i + 493*t] ? R[B[i + 493*t]] * R[C[i + 493*t]] : R[B[i + 493*t]] + R[C[i + 493*t]];
R[i + 951*t] = Op[i + 494*t] ? R[B[i + 494*t]] * R[C[i + 494*t]] : R[B[i + 494*t]] + R[C[i + 494*t]];
R[i + 952*t] = Op[i + 495*t] ? R[B[i + 495*t]] * R[C[i + 495*t]] : R[B[i + 495*t]] + R[C[i + 495*t]];
R[i + 953*t] = Op[i + 496*t] ? R[B[i + 496*t]] * R[C[i + 496*t]] : R[B[i + 496*t]] + R[C[i + 496*t]];
R[i + 954*t] = Op[i + 497*t] ? R[B[i + 497*t]] * R[C[i + 497*t]] : R[B[i + 497*t]] + R[C[i + 497*t]];
R[i + 955*t] = Op[i + 498*t] ? R[B[i + 498*t]] * R[C[i + 498*t]] : R[B[i + 498*t]] + R[C[i + 498*t]];
R[i + 956*t] = Op[i + 499*t] ? R[B[i + 499*t]] * R[C[i + 499*t]] : R[B[i + 499*t]] + R[C[i + 499*t]];
R[i + 957*t] = Op[i + 500*t] ? R[B[i + 500*t]] * R[C[i + 500*t]] : R[B[i + 500*t]] + R[C[i + 500*t]];
R[i + 958*t] = Op[i + 501*t] ? R[B[i + 501*t]] * R[C[i + 501*t]] : R[B[i + 501*t]] + R[C[i + 501*t]];
R[i + 959*t] = Op[i + 502*t] ? R[B[i + 502*t]] * R[C[i + 502*t]] : R[B[i + 502*t]] + R[C[i + 502*t]];
R[i + 960*t] = Op[i + 503*t] ? R[B[i + 503*t]] * R[C[i + 503*t]] : R[B[i + 503*t]] + R[C[i + 503*t]];
R[i + 961*t] = Op[i + 504*t] ? R[B[i + 504*t]] * R[C[i + 504*t]] : R[B[i + 504*t]] + R[C[i + 504*t]];
R[i + 962*t] = Op[i + 505*t] ? R[B[i + 505*t]] * R[C[i + 505*t]] : R[B[i + 505*t]] + R[C[i + 505*t]];
R[i + 963*t] = Op[i + 506*t] ? R[B[i + 506*t]] * R[C[i + 506*t]] : R[B[i + 506*t]] + R[C[i + 506*t]];
R[i + 964*t] = Op[i + 507*t] ? R[B[i + 507*t]] * R[C[i + 507*t]] : R[B[i + 507*t]] + R[C[i + 507*t]];
R[i + 965*t] = Op[i + 508*t] ? R[B[i + 508*t]] * R[C[i + 508*t]] : R[B[i + 508*t]] + R[C[i + 508*t]];
R[i + 966*t] = Op[i + 509*t] ? R[B[i + 509*t]] * R[C[i + 509*t]] : R[B[i + 509*t]] + R[C[i + 509*t]];
R[i + 967*t] = Op[i + 510*t] ? R[B[i + 510*t]] * R[C[i + 510*t]] : R[B[i + 510*t]] + R[C[i + 510*t]];
R[i + 968*t] = Op[i + 511*t] ? R[B[i + 511*t]] * R[C[i + 511*t]] : R[B[i + 511*t]] + R[C[i + 511*t]];
R[i + 969*t] = Op[i + 512*t] ? R[B[i + 512*t]] * R[C[i + 512*t]] : R[B[i + 512*t]] + R[C[i + 512*t]];
R[i + 970*t] = Op[i + 513*t] ? R[B[i + 513*t]] * R[C[i + 513*t]] : R[B[i + 513*t]] + R[C[i + 513*t]];
R[i + 971*t] = Op[i + 514*t] ? R[B[i + 514*t]] * R[C[i + 514*t]] : R[B[i + 514*t]] + R[C[i + 514*t]];
R[i + 972*t] = Op[i + 515*t] ? R[B[i + 515*t]] * R[C[i + 515*t]] : R[B[i + 515*t]] + R[C[i + 515*t]];
R[i + 973*t] = Op[i + 516*t] ? R[B[i + 516*t]] * R[C[i + 516*t]] : R[B[i + 516*t]] + R[C[i + 516*t]];
R[i + 974*t] = Op[i + 517*t] ? R[B[i + 517*t]] * R[C[i + 517*t]] : R[B[i + 517*t]] + R[C[i + 517*t]];
R[i + 975*t] = Op[i + 518*t] ? R[B[i + 518*t]] * R[C[i + 518*t]] : R[B[i + 518*t]] + R[C[i + 518*t]];
R[i + 976*t] = Op[i + 519*t] ? R[B[i + 519*t]] * R[C[i + 519*t]] : R[B[i + 519*t]] + R[C[i + 519*t]];
R[i + 977*t] = Op[i + 520*t] ? R[B[i + 520*t]] * R[C[i + 520*t]] : R[B[i + 520*t]] + R[C[i + 520*t]];
R[i + 978*t] = Op[i + 521*t] ? R[B[i + 521*t]] * R[C[i + 521*t]] : R[B[i + 521*t]] + R[C[i + 521*t]];
R[i + 979*t] = Op[i + 522*t] ? R[B[i + 522*t]] * R[C[i + 522*t]] : R[B[i + 522*t]] + R[C[i + 522*t]];
R[i + 980*t] = Op[i + 523*t] ? R[B[i + 523*t]] * R[C[i + 523*t]] : R[B[i + 523*t]] + R[C[i + 523*t]];
R[i + 981*t] = Op[i + 524*t] ? R[B[i + 524*t]] * R[C[i + 524*t]] : R[B[i + 524*t]] + R[C[i + 524*t]];
R[i + 982*t] = Op[i + 525*t] ? R[B[i + 525*t]] * R[C[i + 525*t]] : R[B[i + 525*t]] + R[C[i + 525*t]];
R[i + 983*t] = Op[i + 526*t] ? R[B[i + 526*t]] * R[C[i + 526*t]] : R[B[i + 526*t]] + R[C[i + 526*t]];
R[i + 984*t] = Op[i + 527*t] ? R[B[i + 527*t]] * R[C[i + 527*t]] : R[B[i + 527*t]] + R[C[i + 527*t]];
R[i + 985*t] = Op[i + 528*t] ? R[B[i + 528*t]] * R[C[i + 528*t]] : R[B[i + 528*t]] + R[C[i + 528*t]];
R[i + 986*t] = Op[i + 529*t] ? R[B[i + 529*t]] * R[C[i + 529*t]] : R[B[i + 529*t]] + R[C[i + 529*t]];
R[i + 987*t] = Op[i + 530*t] ? R[B[i + 530*t]] * R[C[i + 530*t]] : R[B[i + 530*t]] + R[C[i + 530*t]];
R[i + 988*t] = Op[i + 531*t] ? R[B[i + 531*t]] * R[C[i + 531*t]] : R[B[i + 531*t]] + R[C[i + 531*t]];
R[i + 989*t] = Op[i + 532*t] ? R[B[i + 532*t]] * R[C[i + 532*t]] : R[B[i + 532*t]] + R[C[i + 532*t]];
R[i + 990*t] = Op[i + 533*t] ? R[B[i + 533*t]] * R[C[i + 533*t]] : R[B[i + 533*t]] + R[C[i + 533*t]];
R[i + 991*t] = Op[i + 534*t] ? R[B[i + 534*t]] * R[C[i + 534*t]] : R[B[i + 534*t]] + R[C[i + 534*t]];
R[i + 992*t] = Op[i + 535*t] ? R[B[i + 535*t]] * R[C[i + 535*t]] : R[B[i + 535*t]] + R[C[i + 535*t]];
R[i + 993*t] = Op[i + 536*t] ? R[B[i + 536*t]] * R[C[i + 536*t]] : R[B[i + 536*t]] + R[C[i + 536*t]];
R[i + 994*t] = Op[i + 537*t] ? R[B[i + 537*t]] * R[C[i + 537*t]] : R[B[i + 537*t]] + R[C[i + 537*t]];
R[i + 995*t] = Op[i + 538*t] ? R[B[i + 538*t]] * R[C[i + 538*t]] : R[B[i + 538*t]] + R[C[i + 538*t]];
R[i + 996*t] = Op[i + 539*t] ? R[B[i + 539*t]] * R[C[i + 539*t]] : R[B[i + 539*t]] + R[C[i + 539*t]];
R[i + 997*t] = Op[i + 540*t] ? R[B[i + 540*t]] * R[C[i + 540*t]] : R[B[i + 540*t]] + R[C[i + 540*t]];
R[i + 998*t] = Op[i + 541*t] ? R[B[i + 541*t]] * R[C[i + 541*t]] : R[B[i + 541*t]] + R[C[i + 541*t]];
R[i + 999*t] = Op[i + 542*t] ? R[B[i + 542*t]] * R[C[i + 542*t]] : R[B[i + 542*t]] + R[C[i + 542*t]];
R[i + 1000*t] = Op[i + 543*t] ? R[B[i + 543*t]] * R[C[i + 543*t]] : R[B[i + 543*t]] + R[C[i + 543*t]];
R[i + 1001*t] = Op[i + 544*t] ? R[B[i + 544*t]] * R[C[i + 544*t]] : R[B[i + 544*t]] + R[C[i + 544*t]];
R[i + 1002*t] = Op[i + 545*t] ? R[B[i + 545*t]] * R[C[i + 545*t]] : R[B[i + 545*t]] + R[C[i + 545*t]];
R[i + 1003*t] = Op[i + 546*t] ? R[B[i + 546*t]] * R[C[i + 546*t]] : R[B[i + 546*t]] + R[C[i + 546*t]];
R[i + 1004*t] = Op[i + 547*t] ? R[B[i + 547*t]] * R[C[i + 547*t]] : R[B[i + 547*t]] + R[C[i + 547*t]];
R[i + 1005*t] = Op[i + 548*t] ? R[B[i + 548*t]] * R[C[i + 548*t]] : R[B[i + 548*t]] + R[C[i + 548*t]];
R[i + 1006*t] = Op[i + 549*t] ? R[B[i + 549*t]] * R[C[i + 549*t]] : R[B[i + 549*t]] + R[C[i + 549*t]];
R[i + 1007*t] = Op[i + 550*t] ? R[B[i + 550*t]] * R[C[i + 550*t]] : R[B[i + 550*t]] + R[C[i + 550*t]];
R[i + 1008*t] = Op[i + 551*t] ? R[B[i + 551*t]] * R[C[i + 551*t]] : R[B[i + 551*t]] + R[C[i + 551*t]];
R[i + 1009*t] = Op[i + 552*t] ? R[B[i + 552*t]] * R[C[i + 552*t]] : R[B[i + 552*t]] + R[C[i + 552*t]];
R[i + 1010*t] = Op[i + 553*t] ? R[B[i + 553*t]] * R[C[i + 553*t]] : R[B[i + 553*t]] + R[C[i + 553*t]];
R[i + 1011*t] = Op[i + 554*t] ? R[B[i + 554*t]] * R[C[i + 554*t]] : R[B[i + 554*t]] + R[C[i + 554*t]];
R[i + 1012*t] = Op[i + 555*t] ? R[B[i + 555*t]] * R[C[i + 555*t]] : R[B[i + 555*t]] + R[C[i + 555*t]];
R[i + 1013*t] = Op[i + 556*t] ? R[B[i + 556*t]] * R[C[i + 556*t]] : R[B[i + 556*t]] + R[C[i + 556*t]];
__syncthreads();
R[i + 1014*t] = Op[i + 557*t] ? R[B[i + 557*t]] * R[C[i + 557*t]] : R[B[i + 557*t]] + R[C[i + 557*t]];
R[i + 1015*t] = Op[i + 558*t] ? R[B[i + 558*t]] * R[C[i + 558*t]] : R[B[i + 558*t]] + R[C[i + 558*t]];
R[i + 1016*t] = Op[i + 559*t] ? R[B[i + 559*t]] * R[C[i + 559*t]] : R[B[i + 559*t]] + R[C[i + 559*t]];
R[i + 1017*t] = Op[i + 560*t] ? R[B[i + 560*t]] * R[C[i + 560*t]] : R[B[i + 560*t]] + R[C[i + 560*t]];
R[i + 1018*t] = Op[i + 561*t] ? R[B[i + 561*t]] * R[C[i + 561*t]] : R[B[i + 561*t]] + R[C[i + 561*t]];
R[i + 1019*t] = Op[i + 562*t] ? R[B[i + 562*t]] * R[C[i + 562*t]] : R[B[i + 562*t]] + R[C[i + 562*t]];
R[i + 1020*t] = Op[i + 563*t] ? R[B[i + 563*t]] * R[C[i + 563*t]] : R[B[i + 563*t]] + R[C[i + 563*t]];
R[i + 1021*t] = Op[i + 564*t] ? R[B[i + 564*t]] * R[C[i + 564*t]] : R[B[i + 564*t]] + R[C[i + 564*t]];
R[i + 1022*t] = Op[i + 565*t] ? R[B[i + 565*t]] * R[C[i + 565*t]] : R[B[i + 565*t]] + R[C[i + 565*t]];
R[i + 1023*t] = Op[i + 566*t] ? R[B[i + 566*t]] * R[C[i + 566*t]] : R[B[i + 566*t]] + R[C[i + 566*t]];
R[i + 1024*t] = Op[i + 567*t] ? R[B[i + 567*t]] * R[C[i + 567*t]] : R[B[i + 567*t]] + R[C[i + 567*t]];
R[i + 1025*t] = Op[i + 568*t] ? R[B[i + 568*t]] * R[C[i + 568*t]] : R[B[i + 568*t]] + R[C[i + 568*t]];
R[i + 1026*t] = Op[i + 569*t] ? R[B[i + 569*t]] * R[C[i + 569*t]] : R[B[i + 569*t]] + R[C[i + 569*t]];
R[i + 1027*t] = Op[i + 570*t] ? R[B[i + 570*t]] * R[C[i + 570*t]] : R[B[i + 570*t]] + R[C[i + 570*t]];
R[i + 1028*t] = Op[i + 571*t] ? R[B[i + 571*t]] * R[C[i + 571*t]] : R[B[i + 571*t]] + R[C[i + 571*t]];
R[i + 1029*t] = Op[i + 572*t] ? R[B[i + 572*t]] * R[C[i + 572*t]] : R[B[i + 572*t]] + R[C[i + 572*t]];
R[i + 1030*t] = Op[i + 573*t] ? R[B[i + 573*t]] * R[C[i + 573*t]] : R[B[i + 573*t]] + R[C[i + 573*t]];
R[i + 1031*t] = Op[i + 574*t] ? R[B[i + 574*t]] * R[C[i + 574*t]] : R[B[i + 574*t]] + R[C[i + 574*t]];
R[i + 1032*t] = Op[i + 575*t] ? R[B[i + 575*t]] * R[C[i + 575*t]] : R[B[i + 575*t]] + R[C[i + 575*t]];
R[i + 1033*t] = Op[i + 576*t] ? R[B[i + 576*t]] * R[C[i + 576*t]] : R[B[i + 576*t]] + R[C[i + 576*t]];
R[i + 1034*t] = Op[i + 577*t] ? R[B[i + 577*t]] * R[C[i + 577*t]] : R[B[i + 577*t]] + R[C[i + 577*t]];
R[i + 1035*t] = Op[i + 578*t] ? R[B[i + 578*t]] * R[C[i + 578*t]] : R[B[i + 578*t]] + R[C[i + 578*t]];
R[i + 1036*t] = Op[i + 579*t] ? R[B[i + 579*t]] * R[C[i + 579*t]] : R[B[i + 579*t]] + R[C[i + 579*t]];
R[i + 1037*t] = Op[i + 580*t] ? R[B[i + 580*t]] * R[C[i + 580*t]] : R[B[i + 580*t]] + R[C[i + 580*t]];
R[i + 1038*t] = Op[i + 581*t] ? R[B[i + 581*t]] * R[C[i + 581*t]] : R[B[i + 581*t]] + R[C[i + 581*t]];
R[i + 1039*t] = Op[i + 582*t] ? R[B[i + 582*t]] * R[C[i + 582*t]] : R[B[i + 582*t]] + R[C[i + 582*t]];
R[i + 1040*t] = Op[i + 583*t] ? R[B[i + 583*t]] * R[C[i + 583*t]] : R[B[i + 583*t]] + R[C[i + 583*t]];
R[i + 1041*t] = Op[i + 584*t] ? R[B[i + 584*t]] * R[C[i + 584*t]] : R[B[i + 584*t]] + R[C[i + 584*t]];
R[i + 1042*t] = Op[i + 585*t] ? R[B[i + 585*t]] * R[C[i + 585*t]] : R[B[i + 585*t]] + R[C[i + 585*t]];
R[i + 1043*t] = Op[i + 586*t] ? R[B[i + 586*t]] * R[C[i + 586*t]] : R[B[i + 586*t]] + R[C[i + 586*t]];
R[i + 1044*t] = Op[i + 587*t] ? R[B[i + 587*t]] * R[C[i + 587*t]] : R[B[i + 587*t]] + R[C[i + 587*t]];
__syncthreads();
R[i + 1045*t] = Op[i + 588*t] ? R[B[i + 588*t]] * R[C[i + 588*t]] : R[B[i + 588*t]] + R[C[i + 588*t]];
R[i + 1046*t] = Op[i + 589*t] ? R[B[i + 589*t]] * R[C[i + 589*t]] : R[B[i + 589*t]] + R[C[i + 589*t]];
R[i + 1047*t] = Op[i + 590*t] ? R[B[i + 590*t]] * R[C[i + 590*t]] : R[B[i + 590*t]] + R[C[i + 590*t]];
R[i + 1048*t] = Op[i + 591*t] ? R[B[i + 591*t]] * R[C[i + 591*t]] : R[B[i + 591*t]] + R[C[i + 591*t]];
R[i + 1049*t] = Op[i + 592*t] ? R[B[i + 592*t]] * R[C[i + 592*t]] : R[B[i + 592*t]] + R[C[i + 592*t]];
R[i + 1050*t] = Op[i + 593*t] ? R[B[i + 593*t]] * R[C[i + 593*t]] : R[B[i + 593*t]] + R[C[i + 593*t]];
R[i + 1051*t] = Op[i + 594*t] ? R[B[i + 594*t]] * R[C[i + 594*t]] : R[B[i + 594*t]] + R[C[i + 594*t]];
R[i + 1052*t] = Op[i + 595*t] ? R[B[i + 595*t]] * R[C[i + 595*t]] : R[B[i + 595*t]] + R[C[i + 595*t]];
R[i + 1053*t] = Op[i + 596*t] ? R[B[i + 596*t]] * R[C[i + 596*t]] : R[B[i + 596*t]] + R[C[i + 596*t]];
R[i + 1054*t] = Op[i + 597*t] ? R[B[i + 597*t]] * R[C[i + 597*t]] : R[B[i + 597*t]] + R[C[i + 597*t]];
R[i + 1055*t] = Op[i + 598*t] ? R[B[i + 598*t]] * R[C[i + 598*t]] : R[B[i + 598*t]] + R[C[i + 598*t]];
R[i + 1056*t] = Op[i + 599*t] ? R[B[i + 599*t]] * R[C[i + 599*t]] : R[B[i + 599*t]] + R[C[i + 599*t]];
R[i + 1057*t] = Op[i + 600*t] ? R[B[i + 600*t]] * R[C[i + 600*t]] : R[B[i + 600*t]] + R[C[i + 600*t]];
R[i + 1058*t] = Op[i + 601*t] ? R[B[i + 601*t]] * R[C[i + 601*t]] : R[B[i + 601*t]] + R[C[i + 601*t]];
R[i + 1059*t] = Op[i + 602*t] ? R[B[i + 602*t]] * R[C[i + 602*t]] : R[B[i + 602*t]] + R[C[i + 602*t]];
R[i + 1060*t] = Op[i + 603*t] ? R[B[i + 603*t]] * R[C[i + 603*t]] : R[B[i + 603*t]] + R[C[i + 603*t]];
R[i + 1061*t] = Op[i + 604*t] ? R[B[i + 604*t]] * R[C[i + 604*t]] : R[B[i + 604*t]] + R[C[i + 604*t]];
R[i + 1062*t] = Op[i + 605*t] ? R[B[i + 605*t]] * R[C[i + 605*t]] : R[B[i + 605*t]] + R[C[i + 605*t]];
R[i + 1063*t] = Op[i + 606*t] ? R[B[i + 606*t]] * R[C[i + 606*t]] : R[B[i + 606*t]] + R[C[i + 606*t]];
R[i + 1064*t] = Op[i + 607*t] ? R[B[i + 607*t]] * R[C[i + 607*t]] : R[B[i + 607*t]] + R[C[i + 607*t]];
R[i + 1065*t] = Op[i + 608*t] ? R[B[i + 608*t]] * R[C[i + 608*t]] : R[B[i + 608*t]] + R[C[i + 608*t]];
__syncthreads();
R[i + 1066*t] = Op[i + 609*t] ? R[B[i + 609*t]] * R[C[i + 609*t]] : R[B[i + 609*t]] + R[C[i + 609*t]];
R[i + 1067*t] = Op[i + 610*t] ? R[B[i + 610*t]] * R[C[i + 610*t]] : R[B[i + 610*t]] + R[C[i + 610*t]];
R[i + 1068*t] = Op[i + 611*t] ? R[B[i + 611*t]] * R[C[i + 611*t]] : R[B[i + 611*t]] + R[C[i + 611*t]];
R[i + 1069*t] = Op[i + 612*t] ? R[B[i + 612*t]] * R[C[i + 612*t]] : R[B[i + 612*t]] + R[C[i + 612*t]];
R[i + 1070*t] = Op[i + 613*t] ? R[B[i + 613*t]] * R[C[i + 613*t]] : R[B[i + 613*t]] + R[C[i + 613*t]];
R[i + 1071*t] = Op[i + 614*t] ? R[B[i + 614*t]] * R[C[i + 614*t]] : R[B[i + 614*t]] + R[C[i + 614*t]];
R[i + 1072*t] = Op[i + 615*t] ? R[B[i + 615*t]] * R[C[i + 615*t]] : R[B[i + 615*t]] + R[C[i + 615*t]];
R[i + 1073*t] = Op[i + 616*t] ? R[B[i + 616*t]] * R[C[i + 616*t]] : R[B[i + 616*t]] + R[C[i + 616*t]];
R[i + 1074*t] = Op[i + 617*t] ? R[B[i + 617*t]] * R[C[i + 617*t]] : R[B[i + 617*t]] + R[C[i + 617*t]];
R[i + 1075*t] = Op[i + 618*t] ? R[B[i + 618*t]] * R[C[i + 618*t]] : R[B[i + 618*t]] + R[C[i + 618*t]];
R[i + 1076*t] = Op[i + 619*t] ? R[B[i + 619*t]] * R[C[i + 619*t]] : R[B[i + 619*t]] + R[C[i + 619*t]];
R[i + 1077*t] = Op[i + 620*t] ? R[B[i + 620*t]] * R[C[i + 620*t]] : R[B[i + 620*t]] + R[C[i + 620*t]];
R[i + 1078*t] = Op[i + 621*t] ? R[B[i + 621*t]] * R[C[i + 621*t]] : R[B[i + 621*t]] + R[C[i + 621*t]];
R[i + 1079*t] = Op[i + 622*t] ? R[B[i + 622*t]] * R[C[i + 622*t]] : R[B[i + 622*t]] + R[C[i + 622*t]];
R[i + 1080*t] = Op[i + 623*t] ? R[B[i + 623*t]] * R[C[i + 623*t]] : R[B[i + 623*t]] + R[C[i + 623*t]];
R[i + 1081*t] = Op[i + 624*t] ? R[B[i + 624*t]] * R[C[i + 624*t]] : R[B[i + 624*t]] + R[C[i + 624*t]];
R[i + 1082*t] = Op[i + 625*t] ? R[B[i + 625*t]] * R[C[i + 625*t]] : R[B[i + 625*t]] + R[C[i + 625*t]];
R[i + 1083*t] = Op[i + 626*t] ? R[B[i + 626*t]] * R[C[i + 626*t]] : R[B[i + 626*t]] + R[C[i + 626*t]];
R[i + 1084*t] = Op[i + 627*t] ? R[B[i + 627*t]] * R[C[i + 627*t]] : R[B[i + 627*t]] + R[C[i + 627*t]];
R[i + 1085*t] = Op[i + 628*t] ? R[B[i + 628*t]] * R[C[i + 628*t]] : R[B[i + 628*t]] + R[C[i + 628*t]];
R[i + 1086*t] = Op[i + 629*t] ? R[B[i + 629*t]] * R[C[i + 629*t]] : R[B[i + 629*t]] + R[C[i + 629*t]];
R[i + 1087*t] = Op[i + 630*t] ? R[B[i + 630*t]] * R[C[i + 630*t]] : R[B[i + 630*t]] + R[C[i + 630*t]];
R[i + 1088*t] = Op[i + 631*t] ? R[B[i + 631*t]] * R[C[i + 631*t]] : R[B[i + 631*t]] + R[C[i + 631*t]];
R[i + 1089*t] = Op[i + 632*t] ? R[B[i + 632*t]] * R[C[i + 632*t]] : R[B[i + 632*t]] + R[C[i + 632*t]];
R[i + 1090*t] = Op[i + 633*t] ? R[B[i + 633*t]] * R[C[i + 633*t]] : R[B[i + 633*t]] + R[C[i + 633*t]];
R[i + 1091*t] = Op[i + 634*t] ? R[B[i + 634*t]] * R[C[i + 634*t]] : R[B[i + 634*t]] + R[C[i + 634*t]];
R[i + 1092*t] = Op[i + 635*t] ? R[B[i + 635*t]] * R[C[i + 635*t]] : R[B[i + 635*t]] + R[C[i + 635*t]];
R[i + 1093*t] = Op[i + 636*t] ? R[B[i + 636*t]] * R[C[i + 636*t]] : R[B[i + 636*t]] + R[C[i + 636*t]];
__syncthreads();
R[i + 1094*t] = Op[i + 637*t] ? R[B[i + 637*t]] * R[C[i + 637*t]] : R[B[i + 637*t]] + R[C[i + 637*t]];
R[i + 1095*t] = Op[i + 638*t] ? R[B[i + 638*t]] * R[C[i + 638*t]] : R[B[i + 638*t]] + R[C[i + 638*t]];
R[i + 1096*t] = Op[i + 639*t] ? R[B[i + 639*t]] * R[C[i + 639*t]] : R[B[i + 639*t]] + R[C[i + 639*t]];
R[i + 1097*t] = Op[i + 640*t] ? R[B[i + 640*t]] * R[C[i + 640*t]] : R[B[i + 640*t]] + R[C[i + 640*t]];
R[i + 1098*t] = Op[i + 641*t] ? R[B[i + 641*t]] * R[C[i + 641*t]] : R[B[i + 641*t]] + R[C[i + 641*t]];
R[i + 1099*t] = Op[i + 642*t] ? R[B[i + 642*t]] * R[C[i + 642*t]] : R[B[i + 642*t]] + R[C[i + 642*t]];
R[i + 1100*t] = Op[i + 643*t] ? R[B[i + 643*t]] * R[C[i + 643*t]] : R[B[i + 643*t]] + R[C[i + 643*t]];
R[i + 1101*t] = Op[i + 644*t] ? R[B[i + 644*t]] * R[C[i + 644*t]] : R[B[i + 644*t]] + R[C[i + 644*t]];
R[i + 1102*t] = Op[i + 645*t] ? R[B[i + 645*t]] * R[C[i + 645*t]] : R[B[i + 645*t]] + R[C[i + 645*t]];
R[i + 1103*t] = Op[i + 646*t] ? R[B[i + 646*t]] * R[C[i + 646*t]] : R[B[i + 646*t]] + R[C[i + 646*t]];
R[i + 1104*t] = Op[i + 647*t] ? R[B[i + 647*t]] * R[C[i + 647*t]] : R[B[i + 647*t]] + R[C[i + 647*t]];
R[i + 1105*t] = Op[i + 648*t] ? R[B[i + 648*t]] * R[C[i + 648*t]] : R[B[i + 648*t]] + R[C[i + 648*t]];
R[i + 1106*t] = Op[i + 649*t] ? R[B[i + 649*t]] * R[C[i + 649*t]] : R[B[i + 649*t]] + R[C[i + 649*t]];
R[i + 1107*t] = Op[i + 650*t] ? R[B[i + 650*t]] * R[C[i + 650*t]] : R[B[i + 650*t]] + R[C[i + 650*t]];
R[i + 1108*t] = Op[i + 651*t] ? R[B[i + 651*t]] * R[C[i + 651*t]] : R[B[i + 651*t]] + R[C[i + 651*t]];
R[i + 1109*t] = Op[i + 652*t] ? R[B[i + 652*t]] * R[C[i + 652*t]] : R[B[i + 652*t]] + R[C[i + 652*t]];
R[i + 1110*t] = Op[i + 653*t] ? R[B[i + 653*t]] * R[C[i + 653*t]] : R[B[i + 653*t]] + R[C[i + 653*t]];
R[i + 1111*t] = Op[i + 654*t] ? R[B[i + 654*t]] * R[C[i + 654*t]] : R[B[i + 654*t]] + R[C[i + 654*t]];
R[i + 1112*t] = Op[i + 655*t] ? R[B[i + 655*t]] * R[C[i + 655*t]] : R[B[i + 655*t]] + R[C[i + 655*t]];
R[i + 1113*t] = Op[i + 656*t] ? R[B[i + 656*t]] * R[C[i + 656*t]] : R[B[i + 656*t]] + R[C[i + 656*t]];
R[i + 1114*t] = Op[i + 657*t] ? R[B[i + 657*t]] * R[C[i + 657*t]] : R[B[i + 657*t]] + R[C[i + 657*t]];
R[i + 1115*t] = Op[i + 658*t] ? R[B[i + 658*t]] * R[C[i + 658*t]] : R[B[i + 658*t]] + R[C[i + 658*t]];
R[i + 1116*t] = Op[i + 659*t] ? R[B[i + 659*t]] * R[C[i + 659*t]] : R[B[i + 659*t]] + R[C[i + 659*t]];
__syncthreads();
R[i + 1117*t] = Op[i + 660*t] ? R[B[i + 660*t]] * R[C[i + 660*t]] : R[B[i + 660*t]] + R[C[i + 660*t]];
R[i + 1118*t] = Op[i + 661*t] ? R[B[i + 661*t]] * R[C[i + 661*t]] : R[B[i + 661*t]] + R[C[i + 661*t]];
R[i + 1119*t] = Op[i + 662*t] ? R[B[i + 662*t]] * R[C[i + 662*t]] : R[B[i + 662*t]] + R[C[i + 662*t]];
R[i + 1120*t] = Op[i + 663*t] ? R[B[i + 663*t]] * R[C[i + 663*t]] : R[B[i + 663*t]] + R[C[i + 663*t]];
R[i + 1121*t] = Op[i + 664*t] ? R[B[i + 664*t]] * R[C[i + 664*t]] : R[B[i + 664*t]] + R[C[i + 664*t]];
R[i + 1122*t] = Op[i + 665*t] ? R[B[i + 665*t]] * R[C[i + 665*t]] : R[B[i + 665*t]] + R[C[i + 665*t]];
R[i + 1123*t] = Op[i + 666*t] ? R[B[i + 666*t]] * R[C[i + 666*t]] : R[B[i + 666*t]] + R[C[i + 666*t]];
R[i + 1124*t] = Op[i + 667*t] ? R[B[i + 667*t]] * R[C[i + 667*t]] : R[B[i + 667*t]] + R[C[i + 667*t]];
R[i + 1125*t] = Op[i + 668*t] ? R[B[i + 668*t]] * R[C[i + 668*t]] : R[B[i + 668*t]] + R[C[i + 668*t]];
R[i + 1126*t] = Op[i + 669*t] ? R[B[i + 669*t]] * R[C[i + 669*t]] : R[B[i + 669*t]] + R[C[i + 669*t]];
R[i + 1127*t] = Op[i + 670*t] ? R[B[i + 670*t]] * R[C[i + 670*t]] : R[B[i + 670*t]] + R[C[i + 670*t]];
R[i + 1128*t] = Op[i + 671*t] ? R[B[i + 671*t]] * R[C[i + 671*t]] : R[B[i + 671*t]] + R[C[i + 671*t]];
R[i + 1129*t] = Op[i + 672*t] ? R[B[i + 672*t]] * R[C[i + 672*t]] : R[B[i + 672*t]] + R[C[i + 672*t]];
__syncthreads();
R[i + 1130*t] = Op[i + 673*t] ? R[B[i + 673*t]] * R[C[i + 673*t]] : R[B[i + 673*t]] + R[C[i + 673*t]];
R[i + 1131*t] = Op[i + 674*t] ? R[B[i + 674*t]] * R[C[i + 674*t]] : R[B[i + 674*t]] + R[C[i + 674*t]];
R[i + 1132*t] = Op[i + 675*t] ? R[B[i + 675*t]] * R[C[i + 675*t]] : R[B[i + 675*t]] + R[C[i + 675*t]];
R[i + 1133*t] = Op[i + 676*t] ? R[B[i + 676*t]] * R[C[i + 676*t]] : R[B[i + 676*t]] + R[C[i + 676*t]];
R[i + 1134*t] = Op[i + 677*t] ? R[B[i + 677*t]] * R[C[i + 677*t]] : R[B[i + 677*t]] + R[C[i + 677*t]];
R[i + 1135*t] = Op[i + 678*t] ? R[B[i + 678*t]] * R[C[i + 678*t]] : R[B[i + 678*t]] + R[C[i + 678*t]];
R[i + 1136*t] = Op[i + 679*t] ? R[B[i + 679*t]] * R[C[i + 679*t]] : R[B[i + 679*t]] + R[C[i + 679*t]];
R[i + 1137*t] = Op[i + 680*t] ? R[B[i + 680*t]] * R[C[i + 680*t]] : R[B[i + 680*t]] + R[C[i + 680*t]];
R[i + 1138*t] = Op[i + 681*t] ? R[B[i + 681*t]] * R[C[i + 681*t]] : R[B[i + 681*t]] + R[C[i + 681*t]];
R[i + 1139*t] = Op[i + 682*t] ? R[B[i + 682*t]] * R[C[i + 682*t]] : R[B[i + 682*t]] + R[C[i + 682*t]];
R[i + 1140*t] = Op[i + 683*t] ? R[B[i + 683*t]] * R[C[i + 683*t]] : R[B[i + 683*t]] + R[C[i + 683*t]];
R[i + 1141*t] = Op[i + 684*t] ? R[B[i + 684*t]] * R[C[i + 684*t]] : R[B[i + 684*t]] + R[C[i + 684*t]];
R[i + 1142*t] = Op[i + 685*t] ? R[B[i + 685*t]] * R[C[i + 685*t]] : R[B[i + 685*t]] + R[C[i + 685*t]];
__syncthreads();
R[i + 1143*t] = Op[i + 686*t] ? R[B[i + 686*t]] * R[C[i + 686*t]] : R[B[i + 686*t]] + R[C[i + 686*t]];
R[i + 1144*t] = Op[i + 687*t] ? R[B[i + 687*t]] * R[C[i + 687*t]] : R[B[i + 687*t]] + R[C[i + 687*t]];
R[i + 1145*t] = Op[i + 688*t] ? R[B[i + 688*t]] * R[C[i + 688*t]] : R[B[i + 688*t]] + R[C[i + 688*t]];
R[i + 1146*t] = Op[i + 689*t] ? R[B[i + 689*t]] * R[C[i + 689*t]] : R[B[i + 689*t]] + R[C[i + 689*t]];
R[i + 1147*t] = Op[i + 690*t] ? R[B[i + 690*t]] * R[C[i + 690*t]] : R[B[i + 690*t]] + R[C[i + 690*t]];
R[i + 1148*t] = Op[i + 691*t] ? R[B[i + 691*t]] * R[C[i + 691*t]] : R[B[i + 691*t]] + R[C[i + 691*t]];
R[i + 1149*t] = Op[i + 692*t] ? R[B[i + 692*t]] * R[C[i + 692*t]] : R[B[i + 692*t]] + R[C[i + 692*t]];
R[i + 1150*t] = Op[i + 693*t] ? R[B[i + 693*t]] * R[C[i + 693*t]] : R[B[i + 693*t]] + R[C[i + 693*t]];
R[i + 1151*t] = Op[i + 694*t] ? R[B[i + 694*t]] * R[C[i + 694*t]] : R[B[i + 694*t]] + R[C[i + 694*t]];
R[i + 1152*t] = Op[i + 695*t] ? R[B[i + 695*t]] * R[C[i + 695*t]] : R[B[i + 695*t]] + R[C[i + 695*t]];
__syncthreads();
R[i + 1153*t] = Op[i + 696*t] ? R[B[i + 696*t]] * R[C[i + 696*t]] : R[B[i + 696*t]] + R[C[i + 696*t]];
R[i + 1154*t] = Op[i + 697*t] ? R[B[i + 697*t]] * R[C[i + 697*t]] : R[B[i + 697*t]] + R[C[i + 697*t]];
R[i + 1155*t] = Op[i + 698*t] ? R[B[i + 698*t]] * R[C[i + 698*t]] : R[B[i + 698*t]] + R[C[i + 698*t]];
R[i + 1156*t] = Op[i + 699*t] ? R[B[i + 699*t]] * R[C[i + 699*t]] : R[B[i + 699*t]] + R[C[i + 699*t]];
R[i + 1157*t] = Op[i + 700*t] ? R[B[i + 700*t]] * R[C[i + 700*t]] : R[B[i + 700*t]] + R[C[i + 700*t]];
R[i + 1158*t] = Op[i + 701*t] ? R[B[i + 701*t]] * R[C[i + 701*t]] : R[B[i + 701*t]] + R[C[i + 701*t]];
R[i + 1159*t] = Op[i + 702*t] ? R[B[i + 702*t]] * R[C[i + 702*t]] : R[B[i + 702*t]] + R[C[i + 702*t]];
__syncthreads();
R[i + 1160*t] = Op[i + 703*t] ? R[B[i + 703*t]] * R[C[i + 703*t]] : R[B[i + 703*t]] + R[C[i + 703*t]];
R[i + 1161*t] = Op[i + 704*t] ? R[B[i + 704*t]] * R[C[i + 704*t]] : R[B[i + 704*t]] + R[C[i + 704*t]];
R[i + 1162*t] = Op[i + 705*t] ? R[B[i + 705*t]] * R[C[i + 705*t]] : R[B[i + 705*t]] + R[C[i + 705*t]];
R[i + 1163*t] = Op[i + 706*t] ? R[B[i + 706*t]] * R[C[i + 706*t]] : R[B[i + 706*t]] + R[C[i + 706*t]];
R[i + 1164*t] = Op[i + 707*t] ? R[B[i + 707*t]] * R[C[i + 707*t]] : R[B[i + 707*t]] + R[C[i + 707*t]];
__syncthreads();
R[i + 1165*t] = Op[i + 708*t] ? R[B[i + 708*t]] * R[C[i + 708*t]] : R[B[i + 708*t]] + R[C[i + 708*t]];
R[i + 1166*t] = Op[i + 709*t] ? R[B[i + 709*t]] * R[C[i + 709*t]] : R[B[i + 709*t]] + R[C[i + 709*t]];
R[i + 1167*t] = Op[i + 710*t] ? R[B[i + 710*t]] * R[C[i + 710*t]] : R[B[i + 710*t]] + R[C[i + 710*t]];
__syncthreads();
R[i + 1168*t] = Op[i + 711*t] ? R[B[i + 711*t]] * R[C[i + 711*t]] : R[B[i + 711*t]] + R[C[i + 711*t]];
R[i + 1169*t] = Op[i + 712*t] ? R[B[i + 712*t]] * R[C[i + 712*t]] : R[B[i + 712*t]] + R[C[i + 712*t]];
R[i + 1170*t] = Op[i + 713*t] ? R[B[i + 713*t]] * R[C[i + 713*t]] : R[B[i + 713*t]] + R[C[i + 713*t]];
__syncthreads();
R[i + 1171*t] = Op[i + 714*t] ? R[B[i + 714*t]] * R[C[i + 714*t]] : R[B[i + 714*t]] + R[C[i + 714*t]];
R[i + 1172*t] = Op[i + 715*t] ? R[B[i + 715*t]] * R[C[i + 715*t]] : R[B[i + 715*t]] + R[C[i + 715*t]];
R[i + 1173*t] = Op[i + 716*t] ? R[B[i + 716*t]] * R[C[i + 716*t]] : R[B[i + 716*t]] + R[C[i + 716*t]];
__syncthreads();
R[i + 1174*t] = Op[i + 717*t] ? R[B[i + 717*t]] * R[C[i + 717*t]] : R[B[i + 717*t]] + R[C[i + 717*t]];
R[i + 1175*t] = Op[i + 718*t] ? R[B[i + 718*t]] * R[C[i + 718*t]] : R[B[i + 718*t]] + R[C[i + 718*t]];
__syncthreads();
R[i + 1176*t] = Op[i + 719*t] ? R[B[i + 719*t]] * R[C[i + 719*t]] : R[B[i + 719*t]] + R[C[i + 719*t]];
__syncthreads();
R[i + 1177*t] = Op[i + 720*t] ? R[B[i + 720*t]] * R[C[i + 720*t]] : R[B[i + 720*t]] + R[C[i + 720*t]];
__syncthreads();
R[i + 1178*t] = Op[i + 721*t] ? R[B[i + 721*t]] * R[C[i + 721*t]] : R[B[i + 721*t]] + R[C[i + 721*t]];
__syncthreads();
R[i + 1179*t] = Op[i + 722*t] ? R[B[i + 722*t]] * R[C[i + 722*t]] : R[B[i + 722*t]] + R[C[i + 722*t]];
__syncthreads();
R[i + 1180*t] = Op[i + 723*t] ? R[B[i + 723*t]] * R[C[i + 723*t]] : R[B[i + 723*t]] + R[C[i + 723*t]];
__syncthreads();
R[i + 1181*t] = Op[i + 724*t] ? R[B[i + 724*t]] * R[C[i + 724*t]] : R[B[i + 724*t]] + R[C[i + 724*t]];
__syncthreads();
R[i + 1182*t] = Op[i + 725*t] ? R[B[i + 725*t]] * R[C[i + 725*t]] : R[B[i + 725*t]] + R[C[i + 725*t]];
__syncthreads();
R[i + 1183*t] = Op[i + 726*t] ? R[B[i + 726*t]] * R[C[i + 726*t]] : R[B[i + 726*t]] + R[C[i + 726*t]];
if (i==0) { final += R[1183*t]; }
__syncthreads();
}
if (i==0) { A[0]= final;}
}
| a84364ad28b757871ed3ea81318de0716ce3db1c.cu | float h_A[]= {
0.6231129915441065, 0.6159796536213568, 0.7516223300466565, 0.5614399174950864, 0.7806484910812693, 0.6231672425083965, 0.9403363360562412, 0.6721354421249044, 0.9066093680806764, 0.8975730352955702, 0.5148014596757533, 0.7417318092438872, 0.7395976420984723, 0.7838657534425599, 0.7958196527715926, 0.9375050923134054, 0.8925208888533525, 0.9182557013015487, 0.7745808923236535, 0.8083106383229153, 0.6827379301611063, 0.7757183931732181, 0.6277217423914624, 0.9584034790959745, 0.5386046765163974, 0.5353430803782013, 0.5459403184326601, 0.8212653861444605, 0.6110477850671165, 0.8689436423980099, 0.8462802727011302, 0.5115158775423836, 0.854267800810526, 0.5401720830282366, 0.5489186938344522, 0.631719961603628, 0.6607827994601548, 0.7434779337661432, 0.8082060954841934, 0.6489736635388637, 0.7154711251206838, 0.8642656107268478, 0.8659626680894827, 0.9498259714562574, 0.8384446230232696, 0.6631239631499953, 0.9040393642032084, 0.6349754120196889, 0.8011538140809963, 0.6006921546597147, 0.6374219346747811, 0.7233058506355274, 0.8207923396424412, 0.5088873655394561, 0.9900742116034964, 0.9266812371695384, 0.8367248863675525, 0.9526369590172841, 0.7322410991662831, 0.8786529394998712, 0.5437779463522676, 0.5380024376868351, 0.5734568167815381, 0.6910514571287729, 0.8544264536935693, 0.9318651407577285, 0.8591376391571255, 0.6156888717580042, 0.8014405849173016, 0.9277805086053746, 0.8784878132450062, 0.798362565885458, 0.649093181842976, 0.9834114914139269, 0.5008324392102079, 0.9612254530848625, 0.912095210579595, 0.940520147390048, 0.8248652530071363, 0.8306116274446957, 0.9551910442225091, 0.7006083425860362, 0.8073798191743724, 0.7654246239545331, 0.7335094060071523, 0.9566657212856664, 0.7134826179794267, 0.9537858036804708, 0.617057065367487, 0.8619508800347451, 0.6843935305503841, 0.5207910741411301, 0.9785500292291038, 0.5070104662087561, 0.6249875591972298, 0.8994998996467646, 0.6259984816008164, 0.8747435062294515, 0.938836018654275, 0.7721455900197995, 0.5205277478450147, 0.7092020040375254, 0.6302234697621729, 0.8497083807082549, 0.6428281815244772, 0.9416628510080747, 0.6260845098581116, 0.7928952482094195, 0.624599528560787, 0.6859718744429495, 0.6872135635530618, 0.5670082875509619, 0.9615224123611941, 0.7171713600225094, 0.9501806880151904, 0.7415013053720096, 0.7151780895901266, 0.6560444192883779, 0.5469859240905652, 0.591078956304478, 0.8563483823140198, 0.5923644764413061, 0.5097451675655706, 0.8694857884471935, 0.9628249447312887, 0.9321936310741543, 0.8787460193242878, 0.7875744381282235, 0.5219567684765394, 0.9599228820503526, 0.6564180483726969, 0.6485485672831486, 0.5256159685232262, 0.8652969372417784, 0.8137375382850347, 0.6672763382156496, 0.9263399169288334, 0.5410968971242123, 0.9229245611361123, 0.5000747175127569, 0.5564754806783984, 0.9395750338086212, 0.7220948558619438, 0.6459532719589148, 0.5152335697318225, 0.9234476338386897, 0.5257919729312173, 0.6230655421651594, 0.8597770868478505, 0.5770565656879671, 0.9223726231740734, 0.5680899386100562, 0.5006000245550888, 0.6979198300392617, 0.5018965269953596, 0.8454242688159548, 0.9631175492087045, 0.5614366050492758, 0.5926550351759485, 0.9401213868689287, 0.8291604776961117, 0.7373403344746008, 0.6002687728920982, 0.6798071702358752, 0.603507204830142, 0.6457512750488867, 0.9995740653637379, 0.5579295186962758, 0.8586588385019173, 0.7415016975870887, 0.667902856262832, 0.8935213374781765, 0.8762534530544219, 0.673539578441524, 0.9066231836336207, 0.8563339931062417, 0.923105739454678, 0.6422211097308812, 0.674354156312788, 0.6244769298078643, 0.9675956254920509, 0.6183575832881996, 0.843405113295223, 0.6360807883804059, 0.6630965265803216, 0.8939541198063397, 0.5636782779161275, 0.8116837814418487, 0.5491926349061023, 0.835112706251385, 0.8690902411800727, 0.8113076743039271, 0.9129195117073323, 0.9571878054302201, 0.6618350757936878, 0.9416701258834982, 0.7636540694150873, 0.7105603154966307, 0.6877925183546314, 0.544875823764067, 0.5455996041831477, 0.5711311106330184, 0.6200274219809795, 0.9433103777063984, 0.6169173972193338, 0.7504459547235904, 0.7166313885237237, 0.9499909422701918, 0.9912074362229487, 0.6000075360814325, 0.5400851038408295, 0.6261523293470741, 0.6786910890135709, 0.6284514784491615, 0.9992253429478433, 0.9119848094792049, 0.7013984517771935, 0.6627402648744514, 0.8909205633813799, 0.7842873295527706, 0.5697292044208534, 0.7106124499491107, 0.9767752968246721, 0.5575279051872302, 0.7641444429889482, 0.9371106844679346, 0.9545775880295567, 0.9566975577371198, 0.8068402293318777, 0.7320145654425483, 0.7655422459353924, 0.5837697195690035, 0.6500074203310982, 0.6428431190225623, 0.5654279614973293, 0.8060388828699947, 0.5727197565062961, 0.9896230079646497, 0.8829856786996545, 0.655245767593196, 0.6124921466920681, 0.9996448564558036, 0.6833823888504206, 0.8457048651127149, 0.8263059885176727, 0.5567621185780027, 0.9537738469718369, 0.653805126507804, 0.8846050898551858, 0.9748820579266942, 0.781329156707042, 0.6025381108763442, 0.6592712134303573, 0.5750848884360531, 0.6909478873975476, 0.607719258985294, 0.7328110828159027, 0.5295094471376443, 0.7662378227902359, 0.6273161019289721, 0.6237108219505152, 0.8992545582736129, 0.7408924070822671, 0.8554458797086282, 0.6501761128001067, 0.8868037448011008, 0.6848420360758002, 0.5810518247056454, 0.514561791239164, 0.7797061750863576, 0.5899109998707627, 0.8122005827655764, 0.9405845344831192, 0.9129523830193342, 0.7388674001194985, 0.7036167922019965, 0.8376923047528994, 0.9356996382887639, 0.9207146057252313, 0.8711361755245899, 0.8017401810881346, 0.9059090655910486, 0.5658402806319779, 0.9837023881892969, 0.552300768450639, 0.9280108632701148, 0.5485926731603842, 0.5260890249758323, 0.7838581673255463, 0.6163778516668972, 0.6986172580789347, 0.9050491985883552, 0.9034637041231895, 0.5061313739332158, 0.7199168470029942, 0.9315585714321966, 0.815954180593125, 0.5448808329157446, 0.5696455817949435, 0.7747134476939372, 0.6534371610036945, 0.8818886810739733, 0.8120304351421179, 0.7827721351710639, 0.9388934246422382, 0.5948903085063191, 0.563164028280289, 0.7478287829107519, 0.6876873222390273, 0.9927345879482165, 0.7717461657057183, 0.645512255294729, 0.633112289565604, 0.8819028426048845, 0.7096336448171392, 0.9345439632777494, 0.6739557970772094, 0.8710214569577517, 0.5515300017330856, 0.7996178931083927, 0.7191821987243594, 0.9985116862901565, 0.6053762757328738, 0.5172819238099848, 0.6500454676790536, 0.7431442614402977, 0.7525641905450021, 0.6798147169536097, 0.5441689511195633, 0.8132244166605793, 0.5945750781444674, 0.9598047800186389, 0.7721178817141192, 0.5089610972284075, 0.5565966345577334, 0.6478777195735224, 0.5208216151213814, 0.5930713815190874, 0.5517309544944026, 0.8910858495551517, 0.7269838218153863, 0.9688727095889571, 0.6002526329836235, 0.9377391727724688, 0.6735084949603115, 0.8663436342252573, 0.5355734573318359, 0.5679287909707504, 0.7304302222815067, 0.6572071597402827, 0.5519768313302931, 0.8410960687108151, 0.9195531048993237, 0.5814858718954103, 0.8737159221651591, 0.9509786855954421, 0.512833053656029, 0.8927300254446374, 0.9449875387149258, 0.8675461282266576, 0.9990452978295511, 0.7363735636428466, 0.8932848688136248, 0.8782825214419895, 0.6731069362050313, 0.789804609109737, 0.6231475781843507, 0.6804469238301319, 0.8870931095698071, 0.9533266193307992, 0.9792554504717094, 0.8725089213092518, 0.5460665347599196, 0.9232416852926772, 0.740369652882297, 0.8681648439843996, 0.9811150396629205, 0.5021694330468041, 0.7400376301304266, 0.9288631977775093, 0.6306529153682086, 0.6460809557342271, 0.7306143224222293, 0.7227319738704963, 0.8788990689398752, 0.970599236176393, 0.9376811301021398, 0.6200947072488107, 0.6792415366211916, 0.5963519132252781, 0.9863570254794669, 0.8387533292874276, 0.8657647308722949, 0.6794470543050577, 0.9186333038943053, 0.9707058415397927, 0.7618658283778348, 0.6499250440670727, 0.8986719573560611, 0.9839273466576031, 0.5906214423350019, 0.9154388586595762, 0.6657796047228282, 0.6330470090697313, 0.9552050784326411, 0.738325721509996, 0.8590447907516618, 0.6824715569087052, 0.8296743172459139, 0.6642433602190025, 0.9951331803019781, 0.6161125467387472, 0.8549857043175508, 0.6319431593104303, 0.5700873105503972, 0.7379668888100245, 0.862038758700446, 0.9685098605330358, 0.9517238879244924, 0.7922135689034713, 0.8400741696581916, 0.834950088136843, 0.9209234535103051, 0.8076748782325308, 0.882691980212383, 0.6487892924085683, 0.7039874336585179, 0.7003517446375862, 0.8960984565828198, 0.6449294636659453, 0.9989436458384507, 0.7393980853567137, 0.5346435465118289, 0.567376185658349, 0.6154976391923856, 0.7905250186280315, 0.7107835087777479, 0.7278764104921196, 0.568935834280007, 0.7375124856502002, 0.8728755555352032, 0.9631035742567786, 0.9621434007570535, 0.5868593015450626, 0.9661629477387906, 0.645695190061595, 0.9648338420842303, 0.7609323023146877, 0.7766940788180837, 0.6293118382566654, 0.5130283399523377, 0.5672784768319591, 0.8941065643435469, 0.7829471685049014, 0.9747018841729581, 0.901851495087942, 0.9163027099384856, 0.9838632192803363, 0.5150793267165377, 0.9612472475052762, 0.5228192030577626, 0.9270983548458445, 0.579635779126106, 0.8123330197231722, 0.751209551377094, 0.7909084991210181, 0.8515927891206008, 0.7983903304842108, 0.5130832140580253, 0.9417641460425336, 0.9664315546262596, 0.7319566256426997, 0.9522152645882532, 0.5182438838335623, 0.5520680409677599, 0.7442729274492974, 0.5087176857621984, 0.932881146465651, 0.7230050412115632, 0.5889944353335046, 0.680567103221491, 0.6663931063301812, 0.7947224641281816, 0.838134755054808, 0.5053820682293888, 0.5444784298272363, 0.9535133479373734, 0.891020553808165, 0.974895436056344, 0.8560799138937666, 0.6681184277520819, 0.6372990531089441, 0.5829792279404102, 0.8133826398209643, 0.8366950799961499, 0.9559761575858512, 0.6143780514866594, 0.6276728072659123, 0.9118967269293572, 0.8773952468671034, 0.88279115301469, 0.9680458336898772, 0.5125820471898073, 0.676751991420913, 0.8794505572281495, 0.5661953001111063, 0.7865613402773806, 0.7363527422898919, 0.9864494672010877, 0.7623683892314708, 0.7454866184939104, 0.5766261718796725, 0.7115869037878417, 0.5414206227633866, 0.845587781326745, 0.504776081564656, 0.9907191630945926, 0.7675637287580176, 0.7726139793646122, 0.7742168191339667, 0.868391518724863, 0.9109132509725286, 0.8253911577468436, 0.9430526764224948, 0.8121814379858181, 0.9586831322090483, 0.9955526147817425, 0.7555485124080269, 0.951870945990487, 0.7070807412088262, 0.9251916981314785, 0.7185013710221758, 0.7319703397192265, 0.5944592508489821, 0.9834087819271513, 0.934642786533803, 0.5603841109565643, 0.8210269734521991, 0.6253512414019582, 0.9260898196335361, 0.8665767409662803, 0.9050767012856189, 0.8471981197698937, 0.8473043190658394, 0.665967021772097, 0.6872189630441249, 0.5126150396798261, 0.684183136454735, 0.8030353117802176, 0.5849351247803118, 0.6322487670731847, 0.8117587102385158, 0.7022805956011248, 0.8734770771286938, 0.676767762970323, 0.6769016913831027, 0.600516406815514, 0.8145744504355339, 0.5685954674517373, 0.5894749946697353, 0.6292156217080138, 0.9589964712972039, 0.8976539306161458, 0.5824753777459901, 0.854648407328739, 0.7256568102548506, 0.6329233179816007, 0.8915536253555497, 0.9625006177059754, 0.9745095399541305, 0.6324248973798177, 0.9340377041257449, 0.7791553989503217, 0.5616172973217096, 0.6930233627533812, 0.883462419269026, 0.9146586375629057, 0.6800390363780204, 0.94075175788484, 0.7368211502913519, 0.983753273845118, 0.9955723086293884, 0.9556548939219516, 0.5333131055871545, 0.539875441902314, 0.6179480634979087, 0.9153417267266983, 0.6269917334333059, 0.9401085837393051, 0.9826963847065988, 0.857775027143439, 0.9752279602295932, 0.8016591667337902, 0.5526749828428139, 0.5873432790323927, 0.8568082377353452, 0.6588855452928613, 0.704712310351657, 0.8273130342611655, 0.5147878226710951, 0.6164213260543625, 0.5651066137646661, 0.9100037023026364, 0.9262219507337428, 0.6925037929862654, 0.9147171635843709, 0.7316294156868022, 0.5986389853893191, 0.6498360946480631, 0.6679724559237927, 0.9092667962686352, 0.6727241959521846, 0.5761271479074204, 0.9303496907187587, 0.5208742849275381, 0.5688282650982538, 0.8512411698203852, 0.7211090536721754, 0.8142992523059117, 0.8778328856146693, 0.5033384163803003, 0.6115579158925488, 0.7902729536851794, 0.981791617333216, 0.92453488655899, 0.7558885278651677, 0.9967482692507769, 0.7924065176111872, 0.7482521428629553, 0.7285037906415329, 0.6785311034975143, 0.8704985464752169, 0.605170399625811, 0.8428586325987366, 0.9584546166553976, 0.5270505140594213, 0.6666974183405846, 0.690067636078636, 0.677022142274813, 0.5364979126391061, 0.5543495035748016, 0.979585597294313, 0.634811134429331, 0.6667662086924797, 0.7955473200641736, 0.9315600850727483, 0.5002518737620998, 0.6072477084337908, 0.6715030516313594, 0.6575046812548231, 0.6299251025702642, 0.9958170673263758, 0.6456453559002316, 0.5011857384444554, 0.695288537800834, 0.6395236855683606, 0.6112286077235237, 0.9977086684989769, 0.5553230175431497, 0.6252216222013073, 0.8214098796868285, 0.658917330481001, 0.9737624848741698, 0.705517239131705, 0.5712234042250248, 0.8034700974892239, 0.6701014856768135, 0.5252916894179191, 0.7684846911081462, 0.8912419886507128, 0.5627671995953701, 0.5133166069125245, 0.7696306550243641, 0.9879240699373749, 0.8567784694026737, 0.7901037283798003, 0.6858241188245051, 0.6596347782525467, 0.5314653807377633, 0.5010391512724884, 0.7329126091955831, 0.7718138743201848, 0.5157786482540874, 0.5015340131100495, 0.7715826797636136, 0.8422628863726842, 0.9267031183772544, 0.6757559822626893, 0.5284138624535901, 0.7496657256687698, 0.8450679615811285, 0.6718956657145245, 0.6003060934715128, 0.6783545601277546, 0.7659223215889976, 0.5936240245713573, 0.9508955845109617, 0.924050138086612, 0.7063521013024623, 0.7941917617118739, 0.8667324714162374, 0.8126066279949309, 0.7393466313508428, 0.6117954387101932, 0.9230278675894132, 0.8372836971083719, 0.6304730667309075, 0.8928457084262953, 0.9860179822698614, 0.9251553408559383, 0.820938776181915, 0.9494621477520993, 0.6295723327274786, 0.6359877834874654, 0.8125707657754048, 0.9597724896550988, 0.7380643705869264, 0.8506790178722635, 0.8425208523522942, 0.7271416552788111, 0.824525265438611, 0.729249265875352, 0.9061721299901306, 0.6829223604100216, 0.8639324377069236, 0.756388526050429, 0.7794483195210079, 0.661343974330326, 0.5315562141594381, 0.9331649327739031, 0.6696791385363806, 0.92369604464687, 0.8467888727054389, 0.9160000425371698, 0.9045401659388871, 0.729100687495724, 0.5609970910943536, 0.7456925389010424, 0.7219246127781431, 0.9206467824169767, 0.7584741752166435, 0.6910410012366538, 0.7569374436598852, 0.6303210422410532, 0.9673883725849218, 0.7454928551155691, 0.8540743310271661, 0.9727943776631689, 0.9889254036200168, 0.9310210843692478, 0.7225896994306678, 0.5332406423266105, 0.8868524601903642, 0.8274078539377231, 0.9228642893239821, 0.92137567439106, 0.8077992788922449, 0.6696303871528009, 0.7307158969352983, 0.9923949721479743, 0.6332137821197068, 0.6600311790096154, 0.696692889784394, 0.8883611061327155, 0.5015212512240032, 0.7552851525379531, 0.6726615557734774, 0.7328679134027745, 0.7873168075296828, 0.6230143256691787, 0.569381656912868, 0.7716877155304882, 0.8237241354715037, 0.5173910594003481, 0.8125903584080092, 0.6078370344769615, 0.5892100057195989, 0.8834370253503637, 0.8194962487057115, 0.8159700909375831, 0.6213198942072351, 0.9003218071236513, 0.7124385105010342, 0.7837521806309915, 0.8650631432024809, 0.9148452074322233, 0.7196828906538346, 0.626386065727919, 0.513330807917061, 0.9031182459133944, 0.9251839609305594, 0.8927745252385015, 0.7831530975101261, 0.7863875213737503, 0.7691955768092986, 0.866324587457393, 0.8709040078929056, 0.7997527996750775, 0.9195875060056442, 0.5113607748097362, 0.7410871144262727, 0.741303338135983, 0.6422636706661331, 0.6487801379087533, 0.8223142803995676, 0.6345016529469176, 0.5225377383489092, 0.9066074454100934, 0.6464776766137941, 0.9552958780477084, 0.7355642654252159, 0.8424783058583839, 0.9667883817551132, 0.9998371499577414, 0.8252606798518234, 0.9632562789648451, 0.6386500404900137, 0.7076830812867123, 0.831006227304556, 0.751565680195303, 0.5489275889586895, 0.6899345022156451, 0.5817283354788926, 0.5629772928788342, 0.6305141740058162, 0.6042878025323111, 0.8227681902213311, 0.9464535589209744, 0.5026184960003914, 0.8120976963774083, 0.536753931264961, 0.8052083366962008, 0.580308254939012, 0.6992047808035329, 0.83982982015261, 0.6142159726676122, 0.939062127452533, 0.9563115926827963, 0.955191577723242, 0.8085319435757983, 0.7834579377598787, 0.6827715913046816, 0.7848270713738337, 0.8995419778509604, 0.7147480720793824, 0.633930804076563, 0.9503384152699599, 0.6172992019423329, 0.7111162345008954, 0.7785507643576199, 0.9523155049865184, 0.9599295357905884, 0.617508441405806, 0.7751318527427189, 0.7302346196129701, 0.8986358271983699, 0.9600161688768503, 0.776851271719425, 0.7277953054960311, 0.6990956503653445, 0.5619786742476456, 0.783786278366362, 0.8946639932538564, 0.5752861624434038, 0.8935272795379878, 0.617274548619471, 0.6911548522912221, 0.9511694329309, 0.9354865449434326, 0.5995628841881105, 0.7505124448567573, 0.9776830435443532, 0.6233806448272841, 0.9378617540166079, 0.664434762403248, 0.608968862357937, 0.6012942718609899, 0.8456201319340657, 0.6452844287336984, 0.7182981185229854, 0.8761896541619902, 0.7545444212886687, 0.518928535128382, 0.563205105969121, 0.830524158565395, 0.8876888681189921, 0.5282847505388731, 0.5335240880045207, 0.9404065392491028, 0.5603554306255135, 0.6256483440196214, 0.9100512670427097, 0.5316686933242574, 0.7551583479547104, 0.83176117058172, 0.6879225851258306, 0.8954734867270682, 0.733069425523605, 0.601386546459221, 0.9500503735449004, 0.9636126959954561, 0.5617615290736644, 0.5232007214171497, 0.6047190888038192, 0.5523393492562152, 0.9665158979358839, 0.6509400747935146, 0.6630879683243975, 0.9466853999833975, 0.8954971553699398, 0.9743977102505905, 0.8559159496619326, 0.8249089603501542, 0.9056036754779759, 0.644445700407274, 0.9213107374168105, 0.8429044115048514, 0.8616183011063338, 0.6700475643854295, 0.8886874030396457, 0.6346297576748308, 0.6585095622702786, 0.770775029565822, 0.5975622288429443, 0.6127457042391725, 0.718551096935585, 0.5110918981315875, 0.577500097098598, 0.8110440560523383, 0.5450394162885538, 0.6391456222275647, 0.5055356576654946, 0.9649430448761283, 0.7113424327614415, 0.6729572034310547, 0.7935531968270886, 0.6066047070509866, 0.9288472832222564, 0.9658339084939298, 0.5545020104791373, 0.5955831932782943, 0.8208332797942999, 0.6659512862699334, 0.7131325526648189, 0.88250736373535, 0.9122702770230529, 0.7380045455286862, 0.5347688785989562, 0.7671301546400539, 0.6825578994952256, 0.62365433216625, 0.6463843884242799, 0.801390778272621, 0.7414622264384656, 0.6185310882708615, 0.8257260819649298, 0.8895489059033501, 0.923075372286425, 0.581135865115012, 0.9490606561169916, 0.9955857897083715, 0.7644536112495629, 0.9931000017062726, 0.9905146730778636, 0.962772905220366, 0.8207716469546527, 0.9421432420490805, 0.5631297211118156, 0.7973429947562767, 0.9129440633655133, 0.9122178271309156, 0.6207662433432453, 0.7079466079784511, 0.6062620152210703, 0.6112895108157821, 0.8235934457858161, 0.7778239294041664, 0.7670767287281139, 0.7464008751222574, 0.6661966367104672, 0.7077352483947306, 0.7967202141639949, 0.540774818275533, 0.9923072027361775, 0.7802033683755194, 0.5632438974874849, 0.8482052586480986, 0.7095266401771176, 0.8279071270442775, 0.6934538173357409, 0.5146169654216766, 0.8019299804327047, 0.8460324985675582, 0.7327246461711281, 0.8603459756306031, 0.8900692925163078, 0.5642808994831301, 0.5389615156844281, 0.691156924672298, 0.6919680034778461, 0.7929009404191947, 0.9081694350428067, 0.6861343870445402, 0.9935052887911995, 0.5891949222533533, 0.6490553243494035, 0.7060776408707163, 0.5589749709610352, 0.7929645926674551, 0.9887552749928896, 0.8265851819216976, 0.9085819748402988, 0.8466632715858626, 0.8182358414636898, 0.5246292253326985, 0.873259331792203, 0.5958556404058751, 0.851319432647691, 0.8662469372927555, 0.6983642832917047, 0.8772665304641152, 0.8929588916847457, 0.54424516494996, 0.5507202147847523, 0.94492442473712, 0.8524905135160386, 0.8233878808108619, 0.7104015247284126, 0.631684919703007, 0.7306051391535606, 0.8895469998371843, 0.726461527225799, 0.6879504171234601, 0.9252374048812113, 0.7894388743073297, 0.6746537683670509, 0.7568722681701676, 0.8192540618596905, 0.819527815241009, 0.5753694656643296, 0.9158802981467615, 0.8355222399604263, 0.6048878921974419, 0.5922679603355958, 0.5833058853903417, 0.6217694349376708, 0.6577396366437503, 0.8022876819138814, 0.862901532047784, 0.9500878873553771, 0.6452572780383145, 0.9181263303258935, 0.8336528705843731, 0.9701308768628993, 0.5467070093914553, 0.7793845611568987, 0.6624236110876159, 0.862187453634796, 0.5892181877837346, 0.9996142020733241, 0.571340134554686, 0.8800774127600496, 0.6349667556637748, 0.9789190747278002, 0.500263047357155, 0.8663943393799098, 0.5968339841555412, 0.5731899897247196, 0.8520652033651359, 0.9135811199983919, 0.7923408898048592, 0.6513620632003108, 0.7275284454402141, 0.6490081937892833, 0.6174182400703003, 0.5112684244481958, 0.9567564311492326, 0.8925201813581798, 0.6057862856531251, 0.999548202402536, 0.9457372713202005, 0.8206706383743135, 0.7346893785183992, 0.5276371967493468, 0.7408956156425022, 0.7262654252511576, 0.6629506815993789, 0.8860471183961328, 0.8012580950138395, 0.5481179186434804, 0.9626096858993272, 0.6463634059542045, 0.7283065093431764, 0.9458865340045095, 0.5868994433968272, 0.9379248816659134, 0.7814129693333137, 0.6074652648779739, 0.5875997771896981, 0.9496034913130096, 0.7268558399665508, 0.8238393768274164, 0.8920965056749763, 0.6071148445083747, 0.9838110533756195, 0.5438503006289598, 0.8664063971104172, 0.9174722915924383, 0.7313986456531693, 0.6487228092974073, 0.9568948955569587, 0.8441847102760587, 0.535711823186126, 0.5320525405914346, 0.6683317029314196, 0.7392221786130098, 0.6496513676270659, 0.713504677981208, 0.5046493020277443, 0.6961200957283171, 0.968443650679008, 0.8755940546269514, 0.6683625830398484, 0.7731668633438887, 0.6599218992514002, 0.9153082149119532, 0.6244499551983088, 0.6900396135216316, 0.5811021529548356, 0.8747734035588669, 0.7182112348090754, 0.5236285890144053, 0.6401812167396015, 0.5831876998077183, 0.6639553297977099, 0.8653805535819727, 0.9007837313788913, 0.7115177372549593, 0.7011622594906395, 0.8536286604201412, 0.5108767041470199, 0.7492314306762111, 0.7706113163469409, 0.5862951430439783, 0.8086306197564048, 0.9785571830538913, 0.5203269095475339, 0.5810445606714312, 0.6480660180290607, 0.7524841613903657, 0.5185980228257665, 0.9698912657818652, 0.6641569530280249, 0.6437110731142746, 0.7208791143854256, 0.5025093912400598, 0.8909109390604446, 0.5577724250913625, 0.8148837911126448, 0.5832583365676862, 0.7873177389054138, 0.9083625817901799, 0.8428996484377551, 0.9581752156241155, 0.5960418816779746, 0.5895233376765474, 0.6506087854573164, 0.784840082146681, 0.9729354058111395, 0.92360292947016, 0.8891699837719378, 0.5326860725237555, 0.8385915759599938, 0.78691106281564, 0.9741776056150027, 0.9390339529377632, 0.7427728537445492, 0.6602925606358674, 0.9032418516099705, 0.5437216833952914, 0.7241575042724412, 0.5787102085962179, 0.6993791877967898, 0.7366707843827123, 0.7426796933426645, 0.6952989835373311, 0.759516077628908, 0.6545698902344195, 0.5758881749664951, 0.8300776591880927, 0.7008314712804178, 0.8575682808700258, 0.7463163228237384, 0.8688491524357073, 0.8158142656688763, 0.7854393394003487, 0.9201868252281566, 0.6930651566350647, 0.9089734936994953, 0.8919963855388651, 0.5870601235076144, 0.5041058079700548, 0.9186035916916726, 0.8423275728048993, 0.6642059134330066, 0.8592361406999977, 0.6548724417003218, 0.6234410052363051, 0.9799042770140831, 0.7035967208397966, 0.6173040708011606, 0.7221420418571893, 0.8095782249491731, 0.5638735181617922, 0.5931748155243992, 0.812617867861521, 0.8695666644659039, 0.5914888136068339, 0.7129694957045332, 0.7722109812936603, 0.9932729833280185, 0.6302723600873386, 0.8163786627931726, 0.5318643543303767, 0.710373939660831, 0.8265982365961613, 0.9898985084480747, 0.9598922213721313, 0.8818106277511488, 0.9509502869511933, 0.7859098486389043, 0.9738091881412893, 0.5006001322421869, 0.6147963731294601, 0.5010750017472446, 0.908267777731194, 0.6503859853039944, 0.5463341209838164, 0.5698362019346386, 0.7640151733737568, 0.8552189793399434, 0.8212642166963935, 0.8006731979692654, 0.6357291224400059, 0.8288913287227886, 0.6491809388248206, 0.8515795173970883, 0.6224906962735217, 0.7188299206515211, 0.6595760744884904, 0.6059605539176774, 0.7198614460211261, 0.7192919152034565, 0.5916244890012393, 0.6055935932455798, 0.7498192516881146, 0.5127845889536926, 0.6059618504018306, 0.5067549332127719, 0.8012726282248026, 0.7971462491976162, 0.747921093764673, 0.5547164617599233, 0.6585433190907972, 0.508908302653678, 0.5060400114721005, 0.7613559403663266, 0.8511578417336472, 0.9576383501949393, 0.8740802552230946, 0.6364737615651799, 0.8536620528370839, 0.5592640024819766, 0.944182504398996, 0.6262355849723904, 0.7536120596002336, 0.7358536313372248, 0.5370941828043925, 0.5768201124834597, 0.7001075792623228, 0.5720304736646771, 0.9771203254680907, 0.9846736981586783, 0.8311214154634676, 0.9967046837434133, 0.7278571229631166, 0.5876116917346159, 0.5030858485663178, 0.7951092887179665, 0.5168487357074523, 0.9298069781114102, 0.7670039221795506, 0.8110228495215246, 0.5708388186506639, 0.5453490190283669, 0.8400682563445182, 0.8880816916818762, 0.7122398567782342, 0.5415522793110255, 0.6014634260151162, 0.5638672854533959, 0.6621582577402017, 0.8400082873284717, 0.5610569549118951, 0.6936364775837791, 0.5949944211362364, 0.7902260000172734, 0.6425931793172945, 0.8694551440088865, 0.9581138279837558, 0.6607744947317098, 0.8211254290536218, 0.6427346103569505, 0.6027714671642032, 0.538161592802381, 0.5272193250566559, 0.656980194354698, 0.5110735393179591, 0.892140226893546, 0.5288996473336316, 0.856227383584826, 0.5281497758596014, 0.743685236398681, 0.72388363992053, 0.7146873954831954, 0.8113477639186604, 0.5216715083996808, 0.9642564380978852, 0.6152677770892097, 0.5429208436581339, 0.5794662942264944, 0.9521582423376489, 0.5491553320883836, 0.6625937297244393, 0.6638269863479072, 0.9481872178104258, 0.7808289904918364, 0.7929702896485019, 0.9946058399583687, 0.8316507061859844, 0.9655789721651, 0.5370019543131171, 0.634975044880821, 0.9142257606939095, 0.6266013061941105, 0.5248245975599806, 0.8840951686947359, 0.742783989201601, 0.7214695643727269, 0.9859475380145613, 0.9342742686435659, 0.8082841374738623, 0.7091889201984095, 0.9903915565385191, 0.6791701722094319, 0.8504527316799148, 0.8854253572589836, 0.9220614354225434, 0.704601213268832, 0.7682338275747016, 0.6850663094555909, 0.991877329743901, 0.5026953471325173, 0.8797243450844217, 0.8528967185101802, 0.8682481639863335, 0.7130235305197917, 0.5826538951787842, 0.9009757155575857, 0.9579052792999727, 0.6420298932450459, 0.8680917330557281, 0.7716620272684702, 0.6232499401631986, 0.8460612745868028, 0.8883253603755294, 0.6705623339936384, 0.7165685502624879, 0.659838569188609, 0.7460884245979434, 0.8748850740597082, 0.6122884261363344, 0.972296131006455, 0.7238651916374728, 0.5962937134360508, 0.5297023808173894, 0.6310044957075099, 0.9311776769943583, 0.8207782298745736, 0.9608215150502392, 0.5517852729838129, 0.6267771779278475, 0.8311142795034268, 0.6503936310764562, 0.9908209082340318, 0.894369886071004, 0.6718453759233237, 0.8259061957601581, 0.6924208632465662, 0.805180335574216, 0.7179951731872263, 0.8452030203864113, 0.5259766689349286, 0.6382163532483158, 0.5390178929090493, 0.5196455039667505, 0.6965641174836732, 0.9941734208179198, 0.8866958403191101, 0.8630363061932445, 0.7368529773505854, 0.8003481913795433, 0.8306839132971202, 0.9787155967680867, 0.9064071896663434, 0.6058927951737959, 0.925496319179441, 0.829895454408452, 0.7384960188350309, 0.9610407746214509, 0.8266813318446484, 0.9627335099538201, 0.7984799782922976, 0.8396058726877931, 0.9369189494051433, 0.99647937906657, 0.5302605137742943, 0.9316621487484336, 0.7912390794412543, 0.7004073089357893, 0.8923967661932447, 0.8008685229289578, 0.8583155144676464, 0.6805943737167015, 0.8919431629067309, 0.7037702209625546, 0.6271337672863762, 0.7559188041427329, 0.6892959579808995, 0.8708769624681547, 0.563351476248589, 0.8594728919669319, 0.9340418802568721, 0.5204008708715901, 0.595583696399706, 0.5597328463772595, 0.628341157141443, 0.7569844717339481, 0.7162004073568982, 0.5921932096524343, 0.7999466941187094, 0.6212953792235749, 0.7882204600562379, 0.5061686424075391, 0.8530936336852712, 0.7060528230075087, 0.7415109523771133, 0.7521156730792673, 0.9037583909373313, 0.9605494583987648, 0.7401194283578973, 0.7989401582395137, 0.5376583956214622, 0.8482083737838462, 0.7715371856515412, 0.8858150774868702, 0.5563500099314449, 0.9933474892721207, 0.702599971014013, 0.547863878985011, 0.9790084699206469, 0.6570838081828169, 0.7734975434637734, 0.9722941242316574, 0.8396570079830874, 0.8832692063349235, 0.9014195241564191, 0.8646019518946491, 0.8577986936727919, 0.7376447416527994, 0.8035707410470021, 0.9276773867925868, 0.5959680900532738, 0.71719441110902, 0.7205808048908049, 0.6898832614943933, 0.8447731297384953, 0.8161053549152164, 0.8361698634649364, 0.7421383205902865, 0.8044842369819163, 0.9217112258375897, 0.5270011313291959, 0.992004257380332, 0.7044237773950379, 0.9332974783481129, 0.7630475357745827, 0.7646178712908712, 0.5366878132413943, 0.5188288997925858, 0.5033058886838995, 0.9245505386207569, 0.8009746135415317, 0.9575623491492368, 0.7099720107989795, 0.5181496258155809, 0.7181440665558005, 0.5986130978566708, 0.8356634995551576, 0.9914848631372719, 0.7717430513141166, 0.5794016383949285, 0.7982513848980766, 0.8526094048812831, 0.8766771468363292, 0.9582529639437076, 0.6251383220014785, 0.7595790360117137, 0.90741329091098, 0.9473248838539696, 0.6872567503993636, 0.8605489767032055, 0.7158894941149263, 0.5619215039108938, 0.959349006321776, 0.6756607564723427, 0.709665032339234, 0.8871707951695198, 0.9196361718321372, 0.5114974673942406, 0.7884897078335659, 0.875221495075746, 0.9709874299208834, 0.5107553164726337, 0.7052329330760534, 0.9364926089357113, 0.9511523242904159, 0.935078509025693, 0.9344739676308117, 0.5013890528521703, 0.893223511786466, 0.5430365975232057, 0.7826984087071387, 0.9531022842847958, 0.6052717533662897, 0.5164656082237791, 0.9414401240093353, 0.6867687374995518, 0.6386797074700278, 0.650714607519973, 0.6473136048897113, 0.9560960940082119, 0.8189809306186717, 0.5514930948115376, 0.5157970878326052, 0.8225634843035333, 0.7680532710059871, 0.9831414449144906, 0.6556858475747259, 0.8440334306695663, 0.6155816472102461, 0.7729720139888479, 0.80527469182502, 0.9395015603669383, 0.5771066307895029, 0.7460092410279129, 0.8513976452376006, 0.6831733788296972, 0.6332907506503945, 0.8722089498422992, 0.8430795953929715, 0.9634553269418176, 0.9107295557981782, 0.8277777236831998, 0.7540987100904661, 0.8811851017364936, 0.5248227202518565, 0.5059936638416892, 0.9248568760718547, 0.8063877289292254, 0.5118095409989596, 0.8308136019599003, 0.5986267793794509, 0.928128420569384, 0.5627939489083349, 0.6725567341402134, 0.8144420764782117, 0.631694259096806, 0.6785270811846054, 0.6207079758966464, 0.5804136919662002, 0.6885666980771338, 0.5681143950714553, 0.50958595404206, 0.9865816631371185, 0.7421832590917754, 0.5095014378398689, 0.6705478220787855, 0.8524269416635771, 0.8164763232294816, 0.9622840463124459, 0.5745888613734391, 0.9539449032228111, 0.6668427357619449, 0.7525661565578434, 0.5636712152618029, 0.792675827307471, 0.5868967219042898, 0.5746206511774761, 0.5965315047512799, 0.9524621027455742, 0.9004917982314281, 0.8309079544530313, 0.5694896381429417, 0.6814069309313653, 0.718663669601407, 0.5920851908517496, 0.6069741617547906, 0.9937865608176968, 0.7961525066828652, 0.7688000670451711, 0.6805572589433593, 0.9674164047377519, 0.5215135757481084, 0.7531707036600368, 0.7355682003453468, 0.5827145302667676, 0.7013033232725938, 0.6140758156359366, 0.5700856770558436, 0.5245469550329898, 0.8411527134106911, 0.5149459578790896, 0.5809312725091864, 0.8222268362479404, 0.5665045112938818, 0.702360105734801, 0.7486365145366609, 0.7844246027377011, 0.8436642813630779, 0.8931913434502197, 0.9061651290830699, 0.5541194917274148, 0.8486822552161426, 0.578125745733685, 0.6948924718514786, 0.6300110867445646, 0.780521985280981, 0.7990196391290423, 0.5102510558479397, 0.991865027771736, 0.6922069604411598, 0.7319259825413594, 0.8200858691109053, 0.8774888414353723, 0.5609376127301837, 0.5208085738710844, 0.970664236165484, 0.8077231388297292, 0.8330385068971494, 0.8770863601413514, 0.5634971577466685, 0.8187358204502151, 0.8299506776746534, 0.6434006188798786, 0.5581894086593648, 0.6006397038796674, 0.7102304999431728, 0.8337400046804369, 0.5831816835068577, 0.828333119646353, 0.9051873875037078, 0.532858859156685, 0.9292357682226753, 0.6212074859608705, 0.5844758476576946, 0.6724423642111172, 0.6916947381001142, 0.5645045080079243, 0.7275316561931713, 0.7110137346067408, 0.6310565428703085, 0.8121217088527914, 0.9349464291811264, 0.7363782218588815, 0.809985267429105, 0.5894920768086767, 0.7477848971205749, 0.542022876482676, 0.6810127016546661, 0.5869537292770779, 0.5871160916296688, 0.6692854007742437, 0.8860986988912237, 0.5349977508667526, 0.7032572159910567, 0.8376524551885938, 0.7343455136070554, 0.8450171076104712, 0.5312061596621362, 0.9919591979678499, 0.8036306745524715, 0.9792745250323909, 0.8646525587352909, 0.987000977955028, 0.5007390775614701, 0.8082037360000349, 0.7096791165761867, 0.6630777945630291, 0.8066224477975596, 0.8927844940443964, 0.597766971168627, 0.6078590936241768, 0.5225574291572728, 0.7309179824173049, 0.5695627080483077, 0.7287337814020896, 0.5736038024267917, 0.9093659841495787, 0.5834618314526148, 0.9855577485235933, 0.529907636550961, 0.6204378995923916, 0.7365837763200441, 0.5778812966963329, 0.5399083056780964, 0.7894225487862456, 0.6924962065706173, 0.798487134484474, 0.7320790030007163, 0.6473223733683815, 0.9591119952060421, 0.6836202722634853, 0.9995604448387223, 0.7047906371509958, 0.555347476094433, 0.6758461361561469, 0.8024922042689631, 0.5929398829922874, 0.5096195165569379, 0.6039009332456656, 0.7693680455077389, 0.5526957236521169, 0.6958468685174405, 0.819200007008944, 0.6371108609713259, 0.9015540697056772, 0.9215693825214204, 0.6929444153793798, 0.6381846198302661, 0.585079670213728, 0.5752096863366871, 0.9376721381259194, 0.5033466087511759, 0.8449690578482045, 0.7550271239731832, 0.63419562888186, 0.9844822099454441, 0.7148237473716758, 0.6161921672855333, 0.9462855389553023, 0.7936440815945804, 0.9384596544061028, 0.9011596462290281, 0.6260412878424935, 0.6784478996667134, 0.5478316136889818, 0.9136042505208686, 0.8733083282130938, 0.7715038856887346, 0.7952666659906595, 0.7377139689264169, 0.9426264559290418, 0.885284913310749, 0.7318024733801014, 0.7039975387414635, 0.7646220538116657, 0.7613456343221805, 0.884692140239068, 0.8202433803389862, 0.6714994943043961, 0.9603002918415987, 0.5484010101590253, 0.6363192527584709, 0.7786461309357449, 0.5269143710196347, 0.7810617939262189, 0.9468261975362717, 0.6200226870419919, 0.598592096650133, 0.9975123065310965, 0.8426956102499483, 0.7276454794621707, 0.6575512349026797, 0.8598870912086787, 0.5607263740184987, 0.5257855024072224, 0.5676886308338867, 0.5010829424724321, 0.8969774026075306, 0.7218550939559771, 0.7653255593854291, 0.9940690566685677, 0.8590299585606357, 0.5233667133162544, 0.7721281046448143, 0.6020381620349677, 0.9348867469108382, 0.6805886620895103, 0.5960995656923596, 0.5454821140136018, 0.5249459071598694, 0.870943486710746, 0.5757668047191655, 0.7022929128277309, 0.9286330052369474, 0.78248322587997, 0.7239239189963116, 0.565951028114015, 0.624296380382299, 0.5358308393518707, 0.6230711268774886, 0.5952420347351306, 0.5080859514961673, 0.5469251182079504, 0.7894290521372804, 0.735164281253893, 0.8770358206926777, 0.7060272031813724, 0.5059837577022609, 0.98787451137558, 0.9702226721773439, 0.9179688072667107, 0.5024424416102586, 0.5874313942309437, 0.8704033124348567, 0.8372182851514554, 0.7044014783409817, 0.6689661746103106, 0.6821030537109734, 0.5206454735583741, 0.7966663533160316, 0.5565927918835559, 0.8811300235113244, 0.9742101239356822, 0.9713785928374026, 0.5804444322545652, 0.9018396868178764, 0.5601270753023964, 0.9566638243633216, 0.5064364057342543, 0.8347293066422046, 0.6322828598218944, 0.9123693479072248, 0.7389021557950826, 0.598044057150795, 0.694959634826948, 0.6115044540621162, 0.9666045652947006, 0.748435205970549, 0.6715569853886443, 0.9184998830842939, 0.9470379538340754, 0.8461977051699869, 0.6195601949322569, 0.7566047947059479, 0.5689237257270943, 0.9765413191026664, 0.737255572085155, 0.7340167039521347, 0.7786439449559799, 0.8509345642032311, 0.890144094725135, 0.999003456597979, 0.5247842271494315, 0.7802928705278589, 0.644231080560538, 0.7619449069974524, 0.8581068311430466, 0.8391919014223479, 0.7684153430495144, 0.82399926879446, 0.9409625893480191, 0.7417474636256731, 0.6658572657974832, 0.8596729097266689, 0.6351798053469742, 0.7417099274876762, 0.9173120160056645, 0.7860859488397105, 0.5578406541586607, 0.9155508693168719, 0.6966160808912072, 0.9898879134775085, 0.7600704212246798, 0.6423204499319608, 0.6768217662826546, 0.6077389155453552, 0.5575416098218944, 0.7709363462779788, 0.9123345737106783, 0.5523855890929639, 0.7721399017112467, 0.9281347392633674, 0.8650223263685937, 0.8559006995178593, 0.8407732442138081, 0.8082888566414258, 0.8516086602118931, 0.9645511945772378, 0.6454916538354005, 0.9464480668854351, 0.6052461441345101, 0.8328905257476399, 0.5439704979393084, 0.5485713035035265, 0.6740383935669164, 0.645996750674237, 0.851534662318489, 0.8334283346891291, 0.7044484144407565, 0.7026557625198867, 0.5954478996939718, 0.6437068331840708, 0.9091358273611727, 0.5578847448214392, 0.881403306749102, 0.9781421577879245, 0.7419462201637318, 0.7827512281511195, 0.78542783490953, 0.5593628123226047, 0.8792972841223832, 0.942597488653905, 0.82151985748349, 0.8115587585259036, 0.5241733659551461, 0.5783218287650671, 0.5727821531980938, 0.7868271201942327, 0.5218371593622546, 0.7536579750480372, 0.8033197619333021, 0.5919594969400267, 0.9403015013869109, 0.9963239438164454, 0.6135473409086237, 0.6369289257134201, 0.6817812253599524, 0.8451352590601807, 0.9773630749577373, 0.586937339909278, 0.7576603572418596, 0.6138511412932459, 0.9912204177032973, 0.866678173045905, 0.581329404941247, 0.9895166264158648, 0.8026072504054609, 0.7452207938349877, 0.936841657946353, 0.5396949411276306, 0.6957349761675049, 0.9128853757394648, 0.823369655402874, 0.8099969027993107, 0.7557215134104357, 0.7969672873304177, 0.9205432494344323, 0.6890062231459224, 0.5223035168130912, 0.6186600933591735, 0.7455244074301871, 0.6077313112933632, 0.8454127200723474, 0.5818094173210977, 0.9327314791712417, 0.9551772242282526, 0.8642820691649358, 0.6298138847214858, 0.9021079908149175, 0.7628137288586845, 0.8621701824708325, 0.6214087642682551, 0.7105991318983846, 0.5793009269309541, 0.675282404200579, 0.6527235029630057, 0.6889720046396165, 0.5344767574094897, 0.5487711136103659, 0.5604786464195775, 0.7733143772833897, 0.6296974463960453, 0.6817241252700657, 0.5486670051226569, 0.6488940561912176, 0.7230826835850117, 0.7069463440069625, 0.9069793238322017, 0.9206110731319634, 0.6728501662264674, 0.9538873206439387, 0.5777459342504004, 0.6555522300302055, 0.5170201353571562, 0.9667315140919193, 0.9403889730704744, 0.749529252791453, 0.7255744936523426, 0.9364824251402949, 0.9453937298373775, 0.8954306365758024, 0.6585740244397782, 0.7990711564276135, 0.6663986372143189, 0.8684963404697604, 0.7552991818793486, 0.7658587786325688, 0.7421184217343064, 0.592070130322193, 0.8663361239879563, 0.8702667737423235, 0.9430479031680774, 0.714359594431756, 0.8330053339140776, 0.5308276189203864, 0.6420987955634461, 0.9969040966772691, 0.5321424723096129, 0.7449983134654423, 0.7224754717735788, 0.6138809510243144, 0.987671377275074, 0.9549194208329612, 0.5465535851471809, 0.8186975390199089, 0.530163248460718, 0.8872500507177579, 0.777949572326075, 0.7618524309307473, 0.9623817701393893, 0.6659364291196141, 0.7075535959145465, 0.5596675360258342, 0.7451028051243642, 0.5991704137562957, 0.6024252298096575, 0.7663457503275775, 0.6963390384959838, 0.7753601786661933, 0.5879252662534402, 0.507389167216626, 0.8788132993690154, 0.5915080149411533, 0.6555668305982012, 0.7439054389866571, 0.7083238300879051, 0.7297346556762123, 0.7583788055576973, 0.743099339321756, 0.6077716707231199, 0.953822841769458, 0.9793169527895935, 0.6225062798741907, 0.8683484488897171, 0.9062698882262795, 0.5321491254808738, 0.9220803449676174, 0.9923110600123985, 0.7519606689675613, 0.6652042636057649, 0.5664088449992473, 0.6152241194368258, 0.7587520035719872, 0.9612323116032377, 0.8764036920545654, 0.7686286970314183, 0.6909230710499903, 0.983971790890084, 0.8515840550388509, 0.7689687425719731, 0.6491664778533305, 0.8469771066402736, 0.5721335051485759, 0.5033264992364093, 0.9622519073778946, 0.7245418225216393, 0.9657623510544338, 0.770405006156827, 0.8751679166532251, 0.6721336378865257, 0.9143532742849493, 0.8827854307360075, 0.9543723638866721, 0.9545479319509456, 0.6653096647627952, 0.8759806314219296, 0.5810351123715825, 0.6981162712976166, 0.692781572782561, 0.5495691285094926, 0.9677534806212242, 0.8622643966625776, 0.9050598273471151, 0.629223235201742, 0.7024739471641397, 0.5652290996266657, 0.6090133196835584, 0.7161016822956496, 0.7482905193222781, 0.9278268526891231, 0.9945879963557529, 0.8430992867140341, 0.6715679187078013, 0.9471121670387446, 0.9223451827268689, 0.8980100026640314, 0.6142387046477042, 0.5095750417372964, 0.9332745574068506, 0.6001407218167081, 0.7502871268195335, 0.6123652761963241, 0.9259800685163837, 0.6454209382029249, 0.8288847190831918, 0.920662232393441, 0.8772591978041915, 0.9696338901536117, 0.5401864544824228, 0.6749864916783266, 0.7300842183393307, 0.6065449218386441, 0.6041994587883808, 0.6306642778053223, 0.9294984920608678, 0.7064212294578012, 0.5103130209993834, 0.9214527086299922, 0.6728372832482328, 0.5811792505070723, 0.741307422085774, 0.5184864622858492, 0.5561484612553464, 0.7804878583611945, 0.791361307284346, 0.8058882418818796, 0.8184155933118944, 0.7639571771388947, 0.8700532852336476, 0.5135746721276215, 0.8559194167721866, 0.8925149908998831, 0.7424176947069798, 0.5079179247624612, 0.7738241716940575, 0.5293898699064132, 0.726275643083431, 0.9355031316170659, 0.7592032789457697, 0.7102259591237565, 0.5707457289400442, 0.6209625091785007, 0.9825157962142753, 0.8981091476756489, 0.9799849631171638, 0.7675235621319724, 0.596840083784911, 0.7357549390450973, 0.5499387781853413, 0.6253365967655169, 0.7336662978786328, 0.6753524269296812, 0.6401908220059376, 0.9590956753229245, 0.7681662728683651, 0.5515001982431015, 0.790059380623979, 0.9131718772939108, 0.5684157602849312, 0.7444999006966562, 0.8502882803401068, 0.7947794886955255, 0.7267930643495295, 0.7434902281797632, 0.9672393139283362, 0.8649235803903188, 0.778703271215748, 0.8687761984587581, 0.8358803775278036, 0.7022755184532068, 0.6920573070695726, 0.733529001900225, 0.686019141980482, 0.5207939299383115, 0.6240861355541552, 0.5766221845096153, 0.9830863838233297, 0.7760905016615114, 0.7815094680476824, 0.7265185390276956, 0.5210883205844676, 0.5341199575281096, 0.5135082909892086, 0.956763876540388, 0.6007448537272247, 0.6987996327107366, 0.7928361112302673, 0.7268911205404792, 0.5322175797177774, 0.5536084775186905, 0.7044002467278785, 0.8131642677495838, 0.9538634271403532, 0.7041302953148517, 0.8371468758782749, 0.5244927050577872, 0.7092519936492525, 0.8965193506416627, 0.7813405394318655, 0.9559522483838356, 0.5173167212089134, 0.5749021541411733, 0.5485410360650225, 0.9767505416140743, 0.5378085227991626, 0.8856777982493131, 0.8052527465984017, 0.7429425695376506, 0.6935038267110664, 0.7920441603692369, 0.9393832957631458, 0.543099273648042, 0.7698054123677702, 0.6001067650696297, 0.7181880495075856, 0.8388331775686242, 0.7971369229217422, 0.7691048093238317, 0.7668048709531692, 0.6966693222937689, 0.5235512085400572, 0.6010603398044003, 0.8454021283930337, 0.7001345917344235, 0.6927268285436206, 0.6303398838939376, 0.6734321380474466, 0.8456908389350187, 0.7123288262287693, 0.9217295414405293, 0.5070080199573475, 0.8844842783673441, 0.5063653000917983, 0.669638669301157, 0.9724710742828117, 0.907664474620777, 0.6563777357811602, 0.7026875477284068, 0.6728685098405023, 0.7525919977484021, 0.7659995176898623, 0.8152375998075388, 0.5201979814021951, 0.8901463669222058, 0.9148704948330159, 0.9312920322662563, 0.5215003669547913, 0.9600697274854622, 0.8301025333637759, 0.5729251240536765, 0.5109938489221175, 0.8288661670757737, 0.8910963953792201, 0.774243635227398, 0.8148974974736201, 0.9759184071356641, 0.9880593088511231, 0.9337835837676021, 0.632080296969171, 0.768779625857692, 0.9986600555728784, 0.6368880963710504, 0.7680180828076519, 0.8877961594589745, 0.5411627780994515, 0.7327645531225803, 0.7778318855522275, 0.699398083685435, 0.69505877138561, 0.8512108777465528, 0.5068160099546865, 0.6610406995798925, 0.7949206037087724, 0.7329569786160273, 0.852875012025482, 0.9226744142341041, 0.8437081130130426, 0.6788546205924298, 0.8657605568978513, 0.8806251732706885, 0.8161906404483201, 0.8154835880297088, 0.9913205819755512, 0.5425716107242744, 0.5859302430565005, 0.973056575772326, 0.9509449967569928, 0.6274160719967339, 0.7065771466691328, 0.6117930854560498, 0.7348966804384085, 0.6675738199223005, 0.7312048439385147, 0.893528101036352, 0.7542163315539894, 0.9404070185608719, 0.501488772129159, 0.9863806647237143, 0.9178312712893102, 0.5617638441029702, 0.7402144257859893, 0.8428771703119549, 0.6632057961776712, 0.8495201455905195, 0.9799320626065755, 0.6381916672233527, 0.7838919817457926, 0.6887924899413611, 0.6756307272178645, 0.6225608914840979, 0.8131088268434195, 0.5740773966744043, 0.7531241977858327, 0.8995949940660635, 0.9932724457877578, 0.7781667928450668, 0.5246266555368054, 0.6180057474616204, 0.7470368120884696, 0.5653157983825148, 0.863802756900963, 0.7199238672366886, 0.7429262536644455, 0.7395086860509212, 0.7800739435360349, 0.8805654888125779, 0.6415947035069725, 0.6875352077444006, 0.875736131735406, 0.9316279900710757, 0.6271458378275683, 0.9307416602553523, 0.9610493813761712, 0.6001642394633766, 0.6105132285203898, 0.9615763515921907, 0.5635598804292474, 0.6534760153170533, 0.6222580073626411, 0.7309630841835817, 0.9714506863616932, 0.9320755580198186, 0.6781208791248741, 0.9070256457251125, 0.7867577711815728, 0.6120680032533758, 0.8511196042613314, 0.6952661202909829, 0.6171336514104304, 0.8234589125097456, 0.9909403639074046, 0.6083831801897281, 0.6007232546507036, 0.5319577633595156, 0.5755554224021309, 0.5511192400104725, 0.8911763271374906, 0.8657307692337968, 0.5563968949845892, 0.7503876641448413, 0.9248208075498126, 0.861610483940392, 0.5892034389477376, 0.8789403554244433, 0.7524866192581448, 0.9255811414226947, 0.9113325115765134, 0.9344168589323605, 0.9072197137760816, 0.9021404150888481, 0.5770105053611773, 0.6404793266868597, 0.6903178505791396, 0.6062979743071941, 0.5848717403664653, 0.9856300557976342, 0.7747603753356387, 0.7568539196595112, 0.6546027556258065, 0.735323772473798, 0.7111767405292898, 0.7063370440043197, 0.9100483386228186, 0.8438676845954594, 0.5221107672877028, 0.9705804325216966, 0.8270498763863312, 0.5763857998403478, 0.8311718196303419, 0.936700662179947, 0.8009686648806424, 0.6292951740002221, 0.5525038335240371, 0.5412138023367634, 0.64929295461484, 0.6758242946754855, 0.5501621189157797, 0.9270632392330719, 0.750083499408839, 0.9938632653057593, 0.5042945290919125, 0.5556496882073758, 0.9771752827160376, 0.7590875985499541, 0.9841183875778595, 0.9419700207290393, 0.5310946825115495, 0.9225935232440213, 0.8994999712387356, 0.8491438427412883, 0.5369984535782018, 0.707085400275851, 0.6389288630736683, 0.9646877447821199, 0.8296949316841726, 0.9700801590944876, 0.657964035150854, 0.8560809220650983, 0.5044165281011589, 0.7227360535602416, 0.6855314053439917, 0.8090807359256683, 0.6124975565492332, 0.8459994206232184, 0.9553699152240129, 0.5650528636311161, 0.6554444546638271, 0.8173128814294275, 0.5228041140233151, 0.9666149909152865, 0.9856844441098686, 0.8097166410499019, 0.9564918211024487, 0.5385472150513739, 0.8618628322548345, 0.8901803553376095, 0.6734493608782403, 0.8230836379744694, 0.6279545359100233, 0.9506424669101508, 0.9593612929215665, 0.6367286382103395, 0.7079605661536474, 0.6629735448783678, 0.6855614371485304, 0.9975858056322657, 0.8526421727893342, 0.7089093326711602, 0.7932105454933525, 0.8754270607634425, 0.7487345300124283, 0.6552369073697628, 0.8666964656418421, 0.7974244439261071, 0.5145571256704975, 0.659161286568037, 0.9536728020092778, 0.5115177436094471, 0.9387841837637307, 0.6726397253614611, 0.9945784203695194, 0.912690193380429, 0.6925426791169231, 0.53863524680941, 0.9430803311084737, 0.9712693179724642, 0.7289038959380421, 0.7296264160862284, 0.9343878897082454, 0.7681365380676333, 0.6141010642860679, 0.8327305733332491, 0.6981564797705955, 0.7385841720249791, 0.9281967814180162, 0.7097715671407576, 0.5636868414344061, 0.6904321282799606, 0.9029314348476406, 0.5356244954044306, 0.9775393329747988, 0.8089183905398645, 0.9253640898715461, 0.5779870321021903, 0.6799875292250509, 0.7608464442586448, 0.5126787383259841, 0.7462538710333355, 0.6832366325694208, 0.654486750284907, 0.9202309841228697, 0.5321587188535769, 0.6166072595865931, 0.7895000751289063, 0.9732615543572665, 0.8316171102341812, 0.7380627471729042, 0.6455184058832854, 0.9632737478504502, 0.9575657462489942, 0.6232677228136021, 0.5635401259319262, 0.7535686519036037, 0.5478118506277037, 0.8865009569792619, 0.785474187187932, 0.8805308323386195, 0.6848728662005878, 0.987720939751541, 0.6539431755940968, 0.6878953140741024, 0.5878898537142594, 0.5979517863159609, 0.6261278058614632, 0.9591858826270099, 0.5202788568935375, 0.962829917625352, 0.6424165416976306, 0.9121285976672597, 0.6591085349771142, 0.611899678087599, 0.766466055679544, 0.5179480956811335, 0.5666185244069113, 0.8812294294494973, 0.5844467129141466, 0.5017516963419508, 0.8787385749445866, 0.8360984548891643, 0.9976680785133838, 0.776666331470775, 0.6228786908941053, 0.5290429953193069, 0.566846668286321, 0.9543826993667379, 0.8491400543969465, 0.7148568398343433, 0.9419842476255589, 0.7023262286966826, 0.8276564537935973, 0.6673149892351622, 0.9494372668156821, 0.626385651425452, 0.5616473466416391, 0.6988498721034735, 0.9430866031154672, 0.9357394746594805, 0.8162783462497194, 0.5927881546567866, 0.6782650512716148, 0.8567671800107263, 0.5432210382675051, 0.7012636488519299, 0.7163073567987982, 0.7589502060824302, 0.6187157262939454, 0.8517553479143416, 0.9245601569470433, 0.7797265070863288, 0.553814226602795, 0.9240770433433347, 0.853322911311709, 0.536735321049504, 0.5455946658207438, 0.5831969345800854, 0.9053330140818346, 0.8388596458159288, 0.7792587833029363, 0.7139963781450607, 0.9913542178145119, 0.7776562173753292, 0.6713333779630478, 0.8221155126922379, 0.978020924663245, 0.9579558587254434, 0.5511438618660981, 0.9085186049677398, 0.917340606840379, 0.7145587917599969, 0.8198459100317095, 0.737818973140532, 0.5449636341763746, 0.9542224150743339, 0.6392516656645946, 0.9623703148876422, 0.753219799033416, 0.688588315047201, 0.5956144211905541, 0.5031357643741153, 0.9505583637512429, 0.6821075949410595, 0.6207953489616943, 0.8965899285436723, 0.5067360590647169, 0.5106617089067557, 0.7580087546562665, 0.5522846814076201, 0.556381267363147, 0.517453170000316, 0.684528338471119, 0.8063635989880771, 0.7214947565299319, 0.5117114815725126, 0.940716657961921, 0.8621715330459685, 0.8588417088765539, 0.8417193001116268, 0.9423177883526692, 0.8302479771301596, 0.5957143395682449, 0.8849945614439778, 0.6324434295364268, 0.9575730575252619, 0.8271424835183045, 0.9159705532434765, 0.5232360871899109, 0.6149434512023957, 0.908860529057637, 0.7573180481961104, 0.7303630196059543, 0.8913340332713586, 0.7424358715989774, 0.5064447313090714, 0.7807524105061654, 0.8188733050783484, 0.5683262292894256, 0.9554291819405467, 0.823163907839541, 0.8586500811751038, 0.5895969924818544, 0.7580608080311044, 0.9301283007539836, 0.9253459509859947, 0.7346060105051471, 0.7850549071385369, 0.8824196252477241, 0.8403188425820503, 0.5653014808433647, 0.7969155453584054, 0.9225137571375135, 0.9914710820597913, 0.6351890587290687, 0.9081845059515403, 0.5369167592434734, 0.8245179387934416, 0.5551400540265482, 0.5569849971019023, 0.7154229391738975, 0.9835282614115437, 0.582187733600271, 0.967774703893467, 0.6276209198684402, 0.5958495192744954, 0.5725735939924976, 0.9627487243015737, 0.5880694058364173, 0.7440096931680629, 0.5846278871333249, 0.7596489853096577, 0.6214354502584585, 0.8980676892819988, 0.5785278828514746, 0.9135573866961351, 0.5833823861521272, 0.5515232391270307, 0.7134312330619742, 0.5139590558073719, 0.6223104847044651, 0.815304711960311, 0.8419805474847224, 0.7431094823408566, 0.7466014764432047, 0.8559103374102452, 0.9350701028816926, 0.9900619606423634, 0.6150271167114514, 0.5546450618393632, 0.7962600074318428, 0.8249599895003504, 0.6911579487683246, 0.9839254890664733, 0.5647518757690351, 0.7296590410434625, 0.5216028209798789, 0.5324157500219916, 0.9523923314765237, 0.8076981694385679, 0.7456155900572551, 0.7853808852054376, 0.7610804560423832, 0.6207754662168443, 0.9093527379071227, 0.8496304464940359, 0.5488335892704935, 0.852964218650869, 0.7576277214323428, 0.8305401228838769, 0.963636797005629, 0.6495509868183605, 0.8518651441381784, 0.7330224245588057, 0.7985842180999343, 0.9233540798263156, 0.8390978535294428, 0.979439072097994, 0.964423021824549, 0.8209457481964226, 0.9043903182028081, 0.9288743064239646, 0.6798668570533519, 0.5956023074769594, 0.8243047751116738, 0.5289981433399681, 0.8540255334561628, 0.5412319118069979, 0.9999995176638, 0.5469135561885311, 0.9987443819158098, 0.5601571014921265, 0.6143316389498725, 0.9001583624245045, 0.767033361851878, 0.8785097181212139, 0.5268889011475584, 0.909936675474817, 0.8126099498670003, 0.6388208086260163, 0.52808856607454, 0.9490829293679035, 0.5975360418700424, 0.9966472176836468, 0.8787362083821507, 0.9870474907710085, 0.8572008610097983, 0.9291062757089955, 0.9871705393300367, 0.6518302803059481, 0.926784454588529, 0.9051422471704114, 0.6210583576537847, 0.7405087199306777, 0.8235243522633786, 0.9025460236300687, 0.5958928162113128, 0.7340452887763319, 0.9166168111375272, 0.5298613274679411, 0.6724124265699793, 0.9210695869091461, 0.6074191263184903, 0.656446983804655, 0.67651017269585, 0.5437281815227353, 0.8946411211356889, 0.5531853786750442, 0.9968878815135553, 0.6656916332109922, 0.8015832777083949, 0.9890653728665952, 0.6623477748094162, 0.9838376171046247, 0.5072553560852996, 0.6521733221287906, 0.786456557378445, 0.9578151408554563, 0.7341866470090123, 0.5461772102614925, 0.9866241674736308, 0.9986199939283162, 0.6873901432983269, 0.5988542059462164, 0.8419837327899665, 0.9546864683610836, 0.6639635560793442, 0.9773125938393298, 0.965830720362628, 0.9598428373874867, 0.6018125203565514, 0.6539576064040036, 0.719007188083545, 0.6862298808794267, 0.8812187773603437, 0.5553515661797127, 0.9700254923258784, 0.7359971900702601, 0.626099935850517, 0.7219924752991094, 0.9078260551672076, 0.8881375432248722, 0.8630321650152316, 0.6539718068231402, 0.8488465764694499, 0.5167242169638839, 0.8342481028795669, 0.7318775809755109, 0.8602599519158849, 0.7440670787216828, 0.7842349246901796, 0.7637339675046728, 0.6879874639372363, 0.9915333031431284, 0.8973632865876734, 0.5120126179349098, 0.5294755218899697, 0.7029310913409696, 0.7064840783742476, 0.7056873587085892, 0.6964022934558267, 0.5343433694194484, 0.695526147755875, 0.9319063546806112, 0.5526582430371678, 0.8417186492448276, 0.5429151106734766, 0.9431792871026194, 0.5606699375051181, 0.9329294747234238, 0.818996164920532, 0.9569781645300515, 0.8137385417014668, 0.9156910934735207, 0.5987782037599667, 0.9739800128967937, 0.8645749264692713, 0.5770962543367886, 0.5153054198152445, 0.5469957586434793, 0.8300674240978684, 0.7612497616781502, 0.8292045416351409, 0.904099849648046, 0.6077543207504364, 0.753160260809915, 0.9084125099798066, 0.6767751566821574, 0.8824132245789832, 0.8207972220239252, 0.583890184348304, 0.9696571833523104, 0.6145353370439677, 0.5372512032846908, 0.7858861479119541, 0.5277995513890574, 0.8499739711898683, 0.6732470531658332, 0.9383438518374638, 0.8307991576785985, 0.9300015206703731, 0.5203738012509931, 0.6239023689108272, 0.6235939490201592, 0.9028782744091508, 0.72309585657685, 0.8596456915057016, 0.5119345125565421, 0.7130800733424355, 0.8848238180001076, 0.9304503331406544, 0.5485436593067052, 0.9483757075354409, 0.6066243487806879, 0.7385567724193169, 0.6013324144811352, 0.8248198766512362, 0.6802027262172463, 0.7498492714838805, 0.8351091507250963, 0.6358858491892607, 0.7306673089662448, 0.9823246301638173, 0.5306327052758558, 0.7013573239795909, 0.6240586947379461, 0.8906302684209071, 0.9433659483941513, 0.8200373589473072, 0.6537508454515214, 0.5172125144991717, 0.8910660104812242, 0.720311030595581, 0.6153688777052428, 0.6534006374339469, 0.8755900867765645, 0.6114568601217221, 0.8739672364267641, 0.8048006046404932, 0.8086756116487828, 0.5530812580487678, 0.7974442329346815, 0.896756201621634, 0.7129912163542782, 0.6335899798085668, 0.9980338923564924, 0.6047854566421158, 0.6408260204362106, 0.5127874184464218, 0.9004140882218497, 0.5119133219675029, 0.5796355421669285, 0.8068222167022031, 0.7323608458957879, 0.699277030580745, 0.6581429479381276, 0.840682114742717, 0.9930317338344501, 0.5303409821613307, 0.6804716580608445, 0.9769504735358464, 0.55992282959068, 0.6122441597672825, 0.6524503173303178, 0.8656024277841383, 0.6582253407660164, 0.5577408828876489, 0.8759226319529885, 0.6590296159218979, 0.9717380736329153, 0.6711978667521166, 0.9812770627344711, 0.6833316497468542, 0.6909717056459099, 0.7774091956045097, 0.769179918714884, 0.525996232771188, 0.8370830290110769, 0.5388267833689437, 0.5796573690368756, 0.6211497697005218, 0.9905802428889467, 0.5806726538606617, 0.9612974361869617, 0.5954218718384379, 0.8912357957807341, 0.5754932341106065, 0.8816481247157226, 0.7464988712238787, 0.525081280196785, 0.5040234833847204, 0.7856611078760105, 0.5313167407720454, 0.9275494629203583, 0.96817447834183, 0.907192003350136, 0.7501059712273548, 0.8241296436560154, 0.7341715563578007, 0.844044974588921, 0.5223312730370646, 0.9512007981314725, 0.7409191028621678, 0.603066120154216, 0.5793347023028812, 0.8184253609447181, 0.5219807448892266, 0.7415736078336277, 0.9893155422371815, 0.7763270425477016, 0.7711303483219789, 0.9597171036478349, 0.6688296027696397, 0.700776821192695, 0.7769677072432213, 0.5337181019370683, 0.7213732260582413, 0.8687278752719354, 0.6588175704992729, 0.60265909796525, 0.9944145215950617, 0.8490143131856042, 0.5923428528115251, 0.9015851809025621, 0.658810930871355, 0.8149056026498542, 0.6427844492611063, 0.9451054545420832, 0.8363079724985489, 0.9341975832057507, 0.6786256234602337, 0.7527994432523408, 0.6835851100327388, 0.9412336898986304, 0.8491468596095622, 0.832362826509919, 0.7501772536670126, 0.9672224041663706, 0.7978218272092448, 0.6558068476590895, 0.9986017272689816, 0.8287271362416371, 0.8461045613623728, 0.7062472219026474, 0.8534220454948174, 0.8188643104966666, 0.6184765386646056, 0.88956579887289, 0.8193955146043108, 0.8359803619932713, 0.5975170823519355, 0.824421869596313, 0.5314391642221741, 0.8735712762522332, 0.6304085127619167, 0.8274258411470248, 0.9971490304131354, 0.750478569906243, 0.6857087965968692, 0.5906448313832716, 0.9283534218764065, 0.5498317927496834, 0.54267940337664, 0.9246590524185573, 0.7432353195494834, 0.9719056001065229, 0.8043510016220561, 0.6971132926691102, 0.9995385880095287, 0.6369713482855659, 0.7642079252695213, 0.6929955669180581, 0.8135841545283253, 0.8104218365787406, 0.6894117831900062, 0.8383847490545209, 0.7379582802999961, 0.9049089856164008, 0.8885985769775864, 0.8527644690948937, 0.5759936319410166, 0.8393616689155345, 0.8326802610607242, 0.8353291910230125, 0.805371945638357, 0.9078657206132471, 0.8779020403613385, 0.9368494192685636, 0.9310277000606291, 0.9620616449153633, 0.5619630446761452, 0.6148477933849666, 0.8796962013414995, 0.7534434665890732, 0.8309982223596076, 0.9741001832088186, 0.5333930378348912, 0.8801180012576331, 0.9548855826194935, 0.9425217266465886, 0.9926123959010216, 0.7525141260298942, 0.7094057235018579, 0.7007507542070708, 0.6378441043034042, 0.6554211703629022, 0.9270008946280313, 0.506209522345952, 0.727927365379643, 0.8529293751652041, 0.5957879668663597, 0.7317769789624964, 0.9864042218232605, 0.5501997294922971, 0.8616599443315451, 0.8844510019094636, 0.6774172137038657, 0.8046094555759649, 0.8341492603414324, 0.5001600582248933, 0.8105515631440325, 0.7675675645222979, 0.5222727285467956, 0.6802802202896439, 0.6941710815936109, 0.678623329821273, 0.7540307598846883, 0.8805821394087634, 0.9112127442731702, 0.8522971264340782, 0.5815823349444653, 0.5244467101892674, 0.5654577435158397, 0.6664478806664988, 0.5398182192064556, 0.5957051847448495, 0.5406941094299802, 0.7373414758975665, 0.9716673490290881, 0.5692375602219137, 0.659501113155617, 0.6045704803473282, 0.5782293681680567, 0.5840234713025054, 0.954192245487886, 0.5085277161264941, 0.5021381604172779, 0.892525108510554, 0.8723091316873968, 0.8400204717608268, 0.7410390528691686, 0.8848489182348216, 0.5267711387405407, 0.620808507783706, 0.6030825836444343, 0.791671413570483, 0.6196549800440392, 0.5819605092327964, 0.5470422946050819, 0.8238529568368591, 0.6704169712800592, 0.9377117335952347, 0.9920988762738545, 0.9263826349806593, 0.900054809652698, 0.9699265366780223, 0.802080560839361, 0.7887296105163852, 0.742390494934692, 0.907469786371685, 0.5553813984329528, 0.8849675256380242, 0.7993745757479193, 0.5831539922099502, 0.9680366340569224, 0.9575457826405593, 0.6522449852643147, 0.8557947852466752, 0.8685106579267204, 0.771608067471802, 0.5205997307633061, 0.5036835089867209, 0.7597163708945653, 0.5611454300009548, 0.7150679407186356, 0.767610599312341, 0.5078580239338781, 0.6260819237771409, 0.69172119059364, 0.7627550567587494, 0.9700763498115278, 0.8966718495514698, 0.7856166461936578, 0.9230878494562593, 0.6403404922563902, 0.670521801680768, 0.9328735079439706, 0.546411414880446, 0.7757884814094919, 0.5150987030537271, 0.9330178659147348, 0.5904734128543998, 0.584872510623039, 0.7432723867173963, 0.6817175217026865, 0.8965922412577438, 0.7676878422213338, 0.6493966274155242, 0.7409878130689774, 0.5684376596107333, 0.6173471258330201, 0.9182690205056407, 0.95811434804049, 0.5936272896579169, 0.5173379755620531, 0.8165711050292529, 0.5455105541580587, 0.8436223839593252, 0.7942906071185364, 0.7497055448055137, 0.7069382047359001, 0.9678525265002595, 0.8983013825205945, 0.8443826116555131, 0.6580601793364185, 0.6740052754112866, 0.6566683578857075, 0.7442497894049029, 0.7041300054418387, 0.6349396046187572, 0.5557939704529621, 0.9854315816831258, 0.5397134185953002, 0.7895264569856901, 0.5150170398164214, 0.9134726514922127, 0.847038361604278, 0.555458489229245, 0.6369141638573411, 0.8441821754403217, 0.6262003248947356, 0.776205258392596, 0.7117916077832649, 0.5361025382460944, 0.9505558651228576, 0.7649330826717899, 0.5809926194204509, 0.9442805923424165, 0.7377844098148629, 0.7620445676936174, 0.6107077138293098, 0.6844927010620676, 0.5862957415513641, 0.7563917756317536, 0.5584228688464485, 0.8183548100423226, 0.9596816269746775, 0.5991541173039168, 0.5426265813963924, 0.8651621718287259, 0.8883788599122395, 0.6582784491979599, 0.9030273681761176, 0.7210301314633882, 0.6028171503948156, 0.7397958675253435, 0.5070110444068667, 0.5509482121496851, 0.6354139330671441, 0.789721493249463, 0.9155922565516434, 0.6199909210803277, 0.6296527999336716, 0.9466674487660671, 0.7650323178149906, 0.8654370662316746, 0.9515780584825368, 0.9314505245265774, 0.8364316675811378, 0.6323564172360782, 0.9730152944381336, 0.7456454494377951, 0.8441672979491438, 0.9360189366022358, 0.9330553401033752, 0.5390507602956023, 0.5926487382580325, 0.9589583972903194, 0.6914942006615981, 0.7894266447839063, 0.9356394534847574, 0.691892373188518, 0.6188514293814413, 0.7135324404449357, 0.9107187074545522, 0.849724282837949, 0.8238068594987629, 0.7591838374873182, 0.6736404040398185, 0.8239775718988924, 0.7472436527340934, 0.9197276333751611, 0.7906325619118157, 0.6468334315193398, 0.6111023168040881, 0.9810391458503724, 0.5166229260392671, 0.8019593876634397, 0.7827101121282044, 0.9320014950433213, 0.8540897079665364, 0.8260257687099837, 0.8349098652022544, 0.6350123311374178, 0.5070592448281479, 0.6789874429114775, 0.7486531503215929, 0.8295466676651266, 0.9784643992442992, 0.6655276592946473, 0.5606191174305615, 0.5986785736659003, 0.9607734862664046, 0.7922398636456899, 0.9695707399040873, 0.6556539529639619, 0.8424298256611531, 0.8703578174479221, 0.729945637605966, 0.7909757413112326, 0.7557865840448887, 0.8995718084897687, 0.6137859668668167, 0.9367757824138527, 0.6919695363548948, 0.5231634318262648, 0.8919474561549021, 0.8832419313545501, 0.5127891975030021, 0.8097320290273627, 0.5318268374042414, 0.8907804486980593, 0.8999208007148923, 0.5813787295792183, 0.9499164978735313, 0.6597936872262784, 0.5477318540380207, 0.6776932634425477, 0.8103080353378557, 0.7880597483427894, 0.7585705787838761, 0.520293222074943, 0.7293538724252487, 0.8449478936164299, 0.8627443795948746, 0.5901418532274677, 0.9978971050522188, 0.6169159995547301, 0.8518089878627397, 0.9886815711022091, 0.8916047221112484, 0.5338302808229869, 0.7767511545505308, 0.8777919217502872, 0.5426829305856933, 0.5971073829735912, 0.6372264150291147, 0.5943281907276904, 0.5215853084314893, 0.84661442942707, 0.6427164156247542, 0.6593871030584105, 0.9256990586899769, 0.9943546628292954, 0.5265618595880811, 0.6940270472219758, 0.7626215080642872, 0.5564606804893183, 0.8816152096887448, 0.7444167354314541, 0.8793482517841889, 0.6289011581313682, 0.931574828550388, 0.6750793277863819, 0.5679299893973375, 0.8373393964950395, 0.9112444116898062, 0.593581996098652, 0.8444624353882881, 0.5486998804595704, 0.672626474955948, 0.9314523071182905, 0.7788766438439425, 0.9827328378692677, 0.9672905578819433, 0.5397025711453143, 0.9183467871055149, 0.9687900291213714, 0.8739009443265036, 0.5965956192179794, 0.7350762490666318, 0.7326684545862399, 0.5542994800157981, 0.5870467443375588, 0.9670595952186729, 0.8344172935263681, 0.6143714019221093, 0.7877428698592499, 0.6516845577380668, 0.5895283658036392, 0.5433887457406366, 0.7845578971652931, 0.5031016103771158, 0.7334814747070968, 0.9707472607467584, 0.7973784061778946, 0.5842955926607682, 0.9789978799583277, 0.7654759430030689, 0.6239514729122966, 0.8761967520897338, 0.5648881556167612, 0.7125647996054636, 0.544816264914995, 0.7484416957890174, 0.5414256754842292, 0.6124201833398557, 0.7072169838521078, 0.7190455546197723, 0.5487457237487934, 0.5739622529432536, 0.8104853196078884, 0.5438415770838777, 0.8490102890862061, 0.9147368197018715, 0.8966001057151218, 0.6989394379526789, 0.6372494064266923, 0.8998236734945697, 0.6827172888328077, 0.9785651348729307, 0.6439418799444523, 0.9356243080827593, 0.8025446002702616, 0.9628495088973921, 0.5211266392590425, 0.6976908128802757, 0.9997609463709948, 0.637724762319595, 0.9723941013460847, 0.9223587997984428, 0.6696625165106311, 0.5734773003295096, 0.9824315218303022, 0.9505756647284525, 0.7027494182515495, 0.8995233410137828, 0.5137585602880359, 0.9464758250712972, 0.8274800722648933, 0.9327594972377717, 0.8707249644987867, 0.747241249918283, 0.8552316417158969, 0.5527419756957171, 0.95432850289539, 0.9823448256934342, 0.5632730260504359, 0.8110374152475662, 0.5233488017585777, 0.8872346547968821, 0.706127271982065, 0.8570616971841645, 0.7960062580647629, 0.645819309283132, 0.8745283631474605, 0.7657196996114964, 0.8692175367838276, 0.6905415417913927, 0.7274473888992414, 0.706844555497568, 0.7128168055500361, 0.800945685161603, 0.8291477008489576, 0.8123888001002073, 0.8368595808217462, 0.7687739525272066, 0.9432814490486191, 0.8002951854894742, 0.5302646436552518, 0.6055933403485212, 0.7022353042971695, 0.6655263908237066, 0.9847641416984614, 0.5864522363951963, 0.5300252785047873, 0.9427999975245821, 0.5419806682782302, 0.8305108712895117, 0.7112064116133592, 0.959715464491829, 0.9566294831614943, 0.5931553188283045, 0.5900125994785752, 0.9057859309441018, 0.5124643555734913, 0.7435581897931891, 0.7976378259812686, 0.7361101133063285, 0.8748141387375912, 0.9618226531891971, 0.9354542758263824, 0.9660276351453096, 0.9637541933099125, 0.829925476483598, 0.5395107274714241, 0.701667554618272, 0.8199790366552477, 0.8323948975939301, 0.9699102472570222, 0.6098528311133643, 0.7518541946494899, 0.7504672976850906, 0.6561996227555349, 0.8500953620043218, 0.7440635154665248, 0.5121013333579563, 0.6961396401484293, 0.9297363888964192, 0.705421199811602, 0.9563959624577876, 0.7934887474488006, 0.5323336695643486, 0.8361824069962651, 0.690209812973843, 0.8785309579580168, 0.9087553014489158, 0.6550987316908466, 0.644352763738885, 0.9951206820173828, 0.5081021145356456, 0.6319526387673734, 0.7408477074823767, 0.673391774547503, 0.5746548719130077, 0.8043905832179189, 0.8440835828748388, 0.8322166216220446, 0.6024692289865254, 0.5629659282279975, 0.7456754875841207, 0.5045938212738825, 0.5432650719519038, 0.5886087118131221, 0.8729475317618338, 0.8326528017164451, 0.7784606298025913, 0.8791205552433221, 0.6649098455035658, 0.9272091990662852, 0.7234822134720589, 0.9785331492231284, 0.8302290396463531, 0.6620115511493949, 0.8759723490459319, 0.8646474040367444, 0.6251817394971877, 0.6473418550923467, 0.9791759640877387, 0.5740401638410931, 0.5465807978853459, 0.5559101530517836, 0.8706972290680127, 0.5107757434596597, 0.9830350091368272, 0.590857666870271, 0.7935341513988154, 0.9105866353231105, 0.8510722337311116, 0.9842647947159238, 0.878204029265026, 0.7345498221051627, 0.8571705272016704, 0.6977787215282476, 0.7977834945721183, 0.688908722463601, 0.879441046244652, 0.854812223178413, 0.6136441295372189, 0.9453724966397645, 0.6453906915523387, 0.5455364177116512, 0.6367598578056272, 0.780268976246981, 0.9546570540519648, 0.5193450536626624, 0.5022450510747813, 0.7401779114321918, 0.9539525103989708, 0.7832335911631259, 0.6485174833715776, 0.8462118125522753, 0.9512005743500627, 0.7766001032675842, 0.5544122451152262, 0.6286129956384421, 0.6810679993613019, 0.9858067988088053, 0.5955830929413426, 0.720829308448158, 0.7235121345668987, 0.9295007861903459, 0.999177058734587, 0.568184466540019, 0.7840596234025657, 0.7090336964184493, 0.5098885474346619, 0.8342105727977238, 0.6817585593580715, 0.8623943376476442, 0.5948883849576878, 0.9574870671583435, 0.5902909831432799, 0.8754046173515064, 0.5599152984933349, 0.7847432968847907, 0.885796390713241, 0.5133750494308962, 0.5763148853320356, 0.6713712491614139, 0.8418177034052869, 0.9192849816178464, 0.5304599890152144, 0.6603076398011473, 0.8363824407400429, 0.9178664779018795, 0.7220624937545175, 0.6009785520365898, 0.8131225992889115, 0.5216913424116305, 0.6150481423439907, 0.9061575242806766, 0.5056857524482823, 0.9070873882104187, 0.774148418996579, 0.6039819780099731, 0.8560562901929787, 0.7586795070227745, 0.9431931533157456, 0.5250593834300474, 0.8167373399272286, 0.8043092665817657, 0.6826496060154396, 0.9203528609922942, 0.9576440662788691, 0.6391625164854577, 0.5613644764845214, 0.7721523521662663, 0.6846143580337072, 0.774185397089473, 0.6187813411703295, 0.9415623172862404, 0.7051155362199408, 0.5120030443864932, 0.7293771346546958, 0.5857467090925372, 0.7725922627957905, 0.9459994125144053, 0.9565711445241563, 0.9017641136664345, 0.6684082157202658, 0.9241615296687185, 0.9384389333082677, 0.9889459972044534, 0.8156992093403228, 0.7610978215356233, 0.7382348314265936, 0.7089246715090516, 0.7118176586018401, 0.9325247651110752, 0.511587185506596, 0.7405657642283677, 0.722546813934196, 0.9486658317389869, 0.862001660349824, 0.9891318002356415, 0.8191570534713193, 0.9719043355093155, 0.826261706477474, 0.9763598013510197, 0.5185650368274995, 0.9628445405564303, 0.6292133508257296, 0.5329117940543647, 0.6944776357256401, 0.6309044810609055, 0.7987770151829876, 0.9324720276429875, 0.9174831149742388, 0.6668305752382965, 0.6118109207837197, 0.9581005552432708, 0.6650542373897441, 0.8160367223101788, 0.8358780454554227, 0.6809840946899666, 0.5376104962266077, 0.8659668001625606, 0.8149686551282938, 0.5078162601770797, 0.9227141431644388, 0.9407946742602736, 0.8947970037787607, 0.7380122533443781, 0.8683190619779171, 0.9493595513981088, 0.7928004030620864, 0.9756742672991651, 0.6332334983520009, 0.8047229854795304, 0.9466164952338665, 0.7721949280019387, 0.6189912988340045, 0.7813188474964747, 0.6637121300685006, 0.6809622708902461, 0.7005426655719866, 0.6445149680450889, 0.6150168506379198, 0.8494535443936412, 0.6353668255162058, 0.7283820097383735, 0.5108984373699208, 0.6308397697064989, 0.5536063060925579, 0.6949291374153583, 0.7845846952458384, 0.548640295538575, 0.5708760585438961, 0.5178212516946716, 0.8691141547860155, 0.7849217923742562, 0.5288629763740742, 0.9495561812667213, 0.5465719720346105, 0.9469981166867686, 0.8475601457849299, 0.9961586975679897, 0.5018429110310962, 0.5174049158531198, 0.5616551212226712, 0.761139886315533, 0.6560451116746706, 0.9325645307697088, 0.8565563122426961, 0.8637413065832217, 0.9339403169496661, 0.849038187309211, 0.7178830767440942, 0.7055639184658642, 0.5255133086627011, 0.5314460831191291, 0.6214518414093804, 0.623448512186497, 0.7682203567932253, 0.9615635204191655, 0.8070785298060168, 0.5870153096935768, 0.6239334830136426, 0.965471479850095, 0.9975845001683201, 0.774830273427498, 0.6715639972877584, 0.5680047315123593, 0.7691878831628858, 0.6858609355697491, 0.674464778343717, 0.5735982827458509, 0.6972267657882589, 0.6506660392898275, 0.9612522284728164, 0.5644963105373686, 0.7146498869317139, 0.9569212403019713, 0.5032204132174081, 0.9231528583475594, 0.7135371155859902, 0.6757101723492704, 0.6770355210366068, 0.7278777916448449, 0.5596062317928265, 0.5982637571288935, 0.6946305071451082, 0.7976151338018255, 0.6260182396278939, 0.9825793378276704, 0.9876492371879586, 0.7704396848555619, 0.9781359640702498, 0.9277388635905301, 0.7444154483358416, 0.9984817586884773, 0.8827782264618382, 0.9630879186647578, 0.9346816835817475, 0.6383735889465387, 0.627658764912056, 0.7319055673112329, 0.611977966497485, 0.6657449224169926, 0.9374584178183107, 0.8399601861996187, 0.8458837811448711, 0.5185872434396575, 0.7787991466447477, 0.6662353904070011, 0.6048191160880261, 0.9679732940082497, 0.9448060535415952, 0.5871565575960069, 0.8818546905854876, 0.6879193290744864, 0.7371047342315478, 0.973666186232312, 0.5823758943988638, 0.7038466572677393, 0.6104148047886289, 0.9713199669088493, 0.7484806310712602, 0.5829026450604553, 0.6919918222026331, 0.6841927421132369, 0.8501332511689714, 0.8962698881047205, 0.9914104056832906, 0.960371095282146, 0.7566418035622595, 0.8136740662945396, 0.523094733232919, 0.7576383391084534, 0.9691886347196019, 0.9323736236960227, 0.9097886109396526, 0.9826679722025147, 0.7400769097561901, 0.8392132451982567, 0.867310753807236, 0.9460110023485985, 0.9889979663745606, 0.6052890651336881, 0.5764693308176605, 0.9340742431526301, 0.9962363919412887, 0.7859523951505953, 0.6335609287577743, 0.5259817489108798, 0.9213520299629744, 0.7513750961935626, 0.6023834692481955, 0.8706863333579009, 0.6430917785239949, 0.8201115350862, 0.5512395811514293, 0.7681431589909662, 0.5208687593933161, 0.9860398873567502, 0.6704722013207709, 0.5841297381334121, 0.5787930129517624, 0.7023318194697656, 0.8296809217001475, 0.7028686307767504, 0.8421243852994724, 0.5155911946508013, 0.73311791838806, 0.9270499015247191, 0.6992223349730571, 0.5686373430639815, 0.7054641979055389, 0.7010396084680806, 0.7817797054191962, 0.7869649884188343, 0.8731277519158467, 0.8199975796531447, 0.6222043354945149, 0.5973787644300497, 0.7687620195990326, 0.8655663566274875, 0.6941158085989088, 0.8864680800253406, 0.9371857120903673, 0.8586405253387532, 0.7724728940864136, 0.8607929419877268, 0.8826741895436794, 0.9732821733313568, 0.8427769059633067, 0.5310441374792327, 0.6810466765667699, 0.5807912140676508, 0.6042786707666075, 0.6905715383663722, 0.560765444252225, 0.9043180523654468, 0.802513547275014, 0.5793494870439819, 0.8869787062097902, 0.7037836454879187, 0.8583358726790317, 0.8270045105043062, 0.8274952036932133, 0.9749789809491789, 0.5183712497703785, 0.6084555239759467, 0.5936485931390876, 0.8878696769452183, 0.656704486031849, 0.5608742732914694, 0.841368717525564, 0.7766129200057492, 0.5578966271437021, 0.8893941598863155, 0.8987926398487729, 0.8078891223542568, 0.5477134794253151, 0.9374749607181323, 0.5113212423313827, 0.8788544766289639, 0.8631763499310252, 0.6902452928947975, 0.5002932673556972, 0.6699833331186591, 0.9830693792343401, 0.9125964783302439, 0.976098418713527, 0.6068208467836195, 0.5738029257656632, 0.9602709730617138, 0.9761257266671011, 0.5926931778107408, 0.6039002355271068, 0.9363827101965949, 0.8391470086780113, 0.7271005276830275, 0.9438222393724723, 0.9191951050886242, 0.965655369188759, 0.9607206746319372, 0.9891497379631418, 0.590267690190696, 0.7691608020807291, 0.6202570965673009, 0.8779146064890113, 0.8915422548764107, 0.5582555838804492, 0.9887565060512847, 0.6808985315129603, 0.6780904879817358, 0.9431936801921463, 0.6943102632675389, 0.7073167973216656, 0.8574956389861217, 0.7847687973060429, 0.5131721965572029, 0.7899475667803786, 0.7297938718275819, 0.887141500308148, 0.6983713594921788, 0.8765572729434505, 0.6635200917881793, 0.5588085611464034, 0.6945609523669046, 0.9440410337055974, 0.9263758194854002, 0.7279648628981503, 0.860285285236757, 0.9967203988953974, 0.9031016257929423, 0.7499683942918617, 0.8802112184939407, 0.6197195089287939, 0.5483603577645257, 0.8601534567115772, 0.6753509078878976, 0.7580176397439957, 0.7112204817981999, 0.9798372629932202, 0.9424044089800492, 0.8841441284169852, 0.8431374098137173, 0.8679426544452944, 0.5931418581513306, 0.9028686012008194, 0.5378541620879542, 0.5468294437889182, 0.5869017899882125, 0.5612921155170848, 0.9715905837196805, 0.6495025133181425, 0.807175172399673, 0.6004874578188786, 0.7600911871292666, 0.6835039738357858, 0.6811069104346723, 0.636107694949906, 0.9880810819081518, 0.7192183698586829, 0.5078663346763566, 0.9413997813769248, 0.8677808187036294, 0.6763078037036763, 0.5387941957054161, 0.6666974311667802, 0.818167393034636, 0.7056919362184677, 0.8704697270738977, 0.5532366500397484, 0.9660567512785778, 0.6490773225480391, 0.9158029172346083, 0.5853822750299754, 0.8495349426642504, 0.6668240702596113, 0.691656007160719, 0.793403778771304, 0.7539151200987984, 0.8304693598117774, 0.6038004715699934, 0.7153805445183568, 0.655476242634359, 0.672071124941901, 0.7943870963103388, 0.8068425049708275, 0.6003217884109888, 0.7545761978448249, 0.5976950577223663, 0.7192492627726466, 0.6894498449536772, 0.5980424638668672, 0.7731596059362674, 0.8838212669143884, 0.9044732855007597, 0.859179459085719, 0.681863240584964, 0.9058355462662806, 0.8252297277115037, 0.9041987022000184, 0.8522552625391172, 0.767873263506839, 0.6428001398588523, 0.9847297815601814, 0.9190633932663144, 0.6985481912223538, 0.5415465823578371, 0.6087860005298014, 0.8072920026494789, 0.5155258061775465, 0.6057326240387242, 0.5300588151651567, 0.9324146694359026, 0.8278550611177454, 0.5660208704093165, 0.7074502713230244, 0.9966381636373745, 0.5920477815909168, 0.6158835079892702, 0.6527731623460106, 0.7193597590529484, 0.5389858259306313, 0.7971431664337929, 0.8551039612029121, 0.5185653757513464, 0.672256946415641, 0.778048768891322, 0.6933511289120848, 0.5902053238283589, 0.661613230468427, 0.7759031566723855, 0.8399606552032914, 0.9461171439041077, 0.7569508842427684, 0.6075805663074615, 0.8445709638213381, 0.8596212692584175, 0.8449804613039602, 0.8623439818499129, 0.596929844526028, 0.6192015597588536, 0.6066472283953097, 0.9427687045537138, 0.6622038747648666, 0.566154667616728, 0.9684390278204253, 0.8426832851488073, 0.5267153776473288, 0.7114425126948898, 0.9622383058152612, 0.9728321706625682, 0.8309978751782905, 0.5956345400449659, 0.8950128774665772, 0.8853182750955975, 0.533796391768735, 0.8362783671355332, 0.7452086791519269, 0.5790206156250055, 0.5554725568703753, 0.6917387516977643, 0.9658330608542169, 0.6051257186987414, 0.9611457973093569, 0.6869546205362261, 0.7454416718666044, 0.8359584346174795, 0.7571280122549986, 0.5093154941537119, 0.7940247509739431, 0.534313005586148, 0.8298508825637878, 0.8267284067373262, 0.7145175037730345, 0.9134654869323389, 0.6612044930882357, 0.7950019862188771, 0.7529784776602328, 0.6138679986625449, 0.990095276254968, 0.6129403450884154, 0.7463928164410486, 0.7466300047540688, 0.905133377477495, 0.9030364565064954, 0.9598573764942414, 0.5828475252129748, 0.6953484862848005, 0.6454538988269147, 0.7783618862748787, 0.7628924991137626, 0.9696243330276286, 0.6573017470360757, 0.8761559769365003, 0.8775918470435582, 0.7561039527834437, 0.764681678242371, 0.9990565496816359, 0.8551932083378849, 0.9396717597835924, 0.927951333149854, 0.6649047585731072, 0.7641283960036159, 0.9320350445105465, 0.8020194512388472, 0.9009497492218244, 0.5965691867104356, 0.6669410305149217, 0.8353735062188965, 0.762202319663484, 0.9053275995210421, 0.8787048117263478, 0.6640046919893978, 0.7863378158703211, 0.6364813917316823, 0.86938123558411, 0.6196119626941168, 0.9358091662695883, 0.7173574551613422, 0.862224124132827, 0.7491622528697237, 0.6133020912852927, 0.6338265530240601, 0.5960948222957505, 0.6415666749497195, 0.5003952828469943, 0.8572038603040825, 0.8270267811663428, 0.9405132495711639, 0.8301306333264257, 0.6820500600344468, 0.6698939074279284, 0.9745086615330585, 0.741635278139196, 0.5838941392345418, 0.7854640114795108, 0.7943368837931499, 0.524156120333509, 0.6199213241725539, 0.8270726584419947, 0.6290656199312408, 0.6448631636637788, 0.9564537400768465, 0.5816448169755557, 0.5883605428402708, 0.6998385459976527, 0.6787187882935379, 0.6078159938177299, 0.7304418078703955, 0.9570622959461086, 0.8665340864806057, 0.5510222459965644, 0.5925388036389012, 0.9096544376600291, 0.8186971277773736, 0.9825624866055855, 0.5521482141560248, 0.8600061847419096, 0.7102801819561063, 0.9767712958464336, 0.5416641049162718, 0.9090154871779523, 0.6868776394397816, 0.9008448665833234, 0.9623282710257586, 0.8226186585660052, 0.7174490934064821, 0.8501543707493251, 0.9426579927979162, 0.6332666902528334, 0.8152625157974123, 0.5625588164297559, 0.6246070113006872, 0.5629493167307078, 0.964040374770708, 0.5152287251229697, 0.5101943231556118, 0.8489376796701888, 0.5834025753591829, 0.9224238980341202, 0.7171126312470409, 0.5635656048504689, 0.935439564687768, 0.6657632846986257, 0.5888992620691489, 0.8988837229995051, 0.9436190312279185, 0.7492293915476556, 0.5059630479255054, 0.8460160193427528, 0.865008852010378, 0.7118533303845065, 0.521730884346205, 0.6661550890232002, 0.7467780277900766, 0.774053933349873, 0.8602576621914676, 0.8596505357491517, 0.9341131368446346, 0.9579546445529002, 0.7992733427332268, 0.7359554302778926, 0.5388709080571685, 0.9894793713707364, 0.7440436362622542, 0.7394038256115281, 0.7545635750747091, 0.7738728302547437, 0.8236132103953593, 0.931528920571612, 0.8706308028963283, 0.8689309380066077, 0.6984351669942703, 0.868871895066868, 0.8816463076965192, 0.9182483775703998, 0.9058771741321097, 0.7841117748751014, 0.5578865122553589, 0.7566198691594386, 0.5575091084104478, 0.5303226493084634, 0.8709526273870809, 0.9173200276469722, 0.5929035687117614, 0.9062992430911867, 0.7333840984417879, 0.9026470295919158, 0.8254199011659211, 0.6707102924903132, 0.6072367913420698, 0.8799279840853549, 0.7857471915535938, 0.8627133030744373, 0.7473316157199443, 0.7767973842415277, 0.7944563626966269, 0.8309279037713004, 0.5957483821018104, 0.8956181327303184, 0.9261736884738746, 0.7914655367322878, 0.8009266192452238, 0.5936505237858878, 0.648585172609058, 0.8808604500066658, 0.8349020260935895, 0.8083105520958117, 0.9099639022838923, 0.7280865630814379, 0.9715166530209434, 0.7863570085939362, 0.6684295249486879, 0.8975119449817344, 0.6005892349725472, 0.5101570937163173, 0.5709248477063, 0.881890364761053, 0.7513253338197395, 0.758930631373608, 0.7621370250386175, 0.5957707531972836, 0.7904654589410263, 0.5854314026920033, 0.5942296600250955, 0.7569516013173874, 0.7685412522026873, 0.6958930935546463, 0.763115643871064, 0.8129420542419759, 0.9835902737599711, 0.6468195645603061, 0.8821023804889715, 0.5115334053596947, 0.7969285735015379, 0.871205404714577, 0.5480254124506738, 0.5386898429325209, 0.8882627750406475, 0.5671710150138377, 0.8268673090934238, 0.8619577308321824, 0.6072461479273565, 0.9879263923349262, 0.6432935769493999, 0.6951266036747119, 0.9987847728845793, 0.8317874360839208, 0.5276908420633297, 0.5698733623348109, 0.5887278085804243, 0.5345963898583972, 0.7160922871974544, 0.625570007351363, 0.6365581764630097, 0.8547370543432704, 0.5786239425670523, 0.896562650013682, 0.9478657705968252, 0.6190570353881679, 0.9635394066448565, 0.8859765609406609, 0.5047897542097026, 0.9732585331703432, 0.854462645850234, 0.569853616650613, 0.7723252590169485, 0.8086640210699418, 0.7816740390620551, 0.8624011810354446, 0.6147482666349657, 0.8931859685369725, 0.8160320194488732, 0.9343649390103443, 0.862640027871784, 0.9526760778469907, 0.7573681590026949, 0.70363183857999, 0.8131414074321675, 0.6538682885521225, 0.7018336809954179, 0.7605134564028193, 0.5023795707945028, 0.9895241164972908, 0.5269437152145118, 0.9660986907047726, 0.7609594929063787, 0.8416823854043767, 0.9104026165980458, 0.5530729617607303, 0.8017599181461894, 0.768696603080434, 0.8962786133098972, 0.6190744259208949, 0.9660524459372632, 0.8406688486040896, 0.822906277121455, 0.8304173311212069, 0.6152974885257868, 0.6907922234102075, 0.7020846453517392, 0.9925461213257997, 0.7846739562578742, 0.807651115392384, 0.6876014729680573, 0.6496294224343444, 0.7243064945556226, 0.8557370037993534, 0.5245067911111319, 0.5958653028405608, 0.6465466900687193, 0.5046535654671831, 0.6017998247173344, 0.8195369690470853, 0.8732469096379398, 0.8315347689638444, 0.603815781906033, 0.9162328776508146, 0.8666114888686249, 0.9035621231829658, 0.7502494412286315, 0.778242930441438, 0.7798860204370508, 0.6359198087185332, 0.7352363077484417, 0.8681351033943496, 0.8314048559500182, 0.5440560711152189, 0.9264356235313067, 0.8431724485833136, 0.5353801628132264, 0.7575492868570874, 0.7437870279570997, 0.5709713449786196, 0.5226420757584656, 0.9816524350089719, 0.8705738260969165, 0.6215492935241271, 0.7780157186565406, 0.9620417169499433, 0.7330827843401182, 0.7777385552099503, 0.5678508066376582, 0.5963722145444998, 0.7036688321821457, 0.8384959408221337, 0.8812346923128096, 0.7217477099374632, 0.7235541576858924, 0.7764570736544134, 0.9374292776813615, 0.876547848081275, 0.6273236871716409, 0.5530965770411309, 0.7518525617190932, 0.5256869262390544, 0.8243459865773193, 0.9171866384864462, 0.7296722919177357, 0.9933014582004576, 0.507656044970251, 0.8665030055037115, 0.6925375743253755, 0.9350253938015177, 0.7422170938057033, 0.6625114947031592, 0.7644528961937866, 0.8399649692004707, 0.6125590495983637, 0.9499767000753034, 0.7497327227056166, 0.6045040208849176, 0.8156935943393827, 0.8077098374388731, 0.9220639823690382, 0.8510969156275627, 0.8517896349217948, 0.6772617704975713, 0.5936600164263004, 0.769421776809715, 0.8223723862433043, 0.8558526349341877, 0.5245069587973908, 0.711027126581071, 0.5536122679428088, 0.8499073662636327, 0.8603570538311873, 0.9565157743430116, 0.7879384654027164, 0.7045036890621961, 0.6129945761645152, 0.9167797837912457, 0.6971146953878679, 0.6312411157718915, 0.6378369047669097, 0.7012138207844503, 0.7252119350825216, 0.9509537963530996, 0.627434907103486, 0.6359426233518294, 0.8944177483676379, 0.9498381598938236, 0.7784435299999098, 0.6089982048852074, 0.831935373086049, 0.6973362393965153, 0.9408036102168189, 0.5722029672115994, 0.5566339150208448, 0.7690803712810057, 0.7303855202806238, 0.5985031393355201, 0.7276925713259781, 0.6723232940181676, 0.617338695792846, 0.8592207019321334, 0.6316299927745637, 0.6692748265546966, 0.6995973767377249, 0.7939099477128658, 0.6290443546237979, 0.7246093910133953, 0.5209586372964449, 0.8418200234759201, 0.9002739782703975, 0.6803168394385086, 0.8554656699076333, 0.5775928092017409, 0.9048291397469481, 0.8367400418665907, 0.6673383696543507, 0.872848146637082, 0.6765811792203785, 0.794459271860982, 0.7690292561704238, 0.6248529401117155, 0.8674385672733433, 0.643802463500715, 0.9219059557542502, 0.8129405707503818, 0.9530859614740145, 0.6960295598550993, 0.5094110714726865, 0.8450921925374505, 0.8745866561375105, 0.7175396587834318, 0.8899518468436733, 0.6087160854576021, 0.9933995442243203, 0.8385231897503831, 0.9245926902745071, 0.8289782126251694, 0.877291475245553, 0.801193337002615, 0.7819328823797803, 0.9081353008096511, 0.9551603477618312, 0.6128097441268395, 0.584007699431236, 0.9857491125965201, 0.5438047285700615, 0.6136100984013142, 0.6233378115885742, 0.7598874839135952, 0.6734190402344169, 0.6453681549859229, 0.8796794807419483, 0.6662431393513817, 0.5916527247678501, 0.6321210691076732, 0.6460286190179696, 0.8626528291030078, 0.9111047561009645, 0.7992136887308039, 0.9034555994988311, 0.6168248260737099, 0.6620366641298747, 0.6101445089267896, 0.6149594004124888, 0.5972412132150533, 0.7877386979130435, 0.6556900208396084, 0.667862936934311, 0.9894274058322867, 0.7537624691685416, 0.5212564633057679, 0.7477307130974271, 0.7031592817298207, 0.6922826722686254, 0.9937240262045468, 0.5659387822869577, 0.9193073226728132, 0.6493110628108124, 0.8350431298998308, 0.794782039018318, 0.9182904480863321, 0.6895092265341589, 0.7734338116363078, 0.866526807795384, 0.887327753787256, 0.617254218469117, 0.5490225206220682, 0.7639251044906183, 0.5264253074413998, 0.7070498808055414, 0.5050832755368774, 0.7895250975997798, 0.822576978320567, 0.5980313484584694, 0.513120920162467, 0.873678650509705, 0.6006435338730781, 0.9790127626338107, 0.6179657302836925, 0.5877683367535178, 0.6471472112543922, 0.7447917621340487, 0.5922930538361, 0.8690019429422972, 0.9659261928186397, 0.9027604335559543, 0.9098718224657458, 0.9982390474224712, 0.6997622804275936, 0.9643998405714456, 0.9989453582499492, 0.648034849524796, 0.6389825406885443, 0.5737294376781147, 0.8504634652994554, 0.8326275015260189, 0.6022327502297073, 0.8346665475110446, 0.7394771806063438, 0.5798241344872892, 0.9828859990148768, 0.7654911117965641, 0.968083491771211, 0.8887007820904662, 0.555288721948208, 0.6315385698934428, 0.9318895280754284, 0.9101484243870153, 0.8205962254279602, 0.5706199860725045, 0.8084597910460173, 0.9443907945386367, 0.7140956306117261, 0.6208144584139552, 0.9510278563579098, 0.7799223522331937, 0.5072604463550745, 0.5381808455056202, 0.5342710363980974, 0.5753171939521432, 0.9599140434329108, 0.6834158979048599, 0.8361142486295712, 0.7262518078588011, 0.6932374643091603, 0.7216630938033701, 0.6338289705463567, 0.6377931411297235, 0.9435771989782762, 0.6521776110085656, 0.6417888441274264, 0.6965537623208148, 0.7269518645088804, 0.5772102279773241, 0.5600151943834533, 0.9358247054393758, 0.6074988851461084, 0.7350340643830022, 0.8383126727028974, 0.7236179198094861, 0.8615732464383756, 0.9772650337823082, 0.6183270299591247, 0.6160854904210891, 0.8055034342990812, 0.6407457272656495, 0.6747783785980777, 0.8217370798927827, 0.5400846840672566, 0.98430703072235, 0.5756665157791971, 0.8924440478005871, 0.8777585920286461, 0.573350710515997, 0.5818456043505498, 0.7666347894341374, 0.6411209077601734, 0.6312924014001522, 0.5683214929918552, 0.7335888779858979, 0.5639215743636355, 0.7973914203482002, 0.6184937309999324, 0.6024487964404086, 0.5627096343603504, 0.8976347568230989, 0.9268252586647809, 0.9204706419674992, 0.6564998727252189, 0.9196652322595229, 0.7226807064690467, 0.5171495104695389, 0.6788967233919612, 0.7493019044572002, 0.7912445199441005, 0.7459776509307628, 0.8930980126000083, 0.9834876283499882, 0.8099150744158776, 0.9743037191439115, 0.5756687392511414, 0.5147165201862415, 0.5237237704613527, 0.6002857851515371, 0.5586467499444157, 0.6582165729387227, 0.7999284542511873, 0.7110088674981816, 0.7712475281562803, 0.5944539142503718, 0.6006646876255874, 0.7208391787735482, 0.698907688290638, 0.69296686302506, 0.8120916942110181, 0.5292184072375338, 0.7391152857852505, 0.7358883489673038, 0.5533499994159252, 0.9200309476426081, 0.6915500801179912, 0.8691651653824899, 0.8101365442250115, 0.507580994799062, 0.8627453357424657, 0.8532185400168272, 0.6269382526968919, 0.7003068614515155, 0.8323631901735623, 0.7316194236697143, 0.7654136605401172, 0.9177903158202233, 0.9654185436439127, 0.6220872807404692, 0.6216614278466386, 0.7878266975974918, 0.6852953226718912, 0.9190007215480043, 0.8286883813367516, 0.9903927537310773, 0.7992360521478894, 0.7813278509036401, 0.5877985300024613, 0.5481475171708909, 0.8556330351614754, 0.9102715537009244, 0.7936083799184847, 0.8570188056056105, 0.745100623392055, 0.5098321331142581, 0.9151443966325388, 0.8588285179202477, 0.5770391871192977, 0.8293419948328102, 0.8673847153884677, 0.9927830323767668, 0.6005141617655576, 0.837208950038351, 0.9507267424183493, 0.6409344146920379, 0.6878247619445568, 0.8773160819059627, 0.7712516949910846, 0.66988150370631, 0.5689232442287124, 0.6729043678934095, 0.5118297407366457, 0.8843264768121673, 0.7941017433298414, 0.7737339574730142, 0.6256287318710436, 0.9887479903401133, 0.7992794923752726, 0.9980783999551985, 0.8555408768611158, 0.6885956095245966, 0.5917777433400473, 0.5185885771840739, 0.7130155832398951, 0.9900674050204386, 0.6088833148819199, 0.6169236478611835, 0.6236398923081621, 0.6520154242800567, 0.9599358775404703, 0.9505024902429958, 0.9858623925619598, 0.724740380031277, 0.8160274641245708, 0.75152812214068, 0.5061036387253498, 0.7819056627742649, 0.6794913315836921, 0.8507031003745547, 0.959646465183577, 0.8263106501593116, 0.6913980657141746, 0.7069592915381102, 0.9097814465637664, 0.610700014816528, 0.5344859606317687, 0.9904371185174062, 0.8868982094279101, 0.6617323848000742, 0.5402868840297934, 0.5618888752698745, 0.7444822506200812, 0.5155526495169975, 0.8560145413701583, 0.9604105250166641, 0.8447453483953827, 0.8748154356567088, 0.5351914617162857, 0.6366532757119099, 0.8676214410134924, 0.9057168134735947, 0.9475462558466221, 0.7942503935530058, 0.8386192242717325, 0.6921888614868961, 0.7510056561314405, 0.5484453483270433, 0.5823971012831094, 0.7781783175680168, 0.7209912021331828, 0.984747311475352, 0.5587433979299667, 0.6763794960753146, 0.6316810327243505, 0.6010686335771331, 0.6490165667155483, 0.8594500209687153, 0.8105739456140902, 0.5424962078051108, 0.6352026991185549, 0.5532660918795331, 0.9787847187039063, 0.5861534906010024, 0.9933532880976379, 0.5120889278804144, 0.6134511873930693, 0.9973873352877154, 0.9109542615951625, 0.8647610671496168, 0.84650901343555, 0.5123477093445146, 0.6629793973698492, 0.8153949082704837, 0.8963352021712987, 0.9979731127479285, 0.8381000218285015, 0.5621162060849896, 0.7140827989004175, 0.5833148165867483, 0.5887473335867675, 0.8571759273728234, 0.9711942153543605, 0.7019655889114933, 0.5278345300456255, 0.7139105482286621, 0.6129396679590209, 0.61132808055462, 0.8020805406346503, 0.6585943048006824, 0.5368639542605371, 0.7077744021595136, 0.8894540483215132, 0.5348216913676189, 0.8497467594786525, 0.5414697347670949, 0.5483966640311655, 0.8709919712340795, 0.692404238600801, 0.7298983094946754, 0.7593946770185243, 0.9423448890572628, 0.6181052805150478, 0.579750453955557, 0.7558120739344618, 0.6306356376997955, 0.920067984938572, 0.7364187509330344, 0.874387478362256, 0.7360316138663395, 0.6446700286057276, 0.6702547178685723, 0.8745889978355024, 0.7700691806010791, 0.8389391623059934, 0.7448014532574654, 0.9357093027479493, 0.8594041950527298, 0.9743913212800144, 0.6631971301116879, 0.6103291709121128, 0.5291832182848506, 0.954572679240125, 0.9570330080586688, 0.849709102850871, 0.6786198031910761, 0.5887884919862107, 0.7955294239435736, 0.870813940993487, 0.6833585362838552, 0.9043642996497683, 0.5132073970701354, 0.569098313223412, 0.9017079415714424, 0.813867078979926, 0.8938918824642892, 0.8127201832182811, 0.7454875670141051, 0.8203148013804881, 0.9450521266388772, 0.9571200409078402, 0.7019992366657473, 0.5803342544299414, 0.9329596901716807, 0.7367222955954864, 0.900857571153989, 0.8138758271674673, 0.516710943479106, 0.6332303726883188, 0.8183340089965274, 0.7965447296960603, 0.5883853342712242, 0.8037877718063213, 0.6031778213269812, 0.6329162594827153, 0.9906903393715333, 0.8451872228015429, 0.6968941851302545, 0.9307175746172529, 0.7072470757256855, 0.7189923426397443, 0.5590673283124713, 0.8000595899330607, 0.690345343255539, 0.71549833862395, 0.9472306736547997, 0.5027615121861355, 0.5334089938602107, 0.7835472563439783, 0.9178104628721184, 0.6706215378816301, 0.6089738301800387, 0.5209231706694977, 0.8847689631536251, 0.9141348515857035, 0.9073303451558689, 0.8005633788110664, 0.8435592899431834, 0.7895313330697782, 0.9492856966781857, 0.9970745350049093, 0.9576820859945809, 0.8362340966966479, 0.6007632775213185, 0.8244241907584916, 0.5892201524706404, 0.9992271648884304, 0.7127368927950735, 0.938611671728552, 0.9140601328567965, 0.7060734391728595, 0.5193780680351998, 0.5791819053501798, 0.8556418612985732, 0.6247617651865636, 0.7724182415036487, 0.5720117774605582, 0.96800013077054, 0.9749833244703563, 0.9480967703315191, 0.8205598294151286, 0.8717565975631307, 0.9122159472086894, 0.8268333506463756, 0.8777812364346301, 0.7702767087888504, 0.552284837133316, 0.600167849678446, 0.7933290948839695, 0.8065468540287584, 0.6623529815654314, 0.5687905866343606, 0.5938135151163813, 0.5379370680341005, 0.8296543674457001, 0.8069007705354961, 0.8948859710664665, 0.6064078182956272, 0.8986960887556118, 0.9427598523026017, 0.8829167093559167, 0.7072031719359915, 0.7630716010363928, 0.6243223127647057, 0.5449893811162807, 0.8240435624666476, 0.6150001169571602, 0.9899955788364514, 0.501917484276391, 0.7255248631272955, 0.8181473720218282, 0.554482808033065, 0.8010064355668588, 0.6369663936005845, 0.5921161010743704, 0.6330960731980999, 0.5250494368704279, 0.8924745194684592, 0.9110451869308931, 0.5879443473879366, 0.7057721665016141, 0.6782448959790817, 0.58973495032277, 0.964936362884824, 0.8895373750886071, 0.9821244724880269, 0.6375825098522878, 0.5997426240262371, 0.9104607404594621, 0.5723480216733532, 0.7885167258687843, 0.9768622364278164, 0.5044945876536091, 0.5083148742360513, 0.9565384179827119, 0.9644297603516598, 0.6788580284613673, 0.5002917164514916, 0.7684452661469721, 0.8511783239486894, 0.846443260216643, 0.7100839205036451, 0.9896914387470613, 0.8625847427726572, 0.9893400587232605, 0.979546019498354, 0.5848982927138044, 0.5641831658377883, 0.7586131004106383, 0.8945664563258622, 0.6053878294861609, 0.716127090145583, 0.9604070868703733, 0.5668339661682786, 0.6294800658403961, 0.7946184249390114, 0.7883852866725356, 0.907203975078851, 0.9740130997959981, 0.868502912207314, 0.6831734892589166, 0.8023088789182932, 0.5969731751754217, 0.8133750551822845, 0.8534235625756881, 0.6435554264930299, 0.974907456635939, 0.6853109227541138, 0.8561034222678163, 0.5194969667836034, 0.8216916275703909, 0.8688888748875818, 0.743870762279667, 0.8900789902854427, 0.9786729626622055, 0.8733221477837583, 0.5346799610448831, 0.8208358336596033, 0.9135949028268757, 0.5857480600546778, 0.617235437065498, 0.7625187666523411, 0.8361823387525315, 0.8987592109707303, 0.9085344639738266, 0.689194736113258, 0.597736725996814, 0.8277488620508411, 0.9516480238602573, 0.7464105634002514, 0.5476395089979584, 0.5190682391053698, 0.9613292402373652, 0.9870503686030733, 0.7085461721108324, 0.9244507227359975, 0.557459442859443, 0.9492230318660746, 0.6248472512454089, 0.7727167320407082, 0.8029630774041882, 0.5698867357841217, 0.8704477944666356, 0.7195004102675697, 0.9351405772824083, 0.6926578176561602, 0.5118158169219732, 0.9175528801676209, 0.9226795570709331, 0.6506506979827703, 0.6683704462375778, 0.6968266654009032, 0.649642810711488, 0.5556705449177752, 0.8907021352316257, 0.9020723417092282, 0.6650918697029692, 0.9268775844064279, 0.5901292910363231, 0.8178856869676298, 0.983214365713128, 0.7355098173724581, 0.8053358313072922, 0.6788429971798213, 0.571086692620961, 0.9624079041468276, 0.5116681328221083, 0.5144785686231762, 0.6419235460650592, 0.9430651399075991, 0.618986329356413, 0.5492775098228715, 0.9376437202026864, 0.8434950071494958, 0.6486613315274525, 0.6219194955882723, 0.6583399163274924, 0.9055063971253277, 0.7253905385270966, 0.938788579296798, 0.8586960413819604, 0.5199416540761992, 0.5119303955514334, 0.9274141612606142, 0.7268627286148852, 0.5574901395402309, 0.9149676393109694, 0.857571930278928, 0.6673196563261252, 0.567939670106058, 0.9000589165861121, 0.9252762107790794, 0.7769958557254917, 0.7927888578449023, 0.7647133511572528, 0.865853132992962, 0.7734917432709436, 0.7929861102409193, 0.8371507245208836, 0.9010776396374648, 0.5933517864378668, 0.8519386477668314, 0.7020437697720459, 0.5545859049806172, 0.5982018730830958, 0.6363166680682468, 0.9165722086048989, 0.9840613777380922, 0.9333329777025282, 0.662075634835306, 0.8678891088532812, 0.7107206992987272, 0.5335223924353453, 0.7294836255047006, 0.6322270945810579, 0.8370191771320761, 0.9505948914986705, 0.7504518899953395, 0.7244561260079073, 0.5221640470913285, 0.7600203336447093, 0.7979988481848904, 0.5413847728075876, 0.885913507883598, 0.8824883462246578, 0.631871415070017, 0.6817680068423126, 0.6896729223207192, 0.714035808044162, 0.8164284518278557, 0.9069654536080061, 0.5418181071674344, 0.5294638179199125, 0.8062305997936181, 0.7356214472431029, 0.849791267645503, 0.9063948497234009, 0.8787603151813677, 0.8997537916126237, 0.9748450016020732, 0.7152777177907448, 0.9354338998266849, 0.6721341817864661, 0.7009880410753777, 0.769868860837807, 0.5002127434006596, 0.6483943277293029, 0.6886686576352914, 0.6520856122307404, 0.7595897219610731, 0.8087746614986242, 0.6134515754344212, 0.5337475328009063, 0.6209557557035676, 0.773246001980388, 0.5030161961344661, 0.7766012356688883, 0.6893979491329265, 0.6355752553346807, 0.7171732917264645, 0.5908174476948578, 0.5318136712155832, 0.9480229037695171, 0.8731068836559108, 0.6623700888489583, 0.6767364752585525, 0.9638567296697111, 0.5057525737716662, 0.6588393249699716, 0.5246658562043558, 0.9830118886626013, 0.8232245311225348, 0.7493122726360073, 0.8444901727675556, 0.6873603057274805, 0.9289730195550255, 0.8489898785119552, 0.7337995452761006, 0.653046170177884, 0.9863944267137302, 0.7298557877464436, 0.5256479715275489, 0.7805933313055038, 0.618919288369163, 0.7196718123942608, 0.9758372933178091, 0.7003106702963919, 0.9066725629206627, 0.5931644467156028, 0.527660834984185, 0.9489419544632294, 0.6379621795411005, 0.964473267809663, 0.910035148284689, 0.7018199627103836, 0.9882796064082452, 0.7093521889892918, 0.7193547726325593, 0.8441718649216665, 0.8675548257770385, 0.8512106355707175, 0.9782639573130413, 0.6892396599311488, 0.5649022781471975, 0.8619720115918454, 0.8811155235340582, 0.6304711886526952, 0.8230944111162296, 0.7570656404959111, 0.8558665771205514, 0.9550897590346856, 0.9030001708775139, 0.5271523703313805, 0.9064439127141558, 0.5883265596490341, 0.8119656658408244, 0.5918947998000226, 0.6153722897103691, 0.6785792954715519, 0.7489519122074411, 0.831698010731547, 0.6284078188337675, 0.8676061934849366, 0.8801508800323077, 0.8103300636954216, 0.9940800668305262, 0.6762531418375833, 0.5744743164488869, 0.8663664313495829, 0.9549089799906835, 0.9002797456572678, 0.6722820952347063, 0.9460584463112984, 0.9247433482062188, 0.8431115469101109, 0.5409730448230348, 0.7516883055280353, 0.5496314626624899, 0.8318330028750123, 0.9518045558433982, 0.8084006204440026, 0.8439807108416062, 0.6382782429870448, 0.741261507425887, 0.511014734679067, 0.501555512745271, 0.7431796161696806, 0.6552414506165003, 0.810809788161884, 0.5863489456980536, 0.5173736442161561, 0.9866409036359781, 0.8193481127487158, 0.575584432129526, 0.624642923949509, 0.6505061085393005, 0.9622791801910202, 0.9848814148477063, 0.6281132962050138, 0.5281765068182929, 0.8509374898393955, 0.6228355902427404, 0.7144384477194903, 0.8431200321755903, 0.8805842529373265, 0.7683511841471196, 0.6124544063045727, 0.8445680128480495, 0.7594620675774788, 0.7639179589511105, 0.7661008208829652, 0.8640160888593029, 0.9770109408640208, 0.85747064978883, 0.7515535127182575, 0.6881322220682928, 0.8952560081804084, 0.674570384388803, 0.8994160513666338, 0.8824863848551046, 0.513766706166384, 0.5258136346467026, 0.8217375563167224, 0.8532739799054238, 0.5011233692460335, 0.5269922568004279, 0.7550403032234638, 0.7824973340786731, 0.8996224277896994, 0.9355552544982293, 0.9093852127423963, 0.7396369516357871, 0.6539304106742265, 0.6466188589980091, 0.721570345566116, 0.7156974544381534, 0.9681994097940574, 0.8348890142352571, 0.5525061431997098, 0.7124856717550982, 0.6038213269988761, 0.7100697823222231, 0.7753773199424162, 0.5307150393195201, 0.6732341787315754, 0.7959577348715278, 0.5982037540649219, 0.889096970709176, 0.8399220739957309, 0.5589329659013567, 0.9461650926629438, 0.9939480590351916, 0.6603391781299655, 0.9809768329638735, 0.7356206354254453, 0.8302774513484005, 0.6236170471096376, 0.6719632524741002, 0.677938880057736, 0.7132998510132904, 0.7027724023212834, 0.6435650385216343, 0.8532466021169407, 0.7912991001777787, 0.9499156916499638, 0.5421467740893251, 0.937068246040328, 0.6278037287068394, 0.7114568279994316, 0.6897690759610269, 0.7755296053522882, 0.6821150086596971, 0.7239907002966508, 0.6696387696409972, 0.6834023189966404, 0.5304320028048357, 0.8248721466393033, 0.8980923486470331, 0.7974133320014292, 0.5548098696632866, 0.8424253012224194, 0.8482771013123436, 0.7247273730898902, 0.72366684701505, 0.7150644192792135, 0.80135001285121, 0.8917348738116866, 0.9913116855273458, 0.8081994348768815, 0.501493765955147, 0.8452774274190298, 0.9124481066286625, 0.6346076355364745, 0.6843359149854651, 0.9295781088008839, 0.9843277309564342, 0.7127423097497738, 0.8637396326405586, 0.7556573936726436, 0.674777797983169, 0.941609964095196, 0.9333855532361996, 0.9545329271988587, 0.6914289355360228, 0.8108355177453025, 0.6032948594486427, 0.7113239990730014, 0.6563461220406069, 0.9653899999017397, 0.7387937421016579, 0.8982650328333095, 0.8916282636091677, 0.5321276132383811, 0.7883426252334438, 0.5648961625162572, 0.6300210865093331, 0.6706801690506052, 0.659595280428376, 0.9728972303248533, 0.8943746912216932, 0.5893174048235454, 0.5429643109855341, 0.8426549816306259, 0.6070994722516108, 0.525902401439514, 0.6118621796638357, 0.6152185391331173, 0.6128814927330891, 0.8005979976862899, 0.5711616359561322, 0.5821388409092748, 0.6930566294287142, 0.8164772229416963, 0.6790711742316116, 0.6833106465257863, 0.7126773154807354, 0.5058022813994176, 0.5440473111352009, 0.9264085508739333, 0.5727459020909811, 0.939639125845261, 0.8970694806544064, 0.8485947863531627, 0.7859658511672309, 0.5232426315264203, 0.9837808627747333, 0.5211679957210569, 0.9630046445006147, 0.6426698420686155, 0.9025112467341871, 0.7350792612715944, 0.6199410453381545, 0.9859322322629817, 0.8676881315150679, 0.566635167171611, 0.7878619997298053, 0.6389817537749938, 0.6446235268390077, 0.5978138073894631, 0.9586978935860138, 0.6393864856792695, 0.5785406253976866, 0.751833321706034, 0.6143336541603561, 0.760473946270227, 0.871467710854122, 0.5780528319101952, 0.5148224557944275, 0.7738773601340256, 0.7802943043440203, 0.723464063711734, 0.6539695757847308, 0.6430007293339557, 0.8429517483120601, 0.6889248843863733, 0.5480965666923784, 0.5249196237881253, 0.8395257465081583, 0.8821258531777777, 0.6278090803743691, 0.7952658848385561, 0.9784983316958409, 0.5301288468645279, 0.5256749080499008, 0.5772824008450961, 0.8319493537748031, 0.759991026910067, 0.7003086090816986, 0.890078826998028, 0.5617529424262004, 0.9455382189275106, 0.6397402872017806, 0.5321380237236525, 0.9035620213038742, 0.6973118304755577, 0.8786174758845124, 0.799424847169155, 0.609020278800604, 0.7914316713344834, 0.7689934332374737, 0.5024025713718536, 0.5795415533945577, 0.5758670269741921, 0.788386321207506, 0.6121167862339288, 0.6663342540103391, 0.9242971654357984, 0.8272513090415647, 0.8219317939670162, 0.6511543229055461, 0.5048494221009723, 0.602444984799185, 0.6726049246806756, 0.6401367022000786, 0.6110401392227525, 0.5216349515223213, 0.731509175116038, 0.8412152335367531, 0.6983703793542975, 0.6811702350586462, 0.640763559047421, 0.5889223019110461, 0.7653973592187413, 0.6893142306765523, 0.7232613453662029, 0.9918442246008948, 0.9835500883761238, 0.9373663629333564, 0.9351648208606871, 0.557290742075131, 0.6728975486132608, 0.9292933778547254, 0.9793691978528818, 0.7261959276075338, 0.8532356993261602, 0.6789803390939761, 0.8637709264004793, 0.9992368038007157, 0.826667425625508, 0.7578603578443721, 0.6659649441956744, 0.9177859709958326, 0.8581575015902408, 0.6130976402946422, 0.8918968112206755, 0.6581240301998865, 0.7369598532034713, 0.6157577019381304, 0.5835472449433388, 0.9571510308632831, 0.7387087085484951, 0.7702836933295718, 0.6203129130933958, 0.6751032735466527, 0.5213359728936334, 0.7514915849104826, 0.9370294668860262, 0.982592726217555, 0.6446594755931137, 0.684104269665581, 0.9644286684602051, 0.9554354847962885, 0.7412092667865477, 0.722641127494926, 0.6090691307225784, 0.9664977910568603, 0.6692731015561968, 0.9311988143920555, 0.5132179496717462, 0.7298604294991171, 0.7173826604628815, 0.6211575759935251, 0.9214563924432642, 0.9135088382596366, 0.8477983064428931, 0.9497156505760395, 0.7182197794022397, 0.8151373813345866, 0.6430853766043143, 0.5638089339224046, 0.5610912319223191, 0.9817479216535492, 0.7073533089277538, 0.6644202948709297, 0.9349445380961116, 0.7270670612128038, 0.6635687478877437, 0.9957243374707185, 0.6669555914946299, 0.6373712152434239, 0.5439290879037891, 0.9043620908903758, 0.6544029220893737, 0.5839969731717927, 0.7001633018993549, 0.9766538737717476, 0.7113854827830082, 0.8549719470753672, 0.8139844523971052, 0.9831737480034015, 0.6474547871914541, 0.9418121435622318, 0.8059996222833009, 0.8748063023915764, 0.8805305792416315, 0.7039602081471642, 0.6414375457057012, 0.5437993929795651, 0.7167703368379628, 0.6526870189907612, 0.8594315025397573, 0.646406083820676, 0.9257137415607467, 0.8474023988990664, 0.7708164683930934, 0.6995947599170464, 0.7204634450206793, 0.7560353843274019, 0.8266807872779474, 0.7072610495490523, 0.7272231489577438, 0.9382977988088173, 0.5510214070297568, 0.8990862095015985, 0.9527431500135455, 0.8812616601844618, 0.6953006757222061, 0.7161166302364994, 0.7199754600727173, 0.6304412949391536, 0.5397413771604589, 0.6923226741200379, 0.5212793651431267, 0.9409182490797421, 0.5433751207753472, 0.6151099994709887, 0.6868575691022403, 0.7229006050608182, 0.8247690030203823, 0.9905292946454274, 0.650066923831783, 0.8050501303984257, 0.510074445151506, 0.8123761822083637, 0.6951902500136048, 0.8885069786612292, 0.8368688243143634, 0.6823765264822864, 0.6086931457460241, 0.784891474761919, 0.7947863643651001, 0.7432840676578831, 0.9525557653896293, 0.8552195194775186, 0.64149551934729, 0.881360350565298, 0.748310136101044, 0.928973614708984, 0.8173346806689983, 0.8240949270110405, 0.6160615873397965, 0.9689073775668497, 0.5532140185155965, 0.8314023553606453, 0.7752818499443699, 0.9353313371194011, 0.907487118786787, 0.7512501750455205, 0.5079773160781467, 0.5083193303405675, 0.7864080491810737, 0.5332941828103026, 0.9415857347123741, 0.7038872573448305, 0.7613161468191041, 0.8865343243669175, 0.5074025556010181, 0.6521942160787173, 0.5474985614577507, 0.7798400822528055, 0.8262250825377462, 0.730695137849162, 0.754629090586177, 0.771046942818742, 0.7909929434943797, 0.6749625924840734, 0.8092548424625879, 0.540459821178162, 0.6616147747230653, 0.8549917793527815, 0.5319925292936376, 0.5955026788766535, 0.8490502550403796, 0.8765994559933756, 0.7474047039651552, 0.6433186168246114, 0.7188182398550917, 0.6441483439587097, 0.5199843206954418, 0.9470715351226388, 0.7636613856429184, 0.7037976435232516, 0.8185165324262683, 0.7882806259837727, 0.8498348042880133, 0.6994458623480273, 0.9544949610734962, 0.8085076202071091, 0.7665624695874327, 0.7238589784172631, 0.8493171788031011, 0.5134112976811237, 0.7641815539628105, 0.7890176873373959, 0.6263600670739173, 0.7516350454923084, 0.5907934442817164, 0.9617829918503321, 0.8959254377453072, 0.8483477916506399, 0.6815582287956805, 0.7555673059143834, 0.5831537982165227, 0.8604974658048605, 0.9054264509959601, 0.8185912584138659, 0.7192758264144415, 0.5173070325726261, 0.6325609925517406, 0.6659077017658862, 0.5878280067244315, 0.8814806946854529, 0.9607191380272634, 0.8248794071114544, 0.8831354866515942, 0.6456908689381934, 0.5377156644168197, 0.5350885206877314, 0.9482641072263742, 0.8254677420588283, 0.9420900696220516, 0.5288476358772061, 0.6482621154570685, 0.6583731254274947, 0.8661131805947728, 0.6059262345155012, 0.9021180475799214, 0.6330373737744848, 0.6138337376161421, 0.839032091663235, 0.7262301185345872, 0.8320258769018833, 0.762869854286125, 0.8066490007917098, 0.5896621972805294, 0.6236440082356585, 0.525280972550177, 0.5009318036763173, 0.7138072166222996, 0.8063828984610715, 0.7972852487654762, 0.9822968213346098, 0.6066025220413864, 0.8666442485573408, 0.5959073922657653, 0.9691212587789095, 0.832507388452639, 0.587770452044341, 0.5437346063327249, 0.9734099919529107, 0.9468451306594706, 0.9317328606462002, 0.5632251374035493, 0.5699938221332868, 0.6580442433003415, 0.5191613494817289, 0.9659463094655669, 0.7399503589163773, 0.9962975529402407, 0.5864770146526987, 0.9022068026677544, 0.9049721474781997, 0.5624004889852346, 0.8168260152581102, 0.8062473312525802, 0.7800153358320083, 0.877906960377332, 0.5973038473029606, 0.5340641811596223, 0.6648838802136595, 0.5287415185959952, 0.8907879385133624, 0.5256560778423587, 0.9596934997585951, 0.8377350059267488, 0.5875471940576376, 0.5041294512762339, 0.6306995109522391, 0.5134325288330058, 0.7172484807366403, 0.5654219426024458, 0.8713638421381933, 0.6886079066000308, 0.9304639912673327, 0.6248247135874982, 0.8052520152369822, 0.5339010552223573, 0.9793807053059682, 0.9269489700109935, 0.5709836776794677, 0.5670963915336726, 0.807288134531069, 0.8400149188629529, 0.8664652456066086, 0.5160921979390358, 0.7134243271308539, 0.8388223538783963, 0.8546639766833118, 0.9532224634283086, 0.9060890330838949, 0.5405656254341455, 0.7435247302660022, 0.9159162481533623, 0.7646247354469684, 0.9583614751356242, 0.623309264823493, 0.9184452571359432, 0.6623647388933571, 0.7034117339647723, 0.5122868193142744, 0.5781420248582885, 0.6633169808180301, 0.8278373131916054, 0.8181204711587449, 0.918669467275442, 0.7783527999956268, 0.7192664120010513, 0.6416034001990579, 0.5640810804099721, 0.982896849155648, 0.8732059149792633, 0.939348034350733, 0.6954093639788693, 0.7028782800147769, 0.7833776638982536, 0.9987070176582609, 0.9543991637077216, 0.6976294517022328, 0.6051413238688013, 0.610617799696525, 0.5364657690079275, 0.5676252953005362, 0.5274371909864615, 0.6215346066334944, 0.6647771912191476, 0.8449624514504689, 0.6285070669634572, 0.7172212092223691, 0.9999430118288561, 0.7985485536995547, 0.9847400794940777, 0.7332006793170749, 0.546668866173075, 0.6857656449816043, 0.7783658807936165, 0.837765396414478, 0.5209341335260957, 0.7568274765035891, 0.9947105663160937, 0.7319806433420226, 0.7174397006057762, 0.6973700371291698, 0.5761095895493871, 0.9433361991025576, 0.9990700901760352, 0.5238119785145732, 0.7801159209569057, 0.892404053595844, 0.661852237535712, 0.9947760526904648, 0.8913008856531668, 0.548755279475997, 0.6972483283782325, 0.5405526826393892, 0.5702870291787332, 0.5604452926636136, 0.8775616095890955, 0.5547604875798086, 0.9288498396486355, 0.7929958510215627, 0.5165500036214319, 0.7493135463576486, 0.9128518108152763, 0.5391167419318812, 0.7758526799383929, 0.5979175154570164, 0.8324411066871319, 0.6955009235131246, 0.8353565145616988, 0.5583970915153653, 0.6246277528574047, 0.658165290573093, 0.9658733772157253, 0.9970172866288899, 0.9643499772083313, 0.7086216763051347, 0.9674704136273212, 0.8812205085329092, 0.9407996990219705, 0.6164539435698835, 0.5166352612633298, 0.5179434207604656, 0.9128181879455679, 0.9758510387495614, 0.7714645943910674, 0.5590788368934271, 0.8745966460188811, 0.5215744957245225, 0.5652286814475121, 0.9564788864343992, 0.6001857714498047, 0.7732955996826758, 0.9814255668790163, 0.999271698144587, 0.5477773645221391, 0.5457958958629365, 0.6868796714030767, 0.5939036706916387, 0.8727303445158416, 0.8376097814268002, 0.7894233789683307, 0.5677519210246667, 0.9046205949615576, 0.8354268340467257, 0.699410163835237, 0.6731948116649958, 0.782808322579419, 0.8551355011135253, 0.6324250635093784, 0.9099590410718117, 0.5869396485733447, 0.8129098252384901, 0.6015242541763147, 0.7059744820188487, 0.9913205461988964, 0.6113405600639912, 0.7775835725688236, 0.7780537879397607, 0.8276280406774343, 0.58861235859619, 0.5202134217780113, 0.7430758783569642, 0.8078890651142052, 0.9235228412257859, 0.6150857659091674, 0.7912504179267946, 0.5331306435566006, 0.9998403134621587, 0.6159419731343374, 0.5710696246643482, 0.7956652459353322, 0.7290588477705446, 0.6691366117180102, 0.5161619811543678, 0.9731593784145353, 0.9800212671553763, 0.611240311808702, 0.8826972920788424, 0.9583379585638856, 0.6103494910837314, 0.7875736457564981, 0.9191454373140793, 0.7691346712023854, 0.5666616641751565, 0.7825068649680558, 0.5964301159364958, 0.6027110419317641, 0.8969295993337005, 0.9404113937773431, 0.7076902655939726, 0.5336749036549899, 0.8039759080817919, 0.9559939364215067, 0.5232872322766052, 0.5185596178904011, 0.5913550389225415, 0.8962355445807508, 0.8672791674349005, 0.6852795527964132, 0.8379703749288215, 0.510326025163278, 0.6663671144822159, 0.5234154647239826, 0.8454893944919539, 0.958487237266699, 0.5842478659323733, 0.6821088146594524, 0.7022017720029623, 0.7060893524887042, 0.5346808729558372, 0.5523668020470565, 0.9402228722307693, 0.8278056194361973, 0.643418402810708, 0.833804735242437, 0.7488982091706434, 0.7337411960049425, 0.8690506680973358, 0.9676526901687111, 0.9027121279064009, 0.7315177618302221, 0.5532288055816261, 0.7992635100682606, 0.972747858864986, 0.5918298117405935, 0.8141987309322664, 0.7388967815693757, 0.9029551357246939, 0.9982963349356866, 0.7415974516920774, 0.8251644801471407, 0.6780898662867214, 0.5258611720441485, 0.672576362210121, 0.8508511679453843, 0.8224617053325503, 0.9913133443709015, 0.6966961759409358, 0.7389570054783023, 0.5947672168663795, 0.5383205828860795, 0.7093826628738054, 0.8260021188635265, 0.8829540329748069, 0.8347796912065865, 0.7687633059144882, 0.9881243061481947, 0.7288600492151185, 0.5216997156966923, 0.5292358689919688, 0.7221194881675207, 0.8310981116287686, 0.539922469973896, 0.580884190695206, 0.7094873007585457, 0.9901893683023507, 0.7866978997771013, 0.5423416096636439, 0.5376394769059611, 0.5327198527968371, 0.7532635071778138, 0.7838854866994684, 0.8326857604427058, 0.9587054937152708, 0.9379216763437832, 0.8598096786168932, 0.5410166808906138, 0.7115332097819302, 0.6694439051190646, 0.809438344045563, 0.9953440375390272, 0.6600376891834856, 0.7723536884480755, 0.9904983434522778, 0.7646423921237215, 0.5423673485323701, 0.8953445775668241, 0.5558104350428221, 0.7057881726136708, 0.8211317570442884, 0.6154202147379628, 0.9976569540277123, 0.8629717992902914, 0.8302690633192458, 0.5112216811527908, 0.7667559696121349, 0.7614799164070024, 0.5031500320661184, 0.5426648690810545, 0.8544673390611999, 0.5661721199655381, 0.8403196909141717, 0.7680200614976203, 0.5785604879301338, 0.7648134423235893, 0.5720973568620809, 0.7137209902934171, 0.5077178556289288, 0.6121433521936925, 0.5235101144757757, 0.6646710941309257, 0.9998418170272887, 0.6501893619445431, 0.5521057441567779, 0.6649858381848011, 0.6688524785839052, 0.987401997070339, 0.5082699752878421, 0.7396692379629951, 0.6579254176441987, 0.7592842307201142, 0.7611171399787091, 0.8705482464502152, 0.9530093657045312, 0.606727215328323, 0.9988264677624188, 0.9502648971233677, 0.5276325987367112, 0.8380060063444315, 0.7755011922736453, 0.5782220026652908, 0.9108855510075851, 0.7485023670173184, 0.9425371372835152, 0.7358691038588925, 0.5005989246859539, 0.9979358348622916, 0.9897543137988786, 0.8354712305813945, 0.718245931051074, 0.8309315679409526, 0.8436410098821344, 0.8530722455253272, 0.7719487159882039, 0.9690170032697014, 0.671021706469261, 0.6531084984646491, 0.8986444157127755, 0.5952109170484898, 0.9266027077207505, 0.5501171827345471, 0.9071891450359043, 0.5221346158125104, 0.5100445048774027, 0.8547068435358622, 0.5860071613456828, 0.9965810400484296, 0.7280731177148969, 0.9525373220392874, 0.597503667004679, 0.9735509473174089, 0.905622528164987, 0.6838081032547796, 0.9884006048265183, 0.9587206339231886, 0.8627517429932822, 0.5992931618443897, 0.6620377290906045, 0.8211092116709344, 0.7564036268969486, 0.9033947037729173, 0.7419312140012713, 0.8446349710605575, 0.7311606869851413, 0.6406057493069021, 0.6967493661526842, 0.9840246435072448, 0.8256538517253557, 0.5196183069991808, 0.6705094730371726, 0.5520310270815025, 0.6704820721325644, 0.5290653483402443, 0.6956644209837355, 0.7497663729764641, 0.5053419744811078, 0.8682390366686106, 0.7693940870495992, 0.5729442871981074, 0.7020055547306744, 0.7926898581752562, 0.9702294563856768, 0.5395555262510389, 0.9026906633182077, 0.8089708979900112, 0.7150276984935444, 0.5120221761748183, 0.7237346727973915, 0.6246919286098005, 0.649527388761302, 0.5242731986456686, 0.871116946108252, 0.6925648800288089, 0.579744794852836, 0.5706331298449248, 0.7700912370710087, 0.9725342126882011, 0.9912460869540975, 0.7348808111040084, 0.8913975366537605, 0.8263671452578716, 0.8540427348005138, 0.6528597324709726, 0.5721996495639436, 0.6087310473648453, 0.5486520287829619, 0.7322177732715769, 0.6008303964532025, 0.6643336985727513, 0.6786601803747804, 0.8906553056210949, 0.5489562167924756, 0.5306638739700216, 0.6969396968064366, 0.7318520943766366, 0.8752731706469579, 0.8824021696665169, 0.6165646781055327, 0.8157745664978426, 0.6124775120451142, 0.5638157144205753, 0.952070605675112, 0.8477867808095931, 0.7818077020191376, 0.994712378914639, 0.6355368003067908, 0.8482534250296523, 0.7022840276823501, 0.5232198893010139, 0.7107881820503854, 0.5219915420102912, 0.7659794515912357, 0.5517249608113818, 0.8334674403094858, 0.7142306916576487, 0.5072478432112395, 0.744446059658029, 0.619401620779999, 0.7608866889156004, 0.8840092780582165, 0.779658891382057, 0.698003224731965, 0.5636556926147398, 0.9904864134178069, 0.5725630051155381, 0.771199583835817, 0.7112873884984945, 0.8095475768349332, 0.657578025803269, 0.5973930847559845, 0.50368817198165, 0.6304890164012826, 0.5507398373464318, 0.6558329897246435, 0.8365144122574465, 0.5365814541046274, 0.98795946684114, 0.8753359666018807, 0.6480594652491787, 0.9813884491600133, 0.5886692837311155, 0.8306878010740196, 0.6920224690480686, 0.5598957355345964, 0.5032869516834084, 0.632137368018487, 0.8642687380195253, 0.7848542524769107, 0.543409921356916, 0.8541113711868522, 0.6212804901069388, 0.6820323793519726, 0.9828024433944449, 0.645034432459828, 0.9652286754538499, 0.6985505720426651, 0.7940430901171184, 0.654970371280108, 0.707576789777031, 0.9376146357888093, 0.9575276126341108, 0.8316929039180564, 0.5485456765422512, 0.9521623472995103, 0.9019071370224929, 0.8177932523410957, 0.8699021901867977, 0.5711474520374467, 0.6704076237808965, 0.8763480028989077, 0.8823354737820768, 0.6439554370816003, 0.7656028518258986, 0.5159621858929357, 0.540633944214711, 0.6036367828009088, 0.8496723216215671, 0.5095530395954377, 0.5286293340269403, 0.5777044290759314, 0.597837923141768, 0.927572786407624, 0.59906541746645, 0.6369050942036574, 0.8267797272846056, 0.6322304083112784, 0.9021363373367484, 0.928191407486244, 0.8335517570445405, 0.6358510987606121, 0.579494216139647, 0.7136873401657953, 0.5340102620356136, 0.7291365247424416, 0.7232156158805645, 0.5208097078245765, 0.8364643212684912, 0.9958393066571017, 0.8727592760095915, 0.7608532222956264, 0.9787666352730775, 0.5898841246531974, 0.576894047935407, 0.9100794097359889, 0.8049153274469875, 0.7149768928355247, 0.7536379553735504, 0.9549126188684471, 0.8284858599974916, 0.5056627925989371, 0.8810333251129306, 0.8330780857103399, 0.8816872886696852, 0.967645622080255, 0.9068400478228867, 0.5547034989244839, 0.5995822515019352, 0.7134550476707819, 0.8845851182173459, 0.6165609517593852, 0.9518160955995485, 0.582667242728704, 0.6895294080407022, 0.9782077482204258, 0.6729411429781098, 0.5946739649523658, 0.5534905120043028, 0.5926065460025096, 0.5775527785222554, 0.7554955721844148, 0.8922331418859993, 0.6654235705394828, 0.6957299414315903, 0.8513195646000642, 0.5626800434529171, 0.9356934296390194, 0.5926392941645828, 0.790279539563351, 0.9270033769090285, 0.8571172433435452, 0.9175308639511615, 0.5727635305703167, 0.6647072966614567, 0.7673104459976183, 0.9997032262338619, 0.9552637149545722, 0.7672561257770038, 0.9370790280272674, 0.6603569790150688, 0.7760415783677599, 0.8337241265025108, 0.6232564170953243, 0.6717249491099884, 0.6795389590318754, 0.9020851384966803, 0.6446266633870373, 0.5054073351861661, 0.5553146144438283, 0.820817835937012, 0.649057636597102, 0.9391356306491128, 0.624853512224377, 0.8470875382236442, 0.9836458742047853, 0.6910217111713817, 0.8315356484560728, 0.8094657256662611, 0.5999296919382562, 0.8788268327294312, 0.6974726640346522, 0.8260574808459669, 0.6170704670562985, 0.9009237386160757, 0.7519357639548991, 0.6622245028000371, 0.5893403691607935, 0.5850611598629863, 0.7410979883575154, 0.9765220926185643, 0.8707510704669379, 0.6101580094165033, 0.6426409419528117, 0.6883108083847771, 0.9059194922390521, 0.5685435646968946, 0.7510875103558465, 0.6596230680446993, 0.6581885061210577, 0.7515603199490287, 0.5161355992032137, 0.5442076196694906, 0.9578212299221378, 0.9866490146016067, 0.8462962683899731, 0.7985744963741033, 0.6101052614593887, 0.5548269777122226, 0.6521988122897456, 0.538312053094505, 0.7124677835953608, 0.5605862295940174, 0.6788841995120267, 0.5616430407837305, 0.6635471360328686, 0.998303203587162, 0.8348051031235129, 0.5589642757984701, 0.6534729808412474, 0.9388782543313676, 0.904116526590391, 0.5050888108361745, 0.9090242096357319, 0.5238189518528851, 0.8669769541201715, 0.8308409600814213, 0.6531533993863723, 0.5355082355897787, 0.9223302003784886, 0.9800913682987169, 0.788376622473859, 0.7932543621926617, 0.7616974409191077, 0.9071264327023645, 0.9843901989285879, 0.872104721121119, 0.5103824081345156, 0.6242711971115376, 0.6001389033735195, 0.9674509224965298, 0.9402603989183256, 0.652596457713472, 0.578511865193585, 0.5853383690900044, 0.5263060986525849, 0.6825265420646927, 0.7215675488839999, 0.5727468929951647, 0.5621922329145819, 0.9342687440853166, 0.6737721725081731, 0.6282353962757155, 0.5381908579329275, 0.8079400256860146, 0.5127361155755544, 0.6871069105218495, 0.923291788570405, 0.8951619611030006, 0.620210632481955, 0.8533121876574186, 0.8595137997743155, 0.8229125933043424, 0.6569171485860299, 0.5060578265600846, 0.8576954532363406, 0.885159065067173, 0.7139469562182688, 0.7903063406087052, 0.8216468276618235, 0.9115924090493897, 0.9605627073723234, 0.7900429263786974, 0.8220870302380987, 0.538414986652229, 0.972282221230911, 0.8875806842076017, 0.8234674026283192, 0.6340675609525033, 0.9523129709685824, 0.98179118733316, 0.8805569222035294, 0.7214453699194368, 0.6465604660300701, 0.851588956179927, 0.8448337567908875, 0.6812859613981013, 0.774261619799534, 0.6222444911331972, 0.7794777837776552, 0.9571331611686583, 0.7680953254622377, 0.9304444903454541, 0.5133112765746173, 0.6533575074461776, 0.9851995257217653, 0.9843886828903237, 0.9579010552866054, 0.501686115148466, 0.7246984685330893, 0.8908549503969345, 0.6816004307172409, 0.8063512130321764, 0.9818822878001947, 0.7735637819000518, 0.7996211577244194, 0.9992319736844131, 0.579028022713308, 0.7882402542029663, 0.7655261852247957, 0.8577679640347137, 0.6245161123296095, 0.7509496836846314, 0.5342456099791812, 0.7138146837266535, 0.888433705024551, 0.538324166209071, 0.8103457952288217, 0.7331969562944413, 0.5301490519470201, 0.6434950758567091, 0.533319771251413, 0.550756952002696, 0.9639077145409072, 0.5491807417960133, 0.7050143159618723, 0.7915204376837851, 0.8651805740298247, 0.8136707199678522, 0.8500698766889647, 0.6921911872527557, 0.7974125362742398, 0.8548894333929179, 0.801616412624465, 0.6498544571792189, 0.9757278606714257, 0.8843214093720686, 0.5105120501985518, 0.8847649081652083, 0.739964259091572, 0.7180511885496155, 0.8954361770191783, 0.795109469914664, 0.7365977104952317, 0.9152639354507309, 0.7303240819029043, 0.7114673566400596, 0.7145556350163136, 0.8726613231888889, 0.728648342031144, 0.9432796220911278, 0.9222637305461923, 0.6353399249511604, 0.6218912890852792, 0.5488022621616773, 0.6059107833667972, 0.5915141836696376, 0.7801784119150919, 0.7559307171799887, 0.7886331349221725, 0.9886579261836441, 0.8410290479544924, 0.8922721108187348, 0.6870668973095722, 0.9029404049390932, 0.7009629047788222, 0.6965777304078158, 0.9276824742612253, 0.7578641258859635, 0.8919399989080044, 0.6772121646193516, 0.8571207153047107, 0.8964708972238684, 0.7614918025825961, 0.8968243588244226, 0.9533869839746159, 0.5610080060793354, 0.8640868706937148, 0.540481741547861, 0.8825377431612267, 0.7438745747558106, 0.7136696807979948, 0.8333049982732375, 0.7328803454059967, 0.7267187061101474, 0.8574551195662727, 0.993302233936264, 0.6910465877663989, 0.9230730638957423, 0.9326439880619973, 0.8195005536798272, 0.6065791332353253, 0.838942019032148, 0.7749393982539173, 0.7588201632867111, 0.5480783033940831, 0.9562778826160134, 0.9097785835761123, 0.6627721067766197, 0.7294558129100703, 0.9338258250122222, 0.7574063442995986, 0.5012533576059461, 0.7652898404157779, 0.5569704157478437, 0.7964662029193508, 0.917010383165403, 0.6508531643630384, 0.9093421016547275, 0.9152616577864007, 0.5350487191383109, 0.8034929449197665, 0.6384697514276416, 0.8297273466713471, 0.6556056119158978, 0.9766866330911438, 0.5657628772157759, 0.7793652220576892, 0.7994091959605908, 0.5103594681005466, 0.8543086429453053, 0.6400132763808298, 0.5256896626799148, 0.9130871700068429, 0.6907521621009403, 0.9546835597181678, 0.907244554614394, 0.6858117237743886, 0.569947735702984, 0.6066201726133085, 0.5427958656689909, 0.7677224974744964, 0.9539331887370479, 0.8435181628500059, 0.9524901757734264, 0.8132011016110363, 0.8025800107427693, 0.8874404585967931, 0.9351901015764279, 0.6808294911667401, 0.5111758781431768, 0.5304917420752746, 0.6280643037031535, 0.9014927515888936, 0.5417519823861956, 0.9482269821693561, 0.9293809850377861, 0.5808543578992791, 0.8044983480138808, 0.5607375715582654, 0.6465806105509494, 0.6465101515996563, 0.5610070722541084, 0.7048241152694564, 0.8941795262884822, 0.5444631369280646, 0.9103139746863643, 0.5339095493398074, 0.906230679424161, 0.8680296294731344, 0.5428966957841819, 0.6590031123561226, 0.9505537358539932, 0.777664195224042, 0.9612671631393708, 0.7285977802994356, 0.9632070484650526, 0.7566776880012273, 0.763591710539762, 0.528991661235035, 0.8269029185058464, 0.7905298686627067, 0.8427575639569498, 0.6709942382061552, 0.8072384994589372, 0.8401279934407279, 0.7276438838315028, 0.6133936012801839, 0.582334053303356, 0.7778446579840537, 0.5028125247415289, 0.5555207829015503, 0.5193908530103206, 0.5468016212055538, 0.9247036742963426, 0.8229810486794309, 0.6571327131445748, 0.6450007790582494, 0.9782144475427158, 0.6322475131761318, 0.7767322542412443, 0.6615291554983589, 0.7428946102229751, 0.6980265221812592, 0.5085658424440624, 0.9627102560906747, 0.7203667695928575, 0.8518631137483043, 0.8460572012700961, 0.9620410804425532, 0.8111672640050447, 0.6449476045694122, 0.8953882977734902, 0.5581533249247536, 0.9498264851344428, 0.5266883592394183, 0.7898241001822544, 0.6565171227515494, 0.8002728361831293, 0.9867974898021481, 0.5059249140632137, 0.7646429586117223, 0.775537131871114, 0.7172868737336202, 0.9420196225209746, 0.8913465557922616, 0.8470927843356428, 0.5872653268927435, 0.5205178134733616, 0.6080579611815935, 0.6969589638134923, 0.7406452897530496, 0.94082249766497, 0.8060831705864255, 0.7137706435134812, 0.9749782294632803, 0.8121643082152619, 0.9509254383097441, 0.6678509135115185, 0.951632676716292, 0.9037113960735759, 0.7222910569583065, 0.7115209067580774, 0.9429994388994642, 0.6838079862461883, 0.5107436398301248, 0.5426109124967611, 0.6955363277407676, 0.7350891185460983, 0.8353317079574214, 0.6268104391300019, 0.5429079823301421, 0.9178837866181553, 0.7299884223714808, 0.7613356762567625, 0.5367576163007177, 0.8662062520372125, 0.7922356188039945, 0.5518885545636891, 0.683927507343628, 0.5441264949272474, 0.8495545145732757, 0.8845558329912178, 0.5820454192154167, 0.750344137493275, 0.7601492972875652, 0.7046100243288105, 0.8065862098128953, 0.9973888619978657, 0.7933319613107879, 0.5822164868153235, 0.9098910963111189, 0.7091410075690023, 0.6598550932829986, 0.8533964301159771, 0.6026518691014564, 0.8496495115137951, 0.7221349818938889, 0.75386583082754, 0.558814132934897, 0.5122962547556964, 0.6195730250248084, 0.7500713041222916, 0.6503463044624753, 0.9839633664731064, 0.6668811183251492, 0.8702455580133313, 0.5117403039803297, 0.6879301643445762, 0.5267608446110068, 0.5948284685286683, 0.9455375300706921, 0.594007447011319, 0.9177307066176188, 0.568372691382313, 0.6045389116558726, 0.5686095005604939, 0.7372043086479516, 0.958753783146113, 0.9995682544078902, 0.7669565106042531, 0.7227435709245447, 0.9372402498569765, 0.9859015961108273, 0.8456893445788589, 0.5452760603625855, 0.8896858082825754, 0.744516125635478, 0.8052262243668517, 0.6789003960874793, 0.7417138191516387, 0.8588865400272838, 0.9047432148826136, 0.839849289093474, 0.7839181822028423, 0.7198708059227932, 0.7215081023146168, 0.8660136013730155, 0.5182594485976436, 0.7615944825484666, 0.9605137689454769, 0.5688734644067419, 0.7698074287732297, 0.646770472486207, 0.9904966398246253, 0.8089136604140819, 0.5543626030370066, 0.6356736582732262, 0.980060330887695, 0.8329867729494393, 0.8933906536031965, 0.9123218814055121, 0.8103794284194754, 0.8740016333922963, 0.8569963958324034, 0.7645515931325699, 0.5026744753396295, 0.886010718325184, 0.6519080894594786, 0.5057818611683098, 0.9305014581954798, 0.5116824573974064, 0.6206709226637711, 0.7880380328880181, 0.7802865040504989, 0.7881911874647574, 0.6652927065957759, 0.6532897947290526, 0.9518920447293338, 0.8704287119972662, 0.7512900074992654, 0.5595654277798381, 0.6532308543856811, 0.6072364808779083, 0.5561149000395103, 0.7346866205504399, 0.9189562181429248, 0.5134384044898428, 0.8037863650494654, 0.6513336865520376, 0.7332051771431471, 0.9305392016723528, 0.7807542755005115, 0.6471025977699244, 0.6613720610448579, 0.8488048393261656, 0.7591449451615262, 0.5473749498552667, 0.659353372239504, 0.7501128466231602, 0.8921158871870298, 0.9246232412561082, 0.7413222419660612, 0.7725685431574073, 0.7007722681110966, 0.6028809887169468, 0.534936857989901, 0.6418930770901636, 0.7131049205787342, 0.6338598017727383, 0.9271876923370992, 0.8505154477904825, 0.6285793663513548, 0.5158442726418024, 0.7219835480735599, 0.5777288874960506, 0.5770344081133962, 0.712550217060247, 0.9258012834819578, 0.5470212456235917, 0.8327175586007081, 0.8935595562450085, 0.632917425407797, 0.7938356272932088, 0.861790907571782, 0.8244603153600332, 0.9765047410767886, 0.6135097313640283, 0.7930836789758808, 0.7587406185394259, 0.7290398568593579, 0.5695702592926952, 0.512007485645608, 0.850641780041559, 0.7039468561100315, 0.669453020785871, 0.8246130733495962, 0.5126534990159963, 0.8603687146411421, 0.566437779794043, 0.9583308180571009, 0.6915227413244163, 0.8012624080115516, 0.8046333881101224, 0.5498263213611339, 0.8906998597189402, 0.6696409071765992, 0.7173553222233489, 0.8012717963023344, 0.9241507267008292, 0.655918565991243, 0.6121072984995225, 0.5705446339975976, 0.7480628681539891, 0.8413678512703304, 0.8717643110476324, 0.526633062303042, 0.7136136234575485, 0.5939557187546696, 0.895085960700194, 0.9884714919599248, 0.8552931612854361, 0.7732801753723708, 0.8917814247841034, 0.8228010733219092, 0.5503739282727851, 0.7470864417724862, 0.6607404438284372, 0.9770010062303245, 0.8202752741905701, 0.9704329023948983, 0.5021667943444039, 0.8319880361753019, 0.6868721476235784, 0.6812927777556519, 0.6083645745193917, 0.6947703880392634, 0.7308728497361827, 0.6775534004886755, 0.6168382159228669, 0.8923323130029811, 0.596896642045116, 0.7365795464184259, 0.9376125219274343, 0.684612889471937, 0.9211278183087523, 0.887050253861341, 0.6140649688892725, 0.8851578349605219, 0.710056870026461, 0.557272796827156, 0.6531699927386665, 0.9842373937564374, 0.9542239290448282, 0.711333815512398, 0.6966332374208628, 0.5937393802996502, 0.8219140878951707, 0.8874926865708996, 0.8003897352359943, 0.9700034324966558, 0.8774583050995337, 0.7590052673131591, 0.5898093037381278, 0.813157792884277, 0.6272462322193101, 0.7510590018267292, 0.5838584727498992, 0.662674313071618, 0.9289504013224111, 0.6279763476258218, 0.5466245446700597, 0.5350691667377943, 0.8295641651047114, 0.99676886230547, 0.5110112275712559, 0.6289229723447592, 0.5416954504330105, 0.8163029668931658, 0.947650947086523, 0.9419759143782149, 0.5689496873607234, 0.7105412755490714, 0.8255787301867145, 0.5657934277554155, 0.6640876549849893, 0.9181925784835134, 0.6471717106401831, 0.9336250848558023, 0.6631851425188939, 0.6809765715920693, 0.5830412688176121, 0.9756791597200682, 0.6736462122354796, 0.6109328402666664, 0.8959821564559258, 0.7313692162536718, 0.7233559855058823, 0.8117735024750026, 0.8721884450020783, 0.7848020881409047, 0.9082114290114849, 0.8776908190410937, 0.6697369296887477, 0.8695026414728927, 0.6515935986039771, 0.5853189781862089, 0.9061434738688354, 0.5023343437853451, 0.9301072564684578, 0.911825975640143, 0.827090067391119, 0.6608868436370343, 0.9433218588720702, 0.9462546733125521, 0.7251442803179029, 0.7840707836638406, 0.675470293894199, 0.6527317018424826, 0.9929384030883537, 0.7892890358363867, 0.7439829329386353, 0.5888205335822098, 0.6430369079715337, 0.7190616488748076, 0.786566269853608, 0.5711783602328055, 0.7910520672201329, 0.9165731481522998, 0.501037720625555, 0.7649214007497965, 0.6900848564956432, 0.8817959157390396, 0.8464801254732787, 0.9404360584152998, 0.9473622665244982, 0.7608625390764505, 0.8741444664355811, 0.5767301453783016, 0.6466476336513582, 0.6887405348401978, 0.5084471547085309, 0.7839175908135848, 0.8318872895369673, 0.5087402556314746, 0.5338028311916865, 0.7772467859803067, 0.6374356540489805, 0.8058402892744163, 0.7868668546515437, 0.9116588107755423, 0.8944140535206204, 0.6898652396309617, 0.782583381454592, 0.9387261659436257, 0.9838852532985485, 0.8007918319898168, 0.6091135413503177, 0.8937029972651875, 0.9850795872760172, 0.9282498566849643, 0.7436377475516174, 0.5633575951975631, 0.7240543474174005, 0.7887301362603787, 0.5547218865384039, 0.9044204675834651, 0.745168103410485, 0.9212212626755949, 0.6319219588006039, 0.5942146759714433, 0.9797317743160543, 0.7371803076898676, 0.7010309895101516, 0.9116705680636575, 0.5753865206711999, 0.9627990894014009, 0.5151664079834648, 0.7589834196893945, 0.5499315928740864, 0.6743124009460874, 0.818326965892143, 0.8373815379208884, 0.7555138312153333, 0.9475134948890667, 0.6353183157773049, 0.568707493115822, 0.5423798738078092, 0.8142608851407065, 0.8347577347700852, 0.50719776049057, 0.630236596838625, 0.8774232324476317, 0.8680706369187703, 0.6079873731562597, 0.7605802889939908, 0.8837721695465204, 0.8479371959809334, 0.877254349607109, 0.7708415851967938, 0.8127037131761962, 0.8070511727232392, 0.6694161849718664, 0.5218858689155204, 0.813546102307704, 0.5376493047531501, 0.9850005089410067, 0.5314389185905803, 0.7007260056208475, 0.5475573713789486, 0.7405138222716972, 0.7683206071401596, 0.6482004660944785, 0.5504634354859742, 0.9899860683637285, 0.69321537107885, 0.5462984385575692, 0.5657773081778918, 0.6570223470706449, 0.7373724041253902, 0.6409356518846411, 0.678550425659316, 0.6308077056828112, 0.909572374642077, 0.5722535214429518, 0.9440398742435273, 0.7094908292438982, 0.8029947440543377, 0.872276881623173, 0.6972247270556122, 0.8856677746279215, 0.6397942607176013, 0.6669404114877282, 0.7152110910946882, 0.749984950863483, 0.7729628588877946, 0.9897892185178295, 0.906967079194462, 0.74226830551795, 0.9951637859572824, 0.9883162252620373, 0.9237130882602584, 0.869021035850053, 0.7877513443039574, 0.9792666256619228, 0.6034127251838033, 0.8283077061137918, 0.6277127238923816, 0.8370079900526881, 0.5608758100567972, 0.6070697067297814, 0.5178784886864487, 0.8166956213551253, 0.6429796748807823, 0.647894326337578, 0.5931766276608604, 0.5311256891550531, 0.6860981231540011, 0.7256826587848972, 0.7669980998290005, 0.7776064084883344, 0.7891099729891011, 0.5327163246279008, 0.724888957686872, 0.7940730206390794, 0.8820026012248747, 0.8873771796118954, 0.6677798644829387, 0.824789831829744, 0.7927998301688972, 0.6576156793720515, 0.9887343651572733, 0.5369695304558981, 0.6843811586183981, 0.8869035086557278, 0.8369655372375342, 0.609206776207533, 0.851809112299476, 0.9204757706207348, 0.5938946168119177, 0.8812045254743566, 0.7622154466787567, 0.956728044253969, 0.605219183626835, 0.5742323000272022, 0.8822011598451273, 0.7501409005709592, 0.5267865673802704, 0.5251883511124622, 0.9748968451160365, 0.9894887884128656, 0.552051290179154, 0.8867803648789463, 0.6158583652344192, 0.5487754989173845, 0.8415256442645975, 0.5659471650649408, 0.7866772672944762, 0.7589002242300122, 0.5096918860732762, 0.5157199961427952, 0.9392641088584852, 0.5604511991891808, 0.8131735862115715, 0.6250191335482461, 0.7416531902175976, 0.8123845859803144, 0.8064190958812057, 0.709547610129746, 0.8479897559932104, 0.9763408490141828, 0.5010676745092387, 0.5561389229614011, 0.587563511264757, 0.6111157555546718, 0.793721390824974, 0.8184551132900549, 0.8032731453538997, 0.9798962316786053, 0.6593800779666479, 0.9016885022236424, 0.5075060782622981, 0.992291788676612, 0.7075733027990916, 0.8349894197583545, 0.7661808847779157, 0.6757812890928098, 0.564873710884741, 0.9378492973021582, 0.503922237293581, 0.6193495146083964, 0.7006721525170385, 0.970011053772269, 0.827566017611139, 0.6176101459467738, 0.6826696190788826, 0.8338549003289566, 0.9287751622738138, 0.8626900901859718, 0.9246949836733015, 0.6917998425127094, 0.5370834070485202, 0.8722695108094249, 0.5704012963243781, 0.5819971793668192, 0.8890372474455475, 0.9975978878097165, 0.9945239463090676, 0.7244592394867644, 0.7172164229770058, 0.5102657733650777, 0.7545541145540697, 0.5299824120556709, 0.616507619124309, 0.6146283154626042, 0.9728695282621447, 0.6092921817844741, 0.6530802711788517, 0.8053061729636701, 0.6340180505328469, 0.7779747059373541, 0.6115396908841376, 0.7123558454314634, 0.8366179191489049, 0.7966225881653366, 0.8250670057693359, 0.7297682582978666, 0.5258425064964527, 0.9347254274174113, 0.7808596529391001, 0.997961113519136, 0.9861959243758252, 0.5853384810841176, 0.5982495663638598, 0.5329372795167717, 0.9957682487477273, 0.9162071788554838, 0.6566097920438674, 0.6704825521739533, 0.7203705771079594, 0.8489165740626283, 0.6626074043958661, 0.782771032254461, 0.6855575087987037, 0.7811138392220269, 0.9471879965628567, 0.6392146887174825, 0.6060210993345359, 0.7066146462154714, 0.9356710718748835, 0.8359926652523815, 0.8454220425172022, 0.6349787741340303, 0.5133109971799781, 0.7562332491761037, 0.9583184575076338, 0.807017107812011, 0.8648643798402507, 0.9271580966372135, 0.5720352213413324, 0.6512218821804514, 0.6898573733745021, 0.9956875107657595, 0.813271992403294, 0.680902398826012, 0.9484789549770256, 0.7566976444574629, 0.805627581944026, 0.7646591233823795, 0.5856766623276813, 0.5476389422195898, 0.6116176454978808, 0.6160950345200178, 0.8479151238703453, 0.5019064720992064, 0.797658592778076, 0.9063262809889723, 0.5432360062972271, 0.7882129911600481, 0.8538452339340372, 0.8391444274907944, 0.6083819324283766, 0.6063316007195357, 0.6315668099947978, 0.8579571671668755, 0.9764205135187924, 0.9493533152202771, 0.5132572945558646, 0.8293116281348594, 0.9694134161284206, 0.5393375065427135, 0.6539911080083675, 0.9650921659317315, 0.7774965862088623, 0.8268276904063409, 0.7214554465882934, 0.9570314787422032, 0.8431782516817655, 0.5217768240196899, 0.689981414645249, 0.5360740873837158, 0.6178002120014552, 0.9275976462639558, 0.6530464595872676, 0.8633160592045288, 0.5244803742413896, 0.9404234481947691, 0.9339968142377901, 0.9387418022643086, 0.570037459677692, 0.9543056981925182, 0.5961370211269531, 0.8621877029412341, 0.758911488063473, 0.8705520152725703, 0.5087031181798957, 0.5466813811781974, 0.5114387841980139, 0.8522260484936147, 0.7690682885049993, 0.7512156777370791, 0.9870820651615673, 0.9855820959508145, 0.5803416484531192, 0.9735750330487709, 0.9498810839716701, 0.5022574141951097, 0.7631031113307729, 0.785157182868864, 0.9943851195986071, 0.6861451566481647, 0.9385431060073839, 0.5729024815136241, 0.5152394731944865, 0.8745236833117918, 0.7058165797572198, 0.6924741715566627, 0.5690526853968654, 0.9861749865272083, 0.8764332485958162, 0.9675138446405862, 0.5734780259045618, 0.6430368830736107, 0.893509731737378, 0.6804569168327805, 0.594862591182822, 0.811207645314955, 0.7305893760570483, 0.7442410729666936, 0.7543857988781265, 0.5768911881025658, 0.6891070712117314, 0.7577300670796765, 0.7502383613732905, 0.9053317914290089, 0.6479223993564132, 0.8642429626658411, 0.666363404365649, 0.8094915059146496, 0.7587890510722595, 0.8060238185418442, 0.6894634693357, 0.7193809809015697, 0.6335233815288341, 0.8315432328252415, 0.9708781583964627, 0.8539081296245885, 0.5089661904274185, 0.9556448641936282, 0.5424277138033311, 0.5189682463413435, 0.7916514422876322, 0.5460810937289055, 0.5496458658179795, 0.7458507856769057, 0.5448228193857826, 0.9710826000993061, 0.8349972676545026, 0.953028041369528, 0.5173004369766653, 0.967788114390187, 0.6762446928905749, 0.7014497067981864, 0.7562696602727024, 0.7609363804540203, 0.6561840365305546, 0.7529553455997554, 0.9420485006147492, 0.7462053922252327, 0.664038501058948, 0.7187646505561467, 0.9859828621307758, 0.6095702590656464, 0.921576084725066, 0.9814947524846904, 0.6580876002318473, 0.5937127107639294, 0.6162747021181381, 0.7197821166624516, 0.669954173887971, 0.6665425812567989, 0.969057571742115, 0.7493687540829548, 0.8772051236542745, 0.6207072128686919, 0.8614137922338982, 0.9736746751522434, 0.8420149925724025, 0.7803152120030696, 0.7080244118652926, 0.8035865081083648, 0.6305099078216625, 0.8638057064895639, 0.8808445904480489, 0.7299133803629506, 0.5461047770816603, 0.9852466845993215, 0.5480899994659181, 0.5171619995991129, 0.5388657553232232, 0.9100557461911571, 0.8745198867304553, 0.6520169519377319, 0.9658783620502872, 0.7816363178846368, 0.9307903886129474, 0.9669090056703329, 0.8039602544844375, 0.9310768449412375, 0.8851003268378416, 0.8032093332592977, 0.6573212472782205, 0.7629950474542468, 0.723151531587463, 0.6816112522231029, 0.9473393749835037, 0.9468769895632771, 0.9627776740693825, 0.9387767939756986, 0.5936713502492945, 0.5756708241070407, 0.6535183570627341, 0.7918822915175227, 0.9476461314822568, 0.8919520545394368, 0.5697276886783493, 0.9752825384044824, 0.7327991853589048, 0.6017138740804412, 0.7785099850887374, 0.8383057435725825, 0.8363281081918077, 0.6032755483026961, 0.5489611592590151, 0.886208752462762, 0.6617429166338642, 0.6814907576302334, 0.5605891606224164, 0.612999077859176, 0.8559214932006816, 0.8146870869378227, 0.5649204795143467, 0.9104241098294998, 0.5012520408632613, 0.6508416484408592, 0.8345962887474092, 0.7927013291963508, 0.6032027289656978, 0.5242877545608238, 0.9499479715407421, 0.7632119143924354, 0.8997054070536585, 0.7199218350867927, 0.7769638063271176, 0.673664622933301, 0.9336331740737376, 0.5815651445975341, 0.8698356291049248, 0.641389482871308, 0.976390785582121, 0.6710780659190632, 0.8222738864105196, 0.7315338828235393, 0.5646360455442674, 0.7629878587509312, 0.8642557611415709, 0.8857995328006476, 0.544356031527837, 0.7523608035858547, 0.8444466725742293, 0.7220651419769231, 0.8217872667493402, 0.5112181507501916, 0.5289860447975308, 0.7737726024591915, 0.5894229127451346, 0.8096041577575513, 0.8083243161703924, 0.770437060682082, 0.8678367618548263, 0.8754392433930867, 0.6066899819420575, 0.8464129546188706, 0.7492920883584034, 0.7375811781192791, 0.6455197051971657, 0.8450412818703191, 0.7160450159171625, 0.65818368152516, 0.7074909655377679, 0.8601868295843214, 0.5019022386426111, 0.8776682436813759, 0.9862694723640381, 0.5054389275934129, 0.8728952255594629, 0.6686129273840127, 0.8565574384158103, 0.5756397799685573, 0.8145464671036072, 0.5237963397266737, 0.8694038309149625, 0.5825847884274101, 0.5938988262167408, 0.9181597065457554, 0.9355377100514601, 0.5903817398936548, 0.6598014148243897, 0.8548405640069394, 0.7371588277427037, 0.6233844129634063, 0.5672697993502486, 0.7967354937999716, 0.7685623545464084, 0.8607387905969035, 0.7538276214202135, 0.8508682900671064, 0.5939545301463107, 0.9412093314493664, 0.9253775094274372, 0.7138163347668396, 0.7685182305588578, 0.6315025656463435, 0.6894021304594702, 0.6087767130330033, 0.685154811893568, 0.6716551084769173, 0.866694343348025, 0.5780618128577103, 0.7359749400291251, 0.6933785856267953, 0.7451746269334578, 0.6959431589671348, 0.9436764085555023, 0.5517599998058191, 0.7603243874285308, 0.7844346235899513, 0.98525711728244, 0.852383841757073, 0.9614894851351307, 0.8366070536178315, 0.8927594279938016, 0.5144767098490031, 0.9228832413545427, 0.7057251208192423, 0.5642611263294026, 0.5987224096351877, 0.5234405858030418, 0.8010739213335465, 0.6404416611841925, 0.51655532345466, 0.7366165660721349, 0.6524399132120018, 0.6114523414679681, 0.5174029484294533, 0.6368211273504412, 0.6505099739338338, 0.902757039962724, 0.5456252579258822, 0.6144871643053393, 0.6348853957549494, 0.8620898795398495, 0.9088274371465985, 0.7278085709817803, 0.8929988104960744, 0.5535996186108413, 0.5631227621530077, 0.5450044792544193, 0.7775677216278811, 0.6528232885435183, 0.7960708968233567, 0.702871519047463, 0.7974808139232573, 0.5930192094068805, 0.7901008139599452, 0.888392836522464, 0.7699004022791114, 0.967097279349704, 0.5261073496110966, 0.6531452944983389, 0.7094990544866134, 0.9498576731652248, 0.9175348303597894, 0.7991050950499801, 0.7712236658007857, 0.7786877915482614, 0.6752536842715045, 0.7886456229859008, 0.6572304110882607, 0.5109190045339264, 0.8325554279310291, 0.9433112214627364, 0.6252753366708701, 0.8395704445061586, 0.7721562056562954, 0.96320515103124, 0.9378595313582005, 0.5973645327889384, 0.8298419755901894, 0.6626775641157447, 0.9659458866028616, 0.9174001153951066, 0.6610549541053627, 0.7968912099175249, 0.9083590631748493, 0.6159456238924985, 0.8475571182451213, 0.6245095440419435, 0.9996488845605775, 0.8590882046656994, 0.7989806924423702, 0.5373079369622733, 0.8388911117655448, 0.501235897251981, 0.8426889019625718, 0.6643720487130624, 0.8253421244215471, 0.8297830026857074, 0.5385901264107089, 0.6135520941711048, 0.665776171865594, 0.9774496273963835, 0.6132379972790591, 0.606537666619622, 0.751708236829548, 0.7089628055729399, 0.6652348750041357, 0.5610822170789089, 0.7518626899574457, 0.7835332928313751, 0.7578692037933854, 0.7963480432907856, 0.6677523793074862, 0.6628795811544835, 0.7811901664561836, 0.7691112379704961, 0.5712211815599333, 0.6878481708262062, 0.9600775020363452, 0.6858382448609142, 0.6389303157340076, 0.5053805120475152, 0.9279461423588983, 0.6682812065963162, 0.520581562080723, 0.855465560302031, 0.6928885057691756, 0.565691680729391, 0.7307317724817666, 0.5793142264986759, 0.553095561217064, 0.5219072800385454, 0.6484187342879437, 0.6952561529625633, 0.7705613121433678, 0.589225225524914, 0.802592300251493, 0.6192286890333344, 0.8242895020184557, 0.7608398904310684, 0.8018028421937377, 0.9995877350101303, 0.51156443409509, 0.9214886873379822, 0.6736465777495164, 0.717500594724495, 0.6710322673804106, 0.9839152727046391, 0.5508511129706546, 0.5013471679554677, 0.6119953229056664, 0.8441392835601245, 0.7797613371471621, 0.872496050380629, 0.8709148713613292, 0.9368754003708069, 0.8243470462664603, 0.8399138123615704, 0.8152673397840791, 0.6307720538286892, 0.509034530096339, 0.7025490873202717, 0.9345589055558043, 0.7242473474252757, 0.8715074760286813, 0.6048979904057876, 0.5905233911803887, 0.5889937345185075, 0.6809856468905204, 0.718121175077844, 0.5134121098087343, 0.8505676531357014, 0.751200439906326, 0.6980142924816505, 0.8604232996899853, 0.8885838813018087, 0.8477098946353266, 0.5054858387163961, 0.8830774502211949, 0.7813031599100284, 0.7786969407140178, 0.7982434172741736, 0.5337743659203132, 0.6878069314570161, 0.9385327499659262, 0.5606022970572467, 0.5888019644233096, 0.917487010838046, 0.6031947353958695, 0.8016959222666789, 0.6474820820676415, 0.8533733689810798, 0.8160680455592673, 0.6969532126559876, 0.9342709868152161, 0.6181190599076718, 0.7672481628924267, 0.9285281008605233, 0.5122408406524455, 0.5638445220588028, 0.5160573031266811, 0.6807406765128561, 0.6388136422081605, 0.888594362399227, 0.8334422179740105, 0.5746864538981817, 0.6538440605529732, 0.6829736053319115, 0.6915867502315929, 0.8055087921795455, 0.5367759820005091, 0.8107028311877645, 0.751956241575855, 0.5007213791158263, 0.8046859763193976, 0.5255254633294938, 0.9091190670048573, 0.8844975028832529, 0.5799642354941237, 0.6151076319652432, 0.8794479603792984, 0.5921772599502916, 0.836117102939582, 0.5108041852697289, 0.9341196099169937, 0.9282700249818944, 0.5483300776309996, 0.6261211919166452, 0.8620212026937879, 0.6735944081661303, 0.9714113068508148, 0.8461527944589444, 0.5772620898796974, 0.7868519361497417, 0.914140703951515, 0.6221495221755322, 0.6932739894316484, 0.5509176181460785, 0.9286322197311079, 0.9493060923686647, 0.5015098027200287, 0.793380897027937, 0.7133657198930335, 0.5836990695977246, 0.8018003527691493, 0.5177635123307891, 0.911705689943328, 0.9015368692714274, 0.6238503826660269, 0.566967355569544, 0.9704155581948236, 0.600480602688003, 0.631798872431127, 0.7368626765080407, 0.7015731139192241, 0.929768236050138, 0.9388923819080832, 0.5724402764067487, 0.7454353707452673, 0.6956402561813937, 0.5297370928560563, 0.6437376807160791, 0.756838584703617, 0.7559816628308875, 0.8317803193343645, 0.6120530609769966, 0.5510832682394693, 0.928966079487548, 0.9255631818251926, 0.626128982240395, 0.9213097699703043, 0.5538005283196605, 0.8555879439081491, 0.9201818191102048, 0.9159249361811317, 0.8837585671302671, 0.9386832588863356, 0.8577559991958468, 0.7901978998810116, 0.5541805653707006, 0.8965555875282096, 0.7390347804659562, 0.9851312022215141, 0.7511674066054992, 0.6264422163648103, 0.728961028631536, 0.8137746081324553, 0.5044998276806261, 0.742243832507277, 0.7214184087655968, 0.6599227540072539, 0.6116160496864853, 0.6194547321996857, 0.8458126455027679, 0.6420633011684469, 0.6929639798383045, 0.9653143632208374, 0.9606292384452269, 0.7581482659165493, 0.992023056964487, 0.985273930839361, 0.8703384980440904, 0.8175597134301262, 0.5828885474845455, 0.6330638197342935, 0.5747670604743208, 0.670064053650357, 0.8826733117345282, 0.8092224995472892, 0.9478206189568852, 0.9477050036220112, 0.6969892320201548, 0.7148021024973035, 0.7976030519391205, 0.5874811840808136, 0.8443747367089843, 0.596473195105654, 0.6285060948435262, 0.5004943821854702, 0.7490579532725661, 0.8877799254866405, 0.8855964359155337, 0.5407014930513949, 0.6811109345552947, 0.7886532611249177, 0.6335738044566555, 0.8263165667684316, 0.7024729374266723, 0.6208172857403329, 0.6907202404145308, 0.9643565246313923, 0.9729453478711158, 0.6427132235654545, 0.746564142633618, 0.5389072172560485, 0.7230921532607519, 0.6552343056234133, 0.697140316217189, 0.5580057690705299, 0.9189763500075185, 0.6063313421907043, 0.6420754948998053, 0.7702259922962013, 0.5013571979199122, 0.7795897258389027, 0.5730214703501864, 0.8267790954735772, 0.9321243065062902, 0.591901530879759, 0.6055147107296583, 0.5880449687590721, 0.9720502187839108, 0.749935972422159, 0.6052481658269439, 0.6058785646334506, 0.5041030785477765, 0.506497686146006, 0.8076331237650319, 0.8843973357750333, 0.8370880759815332, 0.7650565509012506, 0.9144586803786506, 0.5357394442484786, 0.6320924058358783, 0.9739157585712177, 0.5582117313188879, 0.6149716705348067, 0.9117257233444466, 0.5826668666052179, 0.6743784478815902, 0.9599321492245588, 0.6997518535478318, 0.6267034434195902, 0.5516224676508501, 0.6413222443466877, 0.6997684682707243, 0.8256339611808442, 0.5958903109758383, 0.7059882362727328, 0.7616077919197625, 0.5845411052554106, 0.6896296413033813, 0.5822665162036131, 0.7381379411126574, 0.8954905304521689, 0.7556448880078701, 0.9003973482811316, 0.9563574532841663, 0.6850658958836966, 0.8652728681189863, 0.7570214285695176, 0.9391050209576499, 0.5220966667382576, 0.7173020942067909, 0.5673666614321926, 0.5611694409008248, 0.9718855337186383, 0.5102754318347043, 0.6123835016437795, 0.5527731768653095, 0.5785519184523429, 0.5433290833960813, 0.8760998861594573, 0.915798586642016, 0.9474586179233484, 0.8190359594785002, 0.6647525609708816, 0.5510702521035159, 0.6918583896912626, 0.9375744082540658, 0.8780330285565219, 0.6100214820359235, 0.920220946158645, 0.5639754104405943, 0.8647799428264534, 0.8302938788179355, 0.5127144461107516, 0.7481837740391727, 0.9195704407436562, 0.9805891968472803, 0.6188841547521109, 0.6022554617446378, 0.5810540260549937, 0.6485107568527454, 0.6589491456874057, 0.5779336037180197, 0.7594860186902188, 0.9251955467610911, 0.5873865192058232, 0.804312192529792, 0.7718518143934143, 0.9260460741492134, 0.6581396635417122, 0.8434639782460439, 0.6572803685543311, 0.6543860505791439, 0.5510814797640347, 0.8258060206612332, 0.6067105171240676, 0.9575210883786062, 0.6066622244899275, 0.8708224600629151, 0.508110462365931, 0.9510956125844924, 0.9836752671038655, 0.8546300043919524, 0.6215894924637837, 0.6096913482013657, 0.9782456490604248, 0.7858490946072669, 0.9549644919506846, 0.9969689192266706, 0.5600840244233323, 0.8210507077042508, 0.6256980746133257, 0.8523787419649629, 0.9895793973884484, 0.6065575361545119, 0.9533799544381852, 0.9865964267442663, 0.9279537071962303, 0.673421391667282, 0.8936284859520507, 0.9371471764091437, 0.7419218898975002, 0.6278808837024084, 0.9099294203038051, 0.5068962831986403, 0.7269850085267517, 0.8951567705507911, 0.9159295643746219, 0.5897832149445317, 0.8934467544166496, 0.507079037264134, 0.715632499694931, 0.6864027783629995, 0.6237707285534551, 0.7684867581489764, 0.6470475751332234, 0.8789081868074472, 0.9189618875973423, 0.7775565315509093, 0.9195712294298821, 0.5857505465205226, 0.8078522766368144, 0.7423703421529521, 0.6680047934895976, 0.539469808466599, 0.7165981228210017, 0.8357589852946894, 0.5312748069961071, 0.5709170622890836, 0.9836245538556919, 0.8861722829859138, 0.8221809128355708, 0.9478365589859576, 0.998152505944369, 0.8651997649230234, 0.83871877186633, 0.9590498699433501, 0.5318545553936941, 0.6278813755318908, 0.7715208702479037, 0.7349614239340654, 0.9513208643239068, 0.9553776264727101, 0.690566130917998, 0.7289353204141474, 0.9806619553165311, 0.9583826353997776, 0.9755718249464891, 0.6928223799810977, 0.9613036188085531, 0.6845160343884907, 0.5984766368545067, 0.6364113834862108, 0.7815713810985083, 0.9805835544781065, 0.911473938270078, 0.9650621212380448, 0.8278067871442516, 0.9336887845371338, 0.7315778057343314, 0.660149086418338, 0.6054942187780881, 0.9422108720341373, 0.8690549053499061, 0.576710210110782, 0.6096456970635044, 0.6239747714983022, 0.6617991313230644, 0.9491339515758183, 0.8641957072494584, 0.5005603946259408, 0.9127776943180178, 0.6657537765118506, 0.8804853661324512, 0.5765409502682499, 0.774514197265509, 0.9923527441085505, 0.6876137105500232, 0.689296877943532, 0.8731777376264243, 0.708756272457306, 0.5463376978338623, 0.9977830871051221, 0.859071338038078, 0.8235652450002656, 0.5781460841888633, 0.6317456855862535, 0.6746748345953985, 0.7266130947069231, 0.8311735570342649, 0.5368205981602319, 0.7750565279500221, 0.7456771805355364, 0.6265682422649621, 0.6451351764131268, 0.9712694867002452, 0.7285029180493843, 0.9781972779483563, 0.9588784030068891, 0.6142130456017016, 0.5347305879767188, 0.8938803367561652, 0.7511439509950022, 0.6451177374368473, 0.8217726724884604, 0.7514345930508809, 0.603565237728755, 0.7102321319086459, 0.5697884542966203, 0.695291742828876, 0.8766415835721318, 0.707287687308576, 0.6170588957463226, 0.8920135403763318, 0.5955353673207218, 0.7037989152462749, 0.8376063232482349, 0.7540039067484354, 0.7486438930416262, 0.7815414394245289, 0.7875953592445415, 0.6776291430623322, 0.7417306574553062, 0.5594323331224174, 0.7642191196548112, 0.5591390577898787, 0.647740582837329, 0.5960773663423493, 0.8225345852585986, 0.694102780390092, 0.798938135463696, 0.5519849548102733, 0.769756833774559, 0.6839939329943532, 0.6459098014961075, 0.98636951471995, 0.5874697205509515, 0.9080238817995945, 0.6681951522196663, 0.9091599632822147, 0.7557765016535978, 0.7047357510926522, 0.5849913079316773, 0.6998230678478707, 0.8466325335963315, 0.5019196752216333, 0.9234183603528803, 0.8968284573270269, 0.7698578573491188, 0.8251712766610326, 0.6815568491300733, 0.6766912975352704, 0.9312190998397294, 0.9931986448378176, 0.5614687216436984, 0.5360776890404831, 0.7482991043148776, 0.6992653863170475, 0.9589084078934502, 0.5774866278122754, 0.6007048956753916, 0.6884982418889831, 0.5264359220763166, 0.9090188943599717, 0.7109648334552252, 0.7005582586071504, 0.83864899450147, 0.6155566069005012, 0.825784345802109, 0.5475093702411893, 0.6818396138131146, 0.6218052506062307, 0.5539302083202876, 0.818988157581439, 0.969548092482904, 0.8375863185494636, 0.8681253209168796, 0.9843724144342805, 0.8794425040803364, 0.7681427464923849, 0.8175245324815181, 0.6178439646768568, 0.9353290126084264, 0.9519719959737396, 0.8641215360272356, 0.8562624957777818, 0.9122388160627749, 0.8047895835784031, 0.6902317896956128, 0.6919709110071455, 0.6182390027664161, 0.9614836330839847, 0.572534579331925, 0.7888642708930078, 0.9695718278226292, 0.8798462287045227, 0.9799365498571528, 0.6963644929176608, 0.5727904271099342, 0.5691791676180933, 0.8268147817926306, 0.6532237868991868, 0.6725587934895069, 0.5550619835029886, 0.8636384576739226, 0.5305083543740463, 0.8497793725551381, 0.7259602788631137, 0.6253106180734049, 0.808843511635547, 0.7877801545291456, 0.8863369165712507, 0.7434988910444318, 0.9312977434852998, 0.7753300509653437, 0.7630437214255498, 0.8851717774508188, 0.9285458387518075, 0.9860968264691217, 0.9227766405131357, 0.5561105570200122, 0.6982143332575378, 0.8347392975911527, 0.6923603209987848, 0.6953314158990179, 0.8000801421531851, 0.8024903797525387, 0.5167648111485099, 0.5516379007875141, 0.654385107684339, 0.9678932434187182, 0.5501543452188188, 0.5894597832393045, 0.5723880245205913, 0.6108708556773459, 0.5707978796011403, 0.9208088020137439, 0.9227436539667639, 0.8899714514291597, 0.6274749888892113, 0.7046750692639678, 0.7985782847498468, 0.9656544259821993, 0.7617459930339856, 0.801965546326812, 0.7502286717044302, 0.7371895907943848, 0.7832484836718762, 0.6128831800516544, 0.821198428137283, 0.7740892714243885, 0.5247150048278756, 0.6709607399064288, 0.537569630266111, 0.974029761852802, 0.804915717810468, 0.6537179350085471, 0.6769080415317104, 0.7068124326599949, 0.7884782353955195, 0.5579153747212484, 0.704405743704303, 0.7106531125952371, 0.9860515829201792, 0.8371541003827743, 0.7125318048119008, 0.7308582211491875, 0.5038358568533041, 0.6792887536148149, 0.883932633403316, 0.8203110305215486, 0.909840314053, 0.8060029576282295, 0.7056937108292346, 0.9811934602958761, 0.5094428293818971, 0.562530652038284, 0.552980618235945, 0.7580009834457067, 0.6726735982335319, 0.5952226617715295, 0.6823386762992393, 0.6747302771552774, 0.9814527911563959, 0.635721261447823, 0.5640811887917269, 0.8749006036548336, 0.6109970146631745, 0.658665503704891, 0.796511578683589, 0.5776399339605334, 0.9724480314626853, 0.9614596607172947, 0.7202124450089289, 0.8876394278699518, 0.8274502894870446, 0.7402051045711839, 0.9222253377855425, 0.8884648774804895, 0.6886890289611795, 0.7610474007018313, 0.9461248595055267, 0.5207622605806135, 0.8600530832553055, 0.7290565098709484, 0.7388523883756748, 0.9951101389855601, 0.637009925828627, 0.8820455298343406, 0.9637476911433192, 0.745773651592623, 0.9573849313256436, 0.8492821038871265, 0.7989819986981599, 0.5248187650820774, 0.8989152154025176, 0.7345891921895191, 0.8310399118012615, 0.9804598153609758, 0.7764313258888449, 0.5366689203833583, 0.730101376512098, 0.897404381406912, 0.65871187034686, 0.5020573125649338, 0.8086669790567165, 0.9086153959304539, 0.7139057916886686, 0.651167536676226, 0.8801880120483406, 0.8773525341221121, 0.809236535451082, 0.7887328208494291, 0.613793170179039, 0.8147865491362778, 0.5628835988268148, 0.6754728953891127, 0.7107910120780117, 0.6347502253878747, 0.6441257250945281, 0.6922062898633732, 0.5534427239985288, 0.7934651401538524, 0.5474231481943598, 0.9379356290948795, 0.8820033415998987, 0.9164630650083003, 0.6729120860617922, 0.5710398843255328, 0.5596844515786541, 0.6586060265050078, 0.7298854733364986, 0.6897660593728943, 0.9739482541626123, 0.9465123692823845, 0.7262286624942664, 0.5222020817825357, 0.5006908276498364, 0.5932202981062926, 0.8199661124917001, 0.5451913049409021, 0.530234927341559, 0.7267180195402421, 0.5616312234641812, 0.5345639500740287, 0.8084873926259277, 0.5982754039524016, 0.7204338818402427, 0.800304445092404, 0.8076929444597616, 0.5085937847946875, 0.6928435849692232, 0.8583962042715905, 0.7243221582067731, 0.5564384537906483, 0.5291349539155583, 0.6354154938761788, 0.5760134206864032, 0.9255979542830352, 0.855762423090129, 0.9258804452256424, 0.9927791807607236, 0.8656236010133046, 0.5539769243711243, 0.922005633538217, 0.5361547854350254, 0.5580520461831502, 0.5246408739092374, 0.7318551829554012, 0.9971349094283504, 0.9408058604361162, 0.7956735819659264, 0.8353138819801034, 0.8868541676877152, 0.5658562548698516, 0.7442054813654627, 0.5953586077402966, 0.8799253456856478, 0.7947525328915725, 0.9108361337226488, 0.9513073647399085, 0.6153600666860737, 0.6999296959083012, 0.5043786503947831, 0.6613310103440965, 0.5965073501357623, 0.8667340816161165, 0.851970733736019, 0.6690930641903517, 0.8781757857067827, 0.8566265135899223, 0.7871756879335782, 0.7596173876171184, 0.5880435510475188, 0.7615931340421578, 0.7551717414531226, 0.65388427514621, 0.7256556746374394, 0.610572947774837, 0.8091457173502425, 0.7292947372597421, 0.753210641333903, 0.5179106617364624, 0.916474885324094, 0.7926221167288081, 0.643112457714375, 0.8072622192707406, 0.5749300500231267, 0.6601621102508899, 0.7084297692945525, 0.7064777175783317, 0.6584196034019216, 0.9396444026033303, 0.9985735480766099, 0.9969343142498428, 0.6811080954264631, 0.7317066749979981, 0.5573501331251285, 0.7302719526105443, 0.5831058558946467, 0.7258636378963621, 0.8609063767200533, 0.9103125323581335, 0.9060873568522054, 0.9696508286809641, 0.6131808106748268, 0.8568205461304915, 0.5578435679540544, 0.9095267154707858, 0.7396640492069223, 0.5108842708695875, 0.7774328268675439, 0.6149633958608591, 0.8157635324967218, 0.7966949979228688, 0.6352242247764693, 0.7906384160592927, 0.5374639735658854, 0.5266323848400798, 0.5500297136629482, 0.595273680413445, 0.8376234810945863, 0.7703965943733608, 0.9980038728444727, 0.9989425878171931, 0.7834146401596054, 0.9019787204065186, 0.7409688654753336, 0.945173294037573, 0.8285579135003824, 0.544142338335197, 0.683699938930779, 0.8504113510861885, 0.6898078096700504, 0.6940174439020232, 0.7980386828330832, 0.8233520196414843, 0.6253240555594939, 0.9856910700261217, 0.7897204182109344, 0.6366127109504489, 0.6285825706167505, 0.8591544620822595, 0.757391636923294, 0.8351233093012282, 0.6155032399703132, 0.5543971200624096, 0.7642200278271882, 0.6697708489963856, 0.6086191514795387, 0.8025978879265574, 0.5601072450547673, 0.7649415552275753, 0.883108148306787, 0.9951463824563247, 0.7140590754670126, 0.7020673308547261, 0.8917997924044571, 0.8578680650989359, 0.5328865795372772, 0.9038762809572916, 0.6140941686638173, 0.513799105520458, 0.8600487647421853, 0.82365139368303, 0.5435569724771876, 0.7352373704827618, 0.8567401487186836, 0.631090545719908, 0.6511793756811669, 0.6196463338694284, 0.6432379978213294, 0.770020551526086, 0.9365817322804999, 0.8328595687436313, 0.8347802086418012, 0.7511322516855287, 0.6611704418012196, 0.7632302671108271, 0.7434000568990182, 0.5613706814230395, 0.9007492654352625, 0.5317911851671722, 0.5633168670544588, 0.9446962312831904, 0.8644138652136177, 0.7999771365677635, 0.6798347310563786, 0.7073468565924328, 0.8556379779392256, 0.8861819545011945, 0.7274233692122933, 0.6024609764384801, 0.9193003965684405, 0.7440428040741769, 0.8659334728918233, 0.763143561050647, 0.7221118464619652, 0.5637984735798829, 0.9024114107027845, 0.5958512087700909, 0.7486446746897694, 0.5748871641805703, 0.7814802777413141, 0.9001019231963396, 0.8649995810315017, 0.9306649169713885, 0.9849606749883406, 0.7450367253289641, 0.9590023620276514, 0.7809151656995372, 0.6906467520705672, 0.5399341016566621, 0.9364116238870828, 0.7889007106568928, 0.9086117315333195, 0.91160682674909, 0.891404824510001, 0.7965248261704516, 0.8096626129774211, 0.9212248142150774, 0.8416894541616722, 0.9526093863513252, 0.6850201811577749, 0.8276745498993134, 0.6860322364182744, 0.717791183170048, 0.9836871036187324, 0.9518004835571792, 0.6004659379836192, 0.7829307542248372, 0.6456743437167687, 0.6896579142100849, 0.8513694985170599, 0.615439541745797, 0.9419036372815708, 0.9229522883730923, 0.9879750209556395, 0.5857347971416103, 0.9831317525856875, 0.7887993642480193, 0.9272167438426864, 0.6265515162201711, 0.6375727223932113, 0.6012018091524798, 0.8421273823810627, 0.8458881555610533, 0.8695847071712366, 0.5067580743935672, 0.7405688941641655, 0.7623834604576113, 0.7611221652157255, 0.7180081873743263, 0.6815956006723498, 0.9395832251848666, 0.5567102041162326, 0.6639864535840162, 0.5434089119449015, 0.9919350595787371, 0.7677107410651915, 0.9679885005714934, 0.662937422400156, 0.9880863930739546, 0.9044407516300015, 0.9995386885688713, 0.608707888582248, 0.9331405635084253, 0.6936847659365285, 0.9147985549960987, 0.7037417723130788, 0.9700632168225884, 0.82705255133877, 0.8770332660192847, 0.9493441002388263, 0.7540112713335216, 0.6353365554281241, 0.8356812714402417, 0.8393281018076544, 0.8120652574896035, 0.6098478406634276, 0.85932552408518, 0.8231252789247879, 0.7776565729385088, 0.8219837061363824, 0.9732859932775603, 0.9529475155417444, 0.9831224568902739, 0.9859250149232761, 0.9474185401137802, 0.7710456257100056, 0.8906984689101307, 0.8125884327154598, 0.985558575157178, 0.8112848924834832, 0.636058462242237, 0.8006586108828959, 0.8364897107704133, 0.8503176319216867, 0.8503495871825716, 0.6478398291203553, 0.7205182182668901, 0.9695281278738959, 0.9056632237857043, 0.6997139495350866, 0.6725292659886484, 0.8960212866359554, 0.6007583336059337, 0.8587392954384249, 0.8047064049718466, 0.5684543153250796, 0.7211481324125026, 0.674981743562647, 0.7522245071884717, 0.7864771017273963, 0.6442740976012655, 0.7673494677695603, 0.7655151276817754, 0.868969526094729, 0.5277555559503505, 0.6215480890290305, 0.6566267678927804, 0.8057259187704277, 0.8523609510007322, 0.626138588385547, 0.6913421718267161, 0.98138074941859, 0.8322663925230542, 0.5838538395211692, 0.6493916857723434, 0.9478332939722915, 0.9084830191651447, 0.7744131111666608, 0.530528412886186, 0.9774726791169248, 0.9226104161636905, 0.8722595711297363, 0.6401900240273832, 0.5619515139447817, 0.7853056106373657, 0.6911054246640356, 0.6371774934512393, 0.9040297269792439, 0.9601916211056276, 0.7644734336302861, 0.5348616724984908, 0.8903860781987719, 0.9088358063670232, 0.6881428252179075, 0.5185765772444335, 0.9122323768086588, 0.5102954358950206, 0.8350413550804298, 0.6488948370522475, 0.5585505549707285, 0.900226646068521, 0.5209160159657658, 0.7622953190759747, 0.563992446832785, 0.5631979011336699, 0.5564252950846469, 0.799846586090103, 0.5470521192104658, 0.8603693943152586, 0.6558191526132309, 0.6038614536925702, 0.5361978645805953, 0.9119258412982407, 0.787883021769002, 0.5199370533415808, 0.8690243108316649, 0.8154498835093843, 0.5281722205741896, 0.8605873607341432, 0.5238284817103105, 0.9754372314594061, 0.613594043653294, 0.8741221857400168, 0.8478874167930541, 0.5253024484052919, 0.9752288772077009, 0.5166274072221304, 0.8966472767698416, 0.610453691782415, 0.8470969832093425, 0.8925650146369111, 0.6731431286296273, 0.5141484391117914, 0.7900569772967979, 0.8123255034313364, 0.5698365466455468, 0.6000312064937817, 0.7212606079416808, 0.9399123320957415, 0.8572882553600429, 0.7375940544902866, 0.5926633405449548, 0.9987921854480732, 0.9395591469864806, 0.7277746872458051, 0.5078445087483257, 0.7281542612294223, 0.5255865684727754, 0.9381374995706417, 0.8986895970166405, 0.5701399082517311, 0.9973513305370398, 0.948587394453587, 0.7601503538308355, 0.7078165828532016, 0.5609787527155206, 0.7413186406508241, 0.6416035982413038, 0.6459983170190052, 0.960667023070505, 0.8289909533194204, 0.6940300966002286, 0.799670697912702, 0.583829699411801, 0.76474757818823, 0.5824618793633861, 0.787200342996395, 0.7787226513369302, 0.7477477082426713, 0.886353123357662, 0.8390394043094185, 0.9566338293469006, 0.7598365252294764, 0.5630094265431085, 0.8504913703010316, 0.6849043422221601, 0.8756553374521424, 0.7012625506426957, 0.6902023347785405, 0.7041735220660266, 0.9206319199599973, 0.9170487901632642, 0.6142220360254886, 0.9077697823504608, 0.6010384428765172, 0.8876975991325707, 0.7888033472965867, 0.9007252864049737, 0.7937947930405174, 0.5856283588261529, 0.6358088486012612, 0.7166476324741842, 0.8659686068418697, 0.7572726695416525, 0.8979688036727873, 0.6173617725309749, 0.8078997233545516, 0.7454344004261618, 0.5950325215745133, 0.7634139125368875, 0.7753986543749296, 0.7946077615294754, 0.557340816524966, 0.8363946407112356, 0.9348428671543619, 0.7411267678521334, 0.9103470783910468, 0.5182951128890677, 0.9797382231280536, 0.6461332031533661, 0.9508995441633856, 0.8862058909358091, 0.9133692042967446, 0.5467240136617126, 0.811838099149044, 0.5727804331256554, 0.6166357098135143, 0.5645004785240566, 0.6263178247504498, 0.7027328170780038, 0.5628887925896814, 0.5897962382958439, 0.5761631729334913, 0.6171648685924069, 0.6419101063953525, 0.5397938429622878, 0.820970636470091, 0.7842245842690148, 0.9645880547640433, 0.5262803868145881, 0.9302961282213531, 0.7057298426154148, 0.9375240457558428, 0.5094122779073171, 0.9326004387552114, 0.7416080597287387, 0.7471438260659193, 0.7739880922289809, 0.8434360268281835, 0.8991899996122203, 0.5997093068731527, 0.7693700045015014, 0.8267166460991402, 0.5802773347387415, 0.6693871560074784, 0.868828066474888, 0.7189068830253442, 0.612160288133146, 0.6919578527506587, 0.9318779071381613, 0.6893739289030256, 0.9616140278625216, 0.8922027718091453, 0.6604784336087667, 0.8012728618596114, 0.771021763190439, 0.9532136445886998, 0.9206453408534365, 0.781545687985985, 0.6021278008615355, 0.6488017108878014, 0.8922778653917356, 0.7493938882183875, 0.83779080973306, 0.9326417648963351, 0.7615353250771978, 0.6371552012411648, 0.95966939847196, 0.7960681725562047, 0.7256755929113026, 0.7429900414726716, 0.9983301079254064, 0.9935931305529591, 0.7033260874093092, 0.7182023124531823, 0.7250279522038556, 0.6028291387428151, 0.7055734577195028, 0.9591924045334057, 0.8301936102180716, 0.5987347665208111, 0.7308979546383846, 0.519899173295431, 0.6815185597509221, 0.7602590100662873, 0.7388990582104384, 0.691985490947023, 0.7754260335989128, 0.5141538483601222, 0.9430125090414126, 0.605318780767915, 0.7719929999314137, 0.8246828491234967, 0.6729771011232506, 0.7492644116743132, 0.787734593132029, 0.7948008058847, 0.7763768720201687, 0.8239661580877358, 0.5977981358505831, 0.9329046392290743, 0.9456131311905968, 0.762195710570092, 0.8745374647540599, 0.6242018202871193, 0.584935203970321, 0.7313441340278417, 0.9356575305994801, 0.506597549771181, 0.7862780536018517, 0.9367650244869128, 0.8088768406840972, 0.7755897363914648, 0.8354690946444063, 0.8055303085750959, 0.9405754899499332, 0.5607951937681166, 0.5598247121465749, 0.763295770391907, 0.6230209569127736, 0.8858435620782859, 0.702458059607717, 0.59531264469128, 0.8102734664677665, 0.8137489457763776, 0.9227092344136648, 0.710118464336019, 0.8310659997250058, 0.8040703110818023, 0.8506379081534553, 0.7599201027178817, 0.9929622745634237, 0.6887391264217058, 0.9864871729946025, 0.7953223771088904, 0.9562592747415573, 0.8707140618860405, 0.7852169627979217, 0.7132460843145855, 0.786598186820666, 0.7349016328878453, 0.5145657405599756, 0.8589083784640006, 0.7993141231720572, 0.9176256376784191, 0.522322203624608, 0.7134357134826552, 0.5220835660343535, 0.8256424965081661, 0.9513544644842664, 0.6275314267129827, 0.6006152976165646, 0.6699194374926196, 0.9466774524365812, 0.773395176600382, 0.5796633971559408, 0.613941585483059, 0.5005647329433196, 0.7358852113999479, 0.8318262044397868, 0.8150297484830857, 0.6344964382789692, 0.6746644723867162, 0.5880767899953545, 0.6462482219616753, 0.7147077155316002, 0.9267942786307606, 0.8676961361633051, 0.8198820706860246, 0.9980431541113375, 0.5221900279637667, 0.8646016785514077, 0.6609082237015131, 0.6786631298029777, 0.5750415108763101, 0.9776780779905313, 0.9765241206939195, 0.9857159185815648, 0.5770993844361697, 0.9106924278422421, 0.9032288224719001, 0.5430276199329309, 0.8721061281364576, 0.7314514010347705, 0.6817876723243254, 0.6551023723386412, 0.9596269783946971, 0.5481779807373691, 0.9238219524795723, 0.839129760308325, 0.7238200034168483, 0.9553354343796427, 0.8494226976703111, 0.5750129472228513, 0.5875628152820387, 0.7612182923165117, 0.7209880483726014, 0.5898308482954395, 0.8827384461952477, 0.5738504398964793, 0.9796342930236459, 0.7692065377595896, 0.6392806068606159, 0.9976621232954422, 0.868800314865223, 0.9117398753891592, 0.5914927992473062, 0.7795839526783526, 0.572649051956853, 0.6282560582111436, 0.683697898826507, 0.6058091986336236, 0.7642649541926381, 0.6705508847605254, 0.8541880488046258, 0.6510875771636138, 0.9834268195255151, 0.7843050363914946, 0.5602467430941092, 0.9049258726366958, 0.849518649108203, 0.6644053157213616, 0.9407126612421484, 0.700699234083854, 0.8867729889420177, 0.6666754298967494, 0.6448968574881178, 0.617005029910825, 0.5840275133935598, 0.897057026334561, 0.540967978288629, 0.8863330797939752, 0.54111713410148, 0.5891446083704228, 0.825102067083002, 0.942837435602308, 0.6846752177680054, 0.8788456093746877, 0.81689327126163, 0.989598197687265, 0.9972165123893533, 0.5507903715557552, 0.9132657329661067, 0.5250627603247424, 0.8097453980287622, 0.5447545745781357, 0.9897931481906064, 0.5065987568686933, 0.8395342042451663, 0.6454342912515576, 0.9591911045728441, 0.7493801739277048, 0.7862997476501066, 0.5463054826610381, 0.5643090825396644, 0.5617358925539353, 0.7439194366045716, 0.9253688267703467, 0.9973760668390541, 0.7415491524801188, 0.9575681151713817, 0.6928687551567243, 0.9678071546768691, 0.9242138779129361, 0.537246987799612, 0.9426118271768702, 0.7194684594024099, 0.530584530616976, 0.5389141502139, 0.5773563455249151, 0.644778347515816, 0.852680315797848, 0.6068045897247101, 0.6591893633885348, 0.6759086647555326, 0.7124334587465165, 0.6697141118027616, 0.8155796295743529, 0.7555042185579695, 0.7375570120970267, 0.9603396482287538, 0.6418100111057683, 0.5617225657998963, 0.858601051897108, 0.7824523798566333, 0.9369139007560823, 0.9249896561985822, 0.8938214943834919, 0.8537883574200857, 0.9383835922570564, 0.6797197423161668, 0.744204367640919, 0.7233659116286663, 0.6893149904503397, 0.587854558714149, 0.5998499854471526, 0.5477032184068387, 0.7283617682815953, 0.8826214235387349, 0.8501778429533263, 0.7975108315589834, 0.8740679631469652, 0.9460997011037207, 0.8829992834759692, 0.6792699294499454, 0.9558392075430415, 0.8863676340173845, 0.9968963561675084, 0.5796953246894749, 0.855539386538493, 0.7317157864799878, 0.6020398538625558, 0.626728935507658, 0.6093633817617454, 0.5875708732412842, 0.7971964293433224, 0.5970844938568463, 0.6338413714612036, 0.5113461877091537, 0.8431270105091395, 0.7587932892629761, 0.5120189499866112, 0.5554540483176743, 0.7537832094729358, 0.7547597034938286, 0.7639286210967803, 0.7875347385304126, 0.6444266592470071, 0.8545495579332061, 0.7286415993003819, 0.9687404133876107, 0.9916779141897956, 0.5460774537455524, 0.8221221441861483, 0.7582627668711766, 0.5449036079651421, 0.9647398527302489, 0.5236285800673308, 0.8409367857514486, 0.7333084461796664, 0.7783418813336658, 0.6339572804796542, 0.7080975342056297, 0.9952762805663975, 0.9130889567080356, 0.5822735283842281, 0.7843005803637317, 0.7415840423024933, 0.8597263034603726, 0.7315291282611843, 0.9284074470245545, 0.6062536333168421, 0.9962623740780874, 0.508784540882442, 0.9529889796256255, 0.5707708845391891, 0.6429455582499541, 0.6565672582676331, 0.5841176843491844, 0.5553877062942509, 0.5468162207049849, 0.8477063211130724, 0.8502120911981335, 0.9035530066361148, 0.891411213726953, 0.6264205083487269, 0.614938235377996, 0.994815230104171, 0.5130948943217815, 0.590173690018504, 0.7419624765496211, 0.811675667488414, 0.5087419642527384, 0.5670677269935916, 0.9610686117562008, 0.9416067675838534, 0.7454907376582289, 0.5542666802979737, 0.7013691022565041, 0.8650825598362561, 0.8018814475565783, 0.541372311100627, 0.523990300924245, 0.6033475657523745, 0.8417797470215087, 0.9528623778189884, 0.6905985297859409, 0.7433507654688623, 0.6909018818061333, 0.7468483146878642, 0.7063931361446605, 0.8412606297263465, 0.5857528572484572, 0.9212585328912108, 0.7606286436891379, 0.802071453281104, 0.6136461257701082, 0.711940131051124, 0.6255969639551002, 0.9284247778740653, 0.7605700653820644, 0.7840753392946864, 0.5012949287010129, 0.8080905779784171, 0.8051040955231414, 0.930228697356928, 0.8476441477496239, 0.7284065933396042, 0.8091971402999649, 0.9786780060202565, 0.7891780412429332, 0.7295026254731796, 0.7872487921990237, 0.533116890525646, 0.9814638762462331, 0.6850935084210329, 0.504414145751465, 0.9091093822155454, 0.8811519754316381, 0.8796945829952881, 0.5444651040502335, 0.6252376519199436, 0.9210636081233661, 0.746607218158926, 0.7657674728350312, 0.8239428003469434, 0.7613254219751785, 0.5322451585868797, 0.5937980964350824, 0.9558939442948753, 0.6615201590383994, 0.7543497276512685, 0.5989039335201989, 0.8585349262100748, 0.7094451164341167, 0.9558150358991574, 0.689662737430767, 0.539475699557228, 0.9844764191159598, 0.5918963136566306, 0.5611812692589164, 0.6226282988007724, 0.6558482491720565, 0.5430353554904549, 0.9241301956008993, 0.7555105347282216, 0.874839725542506, 0.8973007403096707, 0.6588843381747425, 0.5123623798837198, 0.716069236110862, 0.5945640946415418, 0.7680231138389437, 0.6500501046736047, 0.6163897194765878, 0.839342095546812, 0.6450003720280548, 0.5167569127186535, 0.731315939379613, 0.7995404465231523, 0.8230652946733357, 0.9082837793481651, 0.6384055047328405, 0.8423690176627177, 0.6817461262730908, 0.5720473988355055, 0.8438296800408975, 0.9956184741795495, 0.7689070185590247, 0.6229943746684024, 0.791426015354578, 0.6084065637055749, 0.9571290927324662, 0.966316998920216, 0.8438594815983811, 0.6104251022310652, 0.7833909575126816, 0.8073637964169066, 0.5576041153111722, 0.7149925596852769, 0.8795863574363396, 0.9780847799414187, 0.9428970090741797, 0.5649127963305881, 0.760199653695032, 0.5748731132898255, 0.6222076068328792, 0.8846949755958771, 0.5866533815360403, 0.6093986611960143, 0.8265058061629302, 0.5297791886087171, 0.8580879397108507, 0.9886715861162773, 0.8558142278706573, 0.8616547281579718, 0.5399145268609847, 0.7690603205430128, 0.8560658624237462, 0.5826604236363362, 0.8799191960915693, 0.7879359616307475, 0.5137544740351621, 0.8385311392530415, 0.8460064084009613, 0.7301798234759012, 0.8999879947789433, 0.8910199485069152, 0.7570381396668527, 0.8795122814426755, 0.5222650067113139, 0.7912930198251722, 0.8285099924752386, 0.739250556321262, 0.6391597761716276, 0.9042934509246916, 0.6590530240995133, 0.7508978154597893, 0.9749828203303805, 0.5893937063963063, 0.5667859778418775, 0.5607005642476959, 0.8488482410635976, 0.594138363182459, 0.6430540416738633, 0.7617497702131635, 0.9840542995246864, 0.8278066637038388, 0.7657218955689811, 0.6475987461400974, 0.9725866503338165, 0.8092776951164005, 0.6908574385524431, 0.680330620973515, 0.8222639953698028, 0.696452436267456, 0.5558351330069242, 0.6602513244273545, 0.5912657663323342, 0.6677046005982468, 0.8804986284437311, 0.5025670182819042, 0.554941790062665, 0.8051112288663819, 0.9796697403155792, 0.6115990941621208, 0.8233210359279568, 0.6296765679601293, 0.953427322210477, 0.8163585875318053, 0.7557280972784932, 0.530583925432847, 0.9821189176023786, 0.5736579726577657, 0.7502758498611122, 0.9417595025260348, 0.9476622294283682, 0.9979398072696635, 0.7148568401400736, 0.9085299664302288, 0.8972732848833822, 0.6976254094237176, 0.6895341590392627, 0.8541593078254044, 0.8251939068010039, 0.8329537319724472, 0.99240822450515, 0.8203727567878538, 0.5340620535637101, 0.9345535900296074, 0.7709799244552513, 0.7013829131411204, 0.617078990733138, 0.9888176561553448, 0.9646235302761558, 0.5827455907501307, 0.6015662222960725, 0.9377046196234669, 0.7162157096649047, 0.6218769064252689, 0.672681072750862, 0.6523308659823541, 0.9845776400564792, 0.5216047561380317, 0.8703652692346635, 0.8776860235855586, 0.7186104359882167, 0.5773423491427652, 0.7070817994934975, 0.6018541868754785, 0.651807436726558, 0.7546607633083733, 0.9222188085737915, 0.5921486895974258, 0.925392245661746, 0.9241351597113354, 0.5745703710489812, 0.7239179628309036, 0.7265846484882268, 0.5658700741317475, 0.6877618887118289, 0.6516403801423316, 0.9901990857097487, 0.5391517079468899, 0.9399199544505481, 0.6493419985759916, 0.9224440438027641, 0.6480245175582691, 0.9455633844762035, 0.8781166979205176, 0.544769769599954, 0.8459685680755376, 0.5442040401444577, 0.5358029520087797, 0.5494246265177137, 0.9249783163963493, 0.939097379668431, 0.9719170949551608, 0.6846134496938251, 0.5374777077134596, 0.5021056701164063, 0.8060667285864709, 0.5501516355458222, 0.9525729234845386, 0.9484701686630632, 0.7409521400072172, 0.5697303764082238, 0.7505769395565827, 0.7482873862334041, 0.9669635146443969, 0.9903983689349412, 0.8047034811231467, 0.8862097452655713, 0.5395779876139943, 0.8057414393706889, 0.6775129891604679, 0.8568592102355591, 0.5588062653493672, 0.800843611305609, 0.6968976606314514, 0.9686953068633286, 0.6476779222415041, 0.6217301430147654, 0.7530543618293095, 0.6195507768900416, 0.8809862723922464, 0.9755066304593571, 0.6242095697451853, 0.6081225209586514, 0.8519209796718068, 0.8711723285903863, 0.8246152837424597, 0.576647687183438, 0.5635486660393265, 0.5721549793333041, 0.9910673790851106, 0.5944327739069879, 0.9715978741585187, 0.9550145448624433, 0.7543508291196894, 0.8865985577758255, 0.8771379920036526, 0.6545589427744769, 0.728105407099887, 0.6446502550393436, 0.9768436115986272, 0.681816273199157, 0.5895564323717708, 0.803854811577982, 0.9296101576404703, 0.8893148375535253, 0.517236151396195, 0.800837085829218, 0.7513356936496247, 0.9623727840972762, 0.5544756660944512, 0.5794606550086603, 0.5203544680976371, 0.7140191374741073, 0.8812423066411696, 0.9722089066208899, 0.731735437025081, 0.5758689856632562, 0.9725110861148318, 0.8698391510472615, 0.9646080769489097, 0.8638453894631297, 0.815705184211478, 0.9419975278451307, 0.6276197039908026, 0.6219596724764407, 0.702568949628822, 0.7813732112414058, 0.8778928403977375, 0.9431398712122109, 0.615854896593611, 0.9816569132789299, 0.8587560630982016, 0.6789812663238015, 0.7057265181190211, 0.9282141999261007, 0.8842762421341797, 0.6401499547503466, 0.7847238538605699, 0.5065229579879521, 0.94786240653872, 0.544936016271738, 0.8215143954233961, 0.9956264290830807, 0.7284596079247828, 0.8905201741432782, 0.8012979009809437, 0.9829124109808572, 0.5569817413837408, 0.6792631872658452, 0.761950369112719, 0.5063446142264503, 0.8045476477803148, 0.9062175695548587, 0.7114268021700068, 0.8429885037867737, 0.5591096464818746, 0.8702709460601303, 0.5492657706283851, 0.6320816672655023, 0.54751860474724, 0.6827122655747807, 0.8665092565271179, 0.8820376640827212, 0.8919587600307487, 0.9459192461880717, 0.7190578722888109, 0.6231356029019761, 0.5707027526961918, 0.5703906632950093, 0.944219961911251, 0.501139949997139, 0.7938534783895864, 0.8144190587844742, 0.5767228014230564, 0.7302570751541453, 0.6433831023002008, 0.9619287994360586, 0.9494915701478698, 0.5927575190641068, 0.521949647807727, 0.7703379760599718, 0.8988959041360085, 0.7387309188853468, 0.8128059592333132, 0.6427820654839588, 0.9403043208649771, 0.5729892131516157, 0.6526647317252028, 0.9456537724350695, 0.6865123619068526, 0.5399394306506012, 0.8175173917703611, 0.9787295620619056, 0.9980100322744441, 0.6589519489373156, 0.907527005429025, 0.9912737570264587, 0.9496542663404797, 0.9665116226502285, 0.573889327775872, 0.6676828216852365, 0.955365473066294, 0.5613137781040296, 0.934520611393942, 0.588806448306428, 0.5819094457978219, 0.8050674790662217, 0.8238161625583837, 0.6628190732273942, 0.9095863536032223, 0.7847535432266334, 0.6643256714659785, 0.847688444845256, 0.5623804278747642, 0.6121340379299062, 0.9127565591358238, 0.8588741912595936, 0.665385318466323, 0.5977609955189243, 0.6462884188472962, 0.8117871502792178, 0.9137033020620402, 0.631503578342139, 0.8629570374802131, 0.8036210111204021, 0.5728514199641754, 0.7134054625632276, 0.6360349035194529, 0.9189009238754052, 0.7900378617644672, 0.992409756177699, 0.7686406194067094, 0.841019129114535, 0.501862591815933, 0.5676809046891415, 0.5686051200753487, 0.7711852893590334, 0.9722888535466815, 0.8266180140185553, 0.5650894359637264, 0.867086034951206, 0.8808480166878903, 0.9974766830379578, 0.9483893553497376, 0.5589458915979778, 0.5491556429124671, 0.7848283369957306, 0.6072869709569997, 0.7835464235746773, 0.9938485915605135, 0.5725038749315186, 0.9295262905594239, 0.5280285344401829, 0.8833486544816477, 0.8123796919611963, 0.8525336111371782, 0.9177861951290203, 0.8308969391059509, 0.7086347157369227, 0.9510203559589923, 0.7660326139318037, 0.6024462591248447, 0.5084702925947351, 0.687113931017272, 0.8292286659275343, 0.6125419944044024, 0.7966888399752965, 0.6654783811367904, 0.6407675368823575, 0.6771449145868675, 0.7015872392584033, 0.7046932704596298, 0.6281909544160725, 0.5434061216278985, 0.7579950484217622, 0.557677213513487, 0.8029238062134774, 0.745601506975035, 0.7952932725926007, 0.5480189507188895, 0.8084733380312337, 0.7070780511641259, 0.7989621571439904, 0.8539712619645372, 0.6702489199738003, 0.632435862313766, 0.8765234369936339, 0.8362798965468217, 0.9734105247178204, 0.6673341092120821, 0.9644279789471785, 0.8728027344600443, 0.887994676765467, 0.7828482810008677, 0.8334954038670583, 0.7263467954742155, 0.7423478128796372, 0.6358010107959983, 0.5296956539449148, 0.8989568330277626, 0.9967283146986392, 0.6856772437333962, 0.8433956858763582, 0.9437946378955753, 0.7335671241900228, 0.7872846066459211, 0.8190704253636778, 0.784203486725233, 0.8620941820088193, 0.9646192266017917, 0.873515648927429, 0.5064517346386016, 0.6004787404180452, 0.8533394033795392, 0.8441044059600953, 0.7353128444400512, 0.5325555020353576, 0.7105728320505751, 0.9968141463121338, 0.7221151665752472, 0.5111257018237803, 0.9747424678595674, 0.7380225518277563, 0.8572703779874495, 0.6324445844597584, 0.7083526721916327, 0.7960744504741568, 0.7256721254637222, 0.8979882851679413, 0.7829249689139788, 0.9537871679125496, 0.8045384985340804, 0.5534988253891968, 0.5379934135558033, 0.9405708183915062, 0.9212129509201521, 0.6099924156279868, 0.723720208573162, 0.7848386445341717, 0.6756735796364288, 0.5776877220295413, 0.9852974378021379, 0.8934763646502988, 0.658136584348126, 0.971040937039185, 0.8665331853941682, 0.6554169234755419, 0.6363564767061782, 0.9954401828662143, 0.9221570042880349, 0.68355173755115, 0.7381584842370102, 0.5888075215589601, 0.9582615543226551, 0.8949436870257403, 0.808748861501555, 0.9152112918031378, 0.5884311314212541, 0.8212813355157293, 0.8140132440816267, 0.863413632688422, 0.9094405874244129, 0.6857383838880211, 0.6847535720199237, 0.5804019505267459, 0.5962283982492962, 0.5233123132297766, 0.8754670738749643, 0.7532609415534133, 0.8547291164489886, 0.9296598225324448, 0.8969404034882813, 0.6691039087241454, 0.6201639480991055, 0.7960315559501432, 0.8728852853281719, 0.5672300681337248, 0.5825536412541898, 0.9115159479825001, 0.7396533872324671, 0.6029151283865606, 0.6599844758300035, 0.8834580959348818, 0.5938220832327075, 0.5669923569748625, 0.8468812821321833, 0.7220989198705002, 0.7210657526114965, 0.9143471555343887, 0.5721594348167258, 0.7839756280931407, 0.588511713947673, 0.7324458637278943, 0.516738618657492, 0.5234559948194035, 0.7635693531630128, 0.6500715383186064, 0.6938404659216401, 0.9413808897338867, 0.9979374486715127, 0.853698657865794, 0.7768357419446562, 0.9340420655305336, 0.6499479222971771, 0.7574824876484507, 0.5469698701173671, 0.6598423305957735, 0.5246890571853426, 0.5591835365102991, 0.628335783949616, 0.5706708229341595, 0.7245589812894827, 0.9203872770877392, 0.9358478700594215, 0.6879324243544733, 0.7836721436228188, 0.923517490436333, 0.9767783953941029, 0.8580096956579032, 0.7275659402381107, 0.5027755066342835, 0.9240140776772557, 0.5438118059936157, 0.7329314134029208, 0.6360797012270707, 0.6291577303812719, 0.9897112888632325, 0.7480331072585528, 0.7314180809104924, 0.6080507065281961, 0.5852441906236996, 0.6600573365819352, 0.9900771133278635, 0.5850646183515507, 0.8012188448268622, 0.7995366381972753, 0.5789807057351525, 0.5010132034694899, 0.6545189996023174, 0.6225553097064872, 0.9513994336788056, 0.7699480931443795, 0.8784961651466603, 0.7249084037291422, 0.989090184279529, 0.6424294698864765, 0.9515173553595019, 0.7842179158573126, 0.8543339902466756, 0.767333469985529, 0.768206328489434, 0.927975859103575, 0.866664671236747, 0.5325097001668959, 0.5818487777026924, 0.7990732343208586, 0.5604148912998344, 0.786871937318518, 0.5392031349648141, 0.9850626437744259, 0.7493506462614875, 0.7106604423170786, 0.9261830381702376, 0.6981524254464119, 0.833253776636504, 0.8946448068642541, 0.5135320260798617, 0.7651512588187793, 0.5114817137896334, 0.9033166013706928, 0.7906833984069717, 0.9852380120775801, 0.5549793641452223, 0.7395655495786568, 0.8336507328549552, 0.724123563764019, 0.9815058660692566, 0.7156311538996297, 0.5191013723514318, 0.8038658421141905, 0.945459973273426, 0.8177172500898583, 0.5907042953549761, 0.8266760323546313, 0.9478913229031267, 0.9350819552891528, 0.8748194870229952, 0.8622589722130557, 0.8987178013623927, 0.8338845222306814, 0.9583890394124138, 0.5518633879513308, 0.5436036992636571, 0.6817239418986648, 0.7098257922841417, 0.9418297019023317, 0.7417772094828463, 0.564351934266277, 0.7822853826711516, 0.9448804221474019, 0.9833954778528821, 0.7461718178470542, 0.6326909378555754, 0.9897798321984538, 0.5760077133922537, 0.9038572814921582, 0.5142629720738193, 0.6364660796506423, 0.7598696322812128, 0.6518266563147037, 0.6066235980568853, 0.958291311577968, 0.5101328444454334, 0.8501701148506458, 0.7282352564864856, 0.5818746712679979, 0.6212280489749507, 0.9020704206634806, 0.5035880138084836, 0.7086410922883559, 0.5134961478651094, 0.7972953230199915, 0.8519860970958215, 0.9561094012534619, 0.7016095136646263, 0.9419625694980932, 0.5114777074981887, 0.6818332460343581, 0.6713605273318787, 0.6128141909676755, 0.7634358550445566, 0.8196674720966233, 0.7418893010614329, 0.6126490280056073, 0.6789322456548816, 0.656418578735645, 0.8320064347396459, 0.7387431718052907, 0.9811398857757923, 0.5560350468990634, 0.6138558288302027, 0.6595396506455069, 0.5636503154310317, 0.6009589848042542, 0.9087764240514449, 0.9759960186166291, 0.6306733892460463, 0.9019934881115435, 0.5237376181265094, 0.8556319934248157, 0.623114376120954, 0.9181860385787239, 0.5499862582722097, 0.8325247689613036, 0.5266081251887487, 0.7288161936603537, 0.68595076398112, 0.7440477181453924, 0.6104343870449968, 0.7906982984946149, 0.5454879524616846, 0.7918040902787136, 0.540226179525599, 0.6895269628672296, 0.983424768335405, 0.6635668109686506, 0.5049508996648091, 0.7564534907910615, 0.7920836179676629, 0.9336902649988514, 0.6346387322096686, 0.8119487731896525, 0.539268171375816, 0.7184894942433366, 0.7621864462305541, 0.7772745813666735, 0.7152737365558194, 0.7330579243711013, 0.7321755574154276, 0.5870304060588275, 0.6842899539176637, 0.7828126010189285, 0.7205463959678399, 0.7706867788180771, 0.8890200838031492, 0.5126927392813923, 0.8996056114921179, 0.8120168143584479, 0.6347977449156532, 0.7439351155704896, 0.6666032543973328, 0.5224114505658879, 0.9736322238082642, 0.728494825707012, 0.5484375673728166, 0.732141500055685, 0.7623979822708594, 0.5683921907673947, 0.6704650805201007, 0.9103330114830077, 0.6863195087825561, 0.7205432833343681, 0.8739394466739627, 0.8504798436109176, 0.5353133586204973, 0.9529729955389656, 0.9784584301878076, 0.7419468446932349, 0.7915739663178707, 0.7496713882801233, 0.660077157345272, 0.8232954990935883, 0.6655774917874444, 0.5434845512502671, 0.7326620463661343, 0.5786975631908302, 0.5815788741448635, 0.9539898805601379, 0.759411317554276, 0.8465872081807503, 0.7507097310160158, 0.9714746777892754, 0.7842554310633877, 0.9043308809304496, 0.5873614243830095, 0.7068233324136277, 0.9959717854975992, 0.8918671651712974, 0.9784761905323303, 0.6829061443036225, 0.6981058295799929, 0.6747459608005846, 0.9771404149333935, 0.936696376362954, 0.9891725873133432, 0.91632847649376, 0.7290748197234933, 0.7608584718742969, 0.8485610749175863, 0.9097326062989186, 0.7271972572593148, 0.7475434410200028, 0.5344073562519047, 0.6327122846381489, 0.6227282746045792, 0.7841526282738533, 0.6325116697481363, 0.622285663432124, 0.5475121856269196, 0.5708123826724234, 0.5998254746249847, 0.9913759197067, 0.8471875894475359, 0.6669240518817197, 0.6280759696870732, 0.7578517168007322, 0.5940883790008706, 0.5229216610517331, 0.8783461445260641, 0.7825788633542409, 0.9393891524080842, 0.9469911966554581, 0.5484760770802215, 0.5100423251171331, 0.8780258127723527, 0.8940659928003567, 0.8883003764658406, 0.6102270385014308, 0.8035630349860776, 0.8589062168977568, 0.6931461016628259, 0.6366269628952411, 0.5496707054773176, 0.6657008659730812, 0.9341991770162111, 0.8344110052121301, 0.5236440559277415, 0.6055249168044898, 0.8639383120637613, 0.9146461421931245, 0.8193003768000289, 0.8729440822359371, 0.9381057805678037, 0.7763624973237142, 0.9495089826835059, 0.8026801566198745, 0.9421163283859444, 0.945135489574299, 0.7372562645738272, 0.7396970128011258, 0.9355504628381961, 0.7143904559049756, 0.9379027867389266, 0.9358659449456823, 0.7649787170140449, 0.5965534933648604, 0.8834474504986106, 0.5824408426826375, 0.7455005581791212, 0.8630290498303727, 0.5673354673360729, 0.9324142562961553, 0.5632372527184608, 0.8418016285483463, 0.9550018452158231, 0.5524524956979706, 0.8667271775178684, 0.9380036354508547, 0.7097901765811283, 0.8153418555713265, 0.6560836265435304, 0.8569873189745134, 0.669795889113629, 0.6294985535028775, 0.8251533687682003, 0.9034887948937841, 0.9881896415094757, 0.6136765177853261, 0.7984232076441244, 0.6758723163914118, 0.886993903399975, 0.7908942208264564, 0.5871533471890364, 0.6295236004191743, 0.5334682238614408, 0.5017678167112265, 0.6970827587457649, 0.905875003755063, 0.8503101117072818, 0.7706160557423163, 0.7722656170030054, 0.6288218725675487, 0.9523290386069697, 0.9809347712980083, 0.7490944456665326, 0.7591580410995032, 0.6826091047957883, 0.9721887226044242, 0.8488787189704705, 0.6112073540153744, 0.649232816407694, 0.7349903629855329, 0.9342388810847579, 0.7078396115781473, 0.5203401798647942, 0.7413965456826982, 0.7994915510342546, 0.7444837320508181, 0.6679604223981499, 0.7066554092885984, 0.781022470770433, 0.6399313282905568, 0.8037405121971146, 0.9511349097351973, 0.7199445185024163, 0.9064423198513203, 0.8892715971937353, 0.5940465056152154, 0.8528369402245698, 0.8653863277369326, 0.9146826171405447, 0.9616627897841477, 0.6919850091167448, 0.5442233755762664, 0.7335221137940917, 0.757902649612842, 0.7538661471813761, 0.5108746506657788, 0.7485275751946359, 0.5304071022916352, 0.6428858127232573, 0.8494711939335425, 0.5406532202041736, 0.6353083556731787, 0.5651882611847188, 0.7290013451773949, 0.8439972486845506, 0.6912538455282273, 0.8903297336846066, 0.5024264917595546, 0.7021277048262047, 0.7817666727137896, 0.8233053389420619, 0.7940261063694216, 0.7669615382895176, 0.7592292249735602, 0.8854871882158801, 0.5450803701965419, 0.8485705421702554, 0.8698066134732898, 0.5978618467204896, 0.6312432419519592, 0.7910581284809172, 0.542332889996606, 0.8508904114401493, 0.9358566292323185, 0.515178888902992, 0.6170128403647772, 0.9311013476515176, 0.8722834603540658, 0.6332160084109067, 0.785655617513959, 0.5381404081898415, 0.5243427049101552, 0.7636066499371659, 0.5985013744159657, 0.9476021495909839, 0.8969272825686792, 0.9902741865556555, 0.9708628178864589, 0.5012976175178594, 0.6480673131298227, 0.5188675260519633, 0.5950131242313075, 0.5538551079393587, 0.9875507475855638, 0.9254943292570869, 0.9751373823535069, 0.6331389690489353, 0.59796167007537, 0.7706752326854615, 0.7972592437157379, 0.5532121968489485, 0.5308231587817955, 0.5219857547679059, 0.9424053123812913, 0.5159721955167285, 0.7140238239550178, 0.7681022063497072, 0.6190522748862262, 0.8176830341251446, 0.6198922048693178, 0.6587801386444923, 0.702130745050797, 0.8923935698091333, 0.5322060683257928, 0.9306546467176817, 0.9461494654270457, 0.7418893115418635, 0.7705145620888894, 0.6199977440558251, 0.5970350100484381, 0.8810404738431745, 0.7513523059497376, 0.9077637480219561, 0.5840425662258611, 0.5612026725066867, 0.7763673024787334, 0.9804194750978621, 0.6208575064284081, 0.994880583438691, 0.8186635404164185, 0.9920176448791629, 0.7243419809864595, 0.846598403670356, 0.7420898237215298, 0.7556029155159552, 0.9058285067673375, 0.9917411471204449, 0.7825783829952611, 0.6531290218396544, 0.9156804158121692, 0.7380954100924428, 0.5378198885721199, 0.62201683537881, 0.6159648107901936, 0.8413897194829214, 0.6696200447268147, 0.5836637081549979, 0.7528185335427447, 0.8033656611197872, 0.6267566870659681, 0.5583302314382326, 0.9869857036299194, 0.6357481449060551, 0.508904699327636, 0.599236118390559, 0.7991211966940299, 0.5077108897086403, 0.9834908365911961, 0.9490465827723633, 0.8267464005375604, 0.5092565798144371, 0.5623881030492155, 0.6696572084898502, 0.7642980583758451, 0.5619417169990761, 0.5594505908363494, 0.9707795641799803, 0.8414978682657188, 0.9807136165910972, 0.7111424852549064, 0.5675304663525624, 0.8948943650845288, 0.9655047907792628, 0.5796255209310561, 0.9039996105978901, 0.5831927315773212, 0.9821558753863227, 0.6792321783211375, 0.8794752810227366, 0.6657143014547422, 0.6992854582308037, 0.8058979525985615, 0.8745357585226173, 0.5595131627065737, 0.5443816450709132, 0.6393396594865273, 0.9660548999725083, 0.952471210868356, 0.780069686084335, 0.8158792438318971, 0.8927330253442078, 0.783466153492632, 0.7935874376930567, 0.7066927683649717, 0.7099270146799532, 0.9610963906640457, 0.8414448425288569, 0.5693924956304446, 0.9309839756489594, 0.581478075208224, 0.6827805238464687, 0.918229803589907, 0.5499701072715548, 0.665281429086392, 0.9510758026858585, 0.6541788121355941, 0.5586958487471723, 0.8891432153629051, 0.7120129642598152, 0.6209064376302369, 0.818283274650917, 0.6355406178857732, 0.5940580081269038, 0.5606780172963985, 0.9422133724010087, 0.8210569310733503, 0.8841964915321419, 0.544755553754456, 0.9566236911022973, 0.5403897542326982, 0.5729097908822063, 0.796201437207835, 0.665177342679516, 0.9480985039469298, 0.8719810895278688, 0.5587371576840681, 0.8526554535282057, 0.6389983367909263, 0.9380482150845494, 0.5738407555373902, 0.8255020396323967, 0.7254993477697573, 0.9218964738721709, 0.6380798545459577, 0.5446525997470979, 0.6198483594540938, 0.9610424421303876, 0.9254269899177552, 0.8124911590677912, 0.5266994451937536, 0.9735846674890702, 0.7186249002105183, 0.5870295363188998, 0.6936773772431049, 0.5767706509177151, 0.8145320964171363, 0.9953793154358404, 0.9453745376345253, 0.6334629400699616, 0.9211627971135379, 0.8247853464039261, 0.8767862324129765, 0.5580942658052361, 0.9526577630868751, 0.8327622461480577, 0.8601446274121194, 0.9136938730873624, 0.8580440431793064, 0.68827558276692, 0.6897904032083776, 0.6236886185468616, 0.6403255383581443, 0.5425707972997734, 0.6897174145400581, 0.5439747737815582, 0.9306511607742971, 0.7961098452632412, 0.6666062332784894, 0.5652439355135747, 0.830649262651673, 0.7161665424767291, 0.9081226372649682, 0.5847446699714443, 0.9830170847072253, 0.9777157812157621, 0.957305477507632, 0.5319134688329912, 0.6148797304220683, 0.9922277520155887, 0.8582572731491737, 0.9584461342636035, 0.9542062551340119, 0.7032777244141506, 0.7094765577005897, 0.9911148292511744, 0.8088119725759307, 0.5963558986404165, 0.8963030849144367, 0.7028564893030299, 0.5471214823287858, 0.8349093441549753, 0.509691057593222, 0.6318590920083235, 0.8211043550611176, 0.7164522553063959, 0.6717902834384438, 0.5355902671415129, 0.699258237463372, 0.652628917356685, 0.6447898187415542, 0.5889918412665008, 0.9607744134816945, 0.6359062428455327, 0.5381225054556125, 0.57373941927679, 0.7173122508141283, 0.9262499750688205, 0.9383101398987965, 0.8230438315362372, 0.787793660151449, 0.653035090878457, 0.6130967274545098, 0.9772538866845804, 0.772706307310182, 0.819005525800877, 0.7757231122194441, 0.6031794591098517, 0.8311247603478757, 0.6765218781994606, 0.6841708571607495, 0.9753452455953161, 0.8309691917298156, 0.8725375799006203, 0.5703940424455096, 0.5540063200220862, 0.6527865124093798, 0.5337342034728587, 0.8117815116577678, 0.9550167185139931, 0.8770390503783543, 0.5143136495349674, 0.6787003454395043, 0.9614007380733276, 0.8315103798390611, 0.5245326995303812, 0.9994436169031523, 0.5486864967630318, 0.6203644885473881, 0.606674777812065, 0.6564324151959944, 0.504166729251281, 0.8505362771840104, 0.7804758120179323, 0.9654698308783509, 0.756658096757546, 0.5794476430403572, 0.5260082924193972, 0.6112848399173432, 0.7618979066522249, 0.6293087159944315, 0.7214017314199536, 0.8270208715614072, 0.9113196900763187, 0.9648292064909878, 0.5606234941985349, 0.6340351719350363, 0.9732591018480068, 0.8897994130313804, 0.9351020241884549, 0.65583416146778, 0.6211235272115655, 0.6597037778525139, 0.6749517158218001, 0.896757757742197, 0.5355886859191733, 0.6074674226539754, 0.6213514582849997, 0.7437197917593052, 0.6235568914098232, 0.6399886958658796, 0.939227693779089, 0.9270316618626291, 0.9291439101366372, 0.9557025510761928, 0.8147974583939901, 0.5923276020612612, 0.999595035852824, 0.5099088373539299, 0.87116753025024, 0.7947986235337248, 0.563742729105997, 0.6106153048718345, 0.9967067307288694, 0.6224618254001728, 0.7351352162272107, 0.5857756618419647, 0.9834309082007032, 0.9439409133547192, 0.6140276233770852, 0.6560947667347627, 0.6156278872694271, 0.6012299756913189, 0.681392304519596, 0.7869401938758124, 0.5629907094701492, 0.7568101724483454, 0.9251254558155968, 0.5088558966221266, 0.8636580902737734, 0.7123314586302552, 0.8610384629371721, 0.7023915677603568, 0.7288988806587191, 0.5711941591580457, 0.6562410923460718, 0.6613175513561534, 0.7509419487658712, 0.5959921108827846, 0.5929365508383213, 0.9445498730243833, 0.8125777582990523, 0.5199350279284312, 0.8502153155027456, 0.8012687213782678, 0.8113271202899925, 0.5045064511695003, 0.9613796651662159, 0.6681659898148353, 0.99992331508397, 0.5911629013711788, 0.5316179027121803, 0.6131700043224401, 0.7789827214866227, 0.7653157169016691, 0.5975373098308574, 0.6076757061859637, 0.5896971876292016, 0.7305486016806402, 0.5578487523844857, 0.6810725796226651, 0.8922376412417374, 0.9442862428562618, 0.5106627340230439, 0.6725826839753279, 0.8892593729037169, 0.7368902539921902, 0.6376355895282974, 0.5979921259860856, 0.9859513129550298, 0.773693444585019, 0.5304746187817324, 0.9602799054627641, 0.8151941032751575, 0.8459532066562276, 0.6760696807841078, 0.9246014834839844, 0.6733558153696195, 0.8738250306148442, 0.7413713582679672, 0.8001686477336286, 0.8435607415757411, 0.8552167745151505, 0.6757071595411434, 0.942437711509359, 0.9295235247378217, 0.7554466995312776, 0.7976953049957429, 0.8720021311099552, 0.9407577483220267, 0.9494854091093731, 0.9115659894037171, 0.7001373575127445, 0.7930308131647592, 0.8512913997191677, 0.7129273537822505, 0.6497680377505255, 0.712672193480819, 0.9105461666417038, 0.5828816563995343, 0.5515734598044071, 0.9580070046718345, 0.6339072053124757, 0.5657559654369937, 0.5397897184573497, 0.5660646374252282, 0.9055478838763424, 0.508842166811712, 0.6145701167959753, 0.5198078248326459, 0.5642087718015725, 0.9576270898104551, 0.9952660925150354, 0.9802154665399216, 0.6116760752072068, 0.8110774604827411, 0.8780414090208832, 0.626726950403383, 0.9345185433159127, 0.7996459189293363, 0.609242228250026, 0.5259297675076231, 0.6926290886224556, 0.6941459159295278, 0.5151665509152534, 0.8815079038363545, 0.679676378393909, 0.795506424929636, 0.8299008437808781, 0.8119048878041597, 0.6942386538075328, 0.6377753662456258, 0.9307668666305313, 0.7442731843412859, 0.8132339784577831, 0.7181268600702579, 0.9257923116649501, 0.8507630500283974, 0.6979668085777069, 0.9672708989481582, 0.5570336211049906, 0.875109437240686, 0.6215414291919343, 0.8404226619703224, 0.7149252019664856, 0.6896926693505898, 0.5876332624193432, 0.7494605800830192, 0.7386315052737976, 0.6732992711802102, 0.8295459862924477, 0.8100983662172927, 0.8366448208583006, 0.5248900258494873, 0.7216264626080331, 0.5560529240547234, 0.9897243065985741, 0.64394422585687, 0.5712612520059063, 0.9231581743881457, 0.8450797298808281, 0.9816955898167659, 0.8386727334284582, 0.9949868685743202, 0.8984974842246176, 0.5509946563213525, 0.767880941072206, 0.7907004555343129, 0.5028271564476137, 0.5104542578695976, 0.8622317284918124, 0.8522864145065281, 0.8287961548260215, 0.9399570024096995, 0.8594926403239275, 0.9666220869419058, 0.9788167670985031, 0.6029964317518582, 0.8080465937768647, 0.6647393977781904, 0.8164851793045222, 0.7723230301693627, 0.9734064753843868, 0.6915791895489178, 0.778822748560714, 0.5191113110339978, 0.9672240696424532, 0.579076585492516, 0.7197285084224676, 0.9761597867922283, 0.9882205957718722, 0.5175252653526765, 0.5315968949643667, 0.7733082758970568, 0.7513630164508476, 0.8008596877280569, 0.9188640440341065, 0.9563504921318, 0.7591006109709795, 0.8199433658694248, 0.7851610399909286, 0.7676232953743742, 0.7250216416358531, 0.9861210963303768, 0.9930542425691667, 0.6520455333283657, 0.8991921093790851, 0.69392878591642, 0.6514003646793846, 0.9386296180557596, 0.7300898341920805, 0.9419233183428737, 0.9847464468948486, 0.7287253703700598, 0.527856499219314, 0.7063960298680391, 0.962158188343964, 0.9246368280570287, 0.8231051092709328, 0.7501593561141928, 0.5978176177436059, 0.5821975942884745, 0.5478915412634462, 0.8593172051166726, 0.5102574609002737, 0.6733832400797137, 0.6063709540078333, 0.9885972467126509, 0.7595665252207381, 0.8562647905995584, 0.948629621434764, 0.5936017849061959, 0.7801426514929698, 0.8384105803189927, 0.5335156343625624, 0.6970404846978699, 0.6890324974785966, 0.6877663919107294, 0.965876861069157, 0.5678829464809221, 0.7807954226047039, 0.846127662816861, 0.9336740584564429, 0.8959512986218157, 0.6483743128488287, 0.8181536188097593, 0.8678711944943157, 0.7378040676752555, 0.5822859528589934, 0.7816039585237164, 0.985982780751008, 0.8865202517089242, 0.7605929817397385, 0.6002841014880742, 0.6365336073049026, 0.7162398798516785, 0.8087502516524965, 0.9999688379464782, 0.5983732069184438, 0.6555860567616214, 0.7619753134600021, 0.7418107657135959, 0.9192844990988716, 0.6167572509095103, 0.8125425756927618, 0.6199562385283188, 0.896828472722037, 0.9127201585758531, 0.9604039041838596, 0.6136176711094155, 0.9816130788761569, 0.7309405405377627, 0.7156524109550246, 0.8803362316641034, 0.7934764188776489, 0.9506874206543625, 0.8910152233001649, 0.8574622129890993, 0.5721435624119509, 0.5903613002758589, 0.7259378245587684, 0.6820786067142147, 0.6826831936400986, 0.6535099165814966, 0.7625757256862529, 0.7846322309513393, 0.6497259940989344, 0.7600110446355204, 0.5999128440836741, 0.5931979160762425, 0.556392755350051, 0.9275571132583968, 0.5294599556776205, 0.7829629659772802, 0.7932866204379782, 0.623739253897609, 0.7054550142753551, 0.9477513446624041, 0.8860286345376762, 0.5709508458614196, 0.514045707729424, 0.9229919138008575, 0.8581479624484709, 0.6269724743252093, 0.7085503988846023, 0.8626345705907731, 0.8963431265312121, 0.9507646484187274, 0.9316399719766315, 0.647860207884658, 0.6179131143440144, 0.7442821804679236, 0.7082249304840375, 0.9567287783013225, 0.675981334789377, 0.781299411180788, 0.6342971925371927, 0.9466062839105609, 0.841109484384197, 0.8296958855220644, 0.9998650783911991, 0.7169368911403378, 0.8295235980246638, 0.787829201192171, 0.6694234502830729, 0.5073148455469727, 0.7176634575359527, 0.8881711035697978, 0.9197106930278498, 0.6664060175975072, 0.8066285640307895, 0.8773027286372209, 0.9922287398201635, 0.8287333093042518, 0.8227982403713782, 0.9685302901670707, 0.9859443773829113, 0.6985194936894246, 0.679648554225873, 0.5068509761573345, 0.6333824841601025, 0.7871121343089584, 0.9880982195750392, 0.9684730843352867, 0.7564213870076804, 0.7633743589690825, 0.795884089871518, 0.5141470395416863, 0.9007000365816745, 0.6688409253783241, 0.837887717229672, 0.6395846000978328, 0.9568551524697061, 0.8434574951675731, 0.6875153983398083, 0.6414029409959047, 0.6038777999826581, 0.5010834841612832, 0.5805063184446517, 0.829766048978573, 0.711629415320778, 0.6048627086963635, 0.7027477526939099, 0.915613443593106, 0.6564804376566193, 0.9987578280798457, 0.6981097933186742, 0.893226346678825, 0.6401675201287875, 0.7115063019808462, 0.537843238747173, 0.933603214879884, 0.6573382773034375, 0.5373221198548757, 0.860995230194556, 0.9583380175616604, 0.610753783466415, 0.794887470274253, 0.5869899291712, 0.5189304826312122, 0.612353037064308, 0.6267263610580831, 0.5148033537724512, 0.6030056014597607, 0.8846958291917535, 0.7625353487649108, 0.9741775870991407, 0.9038606386350565, 0.6425355091504246, 0.8839278723699842, 0.5088733125466043, 0.5156527695835464, 0.8007316017064678, 0.6637045689737152, 0.7428584498518269, 0.9779621475424807, 0.5925284572675669, 0.5205965189912436, 0.7079385989428195, 0.5015801555557517, 0.543428561903573, 0.6069000480946702, 0.6243230805592559, 0.667091538104934, 0.941290710816796, 0.6159798815315352, 0.954842605286748, 0.7576111391738571, 0.7927637529397126, 0.6488814584824705, 0.6509919299002096, 0.5632531229435196, 0.6498920922657404, 0.59713457096496, 0.6778654295364857, 0.9361775621975053, 0.8528492642866714, 0.8768242439101452, 0.8715421389532245, 0.839264488883528, 0.8237917369755947, 0.5285430928469668, 0.6912566439663038, 0.9803365530704304, 0.7470586001817926, 0.7160302667892386, 0.5238000617717732, 0.7486106244118408, 0.9730794246026769, 0.5312922972211402, 0.6038257017520863, 0.7440719176511128, 0.6650780571022741, 0.8561921669819912, 0.8559360444980134, 0.6301168604697023, 0.5764311576933374, 0.8981768429754817, 0.8739646285516802, 0.8665867788909816, 0.6154595015786638, 0.690219866414547, 0.9573850236822363, 0.9782182302417328, 0.6034851605813099, 0.7569466819585636, 0.9766958992377754, 0.9872338108136787, 0.5006139187235285, 0.6648296925591617, 0.732929095194931, 0.9556182870714092, 0.8362115668978192, 0.6811261807045096, 0.6113686698405023, 0.6466644316408443, 0.7598171176170628, 0.673935059410541, 0.5407853356259221, 0.7148847112999794, 0.8321125006252645, 0.9631110356858544, 0.6952078097714165, 0.8466482293895381, 0.7594360209524259, 0.7661878763256322, 0.5721668194803199, 0.6426124799336119, 0.6549125693567442, 0.7052713030750579, 0.5184842530956213, 0.6144592506422668, 0.7429314581418398, 0.8082859835488545, 0.6304376907271492, 0.5611194071390291, 0.8024036856973422, 0.5341652176438088, 0.8684951510568313, 0.8528427530123796, 0.710433240174004, 0.806346715090874, 0.7404823555836243, 0.9561296924826609, 0.6261562847387983, 0.5209738073732846, 0.5739155740417758, 0.9632949627590133, 0.6162163571603283, 0.6545534536327764, 0.8425144596128389, 0.8390513901212582, 0.744888828121435, 0.6051732694833667, 0.9084676800164394, 0.9888763189521914, 0.640145069638719, 0.730494773349416, 0.5253601966586081, 0.5514945808101812, 0.8666640795899436, 0.9297602315811779, 0.7428181230890556, 0.5703935830880595, 0.9014176094311497, 0.6061217058055075, 0.6278506435994391, 0.8163815226052573, 0.6889134072608052, 0.5400548369524687, 0.8282666631219513, 0.5880377651535335, 0.853816420466475, 0.9296589963527806, 0.5266842364784208, 0.7317729551053529, 0.9405513419004361, 0.8980164074846513, 0.6584149850467172, 0.9195311491407725, 0.60770059761898, 0.9421973273849871, 0.803753003883942, 0.9985897437557151, 0.7220251516282131, 0.815952993014843, 0.5289481479798313, 0.9549569969315107, 0.5620542082505698, 0.5435459191069268, 0.6234890137219027, 0.5752405744483085, 0.9902320996050893, 0.8184238288428174, 0.6158113918306543, 0.8431249962851923, 0.8224307848280049, 0.5596481913826776, 0.7816789781608282, 0.7428593672186475, 0.7269807943395413, 0.6582499191003099, 0.6989127769894408, 0.7799127624736685, 0.8733961863689795, 0.8869506569374948, 0.7669348944149805, 0.8740099389465553, 0.8062534714786216, 0.9387298109994338, 0.7001326845422893, 0.8044304098736909, 0.874344884560849, 0.5538912201624553, 0.6936083996987166, 0.6038819102996571, 0.695988390909462, 0.8636686008723837, 0.749560454706685, 0.9729824935919389, 0.9809319386744926, 0.7742596327591266, 0.9371774078901836, 0.7540708130468206, 0.9190128775241031, 0.8187826212396251, 0.8735878571237444, 0.6554105119577223, 0.7375831725427755, 0.500136305082148, 0.7427823306932386, 0.6639922206393054, 0.7393677876478292, 0.7318143350957739, 0.5550564644164308, 0.9129427770921303, 0.812792957330471, 0.8854058811623595, 0.6752954663179441, 0.8384856867857274, 0.6079593234453846, 0.7426390722140698, 0.5615186472885404, 0.5347630289472525, 0.7939604283190963, 0.6985392107114115, 0.9196773332074363, 0.6278992972795305, 0.772088050527053, 0.8120508797276118, 0.8316765876230807, 0.8157910566128452, 0.6286419744715107, 0.7850278336988046, 0.6365567840672637, 0.9691785524553735, 0.9231916198030645, 0.6733465839476882, 0.7376365595275411, 0.6322321299434972, 0.6536412391134725, 0.5308223128410041, 0.6240916688994838, 0.5614416488813716, 0.5010691469864805, 0.8482285142894174, 0.7731777052344067, 0.9633555785287036, 0.8499403396048967, 0.5164438943867853, 0.9749266516315327, 0.7321649339217833, 0.8966328779542848, 0.7130299475157968, 0.8789187924771582, 0.7042928550692854, 0.6480467667003272, 0.636266357454863, 0.5252420263939737, 0.8901044016597472, 0.9259798560396302, 0.5959367024797151, 0.6461349884378205, 0.8297399730645907, 0.858965872944648, 0.6299810000993376, 0.7999581172969732, 0.7229689607472871, 0.8196811464151625, 0.9097290581118774, 0.8890654514232876, 0.6625177134589275, 0.5595575503713514, 0.8261300041299529, 0.634174526963699, 0.8895498263144784, 0.9401055420060537, 0.7603678484736909, 0.9150345504432511, 0.7405726644631989, 0.6392768492946579, 0.6064087547441401, 0.9411300020333155, 0.9446206482334409, 0.5823272148239621, 0.7513812399676306, 0.5892422227550413, 0.9576465576739248, 0.6789718381230848, 0.7352467245640498, 0.5667483119203107, 0.6318936808701536, 0.9304403872644214, 0.6041212204528311, 0.7987671877399782, 0.9778794288955968, 0.682442546732026, 0.8420617739335358, 0.5371780551188021, 0.9136576623243002, 0.843949203211081, 0.5769594730231674, 0.6621280764177297, 0.9288223963978978, 0.8580919596263605, 0.528799993460255, 0.8350338345484752, 0.7281087967967671, 0.8652021977189083, 0.7717683016152274, 0.696054697877645, 0.7713327029471053, 0.5050909578266032, 0.9737176146575302, 0.5454242418397626, 0.5003370885184089, 0.7143343887968916, 0.6588038751177427, 0.8431824674823907, 0.5983969877071773, 0.8355695718734302, 0.9763810625870184, 0.6559356717779375, 0.7973520297712401, 0.6891368616489836, 0.9949032093143093, 0.6293651482104301, 0.5542480088118293, 0.992602666476686, 0.805862898838582, 0.706804949542578, 0.678107934699234, 0.8865445389852926, 0.7365810121108958, 0.6638109479601402, 0.971915304402312, 0.8691990699043426, 0.866243588900945, 0.5347404808091041, 0.8027647676672658, 0.644654262099257, 0.6358856622385858, 0.6434637864150393, 0.9867439677213468, 0.8617830797210578, 0.7527128373627366, 0.7467834896594912, 0.8355259209746481, 0.6694384958676627, 0.8492840342398571, 0.8752000624028242, 0.8904470484836325, 0.8977191340662543, 0.7317669961065099, 0.8164504355541076, 0.51085587805728, 0.8512505810328967, 0.9907329304765682, 0.8478072020439231, 0.5628764263381946, 0.645203204931839, 0.8734206429169019, 0.8882857138830688, 0.7160446904420968, 0.6494721638466758, 0.6997972842935778, 0.8591288901002546, 0.914870827787486, 0.690242679860722, 0.5628517440647269, 0.6692816701688913, 0.6257996366386281, 0.8197989461236104, 0.7901603116987304, 0.6537812838449995, 0.7334918218109902, 0.5070796424396797, 0.5687660337261718, 0.5532144502641101, 0.5383562214579919, 0.6340883176141318, 0.6268624147706312, 0.9769214413566973, 0.5855060424825895, 0.9641928597033149, 0.5451893264384549, 0.9610314455154265, 0.9121099010698233, 0.5102796332610483, 0.9442442249656418, 0.945547198985586, 0.7423091068090544, 0.5985071798785466, 0.7119224925954971, 0.5211692585633351, 0.7080958813499003, 0.8277607626922819, 0.6160294325999871, 0.5584329026942159, 0.707518176790394, 0.862569195606254, 0.9029898085303101, 0.8912393606274218, 0.5377616686206848, 0.9026261547288867, 0.5177568219173307, 0.8672035942099798, 0.7962247982742086, 0.6500238620637071, 0.676925107503715, 0.5001602860478125, 0.5347604384454336, 0.8100930830264373, 0.8327004760740084, 0.7091550007227103, 0.6341060112837151, 0.893218857063665, 0.7093982920905039, 0.9770563878845673, 0.9569790223608372, 0.7247122931465393, 0.5494016263730406, 0.9806247120905313, 0.8264896942556175, 0.7351190834943998, 0.9841948980404203, 0.596388782558612, 0.9115224940878784, 0.8888070614937137, 0.6786644275255902, 0.5828137759184078, 0.5307300347486201, 0.7294695196410432, 0.9514288368470355, 0.9915409079426345, 0.8319499814741694, 0.8777609795361113, 0.5556064815230366, 0.5772004505126527, 0.7387609939329363, 0.6227046843027044, 0.6747061860466425, 0.7615001341058252, 0.6221814215528232, 0.6152706052962829, 0.8951693456605422, 0.5679851622669645, 0.5367091712296752, 0.7349987403453855, 0.9691276715099155, 0.5781078496851514, 0.7288921545599456, 0.9851365104798094, 0.8776906894820413, 0.9851106455251981, 0.9115109324907104, 0.8439443547174137, 0.6978627508340776, 0.66919239652127, 0.9119883399473107, 0.9615346513277183, 0.733405189202502, 0.8129888689586017, 0.6082963590461414, 0.70416474451598, 0.8779526303011622, 0.8090626825337762, 0.9681551510829444, 0.6358953312801868, 0.8096571690079366, 0.5811684448488653, 0.8811760494433664, 0.6226175327688295, 0.5077305032135955, 0.6174848465066316, 0.7640615045376362, 0.9909339349662583, 0.7077095700729439, 0.5829496411470025, 0.6281409882982008, 0.9402131508934595, 0.7681766736327822, 0.9584370536077542, 0.6850419524809752, 0.7756437694934002, 0.7899256205906731, 0.8208738220082304, 0.5994202288554482, 0.9595585683554746, 0.992752600662973, 0.5205235860356678, 0.8739182553681382, 0.9823946487367576, 0.8488057472018795, 0.6248025201890459, 0.7558672127242556, 0.539519510738877, 0.5369938836916901, 0.7510394182995093, 0.5195534057624507, 0.8004932359826269, 0.5479758695593224, 0.607471923949816, 0.6649394315405774, 0.7296687440285412, 0.5766039152484579, 0.7507131702703056, 0.7084230060366292, 0.9111921691486761, 0.9622916216543038, 0.9973476774118444, 0.9133997314114104, 0.6519389812624785, 0.6755489230708076, 0.7517376231623546, 0.8291270506942291, 0.5244278164436991, 0.5979802977423709, 0.7359310169163924, 0.9389136619775839, 0.681009753485869, 0.8566049747804507, 0.6919231942465074, 0.9508962378119581, 0.8254515314755195, 0.6334021615671773, 0.9108392418712526, 0.8772462999955091, 0.6540626972709668, 0.8290025129514706, 0.9733202855585434, 0.9235197505001538, 0.766608349145607, 0.5117187860745325, 0.9053912205823398, 0.6154901104907591, 0.8123354955789461, 0.5880561053691526, 0.8250215575827987, 0.5291411636751577, 0.5011231435045741, 0.7287292608631388, 0.964877868400081, 0.558208249354319, 0.6469510541288659, 0.6838131083664785, 0.5590814794898595, 0.8384063687566672, 0.8576807555431831, 0.6218050007380436, 0.6968915649729455, 0.6744874980296007, 0.6192680870424192, 0.7307055133290061, 0.8991865595311536, 0.8748910086402089, 0.9555311209587676, 0.5683034631846087, 0.5860504458821638, 0.6204381747620669, 0.8826860193199031, 0.5326363055919, 0.5480670511082639, 0.6458316628469833, 0.8539570695369254, 0.8863962661824858, 0.6649205735715139, 0.6843745462620316, 0.6569926999461771, 0.7896404154190624, 0.6627623194315974, 0.6585690728544666, 0.7015013320734744, 0.5178636138586701, 0.8547716484278944, 0.6401319818273937, 0.5017202943726504, 0.9469577040851241, 0.9473564147139866, 0.5690104234930988, 0.5525494299091807, 0.9309665061087835, 0.5699795564539238, 0.5737371740027457, 0.7403598488470042, 0.9281582729993451, 0.8936244747382066, 0.7001988908615264, 0.739245736100387, 0.9942379729997297, 0.8696240941271344, 0.5087610651249264, 0.6033119080317888, 0.522222603744886, 0.6926988151789488, 0.7880805857001926, 0.5488719699040034, 0.7280075819579002, 0.9521342969252555, 0.7126330553104693, 0.8111506581227084, 0.529471305365542, 0.7232303667498362, 0.6447969375983489, 0.6121330495415666, 0.6046765155967233, 0.5641619990420603, 0.5861118103868079, 0.7878129863018559, 0.7731866001849048, 0.911995468245386, 0.5106521978016281, 0.8727815433562931, 0.8245065800118885, 0.5477604366697817, 0.6376485883696491, 0.7920019696452727, 0.904686011600746, 0.7548079284812386, 0.7550498207731016, 0.8832047280908342, 0.6964731571351368, 0.5602730119685617, 0.809783920577039, 0.7888655582647119, 0.7961589081801053, 0.9855148697723917, 0.5344029961974528, 0.6223894398160956, 0.8110878502556256, 0.5784516085144379, 0.9312579335561353, 0.6326962059902655, 0.8000527486069372, 0.8785100868210692, 0.7793121049684841, 0.5167701432123207, 0.5456701809973528, 0.7833665619478412, 0.589517937260085, 0.6589491250978616, 0.6007281238879403, 0.5788155182757708, 0.9743059094786337, 0.8297666113732907, 0.8238139134459176, 0.7560192584139649, 0.8680719607567813, 0.5738691358184402, 0.797845160242727, 0.5030260734634938, 0.8946295245617887, 0.8676581062901723, 0.7577164135850365, 0.9328706864466672, 0.7614225131985601, 0.7409113124185289, 0.7270673356732585, 0.6553272279369546, 0.6759101121647425, 0.7341458444282899, 0.591491351651094, 0.6346377956514164, 0.902039710591038, 0.5847569466795541, 0.810643274153702, 0.7248794972226036, 0.9851910020167449, 0.974108233209174, 0.8996735639873363, 0.7189550642111113, 0.6726945594544077, 0.7975859987026017, 0.7539550624245716, 0.6025324404677534, 0.7458109797190549, 0.5340524773251214, 0.5902008441213525, 0.7398141283946909, 0.6436788439680411, 0.8244833951331823, 0.893496387726715, 0.521131207672267, 0.9139404095824555, 0.9310741290219822, 0.5366131388213402, 0.5158462214387398, 0.6704844567644836, 0.5719822989095462, 0.6894917465592058, 0.6490947606206057, 0.592413216854905, 0.7494926503484484, 0.6507121894024441, 0.9319204001161614, 0.8948947906617349, 0.5994756507589505, 0.7573880497091189, 0.6607247718957361, 0.5509934377219222, 0.7838309300071689, 0.6699671658330989, 0.6296472892809386, 0.767883382469432, 0.7005668694235145, 0.5198222474844474, 0.7007157134308544, 0.6789868269294864, 0.609883919267308, 0.8788058881600811, 0.6727180026940404, 0.9890438909716195, 0.8714066234859259, 0.6721567709424561, 0.6129041285102618, 0.6912101230165019, 0.7025173477803943, 0.6859971538599936, 0.8337005068494121, 0.8426179484342124, 0.9401605683571224, 0.8355126312065666, 0.8735604276279149, 0.9230516920580657, 0.546723715425713, 0.7611571853473365, 0.9431780278831889, 0.7973272926594916, 0.5929137528245966, 0.6928505324774287, 0.7511457761157865, 0.9715687802605462, 0.933003242419588, 0.8333725193125672, 0.8444465037613154, 0.9172132215427706, 0.7583646671552786, 0.9301999998391037, 0.7118534312749725, 0.7836569756989453, 0.9809313751274604, 0.6217033637601092, 0.6043074584483898, 0.8026142789943584, 0.9470545429076338, 0.8304762555333711, 0.8910631637280797, 0.9144658960331373, 0.6564866623389775, 0.5285901784788218, 0.9056605591193237, 0.6124212363644685, 0.8537639482649876, 0.7285721684864821, 0.8842692016844698, 0.6038003635943747, 0.6211254663070214, 0.62461564160265, 0.6293820049961845, 0.691845330661145, 0.8515086552358622, 0.7780912197423193, 0.7814521495888558, 0.8000082827972712, 0.7406678566977294, 0.9641287997403938, 0.533977216085709, 0.5655906676035005, 0.8201337406377791, 0.5571549819304618, 0.6785951426163155, 0.7506452982958713, 0.5952286797650543, 0.8311097964236339, 0.7393984962961864, 0.7476028785488815, 0.6401746434527135, 0.9734687036165403, 0.8788543926784247, 0.812946164672053, 0.8211899683752848, 0.6831601110174317, 0.8521375470021814, 0.6699133871306807, 0.6015975500351495, 0.5741381843940536, 0.7827599829261702, 0.9140465014253147, 0.8775078599555002, 0.8520776624523783, 0.7689255902189925, 0.5663302730943721, 0.9532096581477901, 0.7760844314498458, 0.6377690687602495, 0.6576529270362603, 0.6204421692081219, 0.9950660982045607, 0.9646988415099238, 0.6585835170757519, 0.8313732255014408, 0.6062471098949472, 0.6129468391622096, 0.5062754686551614, 0.5971432009638766, 0.9140514740082983, 0.511645950320906, 0.8447993936991479, 0.9576141581152966, 0.7944210183734988, 0.9548954465073225, 0.7608210816875915, 0.6017465679700761, 0.6845316138289886, 0.985756212146776, 0.749358343655223, 0.6140922672387797, 0.8042978528468008, 0.8730212188556037, 0.5438472118360927, 0.7893720110008702, 0.5977875663266969, 0.8753466687559124, 0.8336441810156066, 0.8161556831539533, 0.8770809962564321, 0.5841942679825275, 0.6736506688833577, 0.5833248592577442, 0.8596592033054482, 0.6686245841606062, 0.8631938635016589, 0.6988782333493843, 0.7545079887059265, 0.8182284179772162, 0.7723901010220819, 0.6104173712596812, 0.513144784230431, 0.6674059486268197, 0.6640266113815857, 0.5435501695429124, 0.5214832591302988, 0.7121106740968643, 0.7151595462274862, 0.9430530402367194, 0.9854655780439668, 0.7565306675227566, 0.9823018815334774, 0.5454165126941195, 0.6446929562650395, 0.940047463917674, 0.6522357013700826, 0.7293320277407145, 0.6264563771790139, 0.7086699277911618, 0.8403334492292648, 0.6063252551923183, 0.5220520083706571, 0.5628259381432527, 0.7717329992641586, 0.8271115354078611, 0.8566459636530683, 0.5322264945598738, 0.511576403189071, 0.8981709769381252, 0.5442882257355026, 0.811267629725817, 0.5991611679514584, 0.885032670334714, 0.929592333280562, 0.9884437000422939, 0.6172494021957299, 0.7114240808428248, 0.6404108792017926, 0.7994269012730311, 0.5329259160712951, 0.6096805505599459, 0.7500666537978162, 0.6648695987675921, 0.6912324740533308, 0.7173304359493472, 0.6276658721263764, 0.8583812723539853, 0.556377241564924, 0.7064103791674115, 0.9304597346113401, 0.7436964252800466, 0.8888532025170692, 0.6882877367706828, 0.832479694834632, 0.814155770605033, 0.8952464379881295, 0.6569693820134099, 0.7064498285214956, 0.5314190007483596, 0.8093403715961156, 0.7576800254118627, 0.7683770295868537, 0.8972825844655965, 0.5222444820276411, 0.9977973249421015, 0.8371736975268154, 0.9370827059876226, 0.5187759761578419, 0.8845625356757731, 0.6963849644298458, 0.8905175118462972, 0.9447710287995589, 0.776850373343386, 0.8602182449042017, 0.9992757547629828, 0.5882837026417587, 0.8811690048293099, 0.6795257088449153, 0.8496397912066563, 0.9132318314758018, 0.6022720919898101, 0.5517327610529823, 0.9659123473269101, 0.7086795034330787, 0.994827106009856, 0.7560570353181948, 0.7344813563806722, 0.5477084910216335, 0.7201459683634714, 0.6439689710446219, 0.5772532689225901, 0.747255684844209, 0.9383134851322248, 0.698418439682315, 0.5502705700306723, 0.593859284395911, 0.5879262571452352, 0.9946714046060974, 0.9381316507326001, 0.8076599089304282, 0.5822218828005572, 0.7907534194089236, 0.6416844863765928, 0.6468710632332879, 0.7668697864625839, 0.5027880695206164, 0.8050208281664886, 0.5866100990139134, 0.7149644064869708, 0.952436169769745, 0.8726017491469398, 0.7898793204017253, 0.6132775053825525, 0.801329505000627, 0.9984717929253555, 0.6518992836902469, 0.5151023929653871, 0.8578411319596294, 0.7649488993287454, 0.9190656384151333, 0.7954555477197737, 0.7318159856067317, 0.5866201285279053, 0.5043208422797141, 0.6260411067125626, 0.857818490540313, 0.6610848275432177, 0.6156646124125897, 0.811314174621945, 0.9202722647922931, 0.7758621451793986, 0.7317514956219102, 0.6332175991587932, 0.9917157803343769, 0.6738901423915205, 0.6222763413953241, 0.6094570722102552, 0.6417503586223894, 0.7974143366973815, 0.734048320976953, 0.5679081124589678, 0.8369620648522222, 0.7503951140990712, 0.9838183332421067, 0.6804861391475056, 0.8697702428162489, 0.6635056995176782, 0.6896033603687493, 0.737271956071353, 0.9353634008755691, 0.6902913325034484, 0.706362916830907, 0.6424573739694506, 0.7111087878244919, 0.9012532717635633, 0.9460248982600084, 0.600692414735801, 0.8480151730451873, 0.5052542943735205, 0.8052474333048736, 0.9617645405353825, 0.9968101081309995, 0.6361059535196847, 0.7702358790266166, 0.6968501936237239, 0.7162463654945574, 0.5159768587341408, 0.9502418902501633, 0.5049998478556017, 0.7753614472140964, 0.7113590992032635, 0.9022231429358443, 0.6254288322719112, 0.6982108807150662, 0.6443911540416636, 0.6115671724065238, 0.5485694428212873, 0.5658394673493838, 0.955059588775337, 0.9521353301279767, 0.6952891727984243, 0.5195181849492996, 0.5753167907083726, 0.5505116667951915, 0.752858422838375, 0.6038004668421002, 0.8702614313758725, 0.8048372023627135, 0.6687225291889185, 0.7242700104042954, 0.507256080386608, 0.8085976168301041, 0.9630641438931637, 0.8069389383579983, 0.7134944229323898, 0.771995872272895, 0.5719707750900784, 0.9954606934114352, 0.874658615197935, 0.7141413237800871, 0.8481821343290099, 0.9010454700727808, 0.7847878510755243, 0.5448042812261158, 0.5498382353869209, 0.6703533776396711, 0.8802344278281974, 0.5604695162579902, 0.7069035642804944, 0.7054006415316336, 0.6003612382162696, 0.56877019820303, 0.9228178381095244, 0.9280384150708374, 0.734600435599411, 0.8728319747103046, 0.852462569062576, 0.8859846142785309, 0.774482649499283, 0.800256664530171, 0.5248378117214196, 0.9822829396742572, 0.941591937083508, 0.931749519175397, 0.6924379191312665, 0.992266718008648, 0.6717750460142807, 0.7935321118206136, 0.972801857319729, 0.6327338170613819, 0.9352170207010254, 0.5137983454558295, 0.6193534434458468, 0.933106085232762, 0.8761060385098316, 0.5871184198287199, 0.8712832893069783, 0.7924886019471926, 0.6742820320852072, 0.9035992613886799, 0.7834963721862296, 0.5264481433895223, 0.6552172285338351, 0.7277534711083852, 0.6136924187842296, 0.5519507579538909, 0.7601748694101653, 0.8046541864581034, 0.9953304091555865, 0.8704570470659281, 0.6432304689707659, 0.7669900773189666, 0.8411142498848904, 0.5014376597614467, 0.7194204258106359, 0.9717587420954501, 0.6798473494545605, 0.997397143507001, 0.6289458528429324, 0.7643120105944337, 0.9405479691679692, 0.6271541616409109, 0.6767622081512494, 0.7078204745830101, 0.5155983829427138, 0.7106001940099957, 0.5579170629398684, 0.6397356265598313, 0.8290192699804146, 0.8815700125156098, 0.7155344158238228, 0.6209650713742187, 0.513099494209309, 0.6842083125988687, 0.5971583228930772, 0.5640279074482499, 0.9960623164849151, 0.774739845775445, 0.5795034680209707, 0.7415071132665714, 0.7393571937498428, 0.7694482161130864, 0.8971266341825714, 0.6339655161597846, 0.6098205841050524, 0.6598430485767144, 0.7284833883734915, 0.8603285869242543, 0.8488685424483817, 0.6763917042506463, 0.94255800991985, 0.7388471263424186, 0.6751889074750103, 0.5930744157158565, 0.791413412891262, 0.9378551651165934, 0.9043971983578023, 0.9232728145207161, 0.9886159856799822, 0.9877101835653972, 0.8801033041421027, 0.884713735519723, 0.5498905891642747, 0.8290671136078394, 0.7833152001201097, 0.593551328460068, 0.5852044143286304, 0.8586174918768741, 0.6328057207678117, 0.8665803043638528, 0.8958670205466313, 0.9243440407355998, 0.8913858198587992, 0.9804682786003709, 0.757284173650357, 0.6832023185171701, 0.7056031140197465, 0.9541435298181382, 0.7076482931079615, 0.8231074606775108, 0.6081016360801115, 0.9220000661261873, 0.6497584196012407, 0.9076446465046566, 0.506712345795324, 0.8828210012733082, 0.9270092654221935, 0.9845468261847212, 0.9982215333064233, 0.5762008607518241, 0.7307506211964312, 0.7401013283912827, 0.9953077104411308, 0.6959550083181425, 0.6285635230225128, 0.8608368173985981, 0.762574993024557, 0.7239110658874541, 0.8649317728861102, 0.8064144899476362, 0.743579724749611, 0.8344453617410557, 0.5681445276241587, 0.7474695163277727, 0.6284808954348324, 0.6477104736157655, 0.9033246738437665, 0.7673336774031141, 0.7623637023489318, 0.9798317674467718, 0.803553809586668, 0.8442038077345968, 0.7242766417873532, 0.5488776110834923, 0.5356784660126767, 0.7200981448016628, 0.5494741912335747, 0.7404711454417123, 0.7431225452625256, 0.6498228678691853, 0.5438309953747307, 0.7190916994191453, 0.914628194481282, 0.5494178747937316, 0.9563847631490736, 0.691164982254358, 0.8663682776313661, 0.7409604533913842, 0.6664792692394452, 0.8641627625249844, 0.90255468337361, 0.7686908388140774, 0.6520868587210613, 0.9203218401664451, 0.594800866755832, 0.6433402778240802, 0.8115124770849634, 0.5828459071563528, 0.573653684850564, 0.6499900586803776, 0.9013053657120507, 0.9869232554462986, 0.9319506614512986, 0.7920337682167018, 0.9403599270531651, 0.7787610171338802, 0.5118256967029646, 0.6320747180890653, 0.6275229548651646, 0.8790611419979626, 0.9809713721857212, 0.9996038358472761, 0.9784365815288617, 0.8727323131711523, 0.5145785613303144, 0.5950211819850045, 0.920971951448894, 0.5272778301799984, 0.7138393750921139, 0.6358123330058798, 0.9306027595831927, 0.6863589840351553, 0.8464376293905752, 0.557514281896568, 0.9522924333836751, 0.5612768574453209, 0.6528665404227034, 0.6627837869272788, 0.9951433225088457, 0.6454881295597013, 0.5967280114463612, 0.8288985287304795, 0.6864986466068744, 0.5783965606168864, 0.8191421997499844, 0.8786306292170589, 0.5416505101535416, 0.6712491640186065, 0.552282807736536, 0.7630313349609714, 0.576853026377258, 0.7333564291553637, 0.5417156631429656, 0.63256676780218, 0.6352536574914722, 0.994372229896235, 0.9802749832628741, 0.7630580869466501, 0.7652927687157078, 0.7449316521275671, 0.8383520729857618, 0.9849912942439782, 0.6139117540703737, 0.9068107080413907, 0.7018180943843606, 0.5470626960100344, 0.6579404681866436, 0.5184910237426579, 0.5419710123677561, 0.5680180807794475, 0.9575525238472273, 0.7072167526754363, 0.5162000903147967, 0.5147663059983034, 0.7918111421797736, 0.6155268961079412, 0.7957558225048438, 0.6700645333162245, 0.7280033789385063, 0.5168605037525131, 0.9998151879293941, 0.9452268341075435, 0.6268747501172283, 0.9402733179872005, 0.8946449339129509, 0.8978697911345911, 0.9360510032343891, 0.8701736333476526, 0.874072777570924, 0.6136812785256378, 0.8586279130215053, 0.6656387431962179, 0.9142690240332, 0.6466635850610858, 0.8924380463316528, 0.915963627693876, 0.5245105994684633, 0.7725055574101434, 0.7690581945717339, 0.6488934239159257, 0.648024852729062, 0.8692716035437238, 0.8786743409638607, 0.7025485408592982, 0.6909628491557305, 0.622890216725564, 0.6734918534415538, 0.5037373690416687, 0.9683001490580971, 0.8422105522609251, 0.6775853277293065, 0.9346680743078515, 0.6260441382483615, 0.9121063193926471, 0.5436223170900559, 0.5490004247893119, 0.6131474731220318, 0.9824621354336116, 0.8209459368215128, 0.6974184129268384, 0.6258827273849996, 0.6459863048929853, 0.8132374685921049, 0.5480062208432432, 0.70100893705258, 0.9379434123453034, 0.7362037571141533, 0.6674943278198262, 0.7840476034115151, 0.5942470731607243, 0.5856740870857282, 0.6660293976835616, 0.9154754941513925, 0.7625841913709235, 0.7747589550549828, 0.8379285029381317, 0.8078564474358878, 0.9338170140121751, 0.5838236625227486, 0.7250962214542963, 0.8549653339225038, 0.8233092917608765, 0.5138162631465917, 0.9647265657588988, 0.6835843642586836, 0.713298927586081, 0.762639447385744, 0.8493553881843443, 0.5511624037673113, 0.6867170400112935, 0.8427459971052966, 0.9916627784934482, 0.6565896395854078, 0.7185500607377142, 0.7399655357818424, 0.8179022853011707, 0.899350761774695, 0.8634055161853929, 0.926205292914328, 0.9473101713118337, 0.7450869900607254, 0.6531565219999991, 0.7692778464926617, 0.8830819780390415, 0.8049592573811573, 0.7403057334337797, 0.6166270246627454, 0.5510604759406365, 0.7697418848798305, 0.9372291595350095, 0.9751738248668389, 0.7676062530422774, 0.8752887827577759, 0.9975539310522348, 0.5044621450870546, 0.9761074660994944, 0.7885665793867369, 0.95471841962632, 0.9638525125885904, 0.622102046474585, 0.9843707515663094, 0.579640500091065, 0.8859735773357109, 0.6497765157948854, 0.8238704251644977, 0.6674475038816292, 0.7265625923410413, 0.8739619973018605, 0.9533712630111223, 0.6804370061165604, 0.9037349351858139, 0.7956765195106414, 0.6666476798391975, 0.7695720557790668, 0.9272900746218908, 0.7261823249183474, 0.7530365116195104, 0.5056130246059318, 0.814293870578772, 0.8874411703002739, 0.9015828205795823, 0.7228725661309676, 0.8235495995302731, 0.9060686318567721, 0.7271476957161803, 0.5450808997354805, 0.6683353200471662, 0.9157206173802226, 0.8472875583863932, 0.8855210902162864, 0.9675494236561153, 0.6006759991512969, 0.6945616792480096, 0.8357333498617641, 0.7371350169231452, 0.516195860431026, 0.7679863244340649, 0.6180797837520927, 0.5469497230202351, 0.9668423059666816, 0.5507999889808586, 0.5294535191292576, 0.973947074321516, 0.6776823489418908, 0.6453632338187232, 0.9472745458969964, 0.7165312760347526, 0.7033806164089496, 0.9850807585427956, 0.8502367208424368, 0.5458727201889731, 0.6332830424470608, 0.6520449402653221, 0.8648252450206746, 0.8410969055552047, 0.7668220660209317, 0.5112011915430527, 0.5076307177698981, 0.9485558454224725, 0.9629211153955535, 0.6787320753538462, 0.9562403457019842, 0.5025541259718065, 0.5023818082415273, 0.7395832314975681, 0.9516248703289054, 0.9195489671690602, 0.6225482349012361, 0.6922037071866409, 0.9511792560865622, 0.8215477800345742, 0.5172435174370169, 0.7093935556908132, 0.7541452344706974, 0.9574777504467152, 0.7455738728616956, 0.8828280427806025, 0.5772287941959394, 0.5993196803107559, 0.901933421452217, 0.8160647262845722, 0.8484946757601572, 0.7577378286097513, 0.5327045123889738, 0.5309439642424345, 0.7938523184009509, 0.9165328180746277, 0.7456677005628716, 0.761600542381998, 0.5476807198773874, 0.8173086152146922, 0.7228267446248267, 0.9955644312293095, 0.8491996922297684, 0.5676778344612463, 0.9077779391927285, 0.9326034454763508, 0.9967669633126147, 0.7620167486385084, 0.5865261314237648, 0.9208479178418996, 0.900430852912351, 0.9908766838628598, 0.7879246376911699, 0.6703332003524107, 0.52813538312383, 0.9365780170174189, 0.8398814543256303, 0.84957729649461, 0.8537494171991131, 0.7492598910131985, 0.5286038491946603, 0.6515976082738377, 0.5357571710982243, 0.9604314900177271, 0.6566374003047449, 0.6633382495971432, 0.7583060114276385, 0.5369557166404788, 0.5748201334923246, 0.7730986061871377, 0.9978255489351351, 0.7321019591129233, 0.738291218428144, 0.5781274224384219, 0.6796153048039155, 0.6014388661190334, 0.7244279440239987, 0.9971579245118876, 0.5595942708120937, 0.7785680805916722, 0.9260818827535867, 0.5182648715631128, 0.6684423164514417, 0.7788795823911905, 0.8306808673516505, 0.9411958208486664, 0.9167709486776696, 0.9430362143422667, 0.5663509257424248, 0.539588146910615, 0.8849748421447023, 0.5619006809721616, 0.8091428148191069, 0.7644501249322545, 0.7638203959835093, 0.7233371164439155, 0.6100323066080731, 0.7492937635930013, 0.5499306971344593, 0.9464625240414495, 0.5758860923661422, 0.613862304299079, 0.9553572745568649, 0.6336420626890878, 0.8876980659017991, 0.9315066327752684, 0.6547623827725997, 0.7478208301932214, 0.7630677627094367, 0.7048948309677578, 0.5115648799188822, 0.59938832990388, 0.7891647991489174, 0.6119248547758005, 0.5541916473943873, 0.8769769932643494, 0.8542180189284616, 0.6034139376641667, 0.788065360332031, 0.8948021010984257, 0.7659560068152385, 0.5688228911117674, 0.9488273543571439, 0.6069996636129944, 0.7984622085152221, 0.8917708282795254, 0.5742430627559553, 0.8055620868823756, 0.7385290062245986, 0.553382898271066, 0.5376279466886917, 0.6859283097957851, 0.5491069161205966, 0.6255217172082328, 0.7157219733816349, 0.7405109336728675, 0.7574290431511677, 0.9042108723380273, 0.7969165900693388, 0.6068545435632711, 0.9827359302980728, 0.9047644004949581, 0.5791579831379571, 0.7305596187157191, 0.7535770671599662, 0.6287666387071993, 0.705447073490163, 0.9248704706380144, 0.9771082876499319, 0.7917841506251353, 0.9240083431672652, 0.9073482374990213, 0.6466636022957362, 0.837486646926257, 0.8535734695838353, 0.8934027048015196, 0.5483362980092874, 0.8736929639298758, 0.7926440325642603, 0.8887918565682817, 0.7865591091964172, 0.5085699650920266, 0.6701194669029567, 0.7450340047523571, 0.6151562148540621, 0.7989472960157425, 0.7812980872631216, 0.775591829208564, 0.8077584817003235, 0.5004555962406658, 0.562709173557156, 0.7259217559142133, 0.8413029788418, 0.7016212195525204, 0.9382401855398573, 0.9505319340160188, 0.5754341356523625, 0.8403114832576272, 0.6520464719409871, 0.7559086181086105, 0.8692340714653981, 0.7294817689818855, 0.6792566592020298, 0.906483290867975, 0.9050499657844464, 0.5385169798141782, 0.7696318369850506, 0.7824141644630225, 0.5985631064228605, 0.580987622204213, 0.5874111376317847, 0.7689826979055819, 0.5722095540774282, 0.5344198991492008, 0.611496691322293, 0.5982360215182345, 0.7625598579745688, 0.7704194619329978, 0.8710237533034856, 0.556880013629648, 0.9263469631450887, 0.8683107101534633, 0.5490398202602489, 0.9088937492567124, 0.6256175109616806, 0.5260304281009734, 0.639070483820648, 0.9181383377338894, 0.5015672421162218, 0.8856622824529908, 0.8116196213942641, 0.5717862715463973, 0.5922180989118349, 0.7106538339551791, 0.8845490861747293, 0.9482096224729889, 0.9935424467458507, 0.867389129728515, 0.5835343710251888, 0.7415458558947106, 0.9535191357016356, 0.97899640512557, 0.8350654871140226, 0.9321502569598286, 0.6828064804064173, 0.8122623702750402, 0.9435675542984715, 0.9566208438660693, 0.6246818329097212, 0.7816654983131335, 0.7726920170568818, 0.7786650875535523, 0.54971547644318, 0.5153068345875578, 0.9623350421899077, 0.5589152264861186, 0.6629496481099504, 0.7376595054777506, 0.7245535518692483, 0.6922687570260397, 0.736441177191526, 0.7705382881478189, 0.7901564295899131, 0.8379776823825904, 0.7555649339547319, 0.5063706781928149, 0.8525275186031186, 0.7370813539964257, 0.5802771884384751, 0.7955852701779539, 0.9469229594208106, 0.9200372298635723, 0.5480907073779295, 0.6053291125818138, 0.7106471733922082, 0.9961810914527953, 0.6059105555681851, 0.9405733888285335, 0.5088378524187993, 0.5835280691857239, 0.9839505783969011, 0.6908971293510948, 0.7665638243448223, 0.6024346700034238, 0.5814038882695796, 0.6095933084921361, 0.624180601591428, 0.9585718452388486, 0.8790011815794083, 0.6491567963567295, 0.7368191359406597, 0.7311925676452942, 0.6983061116930331, 0.6851844200081771, 0.9306729195546332, 0.9302336135411591, 0.8489159958771244, 0.8918191909561735, 0.58053166761601, 0.6098695952598288, 0.554698120664652, 0.5776306561769086, 0.6454045465322151, 0.5739048555994937, 0.7451802453330516, 0.9136059207560383, 0.6768990420216244, 0.8325189929274914, 0.5209269551245878, 0.7342022669428709, 0.941793044523549, 0.6627567285455362, 0.5549691645456043, 0.569985063202914, 0.7057792482788314, 0.7009582071721097, 0.6901348504842091, 0.9072413834714795, 0.8693428444287387, 0.6181822126717678, 0.8602410935387983, 0.919075450145713, 0.7990982266961024, 0.7861943236148135, 0.7020950763806303, 0.6984741886624428, 0.7320241265359675, 0.5783918943996869, 0.7845784677056041, 0.9188222711563425, 0.96848251121776, 0.6080679551588213, 0.5002171607768038, 0.8382120017035606, 0.7559963628010409, 0.9810032149403483, 0.6274692210350543, 0.6934253398323381, 0.6023272740156342, 0.5193280245552592, 0.8055056376111238, 0.9166255413388651, 0.7884856966879166, 0.9719772417061978, 0.8394246971952835, 0.9297464557389015, 0.6187434019863827, 0.8717080748454218, 0.8693160845619954, 0.8119368531888582, 0.7906399144921217, 0.6598357894029541, 0.8258836758947328, 0.6467162704925633, 0.700124475642244, 0.8772843840892317, 0.6094761430973603, 0.7055447362813041, 0.9014591680407541, 0.8425432203263423, 0.7372131537045079, 0.9457413215833708, 0.5786326706943495, 0.7766404770363061, 0.5836020163995518, 0.5882379389434713, 0.7065681780157933, 0.8275580085362092, 0.7333808416043202, 0.7830849667587743, 0.5310616866029412, 0.6661990812849855, 0.9866817021506065, 0.9368513307568653, 0.7969248701311322, 0.5435516334209324, 0.7966496437007442, 0.9462768782002297, 0.633162677738013, 0.5843969491232377, 0.6743479782062761, 0.5100772474495734, 0.7341689814650865, 0.6298086467700228, 0.5902039264466891, 0.567955064457117, 0.9038891650273397, 0.7970028277790946, 0.565039114798324, 0.5768079064973313, 0.822318758710139, 0.8397685679556823, 0.9993938677965786, 0.9139547855019301, 0.5139517482807001, 0.6079513396173684, 0.8794287926760385, 0.6383440511553176, 0.9547869781845686, 0.9533770027836612, 0.9074990087622294, 0.6365743726796026, 0.5006555019733395, 0.5184107691597462, 0.594345944429149, 0.8564045791111584, 0.6588200278241148, 0.8285807386346393, 0.5423765926950155, 0.6852792232477587, 0.8649713392990999, 0.7895321391042296, 0.6724573297246634, 0.5940686130772529, 0.89816690563047, 0.6842420795431505, 0.694118864931538, 0.7263031226266654, 0.8498955426338188, 0.7383027591959315, 0.8851258333753371, 0.904955316061598, 0.6401615975813526, 0.804164745582301, 0.5357192475852781, 0.5762925566915941, 0.5426955779004973, 0.6931029628915666, 0.7487826093223475, 0.7776120523812333, 0.9873596036434971, 0.6276056892675334, 0.5526166854245657, 0.889470924266518, 0.8419780601022768, 0.6759585910331867, 0.8784519941873572, 0.9443390024553818, 0.7324530341071256, 0.7877791522591677, 0.7627412085179555, 0.5302186659901593, 0.6882786468790745, 0.5548351732934307, 0.9762624598931426, 0.6909799181202438, 0.9873595130488704, 0.75902407008831, 0.7128841750005397, 0.7739148487333243, 0.5502716371238563, 0.705134605177732, 0.6858144782088551, 0.9086976384575016, 0.6809805473395245, 0.7385773899983468, 0.7859034952215138, 0.8893469003274721, 0.9074825194519759, 0.8193945778575402, 0.6479313192671169, 0.9850605030644473, 0.9320309247596322, 0.774664463581742, 0.8201549734164784, 0.8980283094185099, 0.7100109526732059, 0.8435608557207332, 0.8545200637393338, 0.8867078914152199, 0.691054358060734, 0.914749767399855, 0.8639402319884465, 0.7857432549272987, 0.8417396800344229, 0.9865428101054511, 0.5354765879619807, 0.5536103983813878, 0.932619991975369, 0.7994832456387004, 0.668876707610889, 0.5436142031946285, 0.8437374635342112, 0.9851269064047055, 0.5527477454053901, 0.8342572463513847, 0.6456166567264645, 0.9664380887173232, 0.5872689289165447, 0.7423343173294181, 0.5635506912260276, 0.6009766871376925, 0.6974370916304452, 0.5795340711935226, 0.9304690281522902, 0.8081518744447534, 0.7296409146752816, 0.645534569168462, 0.962867756378669, 0.5884002382799667, 0.7725431966702292, 0.8259113460003236, 0.6978608072669445, 0.9440879480440301, 0.8216713031291953, 0.8482114988892568, 0.7333418345666025, 0.6725040281917766, 0.8064279402321218, 0.7329926360889676, 0.6015235428479896, 0.7015702004020938, 0.7864325434960158, 0.5928659070717214, 0.6433229813143979, 0.5082061848677685, 0.8761997886953019, 0.9955533510867443, 0.5474352252748051, 0.7647505625452009, 0.7557986719317376, 0.9262407425641183, 0.6615481112566886, 0.5674575968099875, 0.9121562604555038, 0.9576619507648584, 0.69690112414425, 0.8601410861650018, 0.6975306108885355, 0.6403423148535695, 0.5007940908171243, 0.9362446772899077, 0.8361326375296702, 0.8145676586767381, 0.6053668540033897, 0.8337331128569719, 0.5385125091364003, 0.6188894589055919, 0.983473268162451, 0.9351130728181336, 0.674156076921518, 0.7424655414208712, 0.9803583870517182, 0.6051920106845252, 0.8260302101666829, 0.8162041818236996, 0.9636556481948184, 0.5014043634313432, 0.5453234081131102, 0.5658440575026003, 0.6602827008166513, 0.8683936778447254, 0.5394244846260794, 0.5816039767319159, 0.6662333618789353, 0.5358948315426162, 0.7272991177628405, 0.7936022294369736, 0.9990361227957769, 0.5173036619680503, 0.6160055273244736, 0.8754800786074666, 0.6266795781504371, 0.9769957911332126, 0.6369768374148765, 0.5392365204183089, 0.9994526933524925, 0.9010345039065655, 0.5223708328730283, 0.7150268861904407, 0.958434121930518, 0.8053504353557425, 0.9078056429014751, 0.7780830564393366, 0.7539267714642771, 0.9317836055475786, 0.7702353132879403, 0.6327926812768963, 0.9621120285592584, 0.6522171372395273, 0.8450773389947464, 0.5471502011228311, 0.8418430613220551, 0.6492839528519505, 0.8964113347596332, 0.7534621192884102, 0.8987725894992785, 0.963492530184951, 0.8284531956429007, 0.6323635213373241, 0.9574171495094033, 0.7505532305497078, 0.5120419602958224, 0.7869664021292362, 0.777387182100505, 0.7227981640507903, 0.7746455565904447, 0.594632671042371, 0.8587568478240288, 0.5391220115008584, 0.6466986326467391, 0.8062636147613593, 0.7891028947268862, 0.6579752499947645, 0.6850812962209314, 0.8762439952778969, 0.761348887001938, 0.8216498544657529, 0.9780630841510898, 0.8591646794053471, 0.5454181397828022, 0.6834321276936597, 0.9867705764410165, 0.7625675707345297, 0.8020748587561364, 0.6507900156964439, 0.6023692905681174, 0.8370481877910063, 0.8244760069087883, 0.9606218078143365, 0.6849584816593324, 0.9904660818249733, 0.9863372884474957, 0.8148461083114042, 0.6995367431039688, 0.7294073844907916, 0.7355900311006592, 0.507350412894604, 0.5699174062069159, 0.7580983409233231, 0.6598952767231396, 0.8280073182484733, 0.8951351102051226, 0.5150183068937597, 0.9344174825915053, 0.8968491429284782, 0.6141672719237774, 0.5471381707213916, 0.7152798922179338, 0.9298496260627191, 0.8633373947925945, 0.7418190463753622, 0.7687065177527761, 0.8799784138697118, 0.6293906089294581, 0.7215590413272042, 0.7298188656458724, 0.7232531330685541, 0.5972433913522637, 0.9104799841655928, 0.6535920662222638, 0.7378575840917956, 0.5175606460695215, 0.8749469857161454, 0.9995246173443322, 0.7030749412217867, 0.5807340107482535, 0.5105787647173281, 0.9355846095029994, 0.5303279613778543, 0.5213464906627789, 0.6800516961844238, 0.605616316528544, 0.6943614796645802, 0.6906546939995025, 0.9657170793814746, 0.8592144886078947, 0.7043629004183267, 0.5432689889179076, 0.7172937402173096, 0.705910030151982, 0.9686201877205298, 0.526691826882181, 0.9836772528624498, 0.975554220605179, 0.9371354833547767, 0.7329720052180168, 0.629659701137357, 0.7148899264818918, 0.7859018345796858, 0.525066459363437, 0.9646160066098777, 0.9151208757092528, 0.9733215839439154, 0.9899713309790782, 0.5055745869174296, 0.9009287532560211, 0.7932629417386348, 0.6108373368690732, 0.9913172352570889, 0.8662510253522533, 0.7533379224102293, 0.5530296276096813, 0.8357045031276289, 0.7965002069976401, 0.5667470452645087, 0.6315464724323071, 0.6022801770043426, 0.948198797952101, 0.5788981662483048, 0.9405979599961067, 0.5813797326798626, 0.8898716605247017, 0.8130664884490553, 0.9206786939153759, 0.7220632412435455, 0.9236767739254144, 0.7569755742694104, 0.5116640080208101, 0.7863919589639432, 0.8873765727783743, 0.7642675084423026, 0.9310274747629337, 0.6115432302345791, 0.8011222270038799, 0.5106092297983574, 0.8798563239692777, 0.9630385032540394, 0.5502395781670637, 0.6415383817228042, 0.7376661471441361, 0.7282315198760944, 0.8439866691516629, 0.9740834582481921, 0.7656916834305252, 0.8257832812424959, 0.7951525993466576, 0.7520072717676087, 0.6604913177522252, 0.9805373838379747, 0.7917965813246794, 0.8159712235985437, 0.9497673578104433, 0.8468392104676967, 0.6575789407855035, 0.8883990877655115, 0.6250791315318488, 0.7289045802097227, 0.8899581613176196, 0.9716669746813233, 0.9682246982997986, 0.7751649049056553, 0.5899708803212003, 0.9729706553019082, 0.9294865759466016, 0.558983725745342, 0.6399642223503887, 0.9413976018102352, 0.8595768983637886, 0.9236337848435532, 0.7321531446388453, 0.7992327430230473, 0.9370599337473033, 0.5960776926465919, 0.7037374930628112, 0.6110031522389585, 0.9754628258683968, 0.6905007036088642, 0.8796517569782463, 0.8238835966290352, 0.7926514446766371, 0.9801293070497359, 0.8220252722989969, 0.7991524709444899, 0.8163153573551318, 0.6366505372589486, 0.8464935725286598, 0.6917986685834946, 0.8127162529915011, 0.8688417078150829, 0.7346651890040313, 0.6286472565459793, 0.5788450984860809, 0.6726898392579341, 0.9775035312527263, 0.5453841174567166, 0.5704675295667778, 0.5723808889902651, 0.5262139709939868, 0.9339784218802202, 0.7766146242429981, 0.6669431558508268, 0.6293327318757416, 0.7061676584860777, 0.5768423559660678, 0.9687703692974465, 0.8308721760711735, 0.5902092412658761, 0.9747457131365154, 0.8036886671185105, 0.7754340616592108, 0.9767609848389671, 0.9626907212213549, 0.7775568867837419, 0.7815368760822192, 0.9603906673831188, 0.5512855775491983, 0.7151502607911489, 0.6754192080730439, 0.7525390383398216, 0.9200022739885672, 0.766060992857535, 0.5745674385095323, 0.5112559947823638, 0.8017643450291392, 0.7332587629154288, 0.6244100525742877, 0.7870373067834823, 0.574696848401964, 0.5235514924759102, 0.8306812502882117, 0.7828084644888877, 0.5555423879491286, 0.656128199057731, 0.5994473410755747, 0.9684849428326974, 0.7337787887584808, 0.7309085575140464, 0.5719430484090979, 0.5577321946746605, 0.7727955792306092, 0.8699662260145566, 0.812735948251532, 0.9663184039773038, 0.7989759545564737, 0.8443593319158333, 0.6028840658154988, 0.8644875543243941, 0.9553783444746881, 0.6539764030858808, 0.7503449314502075, 0.8963813159667046, 0.5680691973810483, 0.6406853302406679, 0.5451907945216179, 0.7277370315018894, 0.98844853365349, 0.8719387023623819, 0.807099241604686, 0.8732166063915939, 0.6082011879990307, 0.8119614657846557, 0.7910589374007386, 0.8683897550464661, 0.5355999864053781, 0.7381703487589131, 0.6176282687460938, 0.9582097667982654, 0.6505971796681274, 0.8612052566603994, 0.5402791649307774, 0.6196226365840887, 0.6322689410233446, 0.9569139351167719, 0.7587493411846812, 0.9782333434474875, 0.5011824677285754, 0.5670714529250829, 0.502725617149681, 0.6820163248336117, 0.5152354703469887, 0.8671358613389133, 0.5509916068738737, 0.5588442607784649, 0.6494041594484379, 0.9811146151399928, 0.800687637208543, 0.6950150561747077, 0.8587739005937807, 0.5429406566619865, 0.7844186681879393, 0.7290338821487444, 0.7709981927736493, 0.8470247872085042, 0.7799418900957951, 0.5320921684256974, 0.7152940547750202, 0.5905407055400931, 0.7836312356148689, 0.8552957888643631, 0.7971658780990974, 0.901350522514438, 0.5828984234301451, 0.6418765504463396, 0.8269847275098929, 0.551323277198307, 0.6786401106653241, 0.7567618931443874, 0.8902687402122645, 0.6710173793739407, 0.5613909822618848, 0.5142340577188652, 0.708205315934695, 0.625185045081054, 0.8943110299902282, 0.995520601681635, 0.7123173018854758, 0.7089569176607575, 0.6900145755820772, 0.8819245417021908, 0.7897391967723987, 0.8276291236900528, 0.6010234362790992, 0.7656165446964285, 0.7598952249266886, 0.865073542233229, 0.853238994673574, 0.7683908674857949, 0.7512799041367751, 0.5153533503255361, 0.9024830630358746, 0.7751084862675888, 0.7680668420830647, 0.8188942561142873, 0.9868182195277053, 0.8920961132457766, 0.7301921952409545, 0.6101989336399378, 0.6083909352918015, 0.7824958314109192, 0.9980892178540454, 0.8645169566962191, 0.669805939978017, 0.6031726311616001, 0.5083416947448509, 0.8072304717097063, 0.7895992630528816, 0.8632037984701131, 0.7810526661768871, 0.5879635878760315, 0.9012179490203727, 0.5541583550869257, 0.6084218993941484, 0.606044093473667, 0.7441928494562735, 0.9558183078557778, 0.6916167931054412, 0.9362603222067876, 0.9656634506603388, 0.5495172915441362, 0.8245139547443933, 0.6927216003350025, 0.5629867840058705, 0.8072602073403596, 0.7482228653779501, 0.978595001561348, 0.6412785692221822, 0.7652519353448202, 0.5485196730533133, 0.6224944977370748, 0.6938962448690138, 0.5370369598806413, 0.8681467331021047, 0.7231709751974782, 0.8629069807956011, 0.5686682632544838, 0.8551760319218267, 0.5076338638937304, 0.8401334507785557, 0.5610323176229459, 0.6348219879874628, 0.7575329168206735, 0.6472417303341322, 0.6765126417731618, 0.5126141118960125, 0.5000544458887732, 0.6391924112318902, 0.6145330446454773, 0.6873511597130354, 0.9759610304544273, 0.542197564228541, 0.9451757094183348, 0.6541829316786689, 0.6023047769818719, 0.5285989954833189, 0.5933117439108893, 0.9658833160717379, 0.9524194489617586, 0.9507736934401056, 0.7307216777190613, 0.6156643599689944, 0.6246613362141884, 0.5486528551527005, 0.8415550873569476, 0.5753938409849118, 0.8615955081267455, 0.661838838572878, 0.5543303963025116, 0.6117727134949003, 0.741518226384867, 0.8610343563924413, 0.6295053306134606, 0.6356712476387631, 0.9504612183275014, 0.7458738753097536, 0.9345324027702351, 0.9193029767384049, 0.9363751657154176, 0.9164100364363537, 0.6408190002754819, 0.9596304890074913, 0.9891262007182366, 0.9153799822048837, 0.8323497488119244, 0.9283952100402411, 0.791274504251984, 0.6104986422582966, 0.8597918097167044, 0.7913301101226518, 0.8869437892036249, 0.7117268150777469, 0.8762600222188016, 0.7657465591557728, 0.725390347970873, 0.6229456289623376, 0.8440453917043256, 0.7300384776507552, 0.9011290527818347, 0.9032099188197824, 0.82362626589771, 0.7554618518517577, 0.7763805198592579, 0.8480443082524312, 0.9631352936291453, 0.6566559592418189, 0.8518952532845643, 0.9960825935404491, 0.8866922183536898, 0.8505595782284804, 0.9175107539618683, 0.5136102326098884, 0.819269181433276, 0.8178995612031563, 0.9581275060645347, 0.6465291333742588, 0.562123359536206, 0.9879485660894713, 0.6802884500555366, 0.866108910151194, 0.5898890991348908, 0.643837669803009, 0.7656202066344553, 0.5939702375424082, 0.9373222494362028, 0.5906119319864603, 0.6732096902146306, 0.8446516127970075, 0.6666456840256119, 0.5367145268690126, 0.6623021722878955, 0.6976315632088006, 0.8265450359234472, 0.9875095337987883, 0.5378296498167987, 0.7775667747325051, 0.6793156982756683, 0.6948649410439719, 0.8047319920022062, 0.9412532896052819, 0.776953569962559, 0.991205347979143, 0.5928471291120021, 0.8022991255835403, 0.7760747921549596, 0.8867099547703111, 0.5576341243747691, 0.5518825545419412, 0.9548849303535838, 0.8581095713571967, 0.5074755076129118, 0.5977370333349742, 0.8750046876058972, 0.9020399010147933, 0.8387980277249447, 0.8106035363254196, 0.9212186185191957, 0.9391711453090172, 0.5390070599748816, 0.6608018629652386, 0.7655125947472339, 0.9708184359623173, 0.590693348960359, 0.7862087785722736, 0.6441409830063028, 0.5008052722102312, 0.7384687714434077, 0.5911874722292842, 0.6774988391522146, 0.6907126628272973, 0.8926647143837338, 0.6866669580495377, 0.8781483963641299, 0.6337080485614955, 0.7200939920432303, 0.812705134136932, 0.7029096733669589, 0.9811845728002306, 0.7590896342590188, 0.6448760972536385, 0.6280843038499961, 0.7399059235716181, 0.8603135766252603, 0.9128600101644695, 0.7052085803154611, 0.8455735010488927, 0.5363859012826401, 0.7798039653113329, 0.5310549623122882, 0.7466680024175303, 0.5098530300500661, 0.783972384863904, 0.6073703775729211, 0.9637886123535708, 0.6386014568755198, 0.9962829817739209, 0.7006848453119531, 0.8938754344684106, 0.5183177612908293, 0.5047509086936736, 0.6546528335424853, 0.6320380834831285, 0.8545680459461127, 0.993036429153513, 0.9870535134155176, 0.7795500348396422, 0.9156836798600199, 0.9697170948818712, 0.8801815664372785, 0.5963004246395127, 0.8850315869798864, 0.7318898198888806, 0.8144373451578149, 0.8162368663707751, 0.7932343328428788, 0.8920004382635573, 0.7241435280649483, 0.6084192692942684, 0.7833002719437303, 0.5241206998934596, 0.6024909864327379, 0.5414351440692933, 0.6431410105510962, 0.9021759867122419, 0.669396180121939, 0.624583838777853, 0.5864584065481547, 0.5095128538273441, 0.8284743459098153, 0.7595255844499291, 0.8447741987181295, 0.9717265437631146, 0.829165354027718, 0.7866148108821227, 0.7852483894470799, 0.5504797554844382, 0.8651206538413767, 0.594313608441277, 0.7751333376249541, 0.6689329952439504, 0.5160209493565175, 0.8286554685956817, 0.582894444696826, 0.7611700366924263, 0.9391137271071005, 0.712682152357685, 0.5710884544835559, 0.716118979558616, 0.7984292943393791, 0.7590208292369961, 0.761293163470087, 0.9882563757241326, 0.9979750416449391, 0.6492602641053455, 0.79014518363303, 0.5581123532234752, 0.8493989362711107, 0.5879927803554915, 0.8470234301498736, 0.8459289028690335, 0.5598371282644873, 0.936678028168175, 0.763754658232159, 0.5987127680085786, 0.7561316849789642, 0.6491674181119877, 0.85225232054974, 0.8989499168239399, 0.5721248326157167, 0.5288667410971116, 0.646677749956752, 0.5007822592937312, 0.9668385810371891, 0.7708342508966083, 0.8761938608990201, 0.5378029591793672, 0.902648402287126, 0.5704762653192608, 0.5643851981009622, 0.8415048774928005, 0.7295230151142001, 0.9369082448088099, 0.5284879049454887, 0.9743018368718362, 0.9424091755581955, 0.9968245106502971, 0.9105702645243681, 0.9545832815643491, 0.8405605458568683, 0.6919282567623612, 0.7880195052834709, 0.9092437916798343, 0.7761000998898485, 0.646016753209447, 0.8226305110105584, 0.9192020959640721, 0.9599013662937916, 0.8906150244604238, 0.8272077250924155, 0.640550247846692, 0.8880959380568185, 0.726300233418832, 0.9829747338018882, 0.9807280763576807, 0.679123682244773, 0.754845819134628, 0.7824457144769396, 0.8201319161996494, 0.7727032858278688, 0.6814581635620609, 0.9852947684375339, 0.7347897541582161, 0.9785015576853835, 0.7163700163614435, 0.6454205005809983, 0.5593024025648337, 0.8243814343107647, 0.9039229980482222, 0.8876892544100556, 0.8437174077371422, 0.5694152152256782, 0.6446360564998158, 0.7410035004759179, 0.8815177864870225, 0.8400079329594049, 0.841520517820611, 0.9373156905944605, 0.5534216017414648, 0.9017074042069865, 0.9276262919258775, 0.8901773854177751, 0.9725746224322387, 0.6242635129579976, 0.8515666371332702, 0.9184682254517861, 0.9174878738206376, 0.9373557580853139, 0.5883643469750717, 0.7044399660156019, 0.7198872657283684, 0.9188379594015783, 0.8837393965943106, 0.9954925695806438, 0.615283666216933, 0.817555799337101, 0.9027848947641623, 0.9118902969900131, 0.5832730705341627, 0.9809224690523597, 0.7684977266614947, 0.606319222259443, 0.9303242231418954, 0.8199018793083646, 0.7068951482002964, 0.6408729226492806, 0.9827033420552722, 0.7004990544371901, 0.8520861005156943, 0.6952709996936692, 0.6130034569840129, 0.9785079454015446, 0.6762735425139557, 0.832699230242113, 0.9200818688895485, 0.7774742043854813, 0.655825018597266, 0.593101870846536, 0.6742171886518762, 0.7119997692809887, 0.6813576231333922, 0.8613167918213392, 0.9127859368406774, 0.8687575343948916, 0.5235836101178006, 0.6002242997724856, 0.9857201518641232, 0.5828033671511743, 0.7854966376923618, 0.9470050859666297, 0.7627857161702725, 0.853641064622269, 0.7159480370391818, 0.8392353018862624, 0.5619631778682074, 0.9026906140615671, 0.9456386594432983, 0.8820667489490459, 0.5423200734726886, 0.8421092388034219, 0.9551830892654651, 0.5093509105123395, 0.9767617316005648, 0.6650307771205662, 0.5595850154175466, 0.587440658467464, 0.6753278744552206, 0.958931039594215, 0.6535259670872093, 0.7096381646783887, 0.6277857504420754, 0.9522727923502934, 0.9764294371379182, 0.6124788396653507, 0.5293028108560129, 0.6740316920225743, 0.5571818563883721, 0.8975228002572393, 0.7501081654979883, 0.5457320701350014, 0.9699081700107779, 0.5544098102249904, 0.6186225654231501, 0.6912617682694147, 0.7428519548346154, 0.6856637000141437, 0.6986462886261167, 0.7968960912709915, 0.6543227480365332, 0.8095314744728891, 0.9198057426035455, 0.8121548340373952, 0.8376445576364167, 0.578000090720149, 0.8351968526322462, 0.845065053377774, 0.6329174793154388, 0.8628828619357178, 0.5059083342534145, 0.8482850781883284, 0.5832695262832082, 0.6962752986558788, 0.6031395315924994, 0.7889449146078038, 0.8944476627006457, 0.8670635939394948, 0.584287540771032, 0.5174496704657887, 0.6369404755619001, 0.7816439038937077, 0.5596168074111871, 0.8213051807887513, 0.8596362910660327, 0.580942929779519, 0.8411276895134749, 0.8101260069438277, 0.7522841238278777, 0.717639466488893, 0.817222608555318, 0.6118553940193727, 0.8025389091699524, 0.7134756337994942, 0.574752368129047, 0.7578820136020252, 0.5133676970191687, 0.9427264927628254, 0.6170228669007166, 0.6532380985973723, 0.8039909507064131, 0.8245921668124245, 0.6338225877610361, 0.8537600922960495, 0.7950650887262131, 0.5863861075961385, 0.5764082988696102, 0.5400546531580556, 0.9156603972823324, 0.8049169706794916, 0.6582607211484113, 0.5713226698587488, 0.5032532332406358, 0.571077902763167, 0.6385397656104432, 0.9225469059582159, 0.9706858933357279, 0.751789155266277, 0.8532705740711374, 0.7583616942070499, 0.9987661563143604, 0.9430532778219222, 0.8403275847525332, 0.6018660375040048, 0.7287067437031884, 0.9467730080067279, 0.654737548799474, 0.6298690627526152, 0.737234428830216, 0.874289808117726, 0.9620929150893386, 0.6618640120763251, 0.5638657457646603, 0.9139831840741022, 0.9518166888267445, 0.7441716715522733, 0.7344669685719671, 0.9983063200678579, 0.5399267393109874, 0.6611555347757778, 0.7591136715238226, 0.723676416130284, 0.6767509729833917, 0.9813653564030362, 0.7726553846890172, 0.5816561108381577, 0.6024258027901925, 0.9456916724275282, 0.9774335990122973, 0.5283984626759357, 0.9042961223487926, 0.5022690055492055, 0.6756314325524142, 0.9667054917332769, 0.9848423497556398, 0.6950248005874624, 0.6179797814576569, 0.7331473546590797, 0.6207816743279159, 0.5910260989700268, 0.9612855681119341, 0.7047021523178669, 0.5959154838932159, 0.7123837008712846, 0.87042391578978, 0.8857066753578753, 0.5769582180746666, 0.7475790423292894, 0.764858380232037, 0.955543086955176, 0.5268530141529342, 0.7678996815531062, 0.5634608550947762, 0.8027394881289208, 0.870411902233257, 0.573511737295169, 0.6947873611367427, 0.8159913072279208, 0.525297145688826, 0.5502201783443397, 0.7497087123445059, 0.6547266009377928, 0.8300591885510935, 0.9274756263728214, 0.6395281688068364, 0.6823649942450963, 0.610303871764811, 0.9235050089720078, 0.9553983678702148, 0.5002784485611336, 0.5271785019745907, 0.6465719080559298, 0.6716489698465292, 0.8587083825756112, 0.9708408375878492, 0.9252574141564021, 0.7670835051882503, 0.7890679534678824, 0.546261975408687, 0.7217908211829529, 0.6679159676456553, 0.8446937407997512, 0.7053637034097102, 0.8063119312332456, 0.6642971590094892, 0.6654017579915884, 0.8842506685952596, 0.8140337506026833, 0.509060751286859, 0.6694100376127896, 0.6359034889626888, 0.6245701074440795, 0.5596329315620415, 0.698654466242326, 0.9931620670506498, 0.7255360915870346, 0.7263963237348035, 0.7201027754822495, 0.5597743193891653, 0.634793990211211, 0.6412236402037296, 0.9756889716748093, 0.6594945612515553, 0.6547024448504597, 0.5386669911320662, 0.9989577992956148, 0.5689964837155195, 0.8363793812710822, 0.9191113431168307, 0.6816971029902487, 0.5148038632829655, 0.6146599156326424, 0.9429266624325287, 0.9876522755897155, 0.7430896173295565, 0.510142253106855, 0.7673459195058803, 0.9933773003409069, 0.658150564027092, 0.6951927804124894, 0.8722102181468595, 0.589860933048041, 0.5299265325990199, 0.6138462174162655, 0.5457577252199305, 0.5887020359008264, 0.8243501960042927, 0.7564156188915585, 0.8920771616295675, 0.7850862588245207, 0.694017141620709, 0.8744786612961739, 0.7656309686902196, 0.6654326246649871, 0.5107228375303184, 0.9979604302663101, 0.9647066766710252, 0.7706552999071888, 0.6598477436729979, 0.9029446500588121, 0.78146995462001, 0.6537469564113858, 0.7178276816441352, 0.8070925441454652, 0.5979232561567294, 0.7970616000459674, 0.841524381629661, 0.8325898413304185, 0.8820543380152728, 0.6231978172589713, 0.790115886645641, 0.8794673912204383, 0.7396724615932604, 0.8131160330709144, 0.857087317834475, 0.7136297901548603, 0.9276253263439336, 0.6456362571708043, 0.5194421709810852, 0.9271835706304388, 0.8318212222016816, 0.5579484951294916, 0.963254444630967, 0.5193480340027586, 0.9396611403209402, 0.6747721684297446, 0.5479676167894951, 0.5519339882982726, 0.9874029561585719, 0.8339633110063711, 0.691276054514063, 0.9244344313808817, 0.8210438019502044, 0.7440387729846177, 0.9798248562725168, 0.8380651437018447, 0.5777539349145211, 0.748857398989764, 0.6480711612145694, 0.9930575536341228, 0.9535411286703431, 0.895091924562832, 0.9375922685868809, 0.7587849927966337, 0.6807122331675917, 0.6867226035958773, 0.6638115129184776, 0.9014834471523339, 0.7725554277168809, 0.6974852240481348, 0.9795949840574509, 0.6845861156170308, 0.9273984781196002, 0.5955937540031776, 0.8800035478728708, 0.7701433639331361, 0.5439673896399635, 0.7389381985078012, 0.6035789671234473, 0.9231204879623969, 0.6547163520880168, 0.7232307144216805, 0.5987592545836633, 0.717725067323377, 0.9398512987782763, 0.702497554804825, 0.5682692095079929, 0.9451284463772083, 0.8088328905362516, 0.7227413782349215, 0.7742846182919549, 0.7682808358836339, 0.5603163312029356, 0.6533818069657248, 0.5125185920377717, 0.6845347148523551, 0.9021284525773072, 0.6443502389530567, 0.5073568099497552, 0.9502096430100162, 0.8771651978374199, 0.7181254796039483, 0.9921322454915753, 0.7953690491442877, 0.8768059444944495, 0.7540325543527193, 0.9831731105992833, 0.9026521790364689, 0.718423269008208, 0.8124435195013775, 0.7684217773100777, 0.8909056895796087, 0.8911213144052562, 0.7555780577676606, 0.5504441556490247, 0.7143291194660379, 0.9491230856953635, 0.9408416100775889, 0.5143860748863243, 0.8209382746933378, 0.9296059674936439, 0.6001119375670102, 0.50738061613264, 0.9529313633287524, 0.6949832037473871, 0.6944666973864406, 0.5535288750536229, 0.965459451655187, 0.5926765130088862, 0.6298745973083053, 0.9970616095600091, 0.815446803090569, 0.7271401811050964, 0.5236360462831405, 0.7335317784829777, 0.7772604584876679, 0.9231505030099685, 0.621713150053558, 0.6543326289571565, 0.740140863985356, 0.5484238359059569, 0.9785785548275301, 0.6584257383178476, 0.7079760449270959, 0.8037669138387222, 0.8941328522481355, 0.6543908812486303, 0.7393740068092107, 0.8859642135217387, 0.7962477647024284, 0.606307096474506, 0.656840677862526, 0.6960039127192413, 0.6539276850979336, 0.9093238646678847, 0.557634163261642, 0.8791917575017265, 0.9511049040386591, 0.507839037703409, 0.7482705527768085, 0.6323131069284785, 0.9094237930345073, 0.6923945903480132, 0.9070111034772212, 0.5296864926054439, 0.6243157047450811, 0.8720033973357019, 0.5685711622022349, 0.6673652687463912, 0.5605153276950536, 0.9979831216694317, 0.6969286833403192, 0.6146449780543048, 0.8624597660463598, 0.6783266089222917, 0.8821121057641638, 0.6375377940996417, 0.8346544990320224, 0.8137199289160331, 0.8597943411675011, 0.9243336950846021, 0.875176392431543, 0.8014219711034885, 0.7819379974950732, 0.7812463046177858, 0.5625899879725954, 0.8297382196070757, 0.6821069590062891, 0.5356563662402702, 0.5987664190882236, 0.8419479852655102, 0.9619661638908138, 0.6647220054667535, 0.9238212177510183, 0.5848807292517402, 0.7435081153117493, 0.9694576867706447, 0.5970729673259001, 0.6354238982822362, 0.857109443295907, 0.6798238123926867, 0.5370172418458262, 0.8370886746493451, 0.8054228340049181, 0.7763841169038368, 0.6577312816123682, 0.5578458427804185, 0.763524410311248, 0.8079098932320647, 0.5829296699168522, 0.8079684260614606, 0.6039058671438358, 0.5755528141868026, 0.7463402515478332, 0.7950324943131547, 0.5287412781143315, 0.7501491606441746, 0.7474205081589869, 0.6030177577644136, 0.5058274433148158, 0.9666702513876595, 0.5392285079580946, 0.9359658260652115, 0.9178506907725674, 0.7379853794385627, 0.8853935986509796, 0.8126471884768803, 0.7554840536490847, 0.9303578561189783, 0.7570778402956488, 0.9008690183568777, 0.8206167481607445, 0.8968117897460712, 0.9291731414807458, 0.575271762324606, 0.8372315989515691, 0.8217619840800349, 0.7407088300427953, 0.6658965263359949, 0.9192345830816013, 0.8571002904218117, 0.813133337647075, 0.6650197310773593, 0.8341730674302531, 0.7423878331383096, 0.5770502346679934, 0.8212906343458666, 0.6991520588916043, 0.7187442990510879, 0.575894065957933, 0.5936932551990483, 0.9408213150376157, 0.50633432874545, 0.5396371717176184, 0.7915352328231153, 0.9450462316495762, 0.6994209843921522, 0.7018577331423306, 0.6300868390477011, 0.5282443643599071, 0.7848025810718389, 0.5244885569581459, 0.9664783641970736, 0.7248397081573317, 0.5425991724667742, 0.5487424796913093, 0.9118916352437063, 0.6326306286297143, 0.5959946413066068, 0.5820849704214119, 0.944890264229003, 0.8437570974784527, 0.5200293908082838, 0.5787917363079493, 0.5642909449000519, 0.6408849358536566, 0.7474905947026704, 0.5086695501069459, 0.6699695523582301, 0.9154882492893236, 0.5539310148910047, 0.9388421295148996, 0.5571306507316675, 0.7613808053548985, 0.9299284061551693, 0.7329773676026217, 0.959403548380108, 0.6849514799361233, 0.5508209518092121, 0.6748995849766923, 0.8388748926528953, 0.9873051277457745, 0.5016824341240823, 0.8652432077333061, 0.8218290797319125, 0.9182016460358631, 0.7071425751049334, 0.7142440263849097, 0.9555105152602497, 0.9354805432384595, 0.7986681083696341, 0.9255346651833833, 0.9684658496529333, 0.6943355609320603, 0.6286321382679192, 0.9019664790209883, 0.9362790293057113, 0.5289744464017021, 0.6253468043437302, 0.6149265459590838, 0.5047732460191912, 0.5551181976510855, 0.8880262788021237, 0.8364050349599881, 0.5456517074655802, 0.614337569039473, 0.5482609679356881, 0.6342026871425906, 0.8208369864111387, 0.757509472533682, 0.5540820524289842, 0.9571555041411219, 0.9118420031997254, 0.5621132997338608, 0.9824437275808546, 0.6054977703054799, 0.6282805518788313, 0.5772269786505018, 0.5216955369423661, 0.6058662917464368, 0.5286596789398921, 0.902559025505014, 0.7974734280256239, 0.7459337557238135, 0.8148498608162342, 0.5996109756772371, 0.8021123330495903, 0.6197810173725012, 0.762284204132385, 0.6294264936236726, 0.7439171236975243, 0.506700318350336, 0.8992665147353249, 0.9775225337924653, 0.7818807737874834, 0.8216191606723205, 0.9724238468367427, 0.9940350207987181, 0.7478556175318367, 0.8198701796797898, 0.7872651288909529, 0.7748471326581539, 0.6806933105377799, 0.9239464479253019, 0.5932197484375452, 0.7706878289515401, 0.5648966280953421, 0.7768886219064863, 0.6802377414510884, 0.8401183740631866, 0.5843642425492417, 0.5591836601838369, 0.925941798663982, 0.5342846658276016, 0.5552858946602162, 0.5515055534003793, 0.6469615010590253, 0.7429475547185372, 0.5313836929670098, 0.5315262159317167, 0.7329101194367519, 0.7993867671394833, 0.989814862072641, 0.9994628897741942, 0.9330166132057411, 0.917180760804044, 0.7497822205702203, 0.711663599075687, 0.8327815754112335, 0.6519970352341933, 0.9660864681679378, 0.6343969754156827, 0.9342606272502547, 0.527179054864408, 0.9199800145182204, 0.9731305976909627, 0.762844404959876, 0.9735762249890925, 0.9069980551701784, 0.7713648405248279, 0.8272306149857886, 0.8122479031963853, 0.88046184281297, 0.8501346130489982, 0.6152076900892004, 0.5069829017995777, 0.735894267152951, 0.9490899613661978, 0.7910902075436772, 0.984504952900398, 0.9183859538549954, 0.9722462792171325, 0.596071251954458, 0.7451092215659011, 0.9651866340019499, 0.9644397023829684, 0.9203279654130669, 0.9477956374537809, 0.8983520271056181, 0.7884352720092184, 0.8502232389742617, 0.606920657140898, 0.889956848542452, 0.7353202013092199, 0.7302163999044842, 0.5151071882515873, 0.7895056185248401, 0.8965247015049636, 0.9786946785818238, 0.6790605144584048, 0.880837416330932, 0.8658615428781842, 0.9082042808975063, 0.8326204455218946, 0.9475656652691216, 0.6403505628952388, 0.5876385074542418, 0.6531026687443702, 0.699999089105688, 0.8302519094349939, 0.5857254635738498, 0.7790757786327085, 0.8823912782279965, 0.9214154491597883, 0.7283615184695518, 0.572591885575124, 0.6648706254943351, 0.9439095672733605, 0.5253407672500108, 0.7863690515129997, 0.5455443278861344, 0.6438136344667222, 0.9374785353493906, 0.8972977047308985, 0.6004819835522256, 0.6395590259775534, 0.8987983499976934, 0.9675072056319514, 0.5633308293726884, 0.8883649203832633, 0.5829654476253352, 0.5013164107323628, 0.7002038083946834, 0.8027518369398386, 0.7215795913003811, 0.5859748694978305, 0.7470136911412459, 0.5582081240957555, 0.799261501548656, 0.6686134702916434, 0.5208705942370586, 0.7449911940535414, 0.8950199102343919, 0.7134236429211035, 0.5779958710026889, 0.9368402820634836, 0.8502208813441919, 0.8491445101319519, 0.7513150657356016, 0.7172601775233629, 0.547086084104076, 0.8632288276386928, 0.7585948127655777, 0.891218077092473, 0.6311271173774031, 0.5241552109128934, 0.5803068018549067, 0.7238705053994479, 0.9661773491980747, 0.8517562205993452, 0.711786301185078, 0.8296536054881389, 0.8558790217822125, 0.5323903899360951, 0.8262630994857088, 0.6903907295961049, 0.7469083552118995, 0.8342707665813881, 0.5462122200305988, 0.8672879710074772, 0.5758876419313687, 0.869605157463223, 0.6592178551205133, 0.6973622229466734, 0.5444106541748334, 0.9909327421621097, 0.8996499604197771, 0.768465382292338, 0.5776504464538238, 0.8114383726714889, 0.7593553266364711, 0.6314834660656488, 0.6918555032946907, 0.700083151240229, 0.9681912256954939, 0.7846189051407151, 0.516513730913807, 0.7023207431215169, 0.7321651052498201, 0.7940881390388713, 0.9372859755510003, 0.9023663558219934, 0.7555736982410377, 0.8905900598157874, 0.8865461570653275, 0.7337637966758268, 0.6816429747871868, 0.5452709612913318, 0.7197302428770824, 0.9438830610381373, 0.9291262762784609, 0.7302872935553663, 0.7929056794151729, 0.5013611390274417, 0.5372735738466381, 0.9153212080882209, 0.9583464807849685, 0.7037102267809356, 0.5598576553428354, 0.8863800357403175, 0.9724423318814701, 0.9564224447330456, 0.8677905698760117, 0.9003301494165303, 0.5657129447860059, 0.798467791704494, 0.9401498438014178, 0.6823359766613204, 0.5169539393374736, 0.7342695165754785, 0.795095758702276, 0.9614107155586284, 0.8670781239460646, 0.8906947141397663, 0.6614170704904325, 0.859461661479137, 0.6665389064922671, 0.9693794334437136, 0.6139655511434061, 0.9288914488787332, 0.5396670982855992, 0.5624244361579509, 0.5469663494910185, 0.5236062110442327, 0.5152344446349895, 0.5296556394241256, 0.8443916034898653, 0.797509423693785, 0.7713180227232399, 0.8402495278829447, 0.8336262728326702, 0.8370090884910961, 0.9281733845509879, 0.7863816078493793, 0.8846075440145162, 0.8428802350410953, 0.9899069857483777, 0.676146913458611, 0.5069454353593996, 0.5037838546347488, 0.6610588010800987, 0.8708305864786401, 0.5229473107472871, 0.7186536996502952, 0.9543379527341599, 0.5244920026126567, 0.7766618825933342, 0.7608328615256252, 0.8831102953474137, 0.6940810220216176, 0.5333676146512109, 0.9761363101399565, 0.6378405154218351, 0.6082935140314678, 0.981202186455274, 0.8245352685285013, 0.6856205466565846, 0.7403575396246995, 0.6906158501879436, 0.7205168960064088, 0.8098689935826404, 0.982614484586956, 0.5883568660391013, 0.9222524734307183, 0.5446886284894845, 0.7929076054618344, 0.7941175390618026, 0.9832317130076127, 0.5240559639585616, 0.5991277846742225, 0.5378314021393389, 0.7833053173354318, 0.5155962746491738, 0.6578837701459107, 0.7338072069374738, 0.6148064664736551, 0.8511326317298731, 0.650017395123197, 0.84438605166194, 0.8804958327061956, 0.965081814330646, 0.6435326947874628, 0.6859080412011882, 0.7422444962935304, 0.5269780803535288, 0.6027197927652561, 0.5527556681128968, 0.8256191392220095, 0.852553880327363, 0.8575192571670468, 0.9097911376931316, 0.7782762919068716, 0.9968082332412347, 0.9881974708156538, 0.9995806799412106, 0.767991853175288, 0.7444533876419199, 0.8394174196445332, 0.8078678404281556, 0.9068389036251978, 0.8477362376140594, 0.5284009390700173, 0.5781693972964606, 0.8041474480683733, 0.5680171668448175, 0.819848096520603, 0.9545895895616169, 0.5533396127084483, 0.5834213793694355, 0.5051049214741941, 0.7664986609305161, 0.8430453215822035, 0.6094766426536279, 0.6831079862056135, 0.6259620571407525, 0.5474972135490375, 0.7127406197928766, 0.861550668606208, 0.8523766113835715, 0.8521930711225006, 0.9790451983107569, 0.7385221557574319, 0.5234069651293946, 0.7205098947606349, 0.8249448851673404, 0.7659185192129242, 0.8303847036490912, 0.5622555130292365, 0.9308027611777011, 0.5616539888537022, 0.7319383197954372, 0.5061269943029434, 0.9426735312079031, 0.7826005559391673, 0.9197263623481077, 0.7100242324565307, 0.7560394523468977, 0.8550501242571193, 0.796814928254245, 0.785994766090303, 0.9248928556152485, 0.8179112362832484, 0.6449497842652434, 0.6089001159333592, 0.5420393736598408, 0.6826536958815741, 0.8801436649474956, 0.6654322893816281, 0.8953558094437972, 0.8015779510584211, 0.7640023620144297, 0.8091059867026058, 0.5991964845073501, 0.9382272364814858, 0.6143011320040478, 0.8730869795622367, 0.5150515353100726, 0.6393414364501309, 0.7734783804714509, 0.7046863886661519, 0.9052940937732548, 0.7796985060243291, 0.6074647520555484, 0.6365357790335463, 0.8385112000984151, 0.8732143714642794, 0.7049051078727842, 0.9572401676467395, 0.9618408715772635, 0.8415257754437142, 0.9554688475078221, 0.5285860774285429, 0.962776106411459, 0.8031072972268947, 0.7945445291217914, 0.6977790422882477, 0.6762561163923575, 0.8314563335555931, 0.600706334214631, 0.8154947812910812, 0.5981870835882845, 0.8753222927491456, 0.5908008990640313, 0.8580794515403676, 0.6413665017230687, 0.6986033114615935, 0.8483254093575165, 0.6723660076982181, 0.8154656465110323, 0.7987938607059342, 0.770209206438285, 0.7464233964515289, 0.8561073756584063, 0.649902106066766, 0.9831066661186172, 0.8800623782776971, 0.617635958547702, 0.7130346521069819, 0.7619438378163561, 0.6250207113316084, 0.7638354012065066, 0.823852852952252, 0.7735471961279943, 0.5369002481090861, 0.6211808505561002, 0.8982083556787313, 0.6718427710895418, 0.9280130600617931, 0.8140280142061238, 0.9679206396033802, 0.8838050367726409, 0.7205677020170126, 0.9425354222404121, 0.7020785062668413, 0.747832714913678, 0.5640599535520416, 0.6199108087754157, 0.660880798016565, 0.6446472508705119, 0.9341524751004308, 0.6246645876994303, 0.8511955223915197, 0.9131765111097774, 0.9674797758822187, 0.8358580718405626, 0.6503799016783753, 0.9156610509271208, 0.6719442005216296, 0.9168411041564094, 0.9823782423757811, 0.7943192397570101, 0.8002030534718996, 0.6138005830285533, 0.9966532879246821, 0.9218142202060416, 0.6111047832272472, 0.5107886273384015, 0.7066643591009043, 0.5324804976936317, 0.782254768451019, 0.6926906483442623, 0.7019715312380815, 0.9571238459454776, 0.9418624921079136, 0.903331917647665, 0.8965127748591281, 0.9928844887655248, 0.7509821302376921, 0.9470496430460422, 0.7400790151957862, 0.5589455059997835, 0.9112044751261599, 0.8732069319444539, 0.8852361901058599, 0.8612065823880574, 0.5962290262854784, 0.6946276316775621, 0.6097538003846591, 0.8005141272637994, 0.5823798928930293, 0.6260994393552735, 0.5832317825084814, 0.6472333666934127, 0.8132164869195939, 0.9510345406422426, 0.525910425617248, 0.8729234904567376, 0.5338493268761877, 0.9957678897732622, 0.76522317293978, 0.5954152993485142, 0.5753687577102655, 0.8076171778553736, 0.7243259231349843, 0.8664092857301835, 0.997002745565357, 0.7548616581381258, 0.926386621110858, 0.5613188842612256, 0.9274671419506799, 0.8423049882893523, 0.7130138885216316, 0.6479984036035871, 0.7491863792955296, 0.5923775471672915, 0.8015792819504799, 0.5154502153370468, 0.5514992046960526, 0.7312015066162371, 0.7892285051959617, 0.9738067271452171, 0.93761537396627, 0.5888392215891104, 0.812357962293455, 0.8895170377953473, 0.9384563892587261, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0, 50000.0};
int h_B[]= {
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, 866, 868, 870, 872, 874, 876, 878, 880, 882, 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 904, 906, 908, 910, 912, 914, 916, 918, 920, 922, 924, 926, 928, 930, 932, 934, 936, 938, 940, 942, 944, 946, 948, 950, 952, 954, 956, 958, 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1220, 1222, 1224, 1226, 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, 1244, 1246, 1248, 1250, 1252, 1254, 1256, 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368, 1370, 1372, 1374, 1376, 1378, 1380, 1382, 1384, 1386, 1388, 1390, 1392, 1394, 1396, 1398, 1400, 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474, 1476, 1478, 1480, 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496, 1498, 1500, 1502, 1504, 1506, 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534, 1536, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592, 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722, 1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1742, 1744, 1746, 1748, 1750, 1752, 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768, 1770, 1772, 1774, 1776, 1778, 1780, 1782, 1784, 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816, 1818, 1820, 1822, 1824, 1826, 1828, 1830, 1832, 1834, 1836, 1838, 1840, 1842, 1844, 1846, 1848, 1850, 1852, 1854, 1856, 1858, 1860, 1862, 1864, 1866, 1868, 1870, 1872, 1874, 1876, 1878, 1880, 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896, 1898, 1900, 1902, 1904, 1906, 1908, 1910, 1912, 1914, 1916, 1918, 1920, 1922, 1924, 1926, 1928, 1930, 1932, 1934, 1936, 1938, 1940, 1942, 1944, 1946, 1948, 1950, 1952, 1954, 1956, 1958, 1960, 1962, 1964, 1966, 1968, 1970, 1972, 1974, 1976, 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992, 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008, 2010, 2013, 2015, 2017, 2019, 2021, 2023, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2039, 2042, 2044, 2046, 2048, 2050, 2052, 2054, 2056, 2058, 2060, 2062, 2064, 2066, 2068, 2070, 2072, 2074, 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094, 2096, 2098, 2100, 2102, 2104, 2106, 2108, 2110, 2112, 2114, 2116, 2118, 2120, 2122, 2124, 2126, 2128, 2130, 2132, 2134, 2136, 2138, 2140, 2142, 2144, 2146, 2148, 2150, 2152, 2154, 2156, 2158, 2160, 2162, 2164, 2166, 2168, 2170, 2172, 2174, 2176, 2178, 2180, 2182, 2184, 2186, 2188, 2190, 2192, 2194, 2196, 2198, 2200, 2202, 2204, 2206, 2208, 2210, 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, 2228, 2230, 2232, 2234, 2236, 2238, 2240, 2242, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260, 2262, 2264, 2266, 2268, 2271, 2273, 2275, 2277, 2280, 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300, 2302, 2304, 2306, 2308, 2310, 2312, 2314, 2316, 2318, 2320, 2322, 2324, 2326, 2328, 2330, 2332, 2334, 2336, 2338, 2340, 2342, 2344, 2346, 2348, 2350, 2352, 2354, 2356, 2358, 2360, 2362, 2364, 2366, 2368, 2370, 2372, 2374, 2376, 2378, 2380, 2382, 2384, 2386, 2388, 2390, 2392, 2394, 2396, 2398, 2400, 2402, 2404, 2406, 2408, 2410, 2412, 2414, 2416, 2418, 2420, 2422, 2424, 2426, 2428, 2430, 2432, 2434, 2436, 2438, 2440, 2442, 2444, 2446, 2448, 2450, 2452, 2454, 2456, 2458, 2460, 2462, 2464, 2466, 2468, 2470, 2472, 2474, 2476, 2478, 2480, 2482, 2484, 2486, 2488, 2490, 2492, 2494, 2496, 2498, 2500, 2502, 2504, 2506, 2508, 2510, 2512, 2514, 2516, 2518, 2520, 2522, 2524, 2526, 2528, 2530, 2532, 2534, 2536, 2538, 2540, 2542, 2544, 2546, 2548, 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568, 2570, 2572, 2574, 2576, 2578, 2580, 2582, 2584, 2586, 2588, 2590, 2592, 2594, 2596, 2598, 2600, 2602, 2604, 2606, 2608, 2610, 2612, 2614, 2616, 2618, 2620, 2622, 2624, 2626, 2628, 2630, 2632, 2634, 2636, 2638, 2640, 2642, 2644, 2646, 2648, 2650, 2652, 2654, 2656, 2658, 2660, 2662, 2664, 2666, 2668, 2670, 2672, 2674, 2676, 2678, 2680, 2682, 2684, 2686, 2688, 2690, 2692, 2694, 2696, 2698, 2700, 2702, 2704, 2706, 2708, 2710, 2712, 2714, 2716, 2718, 2720, 2722, 2724, 2726, 2728, 2730, 2732, 2734, 2736, 2738, 2740, 2742, 2744, 2746, 2748, 2750, 2752, 2754, 2756, 2758, 2760, 2762, 2764, 2766, 2768, 2770, 2772, 2774, 2776, 2778, 2780, 2782, 2784, 2786, 2788, 2790, 2792, 2794, 2796, 2798, 2800, 2802, 2804, 2806, 2808, 2810, 2812, 2814, 2816, 2818, 2820, 2822, 2824, 2826, 2828, 2830, 2832, 2834, 2836, 2838, 2840, 2842, 2844, 2846, 2848, 2850, 2852, 2854, 2856, 2858, 2860, 2862, 2864, 2866, 2868, 2870, 2872, 2874, 2876, 2878, 2880, 2882, 2884, 2886, 2888, 2890, 2892, 2894, 2896, 2898, 2900, 2902, 2904, 2906, 2908, 2910, 2912, 2914, 2916, 2918, 2920, 2922, 2924, 2926, 2928, 2930, 2932, 2934, 2936, 2938, 2940, 2942, 2944, 2946, 2948, 2950, 2952, 2954, 2956, 2958, 2960, 2962, 2964, 2966, 2968, 2970, 2972, 2974, 2976, 2978, 2980, 2982, 2984, 2986, 2988, 2990, 2992, 2994, 2996, 2998, 3000, 3002, 3004, 3006, 3008, 3010, 3012, 3014, 3016, 3018, 3020, 3022, 3024, 3026, 3028, 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, 3046, 3048, 3050, 3052, 3054, 3056, 3058, 3060, 3062, 3064, 3066, 3068, 3070, 3072, 3074, 3076, 3078, 3080, 3082, 3084, 3086, 3088, 3090, 3092, 3094, 3096, 3098, 3100, 3102, 3104, 3106, 3108, 3110, 3112, 3114, 3116, 3118, 3120, 3122, 3124, 3126, 3128, 3130, 3132, 3134, 3136, 3138, 3140, 3142, 3144, 3146, 3148, 3150, 3152, 3154, 3156, 3158, 3160, 3162, 3164, 3166, 3168, 3170, 3172, 3174, 3176, 3178, 3180, 3182, 3184, 3186, 3188, 3190, 3192, 3194, 3196, 3198, 3200, 3202, 3204, 3206, 3208, 3210, 3212, 3214, 3216, 3218, 3220, 3222, 3224, 3226, 3228, 3230, 3232, 3234, 3236, 3238, 3240, 3242, 3244, 3246, 3248, 3250, 3252, 3254, 3256, 3258, 3260, 3262, 3264, 3266, 3268, 3270, 3272, 3274, 3276, 3278, 3280, 3282, 3284, 3286, 3288, 3290, 3292, 3294, 3296, 3298, 3300, 3302, 3304, 3306, 3308, 3310, 3312, 3314, 3316, 3318, 3320, 3322, 3324, 3326, 3328, 3330, 3332, 3334, 3336, 3338, 3340, 3342, 3344, 3346, 3348, 3350, 3352, 3354, 3356, 3358, 3360, 3362, 3364, 3366, 3368, 3370, 3372, 3374, 3376, 3378, 3380, 3382, 3384, 3386, 3388, 3390, 3392, 3394, 3396, 3398, 3400, 3402, 3404, 3406, 3408, 3410, 3412, 3414, 3416, 3418, 3420, 3422, 3424, 3426, 3428, 3430, 3432, 3434, 3436, 3438, 3440, 3442, 3444, 3446, 3448, 3450, 3452, 3454, 3456, 3458, 3460, 3462, 3464, 3466, 3468, 3470, 3472, 3474, 3476, 3478, 3480, 3482, 3484, 3486, 3488, 3490, 3492, 3494, 3496, 3498, 3500, 3502, 3504, 3506, 3508, 3510, 3512, 3514, 3516, 3518, 3520, 3522, 3524, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542, 3544, 3546, 3548, 3550, 3552, 3554, 3556, 3558, 3560, 3562, 3564, 3566, 3568, 3570, 3572, 3574, 3576, 3578, 3580, 3582, 3584, 3586, 3588, 3590, 3592, 3594, 3596, 3598, 3600, 3602, 3604, 3606, 3608, 3610, 3612, 3614, 3616, 3618, 3620, 3622, 3624, 3626, 3628, 3630, 3632, 3634, 3636, 3638, 3640, 3642, 3644, 3646, 3648, 3650, 3652, 3654, 3656, 3658, 3660, 3662, 3664, 3666, 3668, 3670, 3672, 3674, 3676, 3678, 3680, 3682, 3684, 3686, 3688, 3690, 3692, 3694, 3696, 3698, 3700, 3702, 3704, 3706, 3708, 3710, 3712, 3714, 3716, 3718, 3720, 3722, 3724, 3726, 3728, 3730, 3732, 3734, 3736, 3738, 3740, 3742, 3744, 3746, 3748, 3750, 3752, 3754, 3756, 3758, 3760, 3762, 3764, 3766, 3768, 3770, 3772, 3774, 3776, 3778, 3780, 3782, 3784, 3786, 3788, 3790, 3792, 3794, 3796, 3798, 3800, 3802, 3804, 3806, 3808, 3810, 3812, 3814, 3816, 3818, 3820, 3822, 3824, 3826, 3828, 3830, 3832, 3834, 3836, 3838, 3840, 3842, 3844, 3846, 3848, 3850, 3852, 3854, 3857, 3859, 3861, 3863, 3865, 3867, 3869, 3871, 3873, 3875, 3877, 3879, 3881, 3883, 3885, 3887, 3889, 3891, 3893, 3895, 3897, 3899, 3901, 3903, 3905, 3907, 3909, 3911, 3913, 3915, 3917, 3919, 3921, 3923, 3925, 3927, 3929, 3931, 3933, 3935, 3937, 3939, 3941, 3943, 3945, 3947, 3949, 3951, 3953, 3955, 3957, 3959, 3961, 3963, 3965, 3967, 3969, 3971, 3973, 3975, 3977, 3979, 3981, 3983, 3985, 3987, 3989, 3991, 3993, 3995, 3997, 3999, 4001, 4003, 4005, 4007, 4009, 4011, 4013, 4015, 4017, 4019, 4021, 4023, 4025, 4027, 4029, 4031, 4033, 4035, 4037, 4039, 4041, 4043, 4045, 4047, 4049, 4051, 4053, 4055, 4057, 4059, 4061, 4063, 4065, 4067, 4069, 4071, 4073, 4075, 4077, 4079, 4081, 4083, 4085, 4087, 4089, 4091, 4093, 4095, 4097, 4099, 4101, 4103, 4105, 4107, 4109, 4111, 4113, 4115, 4117, 4119, 4121, 4123, 4125, 4127, 4129, 4131, 4133, 4135, 4137, 4139, 4141, 4143, 4145, 4147, 4149, 4151, 4153, 4155, 4157, 4159, 4161, 4163, 4165, 4167, 4169, 4171, 4173, 4175, 4177, 4179, 4181, 4183, 4185, 4187, 4189, 4191, 4193, 4195, 4197, 4199, 4201, 4203, 4205, 4207, 4209, 4211, 4213, 4215, 4217, 4219, 4221, 4223, 4225, 4227, 4229, 4231, 4233, 4235, 4237, 4239, 4241, 4243, 4245, 4247, 4250, 4252, 4254, 4256, 4258, 4260, 4262, 4264, 4266, 4268, 4270, 4272, 4274, 4276, 4278, 4280, 4282, 4284, 4286, 4288, 4290, 4292, 4295, 4297, 4301, 4303, 4305, 4307, 4309, 4311, 4313, 4315, 4318, 4320, 4323, 4325, 4331, 4333, 4335, 4337, 4340, 4342, 4344, 4346, 4350, 4352, 4354, 4356, 4358, 4360, 4362, 4364, 4366, 4368, 4370, 4372, 4374, 4376, 4378, 4380, 4382, 4384, 4386, 4388, 4390, 4392, 4394, 4396, 4399, 4401, 4403, 4405, 4407, 4409, 4412, 4414, 4416, 4418, 4421, 4423, 4426, 4428, 4433, 4435, 4437, 4439, 4442, 4444, 4447, 4449, 4454, 4456, 4458, 4460, 4463, 4465, 4467, 4469, 4473, 4475, 4477, 4479, 4481, 4483, 4486, 4488, 4490, 4492, 4494, 4496, 4498, 4500, 4503, 4505, 4508, 4510, 4513, 4515, 4517, 4519, 4521, 4523, 4525, 4527, 4530, 4532, 4535, 4537, 4542, 4544, 4546, 4548, 4551, 4553, 4556, 4558, 4571, 4573, 4575, 4577, 4579, 4581, 4583, 4585, 4587, 4589, 4591, 4593, 4595, 4597, 4599, 4601, 4603, 4605, 4607, 4609, 4611, 4613, 4615, 4617, 4619, 4621, 4623, 4625, 4627, 4629, 4631, 4633, 4635, 4637, 4639, 4641, 4643, 4645, 4647, 4649, 4651, 4653, 4655, 4657, 4660, 4662, 4664, 4666, 4668, 4670, 4672, 4674, 4676, 4678, 4680, 4682, 4684, 4686, 4688, 4690, 4692, 4694, 4696, 4698, 4700, 4702, 4704, 4706, 4708, 4710, 4713, 4715, 4717, 4719, 4722, 4724, 4726, 4728, 4732, 4734, 4737, 4739, 4742, 4744, 4747, 4749, 4752, 4754, 4757, 4759, 4762, 4764, 4766, 4768, 4771, 4773, 4776, 4778, 4783, 4785, 4787, 4789, 4792, 4794, 4797, 4799, 4804, 4806, 4808, 4810, 4812, 4814, 4816, 4818, 4820, 4822, 4824, 4826, 4828, 4830, 4832, 4834, 4836, 4838, 4840, 4842, 4844, 4846, 4848, 4850, 4852, 4854, 4856, 4858, 4860, 4862, 4864, 4866, 4868, 4870, 4872, 4874, 4876, 4878, 4880, 4882, 4884, 4886, 4888, 4890, 4892, 4894, 4896, 4898, 4900, 4902, 4904, 4906, 4908, 4910, 4912, 4914, 4916, 4918, 4920, 4922, 4924, 4926, 4928, 4930, 4932, 4934, 4936, 4938, 4940, 4942, 4944, 4946, 4948, 4950, 4952, 4954, 4956, 4958, 4960, 4962, 4964, 4966, 4968, 4970, 4972, 4974, 4976, 4978, 4980, 4982, 4984, 4986, 4988, 4990, 4992, 4994, 4996, 4998, 5000, 5002, 5004, 5006, 5008, 5010, 5012, 5014, 5016, 5018, 5020, 5022, 5024, 5026, 5028, 5030, 5032, 5034, 5036, 5038, 5040, 5042, 5044, 5046, 5048, 5050, 5052, 5054, 5056, 5058, 5060, 5062, 5064, 5066, 5068, 5070, 5072, 5074, 5076, 5078, 5080, 5082, 5084, 5086, 5088, 5090, 5092, 5094, 5096, 5098, 5100, 5102, 5104, 5106, 5108, 5110, 5112, 5114, 5116, 5118, 5120, 5122, 5124, 5126, 5128, 5130, 5132, 5134, 5136, 5138, 5140, 5142, 5144, 5146, 5148, 5150, 5152, 5154, 5156, 5158, 5160, 5162, 5164, 5166, 5168, 5170, 5172, 5174, 5176, 5178, 5180, 5182, 5184, 5186, 5188, 5190, 5192, 5194, 5196, 5198, 5200, 5202, 5204, 5206, 5208, 5210, 5212, 5214, 5216, 5218, 5220, 5222, 5224, 5226, 5228, 5230, 5232, 5234, 5236, 5238, 5240, 5242, 5244, 5246, 5248, 5250, 5252, 5254, 5256, 5258, 5260, 5262, 5264, 5266, 5268, 5270, 5272, 5274, 5276, 5278, 5280, 5282, 5284, 5286, 5288, 5290, 5292, 5294, 5296, 5298, 5300, 5302, 5304, 5306, 5308, 5310, 5312, 5314, 5316, 5318, 5320, 5322, 5324, 5326, 5328, 5330, 5332, 5334, 5336, 5338, 5340, 5342, 5344, 5346, 5348, 5350, 5352, 5354, 5356, 5358, 5360, 5362, 5364, 5366, 5368, 5370, 5372, 5374, 5376, 5378, 5380, 5382, 5384, 5386, 5388, 5390, 5392, 5394, 5396, 5398, 5400, 5402, 5404, 5406, 5408, 5410, 5412, 5414, 5416, 5418, 5420, 5422, 5424, 5426, 5428, 5430, 5432, 5434, 5436, 5438, 5440, 5442, 5444, 5446, 5448, 5450, 5452, 5454, 5456, 5458, 5460, 5462, 5464, 5466, 5468, 5470, 5472, 5474, 5476, 5478, 5480, 5482, 5484, 5486, 5488, 5490, 5492, 5494, 5496, 5498, 5500, 5502, 5504, 5506, 5508, 5510, 5512, 5514, 5516, 5518, 5520, 5522, 5524, 5526, 5528, 5530, 5532, 5534, 5536, 5538, 5540, 5542, 5544, 5546, 5548, 5550, 5552, 5554, 5556, 5558, 5560, 5562, 5564, 5566, 5568, 5570, 5572, 5574, 5576, 5578, 5580, 5582, 5584, 5586, 5588, 5590, 5592, 5594, 5596, 5598, 5600, 5602, 5604, 5606, 5608, 5610, 5612, 5614, 5616, 5618, 5620, 5622, 5624, 5626, 5628, 5630, 5632, 5634, 5636, 5638, 5640, 5642, 5644, 5646, 5648, 5650, 5652, 5654, 5656, 5658, 5660, 5662, 5664, 5666, 5668, 5670, 5672, 5674, 5676, 5678, 5680, 5682, 5684, 5686, 5688, 5690, 5692, 5694, 5696, 5698, 5700, 5702, 5704, 5706, 5708, 5710, 5712, 5714, 5716, 5718, 5720, 5722, 5724, 5726, 5728, 5730, 5732, 5734, 5736, 5738, 5740, 5742, 5744, 5746, 5748, 5750, 5752, 5754, 5756, 5758, 5760, 5762, 5764, 5766, 5768, 5770, 5772, 5774, 5776, 5778, 5780, 5782, 5784, 5786, 5788, 5790, 5792, 5794, 5796, 5798, 5800, 5802, 5804, 5806, 5808, 5810, 5812, 5814, 5816, 5818, 5820, 5822, 5824, 5826, 5828, 5830, 5832, 5834, 5836, 5838, 5840, 5842, 5844, 5846, 5848, 5850, 5852, 5854, 5856, 5858, 5860, 5862, 5864, 5866, 5868, 5870, 5873, 5875, 5877, 5879, 5881, 5883, 5885, 5887, 5889, 5891, 5893, 5895, 5897, 5899, 5901, 5903, 5905, 5907, 5909, 5911, 5914, 5916, 5918, 5920, 5922, 5924, 5926, 5928, 5930, 5932, 5934, 5936, 5938, 5940, 5942, 5944, 5946, 5948, 5950, 5952, 5954, 5956, 5958, 5960, 5962, 5964, 5966, 5968, 5970, 5972, 5974, 5976, 5978, 5980, 5982, 5984, 5986, 5988, 5990, 5992, 5994, 5996, 5998, 6000, 6002, 6004, 6006, 6008, 6010, 6012, 6014, 6016, 6018, 6020, 6022, 6024, 6026, 6028, 6030, 6032, 6034, 6036, 6038, 6040, 6042, 6044, 6046, 6048, 6050, 6052, 6054, 6056, 6058, 6060, 6062, 6064, 6066, 6068, 6070, 6072, 6074, 6076, 6078, 6080, 6082, 6084, 6086, 6088, 6090, 6092, 6094, 6096, 6098, 6100, 6102, 6104, 6106, 6108, 6110, 6112, 6114, 6116, 6118, 6120, 6122, 6124, 6126, 6128, 6130, 6132, 6134, 6136, 6138, 6140, 6142, 6144, 6146, 6148, 6150, 6152, 6154, 6156, 6158, 6160, 6162, 6164, 6166, 6168, 6170, 6172, 6174, 6176, 6178, 6180, 6182, 6184, 6186, 6188, 6190, 6192, 6195, 6197, 6199, 6201, 6203, 6205, 6207, 6209, 6211, 6213, 6215, 6217, 6219, 6221, 6223, 6225, 6228, 6230, 6232, 6234, 6236, 6238, 6241, 6243, 6245, 6247, 6251, 6253, 6256, 6258, 6261, 6263, 6266, 6268, 6274, 6276, 6279, 6281, 6283, 6285, 6287, 6289, 6291, 6293, 6296, 6298, 6300, 6302, 6305, 6307, 6310, 6312, 6317, 6319, 6321, 6323, 6326, 6328, 6331, 6333, 6338, 6340, 6342, 6344, 6346, 6348, 6350, 6352, 6354, 6356, 6358, 6360, 6362, 6364, 6366, 6368, 6370, 6372, 6374, 6376, 6378, 6380, 6382, 6384, 6386, 6388, 6390, 6392, 6394, 6396, 6398, 6400, 6402, 6404, 6406, 6408, 6410, 6412, 6414, 6416, 6418, 6420, 6422, 6424, 6426, 6428, 6430, 6432, 6434, 6436, 6438, 6440, 6442, 6444, 6446, 6448, 6450, 6452, 6455, 6457, 6459, 6461, 6463, 6465, 6468, 6470, 6472, 6474, 6477, 6479, 6482, 6484, 6489, 6491, 6493, 6495, 6498, 6500, 6503, 6505, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 6526, 6528, 4561, 4563, 4803, 3856, 4803, 3856, 4563, 4561, 4565, 4563, 4561, 4570, 4568, 6629, 6631, 6633, 6635, 6637, 6639, 6641, 6643, 6645, 6647, 6649, 6651, 6653, 6655, 6664, 6666, 6668, 6670, 4570, 4568, 4567, 4565, 4563, 4561, 4563, 4561, 4563, 4561, 4567, 4565, 4567, 4565, 4567, 4565, 4570, 4568, 6698, 6700, 6702, 6704, 6706, 6708, 6710, 6712, 6714, 6716, 6718, 6720, 6722, 6724, 6726, 6728, 6730, 6732, 6734, 6736, 6738, 6740, 6750, 6752, 6754, 6756, 6758, 6760, 6774, 6776, 6778, 6780, 6782, 6784, 6786, 6788, 6792, 6794, 6796, 6798, 4563, 4561, 6812, 6814, 6816, 6818, 6820, 6822, 6824, 6826, 6828, 6830, 6832, 6834, 6836, 6838, 6273, 6271, 6273, 6271, 6855, 6857, 6859, 6861, 6863, 6865, 6867, 6869, 6871, 6873, 4563, 4561, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4567, 4565, 4567, 4565, 4567, 4565, 4567, 4565, 6938, 6940, 6942, 6944, 4330, 4328, 4567, 4565, 4563, 4561, 4567, 4565, 4563, 4561, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 6983, 6985, 6987, 6989, 6991, 6993, 6995, 6997, 6999, 7001, 7003, 7005, 7007, 7009, 7011, 7013, 7023, 7025, 7027, 7029, 7031, 7033, 7035, 7037, 7039, 7041, 7043, 7045, 7047, 7049, 7051, 7053, 7055, 7057, 7059, 7061, 7063, 7065, 7067, 7069, 7071, 7073, 6273, 6271, 7084, 7086, 7088, 7090, 7092, 7094, 7096, 7098, 7100, 7102, 7104, 7106, 7120, 7122, 7124, 7126, 7128, 7130, 7132, 7134, 7136, 7138, 7140, 7142, 7144, 7146, 7148, 7150, 7152, 7154, 7156, 7158, 7160, 7162, 7164, 7166, 6273, 6271, 6273, 6271, 6509, 6497, 7197, 7199, 7201, 7203, 7205, 7207, 7209, 7211, 7213, 7215, 7217, 7219, 7238, 7240, 7242, 7244, 7246, 7248, 7250, 7252, 7254, 7256, 7258, 7260, 7262, 7264, 7266, 7268, 7277, 7279, 7281, 7283, 4563, 4561, 7313, 7315, 7317, 7319, 7321, 7323, 7325, 7327, 7329, 7331, 7333, 7335, 7337, 7339, 4570, 4568, 4570, 4568, 4563, 4561, 4570, 4568, 4563, 4561, 4570, 4568, 4570, 4568, 7440, 7442, 7444, 7446, 7448, 7450, 7452, 7454, 7456, 7458, 7460, 7462, 7464, 7466, 7468, 7470, 4563, 4561, 4570, 4568, 4570, 4568, 4563, 4561, 4563, 4561, 4570, 4568, 4563, 4561, 4563, 4561, 4570, 4568, 7572, 7574, 7576, 7578, 7580, 7582, 7584, 7586, 7588, 7590, 7592, 7594, 7596, 7598, 7600, 7602, 7604, 7606, 7608, 7610, 7612, 7614, 7616, 7618, 7620, 7622, 7624, 7626, 7628, 7630, 7632, 7634, 7652, 7654, 7656, 7658, 7660, 7662, 7664, 7666, 7668, 7670, 7672, 7674, 7676, 7678, 7680, 7682, 7684, 7686, 6273, 6271, 6273, 6271, 7751, 7753, 7755, 7757, 7759, 7761, 7763, 7765, 7767, 7769, 7771, 7773, 7775, 7777, 7779, 7781, 7783, 7785, 7787, 7789, 7791, 7793, 7795, 7797, 7799, 7801, 6335, 6330, 6335, 6330, 6335, 6330, 6335, 6330, 7837, 7839, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859, 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7890, 7892, 7895, 7897, 7899, 7901, 4330, 4328, 4563, 4561, 4565, 4563, 4561, 4563, 4561, 4567, 4570, 4568, 4563, 4561, 4567, 4565, 4330, 4328, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4761, 4761, 8016, 8018, 8020, 8022, 4330, 4328, 4563, 4561, 4563, 4561, 4563, 4561, 4563, 4561, 8100, 8102, 8104, 8106, 8108, 8110, 8112, 8114, 4330, 4328, 4563, 4561, 4563, 4561, 4330, 4328, 4563, 4561, 4563, 4561, 8251, 8253, 8255, 8257, 8259, 8261, 8263, 8265, 8267, 8269, 8271, 8273, 8275, 8277, 8279, 8281, 4570, 4568, 4563, 4561, 8344, 8346, 8348, 8350, 8352, 8354, 8356, 8358, 4563, 4561, 4563, 4561, 4570, 4568, 4568, 4570, 3856, 3856, 4746, 4746, 4803, 3856, 4803, 3856, 8508, 8510, 8512, 8514, 8516, 8518, 8520, 8522, 8524, 8526, 8528, 8530, 8532, 8534, 4330, 4328, 4563, 4561, 4567, 4565, 4330, 4328, 4561, 4563, 4563, 4561, 4567, 4565, 4570, 4568, 4567, 4565, 4570, 4568, 4330, 4328, 4339, 4349, 4328, 4330, 4330, 4328, 4339, 4349, 4411, 4411, 4398, 4398, 4432, 4432, 4453, 4453, 4472, 4472, 4529, 4541, 4529, 4541, 4563, 4561, 4563, 4561, 4567, 4565, 4568, 4567, 4565, 4570, 4567, 4565, 4570, 4568, 4659, 4659, 4731, 4731, 4782, 4782, 4803, 4803, 8810, 8812, 8814, 8816, 8818, 8820, 8822, 8824, 8827, 8829, 8831, 8833, 8836, 8838, 8841, 8843, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 8879, 8881, 6509, 6497, 8889, 8891, 8893, 8895, 8897, 8899, 8901, 8903, 8905, 8907, 8909, 8911, 8913, 8915, 6509, 6497, 8933, 8935, 8937, 8939, 8941, 8943, 8945, 8947, 8949, 8951, 8953, 8955, 8957, 8959, 8965, 8967, 8969, 8971, 8973, 8975, 8977, 8979, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 9045, 9047, 9049, 9051, 9053, 9055, 9057, 9059, 9061, 9063, 9065, 9067, 9069, 9071, 9073, 9075, 9077, 9079, 9081, 9083, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 9119, 9121, 9123, 9125, 9127, 9129, 9131, 9133, 9135, 9137, 9139, 9141, 9143, 9145, 9147, 9149, 9151, 9153, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6273, 6271, 6509, 6497, 9264, 9266, 9268, 9270, 9272, 9274, 9276, 9278, 9280, 9282, 9285, 9287, 9289, 9291, 6270, 6278, 6270, 6278, 6467, 6509, 6497, 9406, 9408, 9410, 9412, 9414, 9416, 9418, 9420, 9422, 9424, 9426, 9428, 9431, 9433, 9435, 9437, 9441, 9443, 9445, 9447, 6265, 6265, 6194, 6194, 6273, 6271, 6273, 6271, 6250, 6250, 6273, 6271, 6273, 6271, 6295, 6295, 6316, 6316, 6337, 6337, 6497, 6509, 9551, 9553, 6467, 6488, 6467, 6509, 6497, 6488, 6488, 6497, 6509, 9589, 9591, 9593, 9595, 9598, 9600, 9603, 9605, 9612, 9614, 9617, 9619, 9622, 9624, 9633, 9635, 9637, 9639, 9642, 9644, 9647, 9649, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 9621, 9616, 9641, 9653, 9621, 9616, 9621, 9616, 9641, 9653, 9651, 9646, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9630, 9628, 9586, 9584, 9586, 9584, 9616, 9621, 9616, 9621, 9586, 9584, 9586, 9584, 9616, 9621, 9616, 9621, 9630, 9628, 9630, 9628, 9641, 9653, 7889, 9630, 9628, 9630, 9628, 9651, 9646, 9641, 9653, 9630, 9628, 9630, 9628, 9651, 9646, 9641, 9653, 9621, 9616, 7889, 9621, 9616, 8852, 8850, 8852, 8850, 8854, 8849, 8854, 8849, 9611, 7889, 9630, 9628, 9611, 7889, 9611, 7889, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9630, 9628, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9611, 7889, 9586, 9584, 9586, 9584, 9611, 7889, 9611, 7889, 9641, 9653, 9611, 7889, 9611, 7889, 9630, 9628, 9586, 9584, 9611, 7889, 9586, 9584, 9586, 9584, 9611, 7889, 9630, 9628, 8854, 8849, 8850, 8852, 8850, 8854, 8849, 8852, 8852, 8850, 8854, 8849, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9630, 9628, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9611, 7889, 9630, 9628, 9630, 9628, 9630, 9628, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 7836, 9586, 9584, 7836, 9611, 7889, 9611, 7889, 9630, 9628, 9630, 9628, 9630, 9628, 9630, 9628, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8852, 8850, 8854, 8849, 8852, 8850, 8849, 8852, 8850, 8854, 8852, 8850, 8826, 8826, 8847, 8847, 8852, 8850, 8854, 8849, 8852, 8850, 8849, 8852, 8850, 8854, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9630, 9628, 9630, 9628, 9621, 9616, 9621, 9616, 9630, 9628, 9641, 9609, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9641, 9653, 9621, 9616, 9621, 9616, 9630, 9628, 9630, 9628, 9641, 9653, 9586, 9584, 9586, 9584, 9586, 9584, 9621, 9616, 9597, 9611, 9621, 9616, 9630, 9628, 9626, 9630, 9628, 9630, 9628, 9626, 9630, 9628, 9653, 9586, 9584, 9586, 9584, 9588, 9586, 9584, 9588, 9597, 9609, 9611, 9630, 9628, 9630, 9628, 9632, 9630, 9628, 9632, 9641, 9653, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14624, 14626, 14628, 14630, 14632, 14634, 14636, 14638, 14640, 14642, 14644, 14646, 14648, 14650, 14652, 14654, 14656, 14658, 14660, 14662, 14664, 14666, 14668, 14670, 14672, 14674, 14676, 14678, 14680, 14682, 14684, 14686, 14688, 14690, 14692, 14694, 14696, 14698, 14700, 14702, 14704, 14706, 14708, 14710, 14712, 14714, 14716, 14718, 14720, 14722, 14724, 14726, 14728, 14730, 14732, 14734, 14736, 14738, 14740, 14742, 14744, 14746, 14748, 14750, 14752, 14754, 14756, 14758, 14760, 14762, 14764, 14766, 14768, 14770, 14772, 14774, 14776, 14778, 14780, 14782, 14784, 14786, 14788, 14790, 14792, 14794, 14796, 14798, 14800, 14802, 14804, 14806, 14808, 14810, 14812, 14814, 14816, 14818, 14820, 14822, 14824, 14826, 14828, 14830, 14832, 14834, 14836, 14838, 14840, 14842, 14844, 14846, 14848, 14850, 14852, 14854, 14856, 14858, 14860, 14862, 14864, 14866, 14868, 14870, 14872, 14874, 14876, 14878, 14880, 14882, 14884, 14886, 14888, 14890, 14892, 14894, 14896, 14898, 14900, 14902, 14904, 14906, 14908, 14910, 14912, 14914, 14916, 14918, 14920, 14922, 14924, 14926, 14928, 14930, 14932, 14934, 14936, 14938, 14940, 14942, 14944, 14946, 14948, 14950, 14952, 14954, 14956, 14958, 14960, 14962, 14964, 14966, 14968, 14970, 14972, 14974, 14976, 14978, 14980, 14982, 14984, 14986, 14988, 14990, 14992, 14994, 14996, 14998, 15000, 15002, 15004, 15006, 15008, 15010, 15012, 15014, 15016, 15018, 15020, 15022, 15024, 15026, 15028, 15030, 15032, 15034, 15036, 15038, 15040, 15042, 15044, 15046, 15048, 15050, 15052, 15054, 15056, 15058, 15060, 15062, 15064, 15066, 15068, 15070, 15072, 15074, 15076, 15078, 15080, 15082, 15084, 15086, 15088, 15090, 15092, 15094, 15096, 15098, 15100, 15102, 15104, 15106, 15108, 15110, 15112, 15114, 15116, 15118, 15120, 15122, 15124, 15126, 15128, 15130, 15132, 15134, 15136, 15138, 15140, 15142, 15144, 15146, 15148, 15150, 15152, 15154, 15156, 15158, 15160, 15162, 15164, 15166, 15168, 15170, 15172, 15174, 15176, 15178, 15180, 15182, 15184, 15186, 15188, 15190, 15192, 15194, 15196, 15198, 15200, 15202, 15204, 15206, 15208, 15210, 15212, 15214, 15216, 15218, 15220, 15222, 15224, 15226, 15228, 15230, 15232, 15234, 15236, 15238, 15240, 15242, 15244, 15246, 15248, 15250, 15252, 15254, 15256, 15258, 15260, 15262, 15264, 15266, 15268, 15270, 15272, 15274, 15276, 15278, 15280, 15282, 15284, 15286, 15288, 15290, 15292, 15294, 15296, 15298, 15300, 15302, 15304, 15306, 15308, 15310, 15312, 15314, 15316, 15318, 15320, 15322, 15324, 15326, 15328, 15330, 15332, 15334, 15336, 15338, 15340, 15342, 15344, 15346, 15348, 15350, 15352, 15354, 15356, 15358, 15360, 15362, 15364, 15366, 15368, 15370, 15372, 15374, 15376, 15378, 15380, 15382, 15384, 15386, 15388, 15390, 15392, 15394, 15396, 15398, 15400, 15402, 15404, 15406, 15408, 15410, 15412, 15414, 15416, 15418, 15420, 15422, 15424, 15426, 15428, 15430, 15432, 15434, 15436, 15438, 15440, 15442, 15444, 15446, 15448, 15450, 15452, 15454, 15456, 15458, 15460, 15462, 15464, 15466, 15468, 15470, 15472, 15474, 15476, 15478, 15480, 15482, 15484, 15486, 15488, 15490, 15492, 15494, 15496, 15498, 15500, 15502, 15504, 15506, 15508, 15510, 15512, 15514, 15516, 15518, 15520, 15522, 15524, 15526, 15528, 15530, 15532, 15534, 15536, 15538, 15540, 15542, 15544, 15546, 15548, 15550, 15552, 15554, 15556, 15558, 15560, 15562, 15564, 15566, 15568, 15570, 15572, 15574, 15576, 15578, 15580, 15582, 15584, 15586, 15588, 15590, 15592, 15594, 15596, 15598, 15600, 15602, 15604, 15606, 15608, 15610, 15612, 15614, 15616, 15618, 15620, 15622, 15624, 15626, 15628, 15630, 15632, 15634, 15636, 15638, 15640, 15642, 15644, 15646, 15648, 15650, 15652, 15654, 15656, 15658, 15660, 15662, 15664, 15666, 15668, 15670, 15672, 15674, 15676, 15678, 15680, 15682, 15684, 15686, 15688, 15690, 15692, 15694, 15696, 15698, 15700, 15702, 15704, 15706, 15708, 15710, 15712, 15714, 15716, 15718, 15720, 15722, 15724, 15726, 15728, 15730, 15732, 15734, 15736, 15738, 15740, 15742, 15744, 15746, 15748, 15750, 15752, 15754, 15756, 15758, 15760, 15762, 15764, 15766, 15768, 15770, 15772, 15774, 15776, 15778, 15780, 15782, 15784, 15786, 15788, 15790, 15792, 15794, 15796, 15798, 15800, 15802, 15804, 15806, 15808, 15810, 15812, 15814, 15816, 15818, 15820, 15822, 15824, 15826, 15828, 15830, 15832, 15834, 15836, 15838, 15840, 15842, 15844, 15846, 15848, 15850, 15852, 15854, 15856, 15858, 15860, 15862, 15864, 15866, 15868, 15870, 15872, 15874, 15876, 15878, 15880, 15882, 15884, 15886, 15888, 15890, 15892, 15894, 15896, 15898, 15900, 15902, 15904, 15906, 15908, 15910, 15912, 15914, 15916, 15918, 15920, 15922, 15924, 15926, 15928, 15930, 15932, 15934, 15936, 15938, 15940, 15942, 15944, 15946, 15948, 15950, 15952, 15954, 15956, 15958, 15960, 15962, 15964, 15966, 15968, 15970, 15972, 15974, 15976, 15978, 15980, 15982, 15984, 15986, 15988, 15990, 15992, 15994, 15996, 15998, 16000, 16002, 16004, 16006, 16008, 16010, 16012, 16014, 16016, 16018, 16020, 16022, 16024, 16026, 16028, 16030, 16032, 16034, 16036, 16038, 16040, 16042, 16044, 16046, 16048, 16050, 16052, 16054, 16056, 16058, 16060, 16062, 16064, 16066, 16068, 16070, 16072, 16074, 16076, 16078, 16080, 16082, 16084, 16086, 16088, 16090, 16092, 16094, 16096, 16098, 16100, 16102, 16104, 16106, 16108, 16110, 16112, 16114, 16116, 16118, 16120, 16122, 16124, 16126, 16128, 16130, 16132, 16134, 16136, 16138, 16140, 16142, 16144, 16146, 16148, 16150, 16152, 16154, 16156, 16158, 16160, 16162, 16164, 16166, 16168, 16170, 16172, 16174, 16176, 16178, 16180, 16182, 16184, 16186, 16188, 16190, 16192, 16194, 16196, 16198, 16200, 16202, 16204, 16206, 16208, 16210, 16212, 16214, 16216, 16218, 16220, 16222, 16224, 16226, 16228, 16230, 16232, 16234, 16236, 16238, 16240, 16242, 16244, 16246, 16248, 16250, 16252, 16254, 16256, 16258, 16260, 16262, 16264, 16266, 16268, 16270, 16272, 16274, 16276, 16278, 16280, 16282, 16284, 16286, 16288, 16290, 16292, 16294, 16296, 16298, 16300, 16302, 16304, 16306, 16308, 16310, 16312, 16314, 16316, 16318, 16320, 16322, 16324, 16326, 16328, 16330, 16332, 16334, 16336, 16338, 16340, 16342, 16344, 16346, 16348, 16350, 16352, 16354, 16356, 16358, 16360, 16362, 16364, 16366, 16368, 16370, 16372, 16374, 16376, 16378, 16380, 16382, 16384, 16386, 16388, 16390, 16392, 16394, 16396, 16398, 16400, 16402, 16404, 16406, 16408, 16410, 16412, 16414, 16416, 16418, 16420, 16422, 16424, 16426, 16428, 16430, 16432, 16434, 16436, 16438, 16440, 16442, 16444, 16446, 16448, 16450, 16452, 16454, 16456, 16458, 16460, 16462, 16464, 16466, 16468, 16470, 16472, 16474, 16476, 16478, 16480, 16482, 16484, 16486, 16488, 16490, 16492, 16494, 16496, 16498, 16500, 16502, 16504, 16506, 16508, 16510, 16512, 16514, 16516, 16518, 16520, 16522, 16524, 16526, 16528, 16530, 16532, 16534, 16536, 16538, 16540, 16542, 16544, 16546, 16548, 16550, 16552, 16554, 16556, 16558, 16560, 16562, 16564, 16566, 16568, 16570, 16572, 16574, 16576, 16578, 16580, 16582, 16584, 16586, 16588, 16590, 16592, 16594, 16596, 16598, 16600, 16602, 16604, 16606, 16608, 16610, 16612, 16614, 16616, 16618, 16620, 16622, 16624, 16626, 16628, 16630, 16632, 16634, 16636, 16638, 16640, 16642, 16644, 16646, 16648, 16650, 16652, 16654, 16656, 16658, 16660, 16662, 16664, 16666, 16668, 16670, 16672, 16674, 16676, 16678, 16680, 16682, 16684, 16686, 16688, 16690, 16692, 16694, 16696, 16698, 16700, 16702, 16704, 16706, 16708, 16710, 16712, 16714, 16716, 16718, 16720, 16722, 16724, 16726, 16728, 16730, 16732, 16734, 16736, 16738, 16740, 16742, 16744, 16746, 16748, 16750, 16752, 16754, 16756, 16758, 16760, 16762, 16764, 16766, 16768, 16770, 16772, 16774, 16776, 16778, 16780, 16782, 16784, 16786, 16788, 16790, 16792, 16794, 16796, 16798, 16800, 16802, 16804, 16806, 16808, 16810, 16812, 16814, 16816, 16818, 16820, 16822, 16824, 16826, 16828, 16830, 16832, 16834, 16836, 16838, 16840, 16842, 16844, 16846, 16848, 16850, 16852, 16854, 16856, 16858, 16860, 16862, 16864, 16866, 16868, 16870, 16872, 16874, 16876, 16878, 16880, 16882, 16884, 16886, 16888, 16890, 16892, 16894, 16896, 16898, 16900, 16902, 16904, 16906, 16908, 16910, 16912, 16914, 16916, 16918, 16920, 16922, 16924, 16926, 16928, 16930, 16932, 16934, 16936, 16938, 16940, 16942, 16944, 16946, 16948, 16950, 16952, 16954, 16956, 16958, 16960, 16962, 16964, 16966, 16968, 16970, 16972, 16974, 16976, 16978, 16980, 16982, 16984, 16986, 16988, 16990, 16992, 16994, 16996, 16998, 17000, 17002, 17004, 17006, 17008, 17010, 17012, 17014, 17016, 17018, 17020, 17022, 17024, 17026, 17028, 17030, 17032, 17034, 17036, 17038, 17040, 17042, 17044, 17046, 17048, 17050, 17052, 17054, 17056, 17058, 17060, 17062, 17064, 17066, 17068, 17070, 17072, 17074, 17076, 17078, 17080, 17082, 17084, 17086, 17088, 17090, 17092, 17094, 17096, 17098, 17100, 17102, 17104, 17106, 17108, 17110, 17112, 17114, 17116, 17118, 17120, 17122, 17124, 17126, 17128, 17130, 17132, 17134, 17136, 17138, 17140, 17142, 17144, 17146, 17148, 17150, 17152, 17154, 17156, 17158, 17160, 17162, 17164, 17166, 17168, 17170, 17172, 17174, 17176, 17178, 17180, 17182, 17184, 17186, 17188, 17190, 17192, 17194, 17196, 17198, 17200, 17202, 17204, 17206, 17208, 17210, 17212, 17214, 17216, 17218, 17220, 17222, 17224, 17226, 17228, 17230, 17232, 17234, 17236, 17238, 17240, 17242, 17244, 17246, 17248, 17250, 17252, 17254, 17256, 17258, 17260, 17262, 17264, 17266, 17268, 17270, 17272, 17274, 17276, 17278, 17280, 17282, 17284, 17286, 17288, 17290, 17292, 17294, 17296, 17298, 17300, 17302, 17304, 17306, 17308, 17310, 17312, 17314, 17316, 17318, 17320, 17322, 17324, 17326, 17328, 17330, 17332, 17334, 17336, 17338, 17340, 17342, 17344, 17346, 17348, 17350, 17352, 17354, 17356, 17358, 17360, 17362, 17364, 17366, 17368, 17370, 17372, 17374, 17376, 17378, 17380, 17382, 17384, 17386, 17388, 17390, 17392, 17394, 17396, 17398, 17400, 17402, 17404, 17406, 17408, 17410, 17412, 17414, 17416, 17418, 17420, 17422, 17424, 17426, 17428, 17430, 17432, 17434, 17436, 17438, 17440, 17442, 17444, 17446, 17448, 17450, 17452, 17454, 17456, 17458, 17460, 17462, 17464, 17466, 17468, 17470, 17472, 17474, 17476, 17478, 17480, 17482, 17484, 17486, 17488, 17490, 17492, 17494, 17496, 17498, 17500, 17502, 17504, 17506, 17508, 17510, 17512, 17514, 17516, 17518, 17520, 17522, 17524, 17526, 17528, 17530, 17532, 17534, 17536, 17538, 17540, 17542, 17544, 17546, 17548, 17550, 17552, 17554, 17556, 17558, 17560, 17562, 17564, 17566, 17568, 17570, 17572, 17574, 17576, 17578, 17580, 17582, 17584, 17586, 17588, 17590, 17592, 17594, 17596, 17598, 17600, 17602, 17604, 17606, 17608, 17610, 17612, 17614, 17616, 17618, 17620, 17622, 17624, 17626, 17628, 17630, 17632, 17634, 17636, 17638, 17640, 17642, 17644, 17646, 17648, 17650, 17652, 17654, 17656, 17658, 17660, 17662, 17664, 17666, 17668, 17670, 17672, 17674, 17676, 17678, 17680, 17682, 17684, 17686, 17688, 17690, 17692, 17694, 17696, 17698, 17700, 17702, 17704, 17706, 17708, 17710, 17712, 17714, 17716, 17718, 17720, 17722, 17724, 17726, 17728, 17730, 17732, 17734, 17736, 17738, 17740, 17742, 17744, 17746, 17748, 17750, 17752, 17754, 17756, 17758, 17760, 17762, 17764, 17766, 17768, 17770, 17772, 17774, 17776, 17778, 17780, 17782, 17784, 17786, 17788, 17790, 17792, 17794, 17796, 17798, 17800, 17802, 17804, 17806, 17808, 17810, 17812, 17814, 17816, 17818, 17820, 17822, 17823, 17824, 17825, 17826, 17827, 17828, 17829, 17830, 17831, 17832, 17833, 17834, 17835, 17836, 17837, 17838, 17840, 17841, 17842, 17843, 17844, 17845, 17846, 17847, 17848, 17849, 17850, 17851, 17852, 17853, 17855, 17857, 17859, 17861, 17863, 17865, 17867, 17869, 17871, 17872, 17873, 17874, 17875, 17876, 17877, 17878, 17879, 17880, 17881, 17882, 17883, 17884, 17885, 17886, 17887, 17888, 17889, 17891, 17893, 17895, 17897, 17899, 17901, 17903, 17905, 17907, 17909, 17911, 17913, 17915, 17917, 17919, 17921, 17923, 17925, 17927, 17929, 17930, 17931, 17933, 17935, 17937, 17939, 17941, 17943, 17945, 17946, 17947, 17948, 17949, 17951, 17953, 17955, 17957, 17959, 17960, 17961, 17962, 17963, 17964, 17965, 17966, 17967, 17968, 17969, 17970, 17971, 17972, 17973, 17974, 17975, 17976, 17977, 17979, 17981, 17982, 17983, 17984, 17985, 17986, 17987, 17988, 17989, 17990, 17991, 17992, 17993, 17994, 17995, 17996, 17997, 17998, 17999, 18000, 18001, 18003, 18005, 18007, 18009, 18011, 18013, 18015, 18017, 18019, 18021, 18023, 18025, 18027, 18029, 18031, 18033, 18035, 18037, 18039, 18041, 18043, 18044, 18045, 18047, 18049, 18051, 18053, 18055, 18057, 18059, 18061, 18063, 18065, 18067, 18069, 18071, 18073, 18075, 18077, 18079, 18081, 18082, 18083, 18084, 18085, 18086, 18087, 18089, 18091, 18093, 18095, 18097, 18099, 18101, 18103, 18105, 18107, 18109, 18111, 18113, 18115, 18117, 18119, 18120, 18121, 18123, 18125, 18127, 18129, 18131, 18133, 18135, 18136, 18137, 18138, 18139, 18140, 18141, 18142, 18143, 18144, 18145, 18146, 18147, 18148, 18149, 18151, 18153, 18155, 18157, 18159, 18161, 18163, 18165, 18166, 18167, 18168, 18169, 18170, 18171, 18172, 18173, 18174, 18175, 18176, 18177, 18178, 18179, 18180, 18181, 18182, 18183, 18185, 18187, 18189, 18191, 18193, 18195, 18197, 18199, 18201, 18203, 18205, 18207, 18209, 18211, 18213, 18215, 18217, 18219, 18221, 18223, 18225, 18227, 18229, 18231, 18233, 18234, 18235, 18236, 18237, 18239, 18241, 18243, 18245, 18247, 18249, 18251, 18253, 18255, 18257, 18259, 18261, 18263, 18264, 18265, 18266, 18267, 18268, 18269, 18270, 18271, 18273, 18275, 18277, 18279, 18281, 18283, 18285, 18287, 18289, 18291, 18293, 18295, 18297, 18299, 18301, 18303, 18304, 18305, 18306, 18307, 18308, 18309, 18310, 18311, 18312, 18313, 18314, 18315, 18316, 18317, 18318, 18319, 18320, 18321, 18322, 18323, 18324, 18325, 18326, 18327, 18328, 18329, 18330, 18331, 18332, 18333, 18335, 18337, 18338, 18339, 18340, 18341, 18342, 18343, 18344, 18345, 18346, 18347, 18349, 18351, 18353, 18355, 18356, 18357, 18358, 18359, 18360, 18361, 18362, 18363, 18364, 18365, 18366, 18367, 18369, 18371, 18373, 18375, 18377, 18379, 18381, 18383, 18384, 18385, 18386, 18387, 18389, 18391, 18393, 18395, 18396, 18397, 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406, 18407, 18408, 18409, 18410, 18411, 18413, 18415, 18417, 18419, 18421, 18423, 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433, 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442, 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451, 18452, 18453, 18454, 18455, 18456, 18457, 18458, 18459, 18460, 18461, 18462, 18463, 18464, 18465, 18466, 18467, 18468, 18469, 18470, 18471, 18472, 18473, 18474, 18475, 18476, 18477, 18478, 18479, 18480, 18481, 18482, 18483, 18484, 18485, 18486, 18487, 18488, 18489, 18490, 18491, 18493, 18495, 18497, 18499, 18501, 18503, 18505, 18507, 18508, 18509, 18510, 18511, 18512, 18513, 18514, 18515, 18517, 18518, 18519, 18521, 18523, 18525, 18527, 18529, 18531, 18533, 18534, 18535, 18537, 18539, 18541, 18543, 18545, 18547, 18549, 18551, 18553, 18555, 18557, 18558, 18559, 18560, 18561, 18562, 18563, 18564, 18565, 18567, 18569, 18571, 18573, 18575, 18577, 18579, 18581, 18583, 18585, 18586, 18587, 18588, 18589, 18590, 18591, 18592, 18593, 18595, 18597, 18599, 18601, 18603, 18605, 18607, 18609, 18611, 18612, 18613, 18614, 18615, 18616, 18617, 18618, 18619, 18620, 18621, 18622, 18623, 18624, 18625, 18627, 18629, 18631, 18633, 18635, 18637, 18639, 18640, 18641, 18642, 18643, 18644, 18645, 18646, 18648, 18650, 18652, 18654, 18656, 18658, 18660, 18662, 18664, 18666, 18667, 18668, 18669, 18670, 18671, 18672, 18673, 18674, 18675, 18676, 18677, 18678, 18679, 18680, 18681, 18682, 18683, 18684, 18685, 18686, 18687, 18688, 18690, 18691, 18692, 18693, 18694, 18695, 18696, 18697, 18698, 18699, 18701, 18703, 18705, 18707, 18709, 18711, 18713, 18715, 18717, 18719, 18721, 18722, 18723, 18724, 18725, 18726, 18727, 18728, 18729, 18730, 18731, 18732, 18733, 18734, 18735, 18736, 18737, 18738, 18739, 18740, 18741, 18742, 18743, 18744, 18745, 18746, 18747, 18748, 18749, 18750, 18751, 18752, 18753, 18754, 18755, 18756, 18757, 18758, 18759, 18760, 18761, 18762, 18763, 18764, 18765, 18766, 18767, 18768, 18769, 18770, 18771, 18772, 18773, 18774, 18775, 18776, 18777, 18778, 18779, 18780, 18781, 18782, 18783, 18784, 18785, 18786, 18787, 18788, 18789, 18790, 18791, 18792, 18793, 18794, 18795, 18796, 18797, 18798, 18799, 18800, 18801, 18802, 18803, 18804, 18805, 18806, 18807, 18808, 18809, 18810, 18811, 18812, 18813, 18814, 18815, 18816, 18817, 18818, 18819, 18820, 18821, 18822, 18823, 18824, 18825, 18826, 18827, 18828, 18829, 18830, 18831, 18832, 18833, 18834, 18835, 18836, 18837, 18838, 18839, 18840, 18841, 18842, 18843, 18844, 18845, 18846, 18847, 18848, 18849, 18850, 18851, 18852, 18853, 18854, 18855, 18856, 18857, 18858, 18859, 18860, 18861, 18862, 18863, 18864, 18865, 18866, 18867, 18868, 18869, 18870, 18871, 18872, 18873, 18874, 18875, 18876, 18877, 18878, 18879, 18880, 18881, 18882, 18883, 18884, 18885, 18886, 18887, 18888, 18889, 18890, 18891, 18892, 18893, 18894, 18895, 18896, 18897, 18898, 18899, 18900, 18901, 18902, 18903, 18904, 18905, 18906, 18907, 18908, 18909, 18910, 18911, 18912, 18913, 18914, 18915, 18916, 18917, 18918, 18919, 18920, 18921, 18922, 18923, 18924, 18925, 18926, 18927, 18928, 18929, 18930, 18931, 18932, 18933, 18934, 18935, 18936, 18937, 18938, 18939, 18940, 18941, 18942, 18943, 18944, 18945, 18946, 18947, 18948, 18949, 18950, 18951, 18952, 18953, 18954, 18955, 18956, 18957, 18958, 18959, 18960, 18961, 18962, 18963, 18964, 18965, 18966, 18967, 18968, 18969, 18970, 18971, 18972, 18973, 18974, 18975, 18976, 18977, 18978, 18979, 18980, 18981, 18982, 18983, 18984, 18985, 18986, 18987, 18988, 18989, 18990, 18991, 18992, 18993, 18994, 18995, 18996, 18997, 18998, 18999, 19000, 19001, 19002, 19003, 19004, 19005, 19006, 19007, 19008, 19009, 19010, 19011, 19012, 19013, 19014, 19015, 19016, 19017, 19018, 19019, 19020, 19021, 19022, 19023, 19024, 19025, 19026, 19027, 19028, 19029, 19030, 19031, 19032, 19033, 19034, 19035, 19036, 19037, 19038, 19039, 19040, 19041, 19042, 19043, 19044, 19045, 19046, 19047, 19048, 19049, 19050, 19051, 19052, 19053, 19054, 19055, 19056, 19057, 19058, 19059, 19060, 19061, 19062, 19063, 19064, 19065, 19066, 19067, 19068, 19069, 19070, 19071, 19072, 19073, 19074, 19075, 19076, 19077, 19078, 19079, 19080, 19081, 19082, 19083, 19084, 19085, 19086, 19087, 19088, 19089, 19090, 19091, 19092, 19093, 19094, 19095, 19096, 19097, 19098, 19099, 19100, 19101, 19102, 19103, 19104, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 20735, 20737, 20739, 20741, 20743, 20745, 20747, 20749, 4801, 4796, 4299, 4294, 4555, 4555, 4567, 4565, 4567, 4565, 4451, 4446, 4539, 4539, 4539, 4539, 4560, 4555, 4567, 4565, 4299, 4294, 4327, 4322, 4534, 4534, 4472, 4534, 4534, 4567, 4565, 4560, 4560, 4567, 4565, 4567, 4565, 4780, 4775, 4780, 4775, 4801, 4796, 20754, 4801, 4796, 20756, 4327, 4322, 4512, 4507, 4539, 4534, 4430, 4425, 4430, 4425, 4430, 4425, 4512, 4507, 4539, 4534, 4512, 4507, 20758, 4451, 4446, 4485, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 20761, 4567, 4567, 4567, 20763, 4736, 4736, 4736, 4746, 4756, 4751, 4712, 4756, 4751, 4761, 4756, 4751, 4761, 4796, 4801, 19214, 4761, 4430, 4425, 4451, 4446, 20774, 20776, 4539, 4534, 20778, 20780, 20782, 4560, 4555, 20784, 20786, 20788, 20790, 6335, 6330, 6335, 6330, 6507, 6502, 6507, 6502, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 4539, 4534, 4560, 4555, 4560, 4555, 4560, 4555, 20812, 4796, 4801, 6273, 6271, 20821, 20823, 6335, 6330, 6486, 6481, 6486, 6481, 6507, 6502, 6467, 4299, 4294, 4327, 4322, 4539, 4534, 20830, 4567, 4565, 4327, 4322, 4539, 4534, 4327, 4322, 4485, 4560, 4555, 20832, 20834, 20836, 20838, 20840, 4327, 4322, 4299, 4294, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4539, 4534, 4560, 4555, 20842, 20844, 20846, 4741, 4736, 4731, 4736, 4741, 4746, 4741, 4736, 4731, 4736, 4741, 4746, 20850, 19300, 4451, 4446, 4451, 4446, 4512, 4507, 4512, 4507, 4539, 4534, 20852, 20854, 20856, 4299, 4294, 4512, 4507, 4512, 4507, 20858, 20860, 20862, 20864, 20866, 20868, 4451, 4446, 4451, 4446, 4780, 4775, 4780, 4775, 6260, 6255, 20891, 6270, 6335, 6330, 6335, 6330, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6273, 6271, 6270, 20911, 6270, 20913, 6278, 6335, 6330, 6335, 6330, 6502, 6507, 20915, 19361, 4712, 4756, 4751, 4761, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4756, 4751, 4712, 19377, 4761, 4299, 4294, 4299, 4294, 19384, 4780, 4775, 4451, 4446, 4485, 4539, 4534, 4539, 4534, 4560, 4555, 4560, 4555, 20933, 4736, 4746, 4736, 4731, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4512, 4507, 19416, 4451, 4446, 4451, 4446, 4539, 4534, 4567, 4565, 20942, 4567, 4565, 20944, 4756, 4751, 4761, 19431, 4712, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4761, 4327, 4322, 19446, 4299, 4294, 4327, 4322, 4327, 4322, 4430, 4425, 4451, 4446, 4451, 4446, 4560, 4555, 20946, 4567, 4565, 4567, 4565, 20948, 4327, 4322, 4560, 4555, 4560, 4555, 20950, 4567, 4565, 20952, 4567, 4565, 20954, 4741, 4736, 4731, 4736, 4741, 4746, 4756, 4751, 4761, 19484, 4712, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4796, 4801, 4756, 4751, 4761, 4327, 4322, 19504, 4299, 4294, 4299, 4294, 4327, 4322, 19512, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4451, 4446, 4512, 4507, 19526, 4539, 4534, 4560, 4555, 4560, 4555, 20964, 4567, 4565, 20966, 4567, 4565, 20968, 4327, 4322, 4327, 4322, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4451, 4446, 4451, 4446, 4539, 4534, 4560, 4555, 20970, 4560, 4555, 20972, 4567, 4565, 20974, 4560, 4555, 20976, 4560, 4555, 20978, 4567, 4565, 20980, 4756, 4751, 4712, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4780, 4775, 4780, 4775, 4801, 4796, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6271, 6273, 6270, 6309, 6309, 6309, 6309, 6335, 6330, 6330, 6335, 6260, 6255, 6260, 6255, 6260, 6255, 6255, 6260, 6273, 6271, 6273, 6271, 6273, 6271, 6270, 6314, 6314, 6314, 6314, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21007, 6270, 21009, 6278, 6335, 6330, 6335, 6330, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 21024, 21026, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 21028, 21030, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 21048, 21050, 4327, 4322, 19660, 4512, 4507, 4512, 4507, 21053, 21055, 21058, 19666, 4411, 4485, 4560, 4555, 21060, 21062, 4299, 4294, 4327, 4322, 21064, 19676, 4560, 4555, 21066, 21068, 21070, 21072, 21074, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4741, 4736, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4741, 4736, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4756, 4751, 19706, 4712, 19709, 4780, 4775, 4801, 4796, 4327, 4322, 21080, 4560, 4555, 21082, 4567, 4299, 4294, 4327, 4322, 4411, 4451, 4446, 4512, 4507, 4512, 4507, 4512, 4507, 4485, 4539, 4534, 4539, 4534, 4512, 4507, 4560, 4555, 21084, 4560, 4555, 21086, 4560, 4555, 21088, 4741, 4731, 4741, 4746, 4741, 4741, 4741, 4746, 4756, 4751, 4761, 4741, 4741, 4741, 4746, 19760, 4761, 4801, 4796, 4327, 4322, 4327, 4322, 19769, 4430, 4425, 4451, 4446, 4485, 4539, 4534, 4539, 4534, 4567, 4565, 4327, 4322, 4327, 4322, 4327, 4322, 21094, 4327, 4322, 4451, 4446, 4430, 4425, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4512, 4507, 4472, 4485, 4539, 4534, 4539, 4534, 21096, 4560, 4555, 21098, 4565, 4565, 4565, 4299, 4294, 4299, 4294, 21100, 19824, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4411, 4430, 4425, 4512, 4507, 19841, 19843, 4539, 4534, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4560, 4555, 21102, 4560, 4555, 21104, 4567, 4567, 4567, 4567, 4741, 4731, 4741, 4746, 4756, 4751, 4712, 4741, 4741, 4741, 4741, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4741, 4741, 4741, 4746, 19892, 4761, 4741, 4741, 4741, 4746, 4756, 4751, 4712, 19902, 4780, 4775, 4801, 4796, 4801, 4796, 4430, 4425, 4327, 4322, 4327, 4322, 4430, 4425, 4430, 4425, 4430, 4425, 4567, 4565, 21114, 4567, 4565, 4567, 4565, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 19933, 19935, 4451, 4446, 4430, 4425, 4451, 4446, 4485, 21116, 4567, 4565, 4567, 4565, 4567, 4565, 19948, 4712, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4327, 4322, 4430, 4425, 4512, 4507, 4472, 4512, 4507, 4565, 4327, 4322, 4299, 4294, 4327, 4322, 19981, 4430, 4425, 4430, 4425, 4430, 4425, 4485, 4539, 4534, 21122, 4560, 4555, 4565, 4565, 4565, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 4327, 4322, 4327, 4322, 20009, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4472, 4539, 4534, 4539, 4534, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4539, 4534, 4560, 4555, 4560, 4555, 4560, 4555, 21124, 4567, 21126, 4567, 4567, 4736, 4736, 4736, 4746, 4756, 4751, 4712, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4796, 4801, 4796, 4801, 4803, 4736, 4736, 4736, 4736, 4756, 4751, 4712, 20089, 4761, 4780, 4775, 4780, 4775, 4801, 4796, 21134, 4801, 4796, 21136, 4327, 4322, 4327, 4322, 4327, 4322, 4299, 4294, 4327, 4322, 21145, 4327, 4322, 4327, 4322, 4299, 4294, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4430, 4425, 4411, 4485, 4539, 4534, 20134, 4539, 4534, 21147, 21149, 4327, 4322, 4327, 4322, 4327, 4322, 4327, 4322, 4299, 4294, 4299, 4294, 4327, 4322, 21151, 4327, 4322, 4327, 4322, 20156, 20158, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4430, 4425, 4411, 4430, 4425, 4451, 4446, 4512, 4507, 4485, 4512, 4507, 4512, 4507, 4539, 4534, 4512, 4507, 20190, 4560, 4555, 4560, 4555, 4560, 4555, 21155, 21157, 21159, 21161, 21163, 4327, 4322, 20200, 4327, 4322, 4327, 4322, 4299, 4294, 4299, 4294, 4327, 4322, 4327, 4322, 4327, 4322, 21171, 20216, 20218, 4430, 4425, 4430, 4425, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4430, 4425, 4411, 4430, 4425, 4430, 4425, 4451, 4446, 4451, 4446, 4512, 4507, 4512, 4507, 4512, 4507, 4485, 4539, 4534, 4539, 4534, 4512, 4507, 20256, 20258, 4539, 4534, 4560, 4555, 21189, 4560, 4555, 21191, 21193, 21196, 21199, 21201, 4741, 4736, 4731, 4736, 4741, 4746, 20272, 4712, 4741, 4736, 4731, 4736, 4741, 4746, 4756, 4751, 4761, 4780, 4775, 4780, 4775, 4796, 4801, 4803, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 20298, 4712, 4741, 4736, 4741, 4736, 4741, 4736, 4746, 4756, 4751, 4761, 20311, 4780, 4775, 4801, 4796, 4801, 4796, 6335, 6330, 6335, 6330, 21219, 6270, 21221, 6278, 21223, 6270, 21225, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6486, 6481, 6507, 6502, 21228, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6502, 6507, 21237, 6335, 6330, 6335, 6330, 6273, 6271, 6273, 6271, 6273, 6271, 6278, 6335, 6330, 6335, 6330, 6260, 6255, 6265, 6260, 6255, 6250, 21250, 21252, 6260, 6255, 6265, 6260, 6255, 6250, 21254, 21256, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6488, 6486, 6481, 6273, 6271, 6273, 6271, 21268, 6270, 21270, 6278, 21272, 21274, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21285, 21287, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21289, 21291, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21293, 6270, 21295, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6502, 6507, 21297, 6486, 6481, 6488, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6486, 6481, 6467, 6486, 6481, 6486, 6481, 6260, 6255, 6265, 6260, 6255, 6250, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6295, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 6273, 6271, 6273, 6271, 6260, 6255, 6265, 6260, 6255, 6250, 6273, 6271, 6273, 6271, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 6486, 6481, 6488, 6467, 6502, 6507, 21311, 6486, 6481, 6467, 6486, 6481, 6488, 6507, 6502, 6507, 6502, 6486, 6481, 6488, 6467, 6260, 6255, 6260, 6255, 6260, 6255, 6260, 6255, 6273, 6271, 6270, 6273, 6271, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21327, 6270, 21329, 6278, 6260, 6255, 6260, 6255, 6260, 6255, 6265, 21333, 6270, 21335, 6278, 6314, 6309, 6314, 6309, 6314, 6309, 6314, 6309, 6335, 6330, 6335, 6330, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 6502, 6507, 6502, 6507, 6486, 6481, 6486, 6481, 6486, 6481, 6467, 6507, 6502, 6507, 6502, 6486, 6481, 6486, 6481, 6486, 6481, 21347, 6507, 6502, 21349, 6486, 6481, 6467, 6486, 6481, 6486, 6481, 6507, 6502, 6507, 6502, 8845, 8845, 8845, 8845, 21366, 21368, 21129, 21128, 21129, 21128, 8845, 8840, 8845, 8840, 8845, 8840, 8826, 21370, 21372, 8845, 8840, 21374, 21376, 21378, 21380, 8840, 8840, 8840, 8840, 21382, 21384, 21386, 21388, 21390, 9651, 9646, 9602, 9607, 9607, 9602, 9616, 9621, 21392, 9602, 9607, 9607, 9602, 21394, 21396, 21398, 21400, 21402, 21404, 9621, 9616, 21406, 21408, 9621, 9616, 21410, 21412, 21414, 21416, 9597, 9621, 9616, 21422, 21424, 9607, 9602, 9607, 9602, 21426, 21428, 21430, 21432, 9651, 9646, 21434, 9607, 9602, 9607, 9602, 9621, 9616, 21437, 21439, 21441, 21443, 21445, 21447, 21449, 21451, 9607, 9602, 21453, 21456, 21458, 21460, 21462, 21464, 8845, 8840, 21466, 9621, 21468, 21470, 9621, 21472, 9621, 9621, 9651, 9646, 21474, 21476, 21478, 21480, 21482, 21484, 21486, 21488, 21490, 21492, 21494, 7836, 21496, 21498, 9607, 9602, 9607, 9602, 7836, 21500, 21502, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21504, 9621, 9607, 9602, 9651, 9646, 21506, 21508, 9607, 9602, 21510, 9621, 9607, 9602, 21512, 9621, 21514, 9607, 9602, 9609, 9607, 9602, 9607, 9602, 21516, 9621, 21518, 9621, 21520, 21522, 21524, 9621, 9651, 9646, 21526, 7836, 9588, 21528, 9607, 9602, 9607, 9602, 21530, 9621, 21532, 9651, 9646, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21534, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 8847, 21537, 21539, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21542, 21544, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21546, 21548, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21550, 21552, 21554, 21556, 21558, 21560, 9609, 9607, 9602, 9607, 9602, 9607, 9602, 21562, 9651, 9646, 21564, 7836, 21566, 21568, 9588, 21570, 21572, 9607, 9602, 9607, 9602, 9609, 9602, 9607, 21574, 9616, 9597, 9616, 21576, 9626, 21578, 21580, 9651, 9646, 21582, 21584, 21586, 21588, 21590, 21592, 21595, 9607, 9602, 9607, 9602, 9609, 9607, 9602, 21598, 9616, 9607, 9602, 9607, 9602, 9609, 21600, 9616, 21602, 21604, 21606, 21608, 9651, 9646, 21198, 21195, 21198, 21195, 8845, 8840, 21610, 8845, 8840, 8845, 8840, 21612, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21614, 21616, 21618, 21620, 8845, 8840, 8845, 8840, 21622, 8845, 8840, 8845, 8840, 8845, 8840, 8826, 21625, 21628, 8845, 8840, 8845, 8840, 8845, 8840, 8845, 8840, 21634, 21636, 21638, 21641, 21644, 9588, 21646, 9588, 9607, 9602, 9607, 9602, 21648, 21650, 9651, 9646, 21652, 21654, 9588, 21656, 9607, 9602, 21658, 21660, 21662, 21664, 9651, 9646, 9651, 9646, 9607, 9602, 21666, 9651, 9646, 9607, 9602, 9609, 21668, 21670, 9607, 9602, 9607, 9602, 21672, 9626, 9651, 9646, 9607, 9602, 9607, 9602, 9621, 9616, 9626, 9651, 9646, 21676, 21678, 21680, 21682, 21684, 9607, 9602, 9607, 9602, 21686, 21688, 21690, 21692, 9651, 9646, 21694, 9607, 9602, 9607, 9602, 21696, 21698, 21700, 21702, 9651, 9646, 21704, 21706, 21708, 21710, 9588, 9607, 9602, 9597, 21712, 9607, 9602, 9607, 9602, 21716, 21718, 21721, 21723, 21726, 9651, 9646, 21729, 9588, 21731, 21734, 9607, 9602, 9607, 9602, 9621, 9616, 21740, 9626, 21742, 21745, 9651, 9646, 9651, 9646, 21421, 21420, 21421, 21420, 21419, 21418, 21643, 21640, 21643, 21640, 21643, 21640, 21643, 21640, 28, 29, 30, 31, 21768, 21769, 21770, 21771, 21772, 21773, 21774, 21775, 21776, 21777, 21778, 21779, 21780, 21781, 21782, 21783, 21784, 21785, 21786, 21787, 21788, 21789, 21790, 21791, 21792, 21793, 21794, 21795, 21796, 21797, 21798, 21799, 21800, 21801, 21802, 21803, 21804, 21805, 21806, 21807, 21808, 21809, 21810, 21812, 21813, 21815, 21816, 21817, 21818, 21819, 21820, 21821, 21822, 21823, 21824, 21825, 21826, 21827, 21828, 21829, 21830, 21831, 21832, 21834, 21835, 21836, 21837, 21838, 21839, 21840, 21841, 21842, 21843, 21845, 21846, 21847, 21849, 21850, 21851, 21852, 21853, 21854, 21855, 21856, 21857, 21858, 21859, 21860, 21861, 21862, 21863, 21864, 21865, 21866, 21867, 21868, 21869, 21872, 21873, 21877, 21878, 21883, 21884, 21885, 21886, 21887, 21888, 21889, 21890, 21891, 21892, 21893, 21894, 21895, 21896, 21897, 21898, 21899, 21900, 21901, 21902, 21903, 21904, 21905, 21906, 21907, 21908, 21909, 21910, 21912, 21913, 21914, 21915, 21918, 21919, 21920, 21921, 21922, 21923, 21924, 21925, 21926, 21927, 21928, 21929, 21930, 21931, 21932, 21934, 21935, 21936, 21937, 21938, 21939, 21940, 21941, 21942, 21943, 21944, 21950, 21951, 21952, 21953, 21954, 21955, 21956, 21957, 21958, 21959, 21960, 21961, 21962, 21963, 21964, 21965, 21969, 21970, 21971, 21972, 21973, 21974, 21975, 21976, 21977, 21978, 21979, 21980, 21982, 21983, 21984, 21985, 21986, 21987, 21988, 21989, 21990, 21991, 21992, 21996, 21997, 21998, 21999, 22000, 22001, 22008, 22009, 22010, 22011, 22012, 22013, 22014, 22015, 22016, 22017, 22019, 22020, 22021, 22022, 22023, 22024, 22025, 22026, 22027, 22028, 22029, 22030, 22031, 22032, 22033, 22034, 22035, 22036, 22037, 22038, 22039, 22040, 22041, 22042, 22043, 22044, 22045, 22046, 22047, 22048, 22049, 22050, 22052, 22054, 22055, 22056, 22057, 22058, 22059, 22060, 22062, 22063, 22064, 22065, 22066, 22067, 22068, 22069, 22070, 22071, 22072, 22073, 22074, 22075, 22076, 22077, 22078, 22079, 22080, 22081, 22082, 22083, 22084, 22085, 22086, 22087, 22088, 22089, 22090, 22091, 22092, 22093, 22094, 22095, 22096, 22098, 22099, 22100, 22101, 22102, 22103, 22104, 22105, 22106, 22107, 22108, 22109, 22110, 22111, 22112, 22113, 22114, 22115, 22116, 22117, 22118, 22119, 22120, 22121, 22122, 22123, 22125, 22126, 22128, 22129, 22130, 22131, 22132, 22133, 22134, 22135, 22136, 22137, 22138, 22139, 22140, 22141, 22142, 22143, 22144, 22145, 22146, 22147, 22148, 22149, 22150, 22151, 22152, 22153, 22154, 22155, 22156, 22157, 22158, 22159, 22161, 22162, 22163, 22164, 22166, 22167, 22168, 22169, 22170, 22171, 22173, 22174, 22176, 22177, 22179, 22180, 22181, 22182, 22183, 22184, 22185, 22186, 22187, 22188, 22189, 22190, 22191, 22192, 22193, 22194, 22195, 22196, 22197, 22198, 22199, 22200, 22201, 22202, 22203, 22204, 22205, 22206, 22207, 22208, 22209, 22210, 22211, 22212, 22213, 22214, 22215, 22216, 22217, 22218, 22219, 22220, 22221, 22222, 22223, 22224, 22225, 22226, 22227, 22228, 22229, 22230, 22231, 22232, 22233, 22235, 22236, 22238, 22239, 22241, 22242, 22243, 22244, 22245, 22246, 22247, 22248, 22249, 22250, 22251, 22252, 22253, 22254, 22255, 22256, 22257, 22258, 22259, 22260, 22262, 22263, 22265, 22266, 22268, 22269, 22271, 22272, 22274, 22275, 22277, 22278, 22279, 22280, 22281, 22282, 22283, 22284, 22285, 22286, 22287, 22288, 22289, 22290, 22291, 22292, 22293, 22294, 22295, 22296, 22297, 22298, 22299, 22300, 22301, 22302, 22303, 22304, 22305, 22306, 22307, 22308, 22309, 22310, 22311, 22312, 22313, 22314, 22315, 22316, 22317, 22318, 22319, 22320, 22321, 22322, 22323, 22324, 22325, 22326, 22327, 22328, 22329, 22330, 22331, 22332, 22333, 22334, 22335, 22336, 22337, 22338, 22339, 22340, 22341, 22342, 22343, 22344, 22345, 22346, 22347, 22348, 22349, 22350, 22351, 22352, 22353, 22354, 22355, 22356, 22357, 22358, 22359, 22360, 22361, 22362, 22363, 22364, 22366, 22368, 22369, 22370, 22371, 22372, 22373, 22374, 22375, 22376, 22377, 22378, 22379, 22382, 22383, 22384, 22385, 22386, 22387, 22388, 22391, 22392, 22393, 22394, 22395, 22396, 22397, 22398, 22399, 22400, 22401, 22404, 22405, 22406, 22407, 22408, 22409, 22410, 22414, 22415, 22416, 22417, 22418, 22421, 22422, 22423, 22424, 22426, 22427, 22428, 22434, 22435, 22436, 22437, 22438, 22439, 22440, 22441, 22442, 22443, 22444, 22445, 22446, 22447, 22448, 22449, 22450, 22451, 22452, 22453, 22454, 22455, 22456, 22457, 22458, 22459, 22460, 22461, 22462, 22463, 22464, 22465, 22466, 22467, 22468, 22469, 22470, 22471, 22472, 22473, 22474, 22475, 22476, 22477, 22478, 22479, 22480, 22481, 22482, 22483, 22484, 22485, 22486, 22487, 22488, 22489, 22490, 22491, 22492, 22493, 22494, 22495, 22496, 22497, 22498, 22499, 22501, 22502, 22504, 22505, 22506, 22507, 22508, 22509, 22510, 22511, 22512, 22513, 22514, 22515, 22516, 22517, 22518, 22519, 22520, 22521, 22522, 22523, 22524, 22525, 22526, 22528, 22529, 22531, 22532, 22534, 22535, 22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22545, 22546, 22547, 22548, 22549, 22550, 22551, 22552, 22553, 22554, 22555, 22556, 22557, 22558, 22559, 22560, 22561, 22562, 22563, 22564, 22565, 22566, 22567, 22568, 22569, 22570, 22571, 22572, 22573, 22574, 22576, 22577, 22578, 22579, 22580, 22581, 22582, 22583, 22584, 22585, 22586, 22587, 22588, 22589, 22590, 22591, 22592, 22593, 22594, 22595, 22596, 22597, 22598, 22599, 22600, 22601, 22602, 22604, 22605, 22607, 22608, 22609, 22610, 22611, 22612, 22613, 22615, 22616, 22617, 22618, 22619, 22620, 22621, 22622, 22623, 22624, 22625, 22626, 22627, 22628, 22629, 22630, 22631, 22632, 22633, 22634, 22635, 22636, 22637, 22638, 22639, 22640, 22641, 22642, 22643, 22644, 22645, 22646, 22647, 22649, 22650, 22652, 22653, 22654, 22655, 22656, 22657, 22658, 22659, 22660, 22661, 22662, 22663, 22664, 22665, 22666, 22667, 22668, 22669, 22670, 22671, 22672, 22673, 22674, 22675, 22676, 22677, 22678, 22679, 22680, 22681, 22682, 22683, 22684, 22685, 22686, 22687, 22688, 22689, 22690, 22691, 22692, 22693, 22694, 22695, 22696, 22697, 22698, 22699, 22700, 22701, 22702, 22703, 22704, 22705, 22706, 22707, 22708, 22709, 22710, 22711, 22713, 22714, 22715, 22716, 22717, 22718, 22719, 22720, 22721, 22722, 22723, 22724, 22725, 22726, 22727, 22728, 22729, 22730, 22731, 22732, 22733, 22735, 22736, 22737, 22738, 22739, 22740, 22741, 22742, 22743, 22744, 22745, 22746, 22747, 22748, 22749, 22750, 22751, 22752, 22753, 22754, 22755, 22756, 22757, 22758, 22759, 22760, 22761, 22762, 22763, 22764, 22765, 22766, 22767, 22768, 22769, 22770, 22771, 22772, 22773, 22774, 22775, 22776, 22777, 22778, 22779, 22780, 22781, 22782, 22784, 22785, 22786, 22787, 22788, 22789, 22790, 22791, 22792, 22793, 22794, 22795, 22796, 22797, 22798, 22799, 22800, 22801, 22802, 22803, 22804, 22805, 22806, 22807, 22808, 22809, 22810, 22811, 22812, 22813, 22814, 22815, 22816, 22817, 22818, 22819, 22820, 22821, 22822, 22823, 22824, 22825, 22826, 22827, 22828, 22829, 22830, 22831, 22832, 22833, 22834, 22835, 22836, 22837, 22838, 22839, 22840, 22841, 22842, 22843, 22844, 22845, 22846, 22847, 22848, 22850, 22852, 22853, 22854, 22855, 22856, 22857, 22858, 22859, 22860, 22861, 22862, 22863, 22864, 22865, 22866, 22867, 22868, 22869, 22870, 22871, 22872, 22873, 22874, 22875, 22876, 22877, 22878, 22879, 22880, 22881, 22882, 22883, 22884, 22885, 22886, 22887, 22888, 22889, 22891, 22892, 22894, 22895, 22896, 22897, 22898, 22899, 22900, 22901, 22902, 22903, 22905, 22906, 22907, 22908, 22909, 22910, 22911, 22912, 22913, 22914, 22915, 22916, 22917, 22918, 22919, 22920, 22921, 22922, 22923, 22924, 22925, 22926, 22927, 22928, 22929, 22930, 22931, 22934, 22935, 22936, 22937, 22938, 22939, 22940, 22941, 22942, 22943, 22944, 22945, 22946, 22947, 22949, 22950, 22951, 22952, 22953, 22954, 22955, 22956, 22957, 22958, 22959, 22960, 22961, 22962, 22963, 22964, 22965, 22966, 22967, 22968, 22969, 22970, 22971, 22972, 22973, 22974, 22975, 22976, 22977, 22978, 22979, 22980, 22981, 22982, 22983, 22984, 22985, 22986, 22987, 22988, 22989, 22990, 22991, 22997, 22998, 22999, 23000, 23001, 23002, 23003, 23004, 23005, 23006, 23007, 23008, 23009, 23010, 23011, 23012, 23013, 23015, 23016, 23017, 23018, 23019, 23020, 23021, 23022, 23023, 23024, 23025, 23026, 23027, 23028, 23029, 23030, 23031, 23032, 23033, 23034, 23035, 23036, 23037, 23038, 23039, 23040, 23041, 23042, 23043, 23044, 23045, 23046, 23047, 23048, 23049, 23050, 23051, 23052, 23053, 23054, 23055, 23056, 23057, 23058, 23060, 23061, 23067, 23068, 23069, 23070, 23071, 23072, 23073, 23074, 23075, 23076, 23077, 23078, 23079, 23080, 23081, 23082, 23083, 23084, 23085, 23086, 23087, 23088, 23089, 23090, 23091, 23092, 23093, 23094, 23095, 23096, 23097, 23098, 23099, 23100, 23101, 23102, 23103, 23104, 23105, 23106, 23107, 23108, 23109, 23110, 23111, 23112, 23113, 23114, 23115, 23116, 23117, 23118, 23119, 23120, 23122, 23124, 23126, 23128, 23129, 23130, 23131, 23132, 23133, 23134, 23135, 23136, 23137, 23138, 23139, 23140, 23142, 23143, 23144, 23145, 23146, 23147, 23148, 23149, 23150, 23151, 23152, 23153, 23154, 23155, 23157, 23158, 23159, 23160, 23161, 23162, 23163, 23164, 23165, 23166, 23167, 23168, 23169, 23170, 23171, 23172, 23173, 23174, 23175, 23176, 23177, 23180, 23181, 23182, 23183, 23184, 23185, 23188, 23189, 23190, 23191, 23192, 23193, 23194, 23195, 23196, 23197, 23198, 23199, 23200, 23201, 23202, 23203, 23204, 23205, 23206, 23207, 23208, 23209, 23210, 23211, 23212, 23213, 23214, 23215, 23216, 23217, 23218, 23219, 23220, 23221, 23222, 23223, 23224, 23226, 23228, 23231, 23232, 23233, 23234, 23235, 23236, 23237, 23238, 23239, 23240, 23241, 23242, 23243, 23244, 23245, 23246, 23247, 23248, 23249, 23250, 23251, 23252, 23253, 23254, 23255, 23256, 23257, 23258, 23259, 23260, 23261, 23262, 23263, 23264, 23265, 23266, 23267, 23268, 23269, 23270, 23271, 23272, 23273, 23274, 23275, 23276, 23277, 23278, 23279, 23280, 23281, 23282, 23283, 23284, 23285, 23286, 23287, 23288, 23289, 23290, 23291, 23292, 23293, 23296, 23297, 23298, 23299, 23300, 23301, 23302, 23305, 23306, 23307, 23308, 23309, 23310, 23311, 23313, 23315, 23316, 23317, 23318, 23319, 23320, 23321, 23322, 23323, 23324, 23325, 23326, 23327, 23328, 23329, 23331, 23332, 23333, 23334, 23335, 23336, 23337, 23338, 23339, 23340, 23341, 23342, 23343, 23344, 23345, 23346, 23347, 23348, 23349, 23350, 23351, 23352, 23353, 23354, 23355, 23356, 23357, 23358, 23359, 23360, 23361, 23362, 23363, 23364, 23365, 23366, 23367, 23368, 23369, 23370, 23371, 23372, 23373, 23374, 23375, 23376, 23377, 23378, 23379, 23380, 23381, 23382, 23383, 23384, 23385, 23386, 23387, 23388, 23389, 23390, 23391, 23392, 23393, 23394, 23395, 23396, 23397, 23398, 23399, 23400, 23401, 23402, 23403, 23404, 23405, 23406, 23407, 23408, 23409, 23410, 23411, 23412, 23413, 23414, 23415, 23416, 23417, 23418, 23419, 23420, 23421, 23422, 23423, 23424, 23425, 23426, 23427, 23428, 23429, 23430, 23431, 23432, 23433, 23434, 23435, 23436, 23437, 23438, 23439, 23440, 23441, 23442, 23443, 23444, 23446, 23447, 23448, 23449, 23450, 23451, 23452, 23453, 23454, 23455, 23456, 23457, 23458, 23459, 23460, 23461, 23462, 23463, 23464, 23465, 23466, 23467, 23468, 23469, 23470, 23471, 23472, 23473, 23474, 23475, 23476, 23477, 23478, 23479, 23480, 23481, 23482, 23483, 23484, 23485, 23486, 23487, 23488, 23489, 23490, 23491, 23492, 23494, 23496, 23497, 23498, 23499, 23500, 23501, 23502, 23503, 23505, 23507, 23508, 23509, 23510, 23511, 23512, 23513, 23514, 23515, 23516, 23517, 23518, 23519, 23520, 23521, 23522, 23523, 23524, 23525, 23526, 23527, 23528, 23529, 23530, 23531, 23532, 23533, 23534, 23535, 23536, 23537, 23538, 23539, 23540, 23541, 23542, 23543, 23544, 23545, 23546, 23547, 23549, 23550, 23552, 23553, 23554, 23555, 23556, 23557, 23558, 23559, 23560, 23561, 23562, 21763, 21761, 21767, 21765, 23563, 23564, 23565, 23566, 21848, 23569, 23570, 21848, 23571, 23572, 23573, 23574, 23575, 23576, 23577, 23578, 23579, 23582, 23583, 22431, 21870, 22433, 22431, 21882, 21129, 21128, 23588, 23589, 23590, 23591, 23597, 23598, 23599, 23600, 23601, 23602, 23603, 23604, 23606, 23607, 23608, 23609, 23616, 23617, 23620, 23621, 23626, 23627, 23628, 23631, 23632, 23633, 23634, 23639, 23640, 23642, 23643, 23644, 23645, 23646, 23647, 23656, 23657, 23664, 23665, 23667, 23670, 23672, 23673, 23674, 23675, 21309, 21307, 23687, 23690, 23691, 23692, 23693, 23694, 21129, 21128, 21947, 21129, 21128, 22851, 23697, 23698, 22005, 22276, 22005, 22007, 23699, 23700, 23701, 23702, 23703, 23704, 23705, 23706, 23707, 23708, 23709, 23710, 23711, 23712, 23713, 23714, 23716, 23717, 23718, 23719, 23720, 23723, 23724, 23726, 23727, 23728, 23730, 23732, 23733, 23734, 23735, 23736, 23737, 23738, 23740, 23742, 23746, 23747, 23748, 23750, 23751, 23753, 23754, 23755, 23756, 23758, 23760, 23761, 23762, 23763, 23764, 23765, 23766, 23767, 23768, 23769, 23771, 23772, 23773, 23774, 23775, 23776, 23777, 23778, 23779, 23782, 23783, 23784, 23785, 23786, 23787, 23788, 23789, 23792, 23793, 23794, 23795, 23796, 23797, 23798, 23799, 23802, 23803, 23804, 23805, 23806, 23807, 23808, 23809, 23816, 23817, 23818, 23819, 23820, 23821, 23822, 23824, 23825, 23827, 23830, 23833, 23834, 23835, 23836, 23837, 23838, 23839, 23841, 23842, 23843, 23845, 23848, 23849, 21326, 21325, 21326, 21325, 23857, 23858, 23859, 23860, 23861, 23862, 23863, 23865, 23866, 23867, 23868, 23869, 23870, 23872, 23877, 23878, 22413, 23879, 23880, 22413, 23881, 23882, 22431, 22433, 22433, 22431, 23883, 23884, 23886, 23887, 23888, 23889, 23891, 23892, 23893, 23894, 23895, 23896, 23897, 23898, 23903, 23904, 23905, 23906, 23908, 23909, 23910, 23911, 23912, 23913, 23914, 22996, 22994, 22996, 22994, 23066, 21198, 21195, 23917, 23918, 23919, 23920, 23921, 23922, 23923, 23924, 23930, 23932, 23933, 23934, 23935, 23936, 23939, 23940, 23943, 23945, 23946, 23951, 23952, 23953, 23954, 23955, 23956, 23958, 23959, 21309, 21308, 21309, 21308, 23960, 23961, 23962, 23965, 23966, 23967, 23968, 23970, 23971, 23972, 21309, 21308, 23973, 23974, 23975, 23976, 23977, 23978, 23979, 23980, 23981, 21309, 21308, 21307, 21306, 23987, 23988, 23989, 23990, 23995, 23996, 23998, 23999, 24000, 24001, 24006, 24007, 24012, 24013, 24014, 24015, 24017, 24018, 24019, 24020, 24026, 24027, 24029, 24032, 24033, 24034, 24035, 24036, 24037, 24039, 24042, 24043, 24044, 24045, 23595, 21643, 21640, 23587, 21643, 21640, 21640, 21624, 21643, 21627, 23587, 21643, 21640, 23595, 21643, 21640, 21597, 21736, 21733, 21594, 21594, 21597, 23596, 23622, 21725, 21744, 21736, 21733, 21597, 21594, 21736, 21733, 21594, 21597, 21744, 21725, 23611, 23610, 21747, 21720, 23612, 21747, 21720, 23614, 21594, 21597, 21736, 21733, 21597, 21594, 21733, 21736, 21597, 21594, 21597, 21594, 23622, 24046, 24047, 21747, 21597, 21594, 23659, 23658, 21747, 21744, 21594, 21597, 21736, 21733, 21594, 21597, 24048, 24049, 24050, 24051, 21720, 21736, 21733, 21594, 21597, 21736, 21733, 21597, 21594, 23636, 23635, 21744, 21725, 21747, 21720, 23651, 21747, 21720, 23655, 21594, 21597, 23659, 23658, 21747, 21744, 21624, 21640, 23662, 21643, 21640, 23663, 23926, 21643, 21640, 21747, 21720, 21720, 21747, 21594, 21597, 21747, 21720, 21747, 21720, 21594, 21597, 21594, 21597, 21594, 21597, 21597, 21594, 21594, 21597, 21594, 21597, 21597, 21594, 21594, 21597, 21594, 21597, 21594, 21597, 24016, 24021, 21747, 21720, 21725, 21744, 21594, 21597, 21594, 21597, 23791, 24052, 24053, 23791, 24054, 24055, 21725, 21744, 21736, 21733, 21594, 21597, 21744, 21725, 21725, 21744, 21597, 21594, 21744, 21725, 21594, 21597, 21744, 21725, 23770, 24056, 24057, 23781, 24058, 24059, 23791, 21624, 21640, 21627, 21643, 21736, 21733, 21597, 21594, 21597, 21594, 21736, 21733, 21747, 21744, 21736, 21733, 21594, 21597, 21747, 21744, 21594, 21597, 21736, 21733, 21597, 21594, 21720, 21725, 21747, 21744, 23926, 21643, 21640, 23902, 21643, 21640, 21624, 21640, 23902, 21643, 21640, 21640, 21624, 21643, 21627, 21643, 21640, 23926, 23938, 23937, 21747, 21744, 21736, 21733, 23944, 23947, 21744, 21747, 21720, 21725, 21736, 21733, 24016, 24021, 21747, 21744, 21725, 21720, 21736, 21733, 23964, 23963, 21744, 21747, 21736, 21733, 21736, 21733, 21744, 21747, 21736, 21733, 21736, 21733, 23992, 23991, 21744, 21725, 24003, 24002, 21720, 21747, 21736, 21733, 24016, 24021, 21747, 21725, 21744, 21720, 21736, 21733, 21747, 21744, 30, 31, 24064, 24066, 24070, 24072, 24074, 24080, 24082, 24084, 24086, 24093, 24097, 24099, 24101, 24103, 24105, 24107, 24109, 24111, 24113, 24115, 24117, 24119, 24121, 24123, 24125, 24127, 24130, 24132, 24135, 24144, 24147, 24150, 24153, 24157, 24159, 24161, 24163, 24165, 24167, 24169, 24171, 24173, 24175, 24177, 24179, 24181, 24183, 24185, 24187, 24189, 24191, 24193, 24195, 24197, 24199, 24201, 24203, 24206, 24208, 24210, 24212, 24214, 24216, 24218, 24221, 24223, 24225, 24227, 24229, 24231, 24233, 24235, 24237, 24239, 24242, 24245, 24248, 24252, 24254, 24256, 24258, 24260, 24262, 24264, 24266, 24268, 24270, 24272, 24274, 24276, 24279, 24281, 24283, 24285, 24287, 24289, 24291, 24293, 24295, 24297, 24299, 24301, 24303, 24305, 24307, 24312, 24314, 24316, 24320, 24323, 24325, 24327, 24330, 24335, 24337, 24340, 24342, 24345, 24347, 24349, 24351, 24357, 24359, 24361, 24363, 24365, 24368, 24371, 24373, 24375, 24377, 24379, 24381, 24386, 24388, 24390, 24393, 24396, 24399, 24401, 24403, 24405, 24407, 24409, 24411, 24413, 24415, 24417, 24419, 24421, 24423, 24425, 24427, 24430, 24433, 24438, 24440, 24442, 24444, 24446, 24448, 24450, 24453, 24456, 24458, 24460, 24463, 24465, 24467, 24469, 24471, 24473, 24476, 24478, 24480, 24482, 24484, 24486, 24488, 24490, 24492, 24494, 24496, 24498, 24500, 24502, 24504, 24506, 24508, 24510, 24512, 24514, 24516, 24519, 24521, 24523, 24525, 24527, 24529, 24531, 24533, 24535, 24537, 24539, 24541, 24543, 24545, 24547, 24549, 24551, 24553, 24555, 24557, 24559, 24561, 24563, 24570, 24572, 24574, 24576, 24578, 24580, 24582, 24584, 24586, 24593, 24595, 24597, 24599, 24601, 24606, 24608, 24610, 24612, 24614, 24617, 24619, 24621, 24624, 24626, 24628, 24630, 24632, 24635, 24638, 24640, 24645, 24647, 24649, 24652, 24654, 24657, 24662, 24665, 24668, 24671, 24673, 24675, 24677, 24680, 24685, 24688, 24691, 24694, 24696, 24698, 24700, 24702, 24704, 24707, 24709, 24714, 24716, 24718, 24720, 24723, 24725, 24728, 24730, 24732, 24734, 24737, 24739, 24741, 24743, 24745, 24747, 24757, 24766, 24768, 24770, 24773, 24775, 24778, 24780, 24782, 24784, 24786, 24788, 24790, 24792, 24794, 24796, 24798, 24801, 24803, 24805, 24807, 24809, 24811, 24813, 24815, 24817, 24822, 24824, 24827, 24829, 24831, 24833, 24835, 24838, 24840, 24844, 24846, 24849, 24851, 24853, 24855, 24857, 24859, 24869, 24876, 24879, 24881, 24883, 24885, 24897, 24901, 24903, 24905, 24907, 24909, 24911, 24913, 24915, 24917, 24919, 24921, 24923, 24925, 24927, 24929, 24931, 24935, 24937, 24939, 24942, 24944, 24946, 24950, 24953, 24955, 24957, 24959, 24961, 24964, 24966, 24968, 24971, 24974, 24976, 24978, 24981, 24983, 24985, 24988, 24990, 24995, 24997, 24999, 25001, 25003, 25005, 25008, 25010, 25012, 25014, 25016, 25018, 25020, 25022, 25024, 25026, 25028, 25031, 25034, 25036, 25038, 25041, 25043, 25045, 25047, 25049, 25051, 25053, 25062, 25065, 25068, 25070, 25072, 25074, 25076, 25083, 25088, 25090, 25092, 25094, 25096, 25098, 25100, 25102, 25104, 25106, 25108, 25110, 25112, 25114, 25116, 25118, 25120, 25122, 25124, 25128, 25131, 25133, 25135, 25137, 25139, 25141, 25143, 25145, 25147, 25149, 25153, 25155, 25157, 25159, 25161, 25163, 25165, 25168, 25170, 25172, 25175, 25177, 25179, 25181, 25184, 25186, 25188, 25190, 25193, 25195, 25197, 25199, 25201, 25203, 25205, 25209, 25211, 25213, 25215, 25217, 25219, 25221, 25224, 25226, 25228, 25230, 25232, 25234, 25236, 25239, 25241, 25243, 25247, 25249, 25251, 25253, 25256, 25261, 25264, 25267, 25270, 25272, 25274, 25277, 25279, 25281, 25286, 25288, 25290, 25293, 25297, 25299, 25301, 25303, 25305, 25311, 25313, 25315, 25317, 25319, 25321, 25323, 25325, 25327, 25329, 25331, 25333, 25335, 25337, 25339, 25341, 25343, 25345, 25348, 25350, 25352, 25355, 25358, 25361, 25364, 25366, 25368, 25370, 25372, 25374, 25376, 25378, 25380, 25382, 25384, 25386, 25388, 25390, 25392, 25395, 25397, 25399, 25403, 25405, 25407, 25409, 25411, 25413, 25415, 25417, 25419, 25421, 25423, 25425, 25427, 25429, 25431, 25433, 25435, 25437, 25439, 25441, 25443, 25445, 25447, 25449, 25451, 25453, 25455, 25457, 25459, 25461, 25463, 25466, 25468, 25470, 25473, 25475, 25477, 25482, 25484, 25486, 25488, 25490, 25492, 25494, 25496, 25499, 25501, 25503, 25505, 25507, 25509, 25511, 25514, 25516, 25518, 25521, 25524, 25526, 25528, 25530, 25532, 25534, 25536, 25538, 25540, 25542, 25544, 25546, 25548, 25550, 25552, 25555, 25557, 25559, 25561, 25563, 25566, 25568, 25570, 25573, 25576, 25578, 25580, 25582, 25584, 25586, 25588, 25590, 25592, 25594, 25596, 25598, 25600, 25602, 25604, 25606, 25608, 25610, 25613, 25616, 25618, 25620, 25622, 25624, 25626, 25628, 25630, 25632, 25635, 25638, 25640, 25642, 25644, 25646, 25648, 25650, 25652, 25654, 25659, 25661, 25663, 25668, 25670, 25672, 25674, 25676, 25678, 25680, 25682, 25684, 25687, 25689, 25691, 25693, 25695, 25698, 25700, 25702, 25704, 25706, 25708, 25710, 25713, 25715, 25717, 25719, 25721, 25722, 25723, 25724, 21173, 21174, 21154, 21153, 21174, 21173, 21154, 21153, 21173, 21185, 21186, 21187, 21188, 21173, 21185, 21186, 21187, 21188, 21173, 21174, 21185, 21186, 21187, 21188, 21173, 21174, 21154, 21153, 21173, 21174, 25729, 21174, 21173, 25732, 21174, 21173, 21848, 21129, 21128, 21173, 21174, 21848, 21129, 21128, 24143, 21206, 21205, 25735, 25737, 25739, 21187, 24156, 25742, 21173, 21174, 21187, 25744, 25745, 21173, 25746, 25747, 25748, 25749, 25750, 25755, 25757, 25759, 25761, 25763, 25765, 25767, 25769, 25772, 25774, 25776, 25778, 25780, 25782, 25784, 25786, 25788, 25794, 25657, 25796, 25797, 25667, 24278, 25799, 25801, 21174, 21173, 21173, 21174, 21174, 21173, 25804, 25805, 25806, 21174, 21173, 25807, 25808, 25809, 25810, 21169, 21173, 21174, 25812, 25813, 21169, 21174, 21173, 25814, 25815, 25816, 25818, 25820, 25822, 25824, 25826, 25828, 25830, 25833, 25835, 25667, 24278, 25837, 25840, 25843, 25846, 25848, 25853, 24311, 24310, 25857, 25859, 25862, 24319, 24334, 25864, 25866, 25868, 25870, 21207, 25872, 24356, 24354, 25874, 25876, 25878, 24385, 21166, 21169, 21173, 21174, 21187, 21169, 21174, 21173, 24437, 25881, 25883, 25885, 25887, 21169, 21173, 21174, 21169, 21174, 21173, 25889, 25891, 25893, 25895, 25897, 25899, 25901, 25903, 25906, 25908, 25910, 25912, 21340, 21339, 21338, 21337, 21340, 21339, 21338, 21337, 24605, 24604, 25916, 25918, 25921, 25927, 25929, 25930, 25931, 25932, 25933, 25935, 25938, 25941, 25943, 25947, 21169, 21174, 21173, 21187, 25949, 21169, 21174, 21173, 21187, 25952, 21173, 21174, 21187, 25955, 25956, 21173, 21187, 25957, 25958, 24661, 24684, 24712, 21207, 25959, 21173, 21174, 21187, 21129, 21198, 21195, 21128, 21173, 21187, 21129, 21128, 21198, 21195, 24752, 24750, 24756, 21206, 21205, 24763, 21206, 21205, 24765, 21174, 21173, 25961, 25963, 21173, 21174, 22994, 21198, 21195, 21173, 21187, 21129, 21128, 21198, 21195, 24868, 24866, 21206, 21205, 21133, 21132, 24890, 21206, 21205, 24892, 24896, 21206, 21205, 21207, 25965, 25967, 25969, 25971, 21173, 21174, 21173, 21174, 21173, 21174, 24949, 25973, 25975, 21173, 21174, 21129, 21128, 22851, 21173, 21174, 21129, 21128, 22851, 21173, 21174, 21129, 21128, 22851, 25061, 21206, 21205, 21206, 21205, 21133, 21132, 25087, 25977, 25979, 25981, 21173, 21174, 25984, 21173, 25985, 21173, 21174, 21187, 25986, 25987, 21169, 21174, 21173, 21187, 25988, 25989, 25990, 25260, 25285, 21207, 25991, 25993, 25995, 25997, 25308, 25307, 25310, 25309, 26001, 26003, 26005, 26008, 26010, 26012, 26014, 26016, 26018, 26019, 26020, 26021, 26022, 26025, 26027, 26030, 25402, 25401, 26032, 26033, 26034, 26036, 26038, 26041, 26043, 26044, 26045, 26046, 25481, 25480, 26047, 26049, 26051, 26053, 26055, 26057, 26060, 26063, 26065, 26067, 25658, 25657, 25667, 25666, 26070, 26072, 26074, 26077, 26079, 21633, 21632, 21630, 21631, 26081, 26082, 26083, 26084, 26085, 26086, 26087, 26088, 26089, 26090, 26091, 26092, 26093, 21633, 21632, 21630, 21631, 26094, 26095, 26096, 26097, 26098, 26099, 26100, 26101, 26007, 26102, 26103, 26104, 26105, 26106, 26107, 26108, 26109, 26110, 26111, 26112, 26113, 26114, 26115, 26116, 26117, 26118, 26119, 26120, 26121, 26122, 26123, 26124, 26125, 26126, 26127, 26128, 26007, 26129, 26130, 26131, 26132, 26133, 26134, 26007, 26135, 26136, 26137, 26140, 25914, 25856, 26141, 25915, 26142, 26143, 26144, 26145, 26146, 26029, 26147, 26148, 26149, 26150, 26151, 26007, 26152, 26153, 26155, 26157, 26158, 26159, 26160, 26161, 26162, 26163, 26164, 26165, 26166, 26167, 26168, 26169, 26170, 26171, 26172, 26173, 26174, 26175, 25856, 25855, 25915, 26176, 26177, 26178, 26179, 26180, 26181, 26029, 26182, 26183, 26184, 26185, 26186, 26187, 26188, 26189, 26190, 25790, 25792, 26191, 26192, 25791, 25792, 26193, 26194, 25914, 25999, 26195, 26007, 26196, 25793, 25842, 26197, 26198, 26199, 26200, 26201, 26202, 26203, 26204, 26205, 26206, 26207, 26208, 26209, 26210, 26211, 26212, 26213, 26214, 26215, 26216, 26217, 26218, 26219, 26220, 26221, 26222, 26223, 26224, 26225, 26226, 25798, 26227, 26228, 25803, 26229, 26230, 26231, 26234, 25832, 25850, 26237, 26238, 26239, 26240, 25914, 26007, 26241, 26242, 25839, 25842, 26243, 26244, 25850, 25851, 26245, 26246, 25999, 25914, 26007, 26247, 26248, 25852, 26249, 26250, 25856, 25855, 26251, 26007, 26252, 25861, 26253, 26254, 26255, 26256, 26258, 26259, 26261, 26262, 26263, 26264, 26265, 26266, 26267, 26268, 26269, 26270, 26271, 26272, 26273, 25940, 25946, 26274, 25926, 26275, 26276, 26277, 25914, 26278, 26279, 25915, 25923, 25925, 26280, 26281, 25926, 26282, 26283, 26284, 26285, 26286, 26287, 26059, 25940, 25946, 26288, 26289, 26290, 26291, 26292, 26293, 26294, 26295, 26296, 26297, 26298, 26299, 26300, 26301, 26302, 26303, 26304, 26305, 26306, 26307, 26308, 26309, 25999, 26000, 26310, 26311, 26312, 26313, 26029, 26314, 26315, 26007, 26316, 26317, 26318, 26319, 26320, 26321, 26322, 26323, 26059, 26324, 26325, 26326, 26327, 26328, 26329, 26330, 26331, 26059, 26332, 26333, 26029, 26334, 26335, 26336, 26337, 26338, 26339, 26340, 26040, 26341, 26342, 26343, 26344, 26345, 26346, 26347, 26348, 26349, 26350, 26351, 26352, 26353, 26354, 26355, 26059, 26356, 26357, 26358, 26359, 26360, 26361, 26069, 26362, 26363, 26364, 26365, 26076, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27064, 21178, 21177, 27066, 25276, 21210, 21209, 21169, 21170, 21166, 21165, 21167, 21168, 21170, 21165, 21166, 21169, 27068, 27069, 21179, 21176, 21180, 21175, 21182, 21181, 21176, 21179, 21175, 21180, 21178, 21177, 24800, 21183, 21184, 21185, 24970, 25030, 21187, 27070, 27071, 21128, 21848, 21129, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27072, 27073, 21175, 21176, 21180, 21179, 21182, 21181, 21175, 21180, 21179, 21176, 21177, 21178, 24800, 21183, 21184, 21186, 21185, 24941, 24970, 21188, 21187, 27074, 27075, 21129, 21128, 22851, 21165, 21169, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27076, 21174, 21175, 21176, 21180, 21179, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 24344, 21184, 21183, 27077, 27078, 24090, 25030, 27079, 27080, 20752, 21848, 21128, 21129, 21165, 21169, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27081, 21174, 21175, 21176, 21180, 21179, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 21184, 21183, 24344, 27082, 27083, 24090, 25030, 27084, 27085, 20753, 21848, 21128, 21129, 21169, 21170, 21166, 21165, 21167, 21168, 21169, 21165, 21166, 21170, 27086, 27087, 21179, 21176, 21180, 21175, 21182, 21181, 21179, 21180, 21175, 21176, 21177, 21178, 21183, 21184, 24220, 27088, 27089, 24941, 24090, 27090, 27091, 21945, 21129, 21128, 21848, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 21165, 21166, 27092, 27093, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21176, 21179, 21180, 21177, 21178, 24800, 21184, 21183, 21186, 24970, 25030, 21188, 27094, 27095, 21129, 21128, 21848, 21204, 21203, 21814, 21811, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21169, 21166, 21165, 27096, 27097, 21179, 21176, 21180, 21175, 21182, 21181, 21175, 21176, 21179, 21180, 21178, 21177, 21184, 24134, 21183, 21185, 21186, 24941, 24970, 21187, 21188, 21154, 21833, 21153, 27098, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21169, 21166, 21165, 27099, 27100, 21179, 21176, 21180, 21175, 21182, 21181, 21179, 21180, 21175, 21176, 21178, 21177, 21184, 21183, 24129, 21186, 21185, 24941, 24970, 21188, 21187, 21154, 21833, 21153, 27101, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21165, 21166, 21170, 27102, 27103, 21179, 21175, 21180, 21176, 21182, 21181, 21179, 21175, 21176, 21180, 21178, 21177, 21184, 21183, 24129, 21185, 21186, 24941, 24970, 21188, 21187, 21154, 21153, 27104, 27105, 27106, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21165, 21166, 21170, 27107, 27108, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21175, 21176, 21180, 21178, 21177, 21184, 21183, 24134, 21185, 21186, 24941, 24970, 21188, 21187, 21844, 27109, 27110, 27111, 27112, 27113, 27114, 24149, 24146, 21177, 21178, 21188, 27118, 24152, 21131, 21130, 27119, 21131, 21130, 21166, 21170, 21169, 21165, 21167, 21168, 21169, 21170, 21981, 27121, 27122, 21175, 21176, 21179, 21180, 21178, 21177, 21179, 25167, 21180, 21181, 21182, 24651, 27123, 21183, 21184, 24800, 21185, 22419, 22429, 27124, 21165, 21170, 21166, 21169, 21168, 21167, 21169, 21170, 22904, 21174, 27126, 21175, 21176, 21180, 21179, 21177, 21178, 25167, 21180, 21179, 21181, 21182, 24651, 21188, 21183, 21184, 24800, 21186, 21875, 21874, 27127, 26677, 24800, 21184, 21183, 22411, 21876, 27129, 21341, 21342, 21354, 21353, 21340, 21339, 21338, 21337, 21341, 21342, 21210, 21130, 21210, 21130, 21186, 21911, 21154, 21153, 21209, 21131, 21209, 21131, 21131, 21130, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25656, 21332, 21331, 27150, 25665, 21332, 21331, 27153, 27154, 21340, 21339, 21338, 21337, 21341, 21342, 25686, 21352, 21351, 21344, 21343, 25697, 25498, 21354, 21353, 23548, 21346, 21352, 23551, 21352, 21351, 24205, 21354, 21353, 21166, 21169, 21165, 21170, 21167, 21168, 21169, 21170, 21166, 21165, 27157, 27158, 21179, 21176, 21175, 21180, 21178, 21177, 21179, 21175, 21176, 21180, 21182, 21181, 25030, 25033, 21188, 21187, 21154, 21153, 21933, 21129, 22851, 21128, 21169, 21165, 21170, 21166, 21168, 21167, 21169, 21170, 21165, 21166, 27159, 27160, 21175, 21176, 21180, 21179, 21178, 21177, 21179, 21175, 21180, 21176, 21182, 21181, 21184, 24344, 21183, 21185, 21186, 21154, 21153, 21945, 21129, 21128, 22851, 21169, 21165, 21166, 21170, 21168, 21167, 21170, 21165, 21166, 21169, 27161, 27162, 21179, 21175, 21180, 21176, 21178, 21177, 21179, 21175, 21176, 21180, 21181, 21182, 21184, 24220, 21183, 21186, 21185, 25030, 25033, 21187, 21188, 21154, 21153, 21945, 27163, 21165, 21166, 21170, 21169, 21167, 21168, 21170, 21166, 21169, 21165, 27166, 27167, 21179, 21175, 21180, 21176, 21178, 21177, 21179, 21175, 21176, 21180, 21182, 21181, 21183, 21184, 24344, 21186, 21185, 25030, 25033, 21188, 21187, 22097, 21154, 21153, 27168, 24244, 24241, 24250, 24247, 27172, 21166, 21170, 21165, 21168, 21167, 21170, 21169, 21981, 27173, 27174, 21179, 21176, 21180, 21175, 21177, 21178, 24837, 21180, 21179, 21182, 21181, 21184, 24848, 21183, 21185, 21186, 22261, 22003, 22273, 21994, 27177, 21170, 21166, 21165, 21168, 21167, 21170, 21169, 22948, 27178, 27179, 21179, 21176, 21180, 21175, 21178, 21177, 21180, 21179, 25223, 21181, 21182, 24848, 21184, 21183, 21185, 21186, 22003, 22002, 22273, 22270, 21177, 21178, 21204, 21203, 21326, 21325, 25656, 21332, 21331, 27192, 27193, 21341, 21342, 21340, 21339, 21338, 21337, 21326, 21325, 21332, 21331, 21324, 21323, 24309, 21309, 21307, 27200, 27201, 21341, 21342, 22061, 21186, 21185, 24322, 27205, 24329, 21131, 21130, 27206, 24332, 21167, 21168, 21208, 27211, 21178, 21177, 21182, 21181, 21184, 21183, 24344, 21187, 21188, 22097, 21154, 21153, 27213, 27214, 21204, 21203, 24367, 21131, 21130, 24370, 21178, 21177, 21188, 22127, 22124, 24383, 27218, 24392, 21206, 21205, 24395, 21165, 27219, 21170, 27220, 21167, 21168, 22575, 21169, 21170, 27221, 27222, 21180, 21175, 21176, 21179, 21177, 21178, 21179, 21180, 24837, 21182, 21181, 24651, 27223, 21183, 21184, 24800, 21185, 22160, 22411, 22165, 21198, 21195, 21165, 21166, 21170, 27224, 21168, 21167, 21170, 22614, 21169, 27225, 27226, 21179, 21175, 21176, 21180, 21178, 21177, 21179, 21180, 25223, 21181, 21182, 24475, 21188, 21184, 21183, 24848, 21186, 22172, 21154, 21153, 22178, 22175, 24432, 24429, 24435, 27227, 21204, 21203, 21130, 21131, 21209, 21210, 24452, 21165, 27232, 21166, 21170, 21167, 21168, 21170, 22575, 21169, 27233, 27234, 21179, 21180, 21176, 21175, 21178, 21177, 21180, 21179, 24837, 21181, 21182, 24475, 21188, 21187, 22234, 21154, 21153, 22240, 22237, 21165, 21166, 21170, 27235, 21168, 21167, 21170, 21169, 22948, 27236, 27237, 21175, 21176, 21180, 21179, 21178, 21177, 24837, 21180, 21179, 21181, 21182, 21184, 21183, 24848, 21186, 21185, 22264, 22261, 22267, 22273, 22270, 22276, 24518, 21204, 21203, 21130, 21131, 21209, 21210, 21208, 21207, 21210, 21130, 21209, 21131, 21340, 21339, 21338, 21337, 21326, 21325, 21309, 21308, 21332, 21331, 21324, 21323, 24565, 21309, 21307, 27250, 27251, 27252, 27253, 21326, 21325, 21332, 21331, 21324, 21323, 24588, 21309, 21307, 27254, 27255, 27256, 27257, 21326, 21325, 24603, 21332, 21331, 27258, 27259, 21341, 21342, 24616, 21340, 21339, 27264, 24623, 21340, 21339, 27266, 21341, 21342, 24634, 21352, 21351, 21165, 21166, 21170, 27274, 21168, 21167, 21170, 21169, 22402, 27275, 27276, 21179, 21175, 21176, 21180, 21177, 21178, 24837, 21180, 21179, 21181, 21182, 26677, 21188, 27277, 21184, 21183, 24644, 21186, 21185, 22412, 22403, 27278, 21165, 21170, 27279, 21166, 21168, 21167, 21170, 21169, 23014, 27280, 27281, 21179, 21176, 21180, 21175, 21178, 21177, 24837, 21180, 21179, 21182, 21181, 26677, 21188, 27282, 24800, 21184, 21183, 21186, 21185, 22412, 22411, 27283, 21170, 21165, 21169, 21166, 21167, 21168, 21170, 21169, 22425, 27284, 27285, 21175, 21176, 21180, 21179, 21178, 21177, 21180, 24643, 21179, 21181, 21182, 21183, 21184, 24644, 21185, 21186, 24651, 27286, 21188, 22419, 27287, 21169, 21165, 21170, 21166, 21168, 21167, 22425, 21169, 21170, 27289, 21174, 21180, 21179, 21176, 21175, 21177, 21178, 25167, 21179, 21180, 21181, 21182, 21183, 21184, 24800, 21185, 21186, 24651, 27290, 21188, 22429, 27291, 24659, 24656, 27293, 24667, 24664, 24670, 21204, 21203, 21130, 24682, 24679, 27294, 24690, 24687, 24693, 21204, 21203, 21131, 24706, 21206, 21205, 21077, 21076, 27295, 21208, 27296, 21131, 21130, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22500, 27298, 27299, 21179, 21180, 21175, 21176, 21177, 21178, 24837, 21179, 21180, 21181, 21182, 21183, 24848, 21184, 21185, 21186, 24842, 21188, 27300, 22503, 27301, 27302, 27303, 27304, 21170, 21166, 21165, 21169, 21167, 21168, 21169, 21170, 22948, 27305, 21174, 21179, 21175, 21176, 21180, 21177, 21178, 21179, 21180, 24727, 21181, 21182, 24736, 21184, 21183, 21185, 21186, 24842, 21188, 27306, 22527, 27307, 27308, 27309, 27310, 22533, 22530, 27311, 27312, 27313, 27314, 27315, 24759, 25276, 27316, 27317, 27318, 27319, 21209, 21210, 21165, 21166, 21170, 21169, 21168, 21167, 21169, 21165, 21166, 21170, 27320, 27321, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21176, 21175, 21180, 21177, 21178, 25030, 25033, 21187, 21188, 21184, 21183, 24777, 21186, 21185, 22849, 21154, 21153, 21129, 21128, 22851, 21170, 21169, 21165, 21166, 21167, 21168, 21170, 21169, 22575, 27324, 27325, 21175, 21176, 21180, 21179, 21178, 21177, 24837, 21180, 21179, 21182, 21181, 21183, 21184, 24800, 21186, 21185, 26677, 21188, 21187, 22606, 22603, 27326, 27327, 27328, 21169, 21165, 21170, 21166, 21168, 21167, 22614, 21170, 21169, 21174, 27329, 21175, 21176, 21180, 21179, 21177, 21178, 21180, 24837, 21179, 21181, 21182, 24842, 21188, 27330, 21183, 21184, 24848, 21186, 21185, 22651, 22648, 27331, 27332, 27333, 27334, 27335, 27336, 24871, 27337, 27338, 27339, 27340, 24878, 21204, 21203, 21131, 21130, 27341, 27342, 27343, 27344, 27345, 27346, 27347, 24899, 21208, 27348, 21131, 21130, 21170, 21169, 21165, 21166, 21168, 21167, 21169, 21166, 21165, 21170, 27353, 27354, 21175, 21176, 21179, 21180, 21182, 21181, 21176, 21175, 21179, 21180, 21177, 21178, 21184, 21183, 24987, 21185, 21186, 21154, 21153, 21129, 21128, 22712, 21170, 21169, 21165, 21166, 21168, 21167, 21169, 21166, 21165, 21170, 27355, 27356, 21175, 21176, 21179, 21180, 21182, 21181, 21176, 21180, 21175, 21179, 21177, 21178, 21184, 21183, 25040, 21185, 21186, 22849, 21129, 21128, 22712, 21169, 21170, 21166, 21165, 21168, 21167, 21169, 21170, 21165, 21166, 27357, 27358, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21179, 21180, 21176, 21178, 21177, 24970, 24941, 21187, 21188, 21154, 21153, 22734, 22851, 21128, 21129, 24952, 27359, 21204, 21203, 24963, 21131, 21130, 21169, 21166, 21170, 21165, 21167, 21168, 21165, 21166, 21170, 21169, 27362, 27363, 21179, 21175, 21180, 21176, 21182, 21181, 21175, 21176, 21180, 21179, 21177, 21178, 25030, 24970, 21187, 21188, 21154, 21153, 22783, 27364, 27365, 27366, 21169, 21170, 21165, 21166, 21168, 21167, 21165, 21166, 21170, 21169, 27367, 27368, 21179, 21175, 21176, 21180, 21182, 21181, 21175, 21176, 21180, 21179, 21177, 21178, 21184, 21183, 24987, 21185, 21186, 21154, 21153, 22783, 27369, 27370, 27371, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21166, 21170, 21165, 27372, 27373, 21179, 21175, 21176, 21180, 21182, 21181, 21179, 21176, 21180, 21175, 21177, 21178, 25033, 25030, 21187, 21188, 21184, 21183, 25040, 21185, 21186, 22849, 21154, 21153, 27374, 27375, 27376, 27377, 27378, 27379, 25067, 25064, 21204, 21203, 25078, 21131, 21130, 27380, 27381, 27382, 27383, 27384, 25085, 21208, 21207, 22893, 22890, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22904, 27388, 27389, 21175, 21180, 21179, 21176, 21177, 21178, 21179, 21180, 25126, 21181, 21182, 21183, 21184, 25127, 21186, 25130, 21188, 22992, 21154, 21153, 21169, 21165, 21170, 21166, 21167, 21168, 21169, 21170, 22904, 27391, 21174, 21175, 21180, 21179, 21176, 21177, 21178, 25126, 21179, 21180, 21181, 21182, 21183, 21184, 25127, 21186, 25130, 21188, 21154, 21153, 22932, 21169, 21166, 21170, 21165, 21167, 21168, 21170, 21169, 22948, 27393, 27394, 21175, 21176, 21179, 21180, 21177, 21178, 21179, 25167, 21180, 21181, 21182, 21183, 21184, 25174, 21185, 25183, 27395, 22992, 21154, 21153, 27396, 21166, 21170, 27398, 21165, 21168, 21167, 23014, 21170, 21169, 27399, 27400, 21176, 21180, 21175, 21179, 21178, 21177, 21180, 21179, 25223, 21182, 21181, 25238, 21184, 21183, 21186, 21185, 25245, 21188, 27401, 23062, 23059, 27402, 25258, 25255, 27405, 25266, 25263, 25269, 21204, 21203, 25276, 25283, 21206, 21205, 27406, 25292, 21206, 21205, 25295, 21208, 27407, 21210, 21209, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25665, 21332, 21331, 27412, 27413, 27414, 27415, 21340, 21339, 21338, 21337, 21344, 21343, 23548, 21352, 21346, 23141, 21309, 21307, 21324, 21323, 21332, 21331, 23156, 21326, 21325, 21306, 21308, 25347, 21326, 21325, 25357, 25354, 27424, 25363, 25360, 27426, 21332, 21331, 21324, 21323, 21307, 21306, 21340, 21339, 21338, 21337, 21341, 21342, 25394, 21346, 21310, 21352, 21351, 25712, 21308, 21309, 27432, 27433, 27434, 21340, 21339, 21338, 21337, 21342, 21341, 21352, 21346, 21351, 21310, 21344, 21343, 21332, 21331, 21324, 21323, 21308, 21309, 21332, 21331, 21324, 21323, 21306, 21307, 21340, 21339, 21338, 21337, 21326, 21325, 25465, 21332, 21331, 27440, 25472, 21332, 21331, 27442, 25479, 21332, 21331, 27444, 27445, 21340, 21339, 21338, 21337, 21341, 21342, 25686, 21352, 21351, 23330, 25697, 25498, 21354, 21353, 21352, 21346, 21351, 21310, 21344, 21343, 21352, 21351, 25513, 25523, 25520, 21308, 21324, 21323, 21332, 21331, 21306, 21324, 21323, 21332, 21331, 21309, 21307, 25554, 21340, 21339, 21326, 21325, 25565, 21332, 21331, 21307, 21306, 25575, 25572, 21309, 21308, 21340, 21339, 21338, 21337, 21341, 21342, 21352, 21351, 21346, 21310, 21354, 21353, 27013, 23445, 25615, 25612, 21344, 21343, 27020, 21354, 21353, 21332, 21331, 21324, 21323, 25637, 25634, 21340, 21339, 21338, 21337, 21326, 21325, 25656, 21332, 21331, 27456, 27457, 25665, 21332, 21331, 27458, 27459, 21340, 21339, 21338, 21337, 21342, 21341, 25686, 21352, 21351, 21344, 21343, 25697, 21352, 21351, 21354, 21353, 23548, 21346, 21352, 23551, 21352, 21351, 25712, 21354, 21353, 27465, 27466, 27467, 27468, 27469, 21630, 21631, 21633, 21632, 27472, 21630, 21631, 21633, 21632, 27475, 25741, 21633, 21632, 27477, 21630, 21631, 21633, 21632, 27479, 27482, 27483, 27484, 27485, 27486, 27489, 27491, 27494, 25771, 27139, 21737, 21714, 27496, 27498, 21674, 21728, 27500, 27502, 27504, 27506, 21738, 21675, 27135, 27508, 23605, 21738, 21675, 27510, 27512, 27515, 27518, 27520, 27522, 27140, 27138, 27525, 27527, 27529, 26062, 27139, 21737, 21714, 27532, 21674, 21728, 27534, 27535, 27537, 21738, 21675, 21737, 21714, 27539, 27543, 27541, 21748, 27544, 27546, 27549, 25771, 27140, 21737, 21714, 27551, 21728, 21674, 27554, 27556, 27558, 27560, 21737, 21714, 27562, 27564, 23641, 21737, 21714, 27146, 27566, 27569, 27572, 27573, 27574, 21738, 21675, 21737, 21714, 27577, 27581, 27579, 21749, 27582, 21632, 21631, 21630, 21633, 27585, 21633, 21632, 21630, 21631, 27588, 27591, 27592, 27593, 27595, 27596, 27597, 21728, 27599, 27600, 27602, 21714, 21675, 27604, 21714, 21675, 27605, 27606, 23676, 27608, 27610, 27612, 27614, 27616, 27618, 27620, 27622, 27624, 27626, 27628, 26062, 21737, 21714, 27632, 27634, 21728, 21674, 27636, 27637, 21738, 21737, 27639, 27640, 25880, 21630, 21631, 21632, 21631, 21630, 21633, 27642, 21630, 21631, 21633, 21632, 21632, 21630, 21631, 21633, 27643, 27644, 25905, 21714, 21737, 27645, 27646, 21728, 27650, 27648, 27651, 21737, 21738, 27654, 21738, 21737, 27655, 27656, 23731, 21737, 21714, 25845, 27658, 27659, 27660, 21674, 27662, 27663, 27664, 21714, 21675, 27667, 27668, 23850, 27670, 27671, 27673, 21714, 21675, 27675, 27676, 23850, 21630, 21631, 21633, 21632, 21632, 21630, 21631, 21633, 25880, 21630, 21631, 21633, 21632, 21630, 21631, 21633, 21632, 21630, 21631, 21630, 21631, 21633, 21632, 27683, 21630, 21631, 21633, 21632, 27685, 27687, 27689, 27691, 27693, 21714, 25905, 21737, 27695, 25945, 21737, 21714, 27696, 27698, 21674, 27702, 27700, 27705, 27703, 21737, 25920, 21714, 27706, 21738, 21675, 25924, 27707, 27710, 27708, 23850, 27711, 27713, 27717, 27715, 21737, 25937, 21714, 27718, 25945, 21737, 21714, 27719, 27720, 27722, 21728, 21632, 21631, 21633, 21630, 27724, 21630, 21631, 21632, 21633, 27727, 21630, 21631, 27730, 21630, 21631, 21632, 21633, 27732, 21633, 21632, 27735, 25983, 21633, 21632, 27737, 21633, 21632, 21631, 21630, 27739, 27742, 27743, 21675, 21714, 27744, 27748, 27746, 21748, 21749, 27749, 27751, 26062, 21737, 21714, 27754, 27756, 21674, 21728, 27758, 27760, 26062, 21737, 21714, 27763, 27765, 21674, 27767, 27769, 26024, 27770, 21738, 21675, 27438, 27772, 21674, 21728, 27775, 27777, 21738, 21675, 27438, 27780, 23982, 27782, 27784, 21737, 21714, 27786, 27788, 23997, 21737, 21714, 27790, 27792, 24008, 27794, 27796, 26062, 21737, 21714, 27799, 27801, 21728, 27803, 27804, 21738, 21737, 27462, 27808, 27806, 21749, 21748, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27841, 27842, 27844, 27845, 27846, 27847, 27848, 27849, 27850, 27851, 27852, 27853, 27854, 27855, 27856, 27857, 27859, 27860, 27861, 27862, 27863, 27864, 27865, 27866, 27867, 27868, 27869, 27870, 27871, 27872, 27873, 27874, 27875, 27876, 27877, 27878, 27880, 27881, 27882, 27883, 27884, 27885, 27886, 27887, 27888, 27889, 27890, 27891, 27892, 27893, 27895, 27896, 27897, 27898, 27899, 27900, 27901, 27902, 27903, 27904, 27905, 27906, 27907, 27908, 27909, 27910, 27911, 27912, 27913, 27914, 27915, 27916, 27918, 27919, 27920, 27921, 27922, 27923, 27924, 27925, 27926, 27927, 27928, 27929, 27930, 27932, 27933, 27934, 27935, 27936, 27937, 27938, 27939, 27940, 27941, 27942, 27943, 27944, 27945, 27946, 27947, 27948, 27950, 27951, 27952, 27954, 27955, 27956, 27957, 27958, 27959, 27960, 27961, 27962, 27963, 27964, 27965, 27966, 27967, 27969, 27970, 27971, 27972, 27973, 27974, 27975, 27976, 27977, 27978, 27979, 27980, 27981, 27982, 27983, 27984, 27985, 27987, 27988, 27989, 27991, 27992, 27993, 27994, 27995, 27996, 27997, 27998, 27999, 28000, 28001, 28002, 28003, 28004, 28005, 28007, 28008, 28009, 28010, 28011, 28012, 28013, 28014, 28015, 28016, 28017, 28018, 28019, 28020, 28021, 28022, 28024, 28025, 28026, 28028, 28029, 28030, 28031, 28032, 28033, 28034, 28035, 28036, 28037, 28038, 28039, 28040, 28041, 28042, 28044, 28045, 28046, 28047, 28048, 28049, 28050, 28051, 28052, 28053, 28054, 28055, 28056, 28057, 28058, 28059, 28060, 28061, 28062, 28063, 28065, 28066, 28067, 28068, 28069, 28070, 28071, 28072, 28073, 28074, 28075, 28076, 28077, 28078, 28079, 28080, 28081, 28082, 28084, 28085, 28086, 28087, 28088, 28089, 28090, 28091, 28092, 28093, 28094, 28095, 28096, 28097, 28098, 28099, 28100, 28101, 28102, 28103, 28104, 28105, 28106, 28107, 28108, 28109, 28110, 28111, 28112, 28113, 28114, 28115, 28116, 28117, 28118, 28119, 28121, 28122, 28123, 28124, 28125, 28126, 28127, 28128, 28129, 28130, 28131, 28132, 28133, 28134, 28135, 28136, 28137, 28138, 28139, 28140, 28141, 28142, 28143, 28144, 28145, 28146, 28147, 28148, 28149, 28150, 28151, 28152, 28153, 28154, 28155, 28156, 28158, 28159, 28160, 28161, 28162, 28163, 28164, 28165, 28166, 28167, 28168, 28169, 28170, 28171, 28172, 28173, 28174, 28175, 28176, 28177, 28178, 28179, 28180, 28181, 28184, 28185, 28186, 28187, 28188, 28189, 28190, 28191, 28192, 28193, 28194, 28196, 28197, 28198, 28199, 28200, 28201, 28202, 28203, 28204, 28205, 28206, 28207, 28208, 28209, 28210, 28211, 28212, 28213, 28214, 28215, 28216, 28217, 28218, 28221, 28224, 28225, 28226, 28227, 28228, 28230, 28231, 28232, 28234, 28235, 28236, 28237, 28238, 28239, 28240, 28241, 28242, 28243, 28244, 28245, 28247, 28248, 28249, 28250, 28251, 28252, 28253, 28254, 28255, 28256, 28257, 28258, 28260, 28261, 28262, 28263, 28264, 28265, 28267, 28268, 28269, 28270, 28271, 28272, 28273, 28274, 28275, 28276, 28278, 28279, 28280, 28281, 28282, 28283, 28284, 28285, 28286, 28287, 28288, 28289, 28290, 28291, 28292, 28293, 28294, 28295, 28296, 28298, 28299, 28300, 28301, 28302, 28303, 28304, 28305, 28306, 28307, 28308, 28309, 28310, 28311, 28312, 28313, 28314, 28315, 28316, 28317, 28318, 28319, 28320, 28321, 28322, 28323, 28324, 28325, 28326, 28327, 28328, 28329, 28330, 28331, 28332, 28333, 28334, 28335, 28336, 28337, 28338, 28339, 28340, 28341, 28342, 28343, 28344, 28345, 28346, 28347, 28348, 28350, 28351, 28352, 28353, 28354, 28355, 28356, 28357, 28358, 28359, 28360, 28361, 28362, 28363, 28364, 28365, 28366, 28367, 28368, 28369, 28370, 28371, 28372, 28373, 28374, 28375, 28376, 28377, 28378, 28379, 28380, 28381, 28382, 28383, 28384, 28386, 28387, 28388, 28389, 28390, 28391, 28392, 28393, 28394, 28395, 28396, 28397, 28398, 28399, 28400, 28401, 28402, 28403, 28404, 28405, 28406, 28407, 28408, 28409, 28410, 28411, 28412, 28413, 28414, 28415, 28416, 28417, 28418, 28420, 28421, 28422, 28423, 28424, 28425, 28426, 28427, 28428, 28429, 28430, 28431, 28432, 28433, 28434, 28435, 28436, 28437, 28438, 28439, 28440, 28441, 28442, 28443, 28444, 28445, 28446, 28447, 28448, 28449, 28450, 28451, 28452, 28453, 28455, 28456, 28457, 28458, 28459, 28460, 28461, 28462, 28463, 28464, 28465, 28466, 28467, 28468, 28469, 28470, 28471, 28472, 28473, 28474, 28475, 28476, 28477, 28478, 28479, 28480, 28481, 28482, 28483, 28484, 28485, 28486, 28487, 28488, 28489, 28490, 28492, 28493, 28494, 28495, 28496, 28497, 28498, 28499, 28500, 28501, 28502, 28503, 28504, 28505, 28506, 28507, 28508, 28509, 28510, 28511, 28512, 28513, 28514, 28515, 28516, 28517, 28518, 28519, 28520, 28522, 28523, 28524, 28525, 28526, 28527, 28528, 28529, 28530, 28532, 28533, 28534, 28535, 28536, 28537, 28538, 28539, 28540, 28541, 28542, 28543, 28544, 28545, 28546, 28547, 28548, 28549, 28550, 28551, 28553, 28554, 28555, 28556, 28557, 28558, 28559, 28560, 28561, 28563, 28564, 28565, 28566, 28567, 28568, 28569, 28570, 28571, 28572, 28573, 28574, 28575, 28576, 28577, 28578, 28579, 28580, 28581, 28582, 28583, 28584, 28585, 28586, 28587, 28588, 28589, 28590, 28591, 28592, 28594, 28595, 28596, 28597, 28598, 28599, 28600, 28601, 28602, 28603, 28604, 28605, 28606, 28607, 28608, 28609, 28611, 28612, 28613, 28614, 28615, 28616, 28618, 28619, 28620, 28622, 28623, 28624, 28625, 28627, 28628, 28629, 28630, 28631, 28632, 28633, 28634, 28635, 28636, 28637, 28638, 28639, 28641, 28642, 28643, 28644, 28645, 28646, 28647, 28648, 28649, 28650, 28651, 28652, 28654, 28655, 28656, 28657, 28658, 28660, 28662, 28663, 28664, 28665, 28666, 28667, 28669, 28670, 28671, 28672, 28673, 28674, 28675, 28676, 28677, 28678, 28679, 28680, 28682, 28683, 28684, 28685, 28686, 28687, 28688, 28689, 28690, 28691, 28692, 28693, 28695, 28696, 28697, 28698, 28699, 28700, 28702, 28703, 28704, 28705, 28706, 28707, 28708, 28709, 28710, 28711, 28712, 28713, 28714, 28715, 28716, 28717, 28718, 28719, 28720, 28721, 28722, 28723, 28724, 28725, 28726, 28728, 28729, 28730, 28731, 28732, 28733, 28734, 28735, 28737, 28738, 28739, 28740, 28741, 28742, 28743, 28744, 28746, 28747, 28748, 28749, 28750, 28751, 28752, 28753, 28754, 28755, 28756, 28757, 28758, 28759, 28760, 28761, 28762, 28763, 28764, 28765, 28766, 28767, 28769, 28770, 28771, 28772, 28773, 28774, 28776, 28777, 28778, 28779, 28780, 28781, 28782, 28783, 28784, 28785, 28786, 28787, 28788, 28789, 28790, 28791, 28792, 28793, 28794, 28795, 28796, 28797, 28798, 28799, 28800, 28801, 28802, 28803, 28804, 28805, 28806, 28807, 28808, 28809, 28810, 28811, 28812, 28813, 28814, 28815, 28816, 28817, 28818, 28819, 28820, 28821, 28822, 28823, 28824, 28825, 28826, 28828, 28830, 28831, 28832, 28833, 28834, 28835, 28836, 28837, 28838, 28839, 28841, 28843, 28844, 28845, 28846, 28847, 28848, 28850, 28851, 28852, 28853, 28854, 28856, 28857, 28858, 28860, 28861, 28862, 28863, 28864, 28865, 28866, 28867, 28869, 28870, 28871, 28872, 28873, 28874, 28876, 28877, 28878, 28879, 28880, 28881, 28882, 28883, 28884, 28885, 28886, 28887, 28888, 28890, 28891, 28892, 28893, 28894, 28895, 28896, 28897, 28898, 28899, 28901, 28902, 28903, 28904, 28905, 28906, 28907, 28909, 28910, 28911, 28912, 28913, 28914, 28915, 28916, 28917, 28918, 28919, 28920, 28921, 28923, 28924, 28925, 28926, 28927, 28928, 28929, 28930, 28931, 28932, 28933, 28934, 28935, 28936, 28937, 28938, 28939, 28940, 28942, 28943, 28944, 28945, 28946, 28947, 28948, 28949, 28950, 28951, 28952, 28953, 28954, 28955, 28956, 28957, 28958, 28960, 28961, 28963, 28964, 28965, 28966, 28967, 28968, 28969, 28970, 28971, 28973, 28974, 28975, 28976, 28977, 28978, 28979, 28980, 28981, 28982, 28983, 28984, 28985, 28986, 28987, 28988, 28989, 28990, 28992, 28993, 28995, 28996, 28998, 28999, 29000, 29001, 29002, 29003, 29004, 29005, 29007, 29008, 29009, 29010, 29011, 29012, 29013, 29014, 29015, 29016, 29017, 29019, 29021, 29022, 29023, 29024, 29025, 29026, 29027, 29028, 29029, 29030, 29031, 29032, 29034, 29035, 29036, 29037, 29038, 29039, 29040, 29041, 29042, 29043, 29044, 29045, 29046, 29047, 29048, 29049, 29050, 29051, 29053, 29054, 29056, 29058, 29059, 29060, 29061, 29062, 29063, 29064, 29065, 29066, 29068, 29069, 29070, 29071, 29072, 29073, 29074, 29075, 29076, 29077, 29078, 29079, 29080, 29081, 29082, 29083, 29084, 29085, 29086, 29088, 29089, 29091, 29093, 29094, 29095, 29097, 29100, 29101, 29102, 29106, 29107, 29108, 29109, 29110, 29111, 29112, 29113, 29114, 29115, 29116, 29117, 29118, 29120, 29121, 29122, 29123, 29124, 29125, 29126, 29127, 29128, 29129, 29130, 29131, 29132, 29133, 29134, 29135, 29136, 29137, 29138, 29139, 29140, 29141, 29142, 29143, 29144, 29145, 29146, 29147, 29148, 29149, 29150, 29151, 29152, 29153, 29154, 29155, 29156, 29158, 29159, 29160, 29161, 29162, 29163, 29164, 29165, 29166, 29167, 29168, 29169, 29170, 29171, 29172, 29173, 29174, 29175, 29176, 29177, 29178, 29179, 29182, 29183, 29184, 29185, 29186, 29187, 29188, 29189, 29190, 29191, 29193, 29194, 29195, 29196, 29197, 29198, 29199, 29200, 29201, 29202, 29203, 29204, 29205, 29207, 29208, 29209, 29210, 29211, 29212, 29213, 29214, 29216, 29218, 29220, 29221, 29223, 29225, 29226, 29227, 29228, 29229, 29230, 29234, 29237, 29238, 29240, 29241, 29242, 29243, 29244, 29245, 29246, 29247, 29248, 29249, 29250, 29251, 29252, 29254, 29255, 29256, 29257, 29258, 29259, 29260, 29261, 29262, 29263, 29264, 29265, 29266, 29267, 29268, 29269, 29270, 29271, 29272, 29273, 29274, 29275, 29276, 29277, 29278, 29279, 29280, 29281, 29282, 29283, 29284, 29285, 29286, 29288, 29289, 29290, 29291, 29292, 29293, 29294, 29295, 29296, 29297, 29298, 29299, 29300, 29301, 29302, 29303, 29304, 29305, 29306, 29307, 29308, 29309, 29310, 29311, 29312, 29313, 29314, 29315, 29316, 29317, 29318, 29319, 29321, 29322, 29323, 29324, 29325, 29326, 29327, 29328, 29329, 29330, 29331, 29332, 29333, 29334, 29335, 29336, 29337, 29338, 29339, 29340, 29341, 29342, 29343, 29345, 29346, 29347, 29348, 29349, 29350, 29351, 29352, 29353, 29354, 29355, 29356, 29357, 29358, 29359, 29360, 29362, 29363, 29364, 29365, 29366, 29367, 29368, 29369, 29370, 29371, 29372, 29373, 29374, 29375, 29376, 29377, 29378, 29379, 29380, 29381, 29384, 29385, 29386, 29387, 29388, 29389, 29390, 29391, 29392, 29393, 29394, 29396, 29397, 29398, 29399, 29400, 29401, 29402, 29403, 29404, 29405, 29406, 29407, 29408, 29409, 29410, 29411, 29412, 29413, 29414, 29415, 29416, 29419, 29420, 29421, 29422, 29423, 29424, 29425, 29426, 29427, 29428, 29429, 29431, 29432, 29433, 29434, 29435, 29436, 29437, 29438, 29439, 29440, 29441, 29442, 29443, 29444, 29445, 29446, 29447, 29448, 29449, 29450, 29451, 29452, 29453, 29454, 29455, 29458, 29461, 29462, 29463, 29464, 29465, 29466, 29467, 29468, 29470, 29473, 29474, 29475, 29476, 29477, 29478, 29479, 29480, 29481, 29482, 29483, 29484, 29485, 29486, 29487, 29489, 29490, 29491, 29492, 29493, 29494, 29495, 29496, 29497, 29498, 29499, 29500, 29501, 29502, 29503, 29504, 29505, 29506, 29507, 29508, 29509, 29510, 29511, 29512, 29513, 29514, 29515, 29516, 29517, 29519, 29520, 29521, 29522, 29523, 29524, 29525, 29526, 29527, 29528, 29529, 29530, 29531, 29532, 29533, 29534, 29535, 29536, 29537, 29538, 29539, 29540, 29541, 29542, 29543, 29544, 29545, 29546, 29547, 29548, 29549, 29551, 29552, 29553, 29554, 29555, 29556, 29557, 29558, 29559, 29560, 29561, 29562, 29563, 29564, 29565, 29566, 29568, 29569, 29570, 29572, 29573, 29575, 29576, 29577, 29578, 29579, 29580, 29581, 29583, 29584, 29585, 29586, 29587, 29588, 29589, 29590, 29591, 29592, 29593, 29594, 29595, 29596, 29597, 29598, 29599, 29600, 29602, 29603, 29604, 29605, 29606, 29608, 29609, 29610, 29611, 29612, 29613, 29614, 29615, 29616, 29618, 29619, 29620, 29621, 29622, 29624, 29625, 29626, 29627, 29628, 29629, 29630, 29631, 29632, 29633, 29634, 29635, 29636, 29637, 29638, 29639, 29640, 29641, 29643, 29645, 29646, 29647, 29648, 29649, 29650, 29651, 29652, 29653, 29654, 29655, 29656, 29657, 29658, 29659, 29660, 29661, 29662, 29663, 29664, 29665, 29666, 29667, 29668, 29669, 29670, 29672, 29673, 29675, 29676, 29677, 29678, 29679, 29680, 29681, 29682, 29683, 29684, 29685, 29686, 29687, 29688, 29689, 29690, 29691, 29692, 29693, 29694, 29695, 29698, 29699, 29700, 29701, 29702, 29703, 29704, 29705, 29706, 29707, 29708, 29709, 29710, 29711, 29712, 29713, 29714, 29715, 29716, 29717, 29718, 29719, 29720, 29721, 29722, 29723, 29724, 29725, 29726, 29727, 29728, 29729, 29730, 29732, 29733, 29734, 29736, 29737, 29738, 29739, 29741, 29742, 29743, 29744, 29745, 29746, 29747, 29748, 29749, 29750, 29751, 29752, 29753, 29754, 29755, 29756, 29757, 29758, 29759, 29760, 29761, 29762, 29763, 29764, 29765, 29766, 29767, 29768, 29769, 29770, 29771, 29772, 29773, 29774, 29775, 29776, 29777, 29778, 29779, 29780, 29781, 29782, 29783, 29784, 29785, 29786, 29787, 29788, 29789, 29790, 29791, 29792, 29793, 29794, 29795, 29796, 29797, 29798, 29799, 29800, 29801, 29802, 29803, 29804, 29805, 29806, 29807, 29808, 29809, 29810, 29811, 29812, 29813, 29814, 29815, 29816, 29817, 29818, 29819, 29820, 29821, 29822, 29823, 29824, 29825, 29826, 29827, 29828, 29830, 29831, 29832, 29833, 29835, 29836, 29837, 29838, 29839, 29840, 29841, 29842, 29843, 29844, 29845, 29846, 29847, 29848, 29849, 29850, 29851, 29852, 29853, 29854, 29855, 29856, 29857, 29858, 29859, 29860, 29862, 29864, 29865, 29866, 29867, 29868, 29869, 29870, 29871, 29872, 29873, 29875, 29876, 29877, 29879, 29880, 29881, 29882, 29883, 29884, 29886, 29888, 29889, 27493, 29892, 29893, 29894, 29895, 29898, 29899, 29900, 29902, 29904, 29905, 29906, 29908, 29909, 29910, 29914, 29916, 29917, 29918, 29919, 29921, 29922, 29923, 29924, 29925, 29926, 29927, 29928, 29929, 27536, 29932, 29933, 29934, 29935, 29938, 29939, 29940, 27548, 29943, 29944, 29945, 29946, 29948, 29949, 29950, 29952, 29954, 29955, 29958, 29959, 29960, 29961, 29964, 29966, 29967, 29968, 29969, 29970, 29973, 29974, 29976, 29977, 29978, 29979, 29980, 29981, 29982, 29983, 29984, 29985, 29992, 29993, 27601, 29996, 29997, 29999, 30000, 30003, 30015, 30016, 30017, 30018, 30020, 30021, 30024, 30025, 30028, 30029, 30030, 30031, 30032, 30033, 30034, 30035, 30036, 30037, 30038, 30039, 30040, 30041, 30042, 30043, 30044, 30046, 30047, 30048, 30051, 30053, 30054, 30055, 30056, 30058, 30059, 30062, 30063, 30064, 30065, 30069, 30070, 30072, 30073, 30074, 30077, 30078, 27672, 30081, 30082, 30085, 30086, 30087, 30088, 30089, 30090, 30091, 30092, 30093, 30094, 30095, 30096, 30097, 30098, 30099, 30100, 30101, 30102, 30103, 30104, 30105, 30106, 30107, 30108, 30110, 30111, 30112, 30113, 30115, 30117, 30119, 30120, 30121, 30123, 30124, 30125, 27697, 30128, 30130, 30132, 30133, 30134, 30135, 30137, 30138, 30139, 30142, 30143, 30144, 30147, 30148, 30149, 30150, 30152, 30153, 30154, 30156, 30158, 30159, 30160, 30161, 30162, 30163, 30164, 30165, 30166, 30167, 30168, 30169, 30170, 30172, 30173, 30174, 30175, 30176, 30177, 30178, 30180, 30181, 30182, 30184, 30185, 30186, 30187, 30188, 30191, 30192, 30195, 30196, 30197, 30200, 30201, 30202, 30203, 30205, 30206, 30209, 30210, 30211, 30212, 30214, 30217, 30219, 30220, 30221, 30222, 30223, 30224, 30227, 30228, 30229, 27779, 30231, 30234, 30235, 30238, 30239, 30240, 30243, 30246, 30247, 30248, 30249, 30251, 30254, 30255, 30256, 30258, 30259, 30260, 27517, 27514, 27571, 27568, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30272, 30275, 30277, 30279, 30281, 30283, 30285, 30288, 30290, 30292, 30294, 30296, 30298, 30300, 30304, 30308, 30311, 30313, 30315, 30317, 30319, 30322, 30324, 30326, 30328, 30330, 30332, 30334, 30337, 30339, 30341, 30344, 30347, 30349, 30351, 30353, 30355, 27931, 30358, 30360, 30362, 30364, 30366, 30368, 30370, 30374, 30378, 30381, 30383, 30385, 30387, 30389, 27968, 30392, 30394, 30396, 30398, 30400, 30402, 30404, 30408, 30412, 30415, 30417, 30419, 30421, 30423, 30426, 30428, 30430, 30432, 30434, 30436, 30438, 30442, 30446, 30449, 30451, 30453, 30455, 30457, 30460, 30462, 30464, 30466, 30468, 30470, 30472, 30476, 30480, 30483, 30485, 30487, 30489, 30491, 30493, 30495, 30498, 30500, 30502, 30504, 30506, 30508, 30510, 30513, 30515, 30517, 30519, 30523, 30525, 30527, 30529, 30531, 30534, 30536, 30538, 30540, 30542, 30544, 30546, 30549, 30551, 30553, 30555, 30559, 30561, 30563, 30565, 30567, 30570, 30572, 30574, 30576, 30578, 30580, 30582, 30585, 30587, 30589, 30591, 30593, 30594, 30596, 30598, 30600, 30602, 30605, 30607, 30609, 30611, 30613, 30615, 30617, 30620, 30622, 30624, 30627, 30628, 30629, 30631, 30633, 30635, 30637, 30639, 30641, 30643, 30645, 30649, 30651, 30653, 30655, 30658, 30661, 30665, 30667, 30669, 30671, 30673, 30676, 30677, 30679, 30681, 30683, 30686, 30690, 30694, 30697, 30700, 30703, 30705, 30707, 30709, 30711, 30713, 30715, 30718, 30721, 30723, 30725, 30727, 30729, 30731, 30733, 30735, 30737, 30739, 30742, 30743, 30747, 30749, 30751, 30753, 30756, 30758, 30760, 30762, 30766, 30769, 30771, 30773, 30775, 30777, 30779, 30782, 30784, 30786, 30788, 30790, 30792, 30794, 30796, 30798, 30801, 30804, 30806, 30808, 30810, 30812, 30815, 30817, 30819, 30821, 30823, 30825, 30827, 30830, 30832, 30835, 30838, 30840, 30842, 30844, 30846, 30849, 30851, 30853, 30855, 30857, 30859, 30861, 30864, 30866, 30868, 30870, 30874, 30876, 30878, 30880, 30882, 30885, 30887, 30889, 30891, 30893, 30895, 30897, 30900, 30902, 30904, 30906, 30910, 30912, 28521, 30915, 30917, 30919, 30923, 30925, 30927, 30929, 30932, 30934, 30937, 30939, 30941, 28552, 30944, 30946, 30948, 30952, 30954, 30956, 30958, 30961, 30963, 30966, 30968, 30970, 30972, 30974, 30976, 30978, 30982, 30984, 30986, 30988, 30990, 30992, 30994, 30998, 31001, 31003, 31004, 28621, 31008, 31010, 31011, 31013, 31015, 31018, 31020, 31024, 31026, 31030, 31033, 31036, 31040, 31041, 31042, 31044, 31048, 31050, 31052, 31054, 31057, 31060, 31064, 31066, 31069, 31071, 31072, 31074, 31078, 31080, 31082, 31084, 31087, 31091, 31095, 31098, 31100, 31103, 31105, 31107, 31110, 31111, 31113, 31115, 31119, 31121, 31123, 31125, 31128, 31131, 31133, 31136, 31138, 31140, 31141, 31143, 31147, 31149, 31151, 31153, 31156, 31158, 31161, 31163, 31166, 31170, 31172, 31174, 31176, 31178, 31180, 31182, 31184, 31186, 31188, 31190, 31192, 31194, 31197, 31199, 31201, 31203, 31205, 31208, 31210, 31212, 31216, 31218, 31221, 31224, 31226, 31229, 31231, 31232, 31234, 31238, 31240, 31242, 31244, 31247, 31250, 31251, 31254, 31256, 31259, 28900, 31262, 31264, 31268, 31270, 31272, 31274, 31277, 31280, 31281, 31284, 31286, 31289, 31291, 31293, 31295, 31299, 31301, 31303, 31305, 31308, 31310, 31313, 28959, 31318, 31320, 31322, 31324, 28972, 31328, 31330, 31332, 31334, 31337, 31339, 31342, 28991, 31347, 31349, 31352, 31355, 31357, 31360, 31363, 31366, 31368, 31369, 31371, 31373, 31375, 31377, 31381, 31383, 31385, 31387, 31390, 31392, 31395, 31398, 31400, 31402, 31404, 31406, 31408, 29067, 31412, 31414, 31416, 31418, 31421, 31423, 31426, 31429, 31431, 31433, 31436, 31439, 31440, 31442, 31444, 31446, 31448, 31450, 31453, 31455, 31457, 31459, 31461, 31463, 31465, 31467, 31469, 31472, 31474, 31477, 31480, 31482, 31484, 31486, 31490, 31492, 31494, 31496, 31499, 31501, 31504, 31507, 31509, 31511, 31512, 31514, 31516, 31518, 31521, 31522, 31524, 31526, 31528, 31531, 31534, 31535, 31538, 31540, 31542, 31546, 31549, 31551, 31553, 31554, 31556, 31557, 31559, 31561, 31563, 31565, 31567, 31570, 31572, 31574, 31576, 31578, 31580, 31582, 31585, 31587, 31589, 31592, 31594, 31596, 31598, 31600, 31603, 31605, 31607, 31609, 31611, 31613, 31615, 31618, 31621, 31624, 31626, 31628, 31630, 31632, 31635, 31637, 31639, 31641, 31643, 31645, 31647, 31649, 31651, 31654, 31657, 31658, 31660, 31663, 31665, 31667, 31669, 31671, 31674, 31676, 31678, 31680, 31682, 31684, 31686, 31688, 31690, 31693, 31694, 31696, 31698, 31700, 31702, 31705, 31707, 31709, 31711, 31713, 31715, 31717, 31720, 31722, 31725, 31726, 31728, 31730, 31732, 31734, 31737, 31739, 31741, 31743, 31745, 31747, 31749, 31751, 31753, 31756, 31758, 31761, 31762, 31763, 31765, 31767, 31770, 29472, 31773, 31775, 31777, 31779, 31781, 31783, 31787, 31789, 31791, 31793, 31796, 31798, 31804, 31807, 31809, 31811, 31813, 29518, 31817, 31819, 31821, 31823, 31826, 31828, 31834, 31837, 31839, 31841, 31843, 31847, 31849, 31851, 31853, 31856, 31858, 31863, 31866, 29574, 31869, 31871, 31875, 31877, 31879, 31881, 31884, 31886, 31889, 31892, 31893, 31896, 31898, 31901, 31904, 31907, 31911, 31912, 31914, 31916, 31918, 31920, 31922, 31924, 31926, 31931, 31933, 31935, 31937, 31941, 31943, 31945, 31948, 31953, 31955, 31957, 31959, 31961, 31963, 31965, 31967, 31969, 31971, 31974, 31977, 31980, 31982, 31984, 31986, 31988, 31990, 31992, 31994, 31996, 31998, 32000, 32002, 32004, 32006, 32008, 32010, 32013, 32016, 32020, 32022, 32024, 32026, 32030, 32032, 32034, 32036, 32038, 32040, 32043, 32046, 32048, 32051, 32053, 32055, 32057, 32060, 32062, 32065, 32067, 32069, 32071, 32073, 32075, 32077, 32079, 32081, 32085, 32087, 32090, 32092, 32094, 32096, 32098, 32100, 32102, 32104, 32108, 32112, 32114, 32116, 32118, 32121, 32123, 32126, 32128, 32132, 32135, 28259, 30689, 32137, 31545, 32140, 32142, 32145, 32147, 32149, 31169, 32152, 32154, 28259, 30689, 32157, 31000, 32161, 32164, 32166, 32170, 32174, 32177, 31947, 32181, 32184, 32187, 32190, 32191, 32193, 31000, 32198, 32201, 32203, 32207, 32210, 32214, 32215, 32217, 28681, 31090, 32221, 32223, 28681, 31090, 32226, 32228, 32233, 32234, 32236, 32084, 32240, 32243, 32245, 32247, 28681, 31090, 32250, 32252, 32255, 32257, 28681, 31032, 32259, 32261, 32264, 32269, 32270, 32272, 32275, 32280, 32281, 32285, 32286, 32289, 32291, 28681, 31090, 32293, 32295, 32297, 28681, 31032, 32300, 32302, 28681, 31090, 32304, 32306, 31169, 32308, 32310, 32312, 32314, 32318, 32321, 32324, 32328, 32331, 31947, 32338, 32341, 28962, 28994, 32346, 32348, 31545, 32351, 32353, 32356, 31545, 32358, 32360, 32363, 32365, 31803, 31833, 29567, 32368, 32370, 32373, 32376, 31947, 32379, 32382, 32084, 32385, 32390, 32393, 32394, 32396, 32399, 32401, 32404, 32084, 32408, 32412, 32416, 32163, 32173, 32418, 32419, 32178, 32183, 32196, 32200, 32209, 32420, 32421, 32220, 32278, 32231, 32238, 32274, 30218, 27752, 32403, 32406, 27630, 32267, 32274, 32278, 32283, 32288, 32335, 32345, 27752, 27761, 32388, 30218, 32403, 32406, 27797, 32411, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32450, 32453, 32455, 32458, 32461, 32463, 32464, 32467, 32469, 32472, 32475, 32479, 32480, 32483, 32486, 32489, 32492, 32494, 32495, 32498, 32501, 32504, 32507, 32509, 32510, 32513, 32515, 32518, 32521, 32523, 32524, 32527, 32529, 32532, 32535, 32537, 32540, 32543, 32545, 32548, 32551, 32555, 32556, 32559, 32561, 32564, 32567, 32571, 32572, 32575, 32577, 32580, 32583, 32589, 32592, 32594, 32597, 32600, 32611, 32614, 32615, 32618, 32620, 32622, 32625, 32627, 32630, 32632, 32634, 32638, 32643, 32647, 32650, 32653, 32655, 32656, 32659, 32663, 32664, 32666, 32669, 32671, 32674, 32679, 32680, 32681, 32684, 32686, 32689, 32692, 32694, 32695, 32696, 32699, 32701, 32704, 32707, 32711, 32712, 32715, 32717, 32720, 32723, 32727, 32730, 32733, 32734, 32737, 32739, 32743, 32746, 32747, 32750, 32752, 32759, 32761, 32764, 32766, 32770, 32776, 32778, 32780, 32783, 32784, 32787, 32788, 32791, 32793, 32795, 32796, 32799, 32800, 32803, 32805, 32806, 32810, 32812, 32815, 32816, 32819, 32822, 32824, 32827, 32828, 32831, 32833, 32838, 32841, 32843, 32847, 32849, 32852, 32854, 32857, 32859, 32860, 32862, 32863, 32866, 32867, 32870, 32873, 32876, 32879, 32880, 32883, 32886, 32889, 32892, 32893, 32896, 32898, 32901, 32904, 32906, 32909, 32911, 32920, 32924, 32927, 32928, 32931, 32933, 32937, 32940, 32942, 32945, 32947, 32955, 32958, 32960, 32963, 32968, 32970, 32971, 32972, 32975, 32976, 32979, 32981, 32986, 32989, 32991, 32994, 32997, 33008, 33011, 33013, 33016, 33019, 33022, 33023, 33026, 33028, 33031, 33034, 33036, 33037, 33040, 33042, 33045, 33050, 33051, 33054, 33055, 33058, 33060, 33063, 33068, 33070, 33073, 33075, 33078, 33081, 33083, 33085, 33088, 33090, 33093, 33098, 33100, 33105, 33110, 33113, 33114, 33117, 33119, 33120, 33121, 33124, 33126, 33129, 33131, 33132, 33133, 33136, 33137, 33140, 33142, 33143, 33144, 33147, 33148, 33151, 33153, 33160, 33161, 33164, 33167, 33170, 33171, 33174, 33176, 33182, 33185, 33188, 33189, 33191, 33194, 33197, 33200, 33203, 33206, 33207, 33208, 33209, 33212, 33215, 33218, 33220, 33222, 33225, 33227, 33231, 33234, 33240, 33243, 33246, 33247, 33248, 33251, 33253, 33255, 33256, 33258, 27840, 33259, 28297, 33155, 27843, 31102, 28727, 32983, 32985, 32996, 33000, 31548, 33261, 30274, 31555, 29233, 32449, 33262, 30306, 32478, 30376, 30410, 30444, 30478, 32769, 32771, 32539, 33264, 32554, 32570, 32586, 32588, 32603, 32604, 32606, 33266, 32983, 32985, 32608, 33000, 30634, 33267, 32609, 31555, 28233, 32610, 33268, 33270, 28266, 33271, 28297, 33155, 30702, 31102, 28727, 31951, 33230, 33273, 33239, 33214, 31951, 33230, 33280, 33239, 33238, 33214, 33285, 31951, 33230, 33287, 33239, 33238, 33214, 33214, 33294, 33296, 33297, 31900, 29607, 32641, 32642, 33298, 33300, 33301, 31900, 28653, 32644, 32645, 33302, 33214, 31900, 29607, 32646, 32045, 33230, 33307, 33239, 33238, 32662, 32678, 32710, 32726, 33311, 33312, 33313, 31102, 28727, 33314, 27176, 27175, 27181, 27180, 33316, 33318, 33319, 28653, 31035, 33320, 33322, 33214, 33326, 33214, 33214, 32777, 32769, 32771, 33109, 33331, 33333, 33334, 28653, 31035, 33335, 32777, 33103, 33107, 33109, 33337, 33338, 33339, 28653, 31035, 33340, 33342, 33343, 28727, 31102, 33344, 32821, 31168, 31165, 31548, 33346, 29233, 31555, 33347, 33349, 31951, 32846, 33351, 33352, 32851, 32856, 33214, 33354, 33355, 32045, 33230, 33356, 33239, 33238, 33357, 33358, 32872, 31258, 32885, 31288, 32900, 33359, 32913, 33360, 31351, 28997, 31354, 31359, 29006, 31362, 32923, 33361, 32935, 32936, 32949, 32950, 32983, 32985, 31437, 33363, 31438, 31555, 29105, 32954, 33364, 32967, 33052, 33107, 33109, 32983, 32985, 32996, 33000, 31548, 33367, 33003, 31555, 29233, 33007, 33368, 33049, 33052, 33107, 33109, 33067, 33097, 33103, 33107, 33109, 33371, 33372, 33373, 33374, 33155, 31895, 31900, 29607, 31903, 33163, 33375, 33214, 32045, 33230, 33379, 33239, 33238, 32045, 33230, 33382, 33239, 33238, 31951, 29674, 29671, 33214, 33214, 32045, 33230, 33391, 33239, 33238, 32139, 32159, 29896, 33395, 33276, 32172, 33396, 29911, 33397, 32179, 33399, 33386, 32186, 33400, 33283, 33401, 29947, 33402, 33290, 29956, 33403, 32212, 33404, 33406, 33407, 33408, 30001, 29998, 33409, 30060, 30057, 33410, 30171, 30179, 32392, 33411, 33386, 27753, 33412, 33381, 32398, 32400, 30236, 33413, 30241, 33414, 27631, 33415, 33309, 32414, 33394, 30193, 33378, 33416, 30060, 30057, 33417, 33418, 30075, 33419, 30083, 33420, 32325, 33421, 33422, 30171, 30179, 30193, 33378, 27753, 33423, 33381, 27762, 33424, 33425, 32392, 33426, 33386, 32398, 32400, 30236, 33427, 30241, 33428, 27798, 33429, 33430, 32414, 33394, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30648, 32613, 32619, 32617, 30664, 33745, 32626, 32624, 32631, 32629, 30693, 33747, 31874, 33146, 33152, 32448, 33154, 33748, 33749, 33750, 33751, 33575, 31109, 29018, 33587, 31489, 32974, 32980, 32978, 33752, 32982, 33753, 32990, 32988, 32995, 32607, 32998, 33754, 33755, 33756, 33758, 33759, 33760, 33761, 30287, 32452, 32460, 32457, 33763, 30303, 33445, 30321, 32466, 32474, 32471, 33764, 32476, 33451, 32485, 32482, 32491, 32488, 33765, 30373, 33457, 32500, 32497, 32506, 32503, 33766, 30407, 33463, 30425, 32512, 32520, 32517, 33767, 30441, 33469, 30459, 32526, 32534, 32531, 33768, 30475, 33475, 33769, 33558, 33770, 33771, 30497, 32542, 32550, 32547, 33773, 32552, 30522, 30533, 32558, 32566, 32563, 33774, 32568, 30558, 30569, 32574, 32582, 32579, 33775, 32584, 33776, 30604, 32591, 32599, 32596, 33777, 32601, 33778, 33779, 33558, 31489, 32974, 32980, 32978, 33781, 32982, 33782, 32990, 32988, 32995, 32607, 33783, 32998, 33784, 33785, 33787, 33788, 33789, 33790, 30648, 32613, 32619, 32617, 30664, 33793, 32626, 32624, 32631, 32629, 30693, 33795, 31874, 33146, 33152, 33150, 33154, 33796, 33797, 33798, 33799, 33586, 31109, 29018, 33587, 33800, 32050, 33175, 33178, 33801, 33228, 32636, 32637, 33238, 33803, 33190, 33202, 32758, 29697, 29735, 31979, 33193, 33804, 32029, 33239, 33196, 33805, 33224, 32050, 33178, 33806, 33228, 32636, 33236, 33808, 33809, 33166, 32758, 30981, 31930, 33193, 33810, 33173, 33239, 31940, 33812, 33224, 32050, 33226, 33813, 33228, 32636, 32637, 33815, 33816, 33202, 33199, 33205, 32019, 29697, 29735, 32640, 33817, 32029, 33239, 33217, 33166, 32758, 31929, 30997, 33211, 33818, 33173, 33239, 31940, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 30717, 32782, 33822, 33823, 33824, 29018, 32921, 33825, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32781, 30717, 32782, 33829, 33830, 33831, 32921, 29617, 33832, 33557, 33169, 31929, 30997, 32767, 32084, 33834, 33239, 33217, 33835, 33836, 33837, 33224, 32050, 33838, 33178, 33839, 33228, 33233, 33236, 33841, 33842, 32649, 32652, 30746, 32654, 32658, 33843, 32660, 32665, 30765, 30781, 32668, 32676, 32673, 33844, 33524, 30814, 32683, 32691, 32688, 32693, 33531, 30848, 32698, 32706, 32703, 33845, 32708, 30873, 30884, 32714, 32722, 32719, 33846, 32724, 30909, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33850, 33851, 33586, 31109, 29617, 33587, 30922, 32732, 32738, 32736, 32740, 33853, 33854, 30951, 32745, 32751, 32749, 32753, 33855, 33856, 31047, 32786, 32792, 32756, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33860, 33861, 33575, 29018, 31039, 33587, 33166, 32758, 30981, 31930, 32760, 33864, 32029, 33239, 31940, 32763, 33557, 33169, 31930, 31929, 32767, 32084, 33866, 33239, 33217, 33557, 33169, 31929, 30997, 32767, 33867, 31000, 33239, 33217, 31452, 32957, 32775, 32774, 33868, 32768, 33634, 33869, 33558, 33870, 33871, 31047, 32772, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32781, 31094, 32782, 33875, 33876, 33586, 29018, 31039, 33587, 31452, 32957, 32775, 32774, 33878, 32969, 33634, 33879, 33561, 33880, 33881, 31047, 32786, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32781, 31094, 32782, 33885, 33886, 33586, 29018, 31039, 33587, 31047, 32786, 32792, 32790, 31063, 33568, 31077, 32798, 32804, 32802, 31094, 32807, 33890, 33891, 33575, 31109, 29018, 33587, 31118, 32814, 32820, 32818, 33893, 32823, 31146, 32826, 32832, 32830, 32834, 33894, 33895, 33896, 33586, 33898, 33899, 33587, 31952, 33902, 31950, 32845, 33184, 33903, 33233, 32084, 33214, 33239, 33238, 33590, 33906, 33592, 33907, 32019, 31215, 32858, 32084, 33908, 33217, 33239, 33224, 33911, 32050, 28859, 28855, 33912, 33184, 32861, 33236, 33914, 33915, 31237, 32865, 32871, 32869, 32874, 33918, 33919, 31267, 32878, 32884, 32882, 32887, 33920, 33921, 31298, 32891, 32897, 32895, 33922, 32899, 32905, 32903, 32910, 32908, 33924, 32912, 33926, 33927, 33928, 33929, 33930, 33931, 29018, 32921, 33932, 31380, 32926, 32932, 32930, 33934, 32934, 33935, 32941, 32939, 32946, 32944, 33936, 32948, 33937, 31489, 32974, 32980, 32978, 33938, 32982, 33939, 33940, 33942, 33943, 33944, 33945, 31452, 32957, 32965, 32962, 32969, 33947, 33634, 33948, 33663, 33949, 33950, 31489, 32974, 32980, 32978, 33951, 32982, 33952, 32990, 32988, 32995, 32993, 32998, 33953, 33954, 33955, 33957, 33958, 33959, 33960, 31569, 33010, 33018, 33015, 33020, 33650, 31602, 33025, 33033, 33030, 33035, 33656, 31634, 33039, 33047, 33044, 33962, 33662, 33963, 33663, 33964, 33965, 31673, 33057, 33065, 33062, 33966, 33069, 31704, 33072, 33080, 33077, 33082, 33084, 31736, 33087, 33095, 33092, 33099, 33967, 33101, 33968, 33681, 33969, 33970, 31786, 33112, 33118, 33116, 31801, 27390, 33125, 33123, 33130, 33128, 31831, 27392, 31846, 33135, 33141, 33139, 31861, 29571, 31874, 33146, 33152, 33150, 33975, 33154, 33976, 33977, 33978, 33979, 31910, 29617, 33980, 33166, 33169, 31930, 31929, 33211, 33982, 33173, 33239, 31940, 33983, 32050, 33175, 33226, 33984, 33228, 33233, 33236, 33986, 33987, 33224, 32050, 33988, 33178, 33989, 33228, 33233, 33236, 33991, 33992, 31952, 33993, 31950, 33179, 33184, 33994, 33995, 33187, 33214, 32029, 33239, 33196, 33190, 33202, 33205, 29697, 29735, 31979, 33193, 33996, 32029, 33196, 33239, 33202, 33199, 33205, 32019, 29735, 29731, 33211, 33997, 32029, 33239, 33217, 33224, 32050, 33998, 33226, 33999, 33228, 33233, 33236, 34001, 34002, 33242, 33245, 32111, 32107, 33250, 33254, 33252, 33257, 32131, 34003, 32144, 29874, 29878, 32156, 34004, 34005, 34007, 34008, 34010, 34012, 34014, 34015, 34017, 29936, 34019, 34021, 34022, 34024, 29971, 30114, 29975, 27584, 27678, 32225, 32230, 29987, 29986, 29990, 29989, 34029, 34030, 34032, 34033, 34035, 30183, 34036, 32362, 32355, 32350, 32372, 34037, 34039, 34040, 34042, 34043, 34044, 34045, 34047, 34049, 34051, 34052, 34053, 34054, 34055, 27680, 27678, 32254, 30114, 30109, 32263, 30049, 30045, 34057, 34058, 30067, 30066, 34061, 34063, 27678, 27679, 27680, 27681, 27682, 30114, 30109, 30126, 30122, 34065, 30140, 30136, 30155, 30151, 32350, 32355, 34068, 32362, 34069, 30183, 32372, 34070, 34071, 34072, 34074, 34075, 34078, 34080, 34081, 34082, 34083, 34085, 34087, 34090, 34091, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 34112, 34113, 34114, 34115, 34116, 34118, 34119, 34120, 34121, 34122, 34124, 34125, 34126, 34127, 34128, 34131, 34133, 34134, 34135, 34136, 34137, 34138, 34139, 34140, 34142, 34144, 34145, 34146, 34147, 34148, 34151, 34153, 34156, 34157, 34158, 34159, 34161, 34162, 34163, 34164, 34165, 34166, 34168, 34169, 34170, 34171, 34172, 34173, 34175, 34176, 34177, 34178, 34179, 34180, 34182, 34183, 34184, 34185, 34186, 34187, 34189, 34190, 34191, 34192, 34193, 34194, 34196, 34197, 34199, 34202, 34203, 34204, 34205, 34207, 34208, 34209, 34210, 34211, 34212, 34214, 34215, 34216, 34217, 34218, 34219, 34221, 34223, 34224, 34225, 34226, 34228, 34231, 34232, 34233, 34234, 34235, 34237, 34239, 34240, 34241, 34242, 34244, 34246, 34248, 34251, 34252, 34253, 34254, 34255, 34257, 34258, 34259, 34260, 34261, 34263, 34264, 34265, 34266, 34267, 34270, 34272, 34273, 34274, 34275, 34277, 34278, 34279, 34281, 34282, 34283, 34284, 34286, 34287, 34288, 34289, 34290, 34291, 34292, 34294, 34295, 34296, 34298, 34299, 34300, 34302, 34303, 34304, 34305, 34307, 34308, 34309, 34310, 34311, 34313, 34314, 34315, 34317, 34318, 34319, 34321, 34322, 34323, 34324, 34326, 34327, 34328, 34329, 34330, 34331, 34332, 34334, 34335, 34336, 34337, 34338, 34339, 34340, 34341, 34343, 34344, 34345, 34346, 34347, 34348, 34349, 34350, 34351, 34352, 34353, 34354, 34355, 34356, 34357, 34358, 34361, 34362, 34364, 34365, 34366, 34367, 34368, 34369, 34370, 34371, 34372, 34373, 34374, 34375, 34376, 34379, 34380, 34382, 34383, 34384, 34385, 34386, 34387, 34389, 34390, 34391, 34394, 34395, 34397, 34399, 34400, 34401, 34402, 34404, 34405, 34406, 34407, 34408, 34410, 34411, 34412, 34413, 34414, 34415, 34416, 34418, 34419, 34420, 34421, 34422, 34423, 34424, 34425, 34426, 34427, 34428, 34430, 34431, 34432, 34433, 34434, 34435, 34437, 34438, 34439, 34440, 34441, 34442, 34443, 34444, 34445, 34446, 34447, 34448, 34449, 34450, 34451, 34453, 34454, 34455, 34456, 34457, 34458, 34459, 34460, 34461, 34462, 34464, 34465, 34466, 34467, 34468, 34469, 34471, 34472, 34473, 34474, 34475, 34476, 34477, 34478, 34479, 34480, 34481, 34482, 34483, 34485, 34486, 34487, 34488, 34489, 34490, 34491, 34492, 34493, 34495, 34496, 34497, 34498, 34499, 34500, 34501, 34502, 34503, 34504, 34506, 34507, 34508, 34509, 34510, 34511, 34512, 34514, 34515, 34516, 34517, 34518, 34519, 34520, 34522, 34523, 34525, 34528, 34529, 34530, 34531, 34532, 34533, 34534, 34535, 34536, 34537, 34538, 34539, 34540, 34542, 34543, 34544, 34545, 34546, 34547, 34548, 34549, 34551, 34552, 34554, 34557, 34558, 34559, 34560, 34561, 34562, 34563, 34564, 34565, 34566, 34567, 34568, 34569, 34571, 34572, 34573, 34574, 34575, 34576, 34577, 34578, 34579, 34580, 34581, 34582, 34583, 34584, 34585, 34586, 34587, 34589, 34590, 34591, 34592, 34593, 34594, 34595, 34596, 34598, 34599, 34600, 34601, 34602, 34603, 34604, 34606, 34607, 34608, 34610, 34611, 34613, 34614, 34615, 34617, 34618, 34619, 34620, 34621, 34622, 34624, 34626, 34627, 34628, 34629, 34631, 34632, 34633, 34635, 34636, 34637, 34639, 34640, 34641, 34642, 34644, 34645, 34646, 34647, 34648, 34651, 34652, 34653, 34654, 34655, 34658, 34659, 34660, 34661, 34663, 34664, 34665, 34666, 34667, 34669, 34670, 34673, 34676, 34677, 34679, 34680, 34681, 34682, 34684, 34686, 34687, 34688, 34689, 34691, 34693, 34694, 34695, 34696, 34698, 34700, 34702, 34705, 34706, 34707, 34708, 34709, 34711, 34713, 34716, 34717, 34718, 34719, 34721, 34723, 34724, 34725, 34726, 34727, 34730, 34732, 34735, 34736, 34737, 34738, 34739, 34740, 34741, 34742, 34743, 34744, 34745, 34746, 34747, 34748, 34749, 34750, 34752, 34754, 34757, 34758, 34759, 34760, 34762, 34763, 34764, 34765, 34766, 34767, 34768, 34769, 34770, 34771, 34772, 34773, 34775, 34777, 34780, 34781, 34782, 34783, 34784, 34785, 34786, 34787, 34788, 34789, 34790, 34791, 34792, 34793, 34794, 34795, 34796, 34797, 34798, 34799, 34800, 34801, 34803, 34805, 34808, 34809, 34811, 34812, 34813, 34814, 34815, 34817, 34818, 34819, 34821, 34822, 34823, 34825, 34826, 34827, 34828, 34830, 34831, 34833, 34835, 34836, 34837, 34838, 34840, 34842, 34843, 34844, 34847, 34848, 34849, 34850, 34851, 34852, 34853, 34854, 34855, 34856, 34857, 34858, 34860, 34861, 34862, 34863, 34864, 34865, 34866, 34867, 34868, 34869, 34871, 34872, 34873, 34874, 34875, 34877, 34879, 34880, 34881, 34882, 34884, 34885, 34886, 34887, 34888, 34889, 34890, 34891, 34892, 34894, 34201, 34895, 34779, 34896, 34897, 34899, 34903, 34905, 34907, 34908, 34912, 34913, 34914, 34556, 34915, 34527, 34916, 34917, 34918, 34919, 34920, 34921, 34922, 34923, 34925, 34715, 34779, 34928, 34756, 34930, 34931, 34932, 34933, 34934, 34936, 34942, 34556, 34948, 34527, 34949, 34950, 34951, 34952, 34953, 34954, 34955, 34956, 34958, 34959, 34527, 34962, 34963, 34556, 34964, 34965, 34966, 34967, 34968, 34969, 34970, 34972, 34973, 34974, 34975, 34976, 34977, 34715, 34979, 34756, 34779, 34981, 34982, 34985, 34987, 34988, 34994, 34011, 34009, 34025, 34023, 34939, 34048, 34046, 34945, 34947, 34062, 34064, 34984, 34991, 34086, 34084, 34996, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35008, 35010, 35012, 35013, 35015, 35017, 35018, 35020, 35022, 35025, 35028, 35030, 34141, 35033, 35035, 35037, 35040, 35042, 34160, 35046, 35048, 34167, 35052, 35054, 34174, 35058, 35060, 34181, 35064, 35066, 34188, 35070, 35072, 34195, 35077, 35079, 34206, 35083, 35085, 34213, 35089, 35091, 34220, 35094, 35096, 34227, 35100, 35102, 34236, 35105, 35107, 34243, 35112, 35114, 35116, 35117, 35119, 35121, 35122, 35124, 35126, 35129, 34276, 34280, 35137, 35138, 35139, 35142, 34293, 35147, 34297, 34301, 35154, 35158, 34312, 35162, 34316, 34320, 35169, 35171, 35174, 34333, 35179, 35183, 34342, 35187, 35189, 35191, 35193, 35195, 35197, 33821, 35202, 35204, 35206, 35208, 35210, 35212, 33828, 35217, 35221, 35224, 35225, 35228, 34398, 33840, 35237, 34409, 35241, 35243, 35245, 35248, 35250, 35254, 35256, 34429, 35260, 35262, 34436, 35266, 35268, 35270, 35272, 35274, 35276, 35280, 35283, 35285, 35289, 35291, 35295, 35297, 35299, 35301, 35303, 35305, 35309, 35314, 34494, 35318, 35323, 35326, 35327, 35331, 34513, 35335, 35337, 35339, 34521, 35344, 35346, 35348, 35350, 35352, 35354, 35358, 35361, 35363, 34550, 35368, 35370, 35372, 35374, 35376, 35378, 35382, 35385, 35387, 35389, 35391, 35393, 35395, 35399, 35402, 35404, 35407, 35409, 35417, 35420, 35422, 35424, 35428, 35431, 35432, 35434, 35436, 34638, 35440, 35442, 35444, 35446, 35447, 35449, 35451, 35452, 35454, 34662, 35457, 35459, 34668, 35464, 35466, 35468, 34683, 35471, 35473, 34690, 35476, 35478, 34697, 35483, 35485, 35487, 35490, 35492, 34720, 35495, 35497, 35499, 35502, 35504, 35508, 35510, 35514, 35516, 35520, 35522, 35525, 35527, 35531, 35533, 35535, 35538, 35540, 33972, 35544, 35546, 33973, 35550, 35552, 33974, 35556, 35558, 34802, 35562, 35566, 34816, 35570, 34820, 34824, 35577, 35579, 34834, 33990, 35586, 35589, 35591, 35593, 35595, 35598, 34859, 35603, 35605, 35608, 34870, 35613, 35615, 34878, 34000, 35624, 35627, 35629, 35024, 34155, 34152, 35632, 35076, 35634, 35099, 34250, 34247, 35128, 33281, 35157, 33288, 35182, 35406, 35412, 35416, 35414, 35643, 35645, 35367, 35647, 35343, 34360, 34378, 35651, 32337, 35653, 35220, 35313, 35657, 35489, 35524, 35530, 35658, 35537, 35507, 35513, 35518, 35660, 35519, 34734, 34731, 34704, 34701, 34393, 34807, 30008, 30014, 35236, 35565, 35247, 35253, 35668, 35367, 35670, 35343, 35279, 35288, 35294, 35406, 35416, 35414, 35673, 35308, 32337, 35676, 35313, 35679, 35322, 35330, 35681, 35343, 35357, 35684, 35367, 35381, 35398, 35406, 35412, 35416, 35414, 35688, 35690, 34625, 34623, 35692, 32337, 35694, 34675, 34672, 34704, 34701, 35698, 35489, 34734, 34731, 35507, 35513, 35518, 35700, 35519, 35524, 35530, 35701, 35537, 34807, 35565, 30199, 30208, 30245, 35623, 34900, 35708, 35709, 34904, 34906, 34018, 34909, 35710, 35711, 34026, 34031, 34034, 34935, 34937, 35712, 35713, 35714, 34943, 35715, 35716, 34059, 35717, 35718, 35719, 34986, 34077, 34989, 35720, 35721, 35722, 34089, 35723, 35806, 35811, 35814, 35820, 35824, 35847, 35921, 35928, 35992, 35995, 35998, 35999, 36003, 36007, 36010, 35745, 34117, 35748, 34123, 35751, 34130, 35027, 36016, 35755, 34143, 35758, 34150, 36017, 36018, 35761, 35045, 35764, 35051, 35767, 35057, 35770, 35063, 35773, 35069, 35776, 35075, 36020, 35779, 35082, 35782, 35088, 35785, 34222, 35788, 34229, 36022, 35791, 34238, 35794, 34245, 36023, 36024, 35797, 34256, 35800, 34262, 35803, 34269, 35131, 36025, 35136, 33274, 32160, 35141, 32169, 32168, 33279, 32176, 35153, 36026, 32180, 35160, 36027, 33284, 32189, 35168, 36028, 32197, 35173, 32206, 32205, 35185, 36029, 33293, 32213, 35918, 36030, 35920, 36031, 36032, 36033, 35901, 35366, 36036, 35891, 35342, 36038, 35831, 35194, 35834, 35200, 34363, 36039, 35838, 35209, 35841, 35215, 34381, 36040, 35421, 32317, 32316, 35439, 36042, 32336, 35223, 36044, 33304, 32232, 35316, 36045, 33323, 32268, 35955, 35488, 36047, 35970, 36048, 35972, 36049, 35974, 35536, 36051, 35964, 36052, 35966, 36053, 35968, 36054, 36056, 35958, 34722, 35961, 34729, 36057, 36058, 35946, 34685, 35949, 34692, 35952, 34699, 36059, 36060, 35933, 34650, 35936, 34657, 35939, 33923, 35942, 33925, 34678, 36061, 35977, 35543, 35980, 35549, 35983, 35555, 35986, 34804, 34810, 36062, 30006, 30005, 35576, 36063, 30007, 35597, 30010, 30009, 35607, 30012, 30011, 35232, 36064, 30013, 35239, 36065, 30023, 30022, 35568, 36066, 30027, 30026, 35854, 36067, 35856, 36068, 36070, 35858, 35259, 35861, 35265, 36072, 35864, 35271, 35867, 35277, 35282, 36073, 35871, 36074, 35873, 36075, 35918, 36076, 36077, 36078, 35875, 35300, 35878, 35306, 35311, 36080, 35439, 36081, 32336, 35316, 36083, 33323, 32268, 35421, 32317, 32316, 35325, 36085, 33327, 32279, 35333, 36086, 33329, 32284, 35891, 35342, 36088, 35894, 35349, 35897, 35355, 35360, 36089, 35901, 35366, 36091, 35904, 35373, 35907, 35379, 35384, 36092, 35911, 35390, 35914, 35396, 35401, 36093, 35918, 36094, 35920, 36095, 36096, 36097, 35421, 32317, 32316, 35430, 36100, 36101, 32327, 32326, 35439, 36103, 32336, 35933, 34650, 35936, 34657, 35939, 33923, 35942, 33925, 34678, 36105, 36106, 35946, 34685, 35949, 34692, 35952, 34699, 36107, 36108, 35955, 35488, 36110, 35958, 34722, 35961, 34729, 36111, 36112, 35964, 36113, 35966, 36114, 35968, 36115, 36117, 35970, 36118, 35972, 36119, 35974, 35536, 36121, 35977, 35543, 35980, 35549, 35983, 35555, 35986, 34804, 34810, 36122, 35568, 36123, 30190, 30189, 35576, 36124, 30198, 35583, 36125, 30207, 30216, 30215, 35597, 30226, 30225, 35607, 30233, 30232, 35619, 36126, 30244, 35626, 36127, 30253, 30252, 36128, 36129, 36131, 36132, 36133, 36134, 36135, 36137, 34027, 34028, 36138, 36139, 36140, 36141, 36143, 36145, 34056, 36148, 34060, 34971, 34066, 34067, 36152, 36153, 36154, 36156, 36158, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36175, 36176, 36177, 36178, 36179, 36180, 36181, 36183, 36184, 36185, 36186, 36187, 36189, 36190, 36191, 36192, 36193, 36194, 36195, 36196, 36197, 36198, 36199, 36200, 36019, 36202, 36203, 36204, 36205, 36206, 36207, 36208, 36209, 36021, 36211, 36212, 36213, 36214, 36215, 36217, 36218, 36219, 36220, 36221, 36222, 36223, 36225, 35134, 36226, 36227, 35145, 36228, 36229, 36230, 35590, 35588, 36231, 36232, 36233, 35151, 36235, 36236, 36238, 36239, 36240, 35166, 36242, 35177, 36243, 36244, 36245, 36246, 36248, 36249, 36250, 36252, 36254, 36256, 36257, 36035, 36259, 36260, 36037, 36262, 36263, 36264, 36265, 36266, 36268, 36269, 36270, 36271, 36272, 36274, 35419, 36275, 36276, 36277, 35929, 36279, 36280, 36282, 36283, 36284, 36286, 36287, 36288, 36289, 36046, 36291, 36293, 36295, 36296, 36050, 36298, 36300, 36302, 36055, 36305, 36306, 36307, 36308, 36309, 36311, 36312, 36313, 36314, 36315, 36316, 36317, 36319, 36320, 36321, 36322, 36323, 36324, 36325, 36326, 36327, 36329, 36330, 36331, 36332, 36333, 36334, 36335, 36336, 36337, 35590, 35588, 36339, 36340, 36341, 35574, 36343, 35601, 36344, 36345, 36346, 35611, 36347, 36348, 36349, 36350, 35230, 36352, 36353, 36355, 36356, 36357, 36359, 36360, 36361, 36363, 36069, 36366, 36367, 36368, 36369, 36071, 36371, 36372, 36373, 36374, 36375, 36377, 36379, 36381, 36383, 36385, 36386, 36387, 36388, 36389, 36391, 35929, 36393, 36394, 36396, 36397, 36398, 35320, 36399, 36400, 36401, 36403, 36404, 36405, 36407, 36408, 36409, 36410, 36087, 36412, 36413, 36414, 36415, 36416, 36418, 36419, 36090, 36421, 36422, 36423, 36424, 36425, 36427, 36428, 36429, 36430, 36431, 36433, 36435, 36437, 36439, 35419, 36440, 36441, 36442, 36445, 36446, 36447, 35929, 36449, 36450, 36451, 36452, 36453, 36454, 36455, 36456, 36457, 36458, 36461, 36462, 36463, 36464, 36465, 36466, 36467, 36469, 36470, 36109, 36472, 36473, 36474, 36475, 36476, 36478, 36480, 36482, 36116, 36485, 36487, 36489, 36490, 36120, 36492, 36493, 36494, 36495, 36496, 36497, 36498, 36499, 36500, 36502, 36504, 36505, 36506, 35574, 36508, 36509, 35581, 36511, 35590, 35588, 36512, 36513, 35601, 36514, 36515, 36516, 35611, 36517, 36518, 36519, 36520, 35617, 36522, 36523, 36525, 36526, 36535, 36536, 36543, 36545, 36546, 36547, 36548, 36582, 36621, 36623, 36624, 36626, 36628, 36630, 36631, 36632, 36635, 36234, 36637, 36638, 36641, 36241, 36643, 36645, 36647, 36648, 36663, 36668, 36670, 36671, 36674, 36278, 36676, 36677, 36679, 36680, 36714, 36723, 36724, 36725, 36726, 36729, 36342, 36731, 36733, 36735, 36737, 36740, 36351, 36742, 36743, 36745, 36746, 36760, 36769, 36771, 36392, 36773, 36774, 36777, 36778, 36780, 36781, 36783, 36784, 36793, 36801, 36806, 36811, 36812, 36814, 36815, 36818, 36448, 36828, 36861, 36862, 36863, 36866, 36507, 36869, 36510, 36871, 36872, 36873, 36875, 36877, 36879, 36881, 36884, 36521, 36886, 36887, 36581, 36579, 36577, 36586, 36584, 35631, 36591, 36589, 36599, 36595, 36597, 36593, 35633, 36608, 36606, 36604, 36602, 35635, 36613, 36611, 35636, 36620, 36618, 36616, 36253, 36251, 36034, 36654, 35646, 36657, 35648, 36662, 36660, 36667, 36665, 36683, 34927, 36688, 36294, 36292, 35659, 36303, 36301, 36299, 34929, 36697, 36695, 35661, 36704, 36702, 36700, 35662, 36713, 36711, 36709, 36707, 36722, 36720, 36718, 36716, 36364, 36362, 35669, 36754, 36752, 35671, 36759, 36757, 36382, 36380, 36378, 36079, 36768, 36766, 36787, 35682, 36792, 36790, 36795, 35685, 36800, 36798, 36805, 36803, 36436, 36434, 36098, 36827, 36825, 36823, 36821, 36834, 36832, 36830, 35697, 36837, 34978, 36842, 36840, 35699, 36483, 36481, 36479, 34980, 36851, 36488, 36486, 35702, 36860, 36858, 36856, 36854, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36622, 36900, 36902, 36634, 36640, 36911, 36669, 36673, 36927, 36728, 36932, 36934, 36739, 36770, 36776, 36810, 36959, 36817, 36963, 36865, 36868, 36971, 36974, 36976, 36883, 36982, 36983, 36984, 34893, 36985, 36986, 36987, 36988, 36989, 36990, 36991, 36992, 36993, 36994, 36995, 36996, 36997, 36998, 36999, 37000, 37001, 37002, 37003, 37004, 37005, 34898, 36908, 36914, 37006, 37007, 37008, 37009, 37010, 37011, 37012, 37013, 37014, 35649, 37015, 37016, 35650, 36922, 36924, 37017, 37018, 37019, 37020, 37021, 37022, 37023, 37024, 37025, 37026, 37027, 37028, 37029, 37030, 37031, 37032, 37033, 37034, 37035, 37036, 37037, 35663, 37038, 37039, 37040, 37041, 35664, 36939, 36941, 37042, 37043, 37044, 37045, 37046, 37047, 37048, 37049, 35672, 37050, 37051, 37052, 37053, 37054, 37055, 35675, 36947, 36951, 36953, 37056, 37057, 37058, 37059, 35683, 37060, 37061, 37062, 37063, 35686, 37064, 37065, 35687, 37066, 37067, 37068, 37069, 37070, 37071, 37072, 37073, 37074, 37075, 37076, 37077, 37078, 37079, 37080, 37081, 37082, 37083, 37084, 37085, 37086, 37087, 37088, 37089, 37090, 37091, 37092, 37093, 35703, 36966, 36981, 37145, 37148, 37149, 37152, 37154, 37156, 37159, 37161, 37164, 37167, 37170, 36899, 36901, 36904, 36906, 37171, 36910, 36912, 37172, 37173, 37180, 37182, 37183, 37185, 36918, 36920, 37186, 37187, 37190, 37194, 37198, 37201, 37205, 37207, 37209, 37210, 37212, 37214, 36929, 36931, 36933, 36935, 36937, 37215, 37216, 37217, 37220, 37223, 37225, 37226, 37230, 37232, 36945, 37233, 36949, 37234, 37235, 37238, 37240, 37243, 37245, 37246, 37248, 37249, 36958, 36960, 36962, 37252, 37254, 35696, 37256, 37262, 37265, 37269, 37273, 37275, 37277, 37278, 36968, 36970, 36973, 36975, 36977, 36979, 37279, 37179, 37177, 37189, 37242, 37237, 37261, 27, 28, 29, 30, 31, 37280, 37283, 37286, 37289, 37291, 37292, 37293, 37294, 37296, 37297, 37304, 37305, 37308, 37309, 37311, 37312, 37315, 37318, 37319, 37320, 37321, 37322, 37329, 37332, 37334, 37344, 37345, 37346, 37347, 37349, 37350, 37352, 37353, 37354, 37358, 37359, 37360, 37361, 37362, 37363, 37166, 37151, 36531, 36534, 37175, 37303, 37365, 37301, 37366, 36538, 36537, 37367, 37200, 36147, 36146, 37328, 37331, 37222, 37219, 36150, 36149, 36544, 37340, 37368, 37251, 37369, 37338, 37342, 37370, 37264, 36159, 36151, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37377, 37163, 37416, 37417, 37281, 37290, 37418, 36530, 36533, 36528, 36527, 36529, 37419, 36532, 37420, 37421, 37423, 37425, 37426, 36890, 36889, 37197, 37204, 37193, 37314, 37317, 37428, 36541, 36540, 37429, 36539, 37430, 36142, 36542, 37229, 37431, 37432, 37433, 37434, 37435, 37436, 37437, 36891, 36892, 37438, 37440, 37442, 37443, 36895, 36894, 36893, 37405, 37259, 37272, 37445, 37356, 37268, 36155, 37446, 36551, 36549, 36552, 37447, 36550, 36553, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37473, 37476, 37477, 37158, 37479, 37480, 37481, 37482, 37483, 37485, 37486, 37422, 37491, 37492, 37489, 37493, 37494, 37495, 37496, 37497, 37499, 37500, 37502, 37504, 37505, 37506, 37508, 37514, 37515, 37511, 37516, 37517, 37518, 37520, 37521, 37522, 37523, 37524, 37525, 37527, 37528, 37529, 37531, 37532, 37533, 37535, 37536, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37571, 37568, 37475, 37478, 37573, 37575, 37484, 37578, 37580, 37583, 37585, 37427, 37588, 37501, 37503, 37593, 37513, 37598, 37601, 37604, 37606, 37526, 37609, 37610, 37612, 37613, 26, 27, 28, 29, 30, 31, 37570, 37633, 37635, 37637, 37639, 37582, 37641, 37643, 37644, 37646, 37647, 37597, 37649, 37650, 37651, 37653, 37654, 37656, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37665, 37666, 37670, 37672, 37674, 37675, 37678, 37680, 37669, 37677, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37701, 37704, 37699, 37703, 37697, 37705, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37728, 37730, 37731, 37732, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37760, 37761, 37763, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37792, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37824, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
int h_C[]= {
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, 669, 671, 673, 675, 677, 679, 681, 683, 685, 687, 689, 691, 693, 695, 697, 699, 701, 703, 705, 707, 709, 711, 713, 715, 717, 719, 721, 723, 725, 727, 729, 731, 733, 735, 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, 757, 759, 761, 763, 765, 767, 769, 771, 773, 775, 777, 779, 781, 783, 785, 787, 789, 791, 793, 795, 797, 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, 821, 823, 825, 827, 829, 831, 833, 835, 837, 839, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 869, 871, 873, 875, 877, 879, 881, 883, 885, 887, 889, 891, 893, 895, 897, 899, 901, 903, 905, 907, 909, 911, 913, 915, 917, 919, 921, 923, 925, 927, 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, 949, 951, 953, 955, 957, 959, 961, 963, 965, 967, 969, 971, 973, 975, 977, 979, 981, 983, 985, 987, 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, 1165, 1167, 1169, 1171, 1173, 1175, 1177, 1179, 1181, 1183, 1185, 1187, 1189, 1191, 1193, 1195, 1197, 1199, 1201, 1203, 1205, 1207, 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, 1229, 1231, 1233, 1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249, 1251, 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1297, 1299, 1301, 1303, 1305, 1307, 1309, 1311, 1313, 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, 1333, 1335, 1337, 1339, 1341, 1343, 1345, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, 1413, 1415, 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433, 1435, 1437, 1439, 1441, 1443, 1445, 1447, 1449, 1451, 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471, 1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495, 1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, 1521, 1523, 1525, 1527, 1529, 1531, 1533, 1535, 1537, 1539, 1541, 1543, 1545, 1547, 1549, 1551, 1553, 1555, 1557, 1559, 1561, 1563, 1565, 1567, 1569, 1571, 1573, 1575, 1577, 1579, 1581, 1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, 1623, 1625, 1627, 1629, 1631, 1633, 1635, 1637, 1639, 1641, 1643, 1645, 1647, 1649, 1651, 1653, 1655, 1657, 1659, 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675, 1677, 1679, 1681, 1683, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699, 1701, 1703, 1705, 1707, 1709, 1711, 1713, 1715, 1717, 1719, 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, 1755, 1757, 1759, 1761, 1763, 1765, 1767, 1769, 1771, 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1789, 1791, 1793, 1795, 1797, 1799, 1801, 1803, 1805, 1807, 1809, 1811, 1813, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835, 1837, 1839, 1841, 1843, 1845, 1847, 1849, 1851, 1853, 1855, 1857, 1859, 1861, 1863, 1865, 1867, 1869, 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889, 1891, 1893, 1895, 1897, 1899, 1901, 1903, 1905, 1907, 1909, 1911, 1913, 1915, 1917, 1919, 1921, 1923, 1925, 1927, 1929, 1931, 1933, 1935, 1937, 1939, 1941, 1943, 1945, 1947, 1949, 1951, 1953, 1955, 1957, 1959, 1961, 1963, 1965, 1967, 1969, 1971, 1973, 1975, 1977, 1979, 1981, 1983, 1985, 1987, 1989, 1991, 1993, 1995, 1997, 1999, 2001, 2003, 2005, 2007, 2009, 2011, 2014, 2016, 2018, 2020, 2022, 2024, 2026, 2028, 2030, 2032, 2034, 2036, 2038, 2040, 2043, 2045, 2047, 2049, 2051, 2053, 2055, 2057, 2059, 2061, 2063, 2065, 2067, 2069, 2071, 2073, 2075, 2077, 2079, 2081, 2083, 2085, 2087, 2089, 2091, 2093, 2095, 2097, 2099, 2101, 2103, 2105, 2107, 2109, 2111, 2113, 2115, 2117, 2119, 2121, 2123, 2125, 2127, 2129, 2131, 2133, 2135, 2137, 2139, 2141, 2143, 2145, 2147, 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167, 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2187, 2189, 2191, 2193, 2195, 2197, 2199, 2201, 2203, 2205, 2207, 2209, 2211, 2213, 2215, 2217, 2219, 2221, 2223, 2225, 2227, 2229, 2231, 2233, 2235, 2237, 2239, 2241, 2243, 2245, 2247, 2249, 2251, 2253, 2255, 2257, 2259, 2261, 2263, 2265, 2267, 2269, 2272, 2274, 2276, 2278, 2281, 2283, 2285, 2287, 2289, 2291, 2293, 2295, 2297, 2299, 2301, 2303, 2305, 2307, 2309, 2311, 2313, 2315, 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335, 2337, 2339, 2341, 2343, 2345, 2347, 2349, 2351, 2353, 2355, 2357, 2359, 2361, 2363, 2365, 2367, 2369, 2371, 2373, 2375, 2377, 2379, 2381, 2383, 2385, 2387, 2389, 2391, 2393, 2395, 2397, 2399, 2401, 2403, 2405, 2407, 2409, 2411, 2413, 2415, 2417, 2419, 2421, 2423, 2425, 2427, 2429, 2431, 2433, 2435, 2437, 2439, 2441, 2443, 2445, 2447, 2449, 2451, 2453, 2455, 2457, 2459, 2461, 2463, 2465, 2467, 2469, 2471, 2473, 2475, 2477, 2479, 2481, 2483, 2485, 2487, 2489, 2491, 2493, 2495, 2497, 2499, 2501, 2503, 2505, 2507, 2509, 2511, 2513, 2515, 2517, 2519, 2521, 2523, 2525, 2527, 2529, 2531, 2533, 2535, 2537, 2539, 2541, 2543, 2545, 2547, 2549, 2551, 2553, 2555, 2557, 2559, 2561, 2563, 2565, 2567, 2569, 2571, 2573, 2575, 2577, 2579, 2581, 2583, 2585, 2587, 2589, 2591, 2593, 2595, 2597, 2599, 2601, 2603, 2605, 2607, 2609, 2611, 2613, 2615, 2617, 2619, 2621, 2623, 2625, 2627, 2629, 2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647, 2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667, 2669, 2671, 2673, 2675, 2677, 2679, 2681, 2683, 2685, 2687, 2689, 2691, 2693, 2695, 2697, 2699, 2701, 2703, 2705, 2707, 2709, 2711, 2713, 2715, 2717, 2719, 2721, 2723, 2725, 2727, 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, 2745, 2747, 2749, 2751, 2753, 2755, 2757, 2759, 2761, 2763, 2765, 2767, 2769, 2771, 2773, 2775, 2777, 2779, 2781, 2783, 2785, 2787, 2789, 2791, 2793, 2795, 2797, 2799, 2801, 2803, 2805, 2807, 2809, 2811, 2813, 2815, 2817, 2819, 2821, 2823, 2825, 2827, 2829, 2831, 2833, 2835, 2837, 2839, 2841, 2843, 2845, 2847, 2849, 2851, 2853, 2855, 2857, 2859, 2861, 2863, 2865, 2867, 2869, 2871, 2873, 2875, 2877, 2879, 2881, 2883, 2885, 2887, 2889, 2891, 2893, 2895, 2897, 2899, 2901, 2903, 2905, 2907, 2909, 2911, 2913, 2915, 2917, 2919, 2921, 2923, 2925, 2927, 2929, 2931, 2933, 2935, 2937, 2939, 2941, 2943, 2945, 2947, 2949, 2951, 2953, 2955, 2957, 2959, 2961, 2963, 2965, 2967, 2969, 2971, 2973, 2975, 2977, 2979, 2981, 2983, 2985, 2987, 2989, 2991, 2993, 2995, 2997, 2999, 3001, 3003, 3005, 3007, 3009, 3011, 3013, 3015, 3017, 3019, 3021, 3023, 3025, 3027, 3029, 3031, 3033, 3035, 3037, 3039, 3041, 3043, 3045, 3047, 3049, 3051, 3053, 3055, 3057, 3059, 3061, 3063, 3065, 3067, 3069, 3071, 3073, 3075, 3077, 3079, 3081, 3083, 3085, 3087, 3089, 3091, 3093, 3095, 3097, 3099, 3101, 3103, 3105, 3107, 3109, 3111, 3113, 3115, 3117, 3119, 3121, 3123, 3125, 3127, 3129, 3131, 3133, 3135, 3137, 3139, 3141, 3143, 3145, 3147, 3149, 3151, 3153, 3155, 3157, 3159, 3161, 3163, 3165, 3167, 3169, 3171, 3173, 3175, 3177, 3179, 3181, 3183, 3185, 3187, 3189, 3191, 3193, 3195, 3197, 3199, 3201, 3203, 3205, 3207, 3209, 3211, 3213, 3215, 3217, 3219, 3221, 3223, 3225, 3227, 3229, 3231, 3233, 3235, 3237, 3239, 3241, 3243, 3245, 3247, 3249, 3251, 3253, 3255, 3257, 3259, 3261, 3263, 3265, 3267, 3269, 3271, 3273, 3275, 3277, 3279, 3281, 3283, 3285, 3287, 3289, 3291, 3293, 3295, 3297, 3299, 3301, 3303, 3305, 3307, 3309, 3311, 3313, 3315, 3317, 3319, 3321, 3323, 3325, 3327, 3329, 3331, 3333, 3335, 3337, 3339, 3341, 3343, 3345, 3347, 3349, 3351, 3353, 3355, 3357, 3359, 3361, 3363, 3365, 3367, 3369, 3371, 3373, 3375, 3377, 3379, 3381, 3383, 3385, 3387, 3389, 3391, 3393, 3395, 3397, 3399, 3401, 3403, 3405, 3407, 3409, 3411, 3413, 3415, 3417, 3419, 3421, 3423, 3425, 3427, 3429, 3431, 3433, 3435, 3437, 3439, 3441, 3443, 3445, 3447, 3449, 3451, 3453, 3455, 3457, 3459, 3461, 3463, 3465, 3467, 3469, 3471, 3473, 3475, 3477, 3479, 3481, 3483, 3485, 3487, 3489, 3491, 3493, 3495, 3497, 3499, 3501, 3503, 3505, 3507, 3509, 3511, 3513, 3515, 3517, 3519, 3521, 3523, 3525, 3527, 3529, 3531, 3533, 3535, 3537, 3539, 3541, 3543, 3545, 3547, 3549, 3551, 3553, 3555, 3557, 3559, 3561, 3563, 3565, 3567, 3569, 3571, 3573, 3575, 3577, 3579, 3581, 3583, 3585, 3587, 3589, 3591, 3593, 3595, 3597, 3599, 3601, 3603, 3605, 3607, 3609, 3611, 3613, 3615, 3617, 3619, 3621, 3623, 3625, 3627, 3629, 3631, 3633, 3635, 3637, 3639, 3641, 3643, 3645, 3647, 3649, 3651, 3653, 3655, 3657, 3659, 3661, 3663, 3665, 3667, 3669, 3671, 3673, 3675, 3677, 3679, 3681, 3683, 3685, 3687, 3689, 3691, 3693, 3695, 3697, 3699, 3701, 3703, 3705, 3707, 3709, 3711, 3713, 3715, 3717, 3719, 3721, 3723, 3725, 3727, 3729, 3731, 3733, 3735, 3737, 3739, 3741, 3743, 3745, 3747, 3749, 3751, 3753, 3755, 3757, 3759, 3761, 3763, 3765, 3767, 3769, 3771, 3773, 3775, 3777, 3779, 3781, 3783, 3785, 3787, 3789, 3791, 3793, 3795, 3797, 3799, 3801, 3803, 3805, 3807, 3809, 3811, 3813, 3815, 3817, 3819, 3821, 3823, 3825, 3827, 3829, 3831, 3833, 3835, 3837, 3839, 3841, 3843, 3845, 3847, 3849, 3851, 3853, 3855, 3858, 3860, 3862, 3864, 3866, 3868, 3870, 3872, 3874, 3876, 3878, 3880, 3882, 3884, 3886, 3888, 3890, 3892, 3894, 3896, 3898, 3900, 3902, 3904, 3906, 3908, 3910, 3912, 3914, 3916, 3918, 3920, 3922, 3924, 3926, 3928, 3930, 3932, 3934, 3936, 3938, 3940, 3942, 3944, 3946, 3948, 3950, 3952, 3954, 3956, 3958, 3960, 3962, 3964, 3966, 3968, 3970, 3972, 3974, 3976, 3978, 3980, 3982, 3984, 3986, 3988, 3990, 3992, 3994, 3996, 3998, 4000, 4002, 4004, 4006, 4008, 4010, 4012, 4014, 4016, 4018, 4020, 4022, 4024, 4026, 4028, 4030, 4032, 4034, 4036, 4038, 4040, 4042, 4044, 4046, 4048, 4050, 4052, 4054, 4056, 4058, 4060, 4062, 4064, 4066, 4068, 4070, 4072, 4074, 4076, 4078, 4080, 4082, 4084, 4086, 4088, 4090, 4092, 4094, 4096, 4098, 4100, 4102, 4104, 4106, 4108, 4110, 4112, 4114, 4116, 4118, 4120, 4122, 4124, 4126, 4128, 4130, 4132, 4134, 4136, 4138, 4140, 4142, 4144, 4146, 4148, 4150, 4152, 4154, 4156, 4158, 4160, 4162, 4164, 4166, 4168, 4170, 4172, 4174, 4176, 4178, 4180, 4182, 4184, 4186, 4188, 4190, 4192, 4194, 4196, 4198, 4200, 4202, 4204, 4206, 4208, 4210, 4212, 4214, 4216, 4218, 4220, 4222, 4224, 4226, 4228, 4230, 4232, 4234, 4236, 4238, 4240, 4242, 4244, 4246, 4248, 4251, 4253, 4255, 4257, 4259, 4261, 4263, 4265, 4267, 4269, 4271, 4273, 4275, 4277, 4279, 4281, 4283, 4285, 4287, 4289, 4291, 4293, 4296, 4298, 4302, 4304, 4306, 4308, 4310, 4312, 4314, 4316, 4319, 4321, 4324, 4326, 4332, 4334, 4336, 4338, 4341, 4343, 4345, 4347, 4351, 4353, 4355, 4357, 4359, 4361, 4363, 4365, 4367, 4369, 4371, 4373, 4375, 4377, 4379, 4381, 4383, 4385, 4387, 4389, 4391, 4393, 4395, 4397, 4400, 4402, 4404, 4406, 4408, 4410, 4413, 4415, 4417, 4419, 4422, 4424, 4427, 4429, 4434, 4436, 4438, 4440, 4443, 4445, 4448, 4450, 4455, 4457, 4459, 4461, 4464, 4466, 4468, 4470, 4474, 4476, 4478, 4480, 4482, 4484, 4487, 4489, 4491, 4493, 4495, 4497, 4499, 4501, 4504, 4506, 4509, 4511, 4514, 4516, 4518, 4520, 4522, 4524, 4526, 4528, 4531, 4533, 4536, 4538, 4543, 4545, 4547, 4549, 4552, 4554, 4557, 4559, 4572, 4574, 4576, 4578, 4580, 4582, 4584, 4586, 4588, 4590, 4592, 4594, 4596, 4598, 4600, 4602, 4604, 4606, 4608, 4610, 4612, 4614, 4616, 4618, 4620, 4622, 4624, 4626, 4628, 4630, 4632, 4634, 4636, 4638, 4640, 4642, 4644, 4646, 4648, 4650, 4652, 4654, 4656, 4658, 4661, 4663, 4665, 4667, 4669, 4671, 4673, 4675, 4677, 4679, 4681, 4683, 4685, 4687, 4689, 4691, 4693, 4695, 4697, 4699, 4701, 4703, 4705, 4707, 4709, 4711, 4714, 4716, 4718, 4720, 4723, 4725, 4727, 4729, 4733, 4735, 4738, 4740, 4743, 4745, 4748, 4750, 4753, 4755, 4758, 4760, 4763, 4765, 4767, 4769, 4772, 4774, 4777, 4779, 4784, 4786, 4788, 4790, 4793, 4795, 4798, 4800, 4805, 4807, 4809, 4811, 4813, 4815, 4817, 4819, 4821, 4823, 4825, 4827, 4829, 4831, 4833, 4835, 4837, 4839, 4841, 4843, 4845, 4847, 4849, 4851, 4853, 4855, 4857, 4859, 4861, 4863, 4865, 4867, 4869, 4871, 4873, 4875, 4877, 4879, 4881, 4883, 4885, 4887, 4889, 4891, 4893, 4895, 4897, 4899, 4901, 4903, 4905, 4907, 4909, 4911, 4913, 4915, 4917, 4919, 4921, 4923, 4925, 4927, 4929, 4931, 4933, 4935, 4937, 4939, 4941, 4943, 4945, 4947, 4949, 4951, 4953, 4955, 4957, 4959, 4961, 4963, 4965, 4967, 4969, 4971, 4973, 4975, 4977, 4979, 4981, 4983, 4985, 4987, 4989, 4991, 4993, 4995, 4997, 4999, 5001, 5003, 5005, 5007, 5009, 5011, 5013, 5015, 5017, 5019, 5021, 5023, 5025, 5027, 5029, 5031, 5033, 5035, 5037, 5039, 5041, 5043, 5045, 5047, 5049, 5051, 5053, 5055, 5057, 5059, 5061, 5063, 5065, 5067, 5069, 5071, 5073, 5075, 5077, 5079, 5081, 5083, 5085, 5087, 5089, 5091, 5093, 5095, 5097, 5099, 5101, 5103, 5105, 5107, 5109, 5111, 5113, 5115, 5117, 5119, 5121, 5123, 5125, 5127, 5129, 5131, 5133, 5135, 5137, 5139, 5141, 5143, 5145, 5147, 5149, 5151, 5153, 5155, 5157, 5159, 5161, 5163, 5165, 5167, 5169, 5171, 5173, 5175, 5177, 5179, 5181, 5183, 5185, 5187, 5189, 5191, 5193, 5195, 5197, 5199, 5201, 5203, 5205, 5207, 5209, 5211, 5213, 5215, 5217, 5219, 5221, 5223, 5225, 5227, 5229, 5231, 5233, 5235, 5237, 5239, 5241, 5243, 5245, 5247, 5249, 5251, 5253, 5255, 5257, 5259, 5261, 5263, 5265, 5267, 5269, 5271, 5273, 5275, 5277, 5279, 5281, 5283, 5285, 5287, 5289, 5291, 5293, 5295, 5297, 5299, 5301, 5303, 5305, 5307, 5309, 5311, 5313, 5315, 5317, 5319, 5321, 5323, 5325, 5327, 5329, 5331, 5333, 5335, 5337, 5339, 5341, 5343, 5345, 5347, 5349, 5351, 5353, 5355, 5357, 5359, 5361, 5363, 5365, 5367, 5369, 5371, 5373, 5375, 5377, 5379, 5381, 5383, 5385, 5387, 5389, 5391, 5393, 5395, 5397, 5399, 5401, 5403, 5405, 5407, 5409, 5411, 5413, 5415, 5417, 5419, 5421, 5423, 5425, 5427, 5429, 5431, 5433, 5435, 5437, 5439, 5441, 5443, 5445, 5447, 5449, 5451, 5453, 5455, 5457, 5459, 5461, 5463, 5465, 5467, 5469, 5471, 5473, 5475, 5477, 5479, 5481, 5483, 5485, 5487, 5489, 5491, 5493, 5495, 5497, 5499, 5501, 5503, 5505, 5507, 5509, 5511, 5513, 5515, 5517, 5519, 5521, 5523, 5525, 5527, 5529, 5531, 5533, 5535, 5537, 5539, 5541, 5543, 5545, 5547, 5549, 5551, 5553, 5555, 5557, 5559, 5561, 5563, 5565, 5567, 5569, 5571, 5573, 5575, 5577, 5579, 5581, 5583, 5585, 5587, 5589, 5591, 5593, 5595, 5597, 5599, 5601, 5603, 5605, 5607, 5609, 5611, 5613, 5615, 5617, 5619, 5621, 5623, 5625, 5627, 5629, 5631, 5633, 5635, 5637, 5639, 5641, 5643, 5645, 5647, 5649, 5651, 5653, 5655, 5657, 5659, 5661, 5663, 5665, 5667, 5669, 5671, 5673, 5675, 5677, 5679, 5681, 5683, 5685, 5687, 5689, 5691, 5693, 5695, 5697, 5699, 5701, 5703, 5705, 5707, 5709, 5711, 5713, 5715, 5717, 5719, 5721, 5723, 5725, 5727, 5729, 5731, 5733, 5735, 5737, 5739, 5741, 5743, 5745, 5747, 5749, 5751, 5753, 5755, 5757, 5759, 5761, 5763, 5765, 5767, 5769, 5771, 5773, 5775, 5777, 5779, 5781, 5783, 5785, 5787, 5789, 5791, 5793, 5795, 5797, 5799, 5801, 5803, 5805, 5807, 5809, 5811, 5813, 5815, 5817, 5819, 5821, 5823, 5825, 5827, 5829, 5831, 5833, 5835, 5837, 5839, 5841, 5843, 5845, 5847, 5849, 5851, 5853, 5855, 5857, 5859, 5861, 5863, 5865, 5867, 5869, 5871, 5874, 5876, 5878, 5880, 5882, 5884, 5886, 5888, 5890, 5892, 5894, 5896, 5898, 5900, 5902, 5904, 5906, 5908, 5910, 5912, 5915, 5917, 5919, 5921, 5923, 5925, 5927, 5929, 5931, 5933, 5935, 5937, 5939, 5941, 5943, 5945, 5947, 5949, 5951, 5953, 5955, 5957, 5959, 5961, 5963, 5965, 5967, 5969, 5971, 5973, 5975, 5977, 5979, 5981, 5983, 5985, 5987, 5989, 5991, 5993, 5995, 5997, 5999, 6001, 6003, 6005, 6007, 6009, 6011, 6013, 6015, 6017, 6019, 6021, 6023, 6025, 6027, 6029, 6031, 6033, 6035, 6037, 6039, 6041, 6043, 6045, 6047, 6049, 6051, 6053, 6055, 6057, 6059, 6061, 6063, 6065, 6067, 6069, 6071, 6073, 6075, 6077, 6079, 6081, 6083, 6085, 6087, 6089, 6091, 6093, 6095, 6097, 6099, 6101, 6103, 6105, 6107, 6109, 6111, 6113, 6115, 6117, 6119, 6121, 6123, 6125, 6127, 6129, 6131, 6133, 6135, 6137, 6139, 6141, 6143, 6145, 6147, 6149, 6151, 6153, 6155, 6157, 6159, 6161, 6163, 6165, 6167, 6169, 6171, 6173, 6175, 6177, 6179, 6181, 6183, 6185, 6187, 6189, 6191, 6193, 6196, 6198, 6200, 6202, 6204, 6206, 6208, 6210, 6212, 6214, 6216, 6218, 6220, 6222, 6224, 6226, 6229, 6231, 6233, 6235, 6237, 6239, 6242, 6244, 6246, 6248, 6252, 6254, 6257, 6259, 6262, 6264, 6267, 6269, 6275, 6277, 6280, 6282, 6284, 6286, 6288, 6290, 6292, 6294, 6297, 6299, 6301, 6303, 6306, 6308, 6311, 6313, 6318, 6320, 6322, 6324, 6327, 6329, 6332, 6334, 6339, 6341, 6343, 6345, 6347, 6349, 6351, 6353, 6355, 6357, 6359, 6361, 6363, 6365, 6367, 6369, 6371, 6373, 6375, 6377, 6379, 6381, 6383, 6385, 6387, 6389, 6391, 6393, 6395, 6397, 6399, 6401, 6403, 6405, 6407, 6409, 6411, 6413, 6415, 6417, 6419, 6421, 6423, 6425, 6427, 6429, 6431, 6433, 6435, 6437, 6439, 6441, 6443, 6445, 6447, 6449, 6451, 6453, 6456, 6458, 6460, 6462, 6464, 6466, 6469, 6471, 6473, 6475, 6478, 6480, 6483, 6485, 6490, 6492, 6494, 6496, 6499, 6501, 6504, 6506, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 4566, 4566, 4569, 4569, 4566, 4566, 4564, 4564, 6527, 6529, 4562, 4562, 4802, 4802, 4791, 4791, 4562, 4562, 4249, 4562, 4562, 4564, 4564, 6630, 6632, 6634, 6636, 6638, 6640, 6642, 6644, 6646, 6648, 6650, 6652, 6654, 6656, 6665, 6667, 6669, 6671, 4569, 4569, 4249, 4249, 4562, 4562, 4550, 4550, 4562, 4562, 4566, 4566, 4566, 4566, 4566, 4566, 4564, 4564, 6699, 6701, 6703, 6705, 6707, 6709, 6711, 6713, 6715, 6717, 6719, 6721, 6723, 6725, 6727, 6729, 6731, 6733, 6735, 6737, 6739, 6741, 6751, 6753, 6755, 6757, 6759, 6761, 6775, 6777, 6779, 6781, 6783, 6785, 6787, 6789, 6793, 6795, 6797, 6799, 4562, 4562, 6813, 6815, 6817, 6819, 6821, 6823, 6825, 6827, 6829, 6831, 6833, 6835, 6837, 6839, 6227, 6227, 6227, 6227, 6856, 6858, 6860, 6862, 6864, 6866, 6868, 6870, 6872, 6874, 4562, 4562, 4562, 4562, 4566, 4566, 4564, 4564, 4566, 4566, 4566, 4566, 4249, 4249, 4249, 4249, 4249, 4249, 6939, 6941, 6943, 6945, 4329, 4329, 4566, 4566, 4562, 4562, 4566, 4566, 4562, 4562, 4550, 4550, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 6984, 6986, 6988, 6990, 6992, 6994, 6996, 6998, 7000, 7002, 7004, 7006, 7008, 7010, 7012, 7014, 7024, 7026, 7028, 7030, 7032, 7034, 7036, 7038, 7040, 7042, 7044, 7046, 7048, 7050, 7052, 7054, 7056, 7058, 7060, 7062, 7064, 7066, 7068, 7070, 7072, 7074, 6272, 6272, 7085, 7087, 7089, 7091, 7093, 7095, 7097, 7099, 7101, 7103, 7105, 7107, 7121, 7123, 7125, 7127, 7129, 7131, 7133, 7135, 7137, 7139, 7141, 7143, 7145, 7147, 7149, 7151, 7153, 7155, 7157, 7159, 7161, 7163, 7165, 7167, 6227, 6227, 6227, 6227, 6454, 6454, 7198, 7200, 7202, 7204, 7206, 7208, 7210, 7212, 7214, 7216, 7218, 7220, 7239, 7241, 7243, 7245, 7247, 7249, 7251, 7253, 7255, 7257, 7259, 7261, 7263, 7265, 7267, 7269, 7278, 7280, 7282, 7284, 4562, 4562, 7314, 7316, 7318, 7320, 7322, 7324, 7326, 7328, 7330, 7332, 7334, 7336, 7338, 7340, 4569, 4569, 4564, 4564, 4562, 4562, 4569, 4569, 4562, 4562, 4569, 4569, 4564, 4564, 7441, 7443, 7445, 7447, 7449, 7451, 7453, 7455, 7457, 7459, 7461, 7463, 7465, 7467, 7469, 7471, 4562, 4562, 4564, 4564, 4569, 4569, 4562, 4562, 4550, 4550, 4564, 4564, 4562, 4562, 4550, 4550, 4569, 4569, 7573, 7575, 7577, 7579, 7581, 7583, 7585, 7587, 7589, 7591, 7593, 7595, 7597, 7599, 7601, 7603, 7605, 7607, 7609, 7611, 7613, 7615, 7617, 7619, 7621, 7623, 7625, 7627, 7629, 7631, 7633, 7635, 7653, 7655, 7657, 7659, 7661, 7663, 7665, 7667, 7669, 7671, 7673, 7675, 7677, 7679, 7681, 7683, 7685, 7687, 6272, 6272, 6272, 6272, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 2012, 2012, 2012, 2012, 2041, 2041, 2041, 2041, 7838, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7891, 7893, 7896, 7898, 7900, 7902, 4329, 4329, 4550, 4550, 4566, 4550, 4550, 4562, 4562, 4566, 4569, 4569, 4550, 4550, 4249, 4249, 4329, 4329, 4562, 4562, 4249, 4249, 4564, 4564, 4249, 4249, 4569, 4569, 2270, 2279, 8017, 8019, 8021, 8023, 4329, 4329, 4550, 4550, 4562, 4562, 4550, 4550, 4562, 4562, 8101, 8103, 8105, 8107, 8109, 8111, 8113, 8115, 4329, 4329, 4550, 4550, 4562, 4562, 4329, 4329, 4562, 4562, 4550, 4550, 8252, 8254, 8256, 8258, 8260, 8262, 8264, 8266, 8268, 8270, 8272, 8274, 8276, 8278, 8280, 8282, 4564, 4564, 4562, 4562, 8345, 8347, 8349, 8351, 8353, 8355, 8357, 8359, 4562, 4562, 4562, 4562, 4564, 4564, 4569, 4569, 4802, 4791, 4721, 4730, 4802, 4802, 4791, 4791, 8509, 8511, 8513, 8515, 8517, 8519, 8521, 8523, 8525, 8527, 8529, 8531, 8533, 8535, 4329, 4329, 4562, 4562, 4249, 4249, 4329, 4329, 4550, 4550, 4562, 4562, 4249, 4249, 4569, 4569, 4249, 4249, 4564, 4564, 4329, 4329, 4300, 4300, 4317, 4317, 4329, 4329, 4348, 4348, 4420, 4431, 4452, 4441, 4420, 4431, 4441, 4452, 4462, 4471, 4502, 4502, 4540, 4540, 4550, 4550, 4562, 4562, 4566, 4566, 4564, 4566, 4566, 4564, 4566, 4566, 4569, 4569, 4770, 4781, 4721, 4730, 4770, 4781, 4791, 4802, 8811, 8813, 8815, 8817, 8819, 8821, 8823, 8825, 8828, 8830, 8832, 8834, 8837, 8839, 8842, 8844, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 8880, 8882, 6454, 6454, 8890, 8892, 8894, 8896, 8898, 8900, 8902, 8904, 8906, 8908, 8910, 8912, 8914, 8916, 6454, 6454, 8934, 8936, 8938, 8940, 8942, 8944, 8946, 8948, 8950, 8952, 8954, 8956, 8958, 8960, 8966, 8968, 8970, 8972, 8974, 8976, 8978, 8980, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 9046, 9048, 9050, 9052, 9054, 9056, 9058, 9060, 9062, 9064, 9066, 9068, 9070, 9072, 9074, 9076, 9078, 9080, 9082, 9084, 6227, 6227, 6227, 6227, 6272, 6272, 6272, 6272, 9120, 9122, 9124, 9126, 9128, 9130, 9132, 9134, 9136, 9138, 9140, 9142, 9144, 9146, 9148, 9150, 9152, 9154, 6272, 6272, 6272, 6272, 6272, 6272, 6272, 6272, 6227, 6227, 6227, 6227, 6454, 6454, 9265, 9267, 9269, 9271, 9273, 9275, 9277, 9279, 9281, 9283, 9286, 9288, 9290, 9292, 5872, 5872, 5913, 5913, 6476, 6454, 6454, 9407, 9409, 9411, 9413, 9415, 9417, 9419, 9421, 9423, 9425, 9427, 9429, 9432, 9434, 9436, 9438, 9442, 9444, 9446, 9448, 6240, 6249, 6336, 6325, 6227, 6227, 6227, 6227, 6240, 6249, 6272, 6272, 6272, 6272, 6304, 6315, 6304, 6315, 6325, 6336, 6454, 6454, 9552, 9554, 6487, 6476, 6476, 6454, 6454, 6476, 6487, 6508, 6508, 9590, 9592, 9594, 9596, 9599, 9601, 9604, 9606, 9613, 9615, 9618, 9620, 9623, 9625, 9634, 9636, 9638, 9640, 9643, 9645, 9648, 9650, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8848, 8848, 8851, 8851, 8851, 8851, 8851, 8851, 8848, 8848, 9440, 9440, 9652, 9652, 9284, 9284, 9440, 9440, 9652, 9652, 6791, 6791, 9652, 9652, 9585, 9585, 9550, 9550, 9550, 9550, 9284, 9284, 9629, 9629, 9550, 9550, 9585, 9585, 9284, 9284, 9440, 9440, 9585, 9585, 9585, 9585, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9439, 9629, 9629, 9629, 9629, 6790, 6790, 9652, 9652, 9629, 9629, 9629, 9629, 6791, 6791, 9652, 9652, 9284, 9284, 9610, 9440, 9440, 8536, 8536, 8536, 8536, 8853, 8853, 8848, 8848, 9439, 9439, 7894, 7894, 9439, 9439, 9610, 9610, 9652, 9652, 9585, 9585, 9550, 9550, 9585, 9585, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9585, 9585, 9629, 9629, 9550, 9550, 9585, 9585, 9585, 9585, 9585, 9585, 9585, 9585, 9610, 9610, 9550, 9550, 9550, 9550, 9439, 9439, 9610, 9610, 9652, 9652, 9439, 9439, 9610, 9610, 7894, 7894, 9585, 9585, 9610, 9610, 9550, 9550, 9585, 9585, 9439, 9439, 7894, 7894, 8848, 8848, 8851, 8536, 8536, 8853, 8853, 8851, 8851, 8851, 8848, 8848, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 7894, 7894, 9550, 9550, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9439, 9439, 7894, 7894, 7894, 7894, 7894, 7894, 9652, 9652, 9550, 9550, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9587, 9585, 9585, 9583, 9439, 9439, 9610, 9610, 7894, 7894, 7894, 7894, 7894, 7894, 7894, 7894, 8851, 8851, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8536, 8848, 8848, 8536, 8536, 8848, 8536, 8536, 8848, 8536, 8536, 8846, 8835, 8835, 8846, 8851, 8851, 8848, 8848, 8851, 8851, 8853, 8851, 8851, 8853, 9550, 9550, 9585, 9585, 9284, 9284, 9440, 9440, 9550, 9550, 9585, 9585, 9284, 9284, 9284, 9284, 9629, 9629, 9629, 9629, 9629, 9629, 9629, 9629, 9284, 9284, 9440, 9440, 9629, 9629, 9449, 9430, 9652, 9652, 9550, 9550, 9550, 9550, 9585, 9585, 9585, 9585, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9284, 9284, 9440, 9440, 9629, 9629, 9629, 9629, 9652, 9652, 9550, 9550, 9550, 9550, 9585, 9585, 9440, 9440, 9430, 9439, 9440, 9440, 9629, 9629, 9631, 9629, 9629, 9629, 9629, 9627, 9629, 9629, 9449, 9550, 9550, 9585, 9585, 9583, 9585, 9585, 9587, 9608, 9608, 9610, 9629, 9629, 9629, 9629, 9627, 9629, 9629, 9631, 9652, 9652, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14625, 14627, 14629, 14631, 14633, 14635, 14637, 14639, 14641, 14643, 14645, 14647, 14649, 14651, 14653, 14655, 14657, 14659, 14661, 14663, 14665, 14667, 14669, 14671, 14673, 14675, 14677, 14679, 14681, 14683, 14685, 14687, 14689, 14691, 14693, 14695, 14697, 14699, 14701, 14703, 14705, 14707, 14709, 14711, 14713, 14715, 14717, 14719, 14721, 14723, 14725, 14727, 14729, 14731, 14733, 14735, 14737, 14739, 14741, 14743, 14745, 14747, 14749, 14751, 14753, 14755, 14757, 14759, 14761, 14763, 14765, 14767, 14769, 14771, 14773, 14775, 14777, 14779, 14781, 14783, 14785, 14787, 14789, 14791, 14793, 14795, 14797, 14799, 14801, 14803, 14805, 14807, 14809, 14811, 14813, 14815, 14817, 14819, 14821, 14823, 14825, 14827, 14829, 14831, 14833, 14835, 14837, 14839, 14841, 14843, 14845, 14847, 14849, 14851, 14853, 14855, 14857, 14859, 14861, 14863, 14865, 14867, 14869, 14871, 14873, 14875, 14877, 14879, 14881, 14883, 14885, 14887, 14889, 14891, 14893, 14895, 14897, 14899, 14901, 14903, 14905, 14907, 14909, 14911, 14913, 14915, 14917, 14919, 14921, 14923, 14925, 14927, 14929, 14931, 14933, 14935, 14937, 14939, 14941, 14943, 14945, 14947, 14949, 14951, 14953, 14955, 14957, 14959, 14961, 14963, 14965, 14967, 14969, 14971, 14973, 14975, 14977, 14979, 14981, 14983, 14985, 14987, 14989, 14991, 14993, 14995, 14997, 14999, 15001, 15003, 15005, 15007, 15009, 15011, 15013, 15015, 15017, 15019, 15021, 15023, 15025, 15027, 15029, 15031, 15033, 15035, 15037, 15039, 15041, 15043, 15045, 15047, 15049, 15051, 15053, 15055, 15057, 15059, 15061, 15063, 15065, 15067, 15069, 15071, 15073, 15075, 15077, 15079, 15081, 15083, 15085, 15087, 15089, 15091, 15093, 15095, 15097, 15099, 15101, 15103, 15105, 15107, 15109, 15111, 15113, 15115, 15117, 15119, 15121, 15123, 15125, 15127, 15129, 15131, 15133, 15135, 15137, 15139, 15141, 15143, 15145, 15147, 15149, 15151, 15153, 15155, 15157, 15159, 15161, 15163, 15165, 15167, 15169, 15171, 15173, 15175, 15177, 15179, 15181, 15183, 15185, 15187, 15189, 15191, 15193, 15195, 15197, 15199, 15201, 15203, 15205, 15207, 15209, 15211, 15213, 15215, 15217, 15219, 15221, 15223, 15225, 15227, 15229, 15231, 15233, 15235, 15237, 15239, 15241, 15243, 15245, 15247, 15249, 15251, 15253, 15255, 15257, 15259, 15261, 15263, 15265, 15267, 15269, 15271, 15273, 15275, 15277, 15279, 15281, 15283, 15285, 15287, 15289, 15291, 15293, 15295, 15297, 15299, 15301, 15303, 15305, 15307, 15309, 15311, 15313, 15315, 15317, 15319, 15321, 15323, 15325, 15327, 15329, 15331, 15333, 15335, 15337, 15339, 15341, 15343, 15345, 15347, 15349, 15351, 15353, 15355, 15357, 15359, 15361, 15363, 15365, 15367, 15369, 15371, 15373, 15375, 15377, 15379, 15381, 15383, 15385, 15387, 15389, 15391, 15393, 15395, 15397, 15399, 15401, 15403, 15405, 15407, 15409, 15411, 15413, 15415, 15417, 15419, 15421, 15423, 15425, 15427, 15429, 15431, 15433, 15435, 15437, 15439, 15441, 15443, 15445, 15447, 15449, 15451, 15453, 15455, 15457, 15459, 15461, 15463, 15465, 15467, 15469, 15471, 15473, 15475, 15477, 15479, 15481, 15483, 15485, 15487, 15489, 15491, 15493, 15495, 15497, 15499, 15501, 15503, 15505, 15507, 15509, 15511, 15513, 15515, 15517, 15519, 15521, 15523, 15525, 15527, 15529, 15531, 15533, 15535, 15537, 15539, 15541, 15543, 15545, 15547, 15549, 15551, 15553, 15555, 15557, 15559, 15561, 15563, 15565, 15567, 15569, 15571, 15573, 15575, 15577, 15579, 15581, 15583, 15585, 15587, 15589, 15591, 15593, 15595, 15597, 15599, 15601, 15603, 15605, 15607, 15609, 15611, 15613, 15615, 15617, 15619, 15621, 15623, 15625, 15627, 15629, 15631, 15633, 15635, 15637, 15639, 15641, 15643, 15645, 15647, 15649, 15651, 15653, 15655, 15657, 15659, 15661, 15663, 15665, 15667, 15669, 15671, 15673, 15675, 15677, 15679, 15681, 15683, 15685, 15687, 15689, 15691, 15693, 15695, 15697, 15699, 15701, 15703, 15705, 15707, 15709, 15711, 15713, 15715, 15717, 15719, 15721, 15723, 15725, 15727, 15729, 15731, 15733, 15735, 15737, 15739, 15741, 15743, 15745, 15747, 15749, 15751, 15753, 15755, 15757, 15759, 15761, 15763, 15765, 15767, 15769, 15771, 15773, 15775, 15777, 15779, 15781, 15783, 15785, 15787, 15789, 15791, 15793, 15795, 15797, 15799, 15801, 15803, 15805, 15807, 15809, 15811, 15813, 15815, 15817, 15819, 15821, 15823, 15825, 15827, 15829, 15831, 15833, 15835, 15837, 15839, 15841, 15843, 15845, 15847, 15849, 15851, 15853, 15855, 15857, 15859, 15861, 15863, 15865, 15867, 15869, 15871, 15873, 15875, 15877, 15879, 15881, 15883, 15885, 15887, 15889, 15891, 15893, 15895, 15897, 15899, 15901, 15903, 15905, 15907, 15909, 15911, 15913, 15915, 15917, 15919, 15921, 15923, 15925, 15927, 15929, 15931, 15933, 15935, 15937, 15939, 15941, 15943, 15945, 15947, 15949, 15951, 15953, 15955, 15957, 15959, 15961, 15963, 15965, 15967, 15969, 15971, 15973, 15975, 15977, 15979, 15981, 15983, 15985, 15987, 15989, 15991, 15993, 15995, 15997, 15999, 16001, 16003, 16005, 16007, 16009, 16011, 16013, 16015, 16017, 16019, 16021, 16023, 16025, 16027, 16029, 16031, 16033, 16035, 16037, 16039, 16041, 16043, 16045, 16047, 16049, 16051, 16053, 16055, 16057, 16059, 16061, 16063, 16065, 16067, 16069, 16071, 16073, 16075, 16077, 16079, 16081, 16083, 16085, 16087, 16089, 16091, 16093, 16095, 16097, 16099, 16101, 16103, 16105, 16107, 16109, 16111, 16113, 16115, 16117, 16119, 16121, 16123, 16125, 16127, 16129, 16131, 16133, 16135, 16137, 16139, 16141, 16143, 16145, 16147, 16149, 16151, 16153, 16155, 16157, 16159, 16161, 16163, 16165, 16167, 16169, 16171, 16173, 16175, 16177, 16179, 16181, 16183, 16185, 16187, 16189, 16191, 16193, 16195, 16197, 16199, 16201, 16203, 16205, 16207, 16209, 16211, 16213, 16215, 16217, 16219, 16221, 16223, 16225, 16227, 16229, 16231, 16233, 16235, 16237, 16239, 16241, 16243, 16245, 16247, 16249, 16251, 16253, 16255, 16257, 16259, 16261, 16263, 16265, 16267, 16269, 16271, 16273, 16275, 16277, 16279, 16281, 16283, 16285, 16287, 16289, 16291, 16293, 16295, 16297, 16299, 16301, 16303, 16305, 16307, 16309, 16311, 16313, 16315, 16317, 16319, 16321, 16323, 16325, 16327, 16329, 16331, 16333, 16335, 16337, 16339, 16341, 16343, 16345, 16347, 16349, 16351, 16353, 16355, 16357, 16359, 16361, 16363, 16365, 16367, 16369, 16371, 16373, 16375, 16377, 16379, 16381, 16383, 16385, 16387, 16389, 16391, 16393, 16395, 16397, 16399, 16401, 16403, 16405, 16407, 16409, 16411, 16413, 16415, 16417, 16419, 16421, 16423, 16425, 16427, 16429, 16431, 16433, 16435, 16437, 16439, 16441, 16443, 16445, 16447, 16449, 16451, 16453, 16455, 16457, 16459, 16461, 16463, 16465, 16467, 16469, 16471, 16473, 16475, 16477, 16479, 16481, 16483, 16485, 16487, 16489, 16491, 16493, 16495, 16497, 16499, 16501, 16503, 16505, 16507, 16509, 16511, 16513, 16515, 16517, 16519, 16521, 16523, 16525, 16527, 16529, 16531, 16533, 16535, 16537, 16539, 16541, 16543, 16545, 16547, 16549, 16551, 16553, 16555, 16557, 16559, 16561, 16563, 16565, 16567, 16569, 16571, 16573, 16575, 16577, 16579, 16581, 16583, 16585, 16587, 16589, 16591, 16593, 16595, 16597, 16599, 16601, 16603, 16605, 16607, 16609, 16611, 16613, 16615, 16617, 16619, 16621, 16623, 16625, 16627, 16629, 16631, 16633, 16635, 16637, 16639, 16641, 16643, 16645, 16647, 16649, 16651, 16653, 16655, 16657, 16659, 16661, 16663, 16665, 16667, 16669, 16671, 16673, 16675, 16677, 16679, 16681, 16683, 16685, 16687, 16689, 16691, 16693, 16695, 16697, 16699, 16701, 16703, 16705, 16707, 16709, 16711, 16713, 16715, 16717, 16719, 16721, 16723, 16725, 16727, 16729, 16731, 16733, 16735, 16737, 16739, 16741, 16743, 16745, 16747, 16749, 16751, 16753, 16755, 16757, 16759, 16761, 16763, 16765, 16767, 16769, 16771, 16773, 16775, 16777, 16779, 16781, 16783, 16785, 16787, 16789, 16791, 16793, 16795, 16797, 16799, 16801, 16803, 16805, 16807, 16809, 16811, 16813, 16815, 16817, 16819, 16821, 16823, 16825, 16827, 16829, 16831, 16833, 16835, 16837, 16839, 16841, 16843, 16845, 16847, 16849, 16851, 16853, 16855, 16857, 16859, 16861, 16863, 16865, 16867, 16869, 16871, 16873, 16875, 16877, 16879, 16881, 16883, 16885, 16887, 16889, 16891, 16893, 16895, 16897, 16899, 16901, 16903, 16905, 16907, 16909, 16911, 16913, 16915, 16917, 16919, 16921, 16923, 16925, 16927, 16929, 16931, 16933, 16935, 16937, 16939, 16941, 16943, 16945, 16947, 16949, 16951, 16953, 16955, 16957, 16959, 16961, 16963, 16965, 16967, 16969, 16971, 16973, 16975, 16977, 16979, 16981, 16983, 16985, 16987, 16989, 16991, 16993, 16995, 16997, 16999, 17001, 17003, 17005, 17007, 17009, 17011, 17013, 17015, 17017, 17019, 17021, 17023, 17025, 17027, 17029, 17031, 17033, 17035, 17037, 17039, 17041, 17043, 17045, 17047, 17049, 17051, 17053, 17055, 17057, 17059, 17061, 17063, 17065, 17067, 17069, 17071, 17073, 17075, 17077, 17079, 17081, 17083, 17085, 17087, 17089, 17091, 17093, 17095, 17097, 17099, 17101, 17103, 17105, 17107, 17109, 17111, 17113, 17115, 17117, 17119, 17121, 17123, 17125, 17127, 17129, 17131, 17133, 17135, 17137, 17139, 17141, 17143, 17145, 17147, 17149, 17151, 17153, 17155, 17157, 17159, 17161, 17163, 17165, 17167, 17169, 17171, 17173, 17175, 17177, 17179, 17181, 17183, 17185, 17187, 17189, 17191, 17193, 17195, 17197, 17199, 17201, 17203, 17205, 17207, 17209, 17211, 17213, 17215, 17217, 17219, 17221, 17223, 17225, 17227, 17229, 17231, 17233, 17235, 17237, 17239, 17241, 17243, 17245, 17247, 17249, 17251, 17253, 17255, 17257, 17259, 17261, 17263, 17265, 17267, 17269, 17271, 17273, 17275, 17277, 17279, 17281, 17283, 17285, 17287, 17289, 17291, 17293, 17295, 17297, 17299, 17301, 17303, 17305, 17307, 17309, 17311, 17313, 17315, 17317, 17319, 17321, 17323, 17325, 17327, 17329, 17331, 17333, 17335, 17337, 17339, 17341, 17343, 17345, 17347, 17349, 17351, 17353, 17355, 17357, 17359, 17361, 17363, 17365, 17367, 17369, 17371, 17373, 17375, 17377, 17379, 17381, 17383, 17385, 17387, 17389, 17391, 17393, 17395, 17397, 17399, 17401, 17403, 17405, 17407, 17409, 17411, 17413, 17415, 17417, 17419, 17421, 17423, 17425, 17427, 17429, 17431, 17433, 17435, 17437, 17439, 17441, 17443, 17445, 17447, 17449, 17451, 17453, 17455, 17457, 17459, 17461, 17463, 17465, 17467, 17469, 17471, 17473, 17475, 17477, 17479, 17481, 17483, 17485, 17487, 17489, 17491, 17493, 17495, 17497, 17499, 17501, 17503, 17505, 17507, 17509, 17511, 17513, 17515, 17517, 17519, 17521, 17523, 17525, 17527, 17529, 17531, 17533, 17535, 17537, 17539, 17541, 17543, 17545, 17547, 17549, 17551, 17553, 17555, 17557, 17559, 17561, 17563, 17565, 17567, 17569, 17571, 17573, 17575, 17577, 17579, 17581, 17583, 17585, 17587, 17589, 17591, 17593, 17595, 17597, 17599, 17601, 17603, 17605, 17607, 17609, 17611, 17613, 17615, 17617, 17619, 17621, 17623, 17625, 17627, 17629, 17631, 17633, 17635, 17637, 17639, 17641, 17643, 17645, 17647, 17649, 17651, 17653, 17655, 17657, 17659, 17661, 17663, 17665, 17667, 17669, 17671, 17673, 17675, 17677, 17679, 17681, 17683, 17685, 17687, 17689, 17691, 17693, 17695, 17697, 17699, 17701, 17703, 17705, 17707, 17709, 17711, 17713, 17715, 17717, 17719, 17721, 17723, 17725, 17727, 17729, 17731, 17733, 17735, 17737, 17739, 17741, 17743, 17745, 17747, 17749, 17751, 17753, 17755, 17757, 17759, 17761, 17763, 17765, 17767, 17769, 17771, 17773, 17775, 17777, 17779, 17781, 17783, 17785, 17787, 17789, 17791, 17793, 17795, 17797, 17799, 17801, 17803, 17805, 17807, 17809, 17811, 17813, 17815, 17817, 17819, 17821, 6510, 6511, 6512, 6513, 6514, 6515, 6516, 6517, 6518, 6519, 6520, 6521, 6522, 6523, 6524, 6525, 17839, 6538, 6549, 6575, 6576, 6579, 6580, 6599, 6600, 6601, 6612, 6613, 6617, 6618, 17854, 17856, 17858, 17860, 17862, 17864, 17866, 17868, 17870, 6676, 6677, 6678, 6679, 6682, 6683, 6684, 6685, 6686, 6687, 6690, 6691, 6692, 6693, 6694, 6695, 6696, 6697, 17890, 17892, 17894, 17896, 17898, 17900, 17902, 17904, 17906, 17908, 17910, 17912, 17914, 17916, 17918, 17920, 17922, 17924, 17926, 17928, 6808, 6809, 17932, 17934, 17936, 17938, 17940, 17942, 17944, 6842, 6843, 6844, 6845, 17950, 17952, 17954, 17956, 17958, 6881, 6882, 6894, 6895, 6896, 6897, 6898, 6899, 6900, 6901, 6902, 6903, 6920, 6921, 6922, 6923, 6924, 6925, 17978, 17980, 6946, 6947, 6959, 6960, 6961, 6962, 6963, 6964, 6971, 6972, 6973, 6974, 6975, 6976, 6977, 6978, 6979, 6980, 6981, 6982, 18002, 18004, 18006, 18008, 18010, 18012, 18014, 18016, 18018, 18020, 18022, 18024, 18026, 18028, 18030, 18032, 18034, 18036, 18038, 18040, 18042, 7077, 7078, 18046, 18048, 18050, 18052, 18054, 18056, 18058, 18060, 18062, 18064, 18066, 18068, 18070, 18072, 18074, 18076, 18078, 18080, 7183, 7184, 7186, 7187, 7195, 7196, 18088, 18090, 18092, 18094, 18096, 18098, 18100, 18102, 18104, 18106, 18108, 18110, 18112, 18114, 18116, 18118, 7296, 7297, 18122, 18124, 18126, 18128, 18130, 18132, 18134, 7352, 7353, 7356, 7357, 7390, 7391, 7396, 7397, 7404, 7405, 7408, 7409, 7412, 7413, 18150, 18152, 18154, 18156, 18158, 18160, 18162, 18164, 7501, 7502, 7505, 7506, 7509, 7510, 7531, 7532, 7535, 7536, 7539, 7540, 7543, 7544, 7547, 7548, 7551, 7552, 18184, 18186, 18188, 18190, 18192, 18194, 18196, 18198, 18200, 18202, 18204, 18206, 18208, 18210, 18212, 18214, 18216, 18218, 18220, 18222, 18224, 18226, 18228, 18230, 18232, 7741, 7742, 7744, 7745, 18238, 18240, 18242, 18244, 18246, 18248, 18250, 18252, 18254, 18256, 18258, 18260, 18262, 7810, 7811, 7812, 7813, 7821, 7822, 7823, 7824, 18272, 18274, 18276, 18278, 18280, 18282, 18284, 18286, 18288, 18290, 18292, 18294, 18296, 18298, 18300, 18302, 7903, 7904, 7905, 7906, 7907, 7915, 7916, 7917, 7918, 7919, 7920, 7921, 7927, 7928, 7929, 7930, 7935, 7936, 7940, 7941, 7942, 7943, 7944, 7945, 7946, 7947, 7948, 7949, 8005, 8008, 18334, 18336, 8026, 8027, 8030, 8031, 8055, 8056, 8059, 8060, 8063, 8064, 18348, 18350, 18352, 18354, 8122, 8123, 8151, 8152, 8155, 8156, 8164, 8165, 8199, 8200, 8203, 8204, 18368, 18370, 18372, 18374, 18376, 18378, 18380, 18382, 8297, 8298, 8320, 8321, 18388, 18390, 18392, 18394, 8386, 8387, 8453, 8454, 8456, 8457, 8459, 8461, 8478, 8481, 8486, 8488, 8502, 8503, 8506, 8507, 18412, 18414, 18416, 18418, 18420, 18422, 18424, 8547, 8548, 8576, 8577, 8578, 8579, 8594, 8595, 8635, 8638, 8641, 8642, 8643, 8644, 8645, 8646, 8647, 8648, 8649, 8650, 8653, 8659, 8662, 8665, 8668, 8671, 8674, 8675, 8677, 8679, 8684, 8689, 8692, 8695, 8701, 8704, 8707, 8710, 8713, 8716, 8722, 8725, 8730, 8733, 8736, 8737, 8740, 8741, 8742, 8743, 8744, 8745, 8746, 8747, 8748, 8749, 8750, 8751, 8771, 8774, 8789, 8792, 8800, 8803, 8806, 8809, 18492, 18494, 18496, 18498, 18500, 18502, 18504, 18506, 8859, 8860, 8862, 8863, 8865, 8866, 8868, 8869, 18516, 8887, 8888, 18520, 18522, 18524, 18526, 18528, 18530, 18532, 8931, 8932, 18536, 18538, 18540, 18542, 18544, 18546, 18548, 18550, 18552, 18554, 18556, 8998, 8999, 9000, 9001, 9008, 9009, 9010, 9011, 18566, 18568, 18570, 18572, 18574, 18576, 18578, 18580, 18582, 18584, 9089, 9090, 9092, 9093, 9095, 9096, 9097, 9098, 18594, 18596, 18598, 18600, 18602, 18604, 18606, 18608, 18610, 9198, 9199, 9200, 9201, 9209, 9210, 9211, 9212, 9220, 9221, 9223, 9224, 9240, 9241, 18626, 18628, 18630, 18632, 18634, 18636, 18638, 9343, 9346, 9355, 9358, 9373, 9390, 9391, 18647, 18649, 18651, 18653, 18655, 18657, 18659, 18661, 18663, 18665, 9452, 9455, 9476, 9479, 9487, 9488, 9490, 9491, 9495, 9498, 9502, 9503, 9505, 9506, 9510, 9513, 9516, 9519, 9522, 9525, 9535, 9538, 18689, 9559, 9562, 9563, 9566, 9567, 9573, 9576, 9579, 9582, 18700, 18702, 18704, 18706, 18708, 18710, 18712, 18714, 18716, 18718, 18720, 9892, 9893, 9894, 9895, 10061, 10062, 10063, 10064, 10077, 10078, 10079, 10080, 10081, 10082, 10083, 10084, 10162, 10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10180, 10181, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10200, 10201, 10202, 10203, 10206, 10207, 10208, 10209, 10214, 10215, 10216, 10217, 10221, 10222, 10223, 10224, 10231, 10232, 10233, 10234, 10239, 10240, 10241, 10242, 10243, 10244, 10245, 10246, 10249, 10250, 10255, 10258, 10259, 10260, 10261, 10262, 10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10276, 10277, 10278, 10279, 10280, 10281, 10282, 10283, 10284, 10285, 10286, 10291, 10292, 10303, 10304, 10306, 10307, 10308, 10309, 10311, 10312, 10317, 10318, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10377, 10378, 10389, 10390, 10391, 10392, 10398, 10399, 10400, 10401, 10641, 10642, 10657, 10658, 10659, 10660, 10663, 10664, 10668, 10669, 10671, 10672, 10686, 10687, 10689, 10690, 10692, 10693, 10694, 10695, 10696, 10697, 10713, 10714, 10717, 10718, 10723, 10724, 10726, 10727, 10747, 10748, 10755, 10782, 10783, 10784, 10785, 10798, 10884, 10885, 10886, 10887, 10972, 10973, 10974, 10975, 10984, 10985, 10986, 10987, 10996, 10997, 10998, 10999, 11000, 11001, 11002, 11003, 11011, 11012, 11048, 11049, 11051, 11052, 11053, 11054, 11056, 11057, 11058, 11059, 11067, 11068, 11072, 11073, 11075, 11076, 11077, 11078, 11081, 11082, 11098, 11099, 11100, 11101, 11102, 11103, 11104, 11105, 11106, 11107, 11108, 11109, 11110, 11111, 11119, 11120, 11127, 11128, 11130, 11131, 11132, 11133, 11134, 11135, 11136, 11137, 11306, 11307, 11436, 11437, 11541, 11542, 11543, 11544, 11545, 11546, 11547, 11548, 11661, 11662, 11663, 11799, 11800, 11801, 11802, 11803, 11959, 11962, 11965, 11968, 11969, 11970, 11971, 11972, 11973, 11974, 11975, 11976, 11977, 11978, 12004, 12005, 12011, 12012, 12018, 12019, 12020, 12021, 12031, 12032, 12033, 12034, 12036, 12037, 12040, 12041, 12042, 12043, 12044, 12045, 12046, 12047, 12056, 12057, 12094, 12095, 12096, 12097, 12102, 12103, 12107, 12128, 12136, 12137, 12185, 12186, 12187, 12188, 12198, 12199, 12200, 12201, 12206, 12207, 12208, 12209, 12210, 12211, 12212, 12213, 12216, 12217, 12222, 12223, 12224, 12225, 12226, 12227, 12228, 12229, 12232, 12233, 12276, 12277, 12278, 12279, 12287, 12288, 12293, 12294, 12297, 12300, 12301, 12302, 12303, 12304, 12305, 12306, 12307, 12308, 12309, 12310, 12311, 12312, 12315, 12354, 12355, 12366, 12367, 12368, 12369, 12370, 12371, 12374, 12377, 12378, 12381, 12382, 12384, 12385, 12386, 12387, 12388, 12389, 12392, 12395, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 20736, 20738, 20740, 20742, 20744, 20746, 20748, 20750, 19137, 19136, 19139, 19138, 19296, 19396, 19141, 19140, 19143, 19142, 19145, 19144, 19310, 19803, 19391, 19811, 19147, 19146, 19149, 19148, 19151, 19150, 19153, 19152, 19309, 19802, 19154, 19390, 19810, 19156, 19155, 19157, 19397, 19159, 19158, 19161, 19160, 19163, 19162, 19165, 19164, 19167, 19166, 20755, 19169, 19168, 20757, 19171, 19170, 19173, 19172, 19175, 19174, 19177, 19176, 19179, 19178, 19181, 19180, 19183, 19182, 19185, 19184, 19187, 19186, 20759, 19189, 19188, 19190, 19192, 19191, 19194, 19193, 19195, 19197, 19196, 20762, 20058, 20059, 19922, 20764, 19198, 19199, 19200, 19201, 19203, 19202, 19204, 19206, 19205, 19207, 19209, 19208, 19210, 19212, 19211, 19213, 19215, 19217, 19216, 19219, 19218, 20775, 20777, 19221, 19220, 20779, 20781, 20783, 19223, 19222, 20785, 20787, 20789, 20791, 19225, 19224, 19227, 19226, 19229, 19228, 19231, 19230, 19233, 19232, 19235, 19234, 19237, 19236, 19239, 19238, 19241, 19240, 19243, 19242, 19245, 19244, 19247, 19246, 19249, 19248, 19251, 19250, 20813, 19253, 19252, 19255, 19254, 20822, 20824, 19257, 19256, 19259, 19258, 19261, 19260, 19263, 19262, 19264, 19266, 19265, 19268, 19267, 19270, 19269, 20831, 19272, 19271, 19274, 19273, 19276, 19275, 19278, 19277, 19279, 19281, 19280, 20833, 20835, 20837, 20839, 20841, 19283, 19282, 19285, 19284, 19287, 19286, 19289, 19288, 19291, 19290, 19293, 19292, 19295, 19294, 19297, 19296, 20843, 20845, 20847, 19683, 19682, 19684, 19686, 19679, 19687, 19689, 19688, 19690, 19298, 19692, 19693, 20851, 19299, 19302, 19301, 19304, 19303, 19306, 19305, 19308, 19307, 19310, 19309, 20853, 20855, 20857, 19312, 19311, 19314, 19313, 19316, 19315, 20859, 20861, 20863, 20865, 20867, 20869, 19318, 19317, 19320, 19319, 19322, 19321, 19324, 19323, 19326, 19325, 20892, 19327, 19329, 19328, 19331, 19330, 19333, 19332, 19335, 19334, 19337, 19336, 19339, 19338, 19341, 19340, 19343, 19342, 19345, 19344, 19347, 19346, 19349, 19348, 19351, 19350, 19609, 19608, 19611, 19610, 19613, 19604, 19614, 20912, 19352, 20914, 19353, 19355, 19354, 19357, 19356, 19359, 19358, 20916, 19360, 19362, 19364, 19363, 19365, 19367, 19366, 19369, 19368, 19371, 19370, 19372, 19374, 19373, 19375, 19376, 19378, 19380, 19379, 19382, 19381, 19383, 19386, 19385, 19388, 19387, 19389, 19391, 19390, 19393, 19392, 19395, 19394, 19397, 19396, 20934, 19398, 19399, 19400, 19401, 19403, 19402, 19405, 19404, 19407, 19406, 19409, 19408, 19411, 19410, 19412, 19414, 19413, 19415, 19418, 19417, 19420, 19419, 19422, 19421, 19424, 19423, 20943, 19426, 19425, 20945, 19428, 19427, 19429, 19430, 19432, 19434, 19433, 19436, 19435, 19438, 19437, 19439, 19441, 19440, 19442, 19444, 19443, 19445, 19448, 19447, 19450, 19449, 19452, 19451, 19454, 19453, 19456, 19455, 19458, 19457, 19460, 19459, 20947, 19462, 19461, 19464, 19463, 20949, 19466, 19465, 19468, 19467, 19470, 19469, 20951, 19471, 19818, 20953, 19473, 19472, 20955, 19475, 19474, 19476, 19478, 19477, 19479, 19481, 19480, 19482, 19483, 19485, 19487, 19486, 19489, 19488, 19491, 19490, 19493, 19492, 19495, 19494, 19497, 19496, 19499, 19498, 19500, 19502, 19501, 19503, 19506, 19505, 19508, 19507, 19510, 19509, 19511, 19514, 19513, 19516, 19515, 19518, 19517, 19520, 19519, 19522, 19521, 19524, 19523, 19525, 19528, 19527, 19530, 19529, 19532, 19531, 20965, 19534, 19533, 20967, 19536, 19535, 20969, 19538, 19537, 19540, 19539, 19542, 19541, 19544, 19543, 19546, 19545, 19548, 19547, 19550, 19549, 19552, 19551, 19554, 19553, 19556, 19555, 20971, 19558, 19557, 20973, 19560, 19559, 20975, 19562, 19561, 20977, 19564, 19563, 20979, 19566, 19565, 20981, 19568, 19567, 19569, 19571, 19570, 19573, 19572, 19575, 19574, 19577, 19576, 19579, 19578, 19581, 19580, 19583, 19582, 19585, 19584, 19587, 19586, 19589, 19588, 19591, 19590, 19593, 19592, 19595, 19594, 19597, 19596, 19599, 19598, 19601, 19600, 20640, 19606, 20642, 20641, 20644, 20643, 20646, 20645, 19609, 19602, 19611, 19610, 19604, 19603, 19614, 20653, 20655, 20657, 20659, 19616, 19615, 19617, 19605, 20640, 19606, 20642, 20641, 20644, 20643, 20645, 19607, 19609, 19608, 19611, 19610, 19613, 19612, 19614, 20654, 20656, 20658, 20660, 19616, 19615, 19618, 19617, 19620, 19619, 19622, 19621, 19624, 19623, 19625, 21008, 19626, 21010, 19627, 19629, 19628, 19631, 19630, 19633, 19632, 19635, 19634, 19637, 19636, 19638, 21025, 21027, 19640, 19639, 19642, 19641, 19644, 19643, 19645, 21029, 21031, 19647, 19646, 19649, 19648, 19651, 19650, 19653, 19652, 19655, 19654, 19656, 21049, 21051, 19658, 19657, 19659, 19662, 19661, 19664, 19663, 21054, 21056, 21059, 19665, 19667, 19668, 19670, 19669, 21061, 21063, 19672, 19671, 19674, 19673, 21065, 19675, 19678, 19677, 21067, 21069, 21071, 21073, 21075, 19683, 19682, 19684, 19686, 19679, 19680, 20271, 19681, 19689, 19688, 19690, 19692, 19691, 19693, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 19884, 19883, 19683, 19682, 19684, 19686, 19685, 19687, 20271, 20273, 19689, 19688, 19690, 19692, 19691, 19693, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 19886, 19885, 19695, 19694, 19697, 19696, 19699, 19698, 19700, 19702, 19701, 19704, 19703, 19705, 19707, 19708, 19711, 19710, 19713, 19712, 19715, 19714, 21081, 19717, 19716, 21083, 19718, 19720, 19719, 19722, 19721, 19723, 19725, 19724, 19726, 20244, 19728, 19727, 19730, 19729, 19731, 19733, 19732, 19735, 19734, 19737, 19736, 19739, 19738, 21085, 19741, 19740, 21087, 19743, 19742, 21089, 19744, 19745, 19746, 19747, 19748, 19749, 19750, 19751, 19753, 19752, 19754, 19755, 19756, 19757, 19758, 19759, 19761, 19763, 19762, 19765, 19764, 19767, 19766, 19768, 19771, 19770, 19773, 19772, 19774, 19776, 19775, 19778, 19777, 19780, 19779, 19782, 19781, 19784, 19783, 19786, 19785, 21095, 19788, 19787, 19790, 19789, 19792, 19791, 19794, 19793, 19796, 19795, 19797, 19799, 19798, 19801, 19800, 19803, 19802, 19805, 19804, 19807, 19806, 19809, 19808, 19811, 19810, 19813, 19812, 21097, 19815, 19814, 21099, 19816, 19817, 19818, 19820, 19819, 19822, 19821, 21101, 19823, 19826, 19825, 19828, 19827, 19830, 19829, 19832, 19831, 19834, 19833, 19835, 19837, 19836, 19839, 19838, 19840, 19842, 19845, 19844, 19847, 19846, 19848, 19850, 19849, 19852, 19851, 19854, 19853, 19856, 19855, 19858, 19857, 21103, 19860, 19859, 21105, 19861, 19862, 19863, 19864, 19865, 19866, 19867, 19868, 19870, 19869, 19871, 19872, 19873, 19874, 19875, 19877, 19876, 19878, 19880, 19879, 19882, 19881, 19884, 19883, 19886, 19885, 19887, 19888, 19889, 19890, 19891, 19893, 19894, 19895, 19896, 19897, 19899, 19898, 19900, 19901, 19904, 19903, 19906, 19905, 19908, 19907, 19910, 19909, 19912, 19911, 19914, 19913, 19916, 19915, 19918, 19917, 19920, 19919, 19922, 19921, 21115, 20058, 19923, 20059, 19995, 19925, 19924, 19927, 19926, 19929, 19928, 19931, 19930, 19932, 19934, 19937, 19936, 19939, 19938, 19941, 19940, 19942, 21117, 19944, 19943, 19946, 19945, 20057, 19973, 19947, 19949, 19951, 19950, 19952, 19954, 19953, 19956, 19955, 19958, 19957, 19960, 19959, 19962, 19961, 19963, 19965, 19964, 19967, 19966, 19969, 19968, 19970, 19972, 19971, 19973, 19975, 19974, 19977, 19976, 19979, 19978, 19980, 19983, 19982, 19985, 19984, 19987, 19986, 19988, 19990, 19989, 21123, 19992, 19991, 19993, 19994, 19995, 19997, 19996, 19999, 19998, 20001, 20000, 20003, 20002, 20005, 20004, 20007, 20006, 20008, 20011, 20010, 20013, 20012, 20015, 20014, 20017, 20016, 20019, 20018, 20021, 20020, 20023, 20022, 20025, 20024, 20027, 20026, 20029, 20028, 20031, 20030, 20032, 20034, 20033, 20035, 20037, 20036, 20039, 20038, 20041, 20040, 20042, 20044, 20043, 20046, 20045, 20048, 20047, 20050, 20049, 20052, 20051, 20054, 20053, 20056, 20055, 21125, 20057, 21127, 20058, 20059, 20060, 20061, 20062, 20063, 20065, 20064, 20066, 20068, 20067, 20069, 20071, 20070, 20073, 20072, 20075, 20074, 20077, 20076, 20079, 20078, 20080, 20081, 20082, 20083, 20084, 20086, 20085, 20087, 20088, 20090, 20092, 20091, 20094, 20093, 20096, 20095, 21135, 20098, 20097, 21137, 20100, 20099, 20102, 20101, 20104, 20103, 20106, 20105, 20108, 20107, 21146, 20110, 20109, 20112, 20111, 20114, 20113, 20116, 20115, 20118, 20117, 20120, 20119, 20122, 20121, 20124, 20123, 20126, 20125, 20128, 20127, 20129, 20130, 20132, 20131, 20133, 20136, 20135, 21148, 21150, 20138, 20137, 20140, 20139, 20142, 20141, 20144, 20143, 20146, 20145, 20148, 20147, 20150, 20149, 21152, 20152, 20151, 20154, 20153, 20155, 20157, 20160, 20159, 20162, 20161, 20164, 20163, 20166, 20165, 20168, 20167, 20170, 20169, 20172, 20171, 20173, 20175, 20174, 20177, 20176, 20179, 20178, 20180, 20182, 20181, 20184, 20183, 20186, 20185, 20188, 20187, 20189, 20192, 20191, 20194, 20193, 20196, 20195, 21156, 21158, 21160, 21162, 21164, 20198, 20197, 20199, 20202, 20201, 20204, 20203, 20206, 20205, 20208, 20207, 20210, 20209, 20212, 20211, 20214, 20213, 21172, 20215, 20217, 20220, 20219, 20222, 20221, 20224, 20223, 20226, 20225, 20228, 20227, 20230, 20229, 20232, 20231, 20233, 20235, 20234, 20237, 20236, 20239, 20238, 20241, 20240, 20243, 20242, 20245, 20244, 20247, 20246, 20248, 20250, 20249, 20252, 20251, 20254, 20253, 20255, 20257, 20260, 20259, 20262, 20261, 21190, 20264, 20263, 21192, 21194, 21197, 21200, 21202, 20266, 20265, 20267, 20269, 20268, 20270, 20271, 20273, 20275, 20274, 20276, 20278, 20277, 20279, 20281, 20280, 20282, 20284, 20283, 20286, 20285, 20288, 20287, 20289, 20291, 20290, 20293, 20292, 20295, 20294, 20296, 20297, 20299, 20301, 20300, 20303, 20302, 20305, 20304, 20306, 20308, 20307, 20309, 20310, 20313, 20312, 20315, 20314, 20317, 20316, 20319, 20318, 20321, 20320, 21220, 20322, 21222, 20323, 21224, 20324, 21226, 20325, 20327, 20326, 20329, 20328, 20331, 20330, 20333, 20332, 20335, 20334, 20337, 20336, 21229, 20339, 20338, 20341, 20340, 20343, 20342, 20345, 20344, 20347, 20346, 20349, 20348, 20351, 20350, 21238, 20353, 20352, 20355, 20354, 20357, 20356, 20359, 20358, 20361, 20360, 20362, 20364, 20363, 20366, 20365, 20368, 20367, 20369, 20371, 20370, 20372, 21251, 21253, 20374, 20373, 20375, 20377, 20376, 20378, 21255, 21257, 20380, 20379, 20382, 20381, 20384, 20383, 20386, 20385, 20388, 20387, 20390, 20389, 20392, 20391, 20394, 20393, 20396, 20395, 20398, 20397, 20400, 20399, 20402, 20401, 20404, 20403, 20406, 20405, 20408, 20407, 20409, 20411, 20410, 20413, 20412, 20415, 20414, 21269, 20416, 21271, 20417, 21273, 21275, 20419, 20418, 20421, 20420, 20423, 20422, 20425, 20424, 20427, 20426, 20429, 20428, 20431, 20430, 20433, 20432, 20435, 20434, 20437, 20436, 20439, 20438, 20441, 20440, 20443, 20442, 20445, 20444, 20447, 20446, 20449, 20448, 20451, 20450, 20453, 20452, 20455, 20454, 20457, 20456, 20459, 20458, 20461, 20460, 20463, 20462, 20465, 20464, 20467, 20466, 20469, 20468, 20471, 20470, 20473, 20472, 20475, 20474, 20477, 20476, 20479, 20478, 20480, 21286, 21288, 20482, 20481, 20484, 20483, 20486, 20485, 20487, 21290, 21292, 20489, 20488, 20491, 20490, 20493, 20492, 20494, 21294, 20495, 21296, 20496, 20498, 20497, 20500, 20499, 20502, 20501, 20504, 20503, 20506, 20505, 20508, 20507, 20510, 20509, 21298, 20512, 20511, 20513, 20515, 20514, 20517, 20516, 20519, 20518, 20521, 20520, 20523, 20522, 20525, 20524, 20527, 20526, 20528, 20530, 20529, 20532, 20531, 20534, 20533, 20535, 20537, 20536, 20538, 20540, 20539, 20542, 20541, 20544, 20543, 20546, 20545, 20548, 20547, 20550, 20549, 20552, 20551, 20554, 20553, 20556, 20555, 20558, 20557, 20560, 20559, 20562, 20561, 20564, 20563, 20566, 20565, 20568, 20567, 20569, 20571, 20570, 20573, 20572, 20575, 20574, 20577, 20576, 20579, 20578, 20580, 20582, 20581, 20584, 20583, 20586, 20585, 20587, 20589, 20588, 20590, 20592, 20591, 20594, 20593, 20596, 20595, 20598, 20597, 20600, 20599, 20602, 20601, 20604, 20603, 20606, 20605, 20608, 20607, 20610, 20609, 20612, 20611, 20614, 20613, 20616, 20615, 20618, 20617, 20620, 20619, 20622, 20621, 20624, 20623, 21312, 20626, 20625, 20627, 20629, 20628, 20630, 20632, 20631, 20634, 20633, 20636, 20635, 20638, 20637, 20640, 20639, 20642, 20641, 20644, 20643, 20646, 20645, 20648, 20647, 20649, 20651, 20650, 20652, 20654, 20653, 20656, 20655, 20658, 20657, 20660, 20659, 20662, 20661, 20664, 20663, 20666, 20665, 20668, 20667, 20670, 20669, 20671, 21328, 20672, 21330, 20673, 20675, 20674, 20677, 20676, 20679, 20678, 20680, 21334, 20681, 21336, 20682, 20684, 20683, 20686, 20685, 20688, 20687, 20690, 20689, 20692, 20691, 20694, 20693, 20696, 20695, 20698, 20697, 20700, 20699, 20701, 20703, 20702, 20705, 20704, 20725, 20706, 20708, 20707, 20710, 20709, 20711, 20713, 20712, 20715, 20714, 20717, 20716, 20719, 20718, 20721, 20720, 21348, 20723, 20722, 21350, 20725, 20724, 20726, 20728, 20727, 20730, 20729, 20732, 20731, 20734, 20733, 21214, 20751, 21216, 21218, 21367, 21369, 21052, 21052, 20760, 20760, 20766, 20765, 20768, 20767, 20770, 20769, 20771, 21371, 21373, 20773, 20772, 21375, 21377, 21379, 21381, 20792, 20793, 20794, 20795, 21383, 21385, 21387, 21389, 21391, 20797, 20796, 21276, 20799, 21279, 21278, 20808, 20798, 21393, 21276, 20799, 21279, 20800, 21395, 21397, 21399, 21401, 21403, 21405, 20809, 20808, 21407, 21409, 20802, 20801, 21411, 21413, 21415, 21417, 20803, 20805, 20804, 21423, 21425, 21301, 21300, 21303, 21299, 21427, 21429, 21431, 21433, 20807, 20806, 21435, 21301, 21300, 21303, 21299, 20809, 20808, 21438, 21440, 21442, 21444, 21446, 21448, 21450, 21452, 20811, 20810, 21454, 21457, 21459, 21461, 21463, 21465, 20815, 20814, 21467, 20816, 21469, 21471, 20817, 21473, 20898, 20818, 20820, 20819, 21475, 21477, 21479, 21481, 21483, 21485, 21487, 21489, 21491, 21493, 21495, 21011, 21497, 21499, 20826, 20825, 20828, 20827, 20829, 21501, 21503, 20849, 20848, 20871, 20870, 20873, 20872, 20875, 20874, 20877, 20876, 20879, 20878, 20881, 20880, 20883, 20882, 20885, 20884, 21505, 20886, 20888, 20887, 20890, 20889, 21507, 21509, 20894, 20893, 21511, 20895, 20897, 20896, 21513, 20898, 21515, 20900, 20899, 20901, 20903, 20902, 20905, 20904, 21517, 20906, 21519, 20907, 21521, 21523, 21525, 20908, 20910, 20909, 21527, 20917, 21345, 21529, 20919, 20918, 21301, 21300, 21531, 20920, 21533, 20922, 20921, 20924, 20923, 20926, 20925, 20928, 20927, 20930, 20929, 21535, 20932, 20931, 20936, 20935, 20938, 20937, 20940, 20939, 20941, 21538, 21540, 20957, 20956, 20959, 20958, 20961, 20960, 20963, 20962, 21543, 21545, 20983, 20982, 20985, 20984, 20987, 20986, 20989, 20988, 21547, 21549, 20991, 20990, 20993, 20992, 20995, 20994, 20997, 20996, 21551, 21553, 21555, 21557, 21559, 21561, 20998, 21000, 20999, 21002, 21001, 21004, 21003, 21563, 21006, 21005, 21565, 21011, 21567, 21569, 21012, 21571, 21573, 21014, 21013, 21016, 21015, 21017, 21299, 21018, 21575, 21019, 21020, 21045, 21577, 21021, 21579, 21581, 21023, 21022, 21583, 21585, 21587, 21589, 21591, 21593, 21596, 21033, 21032, 21035, 21034, 21036, 21038, 21037, 21599, 21039, 21041, 21040, 21043, 21042, 21044, 21601, 21045, 21603, 21605, 21607, 21609, 21047, 21046, 21052, 21052, 21057, 21057, 21079, 21078, 21611, 21091, 21090, 21093, 21092, 21613, 21107, 21106, 21109, 21108, 21111, 21110, 21113, 21112, 21615, 21617, 21619, 21621, 21119, 21118, 21121, 21120, 21623, 21139, 21138, 21141, 21140, 21143, 21142, 21144, 21626, 21629, 21212, 21211, 21214, 21213, 21216, 21215, 21218, 21217, 21635, 21637, 21639, 21642, 21645, 21227, 21647, 21230, 21232, 21231, 21234, 21233, 21649, 21651, 21236, 21235, 21653, 21655, 21239, 21657, 21241, 21240, 21659, 21661, 21663, 21665, 21243, 21242, 21245, 21244, 21247, 21246, 21667, 21249, 21248, 21259, 21258, 21260, 21669, 21671, 21262, 21261, 21264, 21263, 21673, 21265, 21267, 21266, 21277, 21276, 21279, 21278, 21281, 21280, 21282, 21284, 21283, 21677, 21679, 21681, 21683, 21685, 21301, 21300, 21303, 21299, 21687, 21689, 21691, 21693, 21305, 21304, 21695, 21301, 21300, 21303, 21302, 21697, 21699, 21701, 21703, 21305, 21304, 21705, 21707, 21709, 21711, 21313, 21315, 21314, 21316, 21713, 21318, 21317, 21320, 21319, 21717, 21719, 21722, 21724, 21727, 21322, 21321, 21730, 21345, 21732, 21735, 21356, 21355, 21358, 21357, 21360, 21359, 21741, 21361, 21743, 21746, 21363, 21362, 21365, 21364, 21436, 21436, 21436, 21436, 21436, 21436, 21536, 21536, 21541, 21541, 21536, 21536, 21541, 21541, 28, 29, 30, 31, 6530, 6531, 6532, 6533, 6534, 6535, 6536, 6537, 6539, 6540, 6541, 6542, 6543, 6544, 6545, 6546, 6547, 6548, 6550, 6551, 6552, 6553, 6554, 6555, 6556, 6557, 6558, 6559, 6560, 6561, 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6570, 6571, 6572, 6573, 6574, 6577, 6578, 6581, 6582, 6583, 6584, 6585, 6586, 6587, 6588, 6589, 6590, 6591, 6592, 6593, 6594, 6595, 6596, 6597, 6598, 6602, 6603, 6604, 6605, 6606, 6607, 6608, 6609, 6610, 6611, 6614, 6615, 6616, 6619, 6620, 6621, 6622, 6623, 6624, 6625, 6626, 6627, 6628, 6657, 6658, 6659, 6660, 6661, 6662, 6663, 6672, 6673, 6674, 6675, 6680, 6681, 6688, 6689, 6742, 6743, 6744, 6745, 6746, 6747, 6748, 6749, 6762, 6763, 6764, 6765, 6766, 6767, 6768, 6769, 6770, 6771, 6772, 6773, 6800, 6801, 6802, 6803, 6804, 6805, 6806, 6807, 6810, 6811, 6840, 6841, 6846, 6847, 6848, 6849, 6850, 6851, 6852, 6853, 6854, 6875, 6876, 6877, 6878, 6879, 6880, 6883, 6884, 6885, 6886, 6887, 6888, 6889, 6890, 6891, 6892, 6893, 6904, 6905, 6906, 6907, 6908, 6909, 6910, 6911, 6912, 6913, 6914, 6915, 6916, 6917, 6918, 6919, 6926, 6927, 6928, 6929, 6930, 6931, 6932, 6933, 6934, 6935, 6936, 6937, 6948, 6949, 6950, 6951, 6952, 6953, 6954, 6955, 6956, 6957, 6958, 6965, 6966, 6967, 6968, 6969, 6970, 7015, 7016, 7017, 7018, 7019, 7020, 7021, 7022, 7075, 7076, 7079, 7080, 7081, 7082, 7083, 7108, 7109, 7110, 7111, 7112, 7113, 7114, 7115, 7116, 7117, 7118, 7119, 7168, 7169, 7170, 7171, 7172, 7173, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7185, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7221, 7222, 7223, 7224, 7225, 7226, 7227, 7228, 7229, 7230, 7231, 7232, 7233, 7234, 7235, 7236, 7237, 7270, 7271, 7272, 7273, 7274, 7275, 7276, 7285, 7286, 7287, 7288, 7289, 7290, 7291, 7292, 7293, 7294, 7295, 7298, 7299, 7300, 7301, 7302, 7303, 7304, 7305, 7306, 7307, 7308, 7309, 7310, 7311, 7312, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7350, 7351, 7354, 7355, 7358, 7359, 7360, 7361, 7362, 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, 7371, 7372, 7373, 7374, 7375, 7376, 7377, 7378, 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, 7387, 7388, 7389, 7392, 7393, 7394, 7395, 7398, 7399, 7400, 7401, 7402, 7403, 7406, 7407, 7410, 7411, 7414, 7415, 7416, 7417, 7418, 7419, 7420, 7421, 7422, 7423, 7424, 7425, 7426, 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7438, 7439, 7472, 7473, 7474, 7475, 7476, 7477, 7478, 7479, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7487, 7488, 7489, 7490, 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, 7499, 7500, 7503, 7504, 7507, 7508, 7511, 7512, 7513, 7514, 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, 7523, 7524, 7525, 7526, 7527, 7528, 7529, 7530, 7533, 7534, 7537, 7538, 7541, 7542, 7545, 7546, 7549, 7550, 7553, 7554, 7555, 7556, 7557, 7558, 7559, 7560, 7561, 7562, 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7571, 7636, 7637, 7638, 7639, 7640, 7641, 7642, 7643, 7644, 7645, 7646, 7647, 7648, 7649, 7650, 7651, 7688, 7689, 7690, 7691, 7692, 7693, 7694, 7695, 7696, 7697, 7698, 7699, 7700, 7701, 7702, 7703, 7704, 7705, 7706, 7707, 7708, 7709, 7710, 7711, 7712, 7713, 7714, 7715, 7716, 7717, 7718, 7719, 7720, 7721, 7722, 7723, 7724, 7725, 7726, 7727, 7728, 7729, 7730, 7731, 7732, 7733, 7734, 7735, 7736, 7737, 7738, 7739, 7740, 7743, 7746, 7747, 7748, 7749, 7750, 7803, 7804, 7805, 7806, 7807, 7808, 7809, 7814, 7815, 7816, 7817, 7818, 7819, 7820, 7825, 7826, 7827, 7828, 7829, 7830, 7831, 7832, 7833, 7834, 7835, 7908, 7909, 7910, 7911, 7912, 7913, 7914, 7922, 7923, 7924, 7925, 7926, 7931, 7932, 7933, 7934, 7937, 7938, 7939, 7950, 7951, 7952, 7953, 7954, 7955, 7956, 7957, 7958, 7959, 7960, 7961, 7962, 7963, 7964, 7965, 7966, 7967, 7968, 7969, 7970, 7971, 7972, 7973, 7974, 7975, 7976, 7977, 7978, 7979, 7980, 7981, 7982, 7983, 7984, 7985, 7986, 7987, 7988, 7989, 7990, 7991, 7992, 7993, 7994, 7995, 7996, 7997, 7998, 7999, 8000, 8001, 8002, 8003, 8004, 8006, 8007, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8024, 8025, 8028, 8029, 8032, 8033, 8034, 8035, 8036, 8037, 8038, 8039, 8040, 8041, 8042, 8043, 8044, 8045, 8046, 8047, 8048, 8049, 8050, 8051, 8052, 8053, 8054, 8057, 8058, 8061, 8062, 8065, 8066, 8067, 8068, 8069, 8070, 8071, 8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8116, 8117, 8118, 8119, 8120, 8121, 8124, 8125, 8126, 8127, 8128, 8129, 8130, 8131, 8132, 8133, 8134, 8135, 8136, 8137, 8138, 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8153, 8154, 8157, 8158, 8159, 8160, 8161, 8162, 8163, 8166, 8167, 8168, 8169, 8170, 8171, 8172, 8173, 8174, 8175, 8176, 8177, 8178, 8179, 8180, 8181, 8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189, 8190, 8191, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8201, 8202, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310, 8311, 8312, 8313, 8314, 8315, 8316, 8317, 8318, 8319, 8322, 8323, 8324, 8325, 8326, 8327, 8328, 8329, 8330, 8331, 8332, 8333, 8334, 8335, 8336, 8337, 8338, 8339, 8340, 8341, 8342, 8343, 8360, 8361, 8362, 8363, 8364, 8365, 8366, 8367, 8368, 8369, 8370, 8371, 8372, 8373, 8374, 8375, 8376, 8377, 8378, 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8388, 8389, 8390, 8391, 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8410, 8411, 8412, 8413, 8414, 8415, 8416, 8417, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8425, 8426, 8427, 8428, 8429, 8430, 8431, 8432, 8433, 8434, 8435, 8436, 8437, 8438, 8439, 8440, 8441, 8442, 8443, 8444, 8445, 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8455, 8458, 8460, 8462, 8463, 8464, 8465, 8466, 8467, 8468, 8469, 8470, 8471, 8472, 8473, 8474, 8475, 8476, 8477, 8479, 8480, 8482, 8483, 8484, 8485, 8487, 8489, 8490, 8491, 8492, 8493, 8494, 8495, 8496, 8497, 8498, 8499, 8500, 8501, 8504, 8505, 8537, 8538, 8539, 8540, 8541, 8542, 8543, 8544, 8545, 8546, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580, 8581, 8582, 8583, 8584, 8585, 8586, 8587, 8588, 8589, 8590, 8591, 8592, 8593, 8596, 8597, 8598, 8599, 8600, 8601, 8602, 8603, 8604, 8605, 8606, 8607, 8608, 8609, 8610, 8611, 8612, 8613, 8614, 8615, 8616, 8617, 8618, 8619, 8620, 8621, 8622, 8623, 8624, 8625, 8626, 8627, 8628, 8629, 8630, 8631, 8632, 8633, 8634, 8636, 8637, 8639, 8640, 8651, 8652, 8654, 8655, 8656, 8657, 8658, 8660, 8661, 8663, 8664, 8666, 8667, 8669, 8670, 8672, 8673, 8676, 8678, 8680, 8681, 8682, 8683, 8685, 8686, 8687, 8688, 8690, 8691, 8693, 8694, 8696, 8697, 8698, 8699, 8700, 8702, 8703, 8705, 8706, 8708, 8709, 8711, 8712, 8714, 8715, 8717, 8718, 8719, 8720, 8721, 8723, 8724, 8726, 8727, 8728, 8729, 8731, 8732, 8734, 8735, 8738, 8739, 8752, 8753, 8754, 8755, 8756, 8757, 8758, 8759, 8760, 8761, 8762, 8763, 8764, 8765, 8766, 8767, 8768, 8769, 8770, 8772, 8773, 8775, 8776, 8777, 8778, 8779, 8780, 8781, 8782, 8783, 8784, 8785, 8786, 8787, 8788, 8790, 8791, 8793, 8794, 8795, 8796, 8797, 8798, 8799, 8801, 8802, 8804, 8805, 8807, 8808, 8855, 8856, 8857, 8858, 8861, 8864, 8867, 8870, 8871, 8872, 8873, 8874, 8875, 8876, 8877, 8878, 8883, 8884, 8885, 8886, 8917, 8918, 8919, 8920, 8921, 8922, 8923, 8924, 8925, 8926, 8927, 8928, 8929, 8930, 8961, 8962, 8963, 8964, 8981, 8982, 8983, 8984, 8985, 8986, 8987, 8988, 8989, 8990, 8991, 8992, 8993, 8994, 8995, 8996, 8997, 9002, 9003, 9004, 9005, 9006, 9007, 9012, 9013, 9014, 9015, 9016, 9017, 9018, 9019, 9020, 9021, 9022, 9023, 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032, 9033, 9034, 9035, 9036, 9037, 9038, 9039, 9040, 9041, 9042, 9043, 9044, 9085, 9086, 9087, 9088, 9091, 9094, 9099, 9100, 9101, 9102, 9103, 9104, 9105, 9106, 9107, 9108, 9109, 9110, 9111, 9112, 9113, 9114, 9115, 9116, 9117, 9118, 9155, 9156, 9157, 9158, 9159, 9160, 9161, 9162, 9163, 9164, 9165, 9166, 9167, 9168, 9169, 9170, 9171, 9172, 9173, 9174, 9175, 9176, 9177, 9178, 9179, 9180, 9181, 9182, 9183, 9184, 9185, 9186, 9187, 9188, 9189, 9190, 9191, 9192, 9193, 9194, 9195, 9196, 9197, 9202, 9203, 9204, 9205, 9206, 9207, 9208, 9213, 9214, 9215, 9216, 9217, 9218, 9219, 9222, 9225, 9226, 9227, 9228, 9229, 9230, 9231, 9232, 9233, 9234, 9235, 9236, 9237, 9238, 9239, 9242, 9243, 9244, 9245, 9246, 9247, 9248, 9249, 9250, 9251, 9252, 9253, 9254, 9255, 9256, 9257, 9258, 9259, 9260, 9261, 9262, 9263, 9293, 9294, 9295, 9296, 9297, 9298, 9299, 9300, 9301, 9302, 9303, 9304, 9305, 9306, 9307, 9308, 9309, 9310, 9311, 9312, 9313, 9314, 9315, 9316, 9317, 9318, 9319, 9320, 9321, 9322, 9323, 9324, 9325, 9326, 9327, 9328, 9329, 9330, 9331, 9332, 9333, 9334, 9335, 9336, 9337, 9338, 9339, 9340, 9341, 9342, 9344, 9345, 9347, 9348, 9349, 9350, 9351, 9352, 9353, 9354, 9356, 9357, 9359, 9360, 9361, 9362, 9363, 9364, 9365, 9366, 9367, 9368, 9369, 9370, 9371, 9372, 9374, 9375, 9376, 9377, 9378, 9379, 9380, 9381, 9382, 9383, 9384, 9385, 9386, 9387, 9388, 9389, 9392, 9393, 9394, 9395, 9396, 9397, 9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9450, 9451, 9453, 9454, 9456, 9457, 9458, 9459, 9460, 9461, 9462, 9463, 9464, 9465, 9466, 9467, 9468, 9469, 9470, 9471, 9472, 9473, 9474, 9475, 9477, 9478, 9480, 9481, 9482, 9483, 9484, 9485, 9486, 9489, 9492, 9493, 9494, 9496, 9497, 9499, 9500, 9501, 9504, 9507, 9508, 9509, 9511, 9512, 9514, 9515, 9517, 9518, 9520, 9521, 9523, 9524, 9526, 9527, 9528, 9529, 9530, 9531, 9532, 9533, 9534, 9536, 9537, 9539, 9540, 9541, 9542, 9543, 9544, 9545, 9546, 9547, 9548, 9549, 9555, 9556, 9557, 9558, 9560, 9561, 9564, 9565, 9568, 9569, 9570, 9571, 9572, 9574, 9575, 9577, 9578, 9580, 9581, 21762, 21760, 21766, 21764, 9660, 9661, 9662, 9663, 21052, 9933, 9934, 20760, 9972, 9973, 10054, 10055, 10056, 10057, 10058, 10059, 10060, 10075, 10076, 21871, 22432, 22432, 22430, 21881, 21880, 21879, 10158, 10159, 10160, 10161, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10182, 10183, 10184, 10185, 10198, 10199, 10204, 10205, 10218, 10219, 10220, 10235, 10236, 10237, 10238, 10247, 10248, 10251, 10252, 10253, 10254, 10256, 10257, 10274, 10275, 10301, 10302, 10305, 10310, 10313, 10314, 10315, 10316, 21917, 21916, 10379, 10393, 10394, 10395, 10396, 10397, 21949, 21948, 21946, 21968, 21967, 21966, 10553, 10554, 21993, 21995, 22004, 22006, 10621, 10622, 10623, 10624, 10625, 10626, 10627, 10628, 10633, 10634, 10635, 10636, 10637, 10638, 10639, 10640, 10643, 10644, 10645, 10646, 10647, 10661, 10662, 10665, 10666, 10667, 10670, 10679, 10680, 10681, 10682, 10683, 10684, 10685, 10688, 10691, 10698, 10699, 10700, 10715, 10716, 10719, 10720, 10721, 10722, 10725, 10728, 10729, 10739, 10740, 10741, 10742, 10743, 10744, 10745, 10746, 10753, 10754, 10775, 10776, 10777, 10778, 10779, 10780, 10781, 10876, 10877, 10878, 10879, 10880, 10881, 10882, 10883, 10964, 10965, 10966, 10967, 10968, 10969, 10970, 10971, 10976, 10977, 10978, 10979, 10980, 10981, 10982, 10983, 11004, 11005, 11006, 11007, 11008, 11009, 11010, 11013, 11014, 11050, 11055, 11060, 11061, 11062, 11063, 11064, 11065, 11066, 11069, 11070, 11071, 11074, 11079, 11080, 22381, 22380, 22390, 22389, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11121, 11122, 11123, 11124, 11125, 11126, 11129, 11138, 11139, 21052, 11173, 11174, 21057, 11208, 11209, 22430, 22420, 22432, 22430, 11304, 11305, 11432, 11433, 11434, 11435, 11533, 11534, 11535, 11536, 11537, 11538, 11539, 11540, 11657, 11658, 11659, 11660, 11792, 11793, 11794, 11795, 11796, 11797, 11798, 22995, 22933, 22995, 22993, 23065, 23064, 23063, 11957, 11958, 11960, 11961, 11963, 11964, 11966, 11967, 12006, 12013, 12014, 12015, 12016, 12017, 12022, 12023, 12035, 12038, 12039, 12048, 12049, 12050, 12051, 12054, 12055, 12058, 12059, 23179, 23178, 23187, 23186, 12091, 12092, 12093, 12098, 12099, 12100, 12101, 12104, 12105, 12106, 23230, 23229, 12126, 12127, 12129, 12130, 12131, 12132, 12133, 12134, 12135, 23295, 23294, 23304, 23303, 12202, 12203, 12204, 12205, 12214, 12215, 12218, 12219, 12220, 12221, 12230, 12231, 12289, 12290, 12291, 12292, 12295, 12296, 12298, 12299, 12313, 12314, 12356, 12372, 12373, 12375, 12376, 12379, 12380, 12383, 12390, 12391, 12393, 12394, 23594, 23593, 23592, 23586, 23585, 23584, 23568, 23567, 23581, 23580, 23586, 23585, 23584, 23594, 23593, 23592, 23852, 24010, 24009, 23812, 23684, 23683, 21436, 21436, 23969, 23950, 23984, 23983, 23681, 23680, 23986, 23985, 23629, 23679, 23638, 23637, 21436, 21436, 23649, 23648, 23650, 23653, 23652, 23613, 23853, 23852, 24010, 23941, 23683, 23615, 24009, 23624, 23619, 23618, 23625, 23677, 21436, 12700, 12701, 24025, 23630, 23696, 21455, 21455, 24041, 24040, 23853, 23852, 23624, 23941, 23684, 23625, 12751, 12752, 12753, 12754, 23969, 23984, 23983, 23678, 23681, 23986, 23985, 23630, 23629, 21436, 21436, 23638, 23637, 23649, 23648, 23650, 23653, 23652, 23654, 23696, 23679, 21455, 21455, 24041, 24040, 23661, 23660, 23916, 23928, 23927, 23885, 23885, 23928, 23927, 23847, 23668, 23876, 23874, 23832, 23752, 23847, 23759, 23847, 23844, 23853, 23852, 23684, 23683, 23853, 23813, 23683, 23677, 23678, 23681, 23682, 23679, 23681, 23680, 23682, 23695, 23853, 23813, 23684, 23683, 21739, 21715, 24025, 23685, 24024, 24023, 23689, 23688, 23696, 23695, 21536, 13024, 13025, 21541, 13069, 13070, 23875, 23743, 23722, 23721, 23832, 23831, 23846, 23759, 23823, 23743, 23752, 23744, 23846, 23759, 23832, 23752, 23846, 23759, 23907, 13192, 13193, 23780, 13233, 13234, 23790, 23801, 23800, 23811, 23810, 24010, 23851, 23813, 23812, 23856, 23855, 23815, 23814, 23847, 23873, 23829, 23828, 23832, 23831, 23847, 23846, 23853, 23852, 24010, 23851, 23856, 23855, 23876, 23875, 23874, 23873, 23885, 23928, 23927, 23901, 23900, 23899, 23907, 23890, 23901, 23900, 23899, 23916, 23907, 23916, 23915, 23928, 23927, 23925, 21739, 21739, 24041, 24040, 24010, 23941, 21739, 21715, 23950, 24025, 23949, 23948, 24010, 24009, 21739, 21715, 24025, 24023, 23957, 24022, 24010, 24009, 21739, 21739, 24040, 24025, 23984, 23983, 23986, 23985, 24040, 24025, 23984, 23983, 23986, 23985, 21715, 21715, 23994, 23993, 21715, 21715, 24005, 24004, 24010, 24009, 21739, 21715, 24025, 24024, 24023, 24022, 24031, 24030, 24041, 24040, 30, 31, 24065, 24067, 24071, 24073, 24075, 24081, 24083, 24085, 24087, 24094, 24098, 24100, 24102, 24104, 24106, 24108, 24110, 24112, 24114, 24116, 24118, 24120, 24122, 24124, 24126, 24128, 24131, 24133, 24136, 24145, 24148, 24151, 24154, 24158, 24160, 24162, 24164, 24166, 24168, 24170, 24172, 24174, 24176, 24178, 24180, 24182, 24184, 24186, 24188, 24190, 24192, 24194, 24196, 24198, 24200, 24202, 24204, 24207, 24209, 24211, 24213, 24215, 24217, 24219, 24222, 24224, 24226, 24228, 24230, 24232, 24234, 24236, 24238, 24240, 24243, 24246, 24249, 24253, 24255, 24257, 24259, 24261, 24263, 24265, 24267, 24269, 24271, 24273, 24275, 24277, 24280, 24282, 24284, 24286, 24288, 24290, 24292, 24294, 24296, 24298, 24300, 24302, 24304, 24306, 24308, 24313, 24315, 24317, 24321, 24324, 24326, 24328, 24331, 24336, 24338, 24341, 24343, 24346, 24348, 24350, 24352, 24358, 24360, 24362, 24364, 24366, 24369, 24372, 24374, 24376, 24378, 24380, 24382, 24387, 24389, 24391, 24394, 24397, 24400, 24402, 24404, 24406, 24408, 24410, 24412, 24414, 24416, 24418, 24420, 24422, 24424, 24426, 24428, 24431, 24434, 24439, 24441, 24443, 24445, 24447, 24449, 24451, 24454, 24457, 24459, 24461, 24464, 24466, 24468, 24470, 24472, 24474, 24477, 24479, 24481, 24483, 24485, 24487, 24489, 24491, 24493, 24495, 24497, 24499, 24501, 24503, 24505, 24507, 24509, 24511, 24513, 24515, 24517, 24520, 24522, 24524, 24526, 24528, 24530, 24532, 24534, 24536, 24538, 24540, 24542, 24544, 24546, 24548, 24550, 24552, 24554, 24556, 24558, 24560, 24562, 24564, 24571, 24573, 24575, 24577, 24579, 24581, 24583, 24585, 24587, 24594, 24596, 24598, 24600, 24602, 24607, 24609, 24611, 24613, 24615, 24618, 24620, 24622, 24625, 24627, 24629, 24631, 24633, 24636, 24639, 24641, 24646, 24648, 24650, 24653, 24655, 24658, 24663, 24666, 24669, 24672, 24674, 24676, 24678, 24681, 24686, 24689, 24692, 24695, 24697, 24699, 24701, 24703, 24705, 24708, 24710, 24715, 24717, 24719, 24721, 24724, 24726, 24729, 24731, 24733, 24735, 24738, 24740, 24742, 24744, 24746, 24748, 24758, 24767, 24769, 24771, 24774, 24776, 24779, 24781, 24783, 24785, 24787, 24789, 24791, 24793, 24795, 24797, 24799, 24802, 24804, 24806, 24808, 24810, 24812, 24814, 24816, 24818, 24823, 24825, 24828, 24830, 24832, 24834, 24836, 24839, 24841, 24845, 24847, 24850, 24852, 24854, 24856, 24858, 24860, 24870, 24877, 24880, 24882, 24884, 24886, 24898, 24902, 24904, 24906, 24908, 24910, 24912, 24914, 24916, 24918, 24920, 24922, 24924, 24926, 24928, 24930, 24932, 24936, 24938, 24940, 24943, 24945, 24947, 24951, 24954, 24956, 24958, 24960, 24962, 24965, 24967, 24969, 24972, 24975, 24977, 24979, 24982, 24984, 24986, 24989, 24991, 24996, 24998, 25000, 25002, 25004, 25006, 25009, 25011, 25013, 25015, 25017, 25019, 25021, 25023, 25025, 25027, 25029, 25032, 25035, 25037, 25039, 25042, 25044, 25046, 25048, 25050, 25052, 25054, 25063, 25066, 25069, 25071, 25073, 25075, 25077, 25084, 25089, 25091, 25093, 25095, 25097, 25099, 25101, 25103, 25105, 25107, 25109, 25111, 25113, 25115, 25117, 25119, 25121, 25123, 25125, 25129, 25132, 25134, 25136, 25138, 25140, 25142, 25144, 25146, 25148, 25150, 25154, 25156, 25158, 25160, 25162, 25164, 25166, 25169, 25171, 25173, 25176, 25178, 25180, 25182, 25185, 25187, 25189, 25191, 25194, 25196, 25198, 25200, 25202, 25204, 25206, 25210, 25212, 25214, 25216, 25218, 25220, 25222, 25225, 25227, 25229, 25231, 25233, 25235, 25237, 25240, 25242, 25244, 25248, 25250, 25252, 25254, 25257, 25262, 25265, 25268, 25271, 25273, 25275, 25278, 25280, 25282, 25287, 25289, 25291, 25294, 25298, 25300, 25302, 25304, 25306, 25312, 25314, 25316, 25318, 25320, 25322, 25324, 25326, 25328, 25330, 25332, 25334, 25336, 25338, 25340, 25342, 25344, 25346, 25349, 25351, 25353, 25356, 25359, 25362, 25365, 25367, 25369, 25371, 25373, 25375, 25377, 25379, 25381, 25383, 25385, 25387, 25389, 25391, 25393, 25396, 25398, 25400, 25404, 25406, 25408, 25410, 25412, 25414, 25416, 25418, 25420, 25422, 25424, 25426, 25428, 25430, 25432, 25434, 25436, 25438, 25440, 25442, 25444, 25446, 25448, 25450, 25452, 25454, 25456, 25458, 25460, 25462, 25464, 25467, 25469, 25471, 25474, 25476, 25478, 25483, 25485, 25487, 25489, 25491, 25493, 25495, 25497, 25500, 25502, 25504, 25506, 25508, 25510, 25512, 25515, 25517, 25519, 25522, 25525, 25527, 25529, 25531, 25533, 25535, 25537, 25539, 25541, 25543, 25545, 25547, 25549, 25551, 25553, 25556, 25558, 25560, 25562, 25564, 25567, 25569, 25571, 25574, 25577, 25579, 25581, 25583, 25585, 25587, 25589, 25591, 25593, 25595, 25597, 25599, 25601, 25603, 25605, 25607, 25609, 25611, 25614, 25617, 25619, 25621, 25623, 25625, 25627, 25629, 25631, 25633, 25636, 25639, 25641, 25643, 25645, 25647, 25649, 25651, 25653, 25655, 25660, 25662, 25664, 25669, 25671, 25673, 25675, 25677, 25679, 25681, 25683, 25685, 25688, 25690, 25692, 25694, 25696, 25699, 25701, 25703, 25705, 25707, 25709, 25711, 25714, 25716, 25718, 25720, 9654, 9655, 9658, 9659, 25207, 24251, 24096, 24095, 24772, 25207, 24069, 24068, 25152, 24077, 24076, 24079, 24078, 25152, 24077, 24076, 24079, 24078, 24934, 24642, 24089, 24088, 24092, 24091, 24637, 24980, 24096, 24095, 25152, 24251, 9932, 24772, 25152, 9971, 24772, 25152, 24139, 24138, 24137, 25152, 25007, 24139, 24138, 24137, 24142, 24141, 24140, 25736, 25738, 25740, 25246, 24155, 25743, 24826, 24642, 25246, 10115, 10116, 24826, 10147, 10148, 10155, 10156, 10157, 25756, 25758, 25760, 25762, 25764, 25766, 25768, 25770, 25773, 25775, 25777, 25779, 25781, 25783, 25785, 25787, 25789, 25795, 23493, 10355, 10356, 23506, 22018, 25800, 25802, 24772, 24826, 24826, 25007, 24772, 24826, 10507, 10508, 10509, 24772, 24826, 10546, 10547, 10548, 25811, 24455, 24934, 24251, 10584, 10587, 24455, 24772, 24934, 10617, 10620, 25817, 25819, 25821, 25823, 25825, 25827, 25829, 25831, 25834, 25836, 23506, 22018, 25838, 25841, 25844, 25847, 25849, 25854, 22053, 22051, 25858, 25860, 25863, 24318, 24333, 25865, 25867, 25869, 25871, 24339, 25873, 24355, 24353, 25875, 25877, 25879, 24384, 24398, 24455, 24462, 25208, 25246, 25192, 24772, 25207, 24436, 25882, 25884, 25886, 25888, 24455, 24462, 25208, 25192, 24772, 24934, 25890, 25892, 25894, 25896, 25898, 25900, 25902, 25904, 25907, 25909, 25911, 25913, 24569, 24568, 24567, 24566, 24592, 24591, 24590, 24589, 22367, 22365, 25917, 25919, 25922, 25928, 11086, 11087, 11091, 11092, 25934, 25936, 25939, 25942, 25944, 25948, 25192, 25208, 25207, 25246, 11172, 25192, 25208, 24637, 25246, 11207, 25152, 24642, 25246, 11241, 11242, 25152, 25246, 11274, 11275, 24660, 24683, 24711, 24713, 25960, 25152, 25151, 25246, 24864, 24862, 24861, 24722, 25152, 25246, 24864, 24863, 24862, 24861, 24751, 24749, 24755, 24754, 24753, 24762, 24761, 24760, 24764, 24772, 24826, 25962, 25964, 25152, 24933, 24821, 24820, 24819, 24826, 24843, 24864, 24863, 24862, 24861, 24867, 24865, 24875, 24874, 24873, 24872, 24889, 24888, 24887, 24891, 24895, 24894, 24893, 24900, 25966, 25968, 25970, 25972, 25152, 24980, 25152, 24980, 24934, 24933, 24948, 25974, 25976, 25152, 24980, 24994, 24993, 24973, 25152, 24980, 24994, 24993, 24992, 25152, 25007, 25057, 25056, 25055, 25060, 25059, 25058, 25082, 25081, 25080, 25079, 25086, 25978, 25980, 25982, 25152, 25151, 11835, 25152, 11867, 25152, 25151, 25246, 11899, 11900, 25192, 25208, 25207, 25246, 11933, 11934, 11935, 25259, 25284, 25296, 25992, 25994, 25996, 25998, 23123, 23121, 23127, 23125, 26002, 26004, 26006, 26009, 26011, 26013, 26015, 26017, 12067, 12068, 12071, 12072, 26023, 26026, 26028, 26031, 23227, 23225, 12112, 12113, 26035, 26037, 26039, 26042, 12159, 12160, 12164, 12165, 23314, 23312, 26048, 26050, 26052, 26054, 26056, 26058, 26061, 26064, 26066, 26068, 23495, 23493, 23506, 23504, 26071, 26073, 26075, 26078, 26080, 25728, 25727, 25726, 25725, 12427, 12428, 12429, 12454, 12455, 12456, 12507, 12508, 12542, 12543, 12568, 12569, 12570, 25754, 25753, 25752, 25751, 12602, 12603, 12604, 12614, 12615, 12616, 12617, 12620, 24011, 12622, 12627, 12628, 12629, 12630, 12642, 12643, 12644, 12645, 12648, 12649, 12650, 12651, 12655, 12656, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 24011, 12673, 12674, 12686, 12687, 12688, 12689, 24011, 12693, 12694, 12699, 12702, 23749, 23929, 12716, 23931, 12718, 12723, 12724, 12725, 12726, 23623, 12738, 12739, 12740, 12741, 12744, 24011, 12746, 26154, 26156, 12755, 12767, 12768, 12769, 12770, 12773, 12774, 12775, 12776, 12779, 12780, 12781, 12782, 12787, 12788, 12789, 12790, 12791, 12792, 23929, 23749, 23931, 12805, 12806, 12811, 12812, 12813, 12814, 24038, 12817, 12818, 12819, 12844, 12845, 12846, 12871, 12872, 12873, 23666, 23671, 12876, 12877, 23669, 23671, 12880, 12881, 23749, 23929, 12894, 23931, 12896, 23725, 23729, 12903, 12904, 12906, 12907, 12911, 12912, 12913, 12914, 12915, 12916, 12917, 12918, 12919, 12920, 12921, 12922, 12923, 12924, 12925, 12926, 12936, 12937, 12940, 12941, 12943, 12946, 12947, 12948, 12949, 12950, 23686, 12963, 12964, 23749, 12968, 12969, 13023, 13068, 23715, 23739, 13076, 13077, 13086, 13087, 23826, 23854, 13092, 13093, 23725, 23729, 13100, 13101, 23739, 23741, 13109, 13110, 23929, 23826, 23931, 13124, 13125, 23745, 13129, 13130, 23929, 23749, 13143, 23931, 13145, 23757, 13149, 13150, 13167, 26257, 13208, 26260, 13259, 13283, 13284, 13289, 13290, 13300, 13301, 13302, 13303, 13306, 13307, 13308, 13309, 23864, 23871, 13318, 23823, 13320, 13331, 13332, 23826, 13336, 13337, 23854, 23840, 23871, 13347, 13348, 23844, 13361, 13362, 13363, 13364, 13367, 13368, 23854, 23864, 23871, 13378, 13379, 13380, 13381, 13424, 13425, 13426, 13458, 13459, 13460, 13474, 13475, 13500, 13501, 13502, 13527, 13528, 13555, 13556, 13595, 13596, 13597, 23929, 23931, 13611, 13612, 13613, 13614, 24038, 13627, 13628, 23942, 13633, 13636, 13637, 13638, 13639, 13640, 13652, 13653, 24011, 13658, 13661, 13662, 13663, 13664, 13665, 13677, 13678, 24011, 13683, 13684, 23969, 13689, 13690, 13702, 13703, 13706, 13707, 13711, 24038, 13713, 13724, 13725, 13728, 13729, 13732, 13733, 13734, 13735, 13739, 13740, 13741, 13742, 13753, 13754, 24011, 13759, 13762, 13763, 13764, 13765, 13766, 24028, 13778, 13779, 13783, 13784, 24038, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 27065, 26795, 26815, 27067, 26863, 26873, 26368, 26805, 26718, 26785, 26802, 26615, 26369, 26790, 26710, 26750, 26515, 9677, 9678, 26818, 26752, 26751, 26387, 26755, 26721, 26839, 26812, 26837, 26708, 26660, 26723, 26613, 26673, 26672, 26694, 26392, 26761, 26486, 9698, 9699, 26379, 26370, 26724, 26805, 26746, 26718, 26804, 26831, 26369, 26791, 26720, 26667, 26426, 9713, 9714, 26753, 26752, 26388, 26843, 26755, 26721, 26813, 26811, 26509, 26435, 26760, 26668, 26613, 26673, 26672, 26675, 26674, 26396, 26735, 26485, 26439, 9736, 9737, 26716, 26379, 26370, 26787, 26709, 26786, 26785, 26643, 26788, 26791, 26720, 26644, 26710, 9751, 26792, 26753, 26752, 26751, 26711, 26755, 26721, 26758, 26742, 26389, 26793, 26759, 26372, 26613, 26452, 26451, 9768, 9769, 26762, 26396, 9772, 9773, 26432, 26714, 26715, 26371, 26787, 26709, 26786, 26785, 26643, 26788, 26791, 26720, 26644, 26710, 9788, 26792, 26753, 26752, 26751, 26711, 26755, 26721, 26758, 26742, 26389, 26793, 26759, 26372, 26452, 26451, 26395, 9805, 9806, 26762, 26396, 9809, 9810, 26373, 26714, 26715, 26374, 26805, 26718, 26804, 26787, 26643, 26375, 26791, 26739, 26720, 26376, 9825, 9826, 26818, 26752, 26751, 26387, 26755, 26721, 26758, 26742, 26389, 26793, 26393, 26668, 26673, 26438, 26448, 9842, 9843, 26396, 26392, 9846, 9847, 26680, 26377, 26725, 26663, 26805, 26746, 26718, 26785, 26615, 26434, 26791, 26790, 26710, 26750, 9862, 9863, 26818, 26753, 26752, 26751, 26755, 26721, 26813, 26839, 26812, 26742, 26760, 26759, 26613, 26672, 26451, 26675, 26392, 26761, 26679, 9883, 9884, 26716, 26379, 26378, 26381, 26380, 26383, 26382, 26805, 26746, 26733, 26803, 26719, 26681, 26667, 26616, 26750, 26384, 9906, 9907, 26818, 26752, 26388, 26387, 26755, 26754, 26389, 26435, 26836, 26659, 26759, 26393, 26612, 26671, 26385, 26661, 26386, 26396, 26392, 26486, 26679, 26488, 26680, 26487, 25730, 26805, 26746, 26733, 26803, 26719, 26681, 26667, 26616, 26750, 26748, 9945, 9946, 26818, 26752, 26388, 26387, 26755, 26754, 26758, 26742, 26389, 26435, 26759, 26394, 26612, 26390, 26671, 26391, 26661, 26396, 26392, 26679, 26427, 26488, 26680, 26487, 25733, 26718, 26804, 26665, 26433, 26615, 26434, 26791, 26739, 26720, 26790, 9984, 9985, 26818, 26753, 26751, 26734, 26755, 26721, 26758, 26813, 26839, 26742, 26759, 26393, 26612, 26673, 26613, 26769, 26430, 26396, 26762, 26540, 26427, 26488, 26440, 10009, 10010, 10011, 26718, 26804, 26665, 26433, 26615, 26434, 26791, 26739, 26720, 26790, 10022, 10023, 26818, 26753, 26752, 26751, 26755, 26721, 26758, 26813, 26839, 26659, 26759, 26394, 26612, 26673, 26395, 26769, 26743, 26396, 26762, 26540, 26439, 26680, 10046, 10047, 10048, 10049, 10050, 10051, 26398, 26397, 26760, 26759, 26853, 10068, 26399, 26703, 26400, 10072, 26707, 26706, 26804, 26803, 26657, 26429, 26643, 26806, 26791, 26810, 26666, 10094, 10095, 26813, 26839, 26509, 26401, 26795, 26402, 26818, 26817, 26816, 26819, 26645, 26689, 10108, 26693, 26692, 26691, 26850, 26512, 26617, 27125, 26746, 26718, 26804, 26433, 26682, 26643, 26791, 26810, 26666, 26792, 10127, 26813, 26839, 26794, 26812, 26796, 26795, 26817, 26816, 26798, 26819, 26846, 26651, 26801, 26693, 26692, 26691, 26403, 26512, 26617, 27128, 26676, 26613, 26612, 26673, 26404, 26617, 27130, 26406, 26405, 26408, 26407, 26412, 26411, 26410, 26409, 26414, 26413, 26863, 26702, 26873, 26640, 26415, 26418, 26417, 26416, 26419, 26565, 26872, 26568, 26703, 26702, 27024, 27023, 27022, 27021, 27026, 26420, 27030, 27029, 27028, 27027, 27032, 27031, 27035, 27034, 27033, 10354, 27038, 27037, 27036, 10360, 10361, 27042, 27041, 27040, 27039, 26421, 27044, 27047, 27046, 27045, 27049, 27048, 26422, 26962, 27054, 27053, 27057, 27056, 26423, 26424, 27061, 27060, 26915, 27063, 27062, 26733, 26657, 26429, 26431, 26807, 26425, 26791, 26810, 26750, 26426, 10412, 10413, 26758, 26839, 26756, 26708, 26795, 26484, 26818, 26753, 26752, 26751, 26551, 26845, 26736, 26735, 26485, 26427, 26488, 26487, 26680, 26716, 26663, 26428, 26657, 26429, 26431, 26737, 26719, 26738, 26791, 26810, 26739, 26750, 10446, 10447, 26813, 26839, 26742, 26836, 26795, 26436, 26818, 26753, 26751, 26734, 26551, 26845, 26612, 26613, 26447, 26661, 26430, 26488, 26487, 26432, 26716, 26715, 26663, 26805, 26746, 26733, 26431, 26719, 26807, 26810, 26739, 26750, 26515, 10481, 10482, 26758, 26813, 26757, 26722, 26814, 26484, 26818, 26753, 26752, 26751, 26437, 26537, 26438, 26448, 26447, 26675, 26674, 26736, 26762, 26486, 26485, 26488, 26487, 26432, 27164, 26746, 26733, 26786, 26433, 26807, 26434, 26810, 26750, 26809, 26748, 10520, 10521, 26758, 26813, 26742, 26435, 26795, 26436, 26818, 26753, 26752, 26751, 26551, 26437, 26673, 26438, 26613, 26675, 26674, 26736, 26762, 26485, 26439, 26680, 26488, 26440, 27169, 26442, 26441, 26444, 26443, 10555, 26830, 26829, 26828, 26719, 26807, 26546, 26545, 26666, 10564, 10565, 26758, 26547, 26684, 26534, 26549, 26445, 26842, 26844, 26669, 26537, 26446, 26612, 26448, 26447, 26674, 26449, 26554, 26555, 26558, 26557, 10588, 26829, 26664, 26828, 26450, 26681, 26546, 26508, 26666, 10597, 10598, 26758, 26547, 26684, 26534, 26550, 26549, 26844, 26669, 26842, 26552, 26551, 26613, 26452, 26451, 26674, 26553, 26555, 26554, 26558, 26557, 26454, 26453, 26456, 26455, 27032, 27031, 27035, 27034, 26457, 10653, 10654, 26459, 26458, 26463, 26462, 26461, 26460, 26465, 26464, 26469, 26468, 26467, 26466, 26472, 26471, 26470, 10708, 10709, 26474, 26473, 26475, 26675, 26674, 26476, 10733, 26479, 26478, 26477, 10737, 26480, 26482, 26481, 26483, 10752, 26795, 26484, 26551, 26845, 26612, 26673, 26613, 26486, 26485, 26680, 26488, 26487, 10768, 10769, 26490, 26489, 26493, 26492, 26491, 26494, 26496, 26495, 26497, 26499, 26498, 26500, 10793, 26503, 26502, 26501, 26504, 26611, 10800, 26505, 10802, 26532, 26506, 26533, 26508, 26507, 10808, 10809, 26535, 26548, 26547, 26509, 26511, 26510, 26818, 26844, 26687, 26670, 26538, 26539, 10822, 26673, 26672, 26671, 26850, 26617, 26512, 26544, 26514, 26513, 26611, 26830, 26829, 10835, 26719, 26807, 26546, 26533, 26515, 10841, 10842, 26758, 26813, 26839, 26838, 26550, 26549, 26818, 26816, 26817, 26552, 26551, 26689, 26853, 26612, 26693, 26691, 26851, 26617, 26517, 26516, 26519, 26518, 26521, 26520, 26522, 10868, 26524, 26523, 26528, 26527, 26526, 26525, 26529, 26611, 10889, 26830, 26530, 26532, 26531, 26546, 26533, 26545, 10897, 10898, 26758, 26535, 26547, 26534, 26550, 26536, 26688, 26669, 26687, 26538, 26537, 26539, 26540, 26678, 26680, 26542, 26541, 26544, 26543, 26611, 26830, 26829, 10921, 26719, 26807, 26546, 26545, 26808, 10927, 10928, 26548, 26547, 26684, 26683, 26550, 26549, 26842, 26844, 26669, 26552, 26551, 26612, 26673, 26613, 26553, 26694, 26555, 26554, 26556, 26558, 26557, 26559, 26560, 26562, 26561, 26702, 26565, 26564, 26563, 26567, 26566, 26873, 26640, 26872, 26568, 26572, 26571, 26570, 26569, 26574, 26573, 26576, 26575, 26580, 26579, 26578, 26577, 26583, 26582, 26581, 11022, 11023, 11024, 11025, 26585, 26584, 26589, 26588, 26587, 26586, 26592, 26591, 26590, 11035, 11036, 11037, 11038, 26594, 26593, 26597, 26596, 26595, 11044, 11045, 26599, 26598, 26602, 26601, 26600, 27265, 26605, 26604, 26603, 27267, 26607, 26606, 26610, 26609, 26608, 26611, 26830, 26829, 11143, 26832, 26831, 26834, 26833, 26641, 11149, 11150, 26758, 26813, 26839, 26838, 26815, 26814, 26842, 26844, 26843, 26845, 26645, 26676, 26853, 11164, 26612, 26673, 26613, 26851, 26850, 26617, 26614, 25950, 26611, 26829, 11177, 26664, 26832, 26831, 26834, 26833, 26641, 11184, 11185, 26758, 26839, 26838, 26756, 26795, 26815, 26842, 26844, 26843, 26846, 26845, 26676, 26853, 11199, 26613, 26612, 26673, 26851, 26850, 26617, 26614, 25953, 26718, 26665, 26657, 26737, 26807, 26806, 26810, 26616, 26808, 11219, 11220, 26813, 26839, 26794, 26812, 26795, 26815, 26816, 26817, 26798, 26819, 26846, 26693, 26692, 26691, 26823, 26800, 26689, 11238, 26801, 26614, 27288, 26805, 26746, 26718, 26804, 26682, 26615, 26666, 26616, 26658, 11252, 26792, 26794, 26812, 26793, 26713, 26796, 26795, 26799, 26711, 26797, 26819, 26846, 26693, 26692, 26691, 26823, 26800, 26689, 11271, 26801, 26617, 27292, 26619, 26618, 11278, 26621, 26620, 26622, 26624, 26623, 26625, 26627, 26626, 11287, 26629, 26628, 26630, 26632, 26631, 26633, 26636, 26635, 26634, 26638, 26637, 11299, 26639, 11301, 26707, 26640, 26805, 26746, 26718, 26804, 26807, 26682, 26791, 26834, 26641, 11317, 11318, 26758, 26684, 26713, 26722, 26686, 26685, 26842, 26818, 26688, 26819, 26846, 26693, 26648, 26647, 26650, 26649, 26651, 26853, 11337, 26642, 11339, 11340, 11341, 11342, 26718, 26804, 26787, 26709, 26643, 26788, 26791, 26644, 26835, 11352, 26792, 26758, 26813, 26839, 26684, 26686, 26685, 26818, 26688, 26842, 26819, 26645, 26648, 26647, 26646, 26650, 26649, 26651, 26853, 11372, 26652, 11374, 11375, 11376, 11377, 26654, 26653, 11380, 11381, 11382, 11383, 11384, 26655, 26863, 11387, 11388, 11389, 11390, 26656, 26873, 26746, 26733, 26786, 26657, 26719, 26807, 26791, 26739, 26750, 26658, 11403, 11404, 26818, 26753, 26752, 26751, 26755, 26721, 26758, 26839, 26837, 26659, 26760, 26660, 26736, 26762, 26764, 26763, 26767, 26766, 26765, 26662, 26661, 26772, 26771, 26744, 26716, 26715, 26663, 26829, 26805, 26665, 26664, 26807, 26832, 26667, 26833, 26666, 11447, 11448, 26813, 26839, 26684, 26683, 26668, 26723, 26842, 26688, 26669, 26670, 26845, 26673, 26672, 26671, 26675, 26674, 26676, 26679, 26678, 26680, 26697, 11470, 11471, 11472, 26805, 26746, 26718, 26804, 26682, 26681, 26835, 26834, 26833, 26792, 11483, 26813, 26839, 26684, 26683, 26686, 26685, 26688, 26687, 26843, 26819, 26846, 26689, 26690, 11497, 26693, 26692, 26691, 26695, 26694, 26697, 26696, 11505, 11506, 11507, 11508, 11509, 11510, 26698, 11512, 11513, 11514, 11515, 26699, 26701, 26700, 26703, 26702, 11521, 11522, 11523, 11524, 11525, 11526, 11527, 26704, 26705, 11530, 26707, 26706, 26718, 26709, 26717, 26745, 26747, 26738, 26791, 26720, 26710, 26749, 11559, 11560, 26753, 26752, 26711, 26740, 26755, 26721, 26839, 26713, 26741, 26708, 26760, 26759, 26767, 26766, 26765, 26769, 26768, 26771, 26770, 26716, 26715, 26714, 26718, 26709, 26717, 26745, 26747, 26738, 26791, 26720, 26710, 26749, 11593, 11594, 26753, 26752, 26711, 26740, 26755, 26721, 26839, 26742, 26713, 26712, 26760, 26759, 26767, 26766, 26765, 26769, 26768, 26772, 26716, 26715, 26714, 26805, 26718, 26733, 26717, 26719, 26831, 26791, 26810, 26739, 26720, 11626, 11627, 26818, 26753, 26752, 26740, 26755, 26721, 26813, 26741, 26757, 26722, 26759, 26723, 26762, 26736, 26764, 26763, 26771, 26744, 26772, 26726, 26725, 26724, 26727, 11651, 26729, 26728, 26732, 26731, 26730, 26805, 26733, 26786, 26802, 26807, 26747, 26739, 26750, 26749, 26809, 11674, 11675, 26818, 26753, 26740, 26734, 26755, 26754, 26813, 26839, 26742, 26741, 26760, 26759, 26736, 26735, 26764, 26763, 26771, 26744, 26772, 11695, 11696, 11697, 26805, 26786, 26802, 26737, 26747, 26738, 26739, 26750, 26749, 26809, 11708, 11709, 26818, 26753, 26752, 26740, 26755, 26754, 26813, 26839, 26742, 26741, 26760, 26759, 26767, 26766, 26765, 26769, 26743, 26771, 26744, 26772, 11730, 11731, 11732, 26805, 26746, 26786, 26745, 26807, 26747, 26791, 26750, 26749, 26748, 11743, 11744, 26818, 26753, 26752, 26751, 26755, 26754, 26758, 26839, 26757, 26756, 26760, 26759, 26762, 26761, 26764, 26763, 26767, 26766, 26765, 26769, 26768, 26772, 26771, 26770, 11769, 11770, 11771, 11772, 11773, 11774, 26774, 26773, 26776, 26775, 26779, 26778, 26777, 11782, 11783, 11784, 11785, 11786, 26780, 26782, 26781, 26784, 26783, 26805, 26787, 26786, 26785, 26807, 26788, 26791, 26790, 26789, 11813, 11814, 26813, 26794, 26812, 26793, 26796, 26795, 26818, 26816, 26799, 26819, 26846, 26822, 26821, 26820, 26800, 26824, 26801, 26827, 26826, 26825, 26805, 26787, 26786, 26785, 26807, 26788, 26791, 26790, 26789, 11845, 26792, 26813, 26794, 26812, 26793, 26796, 26795, 26799, 26798, 26797, 26819, 26846, 26822, 26821, 26820, 26800, 26824, 26801, 26826, 26825, 26827, 26805, 26804, 26803, 26802, 26807, 26806, 26810, 26809, 26808, 11877, 11878, 26813, 26839, 26812, 26811, 26815, 26814, 26818, 26817, 26816, 26819, 26846, 26822, 26821, 26820, 26823, 26824, 11895, 26827, 26826, 26825, 27397, 26830, 26829, 11903, 26828, 26832, 26831, 26835, 26834, 26833, 11910, 11911, 26839, 26838, 26837, 26836, 26841, 26840, 26844, 26843, 26842, 26846, 26845, 26849, 26848, 26847, 26851, 26850, 26852, 26853, 11930, 26855, 26854, 27403, 26857, 26856, 11938, 26859, 26858, 26860, 26862, 26861, 26863, 26866, 26865, 26864, 11948, 26869, 26868, 26867, 26870, 26871, 11954, 26873, 26872, 27024, 27023, 27022, 27021, 27026, 27025, 27030, 27029, 27028, 27027, 26875, 26874, 27038, 27037, 27036, 11994, 11995, 11996, 11997, 26879, 26878, 26877, 26876, 27049, 27048, 27057, 26880, 27056, 26881, 26883, 26882, 26887, 26886, 26885, 26884, 26888, 26890, 26889, 26891, 26892, 26893, 26895, 26894, 26897, 26896, 27425, 26899, 26898, 27427, 26903, 26902, 26901, 26900, 26905, 26904, 26909, 26908, 26907, 26906, 26911, 26910, 26914, 26913, 26912, 27061, 27060, 26915, 26917, 26916, 12110, 12111, 27435, 26921, 26920, 26919, 26918, 27044, 27043, 26925, 26924, 26923, 26922, 26927, 26926, 26931, 26930, 26929, 26928, 26933, 26932, 26937, 26936, 26935, 26934, 26939, 26938, 26943, 26942, 26941, 26940, 26945, 26944, 26948, 26947, 26946, 27441, 26951, 26950, 26949, 27443, 26954, 26953, 26952, 12169, 12170, 26958, 26957, 26956, 26955, 26960, 26959, 27047, 27046, 27045, 26961, 27052, 26962, 27054, 27053, 26966, 26965, 26964, 26963, 26968, 26967, 26971, 26970, 26969, 26973, 26972, 26974, 26978, 26977, 26976, 26975, 26979, 26983, 26982, 26981, 26980, 26985, 26984, 26988, 26987, 26986, 26990, 26989, 26993, 26992, 26991, 26995, 26994, 26997, 26996, 26999, 26998, 27003, 27002, 27001, 27000, 27005, 27004, 27009, 27008, 27007, 27006, 27011, 27010, 27012, 27014, 27016, 27015, 27018, 27017, 27019, 27063, 27062, 27024, 27023, 27022, 27021, 27026, 27025, 27030, 27029, 27028, 27027, 27032, 27031, 27035, 27034, 27033, 12331, 12332, 27038, 27037, 27036, 12336, 12337, 27042, 27041, 27040, 27039, 27044, 27043, 27047, 27046, 27045, 27049, 27048, 27052, 27051, 27050, 27054, 27053, 27057, 27056, 27055, 27058, 27061, 27060, 27059, 27063, 27062, 12423, 12424, 12425, 12426, 27470, 27352, 27351, 27120, 27350, 27473, 27323, 27322, 27361, 27360, 27476, 27117, 27116, 27115, 27478, 27352, 27351, 27120, 27350, 27480, 12598, 12599, 12600, 12601, 27487, 27490, 27492, 12621, 27452, 21455, 27454, 27453, 27497, 27499, 27132, 27420, 27501, 27503, 27505, 27507, 27134, 27133, 21436, 27509, 27143, 27137, 27136, 27511, 27513, 27516, 27519, 27521, 12672, 21455, 21436, 27526, 27528, 12692, 27452, 21455, 27454, 27422, 26138, 27421, 27420, 12712, 12713, 12717, 27461, 27417, 27460, 27147, 27540, 12727, 27542, 27418, 27545, 27547, 12745, 27452, 21455, 27454, 27422, 27552, 27455, 27421, 27555, 27557, 27559, 27561, 27142, 27141, 27563, 27565, 27143, 27145, 27144, 21436, 27567, 27570, 12800, 12801, 12804, 27461, 27417, 27460, 27147, 27578, 12815, 27580, 27464, 27583, 27189, 27187, 27171, 27186, 27586, 27148, 27189, 27188, 27187, 27589, 12874, 12875, 27594, 12878, 12879, 27598, 27455, 12890, 12891, 12895, 27203, 27202, 12899, 27452, 27417, 12902, 27607, 27149, 27609, 27611, 27613, 27615, 27617, 27619, 27621, 27623, 27625, 27627, 27629, 27452, 27454, 27422, 27633, 27635, 27455, 27423, 12960, 27638, 27156, 27155, 12967, 27641, 27217, 27216, 27215, 27189, 27187, 27171, 27186, 26232, 27185, 27184, 27183, 27182, 27189, 27188, 27187, 27186, 26235, 13071, 27261, 27190, 27419, 13075, 27647, 27191, 13088, 27649, 13091, 27262, 27194, 13096, 27461, 27195, 13099, 27657, 27439, 27198, 27197, 27196, 13107, 13108, 27661, 27431, 13119, 13120, 13123, 27452, 27417, 13128, 27669, 27199, 13139, 13140, 13144, 27203, 27202, 13148, 27677, 27204, 27210, 27209, 27208, 27207, 27230, 27229, 27228, 27212, 27217, 27216, 27215, 27231, 27230, 27229, 27228, 27231, 27230, 27229, 27228, 27241, 27240, 27239, 27238, 27684, 27245, 27244, 27243, 27242, 27686, 27688, 27690, 27692, 27694, 27246, 27261, 27419, 13313, 27428, 27248, 27247, 13317, 13319, 27249, 13333, 27701, 13338, 27704, 27262, 27261, 27260, 13342, 27461, 27417, 27452, 13346, 13349, 27709, 27263, 27712, 27714, 13369, 27716, 27270, 27269, 27268, 13373, 27428, 27272, 27271, 13377, 27721, 27723, 27273, 27410, 27409, 27297, 27408, 27725, 27352, 27351, 27350, 27349, 27728, 27323, 27322, 27731, 27352, 27351, 27350, 27349, 27733, 27361, 27360, 27736, 27387, 27386, 27385, 27738, 27411, 27410, 27409, 27408, 27740, 13605, 13608, 27417, 27416, 27745, 13615, 27747, 27418, 27464, 27750, 13631, 27452, 27419, 27453, 27755, 27757, 27421, 27420, 27759, 13656, 27452, 27454, 27422, 27764, 27766, 27423, 27768, 13681, 27428, 27771, 27430, 27429, 21715, 13688, 27431, 27455, 27776, 27778, 27437, 27436, 21715, 13712, 27439, 27783, 27785, 27447, 27446, 27787, 27789, 27448, 27450, 27449, 27791, 27793, 27451, 27795, 13757, 27452, 27454, 27453, 27800, 27802, 27455, 13775, 27805, 27461, 27460, 21739, 13785, 27807, 27464, 27463, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 9656, 9657, 9664, 9665, 9666, 9667, 9668, 9669, 9670, 9671, 9672, 9673, 9674, 9675, 9676, 27858, 9679, 9680, 9681, 9682, 9683, 9684, 9685, 9686, 9687, 9688, 9689, 9690, 9691, 9692, 9693, 9694, 9695, 9696, 9697, 27879, 9700, 9701, 9702, 9703, 9704, 9705, 9706, 9707, 9708, 9709, 9710, 9711, 9712, 27894, 9715, 9716, 9717, 9718, 9719, 9720, 9721, 9722, 9723, 9724, 9725, 9726, 9727, 9728, 9729, 9730, 9731, 9732, 9733, 9734, 9735, 27917, 9738, 9739, 9740, 9741, 9742, 9743, 9744, 9745, 9746, 9747, 9748, 9749, 9750, 9752, 9753, 9754, 9755, 9756, 9757, 9758, 9759, 9760, 9761, 9762, 9763, 9764, 9765, 9766, 9767, 27949, 9770, 9771, 27953, 9774, 9775, 9776, 9777, 9778, 9779, 9780, 9781, 9782, 9783, 9784, 9785, 9786, 9787, 9789, 9790, 9791, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9802, 9803, 9804, 27986, 9807, 9808, 27990, 9811, 9812, 9813, 9814, 9815, 9816, 9817, 9818, 9819, 9820, 9821, 9822, 9823, 9824, 28006, 9827, 9828, 9829, 9830, 9831, 9832, 9833, 9834, 9835, 9836, 9837, 9838, 9839, 9840, 9841, 28023, 9844, 9845, 28027, 9848, 9849, 9850, 9851, 9852, 9853, 9854, 9855, 9856, 9857, 9858, 9859, 9860, 9861, 28043, 9864, 9865, 9866, 9867, 9868, 9869, 9870, 9871, 9872, 9873, 9874, 9875, 9876, 9877, 9878, 9879, 9880, 9881, 9882, 28064, 9885, 9886, 9887, 9888, 9889, 9890, 9891, 9896, 9897, 9898, 9899, 9900, 9901, 9902, 9903, 9904, 9905, 28083, 9908, 9909, 9910, 9911, 9912, 9913, 9914, 9915, 9916, 9917, 9918, 9919, 9920, 9921, 9922, 9923, 9924, 9925, 9926, 9927, 9928, 9929, 9930, 9931, 25731, 9935, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9944, 28120, 9947, 9948, 9949, 9950, 9951, 9952, 9953, 9954, 9955, 9956, 9957, 9958, 9959, 9960, 9961, 9962, 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 25734, 9974, 9975, 9976, 9977, 9978, 9979, 9980, 9981, 9982, 9983, 28157, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 28182, 10012, 10013, 10014, 10015, 10016, 10017, 10018, 10019, 10020, 10021, 28195, 10024, 10025, 10026, 10027, 10028, 10029, 10030, 10031, 10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044, 10045, 28219, 28222, 10052, 10053, 10065, 10066, 10067, 10069, 10070, 10071, 10073, 10074, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 28246, 10096, 10097, 10098, 10099, 10100, 10101, 10102, 10103, 10104, 10105, 10106, 10107, 10109, 10110, 10111, 10112, 10113, 10114, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142, 10143, 10144, 10145, 10146, 10149, 10150, 10151, 10152, 10153, 10154, 27131, 10210, 10211, 10212, 10213, 10225, 10226, 10227, 10228, 10229, 10230, 10287, 10288, 10289, 10290, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10319, 10320, 10339, 10340, 10341, 10342, 10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 27151, 10357, 10358, 10359, 28349, 10362, 10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10380, 10381, 10382, 10383, 10384, 10385, 10386, 10387, 10388, 10402, 10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 28385, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422, 10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442, 10443, 10444, 10445, 28419, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462, 10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 28454, 10483, 10484, 10485, 10486, 10487, 10488, 10489, 10490, 10491, 10492, 10493, 10494, 10495, 10496, 10497, 10498, 10499, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 27165, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10517, 10518, 10519, 28491, 10522, 10523, 10524, 10525, 10526, 10527, 10528, 10529, 10530, 10531, 10532, 10533, 10534, 10535, 10536, 10537, 10538, 10539, 10540, 10541, 10542, 10543, 10544, 10545, 27170, 10549, 10550, 10551, 10552, 10556, 10557, 10558, 10559, 10560, 10561, 10562, 10563, 28531, 10566, 10567, 10568, 10569, 10570, 10571, 10572, 10573, 10574, 10575, 10576, 10577, 10578, 10579, 10580, 10581, 10582, 10583, 10585, 10586, 10589, 10590, 10591, 10592, 10593, 10594, 10595, 10596, 28562, 10599, 10600, 10601, 10602, 10603, 10604, 10605, 10606, 10607, 10608, 10609, 10610, 10611, 10612, 10613, 10614, 10615, 10616, 10618, 10619, 10629, 10630, 10631, 10632, 10648, 10649, 10650, 10651, 10652, 28593, 10655, 10656, 10673, 10674, 10675, 10676, 10677, 10678, 10701, 10702, 10703, 10704, 10705, 10706, 10707, 28610, 10710, 10711, 10712, 10730, 10731, 10732, 10734, 10735, 10736, 10738, 10749, 10750, 10751, 10756, 10757, 10758, 10759, 10760, 10761, 10762, 10763, 10764, 10765, 10766, 10767, 28640, 10770, 10771, 10772, 10773, 10774, 10786, 10787, 10788, 10789, 10790, 10791, 10792, 10794, 10795, 10796, 10797, 10799, 10801, 10803, 10804, 10805, 10806, 10807, 28668, 10810, 10811, 10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 10820, 10821, 10823, 10824, 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10834, 10836, 10837, 10838, 10839, 10840, 28701, 10843, 10844, 10845, 10846, 10847, 10848, 10849, 10850, 10851, 10852, 10853, 10854, 10855, 10856, 10857, 10858, 10859, 10860, 10861, 10862, 10863, 10864, 10865, 10866, 10867, 10869, 10870, 10871, 10872, 10873, 10874, 10875, 10888, 10890, 10891, 10892, 10893, 10894, 10895, 10896, 28745, 10899, 10900, 10901, 10902, 10903, 10904, 10905, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913, 10914, 10915, 10916, 10917, 10918, 10919, 10920, 10922, 10923, 10924, 10925, 10926, 28775, 10929, 10930, 10931, 10932, 10933, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 10941, 10942, 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10988, 10989, 10990, 10991, 10992, 10993, 10994, 10995, 11015, 11016, 11017, 11018, 11019, 11020, 11021, 28827, 28829, 11026, 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 28840, 28842, 11039, 11040, 11041, 11042, 11043, 28849, 11046, 11047, 11083, 11084, 11085, 11088, 11089, 11090, 11093, 11094, 11095, 11096, 11097, 11140, 11141, 11142, 11144, 11145, 11146, 11147, 11148, 28875, 11151, 11152, 11153, 11154, 11155, 11156, 11157, 11158, 11159, 11160, 11161, 11162, 11163, 11165, 11166, 11167, 11168, 11169, 11170, 11171, 25951, 11175, 11176, 11178, 11179, 11180, 11181, 11182, 11183, 28908, 11186, 11187, 11188, 11189, 11190, 11191, 11192, 11193, 11194, 11195, 11196, 11197, 11198, 11200, 11201, 11202, 11203, 11204, 11205, 11206, 25954, 11210, 11211, 11212, 11213, 11214, 11215, 11216, 11217, 11218, 28941, 11221, 11222, 11223, 11224, 11225, 11226, 11227, 11228, 11229, 11230, 11231, 11232, 11233, 11234, 11235, 11236, 11237, 11239, 11240, 11243, 11244, 11245, 11246, 11247, 11248, 11249, 11250, 11251, 11253, 11254, 11255, 11256, 11257, 11258, 11259, 11260, 11261, 11262, 11263, 11264, 11265, 11266, 11267, 11268, 11269, 11270, 11272, 11273, 11276, 11277, 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, 11296, 11297, 11298, 11300, 11302, 11303, 11308, 11309, 11310, 11311, 11312, 11313, 11314, 11315, 11316, 29033, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11338, 29055, 29057, 11343, 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11353, 11354, 11355, 11356, 11357, 11358, 11359, 11360, 11361, 11362, 11363, 11364, 11365, 11366, 11367, 11368, 11369, 11370, 11371, 11373, 29090, 29092, 11378, 11379, 29096, 29098, 11385, 11386, 29103, 11391, 11392, 11393, 11394, 11395, 11396, 11397, 11398, 11399, 11400, 11401, 11402, 29119, 11405, 11406, 11407, 11408, 11409, 11410, 11411, 11412, 11413, 11414, 11415, 11416, 11417, 11418, 11419, 11420, 11421, 11422, 11423, 11424, 11425, 11426, 11427, 11428, 11429, 11430, 11431, 11438, 11439, 11440, 11441, 11442, 11443, 11444, 11445, 11446, 29157, 11449, 11450, 11451, 11452, 11453, 11454, 11455, 11456, 11457, 11458, 11459, 11460, 11461, 11462, 11463, 11464, 11465, 11466, 11467, 11468, 11469, 29180, 11473, 11474, 11475, 11476, 11477, 11478, 11479, 11480, 11481, 11482, 11484, 11485, 11486, 11487, 11488, 11489, 11490, 11491, 11492, 11493, 11494, 11495, 11496, 11498, 11499, 11500, 11501, 11502, 11503, 11504, 29215, 29217, 29219, 11511, 29222, 29224, 11516, 11517, 11518, 11519, 11520, 29231, 29235, 11528, 11529, 11531, 11532, 11549, 11550, 11551, 11552, 11553, 11554, 11555, 11556, 11557, 11558, 29253, 11561, 11562, 11563, 11564, 11565, 11566, 11567, 11568, 11569, 11570, 11571, 11572, 11573, 11574, 11575, 11576, 11577, 11578, 11579, 11580, 11581, 11582, 11583, 11584, 11585, 11586, 11587, 11588, 11589, 11590, 11591, 11592, 29287, 11595, 11596, 11597, 11598, 11599, 11600, 11601, 11602, 11603, 11604, 11605, 11606, 11607, 11608, 11609, 11610, 11611, 11612, 11613, 11614, 11615, 11616, 11617, 11618, 11619, 11620, 11621, 11622, 11623, 11624, 11625, 29320, 11628, 11629, 11630, 11631, 11632, 11633, 11634, 11635, 11636, 11637, 11638, 11639, 11640, 11641, 11642, 11643, 11644, 11645, 11646, 11647, 11648, 11649, 11650, 11652, 11653, 11654, 11655, 11656, 11664, 11665, 11666, 11667, 11668, 11669, 11670, 11671, 11672, 11673, 29361, 11676, 11677, 11678, 11679, 11680, 11681, 11682, 11683, 11684, 11685, 11686, 11687, 11688, 11689, 11690, 11691, 11692, 11693, 11694, 29382, 11698, 11699, 11700, 11701, 11702, 11703, 11704, 11705, 11706, 11707, 29395, 11710, 11711, 11712, 11713, 11714, 11715, 11716, 11717, 11718, 11719, 11720, 11721, 11722, 11723, 11724, 11725, 11726, 11727, 11728, 11729, 29417, 11733, 11734, 11735, 11736, 11737, 11738, 11739, 11740, 11741, 11742, 29430, 11745, 11746, 11747, 11748, 11749, 11750, 11751, 11752, 11753, 11754, 11755, 11756, 11757, 11758, 11759, 11760, 11761, 11762, 11763, 11764, 11765, 11766, 11767, 11768, 29456, 29459, 11775, 11776, 11777, 11778, 11779, 11780, 11781, 29469, 29471, 11787, 11788, 11789, 11790, 11791, 11804, 11805, 11806, 11807, 11808, 11809, 11810, 11811, 11812, 29488, 11815, 11816, 11817, 11818, 11819, 11820, 11821, 11822, 11823, 11824, 11825, 11826, 11827, 11828, 11829, 11830, 11831, 11832, 11833, 11834, 11836, 11837, 11838, 11839, 11840, 11841, 11842, 11843, 11844, 11846, 11847, 11848, 11849, 11850, 11851, 11852, 11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11868, 11869, 11870, 11871, 11872, 11873, 11874, 11875, 11876, 29550, 11879, 11880, 11881, 11882, 11883, 11884, 11885, 11886, 11887, 11888, 11889, 11890, 11891, 11892, 11893, 11894, 11896, 11897, 11898, 11901, 11902, 11904, 11905, 11906, 11907, 11908, 11909, 29582, 11912, 11913, 11914, 11915, 11916, 11917, 11918, 11919, 11920, 11921, 11922, 11923, 11924, 11925, 11926, 11927, 11928, 11929, 11931, 11932, 27404, 11936, 11937, 11939, 11940, 11941, 11942, 11943, 11944, 11945, 11946, 11947, 11949, 11950, 11951, 11952, 11953, 11955, 11956, 11979, 11980, 11981, 11982, 11983, 11984, 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 29642, 29644, 11998, 11999, 12000, 12001, 12002, 12003, 12007, 12008, 12009, 12010, 12024, 12025, 12026, 12027, 12028, 12029, 12030, 12052, 12053, 12060, 12061, 12062, 12063, 12064, 12065, 12066, 12069, 12070, 12073, 12074, 12075, 12076, 12077, 12078, 12079, 12080, 12081, 12082, 12083, 12084, 12085, 12086, 12087, 12088, 12089, 12090, 12108, 12109, 29696, 12114, 12115, 12116, 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12161, 12162, 12163, 12166, 12167, 12168, 29740, 12171, 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12181, 12182, 12183, 12184, 12189, 12190, 12191, 12192, 12193, 12194, 12195, 12196, 12197, 12234, 12235, 12236, 12237, 12238, 12239, 12240, 12241, 12242, 12243, 12244, 12245, 12246, 12247, 12248, 12249, 12250, 12251, 12252, 12253, 12254, 12255, 12256, 12257, 12258, 12259, 12260, 12261, 12262, 12263, 12264, 12265, 12266, 12267, 12268, 12269, 12270, 12271, 12272, 12273, 12274, 12275, 12280, 12281, 12282, 12283, 12284, 12285, 12286, 12316, 12317, 12318, 12319, 12320, 12321, 12322, 12323, 12324, 12325, 12326, 12327, 12328, 12329, 12330, 29829, 12333, 12334, 12335, 29834, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345, 12346, 12347, 12348, 12349, 12350, 12351, 12352, 12353, 12357, 12358, 12359, 12360, 12361, 12362, 12363, 12364, 12365, 29861, 29863, 27471, 12450, 12451, 12452, 12453, 27474, 12503, 12504, 12505, 12506, 12539, 12540, 12541, 12564, 12565, 12566, 12567, 27481, 29885, 29887, 27488, 29890, 29891, 12623, 12624, 12625, 12626, 12631, 12632, 29901, 29903, 12652, 12653, 12654, 12657, 12658, 12659, 29915, 27523, 12675, 12676, 29920, 27530, 12695, 12696, 12697, 12698, 26139, 12703, 12704, 29930, 29931, 12719, 12720, 12721, 12722, 29937, 12728, 29941, 29942, 12747, 12748, 12749, 12750, 12756, 12757, 29951, 29953, 12777, 12778, 12783, 12784, 12785, 12786, 29965, 27575, 12807, 12808, 12809, 12810, 29972, 12816, 12840, 12841, 12842, 12843, 27587, 12867, 12868, 12869, 12870, 27590, 12882, 29994, 29995, 12897, 12898, 12900, 12901, 12905, 12942, 12944, 12945, 30019, 12951, 12952, 12965, 12966, 12996, 12997, 12998, 13019, 13020, 13021, 13022, 26233, 13040, 13041, 13042, 13043, 13064, 13065, 13066, 13067, 26236, 13072, 13073, 13074, 13078, 30052, 27652, 13094, 13095, 13097, 13098, 13102, 13104, 13105, 13106, 13111, 30071, 27665, 13126, 13127, 13131, 30079, 30080, 13146, 13147, 13151, 13163, 13164, 13165, 13166, 13188, 13189, 13190, 13191, 13205, 13206, 13207, 13229, 13230, 13231, 13232, 13255, 13256, 13257, 13258, 13279, 13280, 13281, 13282, 13285, 13286, 13287, 13288, 30116, 30118, 13310, 13311, 13312, 13314, 13315, 13316, 30127, 13321, 30129, 30131, 13339, 13340, 13341, 13343, 13344, 13345, 30141, 13350, 30145, 30146, 13370, 13371, 13372, 13374, 13375, 13376, 30157, 13382, 13420, 13421, 13422, 13423, 27726, 13454, 13455, 13456, 13457, 27729, 13472, 13473, 13496, 13497, 13498, 13499, 27734, 13525, 13526, 13552, 13553, 13554, 13591, 13592, 13593, 13594, 27741, 13609, 13610, 30194, 13616, 13617, 13632, 13634, 13635, 30204, 13641, 13642, 13657, 13659, 13660, 30213, 13666, 13682, 13685, 13686, 13687, 27773, 13691, 13692, 13708, 13709, 13710, 30230, 13714, 13730, 13731, 13736, 13737, 13738, 13743, 13758, 13760, 13761, 30250, 13767, 13780, 13781, 13782, 30257, 13786, 13787, 29913, 29912, 29963, 29962, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30273, 30276, 30278, 30280, 30282, 30284, 30286, 30289, 30291, 30293, 30295, 30297, 30299, 30301, 30305, 30309, 30312, 30314, 30316, 30318, 30320, 30323, 30325, 30327, 30329, 30331, 30333, 30335, 30338, 30340, 30342, 30345, 30348, 30350, 30352, 30354, 30356, 30357, 30359, 30361, 30363, 30365, 30367, 30369, 30371, 30375, 30379, 30382, 30384, 30386, 30388, 30390, 30391, 30393, 30395, 30397, 30399, 30401, 30403, 30405, 30409, 30413, 30416, 30418, 30420, 30422, 30424, 30427, 30429, 30431, 30433, 30435, 30437, 30439, 30443, 30447, 30450, 30452, 30454, 30456, 30458, 30461, 30463, 30465, 30467, 30469, 30471, 30473, 30477, 30481, 30484, 30486, 30488, 30490, 30492, 30494, 30496, 30499, 30501, 30503, 30505, 30507, 30509, 30511, 30514, 30516, 30518, 30520, 30524, 30526, 30528, 30530, 30532, 30535, 30537, 30539, 30541, 30543, 30545, 30547, 30550, 30552, 30554, 30556, 30560, 30562, 30564, 30566, 30568, 30571, 30573, 30575, 30577, 30579, 30581, 30583, 30586, 30588, 30590, 30592, 28183, 30595, 30597, 30599, 30601, 30603, 30606, 30608, 30610, 30612, 30614, 30616, 30618, 30621, 30623, 30625, 28220, 28223, 30630, 30632, 28229, 30636, 30638, 30640, 30642, 30644, 30646, 30650, 30652, 30654, 30656, 30659, 30662, 30666, 30668, 30670, 30672, 30674, 28277, 30678, 30680, 30682, 30684, 30687, 30691, 30695, 30698, 30701, 30704, 30706, 30708, 30710, 30712, 30714, 30716, 30719, 30722, 30724, 30726, 30728, 30730, 30732, 30734, 30736, 30738, 30740, 27152, 30744, 30748, 30750, 30752, 30754, 30757, 30759, 30761, 30763, 30767, 30770, 30772, 30774, 30776, 30778, 30780, 30783, 30785, 30787, 30789, 30791, 30793, 30795, 30797, 30799, 30802, 30805, 30807, 30809, 30811, 30813, 30816, 30818, 30820, 30822, 30824, 30826, 30828, 30831, 30833, 30836, 30839, 30841, 30843, 30845, 30847, 30850, 30852, 30854, 30856, 30858, 30860, 30862, 30865, 30867, 30869, 30871, 30875, 30877, 30879, 30881, 30883, 30886, 30888, 30890, 30892, 30894, 30896, 30898, 30901, 30903, 30905, 30907, 30911, 30913, 30914, 30916, 30918, 30920, 30924, 30926, 30928, 30930, 30933, 30935, 30938, 30940, 30942, 30943, 30945, 30947, 30949, 30953, 30955, 30957, 30959, 30962, 30964, 30967, 30969, 30971, 30973, 30975, 30977, 30979, 30983, 30985, 30987, 30989, 30991, 30993, 30995, 30999, 31002, 28617, 31005, 31007, 31009, 28626, 31012, 31014, 31016, 31019, 31021, 31025, 31027, 31031, 31034, 31037, 28659, 28661, 31043, 31045, 31049, 31051, 31053, 31055, 31058, 31061, 31065, 31067, 31070, 28694, 31073, 31075, 31079, 31081, 31083, 31085, 31088, 31092, 31096, 31099, 31101, 31104, 31106, 31108, 28736, 31112, 31114, 31116, 31120, 31122, 31124, 31126, 31129, 31132, 31134, 31137, 31139, 28768, 31142, 31144, 31148, 31150, 31152, 31154, 31157, 31159, 31162, 31164, 31167, 31171, 31173, 31175, 31177, 31179, 31181, 31183, 31185, 31187, 31189, 31191, 31193, 31195, 31198, 31200, 31202, 31204, 31206, 31209, 31211, 31213, 31217, 31219, 31222, 31225, 31227, 31230, 28868, 31233, 31235, 31239, 31241, 31243, 31245, 31248, 28889, 31252, 31255, 31257, 31260, 31261, 31263, 31265, 31269, 31271, 31273, 31275, 31278, 28922, 31282, 31285, 31287, 31290, 31292, 31294, 31296, 31300, 31302, 31304, 31306, 31309, 31311, 31314, 31316, 31319, 31321, 31323, 31325, 31327, 31329, 31331, 31333, 31335, 31338, 31340, 31343, 31345, 31348, 31350, 31353, 31356, 31358, 31361, 31364, 31367, 29020, 31370, 31372, 31374, 31376, 31378, 31382, 31384, 31386, 31388, 31391, 31393, 31396, 29052, 31401, 31403, 31405, 31407, 31409, 31411, 31413, 31415, 31417, 31419, 31422, 31424, 31427, 29087, 31432, 31434, 29099, 29104, 31441, 31443, 31445, 31447, 31449, 31451, 31454, 31456, 31458, 31460, 31462, 31464, 31466, 31468, 31470, 31473, 31475, 31478, 31481, 31483, 31485, 31487, 31491, 31493, 31495, 31497, 31500, 31502, 31505, 31508, 31510, 29181, 31513, 31515, 31517, 31519, 29192, 31523, 31525, 31527, 31529, 31532, 29206, 31536, 31539, 31541, 31543, 31547, 31550, 31552, 29232, 29236, 29239, 31558, 31560, 31562, 31564, 31566, 31568, 31571, 31573, 31575, 31577, 31579, 31581, 31583, 31586, 31588, 31590, 31593, 31595, 31597, 31599, 31601, 31604, 31606, 31608, 31610, 31612, 31614, 31616, 31619, 31622, 31625, 31627, 31629, 31631, 31633, 31636, 31638, 31640, 31642, 31644, 31646, 31648, 31650, 31652, 31655, 29344, 31659, 31661, 31664, 31666, 31668, 31670, 31672, 31675, 31677, 31679, 31681, 31683, 31685, 31687, 31689, 31691, 29383, 31695, 31697, 31699, 31701, 31703, 31706, 31708, 31710, 31712, 31714, 31716, 31718, 31721, 31723, 29418, 31727, 31729, 31731, 31733, 31735, 31738, 31740, 31742, 31744, 31746, 31748, 31750, 31752, 31754, 31757, 31759, 29457, 29460, 31764, 31766, 31768, 31771, 31772, 31774, 31776, 31778, 31780, 31782, 31784, 31788, 31790, 31792, 31794, 31797, 31799, 31805, 31808, 31810, 31812, 31814, 31816, 31818, 31820, 31822, 31824, 31827, 31829, 31835, 31838, 31840, 31842, 31844, 31848, 31850, 31852, 31854, 31857, 31859, 31864, 31867, 31868, 31870, 31872, 31876, 31878, 31880, 31882, 31885, 31887, 31890, 29601, 31894, 31897, 31899, 31902, 31905, 31908, 29623, 31913, 31915, 31917, 31919, 31921, 31923, 31925, 31927, 31932, 31934, 31936, 31938, 31942, 31944, 31946, 31949, 31954, 31956, 31958, 31960, 31962, 31964, 31966, 31968, 31970, 31972, 31975, 31978, 31981, 31983, 31985, 31987, 31989, 31991, 31993, 31995, 31997, 31999, 32001, 32003, 32005, 32007, 32009, 32011, 32014, 32017, 32021, 32023, 32025, 32027, 32031, 32033, 32035, 32037, 32039, 32041, 32044, 32047, 32049, 32052, 32054, 32056, 32058, 32061, 32063, 32066, 32068, 32070, 32072, 32074, 32076, 32078, 32080, 32082, 32086, 32088, 32091, 32093, 32095, 32097, 32099, 32101, 32103, 32105, 32109, 32113, 32115, 32117, 32119, 32122, 32124, 32127, 32129, 32133, 32136, 30660, 30688, 32138, 31435, 32141, 32143, 32146, 32148, 32150, 31544, 32153, 32155, 30660, 30688, 32158, 32083, 27495, 32165, 32167, 32171, 32175, 27524, 32083, 27531, 32185, 32188, 27538, 32192, 32194, 32083, 27550, 32202, 32204, 32208, 32211, 27576, 32216, 32218, 31029, 31089, 32222, 32224, 31059, 31089, 32227, 32229, 27603, 32235, 32237, 32083, 32241, 32244, 32246, 32248, 31059, 31089, 32251, 32253, 32256, 32258, 31059, 31089, 32260, 32262, 32265, 27653, 32271, 32273, 32276, 27666, 32282, 27674, 32287, 32290, 32292, 31029, 31089, 32294, 32296, 32298, 31029, 31089, 32301, 32303, 31059, 31089, 32305, 32307, 31435, 32309, 32311, 32313, 32315, 32319, 32322, 27699, 32329, 32332, 32083, 32339, 32342, 31317, 31346, 32347, 32349, 31435, 32352, 32354, 32357, 31544, 32359, 32361, 32364, 32366, 31802, 31832, 31862, 32369, 32371, 32374, 32377, 32083, 32380, 32383, 32083, 32386, 32391, 27774, 32395, 32397, 27781, 32402, 32405, 32083, 32409, 32413, 32417, 32162, 29907, 13860, 13861, 32389, 32182, 32195, 32199, 29957, 13896, 13897, 32219, 29988, 29991, 30002, 30004, 32389, 32378, 30237, 30242, 32239, 30050, 30061, 30068, 30076, 30084, 32334, 32344, 32378, 32384, 32387, 32389, 30237, 30242, 32407, 32410, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32451, 32454, 32456, 32459, 30302, 30310, 32465, 32468, 32470, 32473, 30336, 30346, 32481, 32484, 32487, 32490, 30372, 30380, 32496, 32499, 32502, 32505, 30406, 30414, 32511, 32514, 32516, 32519, 30440, 30448, 32525, 32528, 32530, 32533, 30474, 30482, 32541, 32544, 32546, 32549, 30512, 30521, 32557, 32560, 32562, 32565, 30548, 30557, 32573, 32576, 32578, 32581, 30584, 32590, 32593, 32595, 32598, 30619, 32612, 30647, 32616, 30657, 30663, 32623, 30675, 32628, 30685, 30692, 30699, 32639, 30720, 32648, 32651, 30741, 30745, 32657, 30755, 30764, 30768, 32667, 32670, 32672, 32675, 30800, 30803, 32682, 32685, 32687, 32690, 30829, 30834, 30837, 32697, 32700, 32702, 32705, 30863, 30872, 32713, 32716, 32718, 32721, 30899, 30908, 32731, 30921, 32735, 30931, 30936, 32744, 30950, 32748, 30960, 30965, 30980, 32762, 32765, 30996, 31006, 31017, 31022, 31028, 31038, 32785, 31046, 32789, 31056, 31062, 31068, 32797, 31076, 32801, 31086, 31093, 31097, 32811, 32813, 31117, 32817, 31127, 31135, 32825, 31145, 32829, 31155, 31160, 32839, 32842, 32844, 32848, 31196, 32853, 31207, 31214, 31220, 31223, 31228, 32864, 31236, 32868, 31246, 31253, 32877, 31266, 32881, 31276, 31283, 32890, 31297, 32894, 31307, 31312, 32902, 31326, 32907, 31336, 31341, 31365, 32925, 31379, 32929, 31389, 31394, 32938, 31410, 32943, 31420, 31425, 32956, 32959, 32961, 32964, 31471, 31476, 31479, 32973, 31488, 32977, 31498, 31503, 32987, 31520, 32992, 31530, 31537, 33009, 33012, 33014, 33017, 31584, 31591, 33024, 33027, 33029, 33032, 31617, 31623, 33038, 33041, 33043, 33046, 31653, 31656, 31662, 33056, 33059, 33061, 33064, 31692, 33071, 33074, 33076, 33079, 31719, 31724, 33086, 33089, 33091, 33094, 31755, 31760, 31769, 33111, 31785, 33115, 31795, 31800, 31806, 33122, 31815, 33127, 31825, 31830, 31836, 33134, 31845, 33138, 31855, 31860, 31865, 33145, 31873, 33149, 31883, 31888, 31906, 31909, 33165, 33168, 31928, 33172, 31939, 33177, 33183, 33186, 31973, 31976, 33192, 33195, 33198, 33201, 33204, 32012, 32015, 32018, 33210, 32028, 33216, 32042, 33221, 33223, 32059, 32064, 33232, 33235, 33241, 33244, 32106, 32110, 33249, 32120, 32125, 32130, 32134, 12401, 32621, 12408, 32633, 30696, 32635, 32729, 32728, 31506, 32951, 31533, 32999, 32952, 12445, 32837, 33005, 33004, 32840, 33263, 32462, 32477, 32493, 32508, 32522, 32536, 33102, 33106, 33108, 33265, 32553, 32569, 32585, 32587, 32602, 30626, 32605, 32151, 31506, 32984, 31533, 32999, 33001, 12559, 32837, 33005, 33004, 33108, 33269, 12576, 32621, 12583, 32633, 30696, 32635, 32729, 32728, 33219, 33229, 12613, 32089, 33213, 33219, 33229, 12685, 32089, 33237, 33213, 33286, 33219, 33229, 12737, 32089, 33237, 33213, 33213, 33295, 12825, 12831, 33158, 33157, 32809, 32922, 33299, 12852, 12858, 33158, 33157, 33159, 33162, 33303, 33213, 32729, 32728, 33159, 33219, 33229, 12934, 32089, 33237, 32661, 32677, 32709, 32725, 32249, 13004, 13011, 32729, 32728, 33315, 32742, 32741, 32755, 32754, 33317, 13049, 13056, 33157, 32808, 33321, 32266, 33213, 32277, 33213, 33213, 32966, 33102, 33106, 32840, 33332, 13173, 13180, 33157, 32808, 33336, 32966, 31023, 33106, 33108, 32299, 13214, 13221, 33157, 32808, 33341, 13240, 13247, 33157, 32808, 33345, 31130, 32836, 32835, 32952, 13274, 32953, 33005, 33348, 33350, 33219, 33229, 32320, 32323, 32850, 32855, 33213, 32330, 32333, 33219, 33229, 13360, 32089, 33237, 32340, 32343, 31249, 32875, 31279, 32888, 31315, 13403, 31344, 13410, 32915, 32914, 32916, 32918, 32917, 32919, 32922, 33362, 31397, 31399, 31428, 31430, 31506, 32951, 32952, 13449, 33002, 33005, 32953, 33006, 33365, 32966, 33102, 33106, 33108, 31506, 32984, 31533, 32999, 33001, 13491, 33002, 33005, 33004, 33006, 33369, 33048, 33102, 33106, 33108, 33066, 33096, 33102, 33106, 33108, 32367, 13561, 13568, 13575, 31891, 33156, 33158, 33157, 33159, 33162, 33376, 33213, 33219, 33229, 13626, 32089, 33237, 33219, 33229, 13650, 32089, 33237, 33219, 33181, 33180, 33213, 33213, 33219, 33229, 13751, 32089, 33237, 33260, 33272, 33275, 13851, 29897, 33277, 13858, 33278, 33398, 33384, 13867, 33385, 33282, 13874, 27533, 13881, 33289, 13887, 27553, 33291, 13894, 33292, 33405, 13903, 13942, 13949, 33306, 33305, 13956, 33325, 33324, 13963, 33366, 33370, 33384, 14030, 33385, 33380, 14037, 32381, 33387, 33388, 33389, 14050, 33390, 14052, 33308, 14058, 32242, 33310, 32415, 33377, 32375, 14116, 33325, 33324, 14123, 14130, 33328, 14136, 33330, 14142, 33353, 14196, 14203, 33366, 33370, 33377, 32375, 33380, 14277, 32381, 33383, 14284, 14285, 33384, 14291, 33385, 33387, 33388, 33389, 14304, 33390, 14306, 33392, 14312, 14313, 33393, 32415, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33499, 33498, 33501, 33500, 33502, 12402, 33504, 33503, 33506, 33505, 33507, 12409, 33701, 33700, 33703, 33702, 33508, 12415, 12416, 12417, 12418, 32809, 33617, 33705, 32773, 33636, 33635, 33638, 33637, 12434, 33639, 12436, 33641, 33640, 33643, 33642, 33644, 12442, 12443, 12444, 12446, 12447, 12448, 12449, 33441, 33440, 33443, 33442, 12461, 33444, 30307, 33447, 33446, 33449, 33448, 12468, 33450, 30343, 33453, 33452, 33455, 33454, 12475, 33456, 30377, 33459, 33458, 33461, 33460, 12482, 33462, 30411, 33465, 33464, 33467, 33466, 12489, 33468, 30445, 33471, 33470, 33473, 33472, 12496, 33474, 30479, 12499, 32538, 12501, 12502, 33477, 33476, 33479, 33478, 12513, 33480, 33481, 33483, 33482, 33485, 33484, 12520, 33486, 33487, 33489, 33488, 33491, 33490, 12527, 33492, 12529, 33494, 33493, 33496, 33495, 12534, 33497, 12536, 12537, 32779, 33636, 33635, 33638, 33637, 12548, 33639, 12550, 33641, 33640, 33643, 33642, 12555, 33644, 12557, 12558, 12560, 12561, 12562, 12563, 33499, 33498, 33501, 33500, 33502, 12577, 33504, 33503, 33506, 33505, 33507, 12584, 33701, 33700, 33703, 33702, 33508, 12590, 12591, 12592, 12593, 32809, 33617, 33705, 32773, 12605, 33729, 33730, 33731, 12609, 33732, 33733, 33734, 33715, 12619, 33719, 33720, 33555, 33722, 33723, 33724, 33509, 12640, 33726, 33716, 33718, 12677, 33730, 33729, 33731, 12681, 33732, 33733, 33596, 12690, 12691, 33707, 33708, 33709, 33554, 33710, 12710, 33726, 33716, 33718, 12729, 33730, 33712, 33731, 12733, 33732, 33733, 33596, 12742, 12743, 33720, 33719, 33721, 33724, 33722, 33723, 33509, 12765, 33726, 33716, 33727, 33556, 33708, 33709, 33554, 33710, 12798, 33726, 33716, 33718, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33510, 12834, 12835, 12836, 33705, 33562, 12839, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33510, 12861, 12862, 12863, 33706, 33705, 12866, 33556, 33708, 33593, 33724, 33725, 33726, 12889, 33716, 33727, 12908, 12909, 12910, 33730, 33729, 12929, 33731, 12931, 33732, 33733, 33734, 12938, 12939, 33511, 33512, 33514, 33513, 33515, 12958, 33516, 33518, 33517, 33520, 33519, 33522, 33521, 12974, 33523, 33526, 33525, 33528, 33527, 33529, 33530, 33533, 33532, 33535, 33534, 12986, 33536, 33537, 33539, 33538, 33541, 33540, 12993, 33542, 33543, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13013, 13014, 32809, 33617, 33705, 32922, 33545, 33544, 33547, 33546, 33548, 13031, 13032, 33550, 33549, 33552, 33551, 33553, 13038, 13039, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13058, 13059, 32757, 33705, 33562, 32922, 33707, 33708, 33709, 33554, 33710, 13084, 33726, 33716, 33718, 33555, 33707, 33708, 33724, 33593, 33725, 33726, 13118, 33716, 33718, 33556, 33708, 33593, 33724, 33725, 13137, 33726, 33716, 33718, 33629, 33628, 33630, 33631, 13156, 33559, 33560, 13159, 32779, 13161, 13162, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13182, 13183, 32809, 33705, 33562, 32773, 33629, 33628, 33630, 33631, 13198, 33559, 33560, 13201, 32779, 13203, 13204, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13223, 13224, 32809, 33705, 33562, 32922, 33564, 33563, 33566, 33565, 33567, 32794, 33570, 33569, 33572, 33571, 33573, 33574, 13249, 13250, 32809, 33617, 33705, 32922, 33577, 33576, 33579, 33578, 13264, 33580, 33582, 33581, 33584, 33583, 33585, 13271, 13272, 13273, 32837, 13276, 13277, 32840, 33730, 13292, 33729, 33588, 33713, 13296, 33714, 33726, 33734, 33716, 33715, 33589, 13323, 33591, 13325, 33724, 33593, 33725, 33726, 13330, 33718, 33728, 33730, 13352, 33712, 33595, 33594, 13356, 33732, 33733, 33596, 13365, 13366, 33598, 33597, 33600, 33599, 33601, 13388, 13389, 33603, 33602, 33605, 33604, 33606, 13395, 13396, 33608, 33607, 33610, 33609, 13401, 33611, 33613, 33612, 33615, 33614, 13408, 33616, 13411, 13412, 13413, 13414, 13415, 13416, 33705, 33617, 13419, 33619, 33618, 33621, 33620, 13431, 33622, 13433, 33624, 33623, 33626, 33625, 13438, 33627, 13440, 33636, 33635, 33638, 33637, 13445, 33639, 13447, 13448, 13450, 13451, 13452, 13453, 33629, 33628, 33631, 33630, 33632, 13466, 33633, 13468, 33053, 13470, 13471, 33636, 33635, 33638, 33637, 13480, 33639, 13482, 33641, 33640, 33643, 33642, 33644, 13488, 13489, 13490, 13492, 13493, 13494, 13495, 33646, 33645, 33648, 33647, 33649, 33021, 33652, 33651, 33654, 33653, 33655, 31620, 33658, 33657, 33660, 33659, 13519, 33661, 13521, 33053, 13523, 13524, 33665, 33664, 33667, 33666, 13533, 33668, 33670, 33669, 33672, 33671, 33673, 33674, 33676, 33675, 33678, 33677, 33679, 13546, 33680, 13548, 33104, 13550, 13551, 33683, 33682, 33685, 33684, 33686, 33687, 33689, 33688, 33691, 33690, 33692, 33693, 33695, 33694, 33697, 33696, 33698, 33699, 33701, 33700, 33703, 33702, 13582, 33704, 13584, 13585, 13586, 13587, 33706, 33705, 13590, 33707, 33708, 33724, 33709, 33710, 13603, 33726, 33716, 33711, 13618, 33712, 33730, 33731, 13622, 33732, 33733, 33734, 13629, 13630, 33730, 33729, 13645, 33731, 13647, 33732, 33733, 33734, 13654, 13655, 33730, 13668, 33729, 33721, 33713, 13672, 13673, 33714, 33734, 33726, 33716, 33715, 33719, 33720, 33721, 33722, 33723, 33724, 33717, 13700, 33726, 33718, 33728, 33720, 33719, 33721, 33724, 33723, 33722, 33725, 13722, 33726, 33728, 33727, 33730, 33729, 13746, 33731, 13748, 33732, 33733, 33734, 13755, 13756, 33735, 33736, 33738, 33737, 33739, 33741, 33740, 33743, 33742, 13796, 33762, 33772, 33780, 33791, 13845, 13850, 13852, 13857, 13859, 13866, 13868, 13873, 13875, 33811, 13886, 13888, 13893, 13895, 33819, 33901, 33857, 33882, 33847, 33826, 33833, 33905, 33865, 33917, 33863, 13954, 13955, 13961, 13962, 13968, 33971, 13986, 33961, 33946, 33933, 33981, 14029, 14031, 14036, 14038, 14043, 14044, 14049, 14051, 14057, 14059, 14064, 14065, 14070, 14071, 33882, 33847, 33852, 33901, 33857, 33862, 33863, 33917, 14121, 14122, 33905, 33865, 14135, 14141, 33872, 33877, 33882, 33887, 33892, 33901, 33900, 33905, 33904, 14188, 33910, 33909, 33917, 33916, 33933, 33946, 14229, 33961, 14245, 33971, 33981, 14270, 14271, 14276, 14278, 14283, 14290, 14292, 14297, 14298, 14303, 14305, 14311, 14318, 14319, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 12396, 12397, 12398, 12399, 12400, 12403, 12404, 12405, 12406, 12407, 12410, 12411, 12412, 12413, 12414, 34132, 12419, 12420, 12421, 12422, 12430, 12431, 12432, 12433, 12435, 12437, 12438, 12439, 12440, 12441, 33757, 34154, 12457, 12458, 12459, 12460, 12462, 12463, 12464, 12465, 12466, 12467, 12469, 12470, 12471, 12472, 12473, 12474, 12476, 12477, 12478, 12479, 12480, 12481, 12483, 12484, 12485, 12486, 12487, 12488, 12490, 12491, 12492, 12493, 12494, 12495, 12497, 12498, 12500, 12509, 12510, 12511, 12512, 12514, 12515, 12516, 12517, 12518, 12519, 12521, 12522, 12523, 12524, 12525, 12526, 12528, 12530, 12531, 12532, 12533, 12535, 12538, 12544, 12545, 12546, 12547, 12549, 12551, 12552, 12553, 12554, 12556, 33786, 34249, 12571, 12572, 12573, 12574, 12575, 12578, 12579, 12580, 12581, 12582, 12585, 12586, 12587, 12588, 12589, 34271, 12594, 12595, 12596, 12597, 12606, 12607, 12608, 12610, 12611, 12612, 12618, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12641, 12646, 12647, 12678, 12679, 12680, 12682, 12683, 12684, 34306, 12705, 12706, 12707, 12708, 12709, 12711, 12714, 12715, 12730, 12731, 12732, 12734, 12735, 12736, 34325, 12758, 12759, 12760, 12761, 12762, 12763, 12764, 12766, 12771, 12772, 12793, 12794, 12795, 12796, 12797, 12799, 12802, 12803, 12820, 12821, 12822, 12823, 12824, 12826, 12827, 12828, 12829, 12830, 12832, 12833, 34359, 12837, 12838, 12847, 12848, 12849, 12850, 12851, 12853, 12854, 12855, 12856, 12857, 12859, 12860, 34377, 12864, 12865, 12883, 12884, 12885, 12886, 12887, 12888, 12892, 12893, 34392, 12927, 12928, 12930, 12932, 12933, 12935, 34403, 12953, 12954, 12955, 12956, 12957, 12959, 12961, 12962, 12970, 12971, 12972, 12973, 12975, 12976, 12977, 12978, 12979, 12980, 12981, 12982, 12983, 12984, 12985, 12987, 12988, 12989, 12990, 12991, 12992, 12994, 12995, 12999, 13000, 13001, 13002, 13003, 13005, 13006, 13007, 13008, 13009, 13010, 13012, 34452, 13015, 13016, 13017, 13018, 13026, 13027, 13028, 13029, 13030, 34463, 13033, 13034, 13035, 13036, 13037, 34470, 13044, 13045, 13046, 13047, 13048, 13050, 13051, 13052, 13053, 13054, 13055, 13057, 34484, 13060, 13061, 13062, 13063, 13079, 13080, 13081, 13082, 13083, 13085, 13089, 13090, 13103, 13112, 13113, 13114, 13115, 13116, 13117, 13121, 13122, 13132, 13133, 13134, 13135, 13136, 13138, 13141, 13142, 13152, 13153, 13154, 13155, 13157, 13158, 13160, 13168, 13169, 13170, 13171, 13172, 13174, 13175, 13176, 13177, 13178, 13179, 13181, 34541, 13184, 13185, 13186, 13187, 13194, 13195, 13196, 13197, 13199, 13200, 13202, 13209, 13210, 13211, 13212, 13213, 13215, 13216, 13217, 13218, 13219, 13220, 13222, 34570, 13225, 13226, 13227, 13228, 13235, 13236, 13237, 13238, 13239, 13241, 13242, 13243, 13244, 13245, 13246, 13248, 34588, 13251, 13252, 13253, 13254, 13260, 13261, 13262, 13263, 13265, 13266, 13267, 13268, 13269, 13270, 34605, 33897, 13275, 34609, 13278, 13291, 13293, 13294, 13295, 13297, 13298, 13299, 13304, 13305, 13322, 13324, 13326, 13327, 13328, 13329, 13334, 13335, 13351, 13353, 13354, 13355, 13357, 13358, 13359, 34643, 13383, 13384, 13385, 13386, 13387, 13390, 13391, 13392, 13393, 13394, 13397, 13398, 13399, 13400, 13402, 13404, 13405, 13406, 13407, 13409, 34671, 34674, 13417, 13418, 13427, 13428, 13429, 13430, 13432, 13434, 13435, 13436, 13437, 13439, 13441, 13442, 13443, 13444, 13446, 33941, 34703, 13461, 13462, 13463, 13464, 13465, 13467, 13469, 13476, 13477, 13478, 13479, 13481, 13483, 13484, 13485, 13486, 13487, 33956, 34733, 13503, 13504, 13505, 13506, 13507, 13508, 13509, 13510, 13511, 13512, 13513, 13514, 13515, 13516, 13517, 13518, 13520, 13522, 13529, 13530, 13531, 13532, 13534, 13535, 13536, 13537, 13538, 13539, 13540, 13541, 13542, 13543, 13544, 13545, 13547, 13549, 13557, 13558, 13559, 13560, 13562, 13563, 13564, 13565, 13566, 13567, 13569, 13570, 13571, 13572, 13573, 13574, 13576, 13577, 13578, 13579, 13580, 13581, 13583, 34806, 13588, 13589, 13598, 13599, 13600, 13601, 13602, 13604, 13606, 13607, 13619, 13620, 13621, 13623, 13624, 13625, 34829, 13643, 13644, 13646, 13648, 13649, 13651, 34839, 13667, 13669, 13670, 13671, 13674, 13675, 13676, 13679, 13680, 13693, 13694, 13695, 13696, 13697, 13698, 13699, 13701, 13704, 13705, 13715, 13716, 13717, 13718, 13719, 13720, 13721, 13723, 13726, 13727, 13744, 13745, 13747, 13749, 13750, 13752, 34883, 13768, 13769, 13770, 13771, 13772, 13773, 13774, 13776, 13777, 13803, 34200, 13818, 34778, 13829, 13836, 34006, 34013, 34016, 13880, 34020, 13902, 13910, 13911, 34555, 13916, 34526, 13921, 13928, 13935, 13940, 13941, 13947, 13948, 34924, 34926, 34714, 34778, 13977, 34755, 13993, 14002, 14013, 14024, 34038, 34041, 34050, 34555, 14078, 34526, 14085, 14092, 14101, 14102, 14109, 14114, 14115, 34957, 14128, 14129, 34526, 14147, 14154, 34555, 14159, 14166, 14173, 14180, 14181, 14186, 14187, 14194, 14195, 14201, 14202, 14215, 14224, 34714, 14236, 34755, 34778, 14254, 14265, 34073, 34076, 34079, 34088, 34902, 34901, 34911, 34910, 34938, 34941, 34940, 34944, 34946, 34960, 34961, 34983, 34990, 34993, 34992, 34995, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35009, 35011, 33744, 35014, 35016, 33746, 35019, 35021, 34129, 35026, 35029, 35031, 35032, 35034, 35036, 34149, 35041, 35043, 35044, 35047, 35049, 35050, 35053, 35055, 35056, 35059, 35061, 35062, 35065, 35067, 35068, 35071, 35073, 35074, 35078, 35080, 35081, 35084, 35086, 35087, 35090, 35092, 35093, 35095, 35097, 35098, 35101, 35103, 35104, 35106, 35108, 35109, 35113, 35115, 33792, 35118, 35120, 33794, 35123, 35125, 34268, 35130, 35132, 35135, 33802, 34285, 35140, 35143, 35146, 35148, 35149, 35152, 33807, 35159, 35161, 35163, 35164, 35167, 33814, 35172, 35175, 35178, 35180, 35184, 35186, 35188, 35190, 35192, 33820, 35196, 35198, 35199, 35203, 35205, 35207, 33827, 35211, 35213, 35214, 35218, 35222, 34388, 35226, 35229, 35231, 35233, 35238, 35240, 35242, 35244, 35246, 35249, 35251, 35255, 35257, 35258, 35261, 35263, 35264, 35267, 35269, 33848, 35273, 35275, 33849, 35281, 35284, 35286, 35290, 35292, 35296, 35298, 33858, 35302, 35304, 33859, 35310, 35315, 35317, 35319, 35324, 34505, 35328, 35332, 35334, 35336, 35338, 35340, 35341, 35345, 35347, 33873, 35351, 35353, 33874, 35359, 35362, 35364, 35365, 35369, 35371, 33883, 35375, 35377, 33884, 35383, 35386, 35388, 33888, 35392, 35394, 33889, 35400, 35403, 35405, 35408, 35410, 34612, 34616, 35423, 35425, 35429, 34630, 35433, 34634, 35437, 35438, 33913, 35443, 35445, 34649, 35448, 35450, 34656, 35453, 35455, 35456, 35458, 35460, 35461, 35465, 35467, 35469, 35470, 35472, 35474, 35475, 35477, 35479, 35480, 35484, 35486, 34710, 35491, 35493, 35494, 35496, 35498, 34728, 35503, 35505, 35509, 35511, 35515, 35517, 35521, 35523, 35526, 35528, 35532, 35534, 34774, 35539, 35541, 35542, 35545, 35547, 35548, 35551, 35553, 35554, 35557, 35559, 35560, 35563, 35567, 35569, 35571, 35572, 35575, 33985, 35580, 35582, 35584, 34841, 34845, 35592, 35594, 35596, 35599, 35602, 35604, 35606, 35609, 35612, 35614, 35616, 35618, 35620, 35625, 35628, 35630, 35023, 35039, 35038, 13816, 34198, 13827, 34230, 35111, 35110, 35127, 35155, 35156, 35170, 35181, 34597, 35411, 35415, 35413, 35644, 13914, 34553, 13919, 34524, 35201, 35216, 35652, 35441, 35654, 35219, 35312, 13966, 34712, 34761, 35529, 13975, 34776, 35506, 35512, 34751, 13984, 34753, 35501, 35500, 35482, 35481, 35227, 35561, 35578, 35234, 35235, 35564, 34417, 35252, 14076, 34553, 14083, 34524, 35278, 35287, 35293, 34597, 35415, 35413, 35674, 35307, 35441, 35677, 35312, 35680, 35321, 35329, 14145, 34524, 35356, 14157, 34553, 35380, 35397, 34597, 35411, 35415, 35413, 35689, 35691, 35427, 35426, 35693, 35441, 35695, 35463, 35462, 35482, 35481, 14227, 34712, 35501, 35500, 35506, 35512, 34751, 14243, 34753, 34761, 35529, 14252, 34776, 35561, 35564, 35578, 35585, 35621, 35622, 35637, 14349, 14350, 35638, 35639, 35640, 35641, 14360, 14361, 35642, 35655, 35656, 35665, 35666, 14417, 14419, 14420, 35667, 14424, 14426, 35678, 14450, 14452, 14503, 35704, 35705, 35706, 14511, 14513, 14514, 35707, 14518, 35133, 35144, 35150, 35165, 35176, 34396, 35418, 35435, 35573, 34832, 35587, 34846, 35600, 35610, 34876, 35744, 35746, 35747, 35749, 35750, 35752, 35753, 13795, 35754, 35756, 35757, 35759, 13801, 13802, 35760, 35762, 35763, 35765, 35766, 35768, 35769, 35771, 35772, 35774, 35775, 35777, 13817, 35778, 35780, 35781, 35783, 35784, 35786, 35787, 35789, 13828, 35790, 35792, 35793, 35795, 13834, 13835, 35796, 35798, 35799, 35801, 35802, 35804, 35805, 13844, 35807, 35809, 35808, 35810, 35813, 35812, 36001, 36000, 35815, 13871, 35816, 35817, 13877, 35819, 35818, 35821, 13884, 35822, 35823, 35826, 35825, 35827, 13899, 35829, 35828, 35917, 13905, 35919, 13907, 13908, 13909, 35900, 35902, 13915, 35890, 35892, 13920, 35830, 35832, 35833, 35835, 35836, 13927, 35837, 35839, 35840, 35842, 35843, 13934, 35922, 35924, 35923, 35930, 13945, 35931, 35844, 13951, 35846, 35845, 35881, 13958, 35883, 35882, 35954, 35956, 13967, 35969, 13970, 35971, 13972, 35973, 35975, 13976, 35963, 13979, 35965, 13981, 35967, 13983, 13985, 35957, 35959, 35960, 35962, 13991, 13992, 35945, 35947, 35948, 35950, 35951, 35953, 14000, 14001, 35932, 35934, 35935, 35937, 35938, 35940, 35941, 35943, 35944, 14012, 35976, 35978, 35979, 35981, 35982, 35984, 35985, 35987, 35988, 14023, 36001, 36000, 35993, 14034, 35994, 36002, 36005, 36004, 36006, 36009, 36008, 35848, 14055, 35849, 35850, 14061, 35852, 35851, 35989, 14067, 35991, 35990, 35853, 14073, 35855, 14075, 14077, 35857, 35859, 35860, 35862, 14084, 35863, 35865, 35866, 35868, 35869, 14091, 35870, 14094, 35872, 14096, 35917, 14098, 14099, 14100, 35874, 35876, 35877, 35879, 35880, 14108, 35930, 14112, 35931, 35881, 14118, 35883, 35882, 35922, 35924, 35923, 35884, 14132, 35886, 35885, 35887, 14138, 35889, 35888, 35890, 35892, 14146, 35893, 35895, 35896, 35898, 35899, 14153, 35900, 35902, 14158, 35903, 35905, 35906, 35908, 35909, 14165, 35910, 35912, 35913, 35915, 35916, 14172, 35917, 14175, 35919, 14177, 14178, 14179, 35922, 35924, 35923, 35925, 14190, 14191, 35927, 35926, 35930, 14199, 35931, 35932, 35934, 35935, 35937, 35938, 35940, 35941, 35943, 35944, 14213, 14214, 35945, 35947, 35948, 35950, 35951, 35953, 14222, 14223, 35954, 35956, 14228, 35957, 35959, 35960, 35962, 14234, 14235, 35963, 14238, 35965, 14240, 35967, 14242, 14244, 35969, 14247, 35971, 14249, 35973, 35975, 14253, 35976, 35978, 35979, 35981, 35982, 35984, 35985, 35987, 35988, 14264, 35989, 14267, 35991, 35990, 35993, 14274, 35994, 35996, 14281, 35997, 36001, 36000, 36002, 36005, 36004, 36006, 36009, 36008, 36011, 14309, 36012, 36013, 14315, 36015, 36014, 14347, 36130, 14352, 14354, 14356, 14358, 36136, 14363, 36041, 36043, 14382, 14384, 14413, 14415, 36144, 14422, 36082, 14446, 36084, 36099, 36102, 36104, 14505, 14507, 14509, 36157, 14516, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 13788, 13789, 13790, 13791, 13792, 13793, 13794, 13797, 13798, 13799, 13800, 36188, 13804, 13805, 13806, 13807, 13808, 13809, 13810, 13811, 13812, 13813, 13814, 13815, 36201, 13819, 13820, 13821, 13822, 13823, 13824, 13825, 13826, 36210, 13830, 13831, 13832, 13833, 36216, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13846, 36160, 13848, 13849, 36161, 13854, 13855, 13856, 36171, 36170, 13864, 13865, 13869, 36162, 13872, 13876, 13878, 13879, 13882, 36163, 13885, 36164, 13890, 13891, 13892, 13898, 13900, 13901, 13904, 13906, 36255, 13912, 13913, 36258, 13917, 13918, 36261, 13922, 13923, 13924, 13925, 13926, 13929, 13930, 13931, 13932, 13933, 13936, 36166, 13938, 13939, 13943, 36167, 13946, 13950, 13952, 13953, 13957, 13959, 13960, 13964, 13965, 36290, 13969, 13971, 13973, 13974, 36297, 13978, 13980, 13982, 36304, 13987, 13988, 13989, 13990, 36310, 13994, 13995, 13996, 13997, 13998, 13999, 36318, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 36171, 36170, 14027, 14028, 14032, 36168, 14035, 36172, 14040, 14041, 14042, 36173, 14046, 14047, 14048, 14053, 36165, 14056, 14060, 14062, 14063, 14066, 14068, 14069, 14072, 14074, 36365, 14079, 14080, 14081, 14082, 36370, 14086, 14087, 14088, 14089, 14090, 14093, 14095, 14097, 36384, 14103, 14104, 14105, 14106, 14107, 14110, 36167, 14113, 14117, 14119, 14120, 14124, 36166, 14126, 14127, 14131, 14133, 14134, 14137, 14139, 14140, 14143, 14144, 36411, 14148, 14149, 14150, 14151, 14152, 14155, 14156, 36420, 14160, 14161, 14162, 14163, 14164, 14167, 14168, 14169, 14170, 14171, 14174, 14176, 36438, 14182, 36166, 14184, 14185, 14189, 14192, 14193, 14197, 36167, 14200, 14204, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14216, 14217, 14218, 14219, 14220, 14221, 36468, 14225, 14226, 36471, 14230, 14231, 14232, 14233, 36477, 14237, 14239, 14241, 36484, 14246, 14248, 14250, 14251, 36491, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14263, 14266, 14268, 14269, 14272, 36168, 14275, 14279, 36169, 14282, 36171, 36170, 14288, 14289, 36172, 14294, 14295, 14296, 36173, 14300, 14301, 14302, 14307, 36174, 14310, 14314, 14316, 14317, 14378, 14380, 14444, 14448, 14470, 14472, 14474, 36182, 36224, 13847, 36625, 13853, 36629, 13862, 13863, 36633, 13870, 36636, 36237, 36639, 13883, 36642, 13889, 36646, 36247, 36649, 36267, 36273, 13937, 36672, 13944, 36675, 36281, 36678, 36285, 36681, 36328, 36338, 14025, 14026, 36727, 14033, 36730, 14039, 36734, 14045, 36738, 14054, 36741, 36354, 36744, 36358, 36747, 36376, 36390, 14111, 36772, 36395, 36775, 14125, 36779, 36402, 36782, 36406, 36785, 36417, 36426, 36432, 14183, 36813, 36443, 36816, 14198, 36819, 36459, 36501, 36503, 36864, 14273, 36867, 14280, 36870, 14286, 14287, 36874, 14293, 36878, 14299, 36882, 14308, 36885, 36524, 36888, 36580, 36578, 36576, 36585, 36583, 36587, 36590, 36588, 36598, 36594, 36596, 36592, 36600, 36607, 36605, 36603, 36601, 36609, 36612, 36610, 36614, 36619, 36617, 36615, 36651, 36650, 36652, 36653, 36655, 36656, 36658, 36661, 36659, 36666, 36664, 36682, 36684, 36687, 36686, 36685, 36689, 36692, 36691, 36690, 36693, 36696, 36694, 36698, 36703, 36701, 36699, 36705, 36712, 36710, 36708, 36706, 36721, 36719, 36717, 36715, 36749, 36748, 36750, 36753, 36751, 36755, 36758, 36756, 36763, 36762, 36761, 36764, 36767, 36765, 36786, 36788, 36791, 36789, 36794, 36796, 36799, 36797, 36804, 36802, 36808, 36807, 36809, 36826, 36824, 36822, 36820, 36833, 36831, 36829, 36835, 36836, 36838, 36841, 36839, 36843, 36846, 36845, 36844, 36847, 36850, 36849, 36848, 36852, 36859, 36857, 36855, 36853, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36898, 36627, 36903, 36905, 36909, 36644, 36917, 36919, 36928, 36930, 36732, 36736, 36936, 36944, 36948, 36957, 36444, 36961, 36460, 36967, 36969, 36972, 36876, 36880, 36978, 14320, 14321, 14322, 36896, 14324, 14325, 14326, 14327, 14328, 14329, 14330, 14331, 14332, 14333, 14334, 14335, 14336, 14337, 14338, 14339, 14340, 14341, 14342, 14343, 14344, 36897, 36907, 36913, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 36915, 14374, 14375, 36916, 36921, 36923, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398, 14399, 14400, 14401, 14402, 14403, 14404, 14405, 36925, 14407, 14408, 14409, 14410, 36926, 36938, 36940, 14427, 14428, 14429, 14430, 14431, 14432, 14433, 14434, 36942, 14436, 14437, 14438, 14439, 14440, 14441, 36943, 36946, 36950, 36952, 14453, 14454, 14455, 14456, 36954, 14458, 14459, 14460, 14461, 36955, 14463, 14464, 36956, 14466, 14467, 14468, 14475, 14476, 14477, 14478, 14480, 14481, 14482, 14483, 14484, 14485, 14486, 14487, 14488, 14489, 14490, 14491, 14492, 14493, 14494, 14495, 14496, 14497, 14498, 14499, 14500, 36964, 36965, 36980, 37146, 14323, 37150, 37153, 37155, 37157, 37160, 37162, 37165, 37168, 14345, 37120, 37121, 37122, 37123, 14355, 37124, 37125, 14362, 37174, 37181, 14373, 37184, 14376, 37126, 37127, 14381, 14383, 37191, 37195, 37199, 37202, 37206, 37208, 14406, 37211, 37213, 14411, 37128, 37129, 37130, 37131, 37132, 14423, 14425, 37218, 37221, 37224, 14435, 37227, 37231, 14442, 37133, 14445, 37134, 14449, 14451, 37239, 14457, 37244, 14462, 37247, 14465, 37250, 37135, 37136, 37137, 37253, 37255, 37138, 37257, 37263, 37266, 37270, 37274, 37276, 14501, 14502, 37139, 37140, 37141, 37142, 37143, 37144, 14517, 37178, 37176, 37188, 37241, 37236, 37260, 27, 28, 29, 30, 31, 37147, 37284, 37287, 37169, 14346, 14348, 14351, 14353, 14357, 14359, 14377, 14379, 37192, 37196, 37203, 37313, 37316, 14412, 14414, 14416, 14418, 14421, 37228, 14443, 14447, 14469, 14471, 14473, 37348, 14479, 37258, 37267, 37271, 37355, 14504, 14506, 14508, 14510, 14512, 14515, 37288, 37282, 37295, 37298, 37299, 37302, 14535, 37300, 14537, 37307, 37306, 14546, 37310, 37324, 37323, 37327, 37330, 37326, 37325, 37336, 37335, 37333, 37339, 14567, 37343, 14569, 37337, 37341, 14578, 37351, 37364, 37357, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37285, 37378, 14520, 14521, 37376, 37379, 14525, 37383, 37385, 37381, 37380, 37382, 14531, 37384, 14533, 14534, 14536, 14538, 14539, 37387, 37386, 37389, 37390, 37388, 37391, 37392, 14548, 37396, 37394, 14551, 37393, 14553, 37395, 37397, 37398, 14557, 14558, 14559, 14560, 14561, 14562, 14563, 37399, 37400, 14566, 14568, 14570, 14571, 37403, 37402, 37401, 37404, 37406, 37408, 14579, 37409, 37407, 37413, 14583, 37412, 37410, 37414, 14587, 37411, 37415, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14519, 14522, 14523, 37472, 14526, 14527, 14528, 14529, 14530, 14532, 37487, 37488, 14540, 14541, 37490, 14542, 14543, 14544, 14545, 14547, 14549, 14550, 14552, 14554, 14555, 14556, 37509, 14564, 14565, 37512, 37439, 37441, 37519, 14572, 14573, 14574, 14575, 14576, 14577, 14580, 14581, 14582, 14584, 14585, 14586, 14588, 14589, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14524, 37474, 37569, 37572, 37574, 37576, 37577, 37579, 37581, 37584, 37586, 37587, 37589, 37590, 37591, 37507, 37595, 37599, 37602, 37605, 37444, 37607, 37530, 37611, 37534, 37614, 26, 27, 28, 29, 30, 31, 37632, 37634, 37636, 37638, 37424, 37640, 37642, 37498, 37645, 37592, 37594, 37648, 37600, 37603, 37652, 37608, 37655, 37657, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37664, 37667, 37671, 37673, 37510, 37596, 37679, 37681, 37668, 37676, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37700, 14591, 37698, 37702, 37696, 14595, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 14590, 14592, 14593, 14594, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37729, 37762, 37733, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37793, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 37794, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
bool h_Op[]= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#define THREADS_PER_BLOCK 32
#define BLOCKS_PER_GRID 1
#define SIZE_OF_IN 14624
#define SIZE_OF_AC 23264
__device__ void
ac(float *A, const int *B, const int *C, const bool *Op, int n_iter) {
int i= blockDim.x * blockIdx.x + threadIdx.x;
__shared__ float R[1184*THREADS_PER_BLOCK];
const int t= THREADS_PER_BLOCK;
__shared__ float final;
final=0;
R[i + 0*t] = A[i + 0*t];
R[i + 1*t] = A[i + 1*t];
R[i + 2*t] = A[i + 2*t];
R[i + 3*t] = A[i + 3*t];
R[i + 4*t] = A[i + 4*t];
R[i + 5*t] = A[i + 5*t];
R[i + 6*t] = A[i + 6*t];
R[i + 7*t] = A[i + 7*t];
R[i + 8*t] = A[i + 8*t];
R[i + 9*t] = A[i + 9*t];
R[i + 10*t] = A[i + 10*t];
R[i + 11*t] = A[i + 11*t];
R[i + 12*t] = A[i + 12*t];
R[i + 13*t] = A[i + 13*t];
R[i + 14*t] = A[i + 14*t];
R[i + 15*t] = A[i + 15*t];
R[i + 16*t] = A[i + 16*t];
R[i + 17*t] = A[i + 17*t];
R[i + 18*t] = A[i + 18*t];
R[i + 19*t] = A[i + 19*t];
R[i + 20*t] = A[i + 20*t];
R[i + 21*t] = A[i + 21*t];
R[i + 22*t] = A[i + 22*t];
R[i + 23*t] = A[i + 23*t];
R[i + 24*t] = A[i + 24*t];
R[i + 25*t] = A[i + 25*t];
R[i + 26*t] = A[i + 26*t];
R[i + 27*t] = A[i + 27*t];
R[i + 28*t] = A[i + 28*t];
R[i + 29*t] = A[i + 29*t];
R[i + 30*t] = A[i + 30*t];
R[i + 31*t] = A[i + 31*t];
R[i + 32*t] = A[i + 32*t];
R[i + 33*t] = A[i + 33*t];
R[i + 34*t] = A[i + 34*t];
R[i + 35*t] = A[i + 35*t];
R[i + 36*t] = A[i + 36*t];
R[i + 37*t] = A[i + 37*t];
R[i + 38*t] = A[i + 38*t];
R[i + 39*t] = A[i + 39*t];
R[i + 40*t] = A[i + 40*t];
R[i + 41*t] = A[i + 41*t];
R[i + 42*t] = A[i + 42*t];
R[i + 43*t] = A[i + 43*t];
R[i + 44*t] = A[i + 44*t];
R[i + 45*t] = A[i + 45*t];
R[i + 46*t] = A[i + 46*t];
R[i + 47*t] = A[i + 47*t];
R[i + 48*t] = A[i + 48*t];
R[i + 49*t] = A[i + 49*t];
R[i + 50*t] = A[i + 50*t];
R[i + 51*t] = A[i + 51*t];
R[i + 52*t] = A[i + 52*t];
R[i + 53*t] = A[i + 53*t];
R[i + 54*t] = A[i + 54*t];
R[i + 55*t] = A[i + 55*t];
R[i + 56*t] = A[i + 56*t];
R[i + 57*t] = A[i + 57*t];
R[i + 58*t] = A[i + 58*t];
R[i + 59*t] = A[i + 59*t];
R[i + 60*t] = A[i + 60*t];
R[i + 61*t] = A[i + 61*t];
R[i + 62*t] = A[i + 62*t];
R[i + 63*t] = A[i + 63*t];
R[i + 64*t] = A[i + 64*t];
R[i + 65*t] = A[i + 65*t];
R[i + 66*t] = A[i + 66*t];
R[i + 67*t] = A[i + 67*t];
R[i + 68*t] = A[i + 68*t];
R[i + 69*t] = A[i + 69*t];
R[i + 70*t] = A[i + 70*t];
R[i + 71*t] = A[i + 71*t];
R[i + 72*t] = A[i + 72*t];
R[i + 73*t] = A[i + 73*t];
R[i + 74*t] = A[i + 74*t];
R[i + 75*t] = A[i + 75*t];
R[i + 76*t] = A[i + 76*t];
R[i + 77*t] = A[i + 77*t];
R[i + 78*t] = A[i + 78*t];
R[i + 79*t] = A[i + 79*t];
R[i + 80*t] = A[i + 80*t];
R[i + 81*t] = A[i + 81*t];
R[i + 82*t] = A[i + 82*t];
R[i + 83*t] = A[i + 83*t];
R[i + 84*t] = A[i + 84*t];
R[i + 85*t] = A[i + 85*t];
R[i + 86*t] = A[i + 86*t];
R[i + 87*t] = A[i + 87*t];
R[i + 88*t] = A[i + 88*t];
R[i + 89*t] = A[i + 89*t];
R[i + 90*t] = A[i + 90*t];
R[i + 91*t] = A[i + 91*t];
R[i + 92*t] = A[i + 92*t];
R[i + 93*t] = A[i + 93*t];
R[i + 94*t] = A[i + 94*t];
R[i + 95*t] = A[i + 95*t];
R[i + 96*t] = A[i + 96*t];
R[i + 97*t] = A[i + 97*t];
R[i + 98*t] = A[i + 98*t];
R[i + 99*t] = A[i + 99*t];
R[i + 100*t] = A[i + 100*t];
R[i + 101*t] = A[i + 101*t];
R[i + 102*t] = A[i + 102*t];
R[i + 103*t] = A[i + 103*t];
R[i + 104*t] = A[i + 104*t];
R[i + 105*t] = A[i + 105*t];
R[i + 106*t] = A[i + 106*t];
R[i + 107*t] = A[i + 107*t];
R[i + 108*t] = A[i + 108*t];
R[i + 109*t] = A[i + 109*t];
R[i + 110*t] = A[i + 110*t];
R[i + 111*t] = A[i + 111*t];
R[i + 112*t] = A[i + 112*t];
R[i + 113*t] = A[i + 113*t];
R[i + 114*t] = A[i + 114*t];
R[i + 115*t] = A[i + 115*t];
R[i + 116*t] = A[i + 116*t];
R[i + 117*t] = A[i + 117*t];
R[i + 118*t] = A[i + 118*t];
R[i + 119*t] = A[i + 119*t];
R[i + 120*t] = A[i + 120*t];
R[i + 121*t] = A[i + 121*t];
R[i + 122*t] = A[i + 122*t];
R[i + 123*t] = A[i + 123*t];
R[i + 124*t] = A[i + 124*t];
R[i + 125*t] = A[i + 125*t];
R[i + 126*t] = A[i + 126*t];
R[i + 127*t] = A[i + 127*t];
R[i + 128*t] = A[i + 128*t];
R[i + 129*t] = A[i + 129*t];
R[i + 130*t] = A[i + 130*t];
R[i + 131*t] = A[i + 131*t];
R[i + 132*t] = A[i + 132*t];
R[i + 133*t] = A[i + 133*t];
R[i + 134*t] = A[i + 134*t];
R[i + 135*t] = A[i + 135*t];
R[i + 136*t] = A[i + 136*t];
R[i + 137*t] = A[i + 137*t];
R[i + 138*t] = A[i + 138*t];
R[i + 139*t] = A[i + 139*t];
R[i + 140*t] = A[i + 140*t];
R[i + 141*t] = A[i + 141*t];
R[i + 142*t] = A[i + 142*t];
R[i + 143*t] = A[i + 143*t];
R[i + 144*t] = A[i + 144*t];
R[i + 145*t] = A[i + 145*t];
R[i + 146*t] = A[i + 146*t];
R[i + 147*t] = A[i + 147*t];
R[i + 148*t] = A[i + 148*t];
R[i + 149*t] = A[i + 149*t];
R[i + 150*t] = A[i + 150*t];
R[i + 151*t] = A[i + 151*t];
R[i + 152*t] = A[i + 152*t];
R[i + 153*t] = A[i + 153*t];
R[i + 154*t] = A[i + 154*t];
R[i + 155*t] = A[i + 155*t];
R[i + 156*t] = A[i + 156*t];
R[i + 157*t] = A[i + 157*t];
R[i + 158*t] = A[i + 158*t];
R[i + 159*t] = A[i + 159*t];
R[i + 160*t] = A[i + 160*t];
R[i + 161*t] = A[i + 161*t];
R[i + 162*t] = A[i + 162*t];
R[i + 163*t] = A[i + 163*t];
R[i + 164*t] = A[i + 164*t];
R[i + 165*t] = A[i + 165*t];
R[i + 166*t] = A[i + 166*t];
R[i + 167*t] = A[i + 167*t];
R[i + 168*t] = A[i + 168*t];
R[i + 169*t] = A[i + 169*t];
R[i + 170*t] = A[i + 170*t];
R[i + 171*t] = A[i + 171*t];
R[i + 172*t] = A[i + 172*t];
R[i + 173*t] = A[i + 173*t];
R[i + 174*t] = A[i + 174*t];
R[i + 175*t] = A[i + 175*t];
R[i + 176*t] = A[i + 176*t];
R[i + 177*t] = A[i + 177*t];
R[i + 178*t] = A[i + 178*t];
R[i + 179*t] = A[i + 179*t];
R[i + 180*t] = A[i + 180*t];
R[i + 181*t] = A[i + 181*t];
R[i + 182*t] = A[i + 182*t];
R[i + 183*t] = A[i + 183*t];
R[i + 184*t] = A[i + 184*t];
R[i + 185*t] = A[i + 185*t];
R[i + 186*t] = A[i + 186*t];
R[i + 187*t] = A[i + 187*t];
R[i + 188*t] = A[i + 188*t];
R[i + 189*t] = A[i + 189*t];
R[i + 190*t] = A[i + 190*t];
R[i + 191*t] = A[i + 191*t];
R[i + 192*t] = A[i + 192*t];
R[i + 193*t] = A[i + 193*t];
R[i + 194*t] = A[i + 194*t];
R[i + 195*t] = A[i + 195*t];
R[i + 196*t] = A[i + 196*t];
R[i + 197*t] = A[i + 197*t];
R[i + 198*t] = A[i + 198*t];
R[i + 199*t] = A[i + 199*t];
R[i + 200*t] = A[i + 200*t];
R[i + 201*t] = A[i + 201*t];
R[i + 202*t] = A[i + 202*t];
R[i + 203*t] = A[i + 203*t];
R[i + 204*t] = A[i + 204*t];
R[i + 205*t] = A[i + 205*t];
R[i + 206*t] = A[i + 206*t];
R[i + 207*t] = A[i + 207*t];
R[i + 208*t] = A[i + 208*t];
R[i + 209*t] = A[i + 209*t];
R[i + 210*t] = A[i + 210*t];
R[i + 211*t] = A[i + 211*t];
R[i + 212*t] = A[i + 212*t];
R[i + 213*t] = A[i + 213*t];
R[i + 214*t] = A[i + 214*t];
R[i + 215*t] = A[i + 215*t];
R[i + 216*t] = A[i + 216*t];
R[i + 217*t] = A[i + 217*t];
R[i + 218*t] = A[i + 218*t];
R[i + 219*t] = A[i + 219*t];
R[i + 220*t] = A[i + 220*t];
R[i + 221*t] = A[i + 221*t];
R[i + 222*t] = A[i + 222*t];
R[i + 223*t] = A[i + 223*t];
R[i + 224*t] = A[i + 224*t];
R[i + 225*t] = A[i + 225*t];
R[i + 226*t] = A[i + 226*t];
R[i + 227*t] = A[i + 227*t];
R[i + 228*t] = A[i + 228*t];
R[i + 229*t] = A[i + 229*t];
R[i + 230*t] = A[i + 230*t];
R[i + 231*t] = A[i + 231*t];
R[i + 232*t] = A[i + 232*t];
R[i + 233*t] = A[i + 233*t];
R[i + 234*t] = A[i + 234*t];
R[i + 235*t] = A[i + 235*t];
R[i + 236*t] = A[i + 236*t];
R[i + 237*t] = A[i + 237*t];
R[i + 238*t] = A[i + 238*t];
R[i + 239*t] = A[i + 239*t];
R[i + 240*t] = A[i + 240*t];
R[i + 241*t] = A[i + 241*t];
R[i + 242*t] = A[i + 242*t];
R[i + 243*t] = A[i + 243*t];
R[i + 244*t] = A[i + 244*t];
R[i + 245*t] = A[i + 245*t];
R[i + 246*t] = A[i + 246*t];
R[i + 247*t] = A[i + 247*t];
R[i + 248*t] = A[i + 248*t];
R[i + 249*t] = A[i + 249*t];
R[i + 250*t] = A[i + 250*t];
R[i + 251*t] = A[i + 251*t];
R[i + 252*t] = A[i + 252*t];
R[i + 253*t] = A[i + 253*t];
R[i + 254*t] = A[i + 254*t];
R[i + 255*t] = A[i + 255*t];
R[i + 256*t] = A[i + 256*t];
R[i + 257*t] = A[i + 257*t];
R[i + 258*t] = A[i + 258*t];
R[i + 259*t] = A[i + 259*t];
R[i + 260*t] = A[i + 260*t];
R[i + 261*t] = A[i + 261*t];
R[i + 262*t] = A[i + 262*t];
R[i + 263*t] = A[i + 263*t];
R[i + 264*t] = A[i + 264*t];
R[i + 265*t] = A[i + 265*t];
R[i + 266*t] = A[i + 266*t];
R[i + 267*t] = A[i + 267*t];
R[i + 268*t] = A[i + 268*t];
R[i + 269*t] = A[i + 269*t];
R[i + 270*t] = A[i + 270*t];
R[i + 271*t] = A[i + 271*t];
R[i + 272*t] = A[i + 272*t];
R[i + 273*t] = A[i + 273*t];
R[i + 274*t] = A[i + 274*t];
R[i + 275*t] = A[i + 275*t];
R[i + 276*t] = A[i + 276*t];
R[i + 277*t] = A[i + 277*t];
R[i + 278*t] = A[i + 278*t];
R[i + 279*t] = A[i + 279*t];
R[i + 280*t] = A[i + 280*t];
R[i + 281*t] = A[i + 281*t];
R[i + 282*t] = A[i + 282*t];
R[i + 283*t] = A[i + 283*t];
R[i + 284*t] = A[i + 284*t];
R[i + 285*t] = A[i + 285*t];
R[i + 286*t] = A[i + 286*t];
R[i + 287*t] = A[i + 287*t];
R[i + 288*t] = A[i + 288*t];
R[i + 289*t] = A[i + 289*t];
R[i + 290*t] = A[i + 290*t];
R[i + 291*t] = A[i + 291*t];
R[i + 292*t] = A[i + 292*t];
R[i + 293*t] = A[i + 293*t];
R[i + 294*t] = A[i + 294*t];
R[i + 295*t] = A[i + 295*t];
R[i + 296*t] = A[i + 296*t];
R[i + 297*t] = A[i + 297*t];
R[i + 298*t] = A[i + 298*t];
R[i + 299*t] = A[i + 299*t];
R[i + 300*t] = A[i + 300*t];
R[i + 301*t] = A[i + 301*t];
R[i + 302*t] = A[i + 302*t];
R[i + 303*t] = A[i + 303*t];
R[i + 304*t] = A[i + 304*t];
R[i + 305*t] = A[i + 305*t];
R[i + 306*t] = A[i + 306*t];
R[i + 307*t] = A[i + 307*t];
R[i + 308*t] = A[i + 308*t];
R[i + 309*t] = A[i + 309*t];
R[i + 310*t] = A[i + 310*t];
R[i + 311*t] = A[i + 311*t];
R[i + 312*t] = A[i + 312*t];
R[i + 313*t] = A[i + 313*t];
R[i + 314*t] = A[i + 314*t];
R[i + 315*t] = A[i + 315*t];
R[i + 316*t] = A[i + 316*t];
R[i + 317*t] = A[i + 317*t];
R[i + 318*t] = A[i + 318*t];
R[i + 319*t] = A[i + 319*t];
R[i + 320*t] = A[i + 320*t];
R[i + 321*t] = A[i + 321*t];
R[i + 322*t] = A[i + 322*t];
R[i + 323*t] = A[i + 323*t];
R[i + 324*t] = A[i + 324*t];
R[i + 325*t] = A[i + 325*t];
R[i + 326*t] = A[i + 326*t];
R[i + 327*t] = A[i + 327*t];
R[i + 328*t] = A[i + 328*t];
R[i + 329*t] = A[i + 329*t];
R[i + 330*t] = A[i + 330*t];
R[i + 331*t] = A[i + 331*t];
R[i + 332*t] = A[i + 332*t];
R[i + 333*t] = A[i + 333*t];
R[i + 334*t] = A[i + 334*t];
R[i + 335*t] = A[i + 335*t];
R[i + 336*t] = A[i + 336*t];
R[i + 337*t] = A[i + 337*t];
R[i + 338*t] = A[i + 338*t];
R[i + 339*t] = A[i + 339*t];
R[i + 340*t] = A[i + 340*t];
R[i + 341*t] = A[i + 341*t];
R[i + 342*t] = A[i + 342*t];
R[i + 343*t] = A[i + 343*t];
R[i + 344*t] = A[i + 344*t];
R[i + 345*t] = A[i + 345*t];
R[i + 346*t] = A[i + 346*t];
R[i + 347*t] = A[i + 347*t];
R[i + 348*t] = A[i + 348*t];
R[i + 349*t] = A[i + 349*t];
R[i + 350*t] = A[i + 350*t];
R[i + 351*t] = A[i + 351*t];
R[i + 352*t] = A[i + 352*t];
R[i + 353*t] = A[i + 353*t];
R[i + 354*t] = A[i + 354*t];
R[i + 355*t] = A[i + 355*t];
R[i + 356*t] = A[i + 356*t];
R[i + 357*t] = A[i + 357*t];
R[i + 358*t] = A[i + 358*t];
R[i + 359*t] = A[i + 359*t];
R[i + 360*t] = A[i + 360*t];
R[i + 361*t] = A[i + 361*t];
R[i + 362*t] = A[i + 362*t];
R[i + 363*t] = A[i + 363*t];
R[i + 364*t] = A[i + 364*t];
R[i + 365*t] = A[i + 365*t];
R[i + 366*t] = A[i + 366*t];
R[i + 367*t] = A[i + 367*t];
R[i + 368*t] = A[i + 368*t];
R[i + 369*t] = A[i + 369*t];
R[i + 370*t] = A[i + 370*t];
R[i + 371*t] = A[i + 371*t];
R[i + 372*t] = A[i + 372*t];
R[i + 373*t] = A[i + 373*t];
R[i + 374*t] = A[i + 374*t];
R[i + 375*t] = A[i + 375*t];
R[i + 376*t] = A[i + 376*t];
R[i + 377*t] = A[i + 377*t];
R[i + 378*t] = A[i + 378*t];
R[i + 379*t] = A[i + 379*t];
R[i + 380*t] = A[i + 380*t];
R[i + 381*t] = A[i + 381*t];
R[i + 382*t] = A[i + 382*t];
R[i + 383*t] = A[i + 383*t];
R[i + 384*t] = A[i + 384*t];
R[i + 385*t] = A[i + 385*t];
R[i + 386*t] = A[i + 386*t];
R[i + 387*t] = A[i + 387*t];
R[i + 388*t] = A[i + 388*t];
R[i + 389*t] = A[i + 389*t];
R[i + 390*t] = A[i + 390*t];
R[i + 391*t] = A[i + 391*t];
R[i + 392*t] = A[i + 392*t];
R[i + 393*t] = A[i + 393*t];
R[i + 394*t] = A[i + 394*t];
R[i + 395*t] = A[i + 395*t];
R[i + 396*t] = A[i + 396*t];
R[i + 397*t] = A[i + 397*t];
R[i + 398*t] = A[i + 398*t];
R[i + 399*t] = A[i + 399*t];
R[i + 400*t] = A[i + 400*t];
R[i + 401*t] = A[i + 401*t];
R[i + 402*t] = A[i + 402*t];
R[i + 403*t] = A[i + 403*t];
R[i + 404*t] = A[i + 404*t];
R[i + 405*t] = A[i + 405*t];
R[i + 406*t] = A[i + 406*t];
R[i + 407*t] = A[i + 407*t];
R[i + 408*t] = A[i + 408*t];
R[i + 409*t] = A[i + 409*t];
R[i + 410*t] = A[i + 410*t];
R[i + 411*t] = A[i + 411*t];
R[i + 412*t] = A[i + 412*t];
R[i + 413*t] = A[i + 413*t];
R[i + 414*t] = A[i + 414*t];
R[i + 415*t] = A[i + 415*t];
R[i + 416*t] = A[i + 416*t];
R[i + 417*t] = A[i + 417*t];
R[i + 418*t] = A[i + 418*t];
R[i + 419*t] = A[i + 419*t];
R[i + 420*t] = A[i + 420*t];
R[i + 421*t] = A[i + 421*t];
R[i + 422*t] = A[i + 422*t];
R[i + 423*t] = A[i + 423*t];
R[i + 424*t] = A[i + 424*t];
R[i + 425*t] = A[i + 425*t];
R[i + 426*t] = A[i + 426*t];
R[i + 427*t] = A[i + 427*t];
R[i + 428*t] = A[i + 428*t];
R[i + 429*t] = A[i + 429*t];
R[i + 430*t] = A[i + 430*t];
R[i + 431*t] = A[i + 431*t];
R[i + 432*t] = A[i + 432*t];
R[i + 433*t] = A[i + 433*t];
R[i + 434*t] = A[i + 434*t];
R[i + 435*t] = A[i + 435*t];
R[i + 436*t] = A[i + 436*t];
R[i + 437*t] = A[i + 437*t];
R[i + 438*t] = A[i + 438*t];
R[i + 439*t] = A[i + 439*t];
R[i + 440*t] = A[i + 440*t];
R[i + 441*t] = A[i + 441*t];
R[i + 442*t] = A[i + 442*t];
R[i + 443*t] = A[i + 443*t];
R[i + 444*t] = A[i + 444*t];
R[i + 445*t] = A[i + 445*t];
R[i + 446*t] = A[i + 446*t];
R[i + 447*t] = A[i + 447*t];
R[i + 448*t] = A[i + 448*t];
R[i + 449*t] = A[i + 449*t];
R[i + 450*t] = A[i + 450*t];
R[i + 451*t] = A[i + 451*t];
R[i + 452*t] = A[i + 452*t];
R[i + 453*t] = A[i + 453*t];
R[i + 454*t] = A[i + 454*t];
R[i + 455*t] = A[i + 455*t];
R[i + 456*t] = A[i + 456*t];
__syncthreads();
for (int iter=0; iter< n_iter; iter++) {
R[i + 457*t] = Op[i + 0*t] ? R[B[i + 0*t]] * R[C[i + 0*t]] : R[B[i + 0*t]] + R[C[i + 0*t]];
R[i + 458*t] = Op[i + 1*t] ? R[B[i + 1*t]] * R[C[i + 1*t]] : R[B[i + 1*t]] + R[C[i + 1*t]];
R[i + 459*t] = Op[i + 2*t] ? R[B[i + 2*t]] * R[C[i + 2*t]] : R[B[i + 2*t]] + R[C[i + 2*t]];
R[i + 460*t] = Op[i + 3*t] ? R[B[i + 3*t]] * R[C[i + 3*t]] : R[B[i + 3*t]] + R[C[i + 3*t]];
R[i + 461*t] = Op[i + 4*t] ? R[B[i + 4*t]] * R[C[i + 4*t]] : R[B[i + 4*t]] + R[C[i + 4*t]];
R[i + 462*t] = Op[i + 5*t] ? R[B[i + 5*t]] * R[C[i + 5*t]] : R[B[i + 5*t]] + R[C[i + 5*t]];
R[i + 463*t] = Op[i + 6*t] ? R[B[i + 6*t]] * R[C[i + 6*t]] : R[B[i + 6*t]] + R[C[i + 6*t]];
R[i + 464*t] = Op[i + 7*t] ? R[B[i + 7*t]] * R[C[i + 7*t]] : R[B[i + 7*t]] + R[C[i + 7*t]];
R[i + 465*t] = Op[i + 8*t] ? R[B[i + 8*t]] * R[C[i + 8*t]] : R[B[i + 8*t]] + R[C[i + 8*t]];
R[i + 466*t] = Op[i + 9*t] ? R[B[i + 9*t]] * R[C[i + 9*t]] : R[B[i + 9*t]] + R[C[i + 9*t]];
R[i + 467*t] = Op[i + 10*t] ? R[B[i + 10*t]] * R[C[i + 10*t]] : R[B[i + 10*t]] + R[C[i + 10*t]];
R[i + 468*t] = Op[i + 11*t] ? R[B[i + 11*t]] * R[C[i + 11*t]] : R[B[i + 11*t]] + R[C[i + 11*t]];
R[i + 469*t] = Op[i + 12*t] ? R[B[i + 12*t]] * R[C[i + 12*t]] : R[B[i + 12*t]] + R[C[i + 12*t]];
R[i + 470*t] = Op[i + 13*t] ? R[B[i + 13*t]] * R[C[i + 13*t]] : R[B[i + 13*t]] + R[C[i + 13*t]];
R[i + 471*t] = Op[i + 14*t] ? R[B[i + 14*t]] * R[C[i + 14*t]] : R[B[i + 14*t]] + R[C[i + 14*t]];
R[i + 472*t] = Op[i + 15*t] ? R[B[i + 15*t]] * R[C[i + 15*t]] : R[B[i + 15*t]] + R[C[i + 15*t]];
R[i + 473*t] = Op[i + 16*t] ? R[B[i + 16*t]] * R[C[i + 16*t]] : R[B[i + 16*t]] + R[C[i + 16*t]];
R[i + 474*t] = Op[i + 17*t] ? R[B[i + 17*t]] * R[C[i + 17*t]] : R[B[i + 17*t]] + R[C[i + 17*t]];
R[i + 475*t] = Op[i + 18*t] ? R[B[i + 18*t]] * R[C[i + 18*t]] : R[B[i + 18*t]] + R[C[i + 18*t]];
R[i + 476*t] = Op[i + 19*t] ? R[B[i + 19*t]] * R[C[i + 19*t]] : R[B[i + 19*t]] + R[C[i + 19*t]];
R[i + 477*t] = Op[i + 20*t] ? R[B[i + 20*t]] * R[C[i + 20*t]] : R[B[i + 20*t]] + R[C[i + 20*t]];
R[i + 478*t] = Op[i + 21*t] ? R[B[i + 21*t]] * R[C[i + 21*t]] : R[B[i + 21*t]] + R[C[i + 21*t]];
R[i + 479*t] = Op[i + 22*t] ? R[B[i + 22*t]] * R[C[i + 22*t]] : R[B[i + 22*t]] + R[C[i + 22*t]];
R[i + 480*t] = Op[i + 23*t] ? R[B[i + 23*t]] * R[C[i + 23*t]] : R[B[i + 23*t]] + R[C[i + 23*t]];
R[i + 481*t] = Op[i + 24*t] ? R[B[i + 24*t]] * R[C[i + 24*t]] : R[B[i + 24*t]] + R[C[i + 24*t]];
R[i + 482*t] = Op[i + 25*t] ? R[B[i + 25*t]] * R[C[i + 25*t]] : R[B[i + 25*t]] + R[C[i + 25*t]];
R[i + 483*t] = Op[i + 26*t] ? R[B[i + 26*t]] * R[C[i + 26*t]] : R[B[i + 26*t]] + R[C[i + 26*t]];
R[i + 484*t] = Op[i + 27*t] ? R[B[i + 27*t]] * R[C[i + 27*t]] : R[B[i + 27*t]] + R[C[i + 27*t]];
R[i + 485*t] = Op[i + 28*t] ? R[B[i + 28*t]] * R[C[i + 28*t]] : R[B[i + 28*t]] + R[C[i + 28*t]];
R[i + 486*t] = Op[i + 29*t] ? R[B[i + 29*t]] * R[C[i + 29*t]] : R[B[i + 29*t]] + R[C[i + 29*t]];
R[i + 487*t] = Op[i + 30*t] ? R[B[i + 30*t]] * R[C[i + 30*t]] : R[B[i + 30*t]] + R[C[i + 30*t]];
R[i + 488*t] = Op[i + 31*t] ? R[B[i + 31*t]] * R[C[i + 31*t]] : R[B[i + 31*t]] + R[C[i + 31*t]];
R[i + 489*t] = Op[i + 32*t] ? R[B[i + 32*t]] * R[C[i + 32*t]] : R[B[i + 32*t]] + R[C[i + 32*t]];
R[i + 490*t] = Op[i + 33*t] ? R[B[i + 33*t]] * R[C[i + 33*t]] : R[B[i + 33*t]] + R[C[i + 33*t]];
R[i + 491*t] = Op[i + 34*t] ? R[B[i + 34*t]] * R[C[i + 34*t]] : R[B[i + 34*t]] + R[C[i + 34*t]];
R[i + 492*t] = Op[i + 35*t] ? R[B[i + 35*t]] * R[C[i + 35*t]] : R[B[i + 35*t]] + R[C[i + 35*t]];
R[i + 493*t] = Op[i + 36*t] ? R[B[i + 36*t]] * R[C[i + 36*t]] : R[B[i + 36*t]] + R[C[i + 36*t]];
R[i + 494*t] = Op[i + 37*t] ? R[B[i + 37*t]] * R[C[i + 37*t]] : R[B[i + 37*t]] + R[C[i + 37*t]];
R[i + 495*t] = Op[i + 38*t] ? R[B[i + 38*t]] * R[C[i + 38*t]] : R[B[i + 38*t]] + R[C[i + 38*t]];
R[i + 496*t] = Op[i + 39*t] ? R[B[i + 39*t]] * R[C[i + 39*t]] : R[B[i + 39*t]] + R[C[i + 39*t]];
R[i + 497*t] = Op[i + 40*t] ? R[B[i + 40*t]] * R[C[i + 40*t]] : R[B[i + 40*t]] + R[C[i + 40*t]];
R[i + 498*t] = Op[i + 41*t] ? R[B[i + 41*t]] * R[C[i + 41*t]] : R[B[i + 41*t]] + R[C[i + 41*t]];
R[i + 499*t] = Op[i + 42*t] ? R[B[i + 42*t]] * R[C[i + 42*t]] : R[B[i + 42*t]] + R[C[i + 42*t]];
R[i + 500*t] = Op[i + 43*t] ? R[B[i + 43*t]] * R[C[i + 43*t]] : R[B[i + 43*t]] + R[C[i + 43*t]];
R[i + 501*t] = Op[i + 44*t] ? R[B[i + 44*t]] * R[C[i + 44*t]] : R[B[i + 44*t]] + R[C[i + 44*t]];
R[i + 502*t] = Op[i + 45*t] ? R[B[i + 45*t]] * R[C[i + 45*t]] : R[B[i + 45*t]] + R[C[i + 45*t]];
R[i + 503*t] = Op[i + 46*t] ? R[B[i + 46*t]] * R[C[i + 46*t]] : R[B[i + 46*t]] + R[C[i + 46*t]];
R[i + 504*t] = Op[i + 47*t] ? R[B[i + 47*t]] * R[C[i + 47*t]] : R[B[i + 47*t]] + R[C[i + 47*t]];
R[i + 505*t] = Op[i + 48*t] ? R[B[i + 48*t]] * R[C[i + 48*t]] : R[B[i + 48*t]] + R[C[i + 48*t]];
R[i + 506*t] = Op[i + 49*t] ? R[B[i + 49*t]] * R[C[i + 49*t]] : R[B[i + 49*t]] + R[C[i + 49*t]];
R[i + 507*t] = Op[i + 50*t] ? R[B[i + 50*t]] * R[C[i + 50*t]] : R[B[i + 50*t]] + R[C[i + 50*t]];
R[i + 508*t] = Op[i + 51*t] ? R[B[i + 51*t]] * R[C[i + 51*t]] : R[B[i + 51*t]] + R[C[i + 51*t]];
R[i + 509*t] = Op[i + 52*t] ? R[B[i + 52*t]] * R[C[i + 52*t]] : R[B[i + 52*t]] + R[C[i + 52*t]];
R[i + 510*t] = Op[i + 53*t] ? R[B[i + 53*t]] * R[C[i + 53*t]] : R[B[i + 53*t]] + R[C[i + 53*t]];
R[i + 511*t] = Op[i + 54*t] ? R[B[i + 54*t]] * R[C[i + 54*t]] : R[B[i + 54*t]] + R[C[i + 54*t]];
R[i + 512*t] = Op[i + 55*t] ? R[B[i + 55*t]] * R[C[i + 55*t]] : R[B[i + 55*t]] + R[C[i + 55*t]];
R[i + 513*t] = Op[i + 56*t] ? R[B[i + 56*t]] * R[C[i + 56*t]] : R[B[i + 56*t]] + R[C[i + 56*t]];
R[i + 514*t] = Op[i + 57*t] ? R[B[i + 57*t]] * R[C[i + 57*t]] : R[B[i + 57*t]] + R[C[i + 57*t]];
R[i + 515*t] = Op[i + 58*t] ? R[B[i + 58*t]] * R[C[i + 58*t]] : R[B[i + 58*t]] + R[C[i + 58*t]];
R[i + 516*t] = Op[i + 59*t] ? R[B[i + 59*t]] * R[C[i + 59*t]] : R[B[i + 59*t]] + R[C[i + 59*t]];
R[i + 517*t] = Op[i + 60*t] ? R[B[i + 60*t]] * R[C[i + 60*t]] : R[B[i + 60*t]] + R[C[i + 60*t]];
R[i + 518*t] = Op[i + 61*t] ? R[B[i + 61*t]] * R[C[i + 61*t]] : R[B[i + 61*t]] + R[C[i + 61*t]];
R[i + 519*t] = Op[i + 62*t] ? R[B[i + 62*t]] * R[C[i + 62*t]] : R[B[i + 62*t]] + R[C[i + 62*t]];
R[i + 520*t] = Op[i + 63*t] ? R[B[i + 63*t]] * R[C[i + 63*t]] : R[B[i + 63*t]] + R[C[i + 63*t]];
R[i + 521*t] = Op[i + 64*t] ? R[B[i + 64*t]] * R[C[i + 64*t]] : R[B[i + 64*t]] + R[C[i + 64*t]];
R[i + 522*t] = Op[i + 65*t] ? R[B[i + 65*t]] * R[C[i + 65*t]] : R[B[i + 65*t]] + R[C[i + 65*t]];
R[i + 523*t] = Op[i + 66*t] ? R[B[i + 66*t]] * R[C[i + 66*t]] : R[B[i + 66*t]] + R[C[i + 66*t]];
R[i + 524*t] = Op[i + 67*t] ? R[B[i + 67*t]] * R[C[i + 67*t]] : R[B[i + 67*t]] + R[C[i + 67*t]];
R[i + 525*t] = Op[i + 68*t] ? R[B[i + 68*t]] * R[C[i + 68*t]] : R[B[i + 68*t]] + R[C[i + 68*t]];
R[i + 526*t] = Op[i + 69*t] ? R[B[i + 69*t]] * R[C[i + 69*t]] : R[B[i + 69*t]] + R[C[i + 69*t]];
R[i + 527*t] = Op[i + 70*t] ? R[B[i + 70*t]] * R[C[i + 70*t]] : R[B[i + 70*t]] + R[C[i + 70*t]];
R[i + 528*t] = Op[i + 71*t] ? R[B[i + 71*t]] * R[C[i + 71*t]] : R[B[i + 71*t]] + R[C[i + 71*t]];
R[i + 529*t] = Op[i + 72*t] ? R[B[i + 72*t]] * R[C[i + 72*t]] : R[B[i + 72*t]] + R[C[i + 72*t]];
R[i + 530*t] = Op[i + 73*t] ? R[B[i + 73*t]] * R[C[i + 73*t]] : R[B[i + 73*t]] + R[C[i + 73*t]];
R[i + 531*t] = Op[i + 74*t] ? R[B[i + 74*t]] * R[C[i + 74*t]] : R[B[i + 74*t]] + R[C[i + 74*t]];
R[i + 532*t] = Op[i + 75*t] ? R[B[i + 75*t]] * R[C[i + 75*t]] : R[B[i + 75*t]] + R[C[i + 75*t]];
R[i + 533*t] = Op[i + 76*t] ? R[B[i + 76*t]] * R[C[i + 76*t]] : R[B[i + 76*t]] + R[C[i + 76*t]];
R[i + 534*t] = Op[i + 77*t] ? R[B[i + 77*t]] * R[C[i + 77*t]] : R[B[i + 77*t]] + R[C[i + 77*t]];
R[i + 535*t] = Op[i + 78*t] ? R[B[i + 78*t]] * R[C[i + 78*t]] : R[B[i + 78*t]] + R[C[i + 78*t]];
R[i + 536*t] = Op[i + 79*t] ? R[B[i + 79*t]] * R[C[i + 79*t]] : R[B[i + 79*t]] + R[C[i + 79*t]];
R[i + 537*t] = Op[i + 80*t] ? R[B[i + 80*t]] * R[C[i + 80*t]] : R[B[i + 80*t]] + R[C[i + 80*t]];
R[i + 538*t] = Op[i + 81*t] ? R[B[i + 81*t]] * R[C[i + 81*t]] : R[B[i + 81*t]] + R[C[i + 81*t]];
R[i + 539*t] = Op[i + 82*t] ? R[B[i + 82*t]] * R[C[i + 82*t]] : R[B[i + 82*t]] + R[C[i + 82*t]];
R[i + 540*t] = Op[i + 83*t] ? R[B[i + 83*t]] * R[C[i + 83*t]] : R[B[i + 83*t]] + R[C[i + 83*t]];
R[i + 541*t] = Op[i + 84*t] ? R[B[i + 84*t]] * R[C[i + 84*t]] : R[B[i + 84*t]] + R[C[i + 84*t]];
R[i + 542*t] = Op[i + 85*t] ? R[B[i + 85*t]] * R[C[i + 85*t]] : R[B[i + 85*t]] + R[C[i + 85*t]];
R[i + 543*t] = Op[i + 86*t] ? R[B[i + 86*t]] * R[C[i + 86*t]] : R[B[i + 86*t]] + R[C[i + 86*t]];
R[i + 544*t] = Op[i + 87*t] ? R[B[i + 87*t]] * R[C[i + 87*t]] : R[B[i + 87*t]] + R[C[i + 87*t]];
R[i + 545*t] = Op[i + 88*t] ? R[B[i + 88*t]] * R[C[i + 88*t]] : R[B[i + 88*t]] + R[C[i + 88*t]];
R[i + 546*t] = Op[i + 89*t] ? R[B[i + 89*t]] * R[C[i + 89*t]] : R[B[i + 89*t]] + R[C[i + 89*t]];
R[i + 547*t] = Op[i + 90*t] ? R[B[i + 90*t]] * R[C[i + 90*t]] : R[B[i + 90*t]] + R[C[i + 90*t]];
R[i + 548*t] = Op[i + 91*t] ? R[B[i + 91*t]] * R[C[i + 91*t]] : R[B[i + 91*t]] + R[C[i + 91*t]];
R[i + 549*t] = Op[i + 92*t] ? R[B[i + 92*t]] * R[C[i + 92*t]] : R[B[i + 92*t]] + R[C[i + 92*t]];
R[i + 550*t] = Op[i + 93*t] ? R[B[i + 93*t]] * R[C[i + 93*t]] : R[B[i + 93*t]] + R[C[i + 93*t]];
R[i + 551*t] = Op[i + 94*t] ? R[B[i + 94*t]] * R[C[i + 94*t]] : R[B[i + 94*t]] + R[C[i + 94*t]];
R[i + 552*t] = Op[i + 95*t] ? R[B[i + 95*t]] * R[C[i + 95*t]] : R[B[i + 95*t]] + R[C[i + 95*t]];
R[i + 553*t] = Op[i + 96*t] ? R[B[i + 96*t]] * R[C[i + 96*t]] : R[B[i + 96*t]] + R[C[i + 96*t]];
R[i + 554*t] = Op[i + 97*t] ? R[B[i + 97*t]] * R[C[i + 97*t]] : R[B[i + 97*t]] + R[C[i + 97*t]];
R[i + 555*t] = Op[i + 98*t] ? R[B[i + 98*t]] * R[C[i + 98*t]] : R[B[i + 98*t]] + R[C[i + 98*t]];
R[i + 556*t] = Op[i + 99*t] ? R[B[i + 99*t]] * R[C[i + 99*t]] : R[B[i + 99*t]] + R[C[i + 99*t]];
R[i + 557*t] = Op[i + 100*t] ? R[B[i + 100*t]] * R[C[i + 100*t]] : R[B[i + 100*t]] + R[C[i + 100*t]];
R[i + 558*t] = Op[i + 101*t] ? R[B[i + 101*t]] * R[C[i + 101*t]] : R[B[i + 101*t]] + R[C[i + 101*t]];
R[i + 559*t] = Op[i + 102*t] ? R[B[i + 102*t]] * R[C[i + 102*t]] : R[B[i + 102*t]] + R[C[i + 102*t]];
R[i + 560*t] = Op[i + 103*t] ? R[B[i + 103*t]] * R[C[i + 103*t]] : R[B[i + 103*t]] + R[C[i + 103*t]];
R[i + 561*t] = Op[i + 104*t] ? R[B[i + 104*t]] * R[C[i + 104*t]] : R[B[i + 104*t]] + R[C[i + 104*t]];
R[i + 562*t] = Op[i + 105*t] ? R[B[i + 105*t]] * R[C[i + 105*t]] : R[B[i + 105*t]] + R[C[i + 105*t]];
R[i + 563*t] = Op[i + 106*t] ? R[B[i + 106*t]] * R[C[i + 106*t]] : R[B[i + 106*t]] + R[C[i + 106*t]];
R[i + 564*t] = Op[i + 107*t] ? R[B[i + 107*t]] * R[C[i + 107*t]] : R[B[i + 107*t]] + R[C[i + 107*t]];
R[i + 565*t] = Op[i + 108*t] ? R[B[i + 108*t]] * R[C[i + 108*t]] : R[B[i + 108*t]] + R[C[i + 108*t]];
R[i + 566*t] = Op[i + 109*t] ? R[B[i + 109*t]] * R[C[i + 109*t]] : R[B[i + 109*t]] + R[C[i + 109*t]];
R[i + 567*t] = Op[i + 110*t] ? R[B[i + 110*t]] * R[C[i + 110*t]] : R[B[i + 110*t]] + R[C[i + 110*t]];
R[i + 568*t] = Op[i + 111*t] ? R[B[i + 111*t]] * R[C[i + 111*t]] : R[B[i + 111*t]] + R[C[i + 111*t]];
R[i + 569*t] = Op[i + 112*t] ? R[B[i + 112*t]] * R[C[i + 112*t]] : R[B[i + 112*t]] + R[C[i + 112*t]];
R[i + 570*t] = Op[i + 113*t] ? R[B[i + 113*t]] * R[C[i + 113*t]] : R[B[i + 113*t]] + R[C[i + 113*t]];
R[i + 571*t] = Op[i + 114*t] ? R[B[i + 114*t]] * R[C[i + 114*t]] : R[B[i + 114*t]] + R[C[i + 114*t]];
R[i + 572*t] = Op[i + 115*t] ? R[B[i + 115*t]] * R[C[i + 115*t]] : R[B[i + 115*t]] + R[C[i + 115*t]];
R[i + 573*t] = Op[i + 116*t] ? R[B[i + 116*t]] * R[C[i + 116*t]] : R[B[i + 116*t]] + R[C[i + 116*t]];
R[i + 574*t] = Op[i + 117*t] ? R[B[i + 117*t]] * R[C[i + 117*t]] : R[B[i + 117*t]] + R[C[i + 117*t]];
R[i + 575*t] = Op[i + 118*t] ? R[B[i + 118*t]] * R[C[i + 118*t]] : R[B[i + 118*t]] + R[C[i + 118*t]];
R[i + 576*t] = Op[i + 119*t] ? R[B[i + 119*t]] * R[C[i + 119*t]] : R[B[i + 119*t]] + R[C[i + 119*t]];
R[i + 577*t] = Op[i + 120*t] ? R[B[i + 120*t]] * R[C[i + 120*t]] : R[B[i + 120*t]] + R[C[i + 120*t]];
R[i + 578*t] = Op[i + 121*t] ? R[B[i + 121*t]] * R[C[i + 121*t]] : R[B[i + 121*t]] + R[C[i + 121*t]];
R[i + 579*t] = Op[i + 122*t] ? R[B[i + 122*t]] * R[C[i + 122*t]] : R[B[i + 122*t]] + R[C[i + 122*t]];
R[i + 580*t] = Op[i + 123*t] ? R[B[i + 123*t]] * R[C[i + 123*t]] : R[B[i + 123*t]] + R[C[i + 123*t]];
R[i + 581*t] = Op[i + 124*t] ? R[B[i + 124*t]] * R[C[i + 124*t]] : R[B[i + 124*t]] + R[C[i + 124*t]];
R[i + 582*t] = Op[i + 125*t] ? R[B[i + 125*t]] * R[C[i + 125*t]] : R[B[i + 125*t]] + R[C[i + 125*t]];
R[i + 583*t] = Op[i + 126*t] ? R[B[i + 126*t]] * R[C[i + 126*t]] : R[B[i + 126*t]] + R[C[i + 126*t]];
R[i + 584*t] = Op[i + 127*t] ? R[B[i + 127*t]] * R[C[i + 127*t]] : R[B[i + 127*t]] + R[C[i + 127*t]];
R[i + 585*t] = Op[i + 128*t] ? R[B[i + 128*t]] * R[C[i + 128*t]] : R[B[i + 128*t]] + R[C[i + 128*t]];
R[i + 586*t] = Op[i + 129*t] ? R[B[i + 129*t]] * R[C[i + 129*t]] : R[B[i + 129*t]] + R[C[i + 129*t]];
R[i + 587*t] = Op[i + 130*t] ? R[B[i + 130*t]] * R[C[i + 130*t]] : R[B[i + 130*t]] + R[C[i + 130*t]];
R[i + 588*t] = Op[i + 131*t] ? R[B[i + 131*t]] * R[C[i + 131*t]] : R[B[i + 131*t]] + R[C[i + 131*t]];
R[i + 589*t] = Op[i + 132*t] ? R[B[i + 132*t]] * R[C[i + 132*t]] : R[B[i + 132*t]] + R[C[i + 132*t]];
R[i + 590*t] = Op[i + 133*t] ? R[B[i + 133*t]] * R[C[i + 133*t]] : R[B[i + 133*t]] + R[C[i + 133*t]];
R[i + 591*t] = Op[i + 134*t] ? R[B[i + 134*t]] * R[C[i + 134*t]] : R[B[i + 134*t]] + R[C[i + 134*t]];
R[i + 592*t] = Op[i + 135*t] ? R[B[i + 135*t]] * R[C[i + 135*t]] : R[B[i + 135*t]] + R[C[i + 135*t]];
R[i + 593*t] = Op[i + 136*t] ? R[B[i + 136*t]] * R[C[i + 136*t]] : R[B[i + 136*t]] + R[C[i + 136*t]];
R[i + 594*t] = Op[i + 137*t] ? R[B[i + 137*t]] * R[C[i + 137*t]] : R[B[i + 137*t]] + R[C[i + 137*t]];
R[i + 595*t] = Op[i + 138*t] ? R[B[i + 138*t]] * R[C[i + 138*t]] : R[B[i + 138*t]] + R[C[i + 138*t]];
R[i + 596*t] = Op[i + 139*t] ? R[B[i + 139*t]] * R[C[i + 139*t]] : R[B[i + 139*t]] + R[C[i + 139*t]];
R[i + 597*t] = Op[i + 140*t] ? R[B[i + 140*t]] * R[C[i + 140*t]] : R[B[i + 140*t]] + R[C[i + 140*t]];
__syncthreads();
R[i + 598*t] = Op[i + 141*t] ? R[B[i + 141*t]] * R[C[i + 141*t]] : R[B[i + 141*t]] + R[C[i + 141*t]];
R[i + 599*t] = Op[i + 142*t] ? R[B[i + 142*t]] * R[C[i + 142*t]] : R[B[i + 142*t]] + R[C[i + 142*t]];
R[i + 600*t] = Op[i + 143*t] ? R[B[i + 143*t]] * R[C[i + 143*t]] : R[B[i + 143*t]] + R[C[i + 143*t]];
R[i + 601*t] = Op[i + 144*t] ? R[B[i + 144*t]] * R[C[i + 144*t]] : R[B[i + 144*t]] + R[C[i + 144*t]];
R[i + 602*t] = Op[i + 145*t] ? R[B[i + 145*t]] * R[C[i + 145*t]] : R[B[i + 145*t]] + R[C[i + 145*t]];
R[i + 603*t] = Op[i + 146*t] ? R[B[i + 146*t]] * R[C[i + 146*t]] : R[B[i + 146*t]] + R[C[i + 146*t]];
R[i + 604*t] = Op[i + 147*t] ? R[B[i + 147*t]] * R[C[i + 147*t]] : R[B[i + 147*t]] + R[C[i + 147*t]];
R[i + 605*t] = Op[i + 148*t] ? R[B[i + 148*t]] * R[C[i + 148*t]] : R[B[i + 148*t]] + R[C[i + 148*t]];
R[i + 606*t] = Op[i + 149*t] ? R[B[i + 149*t]] * R[C[i + 149*t]] : R[B[i + 149*t]] + R[C[i + 149*t]];
R[i + 607*t] = Op[i + 150*t] ? R[B[i + 150*t]] * R[C[i + 150*t]] : R[B[i + 150*t]] + R[C[i + 150*t]];
R[i + 608*t] = Op[i + 151*t] ? R[B[i + 151*t]] * R[C[i + 151*t]] : R[B[i + 151*t]] + R[C[i + 151*t]];
R[i + 609*t] = Op[i + 152*t] ? R[B[i + 152*t]] * R[C[i + 152*t]] : R[B[i + 152*t]] + R[C[i + 152*t]];
R[i + 610*t] = Op[i + 153*t] ? R[B[i + 153*t]] * R[C[i + 153*t]] : R[B[i + 153*t]] + R[C[i + 153*t]];
R[i + 611*t] = Op[i + 154*t] ? R[B[i + 154*t]] * R[C[i + 154*t]] : R[B[i + 154*t]] + R[C[i + 154*t]];
R[i + 612*t] = Op[i + 155*t] ? R[B[i + 155*t]] * R[C[i + 155*t]] : R[B[i + 155*t]] + R[C[i + 155*t]];
R[i + 613*t] = Op[i + 156*t] ? R[B[i + 156*t]] * R[C[i + 156*t]] : R[B[i + 156*t]] + R[C[i + 156*t]];
R[i + 614*t] = Op[i + 157*t] ? R[B[i + 157*t]] * R[C[i + 157*t]] : R[B[i + 157*t]] + R[C[i + 157*t]];
R[i + 615*t] = Op[i + 158*t] ? R[B[i + 158*t]] * R[C[i + 158*t]] : R[B[i + 158*t]] + R[C[i + 158*t]];
R[i + 616*t] = Op[i + 159*t] ? R[B[i + 159*t]] * R[C[i + 159*t]] : R[B[i + 159*t]] + R[C[i + 159*t]];
R[i + 617*t] = Op[i + 160*t] ? R[B[i + 160*t]] * R[C[i + 160*t]] : R[B[i + 160*t]] + R[C[i + 160*t]];
R[i + 618*t] = Op[i + 161*t] ? R[B[i + 161*t]] * R[C[i + 161*t]] : R[B[i + 161*t]] + R[C[i + 161*t]];
R[i + 619*t] = Op[i + 162*t] ? R[B[i + 162*t]] * R[C[i + 162*t]] : R[B[i + 162*t]] + R[C[i + 162*t]];
R[i + 620*t] = Op[i + 163*t] ? R[B[i + 163*t]] * R[C[i + 163*t]] : R[B[i + 163*t]] + R[C[i + 163*t]];
R[i + 621*t] = Op[i + 164*t] ? R[B[i + 164*t]] * R[C[i + 164*t]] : R[B[i + 164*t]] + R[C[i + 164*t]];
R[i + 622*t] = Op[i + 165*t] ? R[B[i + 165*t]] * R[C[i + 165*t]] : R[B[i + 165*t]] + R[C[i + 165*t]];
R[i + 623*t] = Op[i + 166*t] ? R[B[i + 166*t]] * R[C[i + 166*t]] : R[B[i + 166*t]] + R[C[i + 166*t]];
R[i + 624*t] = Op[i + 167*t] ? R[B[i + 167*t]] * R[C[i + 167*t]] : R[B[i + 167*t]] + R[C[i + 167*t]];
R[i + 625*t] = Op[i + 168*t] ? R[B[i + 168*t]] * R[C[i + 168*t]] : R[B[i + 168*t]] + R[C[i + 168*t]];
R[i + 626*t] = Op[i + 169*t] ? R[B[i + 169*t]] * R[C[i + 169*t]] : R[B[i + 169*t]] + R[C[i + 169*t]];
R[i + 627*t] = Op[i + 170*t] ? R[B[i + 170*t]] * R[C[i + 170*t]] : R[B[i + 170*t]] + R[C[i + 170*t]];
R[i + 628*t] = Op[i + 171*t] ? R[B[i + 171*t]] * R[C[i + 171*t]] : R[B[i + 171*t]] + R[C[i + 171*t]];
R[i + 629*t] = Op[i + 172*t] ? R[B[i + 172*t]] * R[C[i + 172*t]] : R[B[i + 172*t]] + R[C[i + 172*t]];
R[i + 630*t] = Op[i + 173*t] ? R[B[i + 173*t]] * R[C[i + 173*t]] : R[B[i + 173*t]] + R[C[i + 173*t]];
R[i + 631*t] = Op[i + 174*t] ? R[B[i + 174*t]] * R[C[i + 174*t]] : R[B[i + 174*t]] + R[C[i + 174*t]];
R[i + 632*t] = Op[i + 175*t] ? R[B[i + 175*t]] * R[C[i + 175*t]] : R[B[i + 175*t]] + R[C[i + 175*t]];
R[i + 633*t] = Op[i + 176*t] ? R[B[i + 176*t]] * R[C[i + 176*t]] : R[B[i + 176*t]] + R[C[i + 176*t]];
R[i + 634*t] = Op[i + 177*t] ? R[B[i + 177*t]] * R[C[i + 177*t]] : R[B[i + 177*t]] + R[C[i + 177*t]];
R[i + 635*t] = Op[i + 178*t] ? R[B[i + 178*t]] * R[C[i + 178*t]] : R[B[i + 178*t]] + R[C[i + 178*t]];
R[i + 636*t] = Op[i + 179*t] ? R[B[i + 179*t]] * R[C[i + 179*t]] : R[B[i + 179*t]] + R[C[i + 179*t]];
R[i + 637*t] = Op[i + 180*t] ? R[B[i + 180*t]] * R[C[i + 180*t]] : R[B[i + 180*t]] + R[C[i + 180*t]];
R[i + 638*t] = Op[i + 181*t] ? R[B[i + 181*t]] * R[C[i + 181*t]] : R[B[i + 181*t]] + R[C[i + 181*t]];
R[i + 639*t] = Op[i + 182*t] ? R[B[i + 182*t]] * R[C[i + 182*t]] : R[B[i + 182*t]] + R[C[i + 182*t]];
R[i + 640*t] = Op[i + 183*t] ? R[B[i + 183*t]] * R[C[i + 183*t]] : R[B[i + 183*t]] + R[C[i + 183*t]];
R[i + 641*t] = Op[i + 184*t] ? R[B[i + 184*t]] * R[C[i + 184*t]] : R[B[i + 184*t]] + R[C[i + 184*t]];
R[i + 642*t] = Op[i + 185*t] ? R[B[i + 185*t]] * R[C[i + 185*t]] : R[B[i + 185*t]] + R[C[i + 185*t]];
R[i + 643*t] = Op[i + 186*t] ? R[B[i + 186*t]] * R[C[i + 186*t]] : R[B[i + 186*t]] + R[C[i + 186*t]];
R[i + 644*t] = Op[i + 187*t] ? R[B[i + 187*t]] * R[C[i + 187*t]] : R[B[i + 187*t]] + R[C[i + 187*t]];
R[i + 645*t] = Op[i + 188*t] ? R[B[i + 188*t]] * R[C[i + 188*t]] : R[B[i + 188*t]] + R[C[i + 188*t]];
R[i + 646*t] = Op[i + 189*t] ? R[B[i + 189*t]] * R[C[i + 189*t]] : R[B[i + 189*t]] + R[C[i + 189*t]];
R[i + 647*t] = Op[i + 190*t] ? R[B[i + 190*t]] * R[C[i + 190*t]] : R[B[i + 190*t]] + R[C[i + 190*t]];
R[i + 648*t] = Op[i + 191*t] ? R[B[i + 191*t]] * R[C[i + 191*t]] : R[B[i + 191*t]] + R[C[i + 191*t]];
R[i + 649*t] = Op[i + 192*t] ? R[B[i + 192*t]] * R[C[i + 192*t]] : R[B[i + 192*t]] + R[C[i + 192*t]];
R[i + 650*t] = Op[i + 193*t] ? R[B[i + 193*t]] * R[C[i + 193*t]] : R[B[i + 193*t]] + R[C[i + 193*t]];
R[i + 651*t] = Op[i + 194*t] ? R[B[i + 194*t]] * R[C[i + 194*t]] : R[B[i + 194*t]] + R[C[i + 194*t]];
R[i + 652*t] = Op[i + 195*t] ? R[B[i + 195*t]] * R[C[i + 195*t]] : R[B[i + 195*t]] + R[C[i + 195*t]];
R[i + 653*t] = Op[i + 196*t] ? R[B[i + 196*t]] * R[C[i + 196*t]] : R[B[i + 196*t]] + R[C[i + 196*t]];
R[i + 654*t] = Op[i + 197*t] ? R[B[i + 197*t]] * R[C[i + 197*t]] : R[B[i + 197*t]] + R[C[i + 197*t]];
R[i + 655*t] = Op[i + 198*t] ? R[B[i + 198*t]] * R[C[i + 198*t]] : R[B[i + 198*t]] + R[C[i + 198*t]];
R[i + 656*t] = Op[i + 199*t] ? R[B[i + 199*t]] * R[C[i + 199*t]] : R[B[i + 199*t]] + R[C[i + 199*t]];
R[i + 657*t] = Op[i + 200*t] ? R[B[i + 200*t]] * R[C[i + 200*t]] : R[B[i + 200*t]] + R[C[i + 200*t]];
R[i + 658*t] = Op[i + 201*t] ? R[B[i + 201*t]] * R[C[i + 201*t]] : R[B[i + 201*t]] + R[C[i + 201*t]];
R[i + 659*t] = Op[i + 202*t] ? R[B[i + 202*t]] * R[C[i + 202*t]] : R[B[i + 202*t]] + R[C[i + 202*t]];
R[i + 660*t] = Op[i + 203*t] ? R[B[i + 203*t]] * R[C[i + 203*t]] : R[B[i + 203*t]] + R[C[i + 203*t]];
R[i + 661*t] = Op[i + 204*t] ? R[B[i + 204*t]] * R[C[i + 204*t]] : R[B[i + 204*t]] + R[C[i + 204*t]];
R[i + 662*t] = Op[i + 205*t] ? R[B[i + 205*t]] * R[C[i + 205*t]] : R[B[i + 205*t]] + R[C[i + 205*t]];
R[i + 663*t] = Op[i + 206*t] ? R[B[i + 206*t]] * R[C[i + 206*t]] : R[B[i + 206*t]] + R[C[i + 206*t]];
R[i + 664*t] = Op[i + 207*t] ? R[B[i + 207*t]] * R[C[i + 207*t]] : R[B[i + 207*t]] + R[C[i + 207*t]];
R[i + 665*t] = Op[i + 208*t] ? R[B[i + 208*t]] * R[C[i + 208*t]] : R[B[i + 208*t]] + R[C[i + 208*t]];
R[i + 666*t] = Op[i + 209*t] ? R[B[i + 209*t]] * R[C[i + 209*t]] : R[B[i + 209*t]] + R[C[i + 209*t]];
R[i + 667*t] = Op[i + 210*t] ? R[B[i + 210*t]] * R[C[i + 210*t]] : R[B[i + 210*t]] + R[C[i + 210*t]];
R[i + 668*t] = Op[i + 211*t] ? R[B[i + 211*t]] * R[C[i + 211*t]] : R[B[i + 211*t]] + R[C[i + 211*t]];
R[i + 669*t] = Op[i + 212*t] ? R[B[i + 212*t]] * R[C[i + 212*t]] : R[B[i + 212*t]] + R[C[i + 212*t]];
R[i + 670*t] = Op[i + 213*t] ? R[B[i + 213*t]] * R[C[i + 213*t]] : R[B[i + 213*t]] + R[C[i + 213*t]];
R[i + 671*t] = Op[i + 214*t] ? R[B[i + 214*t]] * R[C[i + 214*t]] : R[B[i + 214*t]] + R[C[i + 214*t]];
R[i + 672*t] = Op[i + 215*t] ? R[B[i + 215*t]] * R[C[i + 215*t]] : R[B[i + 215*t]] + R[C[i + 215*t]];
R[i + 673*t] = Op[i + 216*t] ? R[B[i + 216*t]] * R[C[i + 216*t]] : R[B[i + 216*t]] + R[C[i + 216*t]];
R[i + 674*t] = Op[i + 217*t] ? R[B[i + 217*t]] * R[C[i + 217*t]] : R[B[i + 217*t]] + R[C[i + 217*t]];
R[i + 675*t] = Op[i + 218*t] ? R[B[i + 218*t]] * R[C[i + 218*t]] : R[B[i + 218*t]] + R[C[i + 218*t]];
R[i + 676*t] = Op[i + 219*t] ? R[B[i + 219*t]] * R[C[i + 219*t]] : R[B[i + 219*t]] + R[C[i + 219*t]];
R[i + 677*t] = Op[i + 220*t] ? R[B[i + 220*t]] * R[C[i + 220*t]] : R[B[i + 220*t]] + R[C[i + 220*t]];
R[i + 678*t] = Op[i + 221*t] ? R[B[i + 221*t]] * R[C[i + 221*t]] : R[B[i + 221*t]] + R[C[i + 221*t]];
R[i + 679*t] = Op[i + 222*t] ? R[B[i + 222*t]] * R[C[i + 222*t]] : R[B[i + 222*t]] + R[C[i + 222*t]];
__syncthreads();
R[i + 680*t] = Op[i + 223*t] ? R[B[i + 223*t]] * R[C[i + 223*t]] : R[B[i + 223*t]] + R[C[i + 223*t]];
R[i + 681*t] = Op[i + 224*t] ? R[B[i + 224*t]] * R[C[i + 224*t]] : R[B[i + 224*t]] + R[C[i + 224*t]];
R[i + 682*t] = Op[i + 225*t] ? R[B[i + 225*t]] * R[C[i + 225*t]] : R[B[i + 225*t]] + R[C[i + 225*t]];
R[i + 683*t] = Op[i + 226*t] ? R[B[i + 226*t]] * R[C[i + 226*t]] : R[B[i + 226*t]] + R[C[i + 226*t]];
R[i + 684*t] = Op[i + 227*t] ? R[B[i + 227*t]] * R[C[i + 227*t]] : R[B[i + 227*t]] + R[C[i + 227*t]];
R[i + 685*t] = Op[i + 228*t] ? R[B[i + 228*t]] * R[C[i + 228*t]] : R[B[i + 228*t]] + R[C[i + 228*t]];
R[i + 686*t] = Op[i + 229*t] ? R[B[i + 229*t]] * R[C[i + 229*t]] : R[B[i + 229*t]] + R[C[i + 229*t]];
R[i + 687*t] = Op[i + 230*t] ? R[B[i + 230*t]] * R[C[i + 230*t]] : R[B[i + 230*t]] + R[C[i + 230*t]];
R[i + 688*t] = Op[i + 231*t] ? R[B[i + 231*t]] * R[C[i + 231*t]] : R[B[i + 231*t]] + R[C[i + 231*t]];
R[i + 689*t] = Op[i + 232*t] ? R[B[i + 232*t]] * R[C[i + 232*t]] : R[B[i + 232*t]] + R[C[i + 232*t]];
R[i + 690*t] = Op[i + 233*t] ? R[B[i + 233*t]] * R[C[i + 233*t]] : R[B[i + 233*t]] + R[C[i + 233*t]];
R[i + 691*t] = Op[i + 234*t] ? R[B[i + 234*t]] * R[C[i + 234*t]] : R[B[i + 234*t]] + R[C[i + 234*t]];
R[i + 692*t] = Op[i + 235*t] ? R[B[i + 235*t]] * R[C[i + 235*t]] : R[B[i + 235*t]] + R[C[i + 235*t]];
R[i + 693*t] = Op[i + 236*t] ? R[B[i + 236*t]] * R[C[i + 236*t]] : R[B[i + 236*t]] + R[C[i + 236*t]];
R[i + 694*t] = Op[i + 237*t] ? R[B[i + 237*t]] * R[C[i + 237*t]] : R[B[i + 237*t]] + R[C[i + 237*t]];
R[i + 695*t] = Op[i + 238*t] ? R[B[i + 238*t]] * R[C[i + 238*t]] : R[B[i + 238*t]] + R[C[i + 238*t]];
R[i + 696*t] = Op[i + 239*t] ? R[B[i + 239*t]] * R[C[i + 239*t]] : R[B[i + 239*t]] + R[C[i + 239*t]];
R[i + 697*t] = Op[i + 240*t] ? R[B[i + 240*t]] * R[C[i + 240*t]] : R[B[i + 240*t]] + R[C[i + 240*t]];
R[i + 698*t] = Op[i + 241*t] ? R[B[i + 241*t]] * R[C[i + 241*t]] : R[B[i + 241*t]] + R[C[i + 241*t]];
R[i + 699*t] = Op[i + 242*t] ? R[B[i + 242*t]] * R[C[i + 242*t]] : R[B[i + 242*t]] + R[C[i + 242*t]];
R[i + 700*t] = Op[i + 243*t] ? R[B[i + 243*t]] * R[C[i + 243*t]] : R[B[i + 243*t]] + R[C[i + 243*t]];
R[i + 701*t] = Op[i + 244*t] ? R[B[i + 244*t]] * R[C[i + 244*t]] : R[B[i + 244*t]] + R[C[i + 244*t]];
R[i + 702*t] = Op[i + 245*t] ? R[B[i + 245*t]] * R[C[i + 245*t]] : R[B[i + 245*t]] + R[C[i + 245*t]];
R[i + 703*t] = Op[i + 246*t] ? R[B[i + 246*t]] * R[C[i + 246*t]] : R[B[i + 246*t]] + R[C[i + 246*t]];
R[i + 704*t] = Op[i + 247*t] ? R[B[i + 247*t]] * R[C[i + 247*t]] : R[B[i + 247*t]] + R[C[i + 247*t]];
R[i + 705*t] = Op[i + 248*t] ? R[B[i + 248*t]] * R[C[i + 248*t]] : R[B[i + 248*t]] + R[C[i + 248*t]];
R[i + 706*t] = Op[i + 249*t] ? R[B[i + 249*t]] * R[C[i + 249*t]] : R[B[i + 249*t]] + R[C[i + 249*t]];
R[i + 707*t] = Op[i + 250*t] ? R[B[i + 250*t]] * R[C[i + 250*t]] : R[B[i + 250*t]] + R[C[i + 250*t]];
R[i + 708*t] = Op[i + 251*t] ? R[B[i + 251*t]] * R[C[i + 251*t]] : R[B[i + 251*t]] + R[C[i + 251*t]];
R[i + 709*t] = Op[i + 252*t] ? R[B[i + 252*t]] * R[C[i + 252*t]] : R[B[i + 252*t]] + R[C[i + 252*t]];
R[i + 710*t] = Op[i + 253*t] ? R[B[i + 253*t]] * R[C[i + 253*t]] : R[B[i + 253*t]] + R[C[i + 253*t]];
R[i + 711*t] = Op[i + 254*t] ? R[B[i + 254*t]] * R[C[i + 254*t]] : R[B[i + 254*t]] + R[C[i + 254*t]];
R[i + 712*t] = Op[i + 255*t] ? R[B[i + 255*t]] * R[C[i + 255*t]] : R[B[i + 255*t]] + R[C[i + 255*t]];
R[i + 713*t] = Op[i + 256*t] ? R[B[i + 256*t]] * R[C[i + 256*t]] : R[B[i + 256*t]] + R[C[i + 256*t]];
R[i + 714*t] = Op[i + 257*t] ? R[B[i + 257*t]] * R[C[i + 257*t]] : R[B[i + 257*t]] + R[C[i + 257*t]];
R[i + 715*t] = Op[i + 258*t] ? R[B[i + 258*t]] * R[C[i + 258*t]] : R[B[i + 258*t]] + R[C[i + 258*t]];
R[i + 716*t] = Op[i + 259*t] ? R[B[i + 259*t]] * R[C[i + 259*t]] : R[B[i + 259*t]] + R[C[i + 259*t]];
R[i + 717*t] = Op[i + 260*t] ? R[B[i + 260*t]] * R[C[i + 260*t]] : R[B[i + 260*t]] + R[C[i + 260*t]];
R[i + 718*t] = Op[i + 261*t] ? R[B[i + 261*t]] * R[C[i + 261*t]] : R[B[i + 261*t]] + R[C[i + 261*t]];
R[i + 719*t] = Op[i + 262*t] ? R[B[i + 262*t]] * R[C[i + 262*t]] : R[B[i + 262*t]] + R[C[i + 262*t]];
R[i + 720*t] = Op[i + 263*t] ? R[B[i + 263*t]] * R[C[i + 263*t]] : R[B[i + 263*t]] + R[C[i + 263*t]];
R[i + 721*t] = Op[i + 264*t] ? R[B[i + 264*t]] * R[C[i + 264*t]] : R[B[i + 264*t]] + R[C[i + 264*t]];
R[i + 722*t] = Op[i + 265*t] ? R[B[i + 265*t]] * R[C[i + 265*t]] : R[B[i + 265*t]] + R[C[i + 265*t]];
R[i + 723*t] = Op[i + 266*t] ? R[B[i + 266*t]] * R[C[i + 266*t]] : R[B[i + 266*t]] + R[C[i + 266*t]];
R[i + 724*t] = Op[i + 267*t] ? R[B[i + 267*t]] * R[C[i + 267*t]] : R[B[i + 267*t]] + R[C[i + 267*t]];
R[i + 725*t] = Op[i + 268*t] ? R[B[i + 268*t]] * R[C[i + 268*t]] : R[B[i + 268*t]] + R[C[i + 268*t]];
R[i + 726*t] = Op[i + 269*t] ? R[B[i + 269*t]] * R[C[i + 269*t]] : R[B[i + 269*t]] + R[C[i + 269*t]];
R[i + 727*t] = Op[i + 270*t] ? R[B[i + 270*t]] * R[C[i + 270*t]] : R[B[i + 270*t]] + R[C[i + 270*t]];
R[i + 728*t] = Op[i + 271*t] ? R[B[i + 271*t]] * R[C[i + 271*t]] : R[B[i + 271*t]] + R[C[i + 271*t]];
R[i + 729*t] = Op[i + 272*t] ? R[B[i + 272*t]] * R[C[i + 272*t]] : R[B[i + 272*t]] + R[C[i + 272*t]];
R[i + 730*t] = Op[i + 273*t] ? R[B[i + 273*t]] * R[C[i + 273*t]] : R[B[i + 273*t]] + R[C[i + 273*t]];
R[i + 731*t] = Op[i + 274*t] ? R[B[i + 274*t]] * R[C[i + 274*t]] : R[B[i + 274*t]] + R[C[i + 274*t]];
R[i + 732*t] = Op[i + 275*t] ? R[B[i + 275*t]] * R[C[i + 275*t]] : R[B[i + 275*t]] + R[C[i + 275*t]];
R[i + 733*t] = Op[i + 276*t] ? R[B[i + 276*t]] * R[C[i + 276*t]] : R[B[i + 276*t]] + R[C[i + 276*t]];
R[i + 734*t] = Op[i + 277*t] ? R[B[i + 277*t]] * R[C[i + 277*t]] : R[B[i + 277*t]] + R[C[i + 277*t]];
R[i + 735*t] = Op[i + 278*t] ? R[B[i + 278*t]] * R[C[i + 278*t]] : R[B[i + 278*t]] + R[C[i + 278*t]];
R[i + 736*t] = Op[i + 279*t] ? R[B[i + 279*t]] * R[C[i + 279*t]] : R[B[i + 279*t]] + R[C[i + 279*t]];
R[i + 737*t] = Op[i + 280*t] ? R[B[i + 280*t]] * R[C[i + 280*t]] : R[B[i + 280*t]] + R[C[i + 280*t]];
R[i + 738*t] = Op[i + 281*t] ? R[B[i + 281*t]] * R[C[i + 281*t]] : R[B[i + 281*t]] + R[C[i + 281*t]];
R[i + 739*t] = Op[i + 282*t] ? R[B[i + 282*t]] * R[C[i + 282*t]] : R[B[i + 282*t]] + R[C[i + 282*t]];
R[i + 740*t] = Op[i + 283*t] ? R[B[i + 283*t]] * R[C[i + 283*t]] : R[B[i + 283*t]] + R[C[i + 283*t]];
R[i + 741*t] = Op[i + 284*t] ? R[B[i + 284*t]] * R[C[i + 284*t]] : R[B[i + 284*t]] + R[C[i + 284*t]];
R[i + 742*t] = Op[i + 285*t] ? R[B[i + 285*t]] * R[C[i + 285*t]] : R[B[i + 285*t]] + R[C[i + 285*t]];
R[i + 743*t] = Op[i + 286*t] ? R[B[i + 286*t]] * R[C[i + 286*t]] : R[B[i + 286*t]] + R[C[i + 286*t]];
R[i + 744*t] = Op[i + 287*t] ? R[B[i + 287*t]] * R[C[i + 287*t]] : R[B[i + 287*t]] + R[C[i + 287*t]];
R[i + 745*t] = Op[i + 288*t] ? R[B[i + 288*t]] * R[C[i + 288*t]] : R[B[i + 288*t]] + R[C[i + 288*t]];
R[i + 746*t] = Op[i + 289*t] ? R[B[i + 289*t]] * R[C[i + 289*t]] : R[B[i + 289*t]] + R[C[i + 289*t]];
R[i + 747*t] = Op[i + 290*t] ? R[B[i + 290*t]] * R[C[i + 290*t]] : R[B[i + 290*t]] + R[C[i + 290*t]];
R[i + 748*t] = Op[i + 291*t] ? R[B[i + 291*t]] * R[C[i + 291*t]] : R[B[i + 291*t]] + R[C[i + 291*t]];
R[i + 749*t] = Op[i + 292*t] ? R[B[i + 292*t]] * R[C[i + 292*t]] : R[B[i + 292*t]] + R[C[i + 292*t]];
R[i + 750*t] = Op[i + 293*t] ? R[B[i + 293*t]] * R[C[i + 293*t]] : R[B[i + 293*t]] + R[C[i + 293*t]];
R[i + 751*t] = Op[i + 294*t] ? R[B[i + 294*t]] * R[C[i + 294*t]] : R[B[i + 294*t]] + R[C[i + 294*t]];
__syncthreads();
R[i + 752*t] = Op[i + 295*t] ? R[B[i + 295*t]] * R[C[i + 295*t]] : R[B[i + 295*t]] + R[C[i + 295*t]];
R[i + 753*t] = Op[i + 296*t] ? R[B[i + 296*t]] * R[C[i + 296*t]] : R[B[i + 296*t]] + R[C[i + 296*t]];
R[i + 754*t] = Op[i + 297*t] ? R[B[i + 297*t]] * R[C[i + 297*t]] : R[B[i + 297*t]] + R[C[i + 297*t]];
R[i + 755*t] = Op[i + 298*t] ? R[B[i + 298*t]] * R[C[i + 298*t]] : R[B[i + 298*t]] + R[C[i + 298*t]];
R[i + 756*t] = Op[i + 299*t] ? R[B[i + 299*t]] * R[C[i + 299*t]] : R[B[i + 299*t]] + R[C[i + 299*t]];
R[i + 757*t] = Op[i + 300*t] ? R[B[i + 300*t]] * R[C[i + 300*t]] : R[B[i + 300*t]] + R[C[i + 300*t]];
R[i + 758*t] = Op[i + 301*t] ? R[B[i + 301*t]] * R[C[i + 301*t]] : R[B[i + 301*t]] + R[C[i + 301*t]];
R[i + 759*t] = Op[i + 302*t] ? R[B[i + 302*t]] * R[C[i + 302*t]] : R[B[i + 302*t]] + R[C[i + 302*t]];
R[i + 760*t] = Op[i + 303*t] ? R[B[i + 303*t]] * R[C[i + 303*t]] : R[B[i + 303*t]] + R[C[i + 303*t]];
R[i + 761*t] = Op[i + 304*t] ? R[B[i + 304*t]] * R[C[i + 304*t]] : R[B[i + 304*t]] + R[C[i + 304*t]];
R[i + 762*t] = Op[i + 305*t] ? R[B[i + 305*t]] * R[C[i + 305*t]] : R[B[i + 305*t]] + R[C[i + 305*t]];
R[i + 763*t] = Op[i + 306*t] ? R[B[i + 306*t]] * R[C[i + 306*t]] : R[B[i + 306*t]] + R[C[i + 306*t]];
R[i + 764*t] = Op[i + 307*t] ? R[B[i + 307*t]] * R[C[i + 307*t]] : R[B[i + 307*t]] + R[C[i + 307*t]];
R[i + 765*t] = Op[i + 308*t] ? R[B[i + 308*t]] * R[C[i + 308*t]] : R[B[i + 308*t]] + R[C[i + 308*t]];
R[i + 766*t] = Op[i + 309*t] ? R[B[i + 309*t]] * R[C[i + 309*t]] : R[B[i + 309*t]] + R[C[i + 309*t]];
R[i + 767*t] = Op[i + 310*t] ? R[B[i + 310*t]] * R[C[i + 310*t]] : R[B[i + 310*t]] + R[C[i + 310*t]];
R[i + 768*t] = Op[i + 311*t] ? R[B[i + 311*t]] * R[C[i + 311*t]] : R[B[i + 311*t]] + R[C[i + 311*t]];
R[i + 769*t] = Op[i + 312*t] ? R[B[i + 312*t]] * R[C[i + 312*t]] : R[B[i + 312*t]] + R[C[i + 312*t]];
R[i + 770*t] = Op[i + 313*t] ? R[B[i + 313*t]] * R[C[i + 313*t]] : R[B[i + 313*t]] + R[C[i + 313*t]];
R[i + 771*t] = Op[i + 314*t] ? R[B[i + 314*t]] * R[C[i + 314*t]] : R[B[i + 314*t]] + R[C[i + 314*t]];
R[i + 772*t] = Op[i + 315*t] ? R[B[i + 315*t]] * R[C[i + 315*t]] : R[B[i + 315*t]] + R[C[i + 315*t]];
R[i + 773*t] = Op[i + 316*t] ? R[B[i + 316*t]] * R[C[i + 316*t]] : R[B[i + 316*t]] + R[C[i + 316*t]];
R[i + 774*t] = Op[i + 317*t] ? R[B[i + 317*t]] * R[C[i + 317*t]] : R[B[i + 317*t]] + R[C[i + 317*t]];
R[i + 775*t] = Op[i + 318*t] ? R[B[i + 318*t]] * R[C[i + 318*t]] : R[B[i + 318*t]] + R[C[i + 318*t]];
R[i + 776*t] = Op[i + 319*t] ? R[B[i + 319*t]] * R[C[i + 319*t]] : R[B[i + 319*t]] + R[C[i + 319*t]];
R[i + 777*t] = Op[i + 320*t] ? R[B[i + 320*t]] * R[C[i + 320*t]] : R[B[i + 320*t]] + R[C[i + 320*t]];
R[i + 778*t] = Op[i + 321*t] ? R[B[i + 321*t]] * R[C[i + 321*t]] : R[B[i + 321*t]] + R[C[i + 321*t]];
R[i + 779*t] = Op[i + 322*t] ? R[B[i + 322*t]] * R[C[i + 322*t]] : R[B[i + 322*t]] + R[C[i + 322*t]];
R[i + 780*t] = Op[i + 323*t] ? R[B[i + 323*t]] * R[C[i + 323*t]] : R[B[i + 323*t]] + R[C[i + 323*t]];
R[i + 781*t] = Op[i + 324*t] ? R[B[i + 324*t]] * R[C[i + 324*t]] : R[B[i + 324*t]] + R[C[i + 324*t]];
R[i + 782*t] = Op[i + 325*t] ? R[B[i + 325*t]] * R[C[i + 325*t]] : R[B[i + 325*t]] + R[C[i + 325*t]];
R[i + 783*t] = Op[i + 326*t] ? R[B[i + 326*t]] * R[C[i + 326*t]] : R[B[i + 326*t]] + R[C[i + 326*t]];
R[i + 784*t] = Op[i + 327*t] ? R[B[i + 327*t]] * R[C[i + 327*t]] : R[B[i + 327*t]] + R[C[i + 327*t]];
R[i + 785*t] = Op[i + 328*t] ? R[B[i + 328*t]] * R[C[i + 328*t]] : R[B[i + 328*t]] + R[C[i + 328*t]];
R[i + 786*t] = Op[i + 329*t] ? R[B[i + 329*t]] * R[C[i + 329*t]] : R[B[i + 329*t]] + R[C[i + 329*t]];
R[i + 787*t] = Op[i + 330*t] ? R[B[i + 330*t]] * R[C[i + 330*t]] : R[B[i + 330*t]] + R[C[i + 330*t]];
R[i + 788*t] = Op[i + 331*t] ? R[B[i + 331*t]] * R[C[i + 331*t]] : R[B[i + 331*t]] + R[C[i + 331*t]];
R[i + 789*t] = Op[i + 332*t] ? R[B[i + 332*t]] * R[C[i + 332*t]] : R[B[i + 332*t]] + R[C[i + 332*t]];
R[i + 790*t] = Op[i + 333*t] ? R[B[i + 333*t]] * R[C[i + 333*t]] : R[B[i + 333*t]] + R[C[i + 333*t]];
R[i + 791*t] = Op[i + 334*t] ? R[B[i + 334*t]] * R[C[i + 334*t]] : R[B[i + 334*t]] + R[C[i + 334*t]];
R[i + 792*t] = Op[i + 335*t] ? R[B[i + 335*t]] * R[C[i + 335*t]] : R[B[i + 335*t]] + R[C[i + 335*t]];
R[i + 793*t] = Op[i + 336*t] ? R[B[i + 336*t]] * R[C[i + 336*t]] : R[B[i + 336*t]] + R[C[i + 336*t]];
R[i + 794*t] = Op[i + 337*t] ? R[B[i + 337*t]] * R[C[i + 337*t]] : R[B[i + 337*t]] + R[C[i + 337*t]];
R[i + 795*t] = Op[i + 338*t] ? R[B[i + 338*t]] * R[C[i + 338*t]] : R[B[i + 338*t]] + R[C[i + 338*t]];
R[i + 796*t] = Op[i + 339*t] ? R[B[i + 339*t]] * R[C[i + 339*t]] : R[B[i + 339*t]] + R[C[i + 339*t]];
R[i + 797*t] = Op[i + 340*t] ? R[B[i + 340*t]] * R[C[i + 340*t]] : R[B[i + 340*t]] + R[C[i + 340*t]];
R[i + 798*t] = Op[i + 341*t] ? R[B[i + 341*t]] * R[C[i + 341*t]] : R[B[i + 341*t]] + R[C[i + 341*t]];
R[i + 799*t] = Op[i + 342*t] ? R[B[i + 342*t]] * R[C[i + 342*t]] : R[B[i + 342*t]] + R[C[i + 342*t]];
R[i + 800*t] = Op[i + 343*t] ? R[B[i + 343*t]] * R[C[i + 343*t]] : R[B[i + 343*t]] + R[C[i + 343*t]];
R[i + 801*t] = Op[i + 344*t] ? R[B[i + 344*t]] * R[C[i + 344*t]] : R[B[i + 344*t]] + R[C[i + 344*t]];
R[i + 802*t] = Op[i + 345*t] ? R[B[i + 345*t]] * R[C[i + 345*t]] : R[B[i + 345*t]] + R[C[i + 345*t]];
R[i + 803*t] = Op[i + 346*t] ? R[B[i + 346*t]] * R[C[i + 346*t]] : R[B[i + 346*t]] + R[C[i + 346*t]];
R[i + 804*t] = Op[i + 347*t] ? R[B[i + 347*t]] * R[C[i + 347*t]] : R[B[i + 347*t]] + R[C[i + 347*t]];
R[i + 805*t] = Op[i + 348*t] ? R[B[i + 348*t]] * R[C[i + 348*t]] : R[B[i + 348*t]] + R[C[i + 348*t]];
R[i + 806*t] = Op[i + 349*t] ? R[B[i + 349*t]] * R[C[i + 349*t]] : R[B[i + 349*t]] + R[C[i + 349*t]];
R[i + 807*t] = Op[i + 350*t] ? R[B[i + 350*t]] * R[C[i + 350*t]] : R[B[i + 350*t]] + R[C[i + 350*t]];
R[i + 808*t] = Op[i + 351*t] ? R[B[i + 351*t]] * R[C[i + 351*t]] : R[B[i + 351*t]] + R[C[i + 351*t]];
R[i + 809*t] = Op[i + 352*t] ? R[B[i + 352*t]] * R[C[i + 352*t]] : R[B[i + 352*t]] + R[C[i + 352*t]];
R[i + 810*t] = Op[i + 353*t] ? R[B[i + 353*t]] * R[C[i + 353*t]] : R[B[i + 353*t]] + R[C[i + 353*t]];
R[i + 811*t] = Op[i + 354*t] ? R[B[i + 354*t]] * R[C[i + 354*t]] : R[B[i + 354*t]] + R[C[i + 354*t]];
R[i + 812*t] = Op[i + 355*t] ? R[B[i + 355*t]] * R[C[i + 355*t]] : R[B[i + 355*t]] + R[C[i + 355*t]];
R[i + 813*t] = Op[i + 356*t] ? R[B[i + 356*t]] * R[C[i + 356*t]] : R[B[i + 356*t]] + R[C[i + 356*t]];
R[i + 814*t] = Op[i + 357*t] ? R[B[i + 357*t]] * R[C[i + 357*t]] : R[B[i + 357*t]] + R[C[i + 357*t]];
R[i + 815*t] = Op[i + 358*t] ? R[B[i + 358*t]] * R[C[i + 358*t]] : R[B[i + 358*t]] + R[C[i + 358*t]];
R[i + 816*t] = Op[i + 359*t] ? R[B[i + 359*t]] * R[C[i + 359*t]] : R[B[i + 359*t]] + R[C[i + 359*t]];
R[i + 817*t] = Op[i + 360*t] ? R[B[i + 360*t]] * R[C[i + 360*t]] : R[B[i + 360*t]] + R[C[i + 360*t]];
R[i + 818*t] = Op[i + 361*t] ? R[B[i + 361*t]] * R[C[i + 361*t]] : R[B[i + 361*t]] + R[C[i + 361*t]];
R[i + 819*t] = Op[i + 362*t] ? R[B[i + 362*t]] * R[C[i + 362*t]] : R[B[i + 362*t]] + R[C[i + 362*t]];
R[i + 820*t] = Op[i + 363*t] ? R[B[i + 363*t]] * R[C[i + 363*t]] : R[B[i + 363*t]] + R[C[i + 363*t]];
R[i + 821*t] = Op[i + 364*t] ? R[B[i + 364*t]] * R[C[i + 364*t]] : R[B[i + 364*t]] + R[C[i + 364*t]];
R[i + 822*t] = Op[i + 365*t] ? R[B[i + 365*t]] * R[C[i + 365*t]] : R[B[i + 365*t]] + R[C[i + 365*t]];
R[i + 823*t] = Op[i + 366*t] ? R[B[i + 366*t]] * R[C[i + 366*t]] : R[B[i + 366*t]] + R[C[i + 366*t]];
__syncthreads();
R[i + 824*t] = Op[i + 367*t] ? R[B[i + 367*t]] * R[C[i + 367*t]] : R[B[i + 367*t]] + R[C[i + 367*t]];
R[i + 825*t] = Op[i + 368*t] ? R[B[i + 368*t]] * R[C[i + 368*t]] : R[B[i + 368*t]] + R[C[i + 368*t]];
R[i + 826*t] = Op[i + 369*t] ? R[B[i + 369*t]] * R[C[i + 369*t]] : R[B[i + 369*t]] + R[C[i + 369*t]];
R[i + 827*t] = Op[i + 370*t] ? R[B[i + 370*t]] * R[C[i + 370*t]] : R[B[i + 370*t]] + R[C[i + 370*t]];
R[i + 828*t] = Op[i + 371*t] ? R[B[i + 371*t]] * R[C[i + 371*t]] : R[B[i + 371*t]] + R[C[i + 371*t]];
R[i + 829*t] = Op[i + 372*t] ? R[B[i + 372*t]] * R[C[i + 372*t]] : R[B[i + 372*t]] + R[C[i + 372*t]];
R[i + 830*t] = Op[i + 373*t] ? R[B[i + 373*t]] * R[C[i + 373*t]] : R[B[i + 373*t]] + R[C[i + 373*t]];
R[i + 831*t] = Op[i + 374*t] ? R[B[i + 374*t]] * R[C[i + 374*t]] : R[B[i + 374*t]] + R[C[i + 374*t]];
R[i + 832*t] = Op[i + 375*t] ? R[B[i + 375*t]] * R[C[i + 375*t]] : R[B[i + 375*t]] + R[C[i + 375*t]];
R[i + 833*t] = Op[i + 376*t] ? R[B[i + 376*t]] * R[C[i + 376*t]] : R[B[i + 376*t]] + R[C[i + 376*t]];
R[i + 834*t] = Op[i + 377*t] ? R[B[i + 377*t]] * R[C[i + 377*t]] : R[B[i + 377*t]] + R[C[i + 377*t]];
R[i + 835*t] = Op[i + 378*t] ? R[B[i + 378*t]] * R[C[i + 378*t]] : R[B[i + 378*t]] + R[C[i + 378*t]];
R[i + 836*t] = Op[i + 379*t] ? R[B[i + 379*t]] * R[C[i + 379*t]] : R[B[i + 379*t]] + R[C[i + 379*t]];
R[i + 837*t] = Op[i + 380*t] ? R[B[i + 380*t]] * R[C[i + 380*t]] : R[B[i + 380*t]] + R[C[i + 380*t]];
R[i + 838*t] = Op[i + 381*t] ? R[B[i + 381*t]] * R[C[i + 381*t]] : R[B[i + 381*t]] + R[C[i + 381*t]];
R[i + 839*t] = Op[i + 382*t] ? R[B[i + 382*t]] * R[C[i + 382*t]] : R[B[i + 382*t]] + R[C[i + 382*t]];
R[i + 840*t] = Op[i + 383*t] ? R[B[i + 383*t]] * R[C[i + 383*t]] : R[B[i + 383*t]] + R[C[i + 383*t]];
R[i + 841*t] = Op[i + 384*t] ? R[B[i + 384*t]] * R[C[i + 384*t]] : R[B[i + 384*t]] + R[C[i + 384*t]];
R[i + 842*t] = Op[i + 385*t] ? R[B[i + 385*t]] * R[C[i + 385*t]] : R[B[i + 385*t]] + R[C[i + 385*t]];
R[i + 843*t] = Op[i + 386*t] ? R[B[i + 386*t]] * R[C[i + 386*t]] : R[B[i + 386*t]] + R[C[i + 386*t]];
R[i + 844*t] = Op[i + 387*t] ? R[B[i + 387*t]] * R[C[i + 387*t]] : R[B[i + 387*t]] + R[C[i + 387*t]];
R[i + 845*t] = Op[i + 388*t] ? R[B[i + 388*t]] * R[C[i + 388*t]] : R[B[i + 388*t]] + R[C[i + 388*t]];
R[i + 846*t] = Op[i + 389*t] ? R[B[i + 389*t]] * R[C[i + 389*t]] : R[B[i + 389*t]] + R[C[i + 389*t]];
R[i + 847*t] = Op[i + 390*t] ? R[B[i + 390*t]] * R[C[i + 390*t]] : R[B[i + 390*t]] + R[C[i + 390*t]];
R[i + 848*t] = Op[i + 391*t] ? R[B[i + 391*t]] * R[C[i + 391*t]] : R[B[i + 391*t]] + R[C[i + 391*t]];
R[i + 849*t] = Op[i + 392*t] ? R[B[i + 392*t]] * R[C[i + 392*t]] : R[B[i + 392*t]] + R[C[i + 392*t]];
R[i + 850*t] = Op[i + 393*t] ? R[B[i + 393*t]] * R[C[i + 393*t]] : R[B[i + 393*t]] + R[C[i + 393*t]];
R[i + 851*t] = Op[i + 394*t] ? R[B[i + 394*t]] * R[C[i + 394*t]] : R[B[i + 394*t]] + R[C[i + 394*t]];
R[i + 852*t] = Op[i + 395*t] ? R[B[i + 395*t]] * R[C[i + 395*t]] : R[B[i + 395*t]] + R[C[i + 395*t]];
R[i + 853*t] = Op[i + 396*t] ? R[B[i + 396*t]] * R[C[i + 396*t]] : R[B[i + 396*t]] + R[C[i + 396*t]];
R[i + 854*t] = Op[i + 397*t] ? R[B[i + 397*t]] * R[C[i + 397*t]] : R[B[i + 397*t]] + R[C[i + 397*t]];
R[i + 855*t] = Op[i + 398*t] ? R[B[i + 398*t]] * R[C[i + 398*t]] : R[B[i + 398*t]] + R[C[i + 398*t]];
R[i + 856*t] = Op[i + 399*t] ? R[B[i + 399*t]] * R[C[i + 399*t]] : R[B[i + 399*t]] + R[C[i + 399*t]];
R[i + 857*t] = Op[i + 400*t] ? R[B[i + 400*t]] * R[C[i + 400*t]] : R[B[i + 400*t]] + R[C[i + 400*t]];
R[i + 858*t] = Op[i + 401*t] ? R[B[i + 401*t]] * R[C[i + 401*t]] : R[B[i + 401*t]] + R[C[i + 401*t]];
R[i + 859*t] = Op[i + 402*t] ? R[B[i + 402*t]] * R[C[i + 402*t]] : R[B[i + 402*t]] + R[C[i + 402*t]];
R[i + 860*t] = Op[i + 403*t] ? R[B[i + 403*t]] * R[C[i + 403*t]] : R[B[i + 403*t]] + R[C[i + 403*t]];
R[i + 861*t] = Op[i + 404*t] ? R[B[i + 404*t]] * R[C[i + 404*t]] : R[B[i + 404*t]] + R[C[i + 404*t]];
R[i + 862*t] = Op[i + 405*t] ? R[B[i + 405*t]] * R[C[i + 405*t]] : R[B[i + 405*t]] + R[C[i + 405*t]];
R[i + 863*t] = Op[i + 406*t] ? R[B[i + 406*t]] * R[C[i + 406*t]] : R[B[i + 406*t]] + R[C[i + 406*t]];
R[i + 864*t] = Op[i + 407*t] ? R[B[i + 407*t]] * R[C[i + 407*t]] : R[B[i + 407*t]] + R[C[i + 407*t]];
R[i + 865*t] = Op[i + 408*t] ? R[B[i + 408*t]] * R[C[i + 408*t]] : R[B[i + 408*t]] + R[C[i + 408*t]];
R[i + 866*t] = Op[i + 409*t] ? R[B[i + 409*t]] * R[C[i + 409*t]] : R[B[i + 409*t]] + R[C[i + 409*t]];
R[i + 867*t] = Op[i + 410*t] ? R[B[i + 410*t]] * R[C[i + 410*t]] : R[B[i + 410*t]] + R[C[i + 410*t]];
R[i + 868*t] = Op[i + 411*t] ? R[B[i + 411*t]] * R[C[i + 411*t]] : R[B[i + 411*t]] + R[C[i + 411*t]];
R[i + 869*t] = Op[i + 412*t] ? R[B[i + 412*t]] * R[C[i + 412*t]] : R[B[i + 412*t]] + R[C[i + 412*t]];
__syncthreads();
R[i + 870*t] = Op[i + 413*t] ? R[B[i + 413*t]] * R[C[i + 413*t]] : R[B[i + 413*t]] + R[C[i + 413*t]];
R[i + 871*t] = Op[i + 414*t] ? R[B[i + 414*t]] * R[C[i + 414*t]] : R[B[i + 414*t]] + R[C[i + 414*t]];
R[i + 872*t] = Op[i + 415*t] ? R[B[i + 415*t]] * R[C[i + 415*t]] : R[B[i + 415*t]] + R[C[i + 415*t]];
R[i + 873*t] = Op[i + 416*t] ? R[B[i + 416*t]] * R[C[i + 416*t]] : R[B[i + 416*t]] + R[C[i + 416*t]];
R[i + 874*t] = Op[i + 417*t] ? R[B[i + 417*t]] * R[C[i + 417*t]] : R[B[i + 417*t]] + R[C[i + 417*t]];
R[i + 875*t] = Op[i + 418*t] ? R[B[i + 418*t]] * R[C[i + 418*t]] : R[B[i + 418*t]] + R[C[i + 418*t]];
R[i + 876*t] = Op[i + 419*t] ? R[B[i + 419*t]] * R[C[i + 419*t]] : R[B[i + 419*t]] + R[C[i + 419*t]];
R[i + 877*t] = Op[i + 420*t] ? R[B[i + 420*t]] * R[C[i + 420*t]] : R[B[i + 420*t]] + R[C[i + 420*t]];
R[i + 878*t] = Op[i + 421*t] ? R[B[i + 421*t]] * R[C[i + 421*t]] : R[B[i + 421*t]] + R[C[i + 421*t]];
R[i + 879*t] = Op[i + 422*t] ? R[B[i + 422*t]] * R[C[i + 422*t]] : R[B[i + 422*t]] + R[C[i + 422*t]];
R[i + 880*t] = Op[i + 423*t] ? R[B[i + 423*t]] * R[C[i + 423*t]] : R[B[i + 423*t]] + R[C[i + 423*t]];
R[i + 881*t] = Op[i + 424*t] ? R[B[i + 424*t]] * R[C[i + 424*t]] : R[B[i + 424*t]] + R[C[i + 424*t]];
R[i + 882*t] = Op[i + 425*t] ? R[B[i + 425*t]] * R[C[i + 425*t]] : R[B[i + 425*t]] + R[C[i + 425*t]];
R[i + 883*t] = Op[i + 426*t] ? R[B[i + 426*t]] * R[C[i + 426*t]] : R[B[i + 426*t]] + R[C[i + 426*t]];
R[i + 884*t] = Op[i + 427*t] ? R[B[i + 427*t]] * R[C[i + 427*t]] : R[B[i + 427*t]] + R[C[i + 427*t]];
R[i + 885*t] = Op[i + 428*t] ? R[B[i + 428*t]] * R[C[i + 428*t]] : R[B[i + 428*t]] + R[C[i + 428*t]];
R[i + 886*t] = Op[i + 429*t] ? R[B[i + 429*t]] * R[C[i + 429*t]] : R[B[i + 429*t]] + R[C[i + 429*t]];
R[i + 887*t] = Op[i + 430*t] ? R[B[i + 430*t]] * R[C[i + 430*t]] : R[B[i + 430*t]] + R[C[i + 430*t]];
R[i + 888*t] = Op[i + 431*t] ? R[B[i + 431*t]] * R[C[i + 431*t]] : R[B[i + 431*t]] + R[C[i + 431*t]];
R[i + 889*t] = Op[i + 432*t] ? R[B[i + 432*t]] * R[C[i + 432*t]] : R[B[i + 432*t]] + R[C[i + 432*t]];
R[i + 890*t] = Op[i + 433*t] ? R[B[i + 433*t]] * R[C[i + 433*t]] : R[B[i + 433*t]] + R[C[i + 433*t]];
R[i + 891*t] = Op[i + 434*t] ? R[B[i + 434*t]] * R[C[i + 434*t]] : R[B[i + 434*t]] + R[C[i + 434*t]];
R[i + 892*t] = Op[i + 435*t] ? R[B[i + 435*t]] * R[C[i + 435*t]] : R[B[i + 435*t]] + R[C[i + 435*t]];
R[i + 893*t] = Op[i + 436*t] ? R[B[i + 436*t]] * R[C[i + 436*t]] : R[B[i + 436*t]] + R[C[i + 436*t]];
R[i + 894*t] = Op[i + 437*t] ? R[B[i + 437*t]] * R[C[i + 437*t]] : R[B[i + 437*t]] + R[C[i + 437*t]];
R[i + 895*t] = Op[i + 438*t] ? R[B[i + 438*t]] * R[C[i + 438*t]] : R[B[i + 438*t]] + R[C[i + 438*t]];
R[i + 896*t] = Op[i + 439*t] ? R[B[i + 439*t]] * R[C[i + 439*t]] : R[B[i + 439*t]] + R[C[i + 439*t]];
R[i + 897*t] = Op[i + 440*t] ? R[B[i + 440*t]] * R[C[i + 440*t]] : R[B[i + 440*t]] + R[C[i + 440*t]];
R[i + 898*t] = Op[i + 441*t] ? R[B[i + 441*t]] * R[C[i + 441*t]] : R[B[i + 441*t]] + R[C[i + 441*t]];
R[i + 899*t] = Op[i + 442*t] ? R[B[i + 442*t]] * R[C[i + 442*t]] : R[B[i + 442*t]] + R[C[i + 442*t]];
R[i + 900*t] = Op[i + 443*t] ? R[B[i + 443*t]] * R[C[i + 443*t]] : R[B[i + 443*t]] + R[C[i + 443*t]];
R[i + 901*t] = Op[i + 444*t] ? R[B[i + 444*t]] * R[C[i + 444*t]] : R[B[i + 444*t]] + R[C[i + 444*t]];
R[i + 902*t] = Op[i + 445*t] ? R[B[i + 445*t]] * R[C[i + 445*t]] : R[B[i + 445*t]] + R[C[i + 445*t]];
R[i + 903*t] = Op[i + 446*t] ? R[B[i + 446*t]] * R[C[i + 446*t]] : R[B[i + 446*t]] + R[C[i + 446*t]];
R[i + 904*t] = Op[i + 447*t] ? R[B[i + 447*t]] * R[C[i + 447*t]] : R[B[i + 447*t]] + R[C[i + 447*t]];
R[i + 905*t] = Op[i + 448*t] ? R[B[i + 448*t]] * R[C[i + 448*t]] : R[B[i + 448*t]] + R[C[i + 448*t]];
R[i + 906*t] = Op[i + 449*t] ? R[B[i + 449*t]] * R[C[i + 449*t]] : R[B[i + 449*t]] + R[C[i + 449*t]];
R[i + 907*t] = Op[i + 450*t] ? R[B[i + 450*t]] * R[C[i + 450*t]] : R[B[i + 450*t]] + R[C[i + 450*t]];
R[i + 908*t] = Op[i + 451*t] ? R[B[i + 451*t]] * R[C[i + 451*t]] : R[B[i + 451*t]] + R[C[i + 451*t]];
R[i + 909*t] = Op[i + 452*t] ? R[B[i + 452*t]] * R[C[i + 452*t]] : R[B[i + 452*t]] + R[C[i + 452*t]];
R[i + 910*t] = Op[i + 453*t] ? R[B[i + 453*t]] * R[C[i + 453*t]] : R[B[i + 453*t]] + R[C[i + 453*t]];
R[i + 911*t] = Op[i + 454*t] ? R[B[i + 454*t]] * R[C[i + 454*t]] : R[B[i + 454*t]] + R[C[i + 454*t]];
R[i + 912*t] = Op[i + 455*t] ? R[B[i + 455*t]] * R[C[i + 455*t]] : R[B[i + 455*t]] + R[C[i + 455*t]];
R[i + 913*t] = Op[i + 456*t] ? R[B[i + 456*t]] * R[C[i + 456*t]] : R[B[i + 456*t]] + R[C[i + 456*t]];
R[i + 914*t] = Op[i + 457*t] ? R[B[i + 457*t]] * R[C[i + 457*t]] : R[B[i + 457*t]] + R[C[i + 457*t]];
R[i + 915*t] = Op[i + 458*t] ? R[B[i + 458*t]] * R[C[i + 458*t]] : R[B[i + 458*t]] + R[C[i + 458*t]];
R[i + 916*t] = Op[i + 459*t] ? R[B[i + 459*t]] * R[C[i + 459*t]] : R[B[i + 459*t]] + R[C[i + 459*t]];
R[i + 917*t] = Op[i + 460*t] ? R[B[i + 460*t]] * R[C[i + 460*t]] : R[B[i + 460*t]] + R[C[i + 460*t]];
R[i + 918*t] = Op[i + 461*t] ? R[B[i + 461*t]] * R[C[i + 461*t]] : R[B[i + 461*t]] + R[C[i + 461*t]];
R[i + 919*t] = Op[i + 462*t] ? R[B[i + 462*t]] * R[C[i + 462*t]] : R[B[i + 462*t]] + R[C[i + 462*t]];
R[i + 920*t] = Op[i + 463*t] ? R[B[i + 463*t]] * R[C[i + 463*t]] : R[B[i + 463*t]] + R[C[i + 463*t]];
R[i + 921*t] = Op[i + 464*t] ? R[B[i + 464*t]] * R[C[i + 464*t]] : R[B[i + 464*t]] + R[C[i + 464*t]];
R[i + 922*t] = Op[i + 465*t] ? R[B[i + 465*t]] * R[C[i + 465*t]] : R[B[i + 465*t]] + R[C[i + 465*t]];
R[i + 923*t] = Op[i + 466*t] ? R[B[i + 466*t]] * R[C[i + 466*t]] : R[B[i + 466*t]] + R[C[i + 466*t]];
R[i + 924*t] = Op[i + 467*t] ? R[B[i + 467*t]] * R[C[i + 467*t]] : R[B[i + 467*t]] + R[C[i + 467*t]];
R[i + 925*t] = Op[i + 468*t] ? R[B[i + 468*t]] * R[C[i + 468*t]] : R[B[i + 468*t]] + R[C[i + 468*t]];
R[i + 926*t] = Op[i + 469*t] ? R[B[i + 469*t]] * R[C[i + 469*t]] : R[B[i + 469*t]] + R[C[i + 469*t]];
R[i + 927*t] = Op[i + 470*t] ? R[B[i + 470*t]] * R[C[i + 470*t]] : R[B[i + 470*t]] + R[C[i + 470*t]];
R[i + 928*t] = Op[i + 471*t] ? R[B[i + 471*t]] * R[C[i + 471*t]] : R[B[i + 471*t]] + R[C[i + 471*t]];
R[i + 929*t] = Op[i + 472*t] ? R[B[i + 472*t]] * R[C[i + 472*t]] : R[B[i + 472*t]] + R[C[i + 472*t]];
R[i + 930*t] = Op[i + 473*t] ? R[B[i + 473*t]] * R[C[i + 473*t]] : R[B[i + 473*t]] + R[C[i + 473*t]];
R[i + 931*t] = Op[i + 474*t] ? R[B[i + 474*t]] * R[C[i + 474*t]] : R[B[i + 474*t]] + R[C[i + 474*t]];
R[i + 932*t] = Op[i + 475*t] ? R[B[i + 475*t]] * R[C[i + 475*t]] : R[B[i + 475*t]] + R[C[i + 475*t]];
R[i + 933*t] = Op[i + 476*t] ? R[B[i + 476*t]] * R[C[i + 476*t]] : R[B[i + 476*t]] + R[C[i + 476*t]];
R[i + 934*t] = Op[i + 477*t] ? R[B[i + 477*t]] * R[C[i + 477*t]] : R[B[i + 477*t]] + R[C[i + 477*t]];
R[i + 935*t] = Op[i + 478*t] ? R[B[i + 478*t]] * R[C[i + 478*t]] : R[B[i + 478*t]] + R[C[i + 478*t]];
R[i + 936*t] = Op[i + 479*t] ? R[B[i + 479*t]] * R[C[i + 479*t]] : R[B[i + 479*t]] + R[C[i + 479*t]];
R[i + 937*t] = Op[i + 480*t] ? R[B[i + 480*t]] * R[C[i + 480*t]] : R[B[i + 480*t]] + R[C[i + 480*t]];
R[i + 938*t] = Op[i + 481*t] ? R[B[i + 481*t]] * R[C[i + 481*t]] : R[B[i + 481*t]] + R[C[i + 481*t]];
R[i + 939*t] = Op[i + 482*t] ? R[B[i + 482*t]] * R[C[i + 482*t]] : R[B[i + 482*t]] + R[C[i + 482*t]];
R[i + 940*t] = Op[i + 483*t] ? R[B[i + 483*t]] * R[C[i + 483*t]] : R[B[i + 483*t]] + R[C[i + 483*t]];
R[i + 941*t] = Op[i + 484*t] ? R[B[i + 484*t]] * R[C[i + 484*t]] : R[B[i + 484*t]] + R[C[i + 484*t]];
R[i + 942*t] = Op[i + 485*t] ? R[B[i + 485*t]] * R[C[i + 485*t]] : R[B[i + 485*t]] + R[C[i + 485*t]];
R[i + 943*t] = Op[i + 486*t] ? R[B[i + 486*t]] * R[C[i + 486*t]] : R[B[i + 486*t]] + R[C[i + 486*t]];
R[i + 944*t] = Op[i + 487*t] ? R[B[i + 487*t]] * R[C[i + 487*t]] : R[B[i + 487*t]] + R[C[i + 487*t]];
R[i + 945*t] = Op[i + 488*t] ? R[B[i + 488*t]] * R[C[i + 488*t]] : R[B[i + 488*t]] + R[C[i + 488*t]];
__syncthreads();
R[i + 946*t] = Op[i + 489*t] ? R[B[i + 489*t]] * R[C[i + 489*t]] : R[B[i + 489*t]] + R[C[i + 489*t]];
R[i + 947*t] = Op[i + 490*t] ? R[B[i + 490*t]] * R[C[i + 490*t]] : R[B[i + 490*t]] + R[C[i + 490*t]];
R[i + 948*t] = Op[i + 491*t] ? R[B[i + 491*t]] * R[C[i + 491*t]] : R[B[i + 491*t]] + R[C[i + 491*t]];
R[i + 949*t] = Op[i + 492*t] ? R[B[i + 492*t]] * R[C[i + 492*t]] : R[B[i + 492*t]] + R[C[i + 492*t]];
R[i + 950*t] = Op[i + 493*t] ? R[B[i + 493*t]] * R[C[i + 493*t]] : R[B[i + 493*t]] + R[C[i + 493*t]];
R[i + 951*t] = Op[i + 494*t] ? R[B[i + 494*t]] * R[C[i + 494*t]] : R[B[i + 494*t]] + R[C[i + 494*t]];
R[i + 952*t] = Op[i + 495*t] ? R[B[i + 495*t]] * R[C[i + 495*t]] : R[B[i + 495*t]] + R[C[i + 495*t]];
R[i + 953*t] = Op[i + 496*t] ? R[B[i + 496*t]] * R[C[i + 496*t]] : R[B[i + 496*t]] + R[C[i + 496*t]];
R[i + 954*t] = Op[i + 497*t] ? R[B[i + 497*t]] * R[C[i + 497*t]] : R[B[i + 497*t]] + R[C[i + 497*t]];
R[i + 955*t] = Op[i + 498*t] ? R[B[i + 498*t]] * R[C[i + 498*t]] : R[B[i + 498*t]] + R[C[i + 498*t]];
R[i + 956*t] = Op[i + 499*t] ? R[B[i + 499*t]] * R[C[i + 499*t]] : R[B[i + 499*t]] + R[C[i + 499*t]];
R[i + 957*t] = Op[i + 500*t] ? R[B[i + 500*t]] * R[C[i + 500*t]] : R[B[i + 500*t]] + R[C[i + 500*t]];
R[i + 958*t] = Op[i + 501*t] ? R[B[i + 501*t]] * R[C[i + 501*t]] : R[B[i + 501*t]] + R[C[i + 501*t]];
R[i + 959*t] = Op[i + 502*t] ? R[B[i + 502*t]] * R[C[i + 502*t]] : R[B[i + 502*t]] + R[C[i + 502*t]];
R[i + 960*t] = Op[i + 503*t] ? R[B[i + 503*t]] * R[C[i + 503*t]] : R[B[i + 503*t]] + R[C[i + 503*t]];
R[i + 961*t] = Op[i + 504*t] ? R[B[i + 504*t]] * R[C[i + 504*t]] : R[B[i + 504*t]] + R[C[i + 504*t]];
R[i + 962*t] = Op[i + 505*t] ? R[B[i + 505*t]] * R[C[i + 505*t]] : R[B[i + 505*t]] + R[C[i + 505*t]];
R[i + 963*t] = Op[i + 506*t] ? R[B[i + 506*t]] * R[C[i + 506*t]] : R[B[i + 506*t]] + R[C[i + 506*t]];
R[i + 964*t] = Op[i + 507*t] ? R[B[i + 507*t]] * R[C[i + 507*t]] : R[B[i + 507*t]] + R[C[i + 507*t]];
R[i + 965*t] = Op[i + 508*t] ? R[B[i + 508*t]] * R[C[i + 508*t]] : R[B[i + 508*t]] + R[C[i + 508*t]];
R[i + 966*t] = Op[i + 509*t] ? R[B[i + 509*t]] * R[C[i + 509*t]] : R[B[i + 509*t]] + R[C[i + 509*t]];
R[i + 967*t] = Op[i + 510*t] ? R[B[i + 510*t]] * R[C[i + 510*t]] : R[B[i + 510*t]] + R[C[i + 510*t]];
R[i + 968*t] = Op[i + 511*t] ? R[B[i + 511*t]] * R[C[i + 511*t]] : R[B[i + 511*t]] + R[C[i + 511*t]];
R[i + 969*t] = Op[i + 512*t] ? R[B[i + 512*t]] * R[C[i + 512*t]] : R[B[i + 512*t]] + R[C[i + 512*t]];
R[i + 970*t] = Op[i + 513*t] ? R[B[i + 513*t]] * R[C[i + 513*t]] : R[B[i + 513*t]] + R[C[i + 513*t]];
R[i + 971*t] = Op[i + 514*t] ? R[B[i + 514*t]] * R[C[i + 514*t]] : R[B[i + 514*t]] + R[C[i + 514*t]];
R[i + 972*t] = Op[i + 515*t] ? R[B[i + 515*t]] * R[C[i + 515*t]] : R[B[i + 515*t]] + R[C[i + 515*t]];
R[i + 973*t] = Op[i + 516*t] ? R[B[i + 516*t]] * R[C[i + 516*t]] : R[B[i + 516*t]] + R[C[i + 516*t]];
R[i + 974*t] = Op[i + 517*t] ? R[B[i + 517*t]] * R[C[i + 517*t]] : R[B[i + 517*t]] + R[C[i + 517*t]];
R[i + 975*t] = Op[i + 518*t] ? R[B[i + 518*t]] * R[C[i + 518*t]] : R[B[i + 518*t]] + R[C[i + 518*t]];
R[i + 976*t] = Op[i + 519*t] ? R[B[i + 519*t]] * R[C[i + 519*t]] : R[B[i + 519*t]] + R[C[i + 519*t]];
R[i + 977*t] = Op[i + 520*t] ? R[B[i + 520*t]] * R[C[i + 520*t]] : R[B[i + 520*t]] + R[C[i + 520*t]];
R[i + 978*t] = Op[i + 521*t] ? R[B[i + 521*t]] * R[C[i + 521*t]] : R[B[i + 521*t]] + R[C[i + 521*t]];
R[i + 979*t] = Op[i + 522*t] ? R[B[i + 522*t]] * R[C[i + 522*t]] : R[B[i + 522*t]] + R[C[i + 522*t]];
R[i + 980*t] = Op[i + 523*t] ? R[B[i + 523*t]] * R[C[i + 523*t]] : R[B[i + 523*t]] + R[C[i + 523*t]];
R[i + 981*t] = Op[i + 524*t] ? R[B[i + 524*t]] * R[C[i + 524*t]] : R[B[i + 524*t]] + R[C[i + 524*t]];
R[i + 982*t] = Op[i + 525*t] ? R[B[i + 525*t]] * R[C[i + 525*t]] : R[B[i + 525*t]] + R[C[i + 525*t]];
R[i + 983*t] = Op[i + 526*t] ? R[B[i + 526*t]] * R[C[i + 526*t]] : R[B[i + 526*t]] + R[C[i + 526*t]];
R[i + 984*t] = Op[i + 527*t] ? R[B[i + 527*t]] * R[C[i + 527*t]] : R[B[i + 527*t]] + R[C[i + 527*t]];
R[i + 985*t] = Op[i + 528*t] ? R[B[i + 528*t]] * R[C[i + 528*t]] : R[B[i + 528*t]] + R[C[i + 528*t]];
R[i + 986*t] = Op[i + 529*t] ? R[B[i + 529*t]] * R[C[i + 529*t]] : R[B[i + 529*t]] + R[C[i + 529*t]];
R[i + 987*t] = Op[i + 530*t] ? R[B[i + 530*t]] * R[C[i + 530*t]] : R[B[i + 530*t]] + R[C[i + 530*t]];
R[i + 988*t] = Op[i + 531*t] ? R[B[i + 531*t]] * R[C[i + 531*t]] : R[B[i + 531*t]] + R[C[i + 531*t]];
R[i + 989*t] = Op[i + 532*t] ? R[B[i + 532*t]] * R[C[i + 532*t]] : R[B[i + 532*t]] + R[C[i + 532*t]];
R[i + 990*t] = Op[i + 533*t] ? R[B[i + 533*t]] * R[C[i + 533*t]] : R[B[i + 533*t]] + R[C[i + 533*t]];
R[i + 991*t] = Op[i + 534*t] ? R[B[i + 534*t]] * R[C[i + 534*t]] : R[B[i + 534*t]] + R[C[i + 534*t]];
R[i + 992*t] = Op[i + 535*t] ? R[B[i + 535*t]] * R[C[i + 535*t]] : R[B[i + 535*t]] + R[C[i + 535*t]];
R[i + 993*t] = Op[i + 536*t] ? R[B[i + 536*t]] * R[C[i + 536*t]] : R[B[i + 536*t]] + R[C[i + 536*t]];
R[i + 994*t] = Op[i + 537*t] ? R[B[i + 537*t]] * R[C[i + 537*t]] : R[B[i + 537*t]] + R[C[i + 537*t]];
R[i + 995*t] = Op[i + 538*t] ? R[B[i + 538*t]] * R[C[i + 538*t]] : R[B[i + 538*t]] + R[C[i + 538*t]];
R[i + 996*t] = Op[i + 539*t] ? R[B[i + 539*t]] * R[C[i + 539*t]] : R[B[i + 539*t]] + R[C[i + 539*t]];
R[i + 997*t] = Op[i + 540*t] ? R[B[i + 540*t]] * R[C[i + 540*t]] : R[B[i + 540*t]] + R[C[i + 540*t]];
R[i + 998*t] = Op[i + 541*t] ? R[B[i + 541*t]] * R[C[i + 541*t]] : R[B[i + 541*t]] + R[C[i + 541*t]];
R[i + 999*t] = Op[i + 542*t] ? R[B[i + 542*t]] * R[C[i + 542*t]] : R[B[i + 542*t]] + R[C[i + 542*t]];
R[i + 1000*t] = Op[i + 543*t] ? R[B[i + 543*t]] * R[C[i + 543*t]] : R[B[i + 543*t]] + R[C[i + 543*t]];
R[i + 1001*t] = Op[i + 544*t] ? R[B[i + 544*t]] * R[C[i + 544*t]] : R[B[i + 544*t]] + R[C[i + 544*t]];
R[i + 1002*t] = Op[i + 545*t] ? R[B[i + 545*t]] * R[C[i + 545*t]] : R[B[i + 545*t]] + R[C[i + 545*t]];
R[i + 1003*t] = Op[i + 546*t] ? R[B[i + 546*t]] * R[C[i + 546*t]] : R[B[i + 546*t]] + R[C[i + 546*t]];
R[i + 1004*t] = Op[i + 547*t] ? R[B[i + 547*t]] * R[C[i + 547*t]] : R[B[i + 547*t]] + R[C[i + 547*t]];
R[i + 1005*t] = Op[i + 548*t] ? R[B[i + 548*t]] * R[C[i + 548*t]] : R[B[i + 548*t]] + R[C[i + 548*t]];
R[i + 1006*t] = Op[i + 549*t] ? R[B[i + 549*t]] * R[C[i + 549*t]] : R[B[i + 549*t]] + R[C[i + 549*t]];
R[i + 1007*t] = Op[i + 550*t] ? R[B[i + 550*t]] * R[C[i + 550*t]] : R[B[i + 550*t]] + R[C[i + 550*t]];
R[i + 1008*t] = Op[i + 551*t] ? R[B[i + 551*t]] * R[C[i + 551*t]] : R[B[i + 551*t]] + R[C[i + 551*t]];
R[i + 1009*t] = Op[i + 552*t] ? R[B[i + 552*t]] * R[C[i + 552*t]] : R[B[i + 552*t]] + R[C[i + 552*t]];
R[i + 1010*t] = Op[i + 553*t] ? R[B[i + 553*t]] * R[C[i + 553*t]] : R[B[i + 553*t]] + R[C[i + 553*t]];
R[i + 1011*t] = Op[i + 554*t] ? R[B[i + 554*t]] * R[C[i + 554*t]] : R[B[i + 554*t]] + R[C[i + 554*t]];
R[i + 1012*t] = Op[i + 555*t] ? R[B[i + 555*t]] * R[C[i + 555*t]] : R[B[i + 555*t]] + R[C[i + 555*t]];
R[i + 1013*t] = Op[i + 556*t] ? R[B[i + 556*t]] * R[C[i + 556*t]] : R[B[i + 556*t]] + R[C[i + 556*t]];
__syncthreads();
R[i + 1014*t] = Op[i + 557*t] ? R[B[i + 557*t]] * R[C[i + 557*t]] : R[B[i + 557*t]] + R[C[i + 557*t]];
R[i + 1015*t] = Op[i + 558*t] ? R[B[i + 558*t]] * R[C[i + 558*t]] : R[B[i + 558*t]] + R[C[i + 558*t]];
R[i + 1016*t] = Op[i + 559*t] ? R[B[i + 559*t]] * R[C[i + 559*t]] : R[B[i + 559*t]] + R[C[i + 559*t]];
R[i + 1017*t] = Op[i + 560*t] ? R[B[i + 560*t]] * R[C[i + 560*t]] : R[B[i + 560*t]] + R[C[i + 560*t]];
R[i + 1018*t] = Op[i + 561*t] ? R[B[i + 561*t]] * R[C[i + 561*t]] : R[B[i + 561*t]] + R[C[i + 561*t]];
R[i + 1019*t] = Op[i + 562*t] ? R[B[i + 562*t]] * R[C[i + 562*t]] : R[B[i + 562*t]] + R[C[i + 562*t]];
R[i + 1020*t] = Op[i + 563*t] ? R[B[i + 563*t]] * R[C[i + 563*t]] : R[B[i + 563*t]] + R[C[i + 563*t]];
R[i + 1021*t] = Op[i + 564*t] ? R[B[i + 564*t]] * R[C[i + 564*t]] : R[B[i + 564*t]] + R[C[i + 564*t]];
R[i + 1022*t] = Op[i + 565*t] ? R[B[i + 565*t]] * R[C[i + 565*t]] : R[B[i + 565*t]] + R[C[i + 565*t]];
R[i + 1023*t] = Op[i + 566*t] ? R[B[i + 566*t]] * R[C[i + 566*t]] : R[B[i + 566*t]] + R[C[i + 566*t]];
R[i + 1024*t] = Op[i + 567*t] ? R[B[i + 567*t]] * R[C[i + 567*t]] : R[B[i + 567*t]] + R[C[i + 567*t]];
R[i + 1025*t] = Op[i + 568*t] ? R[B[i + 568*t]] * R[C[i + 568*t]] : R[B[i + 568*t]] + R[C[i + 568*t]];
R[i + 1026*t] = Op[i + 569*t] ? R[B[i + 569*t]] * R[C[i + 569*t]] : R[B[i + 569*t]] + R[C[i + 569*t]];
R[i + 1027*t] = Op[i + 570*t] ? R[B[i + 570*t]] * R[C[i + 570*t]] : R[B[i + 570*t]] + R[C[i + 570*t]];
R[i + 1028*t] = Op[i + 571*t] ? R[B[i + 571*t]] * R[C[i + 571*t]] : R[B[i + 571*t]] + R[C[i + 571*t]];
R[i + 1029*t] = Op[i + 572*t] ? R[B[i + 572*t]] * R[C[i + 572*t]] : R[B[i + 572*t]] + R[C[i + 572*t]];
R[i + 1030*t] = Op[i + 573*t] ? R[B[i + 573*t]] * R[C[i + 573*t]] : R[B[i + 573*t]] + R[C[i + 573*t]];
R[i + 1031*t] = Op[i + 574*t] ? R[B[i + 574*t]] * R[C[i + 574*t]] : R[B[i + 574*t]] + R[C[i + 574*t]];
R[i + 1032*t] = Op[i + 575*t] ? R[B[i + 575*t]] * R[C[i + 575*t]] : R[B[i + 575*t]] + R[C[i + 575*t]];
R[i + 1033*t] = Op[i + 576*t] ? R[B[i + 576*t]] * R[C[i + 576*t]] : R[B[i + 576*t]] + R[C[i + 576*t]];
R[i + 1034*t] = Op[i + 577*t] ? R[B[i + 577*t]] * R[C[i + 577*t]] : R[B[i + 577*t]] + R[C[i + 577*t]];
R[i + 1035*t] = Op[i + 578*t] ? R[B[i + 578*t]] * R[C[i + 578*t]] : R[B[i + 578*t]] + R[C[i + 578*t]];
R[i + 1036*t] = Op[i + 579*t] ? R[B[i + 579*t]] * R[C[i + 579*t]] : R[B[i + 579*t]] + R[C[i + 579*t]];
R[i + 1037*t] = Op[i + 580*t] ? R[B[i + 580*t]] * R[C[i + 580*t]] : R[B[i + 580*t]] + R[C[i + 580*t]];
R[i + 1038*t] = Op[i + 581*t] ? R[B[i + 581*t]] * R[C[i + 581*t]] : R[B[i + 581*t]] + R[C[i + 581*t]];
R[i + 1039*t] = Op[i + 582*t] ? R[B[i + 582*t]] * R[C[i + 582*t]] : R[B[i + 582*t]] + R[C[i + 582*t]];
R[i + 1040*t] = Op[i + 583*t] ? R[B[i + 583*t]] * R[C[i + 583*t]] : R[B[i + 583*t]] + R[C[i + 583*t]];
R[i + 1041*t] = Op[i + 584*t] ? R[B[i + 584*t]] * R[C[i + 584*t]] : R[B[i + 584*t]] + R[C[i + 584*t]];
R[i + 1042*t] = Op[i + 585*t] ? R[B[i + 585*t]] * R[C[i + 585*t]] : R[B[i + 585*t]] + R[C[i + 585*t]];
R[i + 1043*t] = Op[i + 586*t] ? R[B[i + 586*t]] * R[C[i + 586*t]] : R[B[i + 586*t]] + R[C[i + 586*t]];
R[i + 1044*t] = Op[i + 587*t] ? R[B[i + 587*t]] * R[C[i + 587*t]] : R[B[i + 587*t]] + R[C[i + 587*t]];
__syncthreads();
R[i + 1045*t] = Op[i + 588*t] ? R[B[i + 588*t]] * R[C[i + 588*t]] : R[B[i + 588*t]] + R[C[i + 588*t]];
R[i + 1046*t] = Op[i + 589*t] ? R[B[i + 589*t]] * R[C[i + 589*t]] : R[B[i + 589*t]] + R[C[i + 589*t]];
R[i + 1047*t] = Op[i + 590*t] ? R[B[i + 590*t]] * R[C[i + 590*t]] : R[B[i + 590*t]] + R[C[i + 590*t]];
R[i + 1048*t] = Op[i + 591*t] ? R[B[i + 591*t]] * R[C[i + 591*t]] : R[B[i + 591*t]] + R[C[i + 591*t]];
R[i + 1049*t] = Op[i + 592*t] ? R[B[i + 592*t]] * R[C[i + 592*t]] : R[B[i + 592*t]] + R[C[i + 592*t]];
R[i + 1050*t] = Op[i + 593*t] ? R[B[i + 593*t]] * R[C[i + 593*t]] : R[B[i + 593*t]] + R[C[i + 593*t]];
R[i + 1051*t] = Op[i + 594*t] ? R[B[i + 594*t]] * R[C[i + 594*t]] : R[B[i + 594*t]] + R[C[i + 594*t]];
R[i + 1052*t] = Op[i + 595*t] ? R[B[i + 595*t]] * R[C[i + 595*t]] : R[B[i + 595*t]] + R[C[i + 595*t]];
R[i + 1053*t] = Op[i + 596*t] ? R[B[i + 596*t]] * R[C[i + 596*t]] : R[B[i + 596*t]] + R[C[i + 596*t]];
R[i + 1054*t] = Op[i + 597*t] ? R[B[i + 597*t]] * R[C[i + 597*t]] : R[B[i + 597*t]] + R[C[i + 597*t]];
R[i + 1055*t] = Op[i + 598*t] ? R[B[i + 598*t]] * R[C[i + 598*t]] : R[B[i + 598*t]] + R[C[i + 598*t]];
R[i + 1056*t] = Op[i + 599*t] ? R[B[i + 599*t]] * R[C[i + 599*t]] : R[B[i + 599*t]] + R[C[i + 599*t]];
R[i + 1057*t] = Op[i + 600*t] ? R[B[i + 600*t]] * R[C[i + 600*t]] : R[B[i + 600*t]] + R[C[i + 600*t]];
R[i + 1058*t] = Op[i + 601*t] ? R[B[i + 601*t]] * R[C[i + 601*t]] : R[B[i + 601*t]] + R[C[i + 601*t]];
R[i + 1059*t] = Op[i + 602*t] ? R[B[i + 602*t]] * R[C[i + 602*t]] : R[B[i + 602*t]] + R[C[i + 602*t]];
R[i + 1060*t] = Op[i + 603*t] ? R[B[i + 603*t]] * R[C[i + 603*t]] : R[B[i + 603*t]] + R[C[i + 603*t]];
R[i + 1061*t] = Op[i + 604*t] ? R[B[i + 604*t]] * R[C[i + 604*t]] : R[B[i + 604*t]] + R[C[i + 604*t]];
R[i + 1062*t] = Op[i + 605*t] ? R[B[i + 605*t]] * R[C[i + 605*t]] : R[B[i + 605*t]] + R[C[i + 605*t]];
R[i + 1063*t] = Op[i + 606*t] ? R[B[i + 606*t]] * R[C[i + 606*t]] : R[B[i + 606*t]] + R[C[i + 606*t]];
R[i + 1064*t] = Op[i + 607*t] ? R[B[i + 607*t]] * R[C[i + 607*t]] : R[B[i + 607*t]] + R[C[i + 607*t]];
R[i + 1065*t] = Op[i + 608*t] ? R[B[i + 608*t]] * R[C[i + 608*t]] : R[B[i + 608*t]] + R[C[i + 608*t]];
__syncthreads();
R[i + 1066*t] = Op[i + 609*t] ? R[B[i + 609*t]] * R[C[i + 609*t]] : R[B[i + 609*t]] + R[C[i + 609*t]];
R[i + 1067*t] = Op[i + 610*t] ? R[B[i + 610*t]] * R[C[i + 610*t]] : R[B[i + 610*t]] + R[C[i + 610*t]];
R[i + 1068*t] = Op[i + 611*t] ? R[B[i + 611*t]] * R[C[i + 611*t]] : R[B[i + 611*t]] + R[C[i + 611*t]];
R[i + 1069*t] = Op[i + 612*t] ? R[B[i + 612*t]] * R[C[i + 612*t]] : R[B[i + 612*t]] + R[C[i + 612*t]];
R[i + 1070*t] = Op[i + 613*t] ? R[B[i + 613*t]] * R[C[i + 613*t]] : R[B[i + 613*t]] + R[C[i + 613*t]];
R[i + 1071*t] = Op[i + 614*t] ? R[B[i + 614*t]] * R[C[i + 614*t]] : R[B[i + 614*t]] + R[C[i + 614*t]];
R[i + 1072*t] = Op[i + 615*t] ? R[B[i + 615*t]] * R[C[i + 615*t]] : R[B[i + 615*t]] + R[C[i + 615*t]];
R[i + 1073*t] = Op[i + 616*t] ? R[B[i + 616*t]] * R[C[i + 616*t]] : R[B[i + 616*t]] + R[C[i + 616*t]];
R[i + 1074*t] = Op[i + 617*t] ? R[B[i + 617*t]] * R[C[i + 617*t]] : R[B[i + 617*t]] + R[C[i + 617*t]];
R[i + 1075*t] = Op[i + 618*t] ? R[B[i + 618*t]] * R[C[i + 618*t]] : R[B[i + 618*t]] + R[C[i + 618*t]];
R[i + 1076*t] = Op[i + 619*t] ? R[B[i + 619*t]] * R[C[i + 619*t]] : R[B[i + 619*t]] + R[C[i + 619*t]];
R[i + 1077*t] = Op[i + 620*t] ? R[B[i + 620*t]] * R[C[i + 620*t]] : R[B[i + 620*t]] + R[C[i + 620*t]];
R[i + 1078*t] = Op[i + 621*t] ? R[B[i + 621*t]] * R[C[i + 621*t]] : R[B[i + 621*t]] + R[C[i + 621*t]];
R[i + 1079*t] = Op[i + 622*t] ? R[B[i + 622*t]] * R[C[i + 622*t]] : R[B[i + 622*t]] + R[C[i + 622*t]];
R[i + 1080*t] = Op[i + 623*t] ? R[B[i + 623*t]] * R[C[i + 623*t]] : R[B[i + 623*t]] + R[C[i + 623*t]];
R[i + 1081*t] = Op[i + 624*t] ? R[B[i + 624*t]] * R[C[i + 624*t]] : R[B[i + 624*t]] + R[C[i + 624*t]];
R[i + 1082*t] = Op[i + 625*t] ? R[B[i + 625*t]] * R[C[i + 625*t]] : R[B[i + 625*t]] + R[C[i + 625*t]];
R[i + 1083*t] = Op[i + 626*t] ? R[B[i + 626*t]] * R[C[i + 626*t]] : R[B[i + 626*t]] + R[C[i + 626*t]];
R[i + 1084*t] = Op[i + 627*t] ? R[B[i + 627*t]] * R[C[i + 627*t]] : R[B[i + 627*t]] + R[C[i + 627*t]];
R[i + 1085*t] = Op[i + 628*t] ? R[B[i + 628*t]] * R[C[i + 628*t]] : R[B[i + 628*t]] + R[C[i + 628*t]];
R[i + 1086*t] = Op[i + 629*t] ? R[B[i + 629*t]] * R[C[i + 629*t]] : R[B[i + 629*t]] + R[C[i + 629*t]];
R[i + 1087*t] = Op[i + 630*t] ? R[B[i + 630*t]] * R[C[i + 630*t]] : R[B[i + 630*t]] + R[C[i + 630*t]];
R[i + 1088*t] = Op[i + 631*t] ? R[B[i + 631*t]] * R[C[i + 631*t]] : R[B[i + 631*t]] + R[C[i + 631*t]];
R[i + 1089*t] = Op[i + 632*t] ? R[B[i + 632*t]] * R[C[i + 632*t]] : R[B[i + 632*t]] + R[C[i + 632*t]];
R[i + 1090*t] = Op[i + 633*t] ? R[B[i + 633*t]] * R[C[i + 633*t]] : R[B[i + 633*t]] + R[C[i + 633*t]];
R[i + 1091*t] = Op[i + 634*t] ? R[B[i + 634*t]] * R[C[i + 634*t]] : R[B[i + 634*t]] + R[C[i + 634*t]];
R[i + 1092*t] = Op[i + 635*t] ? R[B[i + 635*t]] * R[C[i + 635*t]] : R[B[i + 635*t]] + R[C[i + 635*t]];
R[i + 1093*t] = Op[i + 636*t] ? R[B[i + 636*t]] * R[C[i + 636*t]] : R[B[i + 636*t]] + R[C[i + 636*t]];
__syncthreads();
R[i + 1094*t] = Op[i + 637*t] ? R[B[i + 637*t]] * R[C[i + 637*t]] : R[B[i + 637*t]] + R[C[i + 637*t]];
R[i + 1095*t] = Op[i + 638*t] ? R[B[i + 638*t]] * R[C[i + 638*t]] : R[B[i + 638*t]] + R[C[i + 638*t]];
R[i + 1096*t] = Op[i + 639*t] ? R[B[i + 639*t]] * R[C[i + 639*t]] : R[B[i + 639*t]] + R[C[i + 639*t]];
R[i + 1097*t] = Op[i + 640*t] ? R[B[i + 640*t]] * R[C[i + 640*t]] : R[B[i + 640*t]] + R[C[i + 640*t]];
R[i + 1098*t] = Op[i + 641*t] ? R[B[i + 641*t]] * R[C[i + 641*t]] : R[B[i + 641*t]] + R[C[i + 641*t]];
R[i + 1099*t] = Op[i + 642*t] ? R[B[i + 642*t]] * R[C[i + 642*t]] : R[B[i + 642*t]] + R[C[i + 642*t]];
R[i + 1100*t] = Op[i + 643*t] ? R[B[i + 643*t]] * R[C[i + 643*t]] : R[B[i + 643*t]] + R[C[i + 643*t]];
R[i + 1101*t] = Op[i + 644*t] ? R[B[i + 644*t]] * R[C[i + 644*t]] : R[B[i + 644*t]] + R[C[i + 644*t]];
R[i + 1102*t] = Op[i + 645*t] ? R[B[i + 645*t]] * R[C[i + 645*t]] : R[B[i + 645*t]] + R[C[i + 645*t]];
R[i + 1103*t] = Op[i + 646*t] ? R[B[i + 646*t]] * R[C[i + 646*t]] : R[B[i + 646*t]] + R[C[i + 646*t]];
R[i + 1104*t] = Op[i + 647*t] ? R[B[i + 647*t]] * R[C[i + 647*t]] : R[B[i + 647*t]] + R[C[i + 647*t]];
R[i + 1105*t] = Op[i + 648*t] ? R[B[i + 648*t]] * R[C[i + 648*t]] : R[B[i + 648*t]] + R[C[i + 648*t]];
R[i + 1106*t] = Op[i + 649*t] ? R[B[i + 649*t]] * R[C[i + 649*t]] : R[B[i + 649*t]] + R[C[i + 649*t]];
R[i + 1107*t] = Op[i + 650*t] ? R[B[i + 650*t]] * R[C[i + 650*t]] : R[B[i + 650*t]] + R[C[i + 650*t]];
R[i + 1108*t] = Op[i + 651*t] ? R[B[i + 651*t]] * R[C[i + 651*t]] : R[B[i + 651*t]] + R[C[i + 651*t]];
R[i + 1109*t] = Op[i + 652*t] ? R[B[i + 652*t]] * R[C[i + 652*t]] : R[B[i + 652*t]] + R[C[i + 652*t]];
R[i + 1110*t] = Op[i + 653*t] ? R[B[i + 653*t]] * R[C[i + 653*t]] : R[B[i + 653*t]] + R[C[i + 653*t]];
R[i + 1111*t] = Op[i + 654*t] ? R[B[i + 654*t]] * R[C[i + 654*t]] : R[B[i + 654*t]] + R[C[i + 654*t]];
R[i + 1112*t] = Op[i + 655*t] ? R[B[i + 655*t]] * R[C[i + 655*t]] : R[B[i + 655*t]] + R[C[i + 655*t]];
R[i + 1113*t] = Op[i + 656*t] ? R[B[i + 656*t]] * R[C[i + 656*t]] : R[B[i + 656*t]] + R[C[i + 656*t]];
R[i + 1114*t] = Op[i + 657*t] ? R[B[i + 657*t]] * R[C[i + 657*t]] : R[B[i + 657*t]] + R[C[i + 657*t]];
R[i + 1115*t] = Op[i + 658*t] ? R[B[i + 658*t]] * R[C[i + 658*t]] : R[B[i + 658*t]] + R[C[i + 658*t]];
R[i + 1116*t] = Op[i + 659*t] ? R[B[i + 659*t]] * R[C[i + 659*t]] : R[B[i + 659*t]] + R[C[i + 659*t]];
__syncthreads();
R[i + 1117*t] = Op[i + 660*t] ? R[B[i + 660*t]] * R[C[i + 660*t]] : R[B[i + 660*t]] + R[C[i + 660*t]];
R[i + 1118*t] = Op[i + 661*t] ? R[B[i + 661*t]] * R[C[i + 661*t]] : R[B[i + 661*t]] + R[C[i + 661*t]];
R[i + 1119*t] = Op[i + 662*t] ? R[B[i + 662*t]] * R[C[i + 662*t]] : R[B[i + 662*t]] + R[C[i + 662*t]];
R[i + 1120*t] = Op[i + 663*t] ? R[B[i + 663*t]] * R[C[i + 663*t]] : R[B[i + 663*t]] + R[C[i + 663*t]];
R[i + 1121*t] = Op[i + 664*t] ? R[B[i + 664*t]] * R[C[i + 664*t]] : R[B[i + 664*t]] + R[C[i + 664*t]];
R[i + 1122*t] = Op[i + 665*t] ? R[B[i + 665*t]] * R[C[i + 665*t]] : R[B[i + 665*t]] + R[C[i + 665*t]];
R[i + 1123*t] = Op[i + 666*t] ? R[B[i + 666*t]] * R[C[i + 666*t]] : R[B[i + 666*t]] + R[C[i + 666*t]];
R[i + 1124*t] = Op[i + 667*t] ? R[B[i + 667*t]] * R[C[i + 667*t]] : R[B[i + 667*t]] + R[C[i + 667*t]];
R[i + 1125*t] = Op[i + 668*t] ? R[B[i + 668*t]] * R[C[i + 668*t]] : R[B[i + 668*t]] + R[C[i + 668*t]];
R[i + 1126*t] = Op[i + 669*t] ? R[B[i + 669*t]] * R[C[i + 669*t]] : R[B[i + 669*t]] + R[C[i + 669*t]];
R[i + 1127*t] = Op[i + 670*t] ? R[B[i + 670*t]] * R[C[i + 670*t]] : R[B[i + 670*t]] + R[C[i + 670*t]];
R[i + 1128*t] = Op[i + 671*t] ? R[B[i + 671*t]] * R[C[i + 671*t]] : R[B[i + 671*t]] + R[C[i + 671*t]];
R[i + 1129*t] = Op[i + 672*t] ? R[B[i + 672*t]] * R[C[i + 672*t]] : R[B[i + 672*t]] + R[C[i + 672*t]];
__syncthreads();
R[i + 1130*t] = Op[i + 673*t] ? R[B[i + 673*t]] * R[C[i + 673*t]] : R[B[i + 673*t]] + R[C[i + 673*t]];
R[i + 1131*t] = Op[i + 674*t] ? R[B[i + 674*t]] * R[C[i + 674*t]] : R[B[i + 674*t]] + R[C[i + 674*t]];
R[i + 1132*t] = Op[i + 675*t] ? R[B[i + 675*t]] * R[C[i + 675*t]] : R[B[i + 675*t]] + R[C[i + 675*t]];
R[i + 1133*t] = Op[i + 676*t] ? R[B[i + 676*t]] * R[C[i + 676*t]] : R[B[i + 676*t]] + R[C[i + 676*t]];
R[i + 1134*t] = Op[i + 677*t] ? R[B[i + 677*t]] * R[C[i + 677*t]] : R[B[i + 677*t]] + R[C[i + 677*t]];
R[i + 1135*t] = Op[i + 678*t] ? R[B[i + 678*t]] * R[C[i + 678*t]] : R[B[i + 678*t]] + R[C[i + 678*t]];
R[i + 1136*t] = Op[i + 679*t] ? R[B[i + 679*t]] * R[C[i + 679*t]] : R[B[i + 679*t]] + R[C[i + 679*t]];
R[i + 1137*t] = Op[i + 680*t] ? R[B[i + 680*t]] * R[C[i + 680*t]] : R[B[i + 680*t]] + R[C[i + 680*t]];
R[i + 1138*t] = Op[i + 681*t] ? R[B[i + 681*t]] * R[C[i + 681*t]] : R[B[i + 681*t]] + R[C[i + 681*t]];
R[i + 1139*t] = Op[i + 682*t] ? R[B[i + 682*t]] * R[C[i + 682*t]] : R[B[i + 682*t]] + R[C[i + 682*t]];
R[i + 1140*t] = Op[i + 683*t] ? R[B[i + 683*t]] * R[C[i + 683*t]] : R[B[i + 683*t]] + R[C[i + 683*t]];
R[i + 1141*t] = Op[i + 684*t] ? R[B[i + 684*t]] * R[C[i + 684*t]] : R[B[i + 684*t]] + R[C[i + 684*t]];
R[i + 1142*t] = Op[i + 685*t] ? R[B[i + 685*t]] * R[C[i + 685*t]] : R[B[i + 685*t]] + R[C[i + 685*t]];
__syncthreads();
R[i + 1143*t] = Op[i + 686*t] ? R[B[i + 686*t]] * R[C[i + 686*t]] : R[B[i + 686*t]] + R[C[i + 686*t]];
R[i + 1144*t] = Op[i + 687*t] ? R[B[i + 687*t]] * R[C[i + 687*t]] : R[B[i + 687*t]] + R[C[i + 687*t]];
R[i + 1145*t] = Op[i + 688*t] ? R[B[i + 688*t]] * R[C[i + 688*t]] : R[B[i + 688*t]] + R[C[i + 688*t]];
R[i + 1146*t] = Op[i + 689*t] ? R[B[i + 689*t]] * R[C[i + 689*t]] : R[B[i + 689*t]] + R[C[i + 689*t]];
R[i + 1147*t] = Op[i + 690*t] ? R[B[i + 690*t]] * R[C[i + 690*t]] : R[B[i + 690*t]] + R[C[i + 690*t]];
R[i + 1148*t] = Op[i + 691*t] ? R[B[i + 691*t]] * R[C[i + 691*t]] : R[B[i + 691*t]] + R[C[i + 691*t]];
R[i + 1149*t] = Op[i + 692*t] ? R[B[i + 692*t]] * R[C[i + 692*t]] : R[B[i + 692*t]] + R[C[i + 692*t]];
R[i + 1150*t] = Op[i + 693*t] ? R[B[i + 693*t]] * R[C[i + 693*t]] : R[B[i + 693*t]] + R[C[i + 693*t]];
R[i + 1151*t] = Op[i + 694*t] ? R[B[i + 694*t]] * R[C[i + 694*t]] : R[B[i + 694*t]] + R[C[i + 694*t]];
R[i + 1152*t] = Op[i + 695*t] ? R[B[i + 695*t]] * R[C[i + 695*t]] : R[B[i + 695*t]] + R[C[i + 695*t]];
__syncthreads();
R[i + 1153*t] = Op[i + 696*t] ? R[B[i + 696*t]] * R[C[i + 696*t]] : R[B[i + 696*t]] + R[C[i + 696*t]];
R[i + 1154*t] = Op[i + 697*t] ? R[B[i + 697*t]] * R[C[i + 697*t]] : R[B[i + 697*t]] + R[C[i + 697*t]];
R[i + 1155*t] = Op[i + 698*t] ? R[B[i + 698*t]] * R[C[i + 698*t]] : R[B[i + 698*t]] + R[C[i + 698*t]];
R[i + 1156*t] = Op[i + 699*t] ? R[B[i + 699*t]] * R[C[i + 699*t]] : R[B[i + 699*t]] + R[C[i + 699*t]];
R[i + 1157*t] = Op[i + 700*t] ? R[B[i + 700*t]] * R[C[i + 700*t]] : R[B[i + 700*t]] + R[C[i + 700*t]];
R[i + 1158*t] = Op[i + 701*t] ? R[B[i + 701*t]] * R[C[i + 701*t]] : R[B[i + 701*t]] + R[C[i + 701*t]];
R[i + 1159*t] = Op[i + 702*t] ? R[B[i + 702*t]] * R[C[i + 702*t]] : R[B[i + 702*t]] + R[C[i + 702*t]];
__syncthreads();
R[i + 1160*t] = Op[i + 703*t] ? R[B[i + 703*t]] * R[C[i + 703*t]] : R[B[i + 703*t]] + R[C[i + 703*t]];
R[i + 1161*t] = Op[i + 704*t] ? R[B[i + 704*t]] * R[C[i + 704*t]] : R[B[i + 704*t]] + R[C[i + 704*t]];
R[i + 1162*t] = Op[i + 705*t] ? R[B[i + 705*t]] * R[C[i + 705*t]] : R[B[i + 705*t]] + R[C[i + 705*t]];
R[i + 1163*t] = Op[i + 706*t] ? R[B[i + 706*t]] * R[C[i + 706*t]] : R[B[i + 706*t]] + R[C[i + 706*t]];
R[i + 1164*t] = Op[i + 707*t] ? R[B[i + 707*t]] * R[C[i + 707*t]] : R[B[i + 707*t]] + R[C[i + 707*t]];
__syncthreads();
R[i + 1165*t] = Op[i + 708*t] ? R[B[i + 708*t]] * R[C[i + 708*t]] : R[B[i + 708*t]] + R[C[i + 708*t]];
R[i + 1166*t] = Op[i + 709*t] ? R[B[i + 709*t]] * R[C[i + 709*t]] : R[B[i + 709*t]] + R[C[i + 709*t]];
R[i + 1167*t] = Op[i + 710*t] ? R[B[i + 710*t]] * R[C[i + 710*t]] : R[B[i + 710*t]] + R[C[i + 710*t]];
__syncthreads();
R[i + 1168*t] = Op[i + 711*t] ? R[B[i + 711*t]] * R[C[i + 711*t]] : R[B[i + 711*t]] + R[C[i + 711*t]];
R[i + 1169*t] = Op[i + 712*t] ? R[B[i + 712*t]] * R[C[i + 712*t]] : R[B[i + 712*t]] + R[C[i + 712*t]];
R[i + 1170*t] = Op[i + 713*t] ? R[B[i + 713*t]] * R[C[i + 713*t]] : R[B[i + 713*t]] + R[C[i + 713*t]];
__syncthreads();
R[i + 1171*t] = Op[i + 714*t] ? R[B[i + 714*t]] * R[C[i + 714*t]] : R[B[i + 714*t]] + R[C[i + 714*t]];
R[i + 1172*t] = Op[i + 715*t] ? R[B[i + 715*t]] * R[C[i + 715*t]] : R[B[i + 715*t]] + R[C[i + 715*t]];
R[i + 1173*t] = Op[i + 716*t] ? R[B[i + 716*t]] * R[C[i + 716*t]] : R[B[i + 716*t]] + R[C[i + 716*t]];
__syncthreads();
R[i + 1174*t] = Op[i + 717*t] ? R[B[i + 717*t]] * R[C[i + 717*t]] : R[B[i + 717*t]] + R[C[i + 717*t]];
R[i + 1175*t] = Op[i + 718*t] ? R[B[i + 718*t]] * R[C[i + 718*t]] : R[B[i + 718*t]] + R[C[i + 718*t]];
__syncthreads();
R[i + 1176*t] = Op[i + 719*t] ? R[B[i + 719*t]] * R[C[i + 719*t]] : R[B[i + 719*t]] + R[C[i + 719*t]];
__syncthreads();
R[i + 1177*t] = Op[i + 720*t] ? R[B[i + 720*t]] * R[C[i + 720*t]] : R[B[i + 720*t]] + R[C[i + 720*t]];
__syncthreads();
R[i + 1178*t] = Op[i + 721*t] ? R[B[i + 721*t]] * R[C[i + 721*t]] : R[B[i + 721*t]] + R[C[i + 721*t]];
__syncthreads();
R[i + 1179*t] = Op[i + 722*t] ? R[B[i + 722*t]] * R[C[i + 722*t]] : R[B[i + 722*t]] + R[C[i + 722*t]];
__syncthreads();
R[i + 1180*t] = Op[i + 723*t] ? R[B[i + 723*t]] * R[C[i + 723*t]] : R[B[i + 723*t]] + R[C[i + 723*t]];
__syncthreads();
R[i + 1181*t] = Op[i + 724*t] ? R[B[i + 724*t]] * R[C[i + 724*t]] : R[B[i + 724*t]] + R[C[i + 724*t]];
__syncthreads();
R[i + 1182*t] = Op[i + 725*t] ? R[B[i + 725*t]] * R[C[i + 725*t]] : R[B[i + 725*t]] + R[C[i + 725*t]];
__syncthreads();
R[i + 1183*t] = Op[i + 726*t] ? R[B[i + 726*t]] * R[C[i + 726*t]] : R[B[i + 726*t]] + R[C[i + 726*t]];
if (i==0) { final += R[1183*t]; }
__syncthreads();
}
if (i==0) { A[0]= final;}
}
|
5cec374858f71ed1f28ba04298b8357bc20160b9.hip | // !!! This is a file automatically generated by hipify!!!
/*
* main.c
*
* Created on: 26/01/2011
* Author: einstein/carneiro
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <omp.h>
#define mat(i,j) mat_h[i*N+j]
#define mat_h(i,j) mat_h[i*N+j]
#define mat_d(i,j) mat_d[i*N_l+j]
#define mat_block(i,j) mat_block[i*N_l+j]
#define proximo(x) x+1
#define anterior(x) x-1
#define MAX 8192
#define INFINITO 999999
#define ZERO 0
#define ONE 1
#define _VAZIO_ -1
#define _VISITADO_ 1
#define _NAO_VISITADO_ 0
int qtd = 0;
int custo = 0;
int N;
int melhor = INFINITO;
int upper_bound;
#define CUDA_CHECK_RETURN(value) { \
hipError_t _m_cudaStat = value; \
if (_m_cudaStat != hipSuccess) { \
fprintf(stderr, "Error %s at line %d in file %s\n", \
hipGetErrorString(_m_cudaStat), __LINE__, __FILE__); \
exit(1); \
} }
#define HANDLE_NULL( a ) {if (a == NULL) { \
printf( "Host memory failed in %s at line %d\n", \
__FILE__, __LINE__ ); \
exit( EXIT_FAILURE );}}
#ifndef _DFS_CUDA_UB_STREAM_H_
#define _DFS_CUDA_UB_STREAM_H_
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif
__global__ void dfs_cuda_UB_stream(int N,int stream_size, int *mat_d,
short *preFixos_d, int nivelPrefixo, int upper_bound, int *sols_d,
int *melhorSol_d)
{
register int idx = blockIdx.x * blockDim.x + threadIdx.x;
register int flag[16];
register int vertice[16];
register int N_l = N;
register int i, nivel;
register int custo;
register int qtd_solucoes_thread = 0;
register int UB_local = upper_bound;
register int nivelGlobal = nivelPrefixo;
int stream_size_l = stream_size;
if (idx < stream_size_l) {
for (i = 0; i < N_l; ++i) {
vertice[i] = _VAZIO_;
flag[i] = _NAO_VISITADO_;
}
vertice[0] = 0;
flag[0] = _VISITADO_;
custo= ZERO;
for (i = 1; i < nivelGlobal; ++i) {
vertice[i] = preFixos_d[idx * nivelGlobal + i];
flag[vertice[i]] = _VISITADO_;
custo += mat_d(vertice[i-1],vertice[i]);
}
nivel=nivelGlobal;
while (nivel >= nivelGlobal ) {
if (vertice[nivel] != _VAZIO_) {
flag[vertice[nivel]] = _NAO_VISITADO_;
custo -= mat_d(vertice[anterior(nivel)],vertice[nivel]);
}
do {
vertice[nivel]++;
} while (vertice[nivel] < N_l && flag[vertice[nivel]]);
if (vertice[nivel] < N_l) {
custo += mat_d(vertice[anterior(nivel)],vertice[nivel]);
flag[vertice[nivel]] = _VISITADO_;
nivel++;
if (nivel == N_l) {
++qtd_solucoes_thread;
if (custo + mat_d(vertice[anterior(nivel)],0) < UB_local) {
UB_local = custo + mat_d(vertice[anterior(nivel)],0);
}
nivel--;
}
}
else {
vertice[nivel] = _VAZIO_;
nivel--;
}
}
sols_d[idx] = qtd_solucoes_thread;
melhorSol_d[idx] = UB_local;
}
}
#ifdef __cplusplus
}
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
int *mat_d, *mat_h;
int *qtd_threads_streams;
int block_size =192, nivelPreFixos;
int *sols_h, *sols_d;
int *melhorSol_h, *melhorSol_d;
short * path_h, * path_d;
int chunk;
int numStreams, nPreFixos;
hipStream_t vectorOfStreams[4];
int qtd_sols_global=0, otimo_global=INFINITO;
static void HandleError( hipError_t err,const char *file,int line ) {
if (err != hipSuccess) {
printf( "%s in %s at line %d\n", hipGetErrorString( err ),
file, line );
exit( EXIT_FAILURE );
}
}
void checkCUDAError(const char *msg) {
hipError_t err = hipGetLastError();
if (hipSuccess != err) {
fprintf(stderr, "Cuda error: %s: %s.\n", msg, hipGetErrorString(err));
exit(EXIT_FAILURE);
}
}
int completeEnum(int* mat, int nivelPreF, int nPre, int tam, short* path, int nStream){
mat_h = mat;
//int nPreFixos = calculaNPrefixos(nivelPreFixos,N);
nivelPreFixos = nivelPreF;
nPreFixos = nPre;
N = tam;
// printf("nivelPreFixos: %d\nnPreFIxos: %d\nN: %d",nivelPreFixos, nPreFixos,N);
chunk = nPreFixos/nStream;
numStreams = nStream;
// printf("chunk: %d\nnStreams: %d\n\n\n", chunk,numStreams);
qtd_threads_streams = (int*)malloc(sizeof(int)*numStreams);
if(numStreams>=1){
for(int i = 0; i<numStreams-1 / block_size;++i){
qtd_threads_streams[i] = chunk;
}
}
CUDA_CHECK_RETURN( hipMalloc((void **) &path_d, nPreFixos*nivelPreFixos*sizeof(short)));
sols_h = (int*)malloc(sizeof(int)*nPreFixos);
melhorSol_h = (int*)malloc(sizeof(int)*nPreFixos);
CUDA_CHECK_RETURN( hipMalloc((void **) &mat_d, N * N * sizeof(int)));
path_h = path;
CUDA_CHECK_RETURN( hipMemcpy(mat_d, mat_h, N * N * sizeof(int), hipMemcpyHostToDevice));
//for(int i =0; i<N*N;i++) printf("[ %d ]",mat_h[i]);
for(int i = 0; i<nPreFixos; ++i) melhorSol_h[i] = INFINITO;
CUDA_CHECK_RETURN( hipMalloc((void **) &melhorSol_d, sizeof(int)*nPreFixos));
CUDA_CHECK_RETURN( hipMalloc((void **) &sols_d, sizeof(int)*nPreFixos));
}
int createStream(int rank){
//printf("createStream: %d",rank);
hipStreamCreate(&vectorOfStreams[rank]);
hipMemcpyAsync(&path_d[rank*chunk*nivelPreFixos],&path_h[rank*chunk*nivelPreFixos],qtd_threads_streams[rank]*sizeof(short)*nivelPreFixos,hipMemcpyHostToDevice,vectorOfStreams[rank]);
hipMemcpyAsync(&melhorSol_d[rank*chunk], &melhorSol_h[rank*chunk],qtd_threads_streams[rank]*sizeof(int), hipMemcpyHostToDevice, vectorOfStreams[rank]);
hipMemcpyAsync(&sols_d[rank*chunk], &sols_h[rank*chunk], qtd_threads_streams[rank]*sizeof(int),hipMemcpyHostToDevice,vectorOfStreams[rank]);
return rank;
}
int callCompleteEnumStreams(int rank){
//int resto = 0;
//resto = (nPreFixos % chunk);
const int num_blocks = chunk/block_size + (chunk % block_size == 0 ? 0 : 1); //13: 16 blocos
//printf("Kernel %d\nnumblocks: %d \nblocksize: %d\n",rank, num_blocks, block_size);
hipLaunchKernelGGL(( dfs_cuda_UB_stream), dim3(num_blocks),dim3(block_size),0,vectorOfStreams[rank], N,qtd_threads_streams[rank],mat_d, &path_d[rank*chunk*nivelPreFixos],nivelPreFixos,999999, &sols_d[rank*chunk],&melhorSol_d[rank*chunk]);
//hipMemcpyAsync(&sols_h[rank*chunk],&sols_d[rank*chunk], qtd_threads_streams[rank]*sizeof(int),hipMemcpyDeviceToHost,vectorOfStreams[rank]);
//hipMemcpyAsync(&melhorSol_h[rank*chunk],&melhorSol_d[rank*chunk], qtd_threads_streams[rank]*sizeof(int),hipMemcpyDeviceToHost,vectorOfStreams[rank]);
hipDeviceSynchronize();
// hipMemcpy(sols_h,sols_d, nPreFixos*sizeof(int),hipMemcpyDeviceToHost);
// hipMemcpy(melhorSol_h,melhorSol_d, nPreFixos*sizeof(int),hipMemcpyDeviceToHost);
//
//
//testandoooooooooo
if(rank==0){
hipMemcpy(sols_h,sols_d, nPreFixos*sizeof(int),hipMemcpyDeviceToHost);
hipMemcpy(melhorSol_h,melhorSol_d, nPreFixos*sizeof(int),hipMemcpyDeviceToHost);
for(int i = 0; i<nPreFixos; ++i){
qtd_sols_global+=sols_h[i];
if(melhorSol_h[i]<otimo_global)
otimo_global = melhorSol_h[i];
}
// printf("\n\n\n\t niveis preenchidos: %d.\n",nivelPreFixos);
//
// printf("\t Numero de streams: %d.\n",numStreams);
// printf("\t Tamanho do stream: %d.\n",chunk);
// printf("\nQuantidade de solucoes encontradas: %d.", qtd_sols_global);
// printf("\n\tOtimo global: %d.\n\n", otimo_global);
}
return rank;
}
int getQT(){
return qtd_sols_global;
}
int getSol(){
return otimo_global;
}
int clearAll(){
CUDA_CHECK_RETURN( hipFree(mat_d));
CUDA_CHECK_RETURN( hipFree(sols_d));
CUDA_CHECK_RETURN( hipFree(path_d));
CUDA_CHECK_RETURN( hipFree(melhorSol_d));
for(int i = 0; i < numStreams; i++) hipStreamDestroy(vectorOfStreams[i]);
return 1;
}
#ifdef __cplusplus
}
#endif
| 5cec374858f71ed1f28ba04298b8357bc20160b9.cu | /*
* main.c
*
* Created on: 26/01/2011
* Author: einstein/carneiro
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <cuda.h>
#include <omp.h>
#define mat(i,j) mat_h[i*N+j]
#define mat_h(i,j) mat_h[i*N+j]
#define mat_d(i,j) mat_d[i*N_l+j]
#define mat_block(i,j) mat_block[i*N_l+j]
#define proximo(x) x+1
#define anterior(x) x-1
#define MAX 8192
#define INFINITO 999999
#define ZERO 0
#define ONE 1
#define _VAZIO_ -1
#define _VISITADO_ 1
#define _NAO_VISITADO_ 0
int qtd = 0;
int custo = 0;
int N;
int melhor = INFINITO;
int upper_bound;
#define CUDA_CHECK_RETURN(value) { \
cudaError_t _m_cudaStat = value; \
if (_m_cudaStat != cudaSuccess) { \
fprintf(stderr, "Error %s at line %d in file %s\n", \
cudaGetErrorString(_m_cudaStat), __LINE__, __FILE__); \
exit(1); \
} }
#define HANDLE_NULL( a ) {if (a == NULL) { \
printf( "Host memory failed in %s at line %d\n", \
__FILE__, __LINE__ ); \
exit( EXIT_FAILURE );}}
#ifndef _DFS_CUDA_UB_STREAM_H_
#define _DFS_CUDA_UB_STREAM_H_
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif
__global__ void dfs_cuda_UB_stream(int N,int stream_size, int *mat_d,
short *preFixos_d, int nivelPrefixo, int upper_bound, int *sols_d,
int *melhorSol_d)
{
register int idx = blockIdx.x * blockDim.x + threadIdx.x;
register int flag[16];
register int vertice[16];
register int N_l = N;
register int i, nivel;
register int custo;
register int qtd_solucoes_thread = 0;
register int UB_local = upper_bound;
register int nivelGlobal = nivelPrefixo;
int stream_size_l = stream_size;
if (idx < stream_size_l) {
for (i = 0; i < N_l; ++i) {
vertice[i] = _VAZIO_;
flag[i] = _NAO_VISITADO_;
}
vertice[0] = 0;
flag[0] = _VISITADO_;
custo= ZERO;
for (i = 1; i < nivelGlobal; ++i) {
vertice[i] = preFixos_d[idx * nivelGlobal + i];
flag[vertice[i]] = _VISITADO_;
custo += mat_d(vertice[i-1],vertice[i]);
}
nivel=nivelGlobal;
while (nivel >= nivelGlobal ) {
if (vertice[nivel] != _VAZIO_) {
flag[vertice[nivel]] = _NAO_VISITADO_;
custo -= mat_d(vertice[anterior(nivel)],vertice[nivel]);
}
do {
vertice[nivel]++;
} while (vertice[nivel] < N_l && flag[vertice[nivel]]);
if (vertice[nivel] < N_l) {
custo += mat_d(vertice[anterior(nivel)],vertice[nivel]);
flag[vertice[nivel]] = _VISITADO_;
nivel++;
if (nivel == N_l) {
++qtd_solucoes_thread;
if (custo + mat_d(vertice[anterior(nivel)],0) < UB_local) {
UB_local = custo + mat_d(vertice[anterior(nivel)],0);
}
nivel--;
}
}
else {
vertice[nivel] = _VAZIO_;
nivel--;
}
}
sols_d[idx] = qtd_solucoes_thread;
melhorSol_d[idx] = UB_local;
}
}
#ifdef __cplusplus
}
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
int *mat_d, *mat_h;
int *qtd_threads_streams;
int block_size =192, nivelPreFixos;
int *sols_h, *sols_d;
int *melhorSol_h, *melhorSol_d;
short * path_h, * path_d;
int chunk;
int numStreams, nPreFixos;
cudaStream_t vectorOfStreams[4];
int qtd_sols_global=0, otimo_global=INFINITO;
static void HandleError( cudaError_t err,const char *file,int line ) {
if (err != cudaSuccess) {
printf( "%s in %s at line %d\n", cudaGetErrorString( err ),
file, line );
exit( EXIT_FAILURE );
}
}
void checkCUDAError(const char *msg) {
cudaError_t err = cudaGetLastError();
if (cudaSuccess != err) {
fprintf(stderr, "Cuda error: %s: %s.\n", msg, cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
}
int completeEnum(int* mat, int nivelPreF, int nPre, int tam, short* path, int nStream){
mat_h = mat;
//int nPreFixos = calculaNPrefixos(nivelPreFixos,N);
nivelPreFixos = nivelPreF;
nPreFixos = nPre;
N = tam;
// printf("nivelPreFixos: %d\nnPreFIxos: %d\nN: %d",nivelPreFixos, nPreFixos,N);
chunk = nPreFixos/nStream;
numStreams = nStream;
// printf("chunk: %d\nnStreams: %d\n\n\n", chunk,numStreams);
qtd_threads_streams = (int*)malloc(sizeof(int)*numStreams);
if(numStreams>=1){
for(int i = 0; i<numStreams-1 / block_size;++i){
qtd_threads_streams[i] = chunk;
}
}
CUDA_CHECK_RETURN( cudaMalloc((void **) &path_d, nPreFixos*nivelPreFixos*sizeof(short)));
sols_h = (int*)malloc(sizeof(int)*nPreFixos);
melhorSol_h = (int*)malloc(sizeof(int)*nPreFixos);
CUDA_CHECK_RETURN( cudaMalloc((void **) &mat_d, N * N * sizeof(int)));
path_h = path;
CUDA_CHECK_RETURN( cudaMemcpy(mat_d, mat_h, N * N * sizeof(int), cudaMemcpyHostToDevice));
//for(int i =0; i<N*N;i++) printf("[ %d ]",mat_h[i]);
for(int i = 0; i<nPreFixos; ++i) melhorSol_h[i] = INFINITO;
CUDA_CHECK_RETURN( cudaMalloc((void **) &melhorSol_d, sizeof(int)*nPreFixos));
CUDA_CHECK_RETURN( cudaMalloc((void **) &sols_d, sizeof(int)*nPreFixos));
}
int createStream(int rank){
//printf("createStream: %d",rank);
cudaStreamCreate(&vectorOfStreams[rank]);
cudaMemcpyAsync(&path_d[rank*chunk*nivelPreFixos],&path_h[rank*chunk*nivelPreFixos],qtd_threads_streams[rank]*sizeof(short)*nivelPreFixos,cudaMemcpyHostToDevice,vectorOfStreams[rank]);
cudaMemcpyAsync(&melhorSol_d[rank*chunk], &melhorSol_h[rank*chunk],qtd_threads_streams[rank]*sizeof(int), cudaMemcpyHostToDevice, vectorOfStreams[rank]);
cudaMemcpyAsync(&sols_d[rank*chunk], &sols_h[rank*chunk], qtd_threads_streams[rank]*sizeof(int),cudaMemcpyHostToDevice,vectorOfStreams[rank]);
return rank;
}
int callCompleteEnumStreams(int rank){
//int resto = 0;
//resto = (nPreFixos % chunk);
const int num_blocks = chunk/block_size + (chunk % block_size == 0 ? 0 : 1); //13: 16 blocos
//printf("Kernel %d\nnumblocks: %d \nblocksize: %d\n",rank, num_blocks, block_size);
dfs_cuda_UB_stream<<<num_blocks,block_size,0,vectorOfStreams[rank]>>>(N,qtd_threads_streams[rank],mat_d, &path_d[rank*chunk*nivelPreFixos],nivelPreFixos,999999, &sols_d[rank*chunk],&melhorSol_d[rank*chunk]);
//cudaMemcpyAsync(&sols_h[rank*chunk],&sols_d[rank*chunk], qtd_threads_streams[rank]*sizeof(int),cudaMemcpyDeviceToHost,vectorOfStreams[rank]);
//cudaMemcpyAsync(&melhorSol_h[rank*chunk],&melhorSol_d[rank*chunk], qtd_threads_streams[rank]*sizeof(int),cudaMemcpyDeviceToHost,vectorOfStreams[rank]);
cudaDeviceSynchronize();
// cudaMemcpy(sols_h,sols_d, nPreFixos*sizeof(int),cudaMemcpyDeviceToHost);
// cudaMemcpy(melhorSol_h,melhorSol_d, nPreFixos*sizeof(int),cudaMemcpyDeviceToHost);
//
//
//testandoooooooooo
if(rank==0){
cudaMemcpy(sols_h,sols_d, nPreFixos*sizeof(int),cudaMemcpyDeviceToHost);
cudaMemcpy(melhorSol_h,melhorSol_d, nPreFixos*sizeof(int),cudaMemcpyDeviceToHost);
for(int i = 0; i<nPreFixos; ++i){
qtd_sols_global+=sols_h[i];
if(melhorSol_h[i]<otimo_global)
otimo_global = melhorSol_h[i];
}
// printf("\n\n\n\t niveis preenchidos: %d.\n",nivelPreFixos);
//
// printf("\t Numero de streams: %d.\n",numStreams);
// printf("\t Tamanho do stream: %d.\n",chunk);
// printf("\nQuantidade de solucoes encontradas: %d.", qtd_sols_global);
// printf("\n\tOtimo global: %d.\n\n", otimo_global);
}
return rank;
}
int getQT(){
return qtd_sols_global;
}
int getSol(){
return otimo_global;
}
int clearAll(){
CUDA_CHECK_RETURN( cudaFree(mat_d));
CUDA_CHECK_RETURN( cudaFree(sols_d));
CUDA_CHECK_RETURN( cudaFree(path_d));
CUDA_CHECK_RETURN( cudaFree(melhorSol_d));
for(int i = 0; i < numStreams; i++) cudaStreamDestroy(vectorOfStreams[i]);
return 1;
}
#ifdef __cplusplus
}
#endif
|
fd4ea22bcc08a2d4d0c7344ddb11a182a95881d6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../include/constants.h"
#include "hip/hip_cooperative_groups.h"
#include "stencils.cu"
#include "prefetch_smem.cu"
#include "stencil_border_check.cu"
using namespace cooperative_groups;
__global__ void smem_3d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int kstart,
unsigned int kend)
{
unsigned int i, j, k, idx, sidx;
extern __shared__ float smem[];
i = threadIdx.x + blockIdx.x*blockDim.x;
j = threadIdx.y + blockIdx.y*blockDim.y;
k = threadIdx.z + blockIdx.z*blockDim.z;
idx = i + j*NX + k*NX*NY;
sidx = threadIdx.x
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_domain_border_3d(i, j, k, kstart, kend))
smem[sidx] = d_u1[idx];
this_thread_block().sync();
if (check_stencil_border_3d(i, j, k, kstart, kend))
smem_stencil(smem, d_u1, d_u2, sidx, idx);
}
__global__ void smem_unroll_3d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int kstart,
unsigned int kend)
{
extern __shared__ float smem[];
unsigned int i, j, k, s, idx, sidx, ioff;
i = threadIdx.x + blockIdx.x*blockDim.x*COARSEN_X;
j = threadIdx.y + blockIdx.y*blockDim.y;
k = threadIdx.z + blockIdx.z*blockDim.z;
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX + k*NX*NY;
sidx = (threadIdx.x+ioff)
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_domain_border_3d(i+ioff, j, k, kstart, kend))
smem[sidx] = d_u1[idx];
}
this_thread_block().sync();
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX + k*NX*NY;
sidx = (threadIdx.x+ioff)
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_stencil_border_3d(i+ioff, j, k, kstart, kend))
smem_unrolled_stencil(d_u1, d_u2, smem, s, idx, sidx);
}
}
__global__ void smem_2d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int jstart,
unsigned int jend)
{
unsigned int i, j, idx, sidx;
extern __shared__ float smem[];
i = threadIdx.x + blockIdx.x*blockDim.x;
j = threadIdx.y + blockIdx.y*blockDim.y;
idx = i + j*NX;
sidx = threadIdx.x + threadIdx.y*blockDim.x*COARSEN_X;
if (check_domain_border_2d(i, j, jstart, jend))
smem[sidx] = d_u1[idx];
this_thread_block().sync();
if (check_stencil_border_2d(i, j, jstart, jend))
smem_stencil(smem, d_u1, d_u2, sidx, idx);
}
__global__ void smem_unroll_2d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int jstart,
unsigned int jend)
{
extern __shared__ float smem[];
unsigned int i, j, s, idx, sidx, ioff;
i = threadIdx.x + blockIdx.x*blockDim.x*COARSEN_X;
j = threadIdx.y + blockIdx.y*blockDim.y;
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX;
sidx = (threadIdx.x+ioff)+threadIdx.y*blockDim.x*COARSEN_X;
if (check_domain_border_2d(i+ioff, j, jstart, jend))
smem[sidx] = d_u1[idx];
}
this_thread_block().sync();
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX;
sidx = (threadIdx.x+ioff)+threadIdx.y*blockDim.x*COARSEN_X;
if (check_stencil_border_2d(i+ioff, j, jstart, jend))
smem_unrolled_stencil(d_u1, d_u2, smem, s, idx, sidx);
}
}
__global__ void smem_1d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int istart,
unsigned int iend)
{
unsigned int i = threadIdx.x + blockIdx.x*blockDim.x;
extern __shared__ float smem[];
if (check_domain_border_1d(i, istart, iend))
smem[threadIdx.x] = d_u1[i];
this_thread_block().sync();
if (check_stencil_border_1d(i, istart, iend))
smem_stencil(smem, d_u1, d_u2, threadIdx.x, i);
}
| fd4ea22bcc08a2d4d0c7344ddb11a182a95881d6.cu | #include "../include/constants.h"
#include "cooperative_groups.h"
#include "stencils.cu"
#include "prefetch_smem.cu"
#include "stencil_border_check.cu"
using namespace cooperative_groups;
__global__ void smem_3d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int kstart,
unsigned int kend)
{
unsigned int i, j, k, idx, sidx;
extern __shared__ float smem[];
i = threadIdx.x + blockIdx.x*blockDim.x;
j = threadIdx.y + blockIdx.y*blockDim.y;
k = threadIdx.z + blockIdx.z*blockDim.z;
idx = i + j*NX + k*NX*NY;
sidx = threadIdx.x
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_domain_border_3d(i, j, k, kstart, kend))
smem[sidx] = d_u1[idx];
this_thread_block().sync();
if (check_stencil_border_3d(i, j, k, kstart, kend))
smem_stencil(smem, d_u1, d_u2, sidx, idx);
}
__global__ void smem_unroll_3d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int kstart,
unsigned int kend)
{
extern __shared__ float smem[];
unsigned int i, j, k, s, idx, sidx, ioff;
i = threadIdx.x + blockIdx.x*blockDim.x*COARSEN_X;
j = threadIdx.y + blockIdx.y*blockDim.y;
k = threadIdx.z + blockIdx.z*blockDim.z;
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX + k*NX*NY;
sidx = (threadIdx.x+ioff)
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_domain_border_3d(i+ioff, j, k, kstart, kend))
smem[sidx] = d_u1[idx];
}
this_thread_block().sync();
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX + k*NX*NY;
sidx = (threadIdx.x+ioff)
+ threadIdx.y*blockDim.x*COARSEN_X
+ threadIdx.z*blockDim.x*COARSEN_X*blockDim.y;
if (check_stencil_border_3d(i+ioff, j, k, kstart, kend))
smem_unrolled_stencil(d_u1, d_u2, smem, s, idx, sidx);
}
}
__global__ void smem_2d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int jstart,
unsigned int jend)
{
unsigned int i, j, idx, sidx;
extern __shared__ float smem[];
i = threadIdx.x + blockIdx.x*blockDim.x;
j = threadIdx.y + blockIdx.y*blockDim.y;
idx = i + j*NX;
sidx = threadIdx.x + threadIdx.y*blockDim.x*COARSEN_X;
if (check_domain_border_2d(i, j, jstart, jend))
smem[sidx] = d_u1[idx];
this_thread_block().sync();
if (check_stencil_border_2d(i, j, jstart, jend))
smem_stencil(smem, d_u1, d_u2, sidx, idx);
}
__global__ void smem_unroll_2d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int jstart,
unsigned int jend)
{
extern __shared__ float smem[];
unsigned int i, j, s, idx, sidx, ioff;
i = threadIdx.x + blockIdx.x*blockDim.x*COARSEN_X;
j = threadIdx.y + blockIdx.y*blockDim.y;
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX;
sidx = (threadIdx.x+ioff)+threadIdx.y*blockDim.x*COARSEN_X;
if (check_domain_border_2d(i+ioff, j, jstart, jend))
smem[sidx] = d_u1[idx];
}
this_thread_block().sync();
#pragma unroll
for (s=0; s<COARSEN_X; s++) {
ioff = s*blockDim.x;
idx = (i+ioff) + j*NX;
sidx = (threadIdx.x+ioff)+threadIdx.y*blockDim.x*COARSEN_X;
if (check_stencil_border_2d(i+ioff, j, jstart, jend))
smem_unrolled_stencil(d_u1, d_u2, smem, s, idx, sidx);
}
}
__global__ void smem_1d(float* __restrict__ d_u1,
float* __restrict__ d_u2,
unsigned int istart,
unsigned int iend)
{
unsigned int i = threadIdx.x + blockIdx.x*blockDim.x;
extern __shared__ float smem[];
if (check_domain_border_1d(i, istart, iend))
smem[threadIdx.x] = d_u1[i];
this_thread_block().sync();
if (check_stencil_border_1d(i, istart, iend))
smem_stencil(smem, d_u1, d_u2, threadIdx.x, i);
}
|
16aebcb0f9a2e2b78139f435cc30f7b5e1675258.hip | // !!! This is a file automatically generated by hipify!!!
#include <chrono>
#include <thread>
#include <set>
#include "flamegpu/flamegpu.h"
#include "flamegpu/util/detail/compute_capability.cuh"
#include "helpers/device_initialisation.h"
#include "gtest/gtest.h"
namespace flamegpu {
namespace tests {
namespace test_cuda_simulation {
const char *MODEL_NAME = "Model";
const char *MODEL_NAME2 = "Model2";
const char *AGENT_NAME = "Agent";
const char *AGENT_NAME2 = "Agent2";
const char *FUNCTION_NAME = "Function";
const char *LAYER_NAME = "Layer";
const char VARIABLE_NAME[5] = "test"; // Have to define this in this form to use with compile time hash stuff
__device__ const char dVARIABLE_NAME[5] = "test"; // Have to define this in this form to use with compile time hash stuff
const int AGENT_COUNT = 10;
const int MULTIPLIER = 3;
__device__ const int dMULTIPLIER = 3;
int externalCounter = 0;
FLAMEGPU_AGENT_FUNCTION(DeathTestFunc, MessageNone, MessageNone) {
unsigned int x = FLAMEGPU->getVariable<unsigned int>("x");
// Agents with even value for 'x' die
if (x % 2 == 0)
return DEAD;
return ALIVE;
}
FLAMEGPU_STEP_FUNCTION(IncrementCounter) {
externalCounter++;
}
FLAMEGPU_STEP_FUNCTION(IncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
FLAMEGPU_INIT_FUNCTION(InitIncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
FLAMEGPU_EXIT_FUNCTION(ExitIncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
TEST(TestCUDASimulation, ApplyConfigDerivedContextCreation) {
// Simply get the result from the method provided by the helper file.
ASSERT_TRUE(getCUDASimulationContextCreationTestResult());
// Reset the device, just to be sure.
ASSERT_EQ(hipSuccess, hipDeviceReset());
}
// Test that the CUDASimulation applyConfig_derived works for multiple GPU device_id values (if available)
TEST(TestCUDASimulation, AllDeviceIdValues) {
// Get the number of devices
int device_count = 1;
if (hipSuccess != hipGetDeviceCount(&device_count) || device_count <= 0) {
// Skip the test, if no CUDA or GPUs.
return;
}
for (int i = 0; i < device_count; i++) {
// Check if the specified device is allowed to run the tests to determine if the test should throw or not. This is system dependent so must be dynamic.
bool shouldThrowCCException = !flamegpu::util::detail::compute_capability::checkComputeCapability(i);
// Initialise and run a simple model on each device in the system. This test is pointless on single GPU machines.
ModelDescription m(MODEL_NAME);
m.newAgent(AGENT_NAME);
// Scoping
{
CUDASimulation c(m);
// Set the device ID
c.CUDAConfig().device_id = i;
c.SimulationConfig().steps = 1;
// Apply the config (and therefore set the device.)
if (shouldThrowCCException) {
// Should throw exception::InvalidCUDAComputeCapability if bad compute capability.
EXPECT_THROW(c.applyConfig(), exception::InvalidCUDAComputeCapability);
EXPECT_THROW(c.simulate(), exception::InvalidCUDAComputeCapability);
} else {
// Should not get any excpetions if CC is valid.
EXPECT_NO_THROW(c.applyConfig());
EXPECT_NO_THROW(c.simulate());
}
}
}
// Return to prior state for remaining tests.
ASSERT_EQ(hipSuccess, hipSetDevice(0));
}
TEST(TestSimulation, ArgParse_inputfile_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--in", "test" };
EXPECT_EQ(c.getSimulationConfig().input_file, "");
EXPECT_THROW(c.initialise(sizeof(argv)/sizeof(char*), argv), exception::UnsupportedFileType); // cant detect filetype
EXPECT_EQ(c.getSimulationConfig().input_file, argv[2]);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().input_file, "");
}
TEST(TestSimulation, ArgParse_inputfile_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-i", "I_DO_NOT_EXIST.xml" };
EXPECT_EQ(c.getSimulationConfig().input_file, "");
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidInputFile); // File doesn't exist
EXPECT_EQ(c.getSimulationConfig().input_file, argv[2]);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().input_file, "");
}
TEST(TestSimulation, ArgParse_steps_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--steps", "12" };
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().steps, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
}
TEST(TestSimulation, ArgParse_steps_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-s", "12" };
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().steps, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
}
TEST(TestSimulation, ArgParse_randomseed_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--random", "12" };
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().random_seed, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
}
TEST(TestSimulation, ArgParse_randomseed_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-r", "12" };
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().random_seed, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
}
TEST(TestCUDASimulation, ArgParse_device_long) {
ASSERT_EQ(hipGetLastError(), hipSuccess);
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--device", "1200" };
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
// Setting an invalid device ID is the only safe way to do this without making internal methods accessible
// As can set to a valid device, we haven't build code for
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidCUDAdevice);
EXPECT_EQ(c.getCUDAConfig().device_id, 1200);
// Blank init resets value to default
ASSERT_EQ(hipGetLastError(), hipSuccess);
c.initialise(0, nullptr);
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
ASSERT_EQ(hipGetLastError(), hipSuccess);
}
TEST(TestCUDASimulation, ArgParse_device_short) {
ASSERT_EQ(hipGetLastError(), hipSuccess);
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-d", "1200" };
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
// Setting an invalid device ID is the only safe way to do this without making internal methods accessible
// As can set to a valid device, we haven't build code for
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidCUDAdevice);
EXPECT_EQ(c.getCUDAConfig().device_id, 1200);
// Blank init resets value to default
ASSERT_EQ(hipGetLastError(), hipSuccess);
c.initialise(0, nullptr);
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
ASSERT_EQ(hipGetLastError(), hipSuccess);
}
FLAMEGPU_AGENT_FUNCTION(SetGetFn, MessageNone, MessageNone) {
int i = FLAMEGPU->getVariable<int>(dVARIABLE_NAME);
FLAMEGPU->setVariable<int>(dVARIABLE_NAME, i * dMULTIPLIER);
return ALIVE;
}
TEST(TestCUDASimulation, SetGetPopulationData) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
m.newLayer(LAYER_NAME).addAgentFunction(a.newFunction(FUNCTION_NAME, SetGetFn));
a.newVariable<int>(VARIABLE_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
i.setVariable<int>(VARIABLE_NAME, _i);
EXPECT_THROW(i.setVariable<float>(VARIABLE_NAME, static_cast<float>(_i)), exception::InvalidVarType);
}
CUDASimulation c(m);
c.SimulationConfig().steps = 1;
c.setPopulationData(pop);
c.simulate();
c.getPopulationData(pop);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
EXPECT_EQ(i.getVariable<int>(VARIABLE_NAME), _i * MULTIPLIER);
i.setVariable<int>(VARIABLE_NAME, _i * 2);
}
c.setPopulationData(pop);
c.simulate();
c.getPopulationData(pop);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
EXPECT_EQ(i.getVariable<int>(VARIABLE_NAME), _i * MULTIPLIER * 2);
EXPECT_THROW(i.getVariable<float>(VARIABLE_NAME), exception::InvalidVarType);
}
}
TEST(TestCUDASimulation, SetGetPopulationData_InvalidAgent) {
ModelDescription m2(MODEL_NAME2);
AgentDescription &a2 = m2.newAgent(AGENT_NAME2);
ModelDescription m(MODEL_NAME);
// AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a2, static_cast<unsigned int>(AGENT_COUNT));
CUDASimulation c(m);
EXPECT_THROW(c.setPopulationData(pop), exception::InvalidAgent);
EXPECT_THROW(c.getPopulationData(pop), exception::InvalidAgent);
}
TEST(TestCUDASimulation, GetAgent) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
m.newLayer(LAYER_NAME).addAgentFunction(a.newFunction(FUNCTION_NAME, SetGetFn));
a.newVariable<int>(VARIABLE_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
i.setVariable<int>(VARIABLE_NAME, _i);
}
CUDASimulation c(m);
c.SimulationConfig().steps = 1;
c.setPopulationData(pop);
c.simulate();
AgentInterface &agent = c.getAgent(AGENT_NAME);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
int host = 0;
hipMemcpy(&host, reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, sizeof(int), hipMemcpyDeviceToHost);
EXPECT_EQ(host, _i * MULTIPLIER);
host = _i * 2;
hipMemcpy(reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, &host, sizeof(int), hipMemcpyHostToDevice);
}
c.simulate();
agent = c.getAgent(AGENT_NAME);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
int host = 0;
hipMemcpy(&host, reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, sizeof(int), hipMemcpyDeviceToHost);
EXPECT_EQ(host, _i * 2 * MULTIPLIER);
}
}
TEST(TestCUDASimulation, Step) {
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c(m);
c.setPopulationData(pop);
externalCounter = 0;
c.resetStepCounter();
c.step();
EXPECT_EQ(externalCounter, 1);
EXPECT_EQ(c.getStepCounter(), 1u);
externalCounter = 0;
c.resetStepCounter();
for (unsigned int i = 0; i < 5; ++i) {
c.step();
}
EXPECT_EQ(externalCounter, 5);
EXPECT_EQ(c.getStepCounter(), 5u);
}
FLAMEGPU_AGENT_FUNCTION(add_fn, MessageNone, MessageNone) {
FLAMEGPU->setVariable<int>("i", FLAMEGPU->getVariable<int>("i") + 1);
FLAMEGPU->setVariable<int>("j", FLAMEGPU->getVariable<int>("j") + 1);
return ALIVE;
}
TEST(TestCUDASimulation, SharedAgentFunction) {
// Test that two different agents can share an agent function name/implementation
ModelDescription model("test");
auto &agent1 = model.newAgent("a1");
auto &agent2 = model.newAgent("a2");
agent1.newVariable<int>("i", 1);
agent1.newVariable<int>("j", -1);
agent2.newVariable<int>("i", -1);
agent2.newVariable<int>("j", 1);
auto &a1f = agent1.newFunction("add", add_fn);
auto &a2f = agent2.newFunction("add", add_fn);
auto &layer = model.newLayer();
layer.addAgentFunction(a1f);
layer.addAgentFunction(a2f);
CUDASimulation cudaSimulation(model);
cudaSimulation.applyConfig();
const unsigned int populationSize = 5;
AgentVector pop1(agent1, populationSize);
AgentVector pop2(agent2, populationSize);
cudaSimulation.setPopulationData(pop1);
cudaSimulation.setPopulationData(pop2);
const unsigned int steps = 5;
for (unsigned int i = 0; i < steps; ++i) {
cudaSimulation.step();
}
cudaSimulation.getPopulationData(pop1);
cudaSimulation.getPopulationData(pop2);
for (unsigned int i = 0; i < populationSize; i++) {
auto instance = pop1[i];
EXPECT_EQ(instance.getVariable<int>("i"), 6);
EXPECT_EQ(instance.getVariable<int>("j"), 4);
}
for (unsigned int i = 0; i < populationSize; i++) {
auto instance = pop2[i];
EXPECT_EQ(instance.getVariable<int>("i"), 4);
EXPECT_EQ(instance.getVariable<int>("j"), 6);
}
}
TEST(TestSimulation, Simulate) {
// Simulation is abstract, so test via CUDASimulation
// Depends on CUDASimulation::step()
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c(m);
c.setPopulationData(pop);
externalCounter = 0;
c.resetStepCounter();
c.SimulationConfig().steps = 7;
c.simulate();
EXPECT_EQ(externalCounter, 7);
EXPECT_EQ(c.getStepCounter(), 7u);
externalCounter = 0;
c.resetStepCounter();
c.SimulationConfig().steps = 3;
c.simulate();
EXPECT_EQ(externalCounter, 3);
EXPECT_EQ(c.getStepCounter(), 3u);
}
// Show that blank init resets the vals?
TEST(TestCUDASimulation, AgentDeath) {
std::default_random_engine generator;
std::uniform_int_distribution<unsigned int> distribution(0, 12);
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
a.newVariable<unsigned int>("x");
a.newFunction("DeathFunc", DeathTestFunc).setAllowAgentDeath(true);
m.newLayer().addAgentFunction(DeathTestFunc);
CUDASimulation c(m);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
std::vector<unsigned int> expected_output;
for (auto p : pop) {
unsigned int rng = distribution(generator);
p.setVariable<unsigned int>("x", rng);
if (rng % 2 != 0)
expected_output.push_back(rng);
}
c.setPopulationData(pop);
c.SimulationConfig().steps = 1;
c.simulate();
c.getPopulationData(pop);
EXPECT_EQ(static_cast<size_t>(pop.size()), expected_output.size());
for (unsigned int i = 0; i < pop.size(); ++i) {
// Check x is an expected value
EXPECT_EQ(expected_output[i], pop[i].getVariable<unsigned int>("x"));
}
}
// Test setting the seed with different values/types.
TEST(TestCUDASimulation, randomseedTypes) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription model(MODEL_NAME);
AgentDescription &a = model.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
CUDASimulation simulation(model);
simulation.SimulationConfig().random_seed = 0;
EXPECT_EQ(simulation.SimulationConfig().random_seed, 0);
int32_t int32_v = INT32_MAX;
simulation.SimulationConfig().random_seed = int32_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(int32_v));
uint32_t uint32_v = UINT32_MAX;
simulation.SimulationConfig().random_seed = uint32_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(uint32_v));
int64_t int64_v = INT64_MAX;
simulation.SimulationConfig().random_seed = int64_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(int64_v));
uint64_t uint64_v = UINT64_MAX;
simulation.SimulationConfig().random_seed = uint64_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(uint64_v));
// No need to check for larger values in cudac++
}
// test the programatically accessible simulation time elapsed.
TEST(TestCUDASimulation, simulationElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should return 0
EXPECT_EQ(c.getElapsedTimeSimulation(), 0.);
// Call simulate to run 1 steps, which should take some length of time
c.SimulationConfig().steps = 1;
c.simulate();
EXPECT_GT(c.getElapsedTimeSimulation(), 0.);
// Then run 10 steps, which should be longer / not the same.
double simulate1StepDuration = c.getElapsedTimeSimulation();
c.SimulationConfig().steps = 10;
c.simulate();
double simulate10StepDuration = c.getElapsedTimeSimulation();
EXPECT_GT(simulate10StepDuration, 0.);
EXPECT_NE(simulate1StepDuration, simulate10StepDuration);
}
// test the programatically accessible simulation time elapsed.
TEST(TestCUDASimulation, initExitElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addInitFunction(InitIncrementCounterSlow);
m.addStepFunction(IncrementCounterSlow);
m.addExitFunction(ExitIncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should return 0
EXPECT_EQ(c.getElapsedTimeSimulation(), 0.);
EXPECT_EQ(c.getElapsedTimeInitFunctions(), 0.);
EXPECT_EQ(c.getElapsedTimeExitFunctions(), 0.);
// Call simulate to run 1 steps, which should take some length of time
c.SimulationConfig().steps = 1;
c.simulate();
// Afterwards timers should be non 0.
EXPECT_GT(c.getElapsedTimeSimulation(), 0.);
EXPECT_GT(c.getElapsedTimeInitFunctions(), 0.);
EXPECT_GT(c.getElapsedTimeExitFunctions(), 0.);
}
// test the programatically accessible per step simulation time.
TEST(TestCUDASimulation, stepElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should be empty.
EXPECT_EQ(c.getElapsedTimeSteps().size(), 0.);
// Or gettng an individual element which is out of boudns should have some kind of error.
// EXPECT_GT(c.getElapsedTimeStep(1), 0.); // @todo
// Call simulate to run 10 steps, which should take some length of time
const unsigned int STEPS = 10u;
c.SimulationConfig().steps = STEPS;
c.simulate();
std::vector<double> stepTimes = c.getElapsedTimeSteps();
EXPECT_EQ(stepTimes.size(), STEPS);
for (unsigned int step = 0; step < STEPS; step++) {
EXPECT_GT(stepTimes.at(step), 0.);
EXPECT_GT(c.getElapsedTimeStep(step), 0.);
}
}
/* const char* rtc_empty_agent_func = R"###(
FLAMEGPU_AGENT_FUNCTION(rtc_test_func, MessageNone, MessageNone) {
return ALIVE;
}
)###"; */
/**
* Test an empty agent function to ensure that the RTC library can successful build and run a minimal example
*/
/* TEST(TestCUDASimulation, RTCElapsedTime) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector p(a, static_cast<unsigned int>(AGENT_COUNT));
a.newVariable<unsigned int>("x");
// add RTC agent function
AgentFunctionDescription &rtcFunc = a.newRTCFunction("rtc_test_func", rtc_empty_agent_func);
m.newLayer().addAgentFunction(rtcFunc);
// Init pop
for (unsigned int i = 0u; i < AGENT_COUNT; i++) {
AgentVector::Agent instance = p[i];
instance.setVariable<unsigned int>("x", static_cast<unsigned int>(i));
}
// Setup Model
CUDASimulation s(m);
s.setPopulationData(p);
EXPECT_EQ(s.getElapsedTimeRTCInitialisation(), 0.);
EXPECT_EQ(s.getElapsedTimeSimulation(), 0.);
} */
const char* rtc_empty_agent_func = R"###(
FLAMEGPU_AGENT_FUNCTION(rtc_test_func, flamegpu::MessageNone, flamegpu::MessageNone) {
return flamegpu::ALIVE;
}
)###";
/**
* Test an empty agent function to ensure that the RTC library can successful build and run a minimal example
*/
TEST(TestCUDASimulation, RTCElapsedTime) {
ModelDescription m("m");
AgentDescription &agent = m.newAgent(AGENT_NAME);
// add RTC agent function
AgentFunctionDescription &func = agent.newRTCFunction("rtc_test_func", rtc_empty_agent_func);
func.setAllowAgentDeath(true);
m.newLayer().addAgentFunction(func);
// Init pop
AgentVector p(agent, AGENT_COUNT);
CUDASimulation s(m);
// The RTC initialisation occurs before anything try to interact with the device, i.e. population generation so the timer should be 0 here
EXPECT_EQ(s.getElapsedTimeRTCInitialisation(), 0.);
s.SimulationConfig().steps = 1;
s.setPopulationData(p);
s.simulate();
// Afterwards timers should be non 0.
EXPECT_GT(s.getElapsedTimeRTCInitialisation(), 0.);
}
// test that we can have 2 instances of the same ModelDescription simultaneously
TEST(TestCUDASimulation, MultipleInstances) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c1(m);
c1.setPopulationData(pop);
// Set population data should trigger initialiseSingletons(), which is what leads to crash if EnvManager has matching name/id
EXPECT_NO_THROW(CUDASimulation c2(m); c2.setPopulationData(pop););
}
FLAMEGPU_AGENT_FUNCTION(CopyID, MessageNone, MessageNone) {
FLAMEGPU->setVariable<id_t>("id_copy", FLAMEGPU->getID());
return ALIVE;
}
TEST(TestCUDASimulation, AgentID_MultipleStatesUniqueIDs) {
// Create agents via AgentVector to two agent states
// Store agent IDs to an agent variable inside model
// Export agents and check their IDs are unique
// Also check that the id's copied during model match those at export
ModelDescription model("test_agentid");
AgentDescription& agent = model.newAgent("agent");
agent.newVariable<id_t>("id_copy");
agent.newState("a");
agent.newState("b");
auto& af_a = agent.newFunction("copy_id", CopyID);
af_a.setInitialState("a");
af_a.setEndState("a");
auto& af_b = agent.newFunction("copy_id2", CopyID);
af_b.setInitialState("b");
af_b.setEndState("b");
auto& layer = model.newLayer();
layer.addAgentFunction(af_a);
layer.addAgentFunction(af_b);
AgentVector pop_in(agent, 100);
CUDASimulation sim(model);
sim.setPopulationData(pop_in, "a");
sim.setPopulationData(pop_in, "b");
sim.step();
AgentVector pop_out_a(agent);
AgentVector pop_out_b(agent);
sim.getPopulationData(pop_out_a, "a");
sim.getPopulationData(pop_out_b, "b");
std::set<id_t> ids_original, ids_copy;
for (auto a : pop_out_a) {
ids_original.insert(a.getID());
ids_copy.insert(a.getVariable<id_t>("id_copy"));
ASSERT_EQ(a.getID(), a.getVariable<id_t>("id_copy"));
}
for (auto a : pop_out_b) {
ids_original.insert(a.getID());
ids_copy.insert(a.getVariable<id_t>("id_copy"));
ASSERT_EQ(a.getID(), a.getVariable<id_t>("id_copy"));
}
ASSERT_EQ(ids_original.size(), pop_out_a.size() + pop_out_b.size());
ASSERT_EQ(ids_copy.size(), pop_out_a.size() + pop_out_b.size());
}
} // namespace test_cuda_simulation
} // namespace tests
} // namespace flamegpu
| 16aebcb0f9a2e2b78139f435cc30f7b5e1675258.cu | #include <chrono>
#include <thread>
#include <set>
#include "flamegpu/flamegpu.h"
#include "flamegpu/util/detail/compute_capability.cuh"
#include "helpers/device_initialisation.h"
#include "gtest/gtest.h"
namespace flamegpu {
namespace tests {
namespace test_cuda_simulation {
const char *MODEL_NAME = "Model";
const char *MODEL_NAME2 = "Model2";
const char *AGENT_NAME = "Agent";
const char *AGENT_NAME2 = "Agent2";
const char *FUNCTION_NAME = "Function";
const char *LAYER_NAME = "Layer";
const char VARIABLE_NAME[5] = "test"; // Have to define this in this form to use with compile time hash stuff
__device__ const char dVARIABLE_NAME[5] = "test"; // Have to define this in this form to use with compile time hash stuff
const int AGENT_COUNT = 10;
const int MULTIPLIER = 3;
__device__ const int dMULTIPLIER = 3;
int externalCounter = 0;
FLAMEGPU_AGENT_FUNCTION(DeathTestFunc, MessageNone, MessageNone) {
unsigned int x = FLAMEGPU->getVariable<unsigned int>("x");
// Agents with even value for 'x' die
if (x % 2 == 0)
return DEAD;
return ALIVE;
}
FLAMEGPU_STEP_FUNCTION(IncrementCounter) {
externalCounter++;
}
FLAMEGPU_STEP_FUNCTION(IncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
FLAMEGPU_INIT_FUNCTION(InitIncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
FLAMEGPU_EXIT_FUNCTION(ExitIncrementCounterSlow) {
externalCounter++;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
TEST(TestCUDASimulation, ApplyConfigDerivedContextCreation) {
// Simply get the result from the method provided by the helper file.
ASSERT_TRUE(getCUDASimulationContextCreationTestResult());
// Reset the device, just to be sure.
ASSERT_EQ(cudaSuccess, cudaDeviceReset());
}
// Test that the CUDASimulation applyConfig_derived works for multiple GPU device_id values (if available)
TEST(TestCUDASimulation, AllDeviceIdValues) {
// Get the number of devices
int device_count = 1;
if (cudaSuccess != cudaGetDeviceCount(&device_count) || device_count <= 0) {
// Skip the test, if no CUDA or GPUs.
return;
}
for (int i = 0; i < device_count; i++) {
// Check if the specified device is allowed to run the tests to determine if the test should throw or not. This is system dependent so must be dynamic.
bool shouldThrowCCException = !flamegpu::util::detail::compute_capability::checkComputeCapability(i);
// Initialise and run a simple model on each device in the system. This test is pointless on single GPU machines.
ModelDescription m(MODEL_NAME);
m.newAgent(AGENT_NAME);
// Scoping
{
CUDASimulation c(m);
// Set the device ID
c.CUDAConfig().device_id = i;
c.SimulationConfig().steps = 1;
// Apply the config (and therefore set the device.)
if (shouldThrowCCException) {
// Should throw exception::InvalidCUDAComputeCapability if bad compute capability.
EXPECT_THROW(c.applyConfig(), exception::InvalidCUDAComputeCapability);
EXPECT_THROW(c.simulate(), exception::InvalidCUDAComputeCapability);
} else {
// Should not get any excpetions if CC is valid.
EXPECT_NO_THROW(c.applyConfig());
EXPECT_NO_THROW(c.simulate());
}
}
}
// Return to prior state for remaining tests.
ASSERT_EQ(cudaSuccess, cudaSetDevice(0));
}
TEST(TestSimulation, ArgParse_inputfile_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--in", "test" };
EXPECT_EQ(c.getSimulationConfig().input_file, "");
EXPECT_THROW(c.initialise(sizeof(argv)/sizeof(char*), argv), exception::UnsupportedFileType); // cant detect filetype
EXPECT_EQ(c.getSimulationConfig().input_file, argv[2]);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().input_file, "");
}
TEST(TestSimulation, ArgParse_inputfile_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-i", "I_DO_NOT_EXIST.xml" };
EXPECT_EQ(c.getSimulationConfig().input_file, "");
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidInputFile); // File doesn't exist
EXPECT_EQ(c.getSimulationConfig().input_file, argv[2]);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().input_file, "");
}
TEST(TestSimulation, ArgParse_steps_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--steps", "12" };
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().steps, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
}
TEST(TestSimulation, ArgParse_steps_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-s", "12" };
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().steps, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_EQ(c.getSimulationConfig().steps, 1u);
}
TEST(TestSimulation, ArgParse_randomseed_long) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--random", "12" };
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().random_seed, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
}
TEST(TestSimulation, ArgParse_randomseed_short) {
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-r", "12" };
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
c.initialise(sizeof(argv) / sizeof(char*), argv);
EXPECT_EQ(c.getSimulationConfig().random_seed, 12u);
// Blank init resets value to default
c.initialise(0, nullptr);
EXPECT_NE(c.getSimulationConfig().random_seed, 12u);
}
TEST(TestCUDASimulation, ArgParse_device_long) {
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "--device", "1200" };
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
// Setting an invalid device ID is the only safe way to do this without making internal methods accessible
// As can set to a valid device, we haven't build code for
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidCUDAdevice);
EXPECT_EQ(c.getCUDAConfig().device_id, 1200);
// Blank init resets value to default
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
c.initialise(0, nullptr);
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
}
TEST(TestCUDASimulation, ArgParse_device_short) {
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
ModelDescription m(MODEL_NAME);
CUDASimulation c(m);
const char *argv[3] = { "prog.exe", "-d", "1200" };
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
// Setting an invalid device ID is the only safe way to do this without making internal methods accessible
// As can set to a valid device, we haven't build code for
EXPECT_THROW(c.initialise(sizeof(argv) / sizeof(char*), argv), exception::InvalidCUDAdevice);
EXPECT_EQ(c.getCUDAConfig().device_id, 1200);
// Blank init resets value to default
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
c.initialise(0, nullptr);
EXPECT_EQ(c.getCUDAConfig().device_id, 0);
ASSERT_EQ(cudaGetLastError(), cudaSuccess);
}
FLAMEGPU_AGENT_FUNCTION(SetGetFn, MessageNone, MessageNone) {
int i = FLAMEGPU->getVariable<int>(dVARIABLE_NAME);
FLAMEGPU->setVariable<int>(dVARIABLE_NAME, i * dMULTIPLIER);
return ALIVE;
}
TEST(TestCUDASimulation, SetGetPopulationData) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
m.newLayer(LAYER_NAME).addAgentFunction(a.newFunction(FUNCTION_NAME, SetGetFn));
a.newVariable<int>(VARIABLE_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
i.setVariable<int>(VARIABLE_NAME, _i);
EXPECT_THROW(i.setVariable<float>(VARIABLE_NAME, static_cast<float>(_i)), exception::InvalidVarType);
}
CUDASimulation c(m);
c.SimulationConfig().steps = 1;
c.setPopulationData(pop);
c.simulate();
c.getPopulationData(pop);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
EXPECT_EQ(i.getVariable<int>(VARIABLE_NAME), _i * MULTIPLIER);
i.setVariable<int>(VARIABLE_NAME, _i * 2);
}
c.setPopulationData(pop);
c.simulate();
c.getPopulationData(pop);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
EXPECT_EQ(i.getVariable<int>(VARIABLE_NAME), _i * MULTIPLIER * 2);
EXPECT_THROW(i.getVariable<float>(VARIABLE_NAME), exception::InvalidVarType);
}
}
TEST(TestCUDASimulation, SetGetPopulationData_InvalidAgent) {
ModelDescription m2(MODEL_NAME2);
AgentDescription &a2 = m2.newAgent(AGENT_NAME2);
ModelDescription m(MODEL_NAME);
// AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a2, static_cast<unsigned int>(AGENT_COUNT));
CUDASimulation c(m);
EXPECT_THROW(c.setPopulationData(pop), exception::InvalidAgent);
EXPECT_THROW(c.getPopulationData(pop), exception::InvalidAgent);
}
TEST(TestCUDASimulation, GetAgent) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
m.newLayer(LAYER_NAME).addAgentFunction(a.newFunction(FUNCTION_NAME, SetGetFn));
a.newVariable<int>(VARIABLE_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
AgentVector::Agent i = pop[_i];
i.setVariable<int>(VARIABLE_NAME, _i);
}
CUDASimulation c(m);
c.SimulationConfig().steps = 1;
c.setPopulationData(pop);
c.simulate();
AgentInterface &agent = c.getAgent(AGENT_NAME);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
int host = 0;
cudaMemcpy(&host, reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, sizeof(int), cudaMemcpyDeviceToHost);
EXPECT_EQ(host, _i * MULTIPLIER);
host = _i * 2;
cudaMemcpy(reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, &host, sizeof(int), cudaMemcpyHostToDevice);
}
c.simulate();
agent = c.getAgent(AGENT_NAME);
for (int _i = 0; _i < AGENT_COUNT; ++_i) {
int host = 0;
cudaMemcpy(&host, reinterpret_cast<int*>(agent.getStateVariablePtr(ModelData::DEFAULT_STATE, VARIABLE_NAME)) + _i, sizeof(int), cudaMemcpyDeviceToHost);
EXPECT_EQ(host, _i * 2 * MULTIPLIER);
}
}
TEST(TestCUDASimulation, Step) {
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c(m);
c.setPopulationData(pop);
externalCounter = 0;
c.resetStepCounter();
c.step();
EXPECT_EQ(externalCounter, 1);
EXPECT_EQ(c.getStepCounter(), 1u);
externalCounter = 0;
c.resetStepCounter();
for (unsigned int i = 0; i < 5; ++i) {
c.step();
}
EXPECT_EQ(externalCounter, 5);
EXPECT_EQ(c.getStepCounter(), 5u);
}
FLAMEGPU_AGENT_FUNCTION(add_fn, MessageNone, MessageNone) {
FLAMEGPU->setVariable<int>("i", FLAMEGPU->getVariable<int>("i") + 1);
FLAMEGPU->setVariable<int>("j", FLAMEGPU->getVariable<int>("j") + 1);
return ALIVE;
}
TEST(TestCUDASimulation, SharedAgentFunction) {
// Test that two different agents can share an agent function name/implementation
ModelDescription model("test");
auto &agent1 = model.newAgent("a1");
auto &agent2 = model.newAgent("a2");
agent1.newVariable<int>("i", 1);
agent1.newVariable<int>("j", -1);
agent2.newVariable<int>("i", -1);
agent2.newVariable<int>("j", 1);
auto &a1f = agent1.newFunction("add", add_fn);
auto &a2f = agent2.newFunction("add", add_fn);
auto &layer = model.newLayer();
layer.addAgentFunction(a1f);
layer.addAgentFunction(a2f);
CUDASimulation cudaSimulation(model);
cudaSimulation.applyConfig();
const unsigned int populationSize = 5;
AgentVector pop1(agent1, populationSize);
AgentVector pop2(agent2, populationSize);
cudaSimulation.setPopulationData(pop1);
cudaSimulation.setPopulationData(pop2);
const unsigned int steps = 5;
for (unsigned int i = 0; i < steps; ++i) {
cudaSimulation.step();
}
cudaSimulation.getPopulationData(pop1);
cudaSimulation.getPopulationData(pop2);
for (unsigned int i = 0; i < populationSize; i++) {
auto instance = pop1[i];
EXPECT_EQ(instance.getVariable<int>("i"), 6);
EXPECT_EQ(instance.getVariable<int>("j"), 4);
}
for (unsigned int i = 0; i < populationSize; i++) {
auto instance = pop2[i];
EXPECT_EQ(instance.getVariable<int>("i"), 4);
EXPECT_EQ(instance.getVariable<int>("j"), 6);
}
}
TEST(TestSimulation, Simulate) {
// Simulation is abstract, so test via CUDASimulation
// Depends on CUDASimulation::step()
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c(m);
c.setPopulationData(pop);
externalCounter = 0;
c.resetStepCounter();
c.SimulationConfig().steps = 7;
c.simulate();
EXPECT_EQ(externalCounter, 7);
EXPECT_EQ(c.getStepCounter(), 7u);
externalCounter = 0;
c.resetStepCounter();
c.SimulationConfig().steps = 3;
c.simulate();
EXPECT_EQ(externalCounter, 3);
EXPECT_EQ(c.getStepCounter(), 3u);
}
// Show that blank init resets the vals?
TEST(TestCUDASimulation, AgentDeath) {
std::default_random_engine generator;
std::uniform_int_distribution<unsigned int> distribution(0, 12);
// Test that step does a single step
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
a.newVariable<unsigned int>("x");
a.newFunction("DeathFunc", DeathTestFunc).setAllowAgentDeath(true);
m.newLayer().addAgentFunction(DeathTestFunc);
CUDASimulation c(m);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
std::vector<unsigned int> expected_output;
for (auto p : pop) {
unsigned int rng = distribution(generator);
p.setVariable<unsigned int>("x", rng);
if (rng % 2 != 0)
expected_output.push_back(rng);
}
c.setPopulationData(pop);
c.SimulationConfig().steps = 1;
c.simulate();
c.getPopulationData(pop);
EXPECT_EQ(static_cast<size_t>(pop.size()), expected_output.size());
for (unsigned int i = 0; i < pop.size(); ++i) {
// Check x is an expected value
EXPECT_EQ(expected_output[i], pop[i].getVariable<unsigned int>("x"));
}
}
// Test setting the seed with different values/types.
TEST(TestCUDASimulation, randomseedTypes) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription model(MODEL_NAME);
AgentDescription &a = model.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
CUDASimulation simulation(model);
simulation.SimulationConfig().random_seed = 0;
EXPECT_EQ(simulation.SimulationConfig().random_seed, 0);
int32_t int32_v = INT32_MAX;
simulation.SimulationConfig().random_seed = int32_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(int32_v));
uint32_t uint32_v = UINT32_MAX;
simulation.SimulationConfig().random_seed = uint32_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(uint32_v));
int64_t int64_v = INT64_MAX;
simulation.SimulationConfig().random_seed = int64_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(int64_v));
uint64_t uint64_v = UINT64_MAX;
simulation.SimulationConfig().random_seed = uint64_v;
EXPECT_EQ(simulation.SimulationConfig().random_seed, static_cast<uint64_t>(uint64_v));
// No need to check for larger values in cudac++
}
// test the programatically accessible simulation time elapsed.
TEST(TestCUDASimulation, simulationElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should return 0
EXPECT_EQ(c.getElapsedTimeSimulation(), 0.);
// Call simulate to run 1 steps, which should take some length of time
c.SimulationConfig().steps = 1;
c.simulate();
EXPECT_GT(c.getElapsedTimeSimulation(), 0.);
// Then run 10 steps, which should be longer / not the same.
double simulate1StepDuration = c.getElapsedTimeSimulation();
c.SimulationConfig().steps = 10;
c.simulate();
double simulate10StepDuration = c.getElapsedTimeSimulation();
EXPECT_GT(simulate10StepDuration, 0.);
EXPECT_NE(simulate1StepDuration, simulate10StepDuration);
}
// test the programatically accessible simulation time elapsed.
TEST(TestCUDASimulation, initExitElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addInitFunction(InitIncrementCounterSlow);
m.addStepFunction(IncrementCounterSlow);
m.addExitFunction(ExitIncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should return 0
EXPECT_EQ(c.getElapsedTimeSimulation(), 0.);
EXPECT_EQ(c.getElapsedTimeInitFunctions(), 0.);
EXPECT_EQ(c.getElapsedTimeExitFunctions(), 0.);
// Call simulate to run 1 steps, which should take some length of time
c.SimulationConfig().steps = 1;
c.simulate();
// Afterwards timers should be non 0.
EXPECT_GT(c.getElapsedTimeSimulation(), 0.);
EXPECT_GT(c.getElapsedTimeInitFunctions(), 0.);
EXPECT_GT(c.getElapsedTimeExitFunctions(), 0.);
}
// test the programatically accessible per step simulation time.
TEST(TestCUDASimulation, stepElapsedTime) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounterSlow);
CUDASimulation c(m);
c.setPopulationData(pop);
// Try getting the timer before running simulate, which should be empty.
EXPECT_EQ(c.getElapsedTimeSteps().size(), 0.);
// Or gettng an individual element which is out of boudns should have some kind of error.
// EXPECT_GT(c.getElapsedTimeStep(1), 0.); // @todo
// Call simulate to run 10 steps, which should take some length of time
const unsigned int STEPS = 10u;
c.SimulationConfig().steps = STEPS;
c.simulate();
std::vector<double> stepTimes = c.getElapsedTimeSteps();
EXPECT_EQ(stepTimes.size(), STEPS);
for (unsigned int step = 0; step < STEPS; step++) {
EXPECT_GT(stepTimes.at(step), 0.);
EXPECT_GT(c.getElapsedTimeStep(step), 0.);
}
}
/* const char* rtc_empty_agent_func = R"###(
FLAMEGPU_AGENT_FUNCTION(rtc_test_func, MessageNone, MessageNone) {
return ALIVE;
}
)###"; */
/**
* Test an empty agent function to ensure that the RTC library can successful build and run a minimal example
*/
/* TEST(TestCUDASimulation, RTCElapsedTime) {
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector p(a, static_cast<unsigned int>(AGENT_COUNT));
a.newVariable<unsigned int>("x");
// add RTC agent function
AgentFunctionDescription &rtcFunc = a.newRTCFunction("rtc_test_func", rtc_empty_agent_func);
m.newLayer().addAgentFunction(rtcFunc);
// Init pop
for (unsigned int i = 0u; i < AGENT_COUNT; i++) {
AgentVector::Agent instance = p[i];
instance.setVariable<unsigned int>("x", static_cast<unsigned int>(i));
}
// Setup Model
CUDASimulation s(m);
s.setPopulationData(p);
EXPECT_EQ(s.getElapsedTimeRTCInitialisation(), 0.);
EXPECT_EQ(s.getElapsedTimeSimulation(), 0.);
} */
const char* rtc_empty_agent_func = R"###(
FLAMEGPU_AGENT_FUNCTION(rtc_test_func, flamegpu::MessageNone, flamegpu::MessageNone) {
return flamegpu::ALIVE;
}
)###";
/**
* Test an empty agent function to ensure that the RTC library can successful build and run a minimal example
*/
TEST(TestCUDASimulation, RTCElapsedTime) {
ModelDescription m("m");
AgentDescription &agent = m.newAgent(AGENT_NAME);
// add RTC agent function
AgentFunctionDescription &func = agent.newRTCFunction("rtc_test_func", rtc_empty_agent_func);
func.setAllowAgentDeath(true);
m.newLayer().addAgentFunction(func);
// Init pop
AgentVector p(agent, AGENT_COUNT);
CUDASimulation s(m);
// The RTC initialisation occurs before anything try to interact with the device, i.e. population generation so the timer should be 0 here
EXPECT_EQ(s.getElapsedTimeRTCInitialisation(), 0.);
s.SimulationConfig().steps = 1;
s.setPopulationData(p);
s.simulate();
// Afterwards timers should be non 0.
EXPECT_GT(s.getElapsedTimeRTCInitialisation(), 0.);
}
// test that we can have 2 instances of the same ModelDescription simultaneously
TEST(TestCUDASimulation, MultipleInstances) {
// Define a simple model - doesn't need to do anything other than take some time.
ModelDescription m(MODEL_NAME);
AgentDescription &a = m.newAgent(AGENT_NAME);
AgentVector pop(a, static_cast<unsigned int>(AGENT_COUNT));
m.addStepFunction(IncrementCounter);
CUDASimulation c1(m);
c1.setPopulationData(pop);
// Set population data should trigger initialiseSingletons(), which is what leads to crash if EnvManager has matching name/id
EXPECT_NO_THROW(CUDASimulation c2(m); c2.setPopulationData(pop););
}
FLAMEGPU_AGENT_FUNCTION(CopyID, MessageNone, MessageNone) {
FLAMEGPU->setVariable<id_t>("id_copy", FLAMEGPU->getID());
return ALIVE;
}
TEST(TestCUDASimulation, AgentID_MultipleStatesUniqueIDs) {
// Create agents via AgentVector to two agent states
// Store agent IDs to an agent variable inside model
// Export agents and check their IDs are unique
// Also check that the id's copied during model match those at export
ModelDescription model("test_agentid");
AgentDescription& agent = model.newAgent("agent");
agent.newVariable<id_t>("id_copy");
agent.newState("a");
agent.newState("b");
auto& af_a = agent.newFunction("copy_id", CopyID);
af_a.setInitialState("a");
af_a.setEndState("a");
auto& af_b = agent.newFunction("copy_id2", CopyID);
af_b.setInitialState("b");
af_b.setEndState("b");
auto& layer = model.newLayer();
layer.addAgentFunction(af_a);
layer.addAgentFunction(af_b);
AgentVector pop_in(agent, 100);
CUDASimulation sim(model);
sim.setPopulationData(pop_in, "a");
sim.setPopulationData(pop_in, "b");
sim.step();
AgentVector pop_out_a(agent);
AgentVector pop_out_b(agent);
sim.getPopulationData(pop_out_a, "a");
sim.getPopulationData(pop_out_b, "b");
std::set<id_t> ids_original, ids_copy;
for (auto a : pop_out_a) {
ids_original.insert(a.getID());
ids_copy.insert(a.getVariable<id_t>("id_copy"));
ASSERT_EQ(a.getID(), a.getVariable<id_t>("id_copy"));
}
for (auto a : pop_out_b) {
ids_original.insert(a.getID());
ids_copy.insert(a.getVariable<id_t>("id_copy"));
ASSERT_EQ(a.getID(), a.getVariable<id_t>("id_copy"));
}
ASSERT_EQ(ids_original.size(), pop_out_a.size() + pop_out_b.size());
ASSERT_EQ(ids_copy.size(), pop_out_a.size() + pop_out_b.size());
}
} // namespace test_cuda_simulation
} // namespace tests
} // namespace flamegpu
|
d7ac513e8c5ae78d25ce918b4a6bc4408bde08c2.hip | // !!! This is a file automatically generated by hipify!!!
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <iostream>
#include <cstdlib>
// #include <windows.h>
// #include <unistd.h>
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
// #include <hip/device_functions.h>
#include <hip/hip_runtime_api.h>
using namespace std;
typedef double ld;
typedef long long LL;
// const int max_share_size = 512, chunk_size = 1 << 16;
const int chunk_size = 1<<16;
namespace io_impl
{
inline bool maybe_digit(char c)
{
return c >= '0' && c <= '9';
}
struct io_s
{
private:
FILE *fin;
FILE *fout;
bool negative;
bool ok;
char ch;
inline char next_char()
{
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, fin), p1 == p2) ? EOF : *p1++;
}
public:
void init(FILE *_in, FILE *_out)
{
fin = _in;
fout = _out;
ch = next_char();
ok = true;
}
template <typename T>
bool run(T &_v)
{
_v = 0;
while (!maybe_digit(ch) && ch != EOF)
ch = next_char();
if (ch == EOF)
return ok = false;
do
{
_v = (_v << 1) + (_v << 3) + ch - '0';
} while (maybe_digit(ch = next_char()));
return true;
}
template <typename T>
bool rd(T &_v)
{
negative = false;
_v = 0;
while (!maybe_digit(ch) && ch != EOF)
{
negative = ch == '-';
ch = next_char();
}
if (ch == EOF)
return ok = false;
do
{
_v = (_v * 10) + (ch - '0');
} while (maybe_digit(ch = next_char()));
static double _map[] = {1, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6};
if (ch == '.')
{
int tp = 0;
while (maybe_digit(ch = next_char()))
{
_v = (_v * 10) + (ch - '0');
++tp;
}
_v *= _map[tp];
}
if (negative)
_v = -_v;
return true;
}
};
} // namespace io_impl
using namespace io_impl;
io_s iokb;
namespace output {
const int OutputBufferSize = 1 << 20;
char buffer[OutputBufferSize];
char *s = buffer;
inline void flush() {
fwrite(buffer, 1, s-buffer, stdout);
s = buffer;
fflush(stdout);
}
inline void print(const char ch) {
// putchar(ch); return;
if (s-buffer>OutputBufferSize-2) flush();
*s++ = ch;
}
inline void print(char *str) {
while (*str!=0) print(char(*str++));
}
inline void print(int x) {
// printf("%d", x); return;
char buf[25] = {0}, *p = buf;
// if (x<0) print('-'), x=-x;
// if (x == 0) print('0');
while (x) *(++p) = x%10, x/=10;
while (p != buf) print(char(*(p--)+'0'));
}
inline void print(LL x) {
// printf("%d", x); return;
char buf[25] = {0}, *p = buf;
if (x == 0) print('0');
while (x) *(++p) = x%10, x/=10;
while (p != buf) print(char(*(p--)+'0'));
}
inline void print(ld v) {
// printf("%.2f", x);
// static int stk[70], tp;
// tp = 0;
if (fabs(v) < 0.005)
{
print('0');
return;
}
else
{
LL x = (LL)floor(v * 100 + 0.5);
if (x<0) print('-'), x=-x;
// cerr << "x=" << x << endl; exit(0);
print((LL)(x / 100));
print('.');
print((char)(x / 10 % 10 + '0'));
print((char)(x % 10 + '0'));
}
}
}
struct ios {
inline ios & operator >> (int &x){
iokb.run(x);
return *this;
}
inline ios &operator>>(ld &x)
{
iokb.rd(x);
return *this;
}
} io;
inline void handleCudaError(hipError_t err, string name = "fuck") {
if (err != hipSuccess) {
cerr << name << endl;
cerr << hipGetErrorString(err) << endl;
exit(0);
}
}
ld *d_a, *d_b, *d_c, *h_a, *h_b, *h_c;
int an, am, bn, bm;
int n, m;
void copyMatrix(ld *&src, ld *&dst, int n, int m) {
int size = sizeof(ld) * n * m;
handleCudaError(hipMalloc(&dst, size), "hipMalloc in copyMatrix");
handleCudaError(hipMemcpy(dst, src, size, hipMemcpyHostToDevice), "memcpy in copyMatrix");
}
void copyMatrixAsync(ld *&src, ld *&dst, int n, int m, hipStream_t &stream) {
int size = sizeof(ld) * n * m;
handleCudaError(hipMalloc(&dst, size), "hipMalloc in copyMatrix");
handleCudaError(hipMemcpyAsync(dst, src, size, hipMemcpyHostToDevice, stream), "memcpyasync in copyMatrix");
}
template<typename T>
__global__ void matrixMult(T *d_a, T *d_b, T *d_c, int an, int bm, int am) {
int index = blockDim.x * blockIdx.x + threadIdx.x;
int i = index / bm, j = index % bm;
if (i >= an || j >= bm) return;
register ld sum = 0;
int basea = i * am;
for (int k=0; k<am; ++k)
sum += d_a[basea + k] * d_b[k * bm + j];
d_c[i * bm + j] = sum;
// int index = threadIdx.x;
// if (index < an * bm)
// d_c[index] = 1;
}
void outputMatrix(ld *a, int n, int m) {
// output::print(n); output::print(',');
// output::print(m); output::print('\n');
for (int i=0; i<n; ++i) {
int base = i * m;
output::print(a[base]);
for (int j=1; j<m; ++j) {
output::print(',');
output::print(a[base + j]);
}
output::print('\n');
}
}
void outputinterval(ld *c, int l, int r) {
// printf("%p %d %d, %d %d\n", c, l, r, n, m);
// printf("%.2lf\n", c[1]);
// exit(0);
if (l == 0) {
// output::print('\n');
output::print(c[l++]);
}
for (register int i=l; i<r; ++i) {
if (i % m == 0) output::print('\n');
else output::print(',');
output::print(c[i]);
}
// output::print('\n');
// output::flush();
// exit(0);
}
void outputMatrixAsync(ld *&a, ld *&d_a, int n, int m) {
int st = 0, ed = n * m;
// printf("st=%d ed=%d, a=%p\n", st, ed, a);
hipStream_t stream[2];
int mask = 0;
hipStreamCreate(&stream[0]);
hipStreamCreate(&stream[1]);
int size;
for (; st<ed; st+=size, mask^=1) {
size = min(chunk_size, ed - st);
// printf("st=%d st+size=%d, mask=%d\n", st, st+size, mask);
// handleCudaError(hipMemcpy(a + st, d_a + st, size * sizeof(ld), hipMemcpyDeviceToHost));
handleCudaError(hipMemcpyAsync(a + st, d_a + st, size * sizeof(ld), hipMemcpyDeviceToHost, stream[mask]));
// exit(0);
if (st - chunk_size >= 0) {
printf("%d %d\n",st-chunk_size, st);
handleCudaError(hipStreamSynchronize(stream[mask^1]));
outputinterval(a, st-chunk_size, st);
}
}
st -= size;
// sleep(1000);
handleCudaError(hipStreamSynchronize(stream[0]));
handleCudaError(hipStreamSynchronize(stream[1]));
outputinterval(a, st, ed);
output::print('\n');
}
int main()
{
// #ifndef Weaverzhu
// freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
iokb.init(fopen("input.txt", "r"), fopen("output.txt", "w"));
hipDeviceProp_t prop;
hipGetDeviceProperties(&prop, 0);
cerr << prop.name << endl;
hipStream_t mainstream;
hipStreamCreate(&mainstream);
// #endif
io >> an >> am;
// h_a = (ld*)malloc(sizeof(ld) * an * am);
handleCudaError(hipHostMalloc(&h_a, sizeof(ld) * an * am, hipHostMallocDefault));
for (int i=0; i<an; ++i)
for (int j=0; j<am; ++j)
io >> h_a[i*am + j];
// copyMatrix(d_a, h_a, an, am);
copyMatrixAsync(h_a, d_a, an, am, mainstream);
io >> bn >> bm;
// h_b = (ld*)malloc(sizeof(ld) * bn * bm);
handleCudaError(hipHostMalloc(&h_b, sizeof(ld) * bn * bm, hipHostMallocDefault));
for (int i=0; i<bn; ++i)
for (int j=0; j<bm; ++j)
io >> h_b[i*bm + j];
// copyMatrix(h_a, d_a, an, am);
// copyMatrix(h_b, d_b, bn, bm);
copyMatrixAsync(h_b, d_b, bn, bm, mainstream);
n = an;
m = bm;
int block_size = prop.maxThreadsPerBlock, grids = (n * m + block_size - 1) / block_size;
handleCudaError(hipMalloc(&d_c, sizeof(ld) * n * m), "allocate for h_c");
hipLaunchKernelGGL(( matrixMult), dim3(grids), dim3(block_size), 0, mainstream, d_a, d_b, d_c, an, bm, am);
// h_c = (ld*)malloc(sizeof(ld) * n * m);
handleCudaError(hipHostMalloc(&h_c, sizeof(ld) * n * m,hipHostMallocDefault));
int size = sizeof(ld) * n * m;
// cerr << "before outputmatrixasync" << endl;
// int size = sizeof(ld) * n * m;
handleCudaError(hipStreamSynchronize(mainstream));
// hipStream_t stream;
// hipStreamCreateWithFlags(&stream, hipStreamNonBlocking);
// hipStreamCreate(&stream);
// handleCudaError(hipMemcpyAsync(h_c, d_c, size, hipMemcpyDeviceToHost, stream));
// handleCudaError(hipStreamSynchronize(stream));
// outputinterval(h_c, 0, n * m);
handleCudaError(hipMemcpy(h_c, d_c, size, hipMemcpyDeviceToHost), "memcpy back");
// printf("h_c=%p\n", h_c);
// outputMatrix(h_c, n, m);
outputMatrixAsync(h_c, d_c, n, m);
output::flush();
return 0;
}
| d7ac513e8c5ae78d25ce918b4a6bc4408bde08c2.cu | #include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <iostream>
#include <cstdlib>
// #include <windows.h>
// #include <unistd.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
// #include <device_functions.h>
#include <cuda_runtime_api.h>
using namespace std;
typedef double ld;
typedef long long LL;
// const int max_share_size = 512, chunk_size = 1 << 16;
const int chunk_size = 1<<16;
namespace io_impl
{
inline bool maybe_digit(char c)
{
return c >= '0' && c <= '9';
}
struct io_s
{
private:
FILE *fin;
FILE *fout;
bool negative;
bool ok;
char ch;
inline char next_char()
{
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, fin), p1 == p2) ? EOF : *p1++;
}
public:
void init(FILE *_in, FILE *_out)
{
fin = _in;
fout = _out;
ch = next_char();
ok = true;
}
template <typename T>
bool run(T &_v)
{
_v = 0;
while (!maybe_digit(ch) && ch != EOF)
ch = next_char();
if (ch == EOF)
return ok = false;
do
{
_v = (_v << 1) + (_v << 3) + ch - '0';
} while (maybe_digit(ch = next_char()));
return true;
}
template <typename T>
bool rd(T &_v)
{
negative = false;
_v = 0;
while (!maybe_digit(ch) && ch != EOF)
{
negative = ch == '-';
ch = next_char();
}
if (ch == EOF)
return ok = false;
do
{
_v = (_v * 10) + (ch - '0');
} while (maybe_digit(ch = next_char()));
static double _map[] = {1, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6};
if (ch == '.')
{
int tp = 0;
while (maybe_digit(ch = next_char()))
{
_v = (_v * 10) + (ch - '0');
++tp;
}
_v *= _map[tp];
}
if (negative)
_v = -_v;
return true;
}
};
} // namespace io_impl
using namespace io_impl;
io_s iokb;
namespace output {
const int OutputBufferSize = 1 << 20;
char buffer[OutputBufferSize];
char *s = buffer;
inline void flush() {
fwrite(buffer, 1, s-buffer, stdout);
s = buffer;
fflush(stdout);
}
inline void print(const char ch) {
// putchar(ch); return;
if (s-buffer>OutputBufferSize-2) flush();
*s++ = ch;
}
inline void print(char *str) {
while (*str!=0) print(char(*str++));
}
inline void print(int x) {
// printf("%d", x); return;
char buf[25] = {0}, *p = buf;
// if (x<0) print('-'), x=-x;
// if (x == 0) print('0');
while (x) *(++p) = x%10, x/=10;
while (p != buf) print(char(*(p--)+'0'));
}
inline void print(LL x) {
// printf("%d", x); return;
char buf[25] = {0}, *p = buf;
if (x == 0) print('0');
while (x) *(++p) = x%10, x/=10;
while (p != buf) print(char(*(p--)+'0'));
}
inline void print(ld v) {
// printf("%.2f", x);
// static int stk[70], tp;
// tp = 0;
if (fabs(v) < 0.005)
{
print('0');
return;
}
else
{
LL x = (LL)floor(v * 100 + 0.5);
if (x<0) print('-'), x=-x;
// cerr << "x=" << x << endl; exit(0);
print((LL)(x / 100));
print('.');
print((char)(x / 10 % 10 + '0'));
print((char)(x % 10 + '0'));
}
}
}
struct ios {
inline ios & operator >> (int &x){
iokb.run(x);
return *this;
}
inline ios &operator>>(ld &x)
{
iokb.rd(x);
return *this;
}
} io;
inline void handleCudaError(cudaError_t err, string name = "fuck") {
if (err != cudaSuccess) {
cerr << name << endl;
cerr << cudaGetErrorString(err) << endl;
exit(0);
}
}
ld *d_a, *d_b, *d_c, *h_a, *h_b, *h_c;
int an, am, bn, bm;
int n, m;
void copyMatrix(ld *&src, ld *&dst, int n, int m) {
int size = sizeof(ld) * n * m;
handleCudaError(cudaMalloc(&dst, size), "cudaMalloc in copyMatrix");
handleCudaError(cudaMemcpy(dst, src, size, cudaMemcpyHostToDevice), "memcpy in copyMatrix");
}
void copyMatrixAsync(ld *&src, ld *&dst, int n, int m, cudaStream_t &stream) {
int size = sizeof(ld) * n * m;
handleCudaError(cudaMalloc(&dst, size), "cudaMalloc in copyMatrix");
handleCudaError(cudaMemcpyAsync(dst, src, size, cudaMemcpyHostToDevice, stream), "memcpyasync in copyMatrix");
}
template<typename T>
__global__ void matrixMult(T *d_a, T *d_b, T *d_c, int an, int bm, int am) {
int index = blockDim.x * blockIdx.x + threadIdx.x;
int i = index / bm, j = index % bm;
if (i >= an || j >= bm) return;
register ld sum = 0;
int basea = i * am;
for (int k=0; k<am; ++k)
sum += d_a[basea + k] * d_b[k * bm + j];
d_c[i * bm + j] = sum;
// int index = threadIdx.x;
// if (index < an * bm)
// d_c[index] = 1;
}
void outputMatrix(ld *a, int n, int m) {
// output::print(n); output::print(',');
// output::print(m); output::print('\n');
for (int i=0; i<n; ++i) {
int base = i * m;
output::print(a[base]);
for (int j=1; j<m; ++j) {
output::print(',');
output::print(a[base + j]);
}
output::print('\n');
}
}
void outputinterval(ld *c, int l, int r) {
// printf("%p %d %d, %d %d\n", c, l, r, n, m);
// printf("%.2lf\n", c[1]);
// exit(0);
if (l == 0) {
// output::print('\n');
output::print(c[l++]);
}
for (register int i=l; i<r; ++i) {
if (i % m == 0) output::print('\n');
else output::print(',');
output::print(c[i]);
}
// output::print('\n');
// output::flush();
// exit(0);
}
void outputMatrixAsync(ld *&a, ld *&d_a, int n, int m) {
int st = 0, ed = n * m;
// printf("st=%d ed=%d, a=%p\n", st, ed, a);
cudaStream_t stream[2];
int mask = 0;
cudaStreamCreate(&stream[0]);
cudaStreamCreate(&stream[1]);
int size;
for (; st<ed; st+=size, mask^=1) {
size = min(chunk_size, ed - st);
// printf("st=%d st+size=%d, mask=%d\n", st, st+size, mask);
// handleCudaError(cudaMemcpy(a + st, d_a + st, size * sizeof(ld), cudaMemcpyDeviceToHost));
handleCudaError(cudaMemcpyAsync(a + st, d_a + st, size * sizeof(ld), cudaMemcpyDeviceToHost, stream[mask]));
// exit(0);
if (st - chunk_size >= 0) {
printf("%d %d\n",st-chunk_size, st);
handleCudaError(cudaStreamSynchronize(stream[mask^1]));
outputinterval(a, st-chunk_size, st);
}
}
st -= size;
// sleep(1000);
handleCudaError(cudaStreamSynchronize(stream[0]));
handleCudaError(cudaStreamSynchronize(stream[1]));
outputinterval(a, st, ed);
output::print('\n');
}
int main()
{
// #ifndef Weaverzhu
// freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
iokb.init(fopen("input.txt", "r"), fopen("output.txt", "w"));
cudaDeviceProp prop;
cudaGetDeviceProperties(&prop, 0);
cerr << prop.name << endl;
cudaStream_t mainstream;
cudaStreamCreate(&mainstream);
// #endif
io >> an >> am;
// h_a = (ld*)malloc(sizeof(ld) * an * am);
handleCudaError(cudaHostAlloc(&h_a, sizeof(ld) * an * am, cudaHostAllocDefault));
for (int i=0; i<an; ++i)
for (int j=0; j<am; ++j)
io >> h_a[i*am + j];
// copyMatrix(d_a, h_a, an, am);
copyMatrixAsync(h_a, d_a, an, am, mainstream);
io >> bn >> bm;
// h_b = (ld*)malloc(sizeof(ld) * bn * bm);
handleCudaError(cudaHostAlloc(&h_b, sizeof(ld) * bn * bm, cudaHostAllocDefault));
for (int i=0; i<bn; ++i)
for (int j=0; j<bm; ++j)
io >> h_b[i*bm + j];
// copyMatrix(h_a, d_a, an, am);
// copyMatrix(h_b, d_b, bn, bm);
copyMatrixAsync(h_b, d_b, bn, bm, mainstream);
n = an;
m = bm;
int block_size = prop.maxThreadsPerBlock, grids = (n * m + block_size - 1) / block_size;
handleCudaError(cudaMalloc(&d_c, sizeof(ld) * n * m), "allocate for h_c");
matrixMult<<<grids, block_size, 0, mainstream>>>(d_a, d_b, d_c, an, bm, am);
// h_c = (ld*)malloc(sizeof(ld) * n * m);
handleCudaError(cudaHostAlloc(&h_c, sizeof(ld) * n * m,cudaHostAllocDefault));
int size = sizeof(ld) * n * m;
// cerr << "before outputmatrixasync" << endl;
// int size = sizeof(ld) * n * m;
handleCudaError(cudaStreamSynchronize(mainstream));
// cudaStream_t stream;
// cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking);
// cudaStreamCreate(&stream);
// handleCudaError(cudaMemcpyAsync(h_c, d_c, size, cudaMemcpyDeviceToHost, stream));
// handleCudaError(cudaStreamSynchronize(stream));
// outputinterval(h_c, 0, n * m);
handleCudaError(cudaMemcpy(h_c, d_c, size, cudaMemcpyDeviceToHost), "memcpy back");
// printf("h_c=%p\n", h_c);
// outputMatrix(h_c, n, m);
outputMatrixAsync(h_c, d_c, n, m);
output::flush();
return 0;
}
|
8360e5cb01a2d6d2359584c937028c7046de3729.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
v_coverMacroGPU;
#include "GlobalBarrier.cuh"
__global__ void forEachKernel0 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, int * Deg, bool * Covered, int offset) {
kernelMacro0;
int tId = blockIdx.x * blockDim.x + threadIdx.x + offset;
if (tId >= NumNodes) {
return;
}
t0 = tId;
//printf("TId = %d. Reached Barrier One\n", tId);
if (threadIdx.x == 0) {
printf("BlockId: %d. Reached Value = %d\n", blockIdx.x, gm_threadBlockBarrierReached[blockIdx.x]);
}
softwareBarrier();
if (threadIdx.x == 0) {
printf("Blockid = %d. After Barrier One\n", blockIdx.x);
printf("BlockId: %d. Reached Value = %d\n", blockIdx.x, gm_threadBlockBarrierReached[blockIdx.x]);
}
{
Deg[t0] = G0[t0 + 1] - G0[t0] + G0[t0 + 1] - G0[t0];
Covered[t0] = false;
}
}
__global__ void forEachKernel1 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge) {
kernelMacro1;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumEdges) {
return;
}
t2 = tId;
selectEdge[t2] = false;
}
__global__ void forEachKernel2 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, bool * Covered, int * Deg) {
kernelMacro2;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumNodes) {
return;
}
s = tId;
{
for (int iter = G0[s], t = G1[iter]; iter != G0[s + 1]; iter++, t = G1[iter]) {
if ( !(Covered[s] && Covered[t]))
{
expr = Deg[s] + Deg[t];
atomicMax(&max_val, expr);
if (localExpr <= expr) {
localExpr = expr;
localfrom = s;
localto = t;
locale = iter;
}
}
}
}
//printf("TId = %d. Reached Barrier One\n", tId);
if (threadIdx.x == 0) {
printf("Reached Value = %d\n", gm_threadBlockBarrierReached[blockIdx.x]);
}
softwareBarrier();
if (threadIdx.x == 0) {
printf("Reached Value = %d\n", gm_threadBlockBarrierReached[blockIdx.x]);
}
printf("Tid = %d. After Barrier One\n", tId);
return;
if (localExpr == max_val)
chooseThread = tId;
printf("TId = %d. Reached Barrier Second\n", tId);
softwareBarrier();
if (chooseThread == tId)
{
from = localfrom;
to = localto;
e = locale;
}
}
__global__ void forEachKernel3 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, bool * Covered) {
kernelMacro3;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumNodes) {
return;
}
t3 = tId;
if (Covered[t3])
atomicAdd(&__S4, 1);
}
| 8360e5cb01a2d6d2359584c937028c7046de3729.cu |
v_coverMacroGPU;
#include "GlobalBarrier.cuh"
__global__ void forEachKernel0 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, int * Deg, bool * Covered, int offset) {
kernelMacro0;
int tId = blockIdx.x * blockDim.x + threadIdx.x + offset;
if (tId >= NumNodes) {
return;
}
t0 = tId;
//printf("TId = %d. Reached Barrier One\n", tId);
if (threadIdx.x == 0) {
printf("BlockId: %d. Reached Value = %d\n", blockIdx.x, gm_threadBlockBarrierReached[blockIdx.x]);
}
softwareBarrier();
if (threadIdx.x == 0) {
printf("Blockid = %d. After Barrier One\n", blockIdx.x);
printf("BlockId: %d. Reached Value = %d\n", blockIdx.x, gm_threadBlockBarrierReached[blockIdx.x]);
}
{
Deg[t0] = G0[t0 + 1] - G0[t0] + G0[t0 + 1] - G0[t0];
Covered[t0] = false;
}
}
__global__ void forEachKernel1 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge) {
kernelMacro1;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumEdges) {
return;
}
t2 = tId;
selectEdge[t2] = false;
}
__global__ void forEachKernel2 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, bool * Covered, int * Deg) {
kernelMacro2;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumNodes) {
return;
}
s = tId;
{
for (int iter = G0[s], t = G1[iter]; iter != G0[s + 1]; iter++, t = G1[iter]) {
if ( !(Covered[s] && Covered[t]))
{
expr = Deg[s] + Deg[t];
atomicMax(&max_val, expr);
if (localExpr <= expr) {
localExpr = expr;
localfrom = s;
localto = t;
locale = iter;
}
}
}
}
//printf("TId = %d. Reached Barrier One\n", tId);
if (threadIdx.x == 0) {
printf("Reached Value = %d\n", gm_threadBlockBarrierReached[blockIdx.x]);
}
softwareBarrier();
if (threadIdx.x == 0) {
printf("Reached Value = %d\n", gm_threadBlockBarrierReached[blockIdx.x]);
}
printf("Tid = %d. After Barrier One\n", tId);
return;
if (localExpr == max_val)
chooseThread = tId;
printf("TId = %d. Reached Barrier Second\n", tId);
softwareBarrier();
if (chooseThread == tId)
{
from = localfrom;
to = localto;
e = locale;
}
}
__global__ void forEachKernel3 (int *G0, int *G1, int NumNodes, int NumEdges, bool * selectEdge, bool * Covered) {
kernelMacro3;
int tId = blockIdx.x * blockDim.x + threadIdx.x;
if (tId >= NumNodes) {
return;
}
t3 = tId;
if (Covered[t3])
atomicAdd(&__S4, 1);
}
|
77efc0152242439a6f819e3df631546e3a947e00.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <device_launch_parameters.h>
#include <hip/hip_runtime.h>
#define N 300000
#define NSTREAM 4
// function for checking the CUDA runtime API results.
inline
void checkCuda(hipError_t result)
{
#if defined(DEBUG) || defined(_DEBUG)
if (result != hipSuccess)
{
printf_s("Error: %s : %d", __FILE__, __LINE__);
printf_s("CUDA Runtime Error: %d: %s\n", result, hipGetErrorString(result));
exit(1);
}
#endif
}
__global__ void kernel_1()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_2()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_3()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_4()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
int main(int argc, char **argv)
{
int n_streams = NSTREAM;
int isize = 1;
int iblock = 1;
int bigcase = 0;
// get argument from command line
if (argc > 1) n_streams = atoi(argv[1]);
if (argc > 2) bigcase = atoi(argv[2]);
float elapsed_time;
int dev = 0;
hipDeviceProp_t deviceProp;
checkCuda(hipGetDeviceProperties(&deviceProp, dev));
printf_s("> Using Device %d: %s with num_streams=%d\n", dev, deviceProp.name, n_streams);
checkCuda(hipSetDevice(dev));
// check if device support hyper-q
if (deviceProp.major < 3 || (deviceProp.major == 3 && deviceProp.minor < 5))
{
if (deviceProp.concurrentKernels == 0)
{
printf_s("> GPU does not support concurrent kernel execution (SM 3.5 or higher required)\n");
printf_s("> CUDA kernel runs will be serialized\n");
}
else
{
printf_s("> GPU does not support HyperQ\n");
printf_s("> CUDA kernel runs will have limited concurrency\n");
}
}
printf_s("> Compute Capability %d.%d hardware with %d multi-processors\n", deviceProp.major, deviceProp.minor, deviceProp.multiProcessorCount);
// Allocate and initialize an array of stream handles
hipStream_t *streams = (hipStream_t *)malloc(n_streams * sizeof(hipStream_t));
for (int i = 0; i < n_streams; i++)
{
checkCuda(hipStreamCreate(&(streams[i])));
}
// run kernel with more threads
if (bigcase == 1)
{
iblock = 512;
isize = 1 << 18;
}
// set up execution configuration
dim3 block(iblock);
dim3 grid(isize / iblock);
printf_s("> grid %d block %d\n", grid.x, block.x);
// creat events
hipEvent_t start, stop;
checkCuda(hipEventCreate(&start));
checkCuda(hipEventCreate(&stop));
// record start event
checkCuda(hipEventRecord(start, 0));
// dispatch job with depth first ordering
for (int i = 0; i < n_streams; i++)
{
hipLaunchKernelGGL(( kernel_1) , dim3(grid), dim3(block), 0, streams[i] , );
hipLaunchKernelGGL(( kernel_2) , dim3(grid), dim3(block), 0, streams[i] , );
hipLaunchKernelGGL(( kernel_3) , dim3(grid), dim3(block), 0, streams[i] , );
hipLaunchKernelGGL(( kernel_4) , dim3(grid), dim3(block), 0, streams[i] , );
}
// record stop event
checkCuda(hipEventRecord(stop, 0));
checkCuda(hipEventSynchronize(stop));
// calculate elapsed time
checkCuda(hipEventElapsedTime(&elapsed_time, start, stop));
printf_s("Measured time for parallel execution = %.3fs\n", elapsed_time / 1000.0f);
// release all stream
for (int i = 0; i < n_streams; i++)
{
checkCuda(hipStreamDestroy(streams[i]));
}
free(streams);
// destroy events
checkCuda(hipEventDestroy(start));
checkCuda(hipEventDestroy(stop));
// reset device
checkCuda(hipDeviceReset());
return EXIT_SUCCESS;
} | 77efc0152242439a6f819e3df631546e3a947e00.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <device_launch_parameters.h>
#include <cuda_runtime.h>
#define N 300000
#define NSTREAM 4
// function for checking the CUDA runtime API results.
inline
void checkCuda(cudaError_t result)
{
#if defined(DEBUG) || defined(_DEBUG)
if (result != cudaSuccess)
{
printf_s("Error: %s : %d", __FILE__, __LINE__);
printf_s("CUDA Runtime Error: %d: %s\n", result, cudaGetErrorString(result));
exit(1);
}
#endif
}
__global__ void kernel_1()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_2()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_3()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
__global__ void kernel_4()
{
double sum = 0.0;
for (int i = 0; i < N; i++)
{
sum = sum + tan(0.1) * tan(0.1);
}
}
int main(int argc, char **argv)
{
int n_streams = NSTREAM;
int isize = 1;
int iblock = 1;
int bigcase = 0;
// get argument from command line
if (argc > 1) n_streams = atoi(argv[1]);
if (argc > 2) bigcase = atoi(argv[2]);
float elapsed_time;
int dev = 0;
cudaDeviceProp deviceProp;
checkCuda(cudaGetDeviceProperties(&deviceProp, dev));
printf_s("> Using Device %d: %s with num_streams=%d\n", dev, deviceProp.name, n_streams);
checkCuda(cudaSetDevice(dev));
// check if device support hyper-q
if (deviceProp.major < 3 || (deviceProp.major == 3 && deviceProp.minor < 5))
{
if (deviceProp.concurrentKernels == 0)
{
printf_s("> GPU does not support concurrent kernel execution (SM 3.5 or higher required)\n");
printf_s("> CUDA kernel runs will be serialized\n");
}
else
{
printf_s("> GPU does not support HyperQ\n");
printf_s("> CUDA kernel runs will have limited concurrency\n");
}
}
printf_s("> Compute Capability %d.%d hardware with %d multi-processors\n", deviceProp.major, deviceProp.minor, deviceProp.multiProcessorCount);
// Allocate and initialize an array of stream handles
cudaStream_t *streams = (cudaStream_t *)malloc(n_streams * sizeof(cudaStream_t));
for (int i = 0; i < n_streams; i++)
{
checkCuda(cudaStreamCreate(&(streams[i])));
}
// run kernel with more threads
if (bigcase == 1)
{
iblock = 512;
isize = 1 << 18;
}
// set up execution configuration
dim3 block(iblock);
dim3 grid(isize / iblock);
printf_s("> grid %d block %d\n", grid.x, block.x);
// creat events
cudaEvent_t start, stop;
checkCuda(cudaEventCreate(&start));
checkCuda(cudaEventCreate(&stop));
// record start event
checkCuda(cudaEventRecord(start, 0));
// dispatch job with depth first ordering
for (int i = 0; i < n_streams; i++)
{
kernel_1 <<<grid, block, 0, streams[i] >>>();
kernel_2 <<<grid, block, 0, streams[i] >>>();
kernel_3 <<<grid, block, 0, streams[i] >>>();
kernel_4 <<<grid, block, 0, streams[i] >>>();
}
// record stop event
checkCuda(cudaEventRecord(stop, 0));
checkCuda(cudaEventSynchronize(stop));
// calculate elapsed time
checkCuda(cudaEventElapsedTime(&elapsed_time, start, stop));
printf_s("Measured time for parallel execution = %.3fs\n", elapsed_time / 1000.0f);
// release all stream
for (int i = 0; i < n_streams; i++)
{
checkCuda(cudaStreamDestroy(streams[i]));
}
free(streams);
// destroy events
checkCuda(cudaEventDestroy(start));
checkCuda(cudaEventDestroy(stop));
// reset device
checkCuda(cudaDeviceReset());
return EXIT_SUCCESS;
} |
d6e46d8b7c05a48366f57c6e703701c6c08bb86f.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cublasLt.h>
#include <hip/hip_runtime.h>
#include "sample_cublasLt_LtPlanarComplex.h"
#include "helpers.h"
/// Use cublasLtMatmul to perform tensor-op Cgemm using planar complex memory layout and half-precision inputs.
///
/// For better performance data order transforms should be offline as much as possible.
///
/// transa, transb assumed N; alpha, beta are host pointers, tensor ops allowed, alpha assumed 1, beta assumed 0,
/// stream assumed 0
/// outputs can be either single or half precision, half precision is used in this example
void LtPlanarCgemm(cublasLtHandle_t ltHandle,
int m,
int n,
int k,
const __half *A_real,
const __half *A_imag,
int lda,
const __half *B_real,
const __half *B_imag,
int ldb,
__half *C_real,
__half *C_imag,
int ldc) {
cublasLtMatmulDesc_t matmulDesc = NULL;
cublasLtMatrixLayout_t Adesc = NULL, Bdesc = NULL, Cdesc = NULL;
hipComplex alpha = {1, 0}, beta = {0, 0};
// cublasLt expects offests in bytes
int64_t AplaneOffset = (A_imag - A_real) * sizeof(A_real[0]);
int64_t BplaneOffset = (B_imag - B_real) * sizeof(B_real[0]);
int64_t CplaneOffset = (C_imag - C_real) * sizeof(C_real[0]);
checkCublasStatus(cublasLtMatmulDescCreate(&matmulDesc, CUBLAS_COMPUTE_32F, HIP_C_32F));
// ---------------------------------------------------------------------------------------------
// create descriptors for planar complex matrices
checkCublasStatus(cublasLtMatrixLayoutCreate(&Adesc, HIP_C_16F, m, k, lda));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Adesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &AplaneOffset, sizeof(AplaneOffset)));
checkCublasStatus(cublasLtMatrixLayoutCreate(&Bdesc, HIP_C_16F, k, n, ldb));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Bdesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &BplaneOffset, sizeof(BplaneOffset)));
checkCublasStatus(cublasLtMatrixLayoutCreate(&Cdesc, HIP_C_16F, m, n, ldc));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Cdesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &CplaneOffset, sizeof(CplaneOffset)));
// ---------------------------------------------------------------------------------------------
// Launch computation
checkCublasStatus(cublasLtMatmul(ltHandle,
matmulDesc,
&alpha,
A_real,
Adesc,
B_real,
Bdesc,
&beta,
C_real,
Cdesc,
C_real,
Cdesc,
NULL,
NULL,
0,
0));
// descriptors are no longer needed as all GPU work was already enqueued
if (Cdesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Cdesc));
if (Bdesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Bdesc));
if (Adesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Adesc));
if (matmulDesc) checkCublasStatus(cublasLtMatmulDescDestroy(matmulDesc));
}
| d6e46d8b7c05a48366f57c6e703701c6c08bb86f.cu | /*
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cublasLt.h>
#include <cuda_runtime.h>
#include "sample_cublasLt_LtPlanarComplex.h"
#include "helpers.h"
/// Use cublasLtMatmul to perform tensor-op Cgemm using planar complex memory layout and half-precision inputs.
///
/// For better performance data order transforms should be offline as much as possible.
///
/// transa, transb assumed N; alpha, beta are host pointers, tensor ops allowed, alpha assumed 1, beta assumed 0,
/// stream assumed 0
/// outputs can be either single or half precision, half precision is used in this example
void LtPlanarCgemm(cublasLtHandle_t ltHandle,
int m,
int n,
int k,
const __half *A_real,
const __half *A_imag,
int lda,
const __half *B_real,
const __half *B_imag,
int ldb,
__half *C_real,
__half *C_imag,
int ldc) {
cublasLtMatmulDesc_t matmulDesc = NULL;
cublasLtMatrixLayout_t Adesc = NULL, Bdesc = NULL, Cdesc = NULL;
cuComplex alpha = {1, 0}, beta = {0, 0};
// cublasLt expects offests in bytes
int64_t AplaneOffset = (A_imag - A_real) * sizeof(A_real[0]);
int64_t BplaneOffset = (B_imag - B_real) * sizeof(B_real[0]);
int64_t CplaneOffset = (C_imag - C_real) * sizeof(C_real[0]);
checkCublasStatus(cublasLtMatmulDescCreate(&matmulDesc, CUBLAS_COMPUTE_32F, CUDA_C_32F));
// ---------------------------------------------------------------------------------------------
// create descriptors for planar complex matrices
checkCublasStatus(cublasLtMatrixLayoutCreate(&Adesc, CUDA_C_16F, m, k, lda));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Adesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &AplaneOffset, sizeof(AplaneOffset)));
checkCublasStatus(cublasLtMatrixLayoutCreate(&Bdesc, CUDA_C_16F, k, n, ldb));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Bdesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &BplaneOffset, sizeof(BplaneOffset)));
checkCublasStatus(cublasLtMatrixLayoutCreate(&Cdesc, CUDA_C_16F, m, n, ldc));
checkCublasStatus(cublasLtMatrixLayoutSetAttribute(Cdesc, CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET, &CplaneOffset, sizeof(CplaneOffset)));
// ---------------------------------------------------------------------------------------------
// Launch computation
checkCublasStatus(cublasLtMatmul(ltHandle,
matmulDesc,
&alpha,
A_real,
Adesc,
B_real,
Bdesc,
&beta,
C_real,
Cdesc,
C_real,
Cdesc,
NULL,
NULL,
0,
0));
// descriptors are no longer needed as all GPU work was already enqueued
if (Cdesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Cdesc));
if (Bdesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Bdesc));
if (Adesc) checkCublasStatus(cublasLtMatrixLayoutDestroy(Adesc));
if (matmulDesc) checkCublasStatus(cublasLtMatmulDescDestroy(matmulDesc));
}
|
8b286a58e9ebce262d4393801f75b73cf2460bf4.hip | // !!! This is a file automatically generated by hipify!!!
#include "DAINO.h"
#ifdef GPU
//-------------------------------------------------------------------------------------------------------
// Function : CUAPI_Synchronize
// Description : Block until the device has completed all preceding requested tasks
//-------------------------------------------------------------------------------------------------------
void CUAPI_Synchronize()
{
CUDA_CHECK_ERROR( hipDeviceSynchronize() );
}
#endif // #ifdef GPU
| 8b286a58e9ebce262d4393801f75b73cf2460bf4.cu |
#include "DAINO.h"
#ifdef GPU
//-------------------------------------------------------------------------------------------------------
// Function : CUAPI_Synchronize
// Description : Block until the device has completed all preceding requested tasks
//-------------------------------------------------------------------------------------------------------
void CUAPI_Synchronize()
{
CUDA_CHECK_ERROR( cudaThreadSynchronize() );
}
#endif // #ifdef GPU
|
83d36da943df824a81b7ceb1bff0b328c408ba6f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
* Copyright 2022 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "plugin/device/gpu/kernel/cuda_impl/cuda_ops/fractionalmaxpool3dwithfixedksize_impl.cuh"
#include <limits>
template <typename S>
__device__ inline int64_t get_intervals(S sample, int64_t index, int64_t inputSize, int64_t outputSize,
int64_t poolSize) {
S alpha = static_cast<S>(inputSize - poolSize) / static_cast<S>(outputSize - 1);
if (index == outputSize - 1) {
return inputSize - poolSize;
} else {
return static_cast<int64_t>((index + sample) * alpha) - static_cast<int64_t>(sample * alpha);
}
}
// half
template <>
__device__ inline int64_t get_intervals(half sample, int64_t index, int64_t inputSize, int64_t outputSize,
int64_t poolSize) {
float alpha = static_cast<float>(inputSize - poolSize) / static_cast<float>(outputSize - 1);
if (index == outputSize - 1) {
return inputSize - poolSize;
} else {
return static_cast<int64_t>((index + __half2float(sample)) * alpha) -
static_cast<int64_t>(__half2float(sample) * alpha);
}
}
template <typename T, typename S, typename G>
__global__ void Fractionalmaxpool3dwithfixedksize(const T *input, const S *random_samples, T *output, G *argmax,
int64_t outputD, int64_t outputH, int64_t outputW, int64_t N,
int64_t C, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW,
const int64_t outer_size) {
for (size_t pos = blockIdx.x * blockDim.x + threadIdx.x; pos < outer_size; pos += blockDim.x * gridDim.x) {
const int posn = pos / (C * outputD * outputH * outputW);
const int posc = pos / (outputD * outputH * outputW) % C;
const int post = pos / (outputH * outputW) % outputD;
const int posh = pos / outputW % outputH;
const int posw = pos % outputW;
int64_t poolT = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 0], post, inputD, outputD, kernelsizeD);
int64_t poolH = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 1], posh, inputH, outputH, kernelsizeH);
int64_t poolW = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 2], posw, inputW, outputW, kernelsizeW);
int64_t maxIndex = (((posn * C + posc) * inputD + poolT) * inputH + poolH) * inputW + poolW;
T maxVal = input[maxIndex];
maxIndex = (poolT * inputH + poolH) * inputW + poolW;
for (int64_t t = poolT; t < poolT + kernelsizeD; ++t) {
for (int64_t h = poolH; h < poolH + kernelsizeH; ++h) {
for (int64_t w = poolW; w < poolW + kernelsizeW; ++w) {
int64_t index = (((posn * C + posc) * inputD + t) * inputH + h) * inputW + w;
T val = input[index];
if (val > maxVal) {
maxVal = val;
maxIndex = (t * inputH + h) * inputW + w;
}
}
}
}
argmax[pos] = static_cast<G>(maxIndex);
output[pos] = maxVal;
}
return;
}
template <typename T, typename S, typename G>
void CalFractionalmaxpool3dwithfixedksize(const T *input, const S *random_samples, T *output, G *argmax,
int64_t outputD, int64_t outputH, int64_t outputW, int64_t inputN,
int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW,
const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream) {
hipLaunchKernelGGL(( Fractionalmaxpool3dwithfixedksize), dim3(CUDA_BLOCKS(device_id, outer_size)), dim3(CUDA_THREADS(device_id)), 0, cuda_stream,
input, random_samples, output, argmax, outputD, outputH, outputW, inputN, inputC, inputD, inputH, inputW,
kernelsizeD, kernelsizeH, kernelsizeW, outer_size);
return;
}
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, half, int32_t>(
const half *input, const half *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, float, int64_t>(
const half *input, const float *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, double, int64_t>(
const half *input, const double *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, half, int64_t>(
const half *input, const half *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, float, int32_t>(
const half *input, const float *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, double, int32_t>(
const half *input, const double *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, half, int32_t>(
const float *input, const half *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, float, int64_t>(
const float *input, const float *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, double, int64_t>(
const float *input, const double *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, half, int64_t>(
const float *input, const half *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, float, int32_t>(
const float *input, const float *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, double, int32_t>(
const float *input, const double *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, half, int32_t>(
const double *input, const half *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, float, int64_t>(
const double *input, const float *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, double, int64_t>(
const double *input, const double *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, half, int64_t>(
const double *input, const half *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, float, int32_t>(
const double *input, const float *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, double, int32_t>(
const double *input, const double *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, half, int32_t>(
const int32_t *input, const half *random_samples, int32_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, float, int64_t>(
const int32_t *input, const float *random_samples, int32_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, double, int64_t>(
const int32_t *input, const double *random_samples, int32_t *output, int64_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, half, int64_t>(
const int32_t *input, const half *random_samples, int32_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, float, int32_t>(
const int32_t *input, const float *random_samples, int32_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, double, int32_t>(
const int32_t *input, const double *random_samples, int32_t *output, int32_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, half, int32_t>(
const int64_t *input, const half *random_samples, int64_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, float, int64_t>(
const int64_t *input, const float *random_samples, int64_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, double, int64_t>(
const int64_t *input, const double *random_samples, int64_t *output, int64_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, half, int64_t>(
const int64_t *input, const half *random_samples, int64_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, float, int32_t>(
const int64_t *input, const float *random_samples, int64_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, double, int32_t>(
const int64_t *input, const double *random_samples, int64_t *output, int32_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
hipStream_t cuda_stream);
| 83d36da943df824a81b7ceb1bff0b328c408ba6f.cu | /**
* Copyright 2022 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "plugin/device/gpu/kernel/cuda_impl/cuda_ops/fractionalmaxpool3dwithfixedksize_impl.cuh"
#include <limits>
template <typename S>
__device__ inline int64_t get_intervals(S sample, int64_t index, int64_t inputSize, int64_t outputSize,
int64_t poolSize) {
S alpha = static_cast<S>(inputSize - poolSize) / static_cast<S>(outputSize - 1);
if (index == outputSize - 1) {
return inputSize - poolSize;
} else {
return static_cast<int64_t>((index + sample) * alpha) - static_cast<int64_t>(sample * alpha);
}
}
// half
template <>
__device__ inline int64_t get_intervals(half sample, int64_t index, int64_t inputSize, int64_t outputSize,
int64_t poolSize) {
float alpha = static_cast<float>(inputSize - poolSize) / static_cast<float>(outputSize - 1);
if (index == outputSize - 1) {
return inputSize - poolSize;
} else {
return static_cast<int64_t>((index + __half2float(sample)) * alpha) -
static_cast<int64_t>(__half2float(sample) * alpha);
}
}
template <typename T, typename S, typename G>
__global__ void Fractionalmaxpool3dwithfixedksize(const T *input, const S *random_samples, T *output, G *argmax,
int64_t outputD, int64_t outputH, int64_t outputW, int64_t N,
int64_t C, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW,
const int64_t outer_size) {
for (size_t pos = blockIdx.x * blockDim.x + threadIdx.x; pos < outer_size; pos += blockDim.x * gridDim.x) {
const int posn = pos / (C * outputD * outputH * outputW);
const int posc = pos / (outputD * outputH * outputW) % C;
const int post = pos / (outputH * outputW) % outputD;
const int posh = pos / outputW % outputH;
const int posw = pos % outputW;
int64_t poolT = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 0], post, inputD, outputD, kernelsizeD);
int64_t poolH = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 1], posh, inputH, outputH, kernelsizeH);
int64_t poolW = get_intervals<S>(random_samples[(posn * C + posc) * 3 + 2], posw, inputW, outputW, kernelsizeW);
int64_t maxIndex = (((posn * C + posc) * inputD + poolT) * inputH + poolH) * inputW + poolW;
T maxVal = input[maxIndex];
maxIndex = (poolT * inputH + poolH) * inputW + poolW;
for (int64_t t = poolT; t < poolT + kernelsizeD; ++t) {
for (int64_t h = poolH; h < poolH + kernelsizeH; ++h) {
for (int64_t w = poolW; w < poolW + kernelsizeW; ++w) {
int64_t index = (((posn * C + posc) * inputD + t) * inputH + h) * inputW + w;
T val = input[index];
if (val > maxVal) {
maxVal = val;
maxIndex = (t * inputH + h) * inputW + w;
}
}
}
}
argmax[pos] = static_cast<G>(maxIndex);
output[pos] = maxVal;
}
return;
}
template <typename T, typename S, typename G>
void CalFractionalmaxpool3dwithfixedksize(const T *input, const S *random_samples, T *output, G *argmax,
int64_t outputD, int64_t outputH, int64_t outputW, int64_t inputN,
int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW,
const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream) {
Fractionalmaxpool3dwithfixedksize<<<CUDA_BLOCKS(device_id, outer_size), CUDA_THREADS(device_id), 0, cuda_stream>>>(
input, random_samples, output, argmax, outputD, outputH, outputW, inputN, inputC, inputD, inputH, inputW,
kernelsizeD, kernelsizeH, kernelsizeW, outer_size);
return;
}
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, half, int32_t>(
const half *input, const half *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, float, int64_t>(
const half *input, const float *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, double, int64_t>(
const half *input, const double *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, half, int64_t>(
const half *input, const half *random_samples, half *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, float, int32_t>(
const half *input, const float *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<half, double, int32_t>(
const half *input, const double *random_samples, half *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, half, int32_t>(
const float *input, const half *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, float, int64_t>(
const float *input, const float *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, double, int64_t>(
const float *input, const double *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, half, int64_t>(
const float *input, const half *random_samples, float *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, float, int32_t>(
const float *input, const float *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<float, double, int32_t>(
const float *input, const double *random_samples, float *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, half, int32_t>(
const double *input, const half *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, float, int64_t>(
const double *input, const float *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, double, int64_t>(
const double *input, const double *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, half, int64_t>(
const double *input, const half *random_samples, double *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, float, int32_t>(
const double *input, const float *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<double, double, int32_t>(
const double *input, const double *random_samples, double *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, half, int32_t>(
const int32_t *input, const half *random_samples, int32_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, float, int64_t>(
const int32_t *input, const float *random_samples, int32_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, double, int64_t>(
const int32_t *input, const double *random_samples, int32_t *output, int64_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, half, int64_t>(
const int32_t *input, const half *random_samples, int32_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, float, int32_t>(
const int32_t *input, const float *random_samples, int32_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int32_t, double, int32_t>(
const int32_t *input, const double *random_samples, int32_t *output, int32_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, half, int32_t>(
const int64_t *input, const half *random_samples, int64_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, float, int64_t>(
const int64_t *input, const float *random_samples, int64_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, double, int64_t>(
const int64_t *input, const double *random_samples, int64_t *output, int64_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, half, int64_t>(
const int64_t *input, const half *random_samples, int64_t *output, int64_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, float, int32_t>(
const int64_t *input, const float *random_samples, int64_t *output, int32_t *argmax, int64_t outputD, int64_t outputH,
int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW, int64_t kernelsizeD,
int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
template CUDA_LIB_EXPORT void CalFractionalmaxpool3dwithfixedksize<int64_t, double, int32_t>(
const int64_t *input, const double *random_samples, int64_t *output, int32_t *argmax, int64_t outputD,
int64_t outputH, int64_t outputW, int64_t inputN, int64_t inputC, int64_t inputD, int64_t inputH, int64_t inputW,
int64_t kernelsizeD, int64_t kernelsizeH, int64_t kernelsizeW, const int64_t outer_size, const uint32_t &device_id,
cudaStream_t cuda_stream);
|
3cb9c9eb412095b025ee873b11813630e8115052.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <paddle/fluid/platform/device_context.h>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/operators/sum_op.h"
#include "paddle/fluid/platform/float16.h"
namespace plat = paddle::platform;
namespace paddle {
namespace operators {
#define CEIL_DIV(x, y) (((x) + (y)-1) / (y))
using LoDTensor = framework::LoDTensor;
template <class T>
__global__ void Sum2CUDAKernel(const T *in_0, const T *in_1, T *out,
int64_t N) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
out[id] = in_0[id] + in_1[id];
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumArrayCUDAKernel(T **in, T *out, int64_t N, size_t in_size,
bool read_dst) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
T total(0);
for (int i = 0; i < in_size; ++i) {
const T *tmp = in[i];
if (tmp) {
total += tmp[id];
}
}
if (read_dst) {
out[id] += total;
} else {
out[id] = total;
}
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumSelectedRowsCUDAKernel(T **sr_in_out, int64_t N,
size_t rows) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
for (int i = 0; i < 2 * rows; i += 2) {
const T *tmp = sr_in_out[i];
T *tmp_out = sr_in_out[i + 1];
if (tmp && tmp_out) {
tmp_out[id] += tmp[id];
}
}
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumAlign4CUDAKernel(const T *in_0, const T *in_1, T *out,
int64_t N) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
for (int i = id; i < N / 4; i += blockDim.x * gridDim.x) {
const float4 *in0_4 = reinterpret_cast<float4 *>(in_0);
const float4 *in1_4 = reinterpret_cast<float4 *>(in_1);
float4 tmp;
tmp.x = in0_4[i].x + in1_4[i].x;
tmp.y = in0_4[i].y + in1_4[i].y;
tmp.z = in0_4[i].z + in1_4[i].z;
tmp.w = in0_4[i].w + in1_4[i].w;
reinterpret_cast<float4 *>(out)[i] = tmp;
}
}
template <class T>
void SumToLoDTensor(const framework::ExecutionContext &context) {
auto in_vars = context.MultiInputVar("X");
const size_t in_num = in_vars.size();
constexpr size_t theory_sm_threads = 1024;
auto &dev_ctx =
context.template device_context<platform::CUDADeviceContext>();
auto stream = dev_ctx.stream();
auto max_threads = dev_ctx.GetMaxPhysicalThreadCount();
auto sm_count = max_threads / theory_sm_threads;
size_t tile_size = 0;
dim3 grids;
dim3 blocks;
auto ComputeKernelParameter = [&](size_t length) {
if (length >= max_threads)
tile_size = 1024;
else if (length < max_threads && length > sm_count * 128)
tile_size = 512;
else if (length <= sm_count * 128)
tile_size = 256;
grids = dim3(CEIL_DIV(length, tile_size), 1, 1);
blocks = dim3(tile_size, 1, 1);
};
auto *out = context.Output<LoDTensor>("Out");
bool in_place = in_vars[0] == context.OutputVar("Out");
if (!in_place) {
out->mutable_data<T>(context.GetPlace());
}
// Sum of two tensors
if (in_num == 2 && in_vars[0]->IsType<framework::LoDTensor>() &&
in_vars[1]->IsType<framework::LoDTensor>()) {
auto &in_0 = in_vars[0]->Get<framework::LoDTensor>();
auto &in_1 = in_vars[1]->Get<framework::LoDTensor>();
auto length = in_0.numel();
if (length) {
auto result = EigenVector<T>::Flatten(*out);
auto &place = *dev_ctx.eigen_device();
auto in_0_e = EigenVector<T>::Flatten(in_0);
auto in_1_e = EigenVector<T>::Flatten(in_1);
result.device(place) = in_0_e + in_1_e;
}
return;
}
int start = in_place ? 1 : 0;
if (!in_place) {
math::SetConstant<platform::CUDADeviceContext, T> constant_functor;
constant_functor(
context.template device_context<platform::CUDADeviceContext>(), out,
static_cast<T>(0));
}
std::vector<const T *> in_data;
std::vector<int> selectrow_index;
int64_t lod_length = 0;
bool dst_write = false;
for (int i = start; i < in_num; ++i) {
if (in_vars[i]->IsType<framework::LoDTensor>()) {
auto &in_i = in_vars[i]->Get<framework::LoDTensor>();
in_data.emplace_back(in_i.data<T>());
lod_length = in_i.numel();
} else if (in_vars[i]->IsType<framework::SelectedRows>()) {
selectrow_index.push_back(i);
}
}
// compute select rows seperately.
if (!selectrow_index.empty()) {
std::vector<const T *> sr_in_out_data;
size_t rows = 0;
int64_t length = 0;
for (auto index : selectrow_index) {
auto &sr = in_vars[index]->Get<framework::SelectedRows>();
auto &sr_value = sr.value();
auto &sr_rows = sr.rows();
auto row_numel = sr_value.numel() / sr_rows.size();
auto out_dims = out->dims();
PADDLE_ENFORCE_EQ(sr.height(), out_dims[0]);
PADDLE_ENFORCE_EQ(row_numel, out->numel() / sr.height());
auto *sr_data = sr_value.data<T>();
auto *sr_out_data = out->data<T>();
rows += sr_rows.size();
length = row_numel;
for (size_t i = 0; i < sr_rows.size(); ++i) {
sr_in_out_data.emplace_back(&sr_data[i * row_numel]);
sr_in_out_data.emplace_back(&sr_out_data[sr_rows[i] * row_numel]);
}
}
if (!sr_in_out_data.empty()) {
auto tmp_sr_in_out_array =
platform::DeviceTemporaryAllocator::Instance().Get(dev_ctx).Allocate(
sr_in_out_data.size() * sizeof(T *));
memory::Copy(boost::get<platform::CUDAPlace>(dev_ctx.GetPlace()),
tmp_sr_in_out_array->ptr(), platform::CPUPlace(),
reinterpret_cast<void *>(sr_in_out_data.data()),
sr_in_out_data.size() * sizeof(T *), dev_ctx.stream());
T **sr_in_out_array_data =
reinterpret_cast<T **>(tmp_sr_in_out_array->ptr());
ComputeKernelParameter(length);
hipLaunchKernelGGL(( SumSelectedRowsCUDAKernel<T>), dim3(grids), dim3(blocks), 0, stream,
sr_in_out_array_data, length, rows);
dst_write = true;
}
}
// if indata not null, merge into one kernel call.
if (!in_data.empty()) {
auto tmp_in_array =
platform::DeviceTemporaryAllocator::Instance().Get(dev_ctx).Allocate(
in_data.size() * sizeof(T *));
memory::Copy(boost::get<platform::CUDAPlace>(dev_ctx.GetPlace()),
tmp_in_array->ptr(), platform::CPUPlace(),
reinterpret_cast<void *>(in_data.data()),
in_data.size() * sizeof(T *), dev_ctx.stream());
T **in_array_data = reinterpret_cast<T **>(tmp_in_array->ptr());
ComputeKernelParameter(lod_length);
hipLaunchKernelGGL(( SumArrayCUDAKernel<T>), dim3(grids), dim3(blocks), 0, stream,
in_array_data, out->data<T>(), lod_length, in_data.size(),
dst_write | in_place);
}
}
template <typename T>
class SumKernel<platform::CUDADeviceContext, T>
: public framework::OpKernel<T> {
public:
void Compute(const framework::ExecutionContext &context) const override {
auto out_var = context.OutputVar("Out");
if (out_var->IsType<framework::LoDTensor>()) {
SumToLoDTensor<T>(context);
} else if (out_var->IsType<framework::SelectedRows>()) {
SelectedRowsCompute<platform::CUDADeviceContext, T>(context);
} else if (out_var->IsType<framework::LoDTensorArray>()) {
LodTensorArrayCompute<platform::CUDADeviceContext, T>(context);
} else {
PADDLE_THROW("Unexpected branch, output variable type is %s",
framework::ToTypeName(out_var->Type()));
}
}
};
} // namespace operators
} // namespace paddle
namespace ops = paddle::operators;
namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL(
sum, ops::SumKernel<paddle::platform::CUDADeviceContext, float>,
ops::SumKernel<paddle::platform::CUDADeviceContext, double>,
ops::SumKernel<paddle::platform::CUDADeviceContext, int>,
ops::SumKernel<paddle::platform::CUDADeviceContext, int64_t>,
ops::SumKernel<paddle::platform::CUDADeviceContext, plat::float16>);
| 3cb9c9eb412095b025ee873b11813630e8115052.cu | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <paddle/fluid/platform/device_context.h>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/operators/sum_op.h"
#include "paddle/fluid/platform/float16.h"
namespace plat = paddle::platform;
namespace paddle {
namespace operators {
#define CEIL_DIV(x, y) (((x) + (y)-1) / (y))
using LoDTensor = framework::LoDTensor;
template <class T>
__global__ void Sum2CUDAKernel(const T *in_0, const T *in_1, T *out,
int64_t N) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
out[id] = in_0[id] + in_1[id];
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumArrayCUDAKernel(T **in, T *out, int64_t N, size_t in_size,
bool read_dst) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
T total(0);
for (int i = 0; i < in_size; ++i) {
const T *tmp = in[i];
if (tmp) {
total += tmp[id];
}
}
if (read_dst) {
out[id] += total;
} else {
out[id] = total;
}
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumSelectedRowsCUDAKernel(T **sr_in_out, int64_t N,
size_t rows) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
while (id < N) {
for (int i = 0; i < 2 * rows; i += 2) {
const T *tmp = sr_in_out[i];
T *tmp_out = sr_in_out[i + 1];
if (tmp && tmp_out) {
tmp_out[id] += tmp[id];
}
}
id += blockDim.x * gridDim.x;
}
}
template <class T>
__global__ void SumAlign4CUDAKernel(const T *in_0, const T *in_1, T *out,
int64_t N) {
int id = blockIdx.x * blockDim.x + threadIdx.x;
for (int i = id; i < N / 4; i += blockDim.x * gridDim.x) {
const float4 *in0_4 = reinterpret_cast<float4 *>(in_0);
const float4 *in1_4 = reinterpret_cast<float4 *>(in_1);
float4 tmp;
tmp.x = in0_4[i].x + in1_4[i].x;
tmp.y = in0_4[i].y + in1_4[i].y;
tmp.z = in0_4[i].z + in1_4[i].z;
tmp.w = in0_4[i].w + in1_4[i].w;
reinterpret_cast<float4 *>(out)[i] = tmp;
}
}
template <class T>
void SumToLoDTensor(const framework::ExecutionContext &context) {
auto in_vars = context.MultiInputVar("X");
const size_t in_num = in_vars.size();
constexpr size_t theory_sm_threads = 1024;
auto &dev_ctx =
context.template device_context<platform::CUDADeviceContext>();
auto stream = dev_ctx.stream();
auto max_threads = dev_ctx.GetMaxPhysicalThreadCount();
auto sm_count = max_threads / theory_sm_threads;
size_t tile_size = 0;
dim3 grids;
dim3 blocks;
auto ComputeKernelParameter = [&](size_t length) {
if (length >= max_threads)
tile_size = 1024;
else if (length < max_threads && length > sm_count * 128)
tile_size = 512;
else if (length <= sm_count * 128)
tile_size = 256;
grids = dim3(CEIL_DIV(length, tile_size), 1, 1);
blocks = dim3(tile_size, 1, 1);
};
auto *out = context.Output<LoDTensor>("Out");
bool in_place = in_vars[0] == context.OutputVar("Out");
if (!in_place) {
out->mutable_data<T>(context.GetPlace());
}
// Sum of two tensors
if (in_num == 2 && in_vars[0]->IsType<framework::LoDTensor>() &&
in_vars[1]->IsType<framework::LoDTensor>()) {
auto &in_0 = in_vars[0]->Get<framework::LoDTensor>();
auto &in_1 = in_vars[1]->Get<framework::LoDTensor>();
auto length = in_0.numel();
if (length) {
auto result = EigenVector<T>::Flatten(*out);
auto &place = *dev_ctx.eigen_device();
auto in_0_e = EigenVector<T>::Flatten(in_0);
auto in_1_e = EigenVector<T>::Flatten(in_1);
result.device(place) = in_0_e + in_1_e;
}
return;
}
int start = in_place ? 1 : 0;
if (!in_place) {
math::SetConstant<platform::CUDADeviceContext, T> constant_functor;
constant_functor(
context.template device_context<platform::CUDADeviceContext>(), out,
static_cast<T>(0));
}
std::vector<const T *> in_data;
std::vector<int> selectrow_index;
int64_t lod_length = 0;
bool dst_write = false;
for (int i = start; i < in_num; ++i) {
if (in_vars[i]->IsType<framework::LoDTensor>()) {
auto &in_i = in_vars[i]->Get<framework::LoDTensor>();
in_data.emplace_back(in_i.data<T>());
lod_length = in_i.numel();
} else if (in_vars[i]->IsType<framework::SelectedRows>()) {
selectrow_index.push_back(i);
}
}
// compute select rows seperately.
if (!selectrow_index.empty()) {
std::vector<const T *> sr_in_out_data;
size_t rows = 0;
int64_t length = 0;
for (auto index : selectrow_index) {
auto &sr = in_vars[index]->Get<framework::SelectedRows>();
auto &sr_value = sr.value();
auto &sr_rows = sr.rows();
auto row_numel = sr_value.numel() / sr_rows.size();
auto out_dims = out->dims();
PADDLE_ENFORCE_EQ(sr.height(), out_dims[0]);
PADDLE_ENFORCE_EQ(row_numel, out->numel() / sr.height());
auto *sr_data = sr_value.data<T>();
auto *sr_out_data = out->data<T>();
rows += sr_rows.size();
length = row_numel;
for (size_t i = 0; i < sr_rows.size(); ++i) {
sr_in_out_data.emplace_back(&sr_data[i * row_numel]);
sr_in_out_data.emplace_back(&sr_out_data[sr_rows[i] * row_numel]);
}
}
if (!sr_in_out_data.empty()) {
auto tmp_sr_in_out_array =
platform::DeviceTemporaryAllocator::Instance().Get(dev_ctx).Allocate(
sr_in_out_data.size() * sizeof(T *));
memory::Copy(boost::get<platform::CUDAPlace>(dev_ctx.GetPlace()),
tmp_sr_in_out_array->ptr(), platform::CPUPlace(),
reinterpret_cast<void *>(sr_in_out_data.data()),
sr_in_out_data.size() * sizeof(T *), dev_ctx.stream());
T **sr_in_out_array_data =
reinterpret_cast<T **>(tmp_sr_in_out_array->ptr());
ComputeKernelParameter(length);
SumSelectedRowsCUDAKernel<T><<<grids, blocks, 0, stream>>>(
sr_in_out_array_data, length, rows);
dst_write = true;
}
}
// if indata not null, merge into one kernel call.
if (!in_data.empty()) {
auto tmp_in_array =
platform::DeviceTemporaryAllocator::Instance().Get(dev_ctx).Allocate(
in_data.size() * sizeof(T *));
memory::Copy(boost::get<platform::CUDAPlace>(dev_ctx.GetPlace()),
tmp_in_array->ptr(), platform::CPUPlace(),
reinterpret_cast<void *>(in_data.data()),
in_data.size() * sizeof(T *), dev_ctx.stream());
T **in_array_data = reinterpret_cast<T **>(tmp_in_array->ptr());
ComputeKernelParameter(lod_length);
SumArrayCUDAKernel<T><<<grids, blocks, 0, stream>>>(
in_array_data, out->data<T>(), lod_length, in_data.size(),
dst_write | in_place);
}
}
template <typename T>
class SumKernel<platform::CUDADeviceContext, T>
: public framework::OpKernel<T> {
public:
void Compute(const framework::ExecutionContext &context) const override {
auto out_var = context.OutputVar("Out");
if (out_var->IsType<framework::LoDTensor>()) {
SumToLoDTensor<T>(context);
} else if (out_var->IsType<framework::SelectedRows>()) {
SelectedRowsCompute<platform::CUDADeviceContext, T>(context);
} else if (out_var->IsType<framework::LoDTensorArray>()) {
LodTensorArrayCompute<platform::CUDADeviceContext, T>(context);
} else {
PADDLE_THROW("Unexpected branch, output variable type is %s",
framework::ToTypeName(out_var->Type()));
}
}
};
} // namespace operators
} // namespace paddle
namespace ops = paddle::operators;
namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL(
sum, ops::SumKernel<paddle::platform::CUDADeviceContext, float>,
ops::SumKernel<paddle::platform::CUDADeviceContext, double>,
ops::SumKernel<paddle::platform::CUDADeviceContext, int>,
ops::SumKernel<paddle::platform::CUDADeviceContext, int64_t>,
ops::SumKernel<paddle::platform::CUDADeviceContext, plat::float16>);
|
9a76d1044aeaa55e3643beb9c9a8a569b7c21f74.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "DynamicFusionProcessor.h"
#include "TsdfVolume.h"
#include "WarpField.h"
#include "device_utils.h"
#include <helper_math.h>
namespace dfusion
{
__device__ __forceinline__ int sign(float a)
{
return (a > 0) - (a < 0);
}
template<int knnNotZero>
__device__ __forceinline__ static Tbx::Dual_quat_cu calc_dual_quat_blend_on_voxel(
hipTextureObject_t knnTex, hipTextureObject_t nodesDqVwTex, float2 tsdf_prev,
int x, int y, int z, float3 origion, float voxelSize, float inv_dw_for_fusion2,
float nodeRadius, float marchingCube_weightThre, float& fusion_weight, bool& suc)
{
Tbx::Dual_quat_cu dq_blend(Tbx::Quat_cu(0, 0, 0, 0), Tbx::Quat_cu(0, 0, 0, 0));
fusion_weight = 0.f;
suc = false;
//
float3 p = make_float3(x*voxelSize, y*voxelSize, z*voxelSize) + origion;
KnnIdx knnIdx = read_knn_tex(knnTex, x, y, z);
// the first quat
float4 q0, q1, vw;
int nn3;
//Tbx::Dual_quat_cu dq_avg;
nn3 = knn_k(knnIdx, 0) * 3;
tex1Dfetch(&q0, nodesDqVwTex, nn3 + 0);
tex1Dfetch(&q1, nodesDqVwTex, nn3 + 1);
tex1Dfetch(&vw, nodesDqVwTex, nn3 + 2);
float dist2_0 = norm2(make_float3(vw.x - p.x, vw.y - p.y, vw.z - p.z));
float w_0 = __expf(-dist2_0 * 0.5f * inv_dw_for_fusion2);
// ldp hack here: if the voxel is too far from existed node, we just
// assume its transformation to be identity and fuse it
// this helps to preserve empty place.
//if (w_0 < Tbx::Dual_quat_cu::epsilon())
//{
// suc = true;
// return Tbx::Dual_quat_cu::identity();
//}
dq_blend = pack_dual_quat(q0, q1);
fusion_weight += sqrt(dist2_0);
// the other quats
int k = 1;
#pragma unroll
for (; k < KnnK; k++)
{
if (knn_k(knnIdx, k) >= WarpField::MaxNodeNum)
break;
nn3 = knn_k(knnIdx, k) * 3;
tex1Dfetch(&q0, nodesDqVwTex, nn3 + 0);
tex1Dfetch(&q1, nodesDqVwTex, nn3 + 1);
tex1Dfetch(&vw, nodesDqVwTex, nn3 + 2);
Tbx::Dual_quat_cu dq = pack_dual_quat(q0, q1);
// note: we store 1.f/radius in vw.w
float dist2 = norm2(make_float3(vw.x - p.x, vw.y - p.y, vw.z - p.z));
float w = __expf(-(dist2 - dist2_0) * 0.5f * inv_dw_for_fusion2)
*sign(dq_blend[0] * dq[0] + dq_blend[1] * dq[1] + dq_blend[2] * dq[2] + dq_blend[3] * dq[3]);
dq_blend += dq*w;
fusion_weight += sqrt(dist2);
}
dq_blend *= 1.f/dq_blend.norm();
fusion_weight = float(k) * nodeRadius / fusion_weight;
suc = true;
return dq_blend;
}
template<>
__device__ __forceinline__ static Tbx::Dual_quat_cu calc_dual_quat_blend_on_voxel<0>(
hipTextureObject_t knnTex, hipTextureObject_t nodesDqVwTex, float2 tsdf_prev,
int x, int y, int z, float3 origion, float voxelSize, float inv_dw_for_fusion2,
float nodeRadius, float marchingCube_weightThre, float& fusion_weight, bool& suc)
{
fusion_weight = marchingCube_weightThre + 1e-5f;
suc = true;
return Tbx::Dual_quat_cu::identity();
}
texture<depthtype, hipTextureType2D, hipReadModeElementType> g_depth_tex;
texture<uchar4, hipTextureType2D, hipReadModeNormalizedFloat> g_color_tex;
struct Fusioner
{
PtrStepSz<depthtype> depth;
hipSurfaceObject_t volumeTex;
int3 volume_resolution;
float3 origion;
float nodeRadius;
float voxel_size;
float tranc_dist;
float max_weight;
Intr intr;
float inv_dw_for_fusion2;
float marchingCube_weightThre;
hipTextureObject_t knnTex;
hipTextureObject_t nodesDqVwTex;
Tbx::Mat3 Rv2c;
Tbx::Point3 tv2c;
template<int maxK>
__device__ __forceinline__ void fusion(int x, int y, int z)
{
TsdfData rawTsdf = read_tsdf_surface(volumeTex, x, y, z);
float2 tsdf_weight_prev = unpack_tsdf(rawTsdf);
float fusion_weight = 0;
bool suc = true;
Tbx::Dual_quat_cu dq = calc_dual_quat_blend_on_voxel<maxK>(
knnTex, nodesDqVwTex, tsdf_weight_prev, x, y, z, origion, voxel_size, inv_dw_for_fusion2,
nodeRadius, marchingCube_weightThre, fusion_weight, suc);
if (!suc)
return;
float3 cxyz = convert(Rv2c*(dq.transform(Tbx::Point3(x*voxel_size + origion.x,
y*voxel_size+origion.y, z*voxel_size+origion.z))) + tv2c);
float3 uvd = intr.xyz2uvd(cxyz);
int2 coo = make_int2(__float2int_rn(uvd.x), __float2int_rn(uvd.y));
if (uvd.x >= 0 && uvd.x < depth.cols && uvd.y >= 0 && uvd.y < depth.rows)
{
float depthVal = tex2D(g_depth_tex, coo.x, coo.y)*0.001f;
float3 dxyz = intr.uvd2xyz(make_float3(coo.x, coo.y, depthVal));
float sdf = cxyz.z - dxyz.z;
if (depthVal > KINECT_NEAREST_METER && sdf >= -tranc_dist)
{
float tsdf = min(1.0f, sdf / tranc_dist);
float tsdf_new = (tsdf_weight_prev.x * tsdf_weight_prev.y + fusion_weight * tsdf)
/ (tsdf_weight_prev.y + fusion_weight);
float weight_new = min(tsdf_weight_prev.y + fusion_weight, max_weight);
float4 color = make_float4(0, 0, 0, 0);
#ifdef ENABLE_COLOR_FUSION
float4 newColor = tex2D(g_color_tex, coo.x, coo.y);
if (newColor.x != 0.f && newColor.y != 0.f
&& newColor.z != 0.f)
{
#if 0
color = unpack_tsdf_rgba(rawTsdf) * 0.0f +
tex2D(g_color_tex, coo.x, coo.y) * 1.f;
#else
color = (unpack_tsdf_rgba(rawTsdf) * tsdf_weight_prev.y +
fusion_weight * newColor)
/ (tsdf_weight_prev.y + fusion_weight);
#endif
}
#endif
write_tsdf_surface(volumeTex, pack_tsdf(tsdf_new, weight_new,
color), x, y, z);
}
}
}
};
template<int maxK>
__global__ void tsdf23( Fusioner fs)
{
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
if (x >= fs.volume_resolution.x || y >= fs.volume_resolution.y || z >= fs.volume_resolution.z)
return;
fs.fusion<maxK>(x, y, z);
}// __global__
void DynamicFusionProcessor::fusion()
{
dim3 block(32, 8, 2);
dim3 grid(divUp(m_volume->getResolution().x, block.x),
divUp(m_volume->getResolution().y, block.y),
divUp(m_volume->getResolution().z, block.z));
// bind src to texture
g_depth_tex.filterMode = hipFilterModePoint;
size_t offset;
hipChannelFormatDesc desc = hipCreateChannelDesc<depthtype>();
hipBindTexture2D(&offset, &g_depth_tex, m_depth_input.ptr(), &desc,
m_depth_input.cols(), m_depth_input.rows(), m_depth_input.step());
assert(offset == 0);
#ifdef ENABLE_COLOR_FUSION
g_color_tex.filterMode = hipFilterModePoint;
desc = hipCreateChannelDesc<uchar4>();
hipBindTexture2D(&offset, &g_color_tex, m_color_input.ptr(), &desc,
m_color_input.cols(), m_color_input.rows(), m_color_input.step());
assert(offset == 0);
#endif
Fusioner fs;
fs.depth = m_depth_input;
fs.volumeTex = m_volume->getSurface();
fs.volume_resolution = m_volume->getResolution();
fs.origion = m_volume->getOrigion();
fs.nodeRadius = m_param.warp_radius_search_epsilon;
fs.voxel_size = m_volume->getVoxelSize();
fs.tranc_dist = m_volume->getTsdfTruncDist();
fs.max_weight = m_param.fusion_max_weight;
fs.intr = m_kinect_intr;
fs.inv_dw_for_fusion2 = 1.f / (m_param.warp_param_dw_for_fusion*m_param.warp_param_dw_for_fusion);
fs.marchingCube_weightThre = m_param.marchingCube_min_valied_weight;
fs.knnTex = m_warpField->getKnnFieldTexture();
fs.nodesDqVwTex = m_warpField->getNodesDqVwTexture();
Tbx::Transfo tr = m_warpField->get_rigidTransform();
fs.Rv2c = tr.get_mat3();
fs.tv2c = Tbx::Point3(tr.get_translation());
int maxK = min(KnnK, m_warpField->getNumNodesInLevel(0));
if (maxK == 0)
tsdf23<0> << <grid, block >> >(fs);
else
tsdf23<1> << <grid, block >> >(fs);
hipUnbindTexture(&g_depth_tex);
#ifdef ENABLE_COLOR_FUSION
hipUnbindTexture(&g_color_tex);
#endif
cudaSafeCall(hipGetLastError(), "DynamicFusionProcessor::fusion()");
}
#pragma region --min-filter
const static int BLOCK_DIM_X = 32;
const static int BLOCK_DIM_Y = 16;
const static int MAX_FILTER_RADIUS = 16;
const static int X_HALO_STEPS = (MAX_FILTER_RADIUS + BLOCK_DIM_X - 1) / BLOCK_DIM_X;
const static int Y_HALO_STEPS = (MAX_FILTER_RADIUS + BLOCK_DIM_Y - 1) / BLOCK_DIM_Y;
const static int X_PATCH_PER_BLOCK = 4;
const static int Y_PATCH_PER_BLOCK = 4;
template<int Radius>
__global__ void erose_filter_row(uchar4* __restrict__ dst,
const uchar4* __restrict__ src, int nX, int nY, int pitch)
{
// Data cache: threadIdx.x , threadIdx.y
enum{ SMEM_X_LEN = (X_PATCH_PER_BLOCK + 2 * X_HALO_STEPS) * BLOCK_DIM_X };
enum{ SMEM_Y_LEN = BLOCK_DIM_Y };
__shared__ uchar4 smem[SMEM_Y_LEN][SMEM_X_LEN];
const int baseX = (blockIdx.x * X_PATCH_PER_BLOCK - X_HALO_STEPS) * BLOCK_DIM_X + threadIdx.x;
const int baseY = blockIdx.y * BLOCK_DIM_Y + threadIdx.y;
if (baseY >= nY)
return;
src += baseY * pitch + baseX;
dst += baseY * pitch + baseX;
//Load main data and right halo
#pragma unroll
for (int patchId = 0; patchId < X_HALO_STEPS * 2 + X_PATCH_PER_BLOCK; patchId++)
{
const int pbx = patchId * BLOCK_DIM_X;
smem[threadIdx.y][threadIdx.x + pbx] =
(pbx + baseX < nX && pbx + baseX >= 0) ? src[pbx] : make_uchar4(255,255,255,255);
}
//Compute and store results
__syncthreads();
#pragma unroll
for (int patchId = X_HALO_STEPS; patchId < X_HALO_STEPS + X_PATCH_PER_BLOCK; patchId++)
{
const int pbx = patchId * BLOCK_DIM_X;
if (baseX + pbx < nX)
{
uchar4 s = smem[threadIdx.y][threadIdx.x + pbx];
#pragma unroll
for (int j = -Radius; j <= Radius; j++)
{
if (smem[threadIdx.y][threadIdx.x + pbx + j].x == 0
&& smem[threadIdx.y][threadIdx.x + pbx + j].y == 0
&& smem[threadIdx.y][threadIdx.x + pbx + j].z == 0)
s = make_uchar4(0, 0, 0, 0);
}
dst[pbx] = s;
}
}
}
template<int Radius>
__global__ void erose_filter_col(uchar4* __restrict__ dst,
const uchar4* __restrict__ src, int nX, int nY, int pitch)
{
// Data cache: threadIdx.x , threadIdx.y
enum{ SMEM_X_LEN = BLOCK_DIM_X };
enum{ SMEM_Y_LEN = (Y_PATCH_PER_BLOCK + 2 * Y_HALO_STEPS) * BLOCK_DIM_Y };
__shared__ uchar4 smem[SMEM_Y_LEN][SMEM_X_LEN];
const int baseX = blockIdx.x * BLOCK_DIM_X + threadIdx.x;
const int baseY = (blockIdx.y * Y_PATCH_PER_BLOCK - Y_HALO_STEPS) * BLOCK_DIM_Y + threadIdx.y;
if (baseX >= nX)
return;
src += baseY * pitch + baseX;
dst += baseY * pitch + baseX;
//Load main data and lower halo
#pragma unroll
for (int patchId = 0; patchId < Y_HALO_STEPS * 2 + Y_PATCH_PER_BLOCK; patchId++)
{
const int pby = patchId * BLOCK_DIM_Y;
smem[threadIdx.y + pby][threadIdx.x] =
(pby + baseY < nY && pby + baseY >= 0) ? src[pby * pitch] : make_uchar4(255,255,255,255);
}
//Compute and store results
__syncthreads();
#pragma unroll
for (int patchId = Y_HALO_STEPS; patchId < Y_HALO_STEPS + Y_PATCH_PER_BLOCK; patchId++)
{
const int pby = patchId * BLOCK_DIM_Y;
if (baseY + pby < nY)
{
uchar4 s = smem[threadIdx.y + pby][threadIdx.x];
#pragma unroll
for (int j = -Radius; j <= Radius; j++)
{
if (smem[threadIdx.y + pby + j][threadIdx.x].x == 0
&& smem[threadIdx.y + pby + j][threadIdx.x].y == 0
&& smem[threadIdx.y + pby + j][threadIdx.x].z == 0)
s = make_uchar4(0, 0, 0, 0);
}
dst[pby * pitch] = s;
}
}
}
template<int Radius>
static void erose_filter_row_caller(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch)
{
dim3 block(BLOCK_DIM_X, BLOCK_DIM_Y);
dim3 grid(divUp(nX, block.x*X_PATCH_PER_BLOCK), divUp(nY, block.y), 1);
erose_filter_row<Radius> << <grid, block >> >(dst, src, nX, nY, pitch);
}
template<int Radius>
static void erose_filter_col_caller(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch)
{
dim3 block(BLOCK_DIM_X, BLOCK_DIM_Y, 1);
dim3 grid(divUp(nX, block.x), divUp(nY, block.y*Y_PATCH_PER_BLOCK), 1);
erose_filter_col<Radius> << <grid, block >> >(dst, src, nX, nY, pitch);
}
void erose_filter(uchar4* dst_d, const uchar4* src_d,
int nX, int nY, int pitch,
int radius, int dim)
{
if (src_d == dst_d)
throw std::exception("min_filter: src and dst cannot be the same memory!");
if (radius <= 0 || radius >= MAX_FILTER_RADIUS)
throw std::exception("min_filter: error, non supported kernel size!");
if (dim > 2 || dim < 0)
throw std::exception("min_filter: illegal input dim");
typedef void(*row_caller_t)(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch);
typedef void(*col_caller_t)(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch);
static const row_caller_t row_callers[MAX_FILTER_RADIUS] =
{
0, erose_filter_row_caller<1>, erose_filter_row_caller<2>, erose_filter_row_caller<3>,
erose_filter_row_caller<4>, erose_filter_row_caller<5>, erose_filter_row_caller<6>,
erose_filter_row_caller<7>, erose_filter_row_caller<8>, erose_filter_row_caller<9>,
erose_filter_row_caller<10>, erose_filter_row_caller<11>, erose_filter_row_caller<12>,
erose_filter_row_caller<13>, erose_filter_row_caller<14>, erose_filter_row_caller<15>,
};
static const col_caller_t col_callers[MAX_FILTER_RADIUS] =
{
0, erose_filter_col_caller<1>, erose_filter_col_caller<2>, erose_filter_col_caller<3>,
erose_filter_col_caller<4>, erose_filter_col_caller<5>, erose_filter_col_caller<6>,
erose_filter_col_caller<7>, erose_filter_col_caller<8>, erose_filter_col_caller<9>,
erose_filter_col_caller<10>, erose_filter_col_caller<11>, erose_filter_col_caller<12>,
erose_filter_col_caller<13>, erose_filter_col_caller<14>, erose_filter_col_caller<15>,
};
if (dim == 0)
{
row_callers[radius](dst_d, src_d, nX, nY, pitch);
}
if (dim == 1)
{
col_callers[radius](dst_d, src_d, nX, nY, pitch);
}
cudaSafeCall(hipGetLastError(), "erose_filter");
}
#pragma endregion
void DynamicFusionProcessor::eroseColor(const ColorMap& src, ColorMap& dst, int nRadius)
{
m_color_tmp.create(src.rows(), src.cols());
dst.create(src.rows(), src.cols());
erose_filter((uchar4*)m_color_tmp.ptr(), (const uchar4*)src.ptr(), src.cols(),
src.rows(), src.step() / sizeof(uchar4), nRadius, 0);
erose_filter((uchar4*)dst.ptr(), (const uchar4*)m_color_tmp.ptr(), src.cols(),
src.rows(), src.step() / sizeof(uchar4), nRadius, 0);
}
} | 9a76d1044aeaa55e3643beb9c9a8a569b7c21f74.cu | #include "DynamicFusionProcessor.h"
#include "TsdfVolume.h"
#include "WarpField.h"
#include "device_utils.h"
#include <helper_math.h>
namespace dfusion
{
__device__ __forceinline__ int sign(float a)
{
return (a > 0) - (a < 0);
}
template<int knnNotZero>
__device__ __forceinline__ static Tbx::Dual_quat_cu calc_dual_quat_blend_on_voxel(
cudaTextureObject_t knnTex, cudaTextureObject_t nodesDqVwTex, float2 tsdf_prev,
int x, int y, int z, float3 origion, float voxelSize, float inv_dw_for_fusion2,
float nodeRadius, float marchingCube_weightThre, float& fusion_weight, bool& suc)
{
Tbx::Dual_quat_cu dq_blend(Tbx::Quat_cu(0, 0, 0, 0), Tbx::Quat_cu(0, 0, 0, 0));
fusion_weight = 0.f;
suc = false;
//
float3 p = make_float3(x*voxelSize, y*voxelSize, z*voxelSize) + origion;
KnnIdx knnIdx = read_knn_tex(knnTex, x, y, z);
// the first quat
float4 q0, q1, vw;
int nn3;
//Tbx::Dual_quat_cu dq_avg;
nn3 = knn_k(knnIdx, 0) * 3;
tex1Dfetch(&q0, nodesDqVwTex, nn3 + 0);
tex1Dfetch(&q1, nodesDqVwTex, nn3 + 1);
tex1Dfetch(&vw, nodesDqVwTex, nn3 + 2);
float dist2_0 = norm2(make_float3(vw.x - p.x, vw.y - p.y, vw.z - p.z));
float w_0 = __expf(-dist2_0 * 0.5f * inv_dw_for_fusion2);
// ldp hack here: if the voxel is too far from existed node, we just
// assume its transformation to be identity and fuse it
// this helps to preserve empty place.
//if (w_0 < Tbx::Dual_quat_cu::epsilon())
//{
// suc = true;
// return Tbx::Dual_quat_cu::identity();
//}
dq_blend = pack_dual_quat(q0, q1);
fusion_weight += sqrt(dist2_0);
// the other quats
int k = 1;
#pragma unroll
for (; k < KnnK; k++)
{
if (knn_k(knnIdx, k) >= WarpField::MaxNodeNum)
break;
nn3 = knn_k(knnIdx, k) * 3;
tex1Dfetch(&q0, nodesDqVwTex, nn3 + 0);
tex1Dfetch(&q1, nodesDqVwTex, nn3 + 1);
tex1Dfetch(&vw, nodesDqVwTex, nn3 + 2);
Tbx::Dual_quat_cu dq = pack_dual_quat(q0, q1);
// note: we store 1.f/radius in vw.w
float dist2 = norm2(make_float3(vw.x - p.x, vw.y - p.y, vw.z - p.z));
float w = __expf(-(dist2 - dist2_0) * 0.5f * inv_dw_for_fusion2)
*sign(dq_blend[0] * dq[0] + dq_blend[1] * dq[1] + dq_blend[2] * dq[2] + dq_blend[3] * dq[3]);
dq_blend += dq*w;
fusion_weight += sqrt(dist2);
}
dq_blend *= 1.f/dq_blend.norm();
fusion_weight = float(k) * nodeRadius / fusion_weight;
suc = true;
return dq_blend;
}
template<>
__device__ __forceinline__ static Tbx::Dual_quat_cu calc_dual_quat_blend_on_voxel<0>(
cudaTextureObject_t knnTex, cudaTextureObject_t nodesDqVwTex, float2 tsdf_prev,
int x, int y, int z, float3 origion, float voxelSize, float inv_dw_for_fusion2,
float nodeRadius, float marchingCube_weightThre, float& fusion_weight, bool& suc)
{
fusion_weight = marchingCube_weightThre + 1e-5f;
suc = true;
return Tbx::Dual_quat_cu::identity();
}
texture<depthtype, cudaTextureType2D, cudaReadModeElementType> g_depth_tex;
texture<uchar4, cudaTextureType2D, cudaReadModeNormalizedFloat> g_color_tex;
struct Fusioner
{
PtrStepSz<depthtype> depth;
cudaSurfaceObject_t volumeTex;
int3 volume_resolution;
float3 origion;
float nodeRadius;
float voxel_size;
float tranc_dist;
float max_weight;
Intr intr;
float inv_dw_for_fusion2;
float marchingCube_weightThre;
cudaTextureObject_t knnTex;
cudaTextureObject_t nodesDqVwTex;
Tbx::Mat3 Rv2c;
Tbx::Point3 tv2c;
template<int maxK>
__device__ __forceinline__ void fusion(int x, int y, int z)
{
TsdfData rawTsdf = read_tsdf_surface(volumeTex, x, y, z);
float2 tsdf_weight_prev = unpack_tsdf(rawTsdf);
float fusion_weight = 0;
bool suc = true;
Tbx::Dual_quat_cu dq = calc_dual_quat_blend_on_voxel<maxK>(
knnTex, nodesDqVwTex, tsdf_weight_prev, x, y, z, origion, voxel_size, inv_dw_for_fusion2,
nodeRadius, marchingCube_weightThre, fusion_weight, suc);
if (!suc)
return;
float3 cxyz = convert(Rv2c*(dq.transform(Tbx::Point3(x*voxel_size + origion.x,
y*voxel_size+origion.y, z*voxel_size+origion.z))) + tv2c);
float3 uvd = intr.xyz2uvd(cxyz);
int2 coo = make_int2(__float2int_rn(uvd.x), __float2int_rn(uvd.y));
if (uvd.x >= 0 && uvd.x < depth.cols && uvd.y >= 0 && uvd.y < depth.rows)
{
float depthVal = tex2D(g_depth_tex, coo.x, coo.y)*0.001f;
float3 dxyz = intr.uvd2xyz(make_float3(coo.x, coo.y, depthVal));
float sdf = cxyz.z - dxyz.z;
if (depthVal > KINECT_NEAREST_METER && sdf >= -tranc_dist)
{
float tsdf = min(1.0f, sdf / tranc_dist);
float tsdf_new = (tsdf_weight_prev.x * tsdf_weight_prev.y + fusion_weight * tsdf)
/ (tsdf_weight_prev.y + fusion_weight);
float weight_new = min(tsdf_weight_prev.y + fusion_weight, max_weight);
float4 color = make_float4(0, 0, 0, 0);
#ifdef ENABLE_COLOR_FUSION
float4 newColor = tex2D(g_color_tex, coo.x, coo.y);
if (newColor.x != 0.f && newColor.y != 0.f
&& newColor.z != 0.f)
{
#if 0
color = unpack_tsdf_rgba(rawTsdf) * 0.0f +
tex2D(g_color_tex, coo.x, coo.y) * 1.f;
#else
color = (unpack_tsdf_rgba(rawTsdf) * tsdf_weight_prev.y +
fusion_weight * newColor)
/ (tsdf_weight_prev.y + fusion_weight);
#endif
}
#endif
write_tsdf_surface(volumeTex, pack_tsdf(tsdf_new, weight_new,
color), x, y, z);
}
}
}
};
template<int maxK>
__global__ void tsdf23( Fusioner fs)
{
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
if (x >= fs.volume_resolution.x || y >= fs.volume_resolution.y || z >= fs.volume_resolution.z)
return;
fs.fusion<maxK>(x, y, z);
}// __global__
void DynamicFusionProcessor::fusion()
{
dim3 block(32, 8, 2);
dim3 grid(divUp(m_volume->getResolution().x, block.x),
divUp(m_volume->getResolution().y, block.y),
divUp(m_volume->getResolution().z, block.z));
// bind src to texture
g_depth_tex.filterMode = cudaFilterModePoint;
size_t offset;
cudaChannelFormatDesc desc = cudaCreateChannelDesc<depthtype>();
cudaBindTexture2D(&offset, &g_depth_tex, m_depth_input.ptr(), &desc,
m_depth_input.cols(), m_depth_input.rows(), m_depth_input.step());
assert(offset == 0);
#ifdef ENABLE_COLOR_FUSION
g_color_tex.filterMode = cudaFilterModePoint;
desc = cudaCreateChannelDesc<uchar4>();
cudaBindTexture2D(&offset, &g_color_tex, m_color_input.ptr(), &desc,
m_color_input.cols(), m_color_input.rows(), m_color_input.step());
assert(offset == 0);
#endif
Fusioner fs;
fs.depth = m_depth_input;
fs.volumeTex = m_volume->getSurface();
fs.volume_resolution = m_volume->getResolution();
fs.origion = m_volume->getOrigion();
fs.nodeRadius = m_param.warp_radius_search_epsilon;
fs.voxel_size = m_volume->getVoxelSize();
fs.tranc_dist = m_volume->getTsdfTruncDist();
fs.max_weight = m_param.fusion_max_weight;
fs.intr = m_kinect_intr;
fs.inv_dw_for_fusion2 = 1.f / (m_param.warp_param_dw_for_fusion*m_param.warp_param_dw_for_fusion);
fs.marchingCube_weightThre = m_param.marchingCube_min_valied_weight;
fs.knnTex = m_warpField->getKnnFieldTexture();
fs.nodesDqVwTex = m_warpField->getNodesDqVwTexture();
Tbx::Transfo tr = m_warpField->get_rigidTransform();
fs.Rv2c = tr.get_mat3();
fs.tv2c = Tbx::Point3(tr.get_translation());
int maxK = min(KnnK, m_warpField->getNumNodesInLevel(0));
if (maxK == 0)
tsdf23<0> << <grid, block >> >(fs);
else
tsdf23<1> << <grid, block >> >(fs);
cudaUnbindTexture(&g_depth_tex);
#ifdef ENABLE_COLOR_FUSION
cudaUnbindTexture(&g_color_tex);
#endif
cudaSafeCall(cudaGetLastError(), "DynamicFusionProcessor::fusion()");
}
#pragma region --min-filter
const static int BLOCK_DIM_X = 32;
const static int BLOCK_DIM_Y = 16;
const static int MAX_FILTER_RADIUS = 16;
const static int X_HALO_STEPS = (MAX_FILTER_RADIUS + BLOCK_DIM_X - 1) / BLOCK_DIM_X;
const static int Y_HALO_STEPS = (MAX_FILTER_RADIUS + BLOCK_DIM_Y - 1) / BLOCK_DIM_Y;
const static int X_PATCH_PER_BLOCK = 4;
const static int Y_PATCH_PER_BLOCK = 4;
template<int Radius>
__global__ void erose_filter_row(uchar4* __restrict__ dst,
const uchar4* __restrict__ src, int nX, int nY, int pitch)
{
// Data cache: threadIdx.x , threadIdx.y
enum{ SMEM_X_LEN = (X_PATCH_PER_BLOCK + 2 * X_HALO_STEPS) * BLOCK_DIM_X };
enum{ SMEM_Y_LEN = BLOCK_DIM_Y };
__shared__ uchar4 smem[SMEM_Y_LEN][SMEM_X_LEN];
const int baseX = (blockIdx.x * X_PATCH_PER_BLOCK - X_HALO_STEPS) * BLOCK_DIM_X + threadIdx.x;
const int baseY = blockIdx.y * BLOCK_DIM_Y + threadIdx.y;
if (baseY >= nY)
return;
src += baseY * pitch + baseX;
dst += baseY * pitch + baseX;
//Load main data and right halo
#pragma unroll
for (int patchId = 0; patchId < X_HALO_STEPS * 2 + X_PATCH_PER_BLOCK; patchId++)
{
const int pbx = patchId * BLOCK_DIM_X;
smem[threadIdx.y][threadIdx.x + pbx] =
(pbx + baseX < nX && pbx + baseX >= 0) ? src[pbx] : make_uchar4(255,255,255,255);
}
//Compute and store results
__syncthreads();
#pragma unroll
for (int patchId = X_HALO_STEPS; patchId < X_HALO_STEPS + X_PATCH_PER_BLOCK; patchId++)
{
const int pbx = patchId * BLOCK_DIM_X;
if (baseX + pbx < nX)
{
uchar4 s = smem[threadIdx.y][threadIdx.x + pbx];
#pragma unroll
for (int j = -Radius; j <= Radius; j++)
{
if (smem[threadIdx.y][threadIdx.x + pbx + j].x == 0
&& smem[threadIdx.y][threadIdx.x + pbx + j].y == 0
&& smem[threadIdx.y][threadIdx.x + pbx + j].z == 0)
s = make_uchar4(0, 0, 0, 0);
}
dst[pbx] = s;
}
}
}
template<int Radius>
__global__ void erose_filter_col(uchar4* __restrict__ dst,
const uchar4* __restrict__ src, int nX, int nY, int pitch)
{
// Data cache: threadIdx.x , threadIdx.y
enum{ SMEM_X_LEN = BLOCK_DIM_X };
enum{ SMEM_Y_LEN = (Y_PATCH_PER_BLOCK + 2 * Y_HALO_STEPS) * BLOCK_DIM_Y };
__shared__ uchar4 smem[SMEM_Y_LEN][SMEM_X_LEN];
const int baseX = blockIdx.x * BLOCK_DIM_X + threadIdx.x;
const int baseY = (blockIdx.y * Y_PATCH_PER_BLOCK - Y_HALO_STEPS) * BLOCK_DIM_Y + threadIdx.y;
if (baseX >= nX)
return;
src += baseY * pitch + baseX;
dst += baseY * pitch + baseX;
//Load main data and lower halo
#pragma unroll
for (int patchId = 0; patchId < Y_HALO_STEPS * 2 + Y_PATCH_PER_BLOCK; patchId++)
{
const int pby = patchId * BLOCK_DIM_Y;
smem[threadIdx.y + pby][threadIdx.x] =
(pby + baseY < nY && pby + baseY >= 0) ? src[pby * pitch] : make_uchar4(255,255,255,255);
}
//Compute and store results
__syncthreads();
#pragma unroll
for (int patchId = Y_HALO_STEPS; patchId < Y_HALO_STEPS + Y_PATCH_PER_BLOCK; patchId++)
{
const int pby = patchId * BLOCK_DIM_Y;
if (baseY + pby < nY)
{
uchar4 s = smem[threadIdx.y + pby][threadIdx.x];
#pragma unroll
for (int j = -Radius; j <= Radius; j++)
{
if (smem[threadIdx.y + pby + j][threadIdx.x].x == 0
&& smem[threadIdx.y + pby + j][threadIdx.x].y == 0
&& smem[threadIdx.y + pby + j][threadIdx.x].z == 0)
s = make_uchar4(0, 0, 0, 0);
}
dst[pby * pitch] = s;
}
}
}
template<int Radius>
static void erose_filter_row_caller(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch)
{
dim3 block(BLOCK_DIM_X, BLOCK_DIM_Y);
dim3 grid(divUp(nX, block.x*X_PATCH_PER_BLOCK), divUp(nY, block.y), 1);
erose_filter_row<Radius> << <grid, block >> >(dst, src, nX, nY, pitch);
}
template<int Radius>
static void erose_filter_col_caller(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch)
{
dim3 block(BLOCK_DIM_X, BLOCK_DIM_Y, 1);
dim3 grid(divUp(nX, block.x), divUp(nY, block.y*Y_PATCH_PER_BLOCK), 1);
erose_filter_col<Radius> << <grid, block >> >(dst, src, nX, nY, pitch);
}
void erose_filter(uchar4* dst_d, const uchar4* src_d,
int nX, int nY, int pitch,
int radius, int dim)
{
if (src_d == dst_d)
throw std::exception("min_filter: src and dst cannot be the same memory!");
if (radius <= 0 || radius >= MAX_FILTER_RADIUS)
throw std::exception("min_filter: error, non supported kernel size!");
if (dim > 2 || dim < 0)
throw std::exception("min_filter: illegal input dim");
typedef void(*row_caller_t)(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch);
typedef void(*col_caller_t)(uchar4* dst, const uchar4* src,
int nX, int nY, int pitch);
static const row_caller_t row_callers[MAX_FILTER_RADIUS] =
{
0, erose_filter_row_caller<1>, erose_filter_row_caller<2>, erose_filter_row_caller<3>,
erose_filter_row_caller<4>, erose_filter_row_caller<5>, erose_filter_row_caller<6>,
erose_filter_row_caller<7>, erose_filter_row_caller<8>, erose_filter_row_caller<9>,
erose_filter_row_caller<10>, erose_filter_row_caller<11>, erose_filter_row_caller<12>,
erose_filter_row_caller<13>, erose_filter_row_caller<14>, erose_filter_row_caller<15>,
};
static const col_caller_t col_callers[MAX_FILTER_RADIUS] =
{
0, erose_filter_col_caller<1>, erose_filter_col_caller<2>, erose_filter_col_caller<3>,
erose_filter_col_caller<4>, erose_filter_col_caller<5>, erose_filter_col_caller<6>,
erose_filter_col_caller<7>, erose_filter_col_caller<8>, erose_filter_col_caller<9>,
erose_filter_col_caller<10>, erose_filter_col_caller<11>, erose_filter_col_caller<12>,
erose_filter_col_caller<13>, erose_filter_col_caller<14>, erose_filter_col_caller<15>,
};
if (dim == 0)
{
row_callers[radius](dst_d, src_d, nX, nY, pitch);
}
if (dim == 1)
{
col_callers[radius](dst_d, src_d, nX, nY, pitch);
}
cudaSafeCall(cudaGetLastError(), "erose_filter");
}
#pragma endregion
void DynamicFusionProcessor::eroseColor(const ColorMap& src, ColorMap& dst, int nRadius)
{
m_color_tmp.create(src.rows(), src.cols());
dst.create(src.rows(), src.cols());
erose_filter((uchar4*)m_color_tmp.ptr(), (const uchar4*)src.ptr(), src.cols(),
src.rows(), src.step() / sizeof(uchar4), nRadius, 0);
erose_filter((uchar4*)dst.ptr(), (const uchar4*)m_color_tmp.ptr(), src.cols(),
src.rows(), src.step() / sizeof(uchar4), nRadius, 0);
}
} |
01fe9b4d372f9f8b86b63096abd67572df7e60b4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "globalFun.h"
#include <cstdio>
#include <cmath>
#include <iostream>
int main(int argc, char **argv) {
int dev = 0;
hipDeviceProp_t devProp;
CHECK(hipGetDeviceProperties(&devProp, dev));
std::cout << "GPU device " << dev << ": " << devProp.name << std::endl;
std::cout << "SM" << devProp.multiProcessorCount << std::endl;
std::cout << "" << devProp.sharedMemPerBlock / 1024.0 << " KB" << std::endl;
std::cout << "" << devProp.maxThreadsPerBlock << std::endl;
std::cout << "EM" << devProp.maxThreadsPerMultiProcessor << std::endl;
std::cout << "EM" << devProp.maxThreadsPerMultiProcessor / 32 << std::endl;
return 0;
} | 01fe9b4d372f9f8b86b63096abd67572df7e60b4.cu | #include "cuda_runtime.h"
#include "globalFun.h"
#include <cstdio>
#include <cmath>
#include <iostream>
int main(int argc, char **argv) {
int dev = 0;
cudaDeviceProp devProp;
CHECK(cudaGetDeviceProperties(&devProp, dev));
std::cout << "使用GPU device " << dev << ": " << devProp.name << std::endl;
std::cout << "SM的数量:" << devProp.multiProcessorCount << std::endl;
std::cout << "每个线程块的共享内存大小:" << devProp.sharedMemPerBlock / 1024.0 << " KB" << std::endl;
std::cout << "每个线程块的最大线程数:" << devProp.maxThreadsPerBlock << std::endl;
std::cout << "每个EM的最大线程数:" << devProp.maxThreadsPerMultiProcessor << std::endl;
std::cout << "每个EM的最大线程束数:" << devProp.maxThreadsPerMultiProcessor / 32 << std::endl;
return 0;
} |
35572c8767f68bb4a89df0f375b2e53e2b01e710.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
// System includes
#include <stdio.h>
#include <assert.h>
// CUDA runtime
#include <hip/hip_runtime.h>
// helper functions and utilities to work with CUDA
#include <helper_functions.h>
#include <helper_cuda.h>
#ifndef MAX
#define MAX(a,b) (a > b ? a : b)
#endif
__global__ void increment_kernel(int *g_data,int inc_value){
int idx = blockIdx.x * blockDim.x + threadIdx.x;
g_data[idx] = g_data[idx] + inc_value;
}
bool correct_output(int* data,const int n,const int x){
for(int i = 0;i < n;i++){
if(data[i] !=x){
printf("Error! data[%d] = %d ,ref = %d\n",i,data[i,x]);
return false;
}
}
return true;
}
int main(int argc,char * argv[]){
int devID;
hipDeviceProp_t deviceProps;
printf("[%s] - Starting...\n",argv[0]);
devID = findCudaDevice(argc,(const char **)argv);
checkCudaErrors(hipGetDeviceProperties(&deviceProps,devID));
printf("CUDA device [%s]\n",deviceProps.name);
int n = 16 * 1024 * 1024;
int nbytes = n * sizeof(int);
int value = 26;
//HOST
int * a = 0;
checkCudaErrors(hipHostMalloc((void **)&a,nbytes));
memset(a,0,nbytes);
//CUDA
int *d_a = 0;
checkCudaErrors(hipMalloc((void **)&d_a,nbytes));
checkCudaErrors(hipMemset(d_a,255,nbytes));
//
dim3 threads = dim3(512,1);
dim3 blocks = dim3(n / threads.x,1);
//CUDAHandle
hipEvent_t start,stop;
checkCudaErrors(hipEventCreate(&start));
checkCudaErrors(hipEventCreate(&stop));
StopWatchInterface * timer= NULL;
sdkCreateTimer(&timer);
sdkResetTimer(&timer);
checkCudaErrors(hipDeviceSynchronize());
float gpu_time = 0.0f;
sdkStartTimer(&timer);
hipEventRecord(start,0);
hipMemcpyAsync(d_a,a,nbytes,hipMemcpyHostToDevice,0);
hipLaunchKernelGGL(( increment_kernel) , dim3(blocks),dim3(threads),0,0, d_a,value);
hipMemcpyAsync(a,d_a,nbytes,hipMemcpyDeviceToHost,0);
hipEventRecord(stop,0);
sdkStopTimer(&timer);
unsigned long int counter = 0;
while(hipEventQuery(stop) == hipErrorNotReady){
counter++;
}
checkCudaErrors(hipEventElapsedTime(&gpu_time,start,stop));
//
printf("time spent executing by the GPU %.2f\n",gpu_time);
printf("time spent by CPU in CUDA calls:%.2f\n",sdkGetTimerValue(&timer));
printf("CPU executed %lu iterations while waiting for GPU to finish\n",counter);
bool bFinalResults = correct_output(a, n, value);
// release resources
checkCudaErrors(hipEventDestroy(start));
checkCudaErrors(hipEventDestroy(stop));
checkCudaErrors(hipHostFree(a));
checkCudaErrors(hipFree(d_a));
hipDeviceReset();
} | 35572c8767f68bb4a89df0f375b2e53e2b01e710.cu | /*
* Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
// System includes
#include <stdio.h>
#include <assert.h>
// CUDA runtime
#include <cuda_runtime.h>
// helper functions and utilities to work with CUDA
#include <helper_functions.h>
#include <helper_cuda.h>
#ifndef MAX
#define MAX(a,b) (a > b ? a : b)
#endif
__global__ void increment_kernel(int *g_data,int inc_value){
int idx = blockIdx.x * blockDim.x + threadIdx.x;
g_data[idx] = g_data[idx] + inc_value;
}
bool correct_output(int* data,const int n,const int x){
for(int i = 0;i < n;i++){
if(data[i] !=x){
printf("Error! data[%d] = %d ,ref = %d\n",i,data[i,x]);
return false;
}
}
return true;
}
int main(int argc,char * argv[]){
int devID;
cudaDeviceProp deviceProps;
printf("[%s] - Starting...\n",argv[0]);
devID = findCudaDevice(argc,(const char **)argv);
checkCudaErrors(cudaGetDeviceProperties(&deviceProps,devID));
printf("CUDA device [%s]\n",deviceProps.name);
int n = 16 * 1024 * 1024;
int nbytes = n * sizeof(int);
int value = 26;
//分配HOST内存
int * a = 0;
checkCudaErrors(cudaMallocHost((void **)&a,nbytes));
memset(a,0,nbytes);
//分配CUDA设备内存
int *d_a = 0;
checkCudaErrors(cudaMalloc((void **)&d_a,nbytes));
checkCudaErrors(cudaMemset(d_a,255,nbytes));
//设置内核启动配置
dim3 threads = dim3(512,1);
dim3 blocks = dim3(n / threads.x,1);
//创建CUDA事件Handle
cudaEvent_t start,stop;
checkCudaErrors(cudaEventCreate(&start));
checkCudaErrors(cudaEventCreate(&stop));
StopWatchInterface * timer= NULL;
sdkCreateTimer(&timer);
sdkResetTimer(&timer);
checkCudaErrors(cudaDeviceSynchronize());
float gpu_time = 0.0f;
sdkStartTimer(&timer);
cudaEventRecord(start,0);
cudaMemcpyAsync(d_a,a,nbytes,cudaMemcpyHostToDevice,0);
increment_kernel <<<blocks,threads,0,0>>>(d_a,value);
cudaMemcpyAsync(a,d_a,nbytes,cudaMemcpyDeviceToHost,0);
cudaEventRecord(stop,0);
sdkStopTimer(&timer);
unsigned long int counter = 0;
while(cudaEventQuery(stop) == cudaErrorNotReady){
counter++;
}
checkCudaErrors(cudaEventElapsedTime(&gpu_time,start,stop));
//打印输出时间
printf("time spent executing by the GPU %.2f\n",gpu_time);
printf("time spent by CPU in CUDA calls:%.2f\n",sdkGetTimerValue(&timer));
printf("CPU executed %lu iterations while waiting for GPU to finish\n",counter);
bool bFinalResults = correct_output(a, n, value);
// release resources
checkCudaErrors(cudaEventDestroy(start));
checkCudaErrors(cudaEventDestroy(stop));
checkCudaErrors(cudaFreeHost(a));
checkCudaErrors(cudaFree(d_a));
cudaDeviceReset();
} |
reshape.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright 2020 Stanford, Facebook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "model.h"
#include "cuda_helper.h"
Tensor FFModel::reshape(const Tensor& input,
const std::vector<int>& shape)
{
Reshape* reshape = new Reshape(*this, input, shape);
layers.push_back(reshape);
return reshape->outputs[0];
}
Reshape::Reshape(FFModel& model,
const Tensor& input,
const std::vector<int>& shape)
: Op(model, OP_RESHAPE, "Reshape_", input)
{
numOutputs = 1;
numWeights = 0;
outputs[0].numDim = (int)shape.size();
size_t volume = 1;
for (int i = 0; i < outputs[0].numDim; i++) {
outputs[0].adim[i] = shape[outputs[0].numDim-1-i];
volume *= (size_t)outputs[0].adim[i];
}
assert(volume == inputs[0].get_volume());
}
void Reshape::create_weights(FFModel& model)
{
// Do nothing
}
void Reshape::create_output_and_partition(FFModel& model)
{
switch(inputs[0].numDim) {
case 1:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<1, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<1, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<1, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<1, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<1, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 2:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<2, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<2, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<2, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<2, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<2, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 3:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<3, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<3, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<3, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<3, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<3, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 4:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<4, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<4, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<4, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<4, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<4, 5>(model);
#endif
} else {
assert(false);
}
break;
}
#if MAX_TENSOR_DIM >= 5
case 5:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<5, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<5, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<5, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<5, 4>(model);
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<5, 5>(model);
} else {
assert(false);
}
break;
}
#endif
default:
assert(false);
}
}
template<int IDIM, int ODIM>
void Reshape::create_output_and_partition_with_dim(FFModel& model)
{
task_is = IndexSpaceT<ODIM>(model.get_or_create_task_is(ODIM, name));
Context ctx = model.config.lg_ctx;
Runtime* runtime = model.config.lg_hlr;
Rect<ODIM> part_rect = runtime->get_index_space_domain(ctx, task_is);
int num_tasks = part_rect.volume();
// number batches has to be divisible by partitions
assert(inputs[0].adim[inputs[0].numDim-1] % num_tasks == 0);
// Create output tensor
int output_shape[ODIM];
for (int i = 0; i < ODIM; i++)
output_shape[i] = outputs[0].adim[ODIM-1-i];
outputs[0] = model.create_tensor<ODIM>(output_shape, DT_FLOAT, this);
model.create_data_parallel_partition_with_diff_dims<IDIM, ODIM>(
inputs[0], (IndexSpaceT<ODIM>)task_is, input_lps[0], input_grad_lps[0]);
}
OpMeta* Reshape::init_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
return NULL;
}
void Reshape::init(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_INIT_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
launcher.add_region_requirement(
RegionRequirement(input_lps[0], 0/*projection id*/,
READ_ONLY, EXCLUSIVE, inputs[0].region));
launcher.add_field(0, FID_DATA);
launcher.add_region_requirement(
RegionRequirement(outputs[0].part, 0/*projection id*/,
WRITE_ONLY, EXCLUSIVE, outputs[0].region));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
void Reshape::forward_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
assert(regions.size() == 2);
assert(task->regions.size() == 2);
//const Reshape* reshape = (const Reshape*) task->args;
Domain in_domain = runtime->get_index_space_domain(
ctx, task->regions[0].region.get_index_space());
Domain out_domain = runtime->get_index_space_domain(
ctx, task->regions[1].region.get_index_space());
assert(in_domain.get_volume() == out_domain.get_volume());
const float* in_ptr = helperGetTensorPointerRO<float>(
regions[0], task->regions[0], FID_DATA, ctx, runtime);
float* out_ptr = helperGetTensorPointerWO<float>(
regions[1], task->regions[1], FID_DATA, ctx, runtime);
checkCUDA(hipMemcpyAsync(out_ptr, in_ptr,
in_domain.get_volume() * sizeof(float), hipMemcpyDeviceToDevice));
}
void Reshape::forward(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_FWD_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
launcher.add_region_requirement(
RegionRequirement(input_lps[0], 0/*projection id*/,
READ_ONLY, EXCLUSIVE, inputs[0].region));
launcher.add_field(0, FID_DATA);
launcher.add_region_requirement(
RegionRequirement(outputs[0].part, 0/*projection id*/,
WRITE_ONLY, EXCLUSIVE, outputs[0].region));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
void Reshape::backward_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
float alpha = 1.0f;
assert(regions.size() == 2);
assert(task->regions.size() == 2);
//const Reshape* reshape = (const Reshape*) task->args;
Domain out_grad_domain = runtime->get_index_space_domain(
ctx, task->regions[0].region.get_index_space());
Domain in_grad_domain = runtime->get_index_space_domain(
ctx, task->regions[1].region.get_index_space());
assert(in_grad_domain.get_volume() == out_grad_domain.get_volume());
const float* out_grad_ptr = helperGetTensorPointerRO<float>(
regions[0], task->regions[0], FID_DATA, ctx, runtime);
float* in_grad_ptr = helperGetTensorPointerRW<float>(
regions[1], task->regions[1], FID_DATA, ctx, runtime);
hipLaunchKernelGGL(( apply_add_with_scale), dim3(GET_BLOCKS(in_grad_domain.get_volume())), dim3(CUDA_NUM_THREADS), 0, 0,
in_grad_ptr, out_grad_ptr, in_grad_domain.get_volume(), alpha);
}
void Reshape::backward(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_BWD_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
// regions[0](I): output_grad
launcher.add_region_requirement(
RegionRequirement(outputs[0].part_grad, 0/*projection id*/,
READ_ONLY, EXCLUSIVE, outputs[0].region_grad));
launcher.add_field(0, FID_DATA);
// regions[3](I/O): input0_grad
launcher.add_region_requirement(
RegionRequirement(input_grad_lps[0], 0/*projection id*/,
READ_WRITE, EXCLUSIVE, inputs[0].region_grad));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
bool Reshape::measure_compute_time(Simulator* sim,
const ParallelConfig& pc,
float& forward_time,
float& backward_time)
{
//TODO: implement measure_forward
return false;
}
| reshape.cu | /* Copyright 2020 Stanford, Facebook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "model.h"
#include "cuda_helper.h"
Tensor FFModel::reshape(const Tensor& input,
const std::vector<int>& shape)
{
Reshape* reshape = new Reshape(*this, input, shape);
layers.push_back(reshape);
return reshape->outputs[0];
}
Reshape::Reshape(FFModel& model,
const Tensor& input,
const std::vector<int>& shape)
: Op(model, OP_RESHAPE, "Reshape_", input)
{
numOutputs = 1;
numWeights = 0;
outputs[0].numDim = (int)shape.size();
size_t volume = 1;
for (int i = 0; i < outputs[0].numDim; i++) {
outputs[0].adim[i] = shape[outputs[0].numDim-1-i];
volume *= (size_t)outputs[0].adim[i];
}
assert(volume == inputs[0].get_volume());
}
void Reshape::create_weights(FFModel& model)
{
// Do nothing
}
void Reshape::create_output_and_partition(FFModel& model)
{
switch(inputs[0].numDim) {
case 1:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<1, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<1, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<1, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<1, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<1, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 2:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<2, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<2, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<2, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<2, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<2, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 3:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<3, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<3, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<3, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<3, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<3, 5>(model);
#endif
} else {
assert(false);
}
break;
}
case 4:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<4, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<4, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<4, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<4, 4>(model);
#if MAX_TENSOR_DIM >= 5
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<4, 5>(model);
#endif
} else {
assert(false);
}
break;
}
#if MAX_TENSOR_DIM >= 5
case 5:
{
if (outputs[0].numDim == 1) {
create_output_and_partition_with_dim<5, 1>(model);
} else if (outputs[0].numDim == 2) {
create_output_and_partition_with_dim<5, 2>(model);
} else if (outputs[0].numDim == 3) {
create_output_and_partition_with_dim<5, 3>(model);
} else if (outputs[0].numDim == 4) {
create_output_and_partition_with_dim<5, 4>(model);
} else if (outputs[0].numDim == 5) {
create_output_and_partition_with_dim<5, 5>(model);
} else {
assert(false);
}
break;
}
#endif
default:
assert(false);
}
}
template<int IDIM, int ODIM>
void Reshape::create_output_and_partition_with_dim(FFModel& model)
{
task_is = IndexSpaceT<ODIM>(model.get_or_create_task_is(ODIM, name));
Context ctx = model.config.lg_ctx;
Runtime* runtime = model.config.lg_hlr;
Rect<ODIM> part_rect = runtime->get_index_space_domain(ctx, task_is);
int num_tasks = part_rect.volume();
// number batches has to be divisible by partitions
assert(inputs[0].adim[inputs[0].numDim-1] % num_tasks == 0);
// Create output tensor
int output_shape[ODIM];
for (int i = 0; i < ODIM; i++)
output_shape[i] = outputs[0].adim[ODIM-1-i];
outputs[0] = model.create_tensor<ODIM>(output_shape, DT_FLOAT, this);
model.create_data_parallel_partition_with_diff_dims<IDIM, ODIM>(
inputs[0], (IndexSpaceT<ODIM>)task_is, input_lps[0], input_grad_lps[0]);
}
OpMeta* Reshape::init_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
return NULL;
}
void Reshape::init(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_INIT_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
launcher.add_region_requirement(
RegionRequirement(input_lps[0], 0/*projection id*/,
READ_ONLY, EXCLUSIVE, inputs[0].region));
launcher.add_field(0, FID_DATA);
launcher.add_region_requirement(
RegionRequirement(outputs[0].part, 0/*projection id*/,
WRITE_ONLY, EXCLUSIVE, outputs[0].region));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
void Reshape::forward_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
assert(regions.size() == 2);
assert(task->regions.size() == 2);
//const Reshape* reshape = (const Reshape*) task->args;
Domain in_domain = runtime->get_index_space_domain(
ctx, task->regions[0].region.get_index_space());
Domain out_domain = runtime->get_index_space_domain(
ctx, task->regions[1].region.get_index_space());
assert(in_domain.get_volume() == out_domain.get_volume());
const float* in_ptr = helperGetTensorPointerRO<float>(
regions[0], task->regions[0], FID_DATA, ctx, runtime);
float* out_ptr = helperGetTensorPointerWO<float>(
regions[1], task->regions[1], FID_DATA, ctx, runtime);
checkCUDA(cudaMemcpyAsync(out_ptr, in_ptr,
in_domain.get_volume() * sizeof(float), cudaMemcpyDeviceToDevice));
}
void Reshape::forward(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_FWD_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
launcher.add_region_requirement(
RegionRequirement(input_lps[0], 0/*projection id*/,
READ_ONLY, EXCLUSIVE, inputs[0].region));
launcher.add_field(0, FID_DATA);
launcher.add_region_requirement(
RegionRequirement(outputs[0].part, 0/*projection id*/,
WRITE_ONLY, EXCLUSIVE, outputs[0].region));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
void Reshape::backward_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
float alpha = 1.0f;
assert(regions.size() == 2);
assert(task->regions.size() == 2);
//const Reshape* reshape = (const Reshape*) task->args;
Domain out_grad_domain = runtime->get_index_space_domain(
ctx, task->regions[0].region.get_index_space());
Domain in_grad_domain = runtime->get_index_space_domain(
ctx, task->regions[1].region.get_index_space());
assert(in_grad_domain.get_volume() == out_grad_domain.get_volume());
const float* out_grad_ptr = helperGetTensorPointerRO<float>(
regions[0], task->regions[0], FID_DATA, ctx, runtime);
float* in_grad_ptr = helperGetTensorPointerRW<float>(
regions[1], task->regions[1], FID_DATA, ctx, runtime);
apply_add_with_scale<<<GET_BLOCKS(in_grad_domain.get_volume()), CUDA_NUM_THREADS>>>(
in_grad_ptr, out_grad_ptr, in_grad_domain.get_volume(), alpha);
}
void Reshape::backward(const FFModel& ff)
{
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime* runtime = ff.config.lg_hlr;
IndexLauncher launcher(RESHAPE_BWD_TASK_ID, task_is,
TaskArgument(this, sizeof(Reshape)), argmap,
Predicate::TRUE_PRED, false/*must*/, 0/*mapper_id*/,
FFConfig::get_hash_id(std::string(name)));
// regions[0](I): output_grad
launcher.add_region_requirement(
RegionRequirement(outputs[0].part_grad, 0/*projection id*/,
READ_ONLY, EXCLUSIVE, outputs[0].region_grad));
launcher.add_field(0, FID_DATA);
// regions[3](I/O): input0_grad
launcher.add_region_requirement(
RegionRequirement(input_grad_lps[0], 0/*projection id*/,
READ_WRITE, EXCLUSIVE, inputs[0].region_grad));
launcher.add_field(1, FID_DATA);
runtime->execute_index_space(ctx, launcher);
}
bool Reshape::measure_compute_time(Simulator* sim,
const ParallelConfig& pc,
float& forward_time,
float& backward_time)
{
//TODO: implement measure_forward
return false;
}
|
7670ec982dd00e34c89654d784c8d5ba011f5e3b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <cstdlib>
#include <stdio.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define BLOCK_SIZE 32
#define N 2048
#define CUDA_CHECK_ERROR(err) \
if (err != hipSuccess) { \
printf("Cuda error: %s\n", hipGetErrorString(err)); \
printf("Error in file: %s, line: %i\n", __FILE__, __LINE__); \
} \
/**
* GPU
* @params: matrix A, matrix B, result matrix C
*/
__global__ void matMult(float* A, float* B, float* C){
//
int bx = blockIdx.x;
int by = blockIdx.y;
//
int tx = threadIdx.x;
int ty = threadIdx.y;
float sum = 0.0;
// A[i][0]
int ia = N * BLOCK_SIZE * by + N * ty;
// B[0][j]
int ib = BLOCK_SIZE * bx + tx;
for (int k = 0; k < N; k++) {
sum += A[ia + k] * B[ib + k * N];
}
// C[i][j]
int ic = N * BLOCK_SIZE * by + BLOCK_SIZE * bx;
//
C[ic + N * ty + tx] = sum;
}
/**
* CPU
* @params: matrix A, matrix B, result matrix C
*/
void cpu_ikj(float* A, float* B, float* C) {
for (int i = 0; i < N; i++) {
for (int k = 0; k < N; k++) {
for (int j = 0; j < N; j++) {
C[i * N + j] += A[i * N + k] * B[k * N + j];
}
}
}
}
/**
*
* @params: matrix C
*/
void printMatrix(float* C) {
for ( int i = 0; i < N; i++){
for ( int j = 0; j < N; j++){
printf("%.3f ", C[i * N + j]);
}
std::cout << std::endl;
}
std::cout << std::endl;
}
int main() {
setlocale(LC_ALL, "RUS");
//
float *A = (float*) malloc(N * N *sizeof(float));
float *B = (float*) malloc(N * N* sizeof(float));
float *C_GPU = (float*) malloc(N * N *sizeof(float));
float *C_CPU = (float*) malloc(N * N* sizeof(float));
//
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++) {
A[i + j * N] = i + j;
B[i + j * N] = i + j;
}
//printMatrix(A);
//printMatrix(B);
//
dim3 dimGrid(N / BLOCK_SIZE, N / BLOCK_SIZE);//
dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);//
hipEvent_t start;
hipEvent_t stop;
// event' GPU
CUDA_CHECK_ERROR(hipEventCreate(&start));
CUDA_CHECK_ERROR(hipEventCreate(&stop));
float* adev, *bdev, *cdev;
//
CUDA_CHECK_ERROR(hipMalloc((void**)&adev, N * N * sizeof(float *)));
CUDA_CHECK_ERROR(hipMalloc((void**)&bdev, N * N * sizeof(float *)));
CUDA_CHECK_ERROR(hipMalloc((void**)&cdev, N * N * sizeof(float *)));
//
CUDA_CHECK_ERROR(hipMemcpy(adev, A, N * N * sizeof(float *), hipMemcpyHostToDevice));
CUDA_CHECK_ERROR(hipMemcpy(bdev, B, N * N * sizeof(float *), hipMemcpyHostToDevice));
// GPU
hipEventRecord(start, 0);
matMult << < dimGrid, dimBlock >> > (adev, bdev , cdev);
//
hipEventRecord(stop, 0);
float timeGPU = 0;
//
hipEventSynchronize(stop);
// GPU
hipEventElapsedTime(&timeGPU, start, stop);
std::cout << " " << N << "x" << N << " GPU = " << timeGPU << " " << std::endl;
//
CUDA_CHECK_ERROR(hipMemcpy(C_GPU, cdev, N * N * sizeof(float *), hipMemcpyDeviceToHost));
//printMatrix(C_GPU);
//
CUDA_CHECK_ERROR(hipEventDestroy(start));
CUDA_CHECK_ERROR(hipEventDestroy(stop));
CUDA_CHECK_ERROR(hipFree(adev));
CUDA_CHECK_ERROR(hipFree(bdev));
CUDA_CHECK_ERROR(hipFree(cdev));
double start_time = clock();
cpu_ikj(A, B, C_CPU);
double end_time = clock();
std::cout << " " << N << "x" << N << " CPU = " << ((end_time - start_time)) *1000 / CLOCKS_PER_SEC << " " << std::endl;
//
delete A;
delete B;
delete C_GPU;
delete C_CPU;
system("pause");
return 0;
}
| 7670ec982dd00e34c89654d784c8d5ba011f5e3b.cu |
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <cstdlib>
#include <stdio.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define BLOCK_SIZE 32
#define N 2048
#define CUDA_CHECK_ERROR(err) \
if (err != cudaSuccess) { \
printf("Cuda error: %s\n", cudaGetErrorString(err)); \
printf("Error in file: %s, line: %i\n", __FILE__, __LINE__); \
} \
/**
* Метод уножения матриц на GPU
* @params: matrix A, matrix B, result matrix C
*/
__global__ void matMult(float* A, float* B, float* C){
// Индекс блока
int bx = blockIdx.x;
int by = blockIdx.y;
// Индекс нити
int tx = threadIdx.x;
int ty = threadIdx.y;
float sum = 0.0;
//Индекс A[i][0]
int ia = N * BLOCK_SIZE * by + N * ty;
// Индекс B[0][j]
int ib = BLOCK_SIZE * bx + tx;
for (int k = 0; k < N; k++) {
sum += A[ia + k] * B[ib + k * N];
}
// Индекс C[i][j]
int ic = N * BLOCK_SIZE * by + BLOCK_SIZE * bx;
//Результирующая матрица
C[ic + N * ty + tx] = sum;
}
/**
* Метод уножения матриц на CPU
* @params: matrix A, matrix B, result matrix C
*/
void cpu_ikj(float* A, float* B, float* C) {
for (int i = 0; i < N; i++) {
for (int k = 0; k < N; k++) {
for (int j = 0; j < N; j++) {
C[i * N + j] += A[i * N + k] * B[k * N + j];
}
}
}
}
/**
* Метод вывода матриц
* @params: matrix C
*/
void printMatrix(float* C) {
for ( int i = 0; i < N; i++){
for ( int j = 0; j < N; j++){
printf("%.3f ", C[i * N + j]);
}
std::cout << std::endl;
}
std::cout << std::endl;
}
int main() {
setlocale(LC_ALL, "RUS");
//Выделяем память под матрицы на хосте
float *A = (float*) malloc(N * N *sizeof(float));
float *B = (float*) malloc(N * N* sizeof(float));
float *C_GPU = (float*) malloc(N * N *sizeof(float));
float *C_CPU = (float*) malloc(N * N* sizeof(float));
// Заполняем матрицы
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++) {
A[i + j * N] = i + j;
B[i + j * N] = i + j;
}
//printMatrix(A);
//printMatrix(B);
//Конфигурация запуска ядра
dim3 dimGrid(N / BLOCK_SIZE, N / BLOCK_SIZE);//Размер используемого грида
dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);//Размер используемого блока
cudaEvent_t start;
cudaEvent_t stop;
//Создаем event'ы для синхронизации и замера времени работы GPU
CUDA_CHECK_ERROR(cudaEventCreate(&start));
CUDA_CHECK_ERROR(cudaEventCreate(&stop));
float* adev, *bdev, *cdev;
//Выделяем глобальную память для храния данных на девайсе
CUDA_CHECK_ERROR(cudaMalloc((void**)&adev, N * N * sizeof(float *)));
CUDA_CHECK_ERROR(cudaMalloc((void**)&bdev, N * N * sizeof(float *)));
CUDA_CHECK_ERROR(cudaMalloc((void**)&cdev, N * N * sizeof(float *)));
//Копируем исходные матрицы с хоста на девайс
CUDA_CHECK_ERROR(cudaMemcpy(adev, A, N * N * sizeof(float *), cudaMemcpyHostToDevice));
CUDA_CHECK_ERROR(cudaMemcpy(bdev, B, N * N * sizeof(float *), cudaMemcpyHostToDevice));
//Отмечаем старт расчетов на GPU
cudaEventRecord(start, 0);
matMult << < dimGrid, dimBlock >> > (adev, bdev , cdev);
//Отмечаем окончание расчета
cudaEventRecord(stop, 0);
float timeGPU = 0;
//Синхронизируемя с моментом окончания расчетов
cudaEventSynchronize(stop);
//Рассчитываем время работы GPU
cudaEventElapsedTime(&timeGPU, start, stop);
std::cout << "Время умножения матриц размером " << N << "x" << N << " на GPU = " << timeGPU << " мсек" << std::endl;
//Копируем результат с девайса на хост
CUDA_CHECK_ERROR(cudaMemcpy(C_GPU, cdev, N * N * sizeof(float *), cudaMemcpyDeviceToHost));
//printMatrix(C_GPU);
//Чистим ресурсы на видеокарте
CUDA_CHECK_ERROR(cudaEventDestroy(start));
CUDA_CHECK_ERROR(cudaEventDestroy(stop));
CUDA_CHECK_ERROR(cudaFree(adev));
CUDA_CHECK_ERROR(cudaFree(bdev));
CUDA_CHECK_ERROR(cudaFree(cdev));
double start_time = clock();
cpu_ikj(A, B, C_CPU);
double end_time = clock();
std::cout << "Время умножения матриц размером " << N << "x" << N << " на CPU = " << ((end_time - start_time)) *1000 / CLOCKS_PER_SEC << " мсек" << std::endl;
//Чистим память на хосте
delete A;
delete B;
delete C_GPU;
delete C_CPU;
system("pause");
return 0;
}
|
03173ef5b091c3d598c7e59fe0ea3e9454f68e7a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
//
// @author [email protected]
// @author Yurii Shyrma ([email protected])
//
#include <helpers/ConstantTadHelper.h>
#include <helpers/PointersManager.h>
#include <ops/declarable/helpers/adjust_hue.h>
#include <ops/declarable/helpers/adjust_saturation.h>
#include "execution/cuda/LaunchDims.h"
namespace sd {
namespace ops {
namespace helpers {
///////////////////////////////////////////////////////////////////
template <typename T>
static void SD_KERNEL adjustSaturationCuda(const void* vx, const sd::LongType* xShapeInfo,
const sd::LongType* xTadOffsets, void* vz, const sd::LongType* zShapeInfo,
const sd::LongType* zTadOffsets, const sd::LongType numOfTads,
const T factor, const sd::LongType dimC) {
const T* x = reinterpret_cast<const T*>(vx);
T* z = reinterpret_cast<T*>(vz);
__shared__ sd::LongType rank;
__shared__ sd::LongType xDimCstride, zDimCstride;
if (threadIdx.x == 0) {
rank = shape::rank(xShapeInfo);
xDimCstride = shape::stride(xShapeInfo)[dimC];
zDimCstride = shape::stride(zShapeInfo)[dimC];
}
__syncthreads();
const auto tid = blockIdx.x * blockDim.x + threadIdx.x;
for (sd::LongType i = tid; i < numOfTads; i += gridDim.x * blockDim.x) {
const T* xTad = x + xTadOffsets[i];
T* zTad = z + zTadOffsets[i];
T h, s, v;
rgbToHsv<T>(xTad[0], xTad[xDimCstride], xTad[2 * xDimCstride], h, s, v);
s *= factor;
if (s > 1.f)
s = 1.f;
else if (s < 0.f)
s = 0.f;
hsvToRgb<T>(h, s, v, zTad[0], zTad[zDimCstride], zTad[2 * zDimCstride]);
}
}
///////////////////////////////////////////////////////////////////
template <typename T>
static SD_HOST void adjustSaturationCudaLauncher(const int blocksPerGrid, const int threadsPerBlock,
const hipStream_t* stream, const void* vx,
const sd::LongType* xShapeInfo, const sd::LongType* xTadOffsets,
void* vz, const sd::LongType* zShapeInfo,
const sd::LongType* zTadOffsets, const sd::LongType numOfTads,
const NDArray* factorScalarArr, const sd::LongType dimC) {
hipLaunchKernelGGL(( adjustSaturationCuda<T>), dim3(blocksPerGrid), dim3(threadsPerBlock), 256, *stream,
vx, xShapeInfo, xTadOffsets, vz, zShapeInfo, zTadOffsets, numOfTads, factorScalarArr->e<T>(0), dimC);
}
////////////////////////////////////////////////////////////////////////
void adjustSaturation(sd::LaunchContext* context, const NDArray* input, const NDArray* factorScalarArr, NDArray* output,
const sd::LongType dimC) {
auto packX = sd::ConstantTadHelper::getInstance().tadForDimensions(input->shapeInfo(), {dimC});
auto packZ = sd::ConstantTadHelper::getInstance().tadForDimensions(output->shapeInfo(), {dimC});
const sd::LongType numOfTads = packX->numberOfTads();
dim3 adjustDims = getAdjustDims(numOfTads);
PointersManager manager(context, "adjustSaturation");
NDArray::prepareSpecialUse({output}, {input, factorScalarArr});
BUILD_SINGLE_SELECTOR(input->dataType(), adjustSaturationCudaLauncher,
(adjustDims.x,adjustDims.y, context->getCudaStream(), input->specialBuffer(),
input->specialShapeInfo(), packX->platformOffsets(), output->specialBuffer(),
output->specialShapeInfo(), packZ->platformOffsets(), numOfTads, factorScalarArr, dimC),
SD_FLOAT_TYPES);
NDArray::registerSpecialUse({output}, {input, factorScalarArr});
manager.synchronize();
}
} // namespace helpers
} // namespace ops
} // namespace sd
| 03173ef5b091c3d598c7e59fe0ea3e9454f68e7a.cu | /* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
//
// @author [email protected]
// @author Yurii Shyrma ([email protected])
//
#include <helpers/ConstantTadHelper.h>
#include <helpers/PointersManager.h>
#include <ops/declarable/helpers/adjust_hue.h>
#include <ops/declarable/helpers/adjust_saturation.h>
#include "execution/cuda/LaunchDims.h"
namespace sd {
namespace ops {
namespace helpers {
///////////////////////////////////////////////////////////////////
template <typename T>
static void SD_KERNEL adjustSaturationCuda(const void* vx, const sd::LongType* xShapeInfo,
const sd::LongType* xTadOffsets, void* vz, const sd::LongType* zShapeInfo,
const sd::LongType* zTadOffsets, const sd::LongType numOfTads,
const T factor, const sd::LongType dimC) {
const T* x = reinterpret_cast<const T*>(vx);
T* z = reinterpret_cast<T*>(vz);
__shared__ sd::LongType rank;
__shared__ sd::LongType xDimCstride, zDimCstride;
if (threadIdx.x == 0) {
rank = shape::rank(xShapeInfo);
xDimCstride = shape::stride(xShapeInfo)[dimC];
zDimCstride = shape::stride(zShapeInfo)[dimC];
}
__syncthreads();
const auto tid = blockIdx.x * blockDim.x + threadIdx.x;
for (sd::LongType i = tid; i < numOfTads; i += gridDim.x * blockDim.x) {
const T* xTad = x + xTadOffsets[i];
T* zTad = z + zTadOffsets[i];
T h, s, v;
rgbToHsv<T>(xTad[0], xTad[xDimCstride], xTad[2 * xDimCstride], h, s, v);
s *= factor;
if (s > 1.f)
s = 1.f;
else if (s < 0.f)
s = 0.f;
hsvToRgb<T>(h, s, v, zTad[0], zTad[zDimCstride], zTad[2 * zDimCstride]);
}
}
///////////////////////////////////////////////////////////////////
template <typename T>
static SD_HOST void adjustSaturationCudaLauncher(const int blocksPerGrid, const int threadsPerBlock,
const cudaStream_t* stream, const void* vx,
const sd::LongType* xShapeInfo, const sd::LongType* xTadOffsets,
void* vz, const sd::LongType* zShapeInfo,
const sd::LongType* zTadOffsets, const sd::LongType numOfTads,
const NDArray* factorScalarArr, const sd::LongType dimC) {
adjustSaturationCuda<T><<<blocksPerGrid, threadsPerBlock, 256, *stream>>>(
vx, xShapeInfo, xTadOffsets, vz, zShapeInfo, zTadOffsets, numOfTads, factorScalarArr->e<T>(0), dimC);
}
////////////////////////////////////////////////////////////////////////
void adjustSaturation(sd::LaunchContext* context, const NDArray* input, const NDArray* factorScalarArr, NDArray* output,
const sd::LongType dimC) {
auto packX = sd::ConstantTadHelper::getInstance().tadForDimensions(input->shapeInfo(), {dimC});
auto packZ = sd::ConstantTadHelper::getInstance().tadForDimensions(output->shapeInfo(), {dimC});
const sd::LongType numOfTads = packX->numberOfTads();
dim3 adjustDims = getAdjustDims(numOfTads);
PointersManager manager(context, "adjustSaturation");
NDArray::prepareSpecialUse({output}, {input, factorScalarArr});
BUILD_SINGLE_SELECTOR(input->dataType(), adjustSaturationCudaLauncher,
(adjustDims.x,adjustDims.y, context->getCudaStream(), input->specialBuffer(),
input->specialShapeInfo(), packX->platformOffsets(), output->specialBuffer(),
output->specialShapeInfo(), packZ->platformOffsets(), numOfTads, factorScalarArr, dimC),
SD_FLOAT_TYPES);
NDArray::registerSpecialUse({output}, {input, factorScalarArr});
manager.synchronize();
}
} // namespace helpers
} // namespace ops
} // namespace sd
|
21940830873d1334ae17e2b139322049fd650043.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
__global__ void symmetrize2D( float *h, int natoms ) {
const int elementNum = blockIdx.x * blockDim.x + threadIdx.x;
const int dof = 3 * natoms;
if( elementNum >= dof * dof ) {
return;
}
int r = elementNum / dof;
int c = elementNum % dof;
if( r > c ) {
return;
} else {
const float avg = 0.5 * ( h[r * dof + c] + h[c * dof + r] );
h[r * dof + c] = avg;
h[c * dof + r] = avg;
}
}
| 21940830873d1334ae17e2b139322049fd650043.cu | __global__ void symmetrize2D( float *h, int natoms ) {
const int elementNum = blockIdx.x * blockDim.x + threadIdx.x;
const int dof = 3 * natoms;
if( elementNum >= dof * dof ) {
return;
}
int r = elementNum / dof;
int c = elementNum % dof;
if( r > c ) {
return;
} else {
const float avg = 0.5 * ( h[r * dof + c] + h[c * dof + r] );
h[r * dof + c] = avg;
h[c * dof + r] = avg;
}
}
|
8c4c8bf918a3e3c8c3bc88176d29942cdb2ef69e.hip | // !!! This is a file automatically generated by hipify!!!
/*
Select a device according to rank
author: Yu Xiang
Date: 05/12/2011
*/
extern "C"
{
#include "select_gpu.h"
}
#include <stdio.h>
void select_gpu(int rank)
{
/* get device count */
int deviceCount = 0;
if(hipGetDeviceCount(&deviceCount) != hipSuccess)
{
printf("hipGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n");
exit(1);
}
/*
deviceCount--;
int deviceID = rank % deviceCount + 1;
*/
if(rank == 0)
printf("%d CUDA enabled devices available.\n", deviceCount);
int deviceID = rank % deviceCount;
if(hipSetDevice(deviceID) != hipSuccess)
{
printf("hipSetDevice FAILED\n");
exit(1);
}
printf("Process %d is running on GPU %d.\n", rank, deviceID);
}
| 8c4c8bf918a3e3c8c3bc88176d29942cdb2ef69e.cu | /*
Select a device according to rank
author: Yu Xiang
Date: 05/12/2011
*/
extern "C"
{
#include "select_gpu.h"
}
#include <stdio.h>
void select_gpu(int rank)
{
/* get device count */
int deviceCount = 0;
if(cudaGetDeviceCount(&deviceCount) != cudaSuccess)
{
printf("cudaGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.\n");
exit(1);
}
/*
deviceCount--;
int deviceID = rank % deviceCount + 1;
*/
if(rank == 0)
printf("%d CUDA enabled devices available.\n", deviceCount);
int deviceID = rank % deviceCount;
if(cudaSetDevice(deviceID) != cudaSuccess)
{
printf("cudaSetDevice FAILED\n");
exit(1);
}
printf("Process %d is running on GPU %d.\n", rank, deviceID);
}
|
b790d23d95137f5cb877311ea8d53d9d94f49459.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <sstream>
#include <fstream>
#define DIM 8
using namespace std;
struct DeviceData {
float *d_fix;
float *d_cur;
float *d_pre;
float *in;
float *out;
};
void cleanup(DeviceData *d ) {
hipFree(d->d_fix);
hipFree(d->d_cur);
hipFree(d->d_pre);
hipFree(d->in);
hipFree(d->out);
}
/***************** Set fix value to fix matrix *********************/
void setInitHeatMap(float *dst, int width, int height, int location_x, int location_y, int widthFix, int heightFix, int fixedTemp) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ((i >= location_y) && (i < location_y + heightFix)) {
if ((j >= location_x) && (j < location_x + widthFix)){
dst[i * width + j] = fixedTemp;
}
}
}
}
}
// Overload for 3D
void setInitHeatMap(float *dst, int width, int height, int depth, int location_x, int location_y, int location_z, int widthFix, int heightFix, int depthFix, int fixedTemp) {
for (int k = 0; k < depth; k++) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ((k >= location_z) && (k < location_z + depthFix)) {
if ((i >= location_y) && (i < location_y + heightFix)) {
if ((j >= location_x) && (j < location_x + widthFix)){
dst[k * width * height + i * width + j] = fixedTemp;
}
}
}
}
}
}
}
/*************** copy src mat to dst mat **********************/
__global__ void copy_const_kernel (float *dst, const float *src, int width, int height, int depth) {
// x as width, y as height, z as depth
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
int index = x + y * width + z * width * height;
if ((x < width && y < height && z < depth) && (src[index] != 0)) dst[index] = src[index];
}
/*************** temp update function **********************/
__global__ void update_kernel (float *dst, float *src, int width, int height, int depth, float k) {
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
// int index = x + y * blockDim.x * gridDim.x;
int index = x + y * width + z * width * height;
int left = index - 1;
int right = index + 1;
if (x == 0) left++;
if (x == width - 1) right--;
int top = index - width;
int bottom = index + width;
if (y == 0) top += width;
if (y == height - 1) bottom -= width;
int front = index - width * height;
int back = index + width * height;
if (z == 0) front = front + width * height;
if (z == depth - 1) back = back - width * height;
if (x < width && y < height && z < depth) {
dst[index] = src[index] + k *
(src[top] + src[bottom] + src[left] + src[right] + src[front] + src[back] - src[index] * 6);
}
}
int main (int argc, char *argv[]) {
DeviceData data;
// set all value
bool dim2D = true; // true as 2D, false as 3D, default as 2D
float k, startTemp, *fix;
int timeSteps, N, width, height, depth = 1;
/*********************** read the config file *************************/
ifstream infile(argv[1]);
string line;
int index = 0;
while (getline(infile, line)) {
// read non# and empty line set index as line number.
int found= line.find_first_not_of(" \t");
if(found != string::npos) {
if(line[found] == '#') continue;
} else {
continue;
}
istringstream iss(line);
char comma;
// set every line as param
if (index == 0) {
// read first line 2D as true, 3D as false
if (line == "3D") dim2D = false;
} else if (index == 1) {
// read k value, if error break
if (!(iss >> k)) break;
} else if (index == 2) {
// read timesteps value
if (!(iss >> timeSteps)) break;
} else if (index == 3) {
// read dim, if 2D read width and height , 3D read w, h ,d
if (dim2D) {
if (!(iss >> width >> comma >> height) || (comma != ',')) break;
} else {
if (!(iss >> width >> comma >> height >> comma >> depth) || (comma != ',')) break;
}
N = width * height * depth;
fix = new float[N];
fill_n(fix, N, 0);
} else if (index == 4) {
// read start temp
if (!(iss >> startTemp)) break;
} else {
// set fix mat
if (dim2D) {
int _x, _y, wf, hf;
float tf;
if (!(iss >> _x >> comma >> _y >> comma >> wf >> comma >> hf >>
comma >> tf) || (comma != ',')) break;
setInitHeatMap(fix, width, height, _x, _y, wf, hf, tf);
} else {
int _x, _y, _z, wf, hf, df;
float tf;
if (!(iss >> _x >> comma >> _y >> comma >> _z >> comma >> wf >> comma >> hf >>
comma >> df >> comma >> tf) || (comma != ',')) break;
setInitHeatMap(fix, width, height, depth, _x, _y, _z, wf, hf, df, tf);
}
}
index++;
}
/*****************************************************************/
float previous[N];
float current[N] = {0};
fill_n(previous, N, startTemp);
hipMalloc((void**)&data.d_cur, N * sizeof(float));
hipMalloc((void**)&data.d_pre, N * sizeof(float));
hipMalloc((void**)&data.d_fix, N * sizeof(float));
dim3 blocks((width + DIM - 1) / DIM, (height + DIM - 1) / DIM, (depth + DIM - 1) / DIM);
dim3 threads(DIM, DIM, DIM);
hipMemcpy(data.d_fix, fix, N*sizeof(float), hipMemcpyHostToDevice);
hipMemcpy(data.d_pre, previous, N*sizeof(float), hipMemcpyHostToDevice);
for (int i = 0; i <= timeSteps; i++) {
if (i % 2) {
data.in = data.d_cur;
data.out = data.d_pre;
} else {
data.in = data.d_pre;
data.out = data.d_cur;
}
hipLaunchKernelGGL(( update_kernel), dim3(blocks), dim3(threads), 0, 0, data.out, data.in, width, height, depth, k);
hipLaunchKernelGGL(( copy_const_kernel), dim3(blocks), dim3(threads), 0, 0, data.out, data.d_fix, width, height, depth);
}
hipMemcpy(current, data.out, N*sizeof(int), hipMemcpyDeviceToHost);
// Generate the heat1Doutput.csv output file.
ofstream outFile;
outFile.open("heatOutput.csv", ios::out);
for (int i = 0; i < N; i++) {
if (i % (width * height) != width * height - 1) {
if (i % width != width - 1) {
outFile << current[i] << ", ";
} else {
outFile << current[i] << endl;
}
} else {
if (i == N - 1) {
outFile << current[i] << endl;
} else {
outFile << current[i] << endl << endl;
}
}
}
cleanup(&data);
return 0;
} | b790d23d95137f5cb877311ea8d53d9d94f49459.cu | #include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <sstream>
#include <fstream>
#define DIM 8
using namespace std;
struct DeviceData {
float *d_fix;
float *d_cur;
float *d_pre;
float *in;
float *out;
};
void cleanup(DeviceData *d ) {
cudaFree(d->d_fix);
cudaFree(d->d_cur);
cudaFree(d->d_pre);
cudaFree(d->in);
cudaFree(d->out);
}
/***************** Set fix value to fix matrix *********************/
void setInitHeatMap(float *dst, int width, int height, int location_x, int location_y, int widthFix, int heightFix, int fixedTemp) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ((i >= location_y) && (i < location_y + heightFix)) {
if ((j >= location_x) && (j < location_x + widthFix)){
dst[i * width + j] = fixedTemp;
}
}
}
}
}
// Overload for 3D
void setInitHeatMap(float *dst, int width, int height, int depth, int location_x, int location_y, int location_z, int widthFix, int heightFix, int depthFix, int fixedTemp) {
for (int k = 0; k < depth; k++) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ((k >= location_z) && (k < location_z + depthFix)) {
if ((i >= location_y) && (i < location_y + heightFix)) {
if ((j >= location_x) && (j < location_x + widthFix)){
dst[k * width * height + i * width + j] = fixedTemp;
}
}
}
}
}
}
}
/*************** copy src mat to dst mat **********************/
__global__ void copy_const_kernel (float *dst, const float *src, int width, int height, int depth) {
// x as width, y as height, z as depth
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
int index = x + y * width + z * width * height;
if ((x < width && y < height && z < depth) && (src[index] != 0)) dst[index] = src[index];
}
/*************** temp update function **********************/
__global__ void update_kernel (float *dst, float *src, int width, int height, int depth, float k) {
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
int z = threadIdx.z + blockIdx.z * blockDim.z;
// int index = x + y * blockDim.x * gridDim.x;
int index = x + y * width + z * width * height;
int left = index - 1;
int right = index + 1;
if (x == 0) left++;
if (x == width - 1) right--;
int top = index - width;
int bottom = index + width;
if (y == 0) top += width;
if (y == height - 1) bottom -= width;
int front = index - width * height;
int back = index + width * height;
if (z == 0) front = front + width * height;
if (z == depth - 1) back = back - width * height;
if (x < width && y < height && z < depth) {
dst[index] = src[index] + k *
(src[top] + src[bottom] + src[left] + src[right] + src[front] + src[back] - src[index] * 6);
}
}
int main (int argc, char *argv[]) {
DeviceData data;
// set all value
bool dim2D = true; // true as 2D, false as 3D, default as 2D
float k, startTemp, *fix;
int timeSteps, N, width, height, depth = 1;
/*********************** read the config file *************************/
ifstream infile(argv[1]);
string line;
int index = 0;
while (getline(infile, line)) {
// read non# and empty line set index as line number.
int found= line.find_first_not_of(" \t");
if(found != string::npos) {
if(line[found] == '#') continue;
} else {
continue;
}
istringstream iss(line);
char comma;
// set every line as param
if (index == 0) {
// read first line 2D as true, 3D as false
if (line == "3D") dim2D = false;
} else if (index == 1) {
// read k value, if error break
if (!(iss >> k)) break;
} else if (index == 2) {
// read timesteps value
if (!(iss >> timeSteps)) break;
} else if (index == 3) {
// read dim, if 2D read width and height , 3D read w, h ,d
if (dim2D) {
if (!(iss >> width >> comma >> height) || (comma != ',')) break;
} else {
if (!(iss >> width >> comma >> height >> comma >> depth) || (comma != ',')) break;
}
N = width * height * depth;
fix = new float[N];
fill_n(fix, N, 0);
} else if (index == 4) {
// read start temp
if (!(iss >> startTemp)) break;
} else {
// set fix mat
if (dim2D) {
int _x, _y, wf, hf;
float tf;
if (!(iss >> _x >> comma >> _y >> comma >> wf >> comma >> hf >>
comma >> tf) || (comma != ',')) break;
setInitHeatMap(fix, width, height, _x, _y, wf, hf, tf);
} else {
int _x, _y, _z, wf, hf, df;
float tf;
if (!(iss >> _x >> comma >> _y >> comma >> _z >> comma >> wf >> comma >> hf >>
comma >> df >> comma >> tf) || (comma != ',')) break;
setInitHeatMap(fix, width, height, depth, _x, _y, _z, wf, hf, df, tf);
}
}
index++;
}
/*****************************************************************/
float previous[N];
float current[N] = {0};
fill_n(previous, N, startTemp);
cudaMalloc((void**)&data.d_cur, N * sizeof(float));
cudaMalloc((void**)&data.d_pre, N * sizeof(float));
cudaMalloc((void**)&data.d_fix, N * sizeof(float));
dim3 blocks((width + DIM - 1) / DIM, (height + DIM - 1) / DIM, (depth + DIM - 1) / DIM);
dim3 threads(DIM, DIM, DIM);
cudaMemcpy(data.d_fix, fix, N*sizeof(float), cudaMemcpyHostToDevice);
cudaMemcpy(data.d_pre, previous, N*sizeof(float), cudaMemcpyHostToDevice);
for (int i = 0; i <= timeSteps; i++) {
if (i % 2) {
data.in = data.d_cur;
data.out = data.d_pre;
} else {
data.in = data.d_pre;
data.out = data.d_cur;
}
update_kernel<<<blocks, threads>>>(data.out, data.in, width, height, depth, k);
copy_const_kernel<<<blocks, threads>>>(data.out, data.d_fix, width, height, depth);
}
cudaMemcpy(current, data.out, N*sizeof(int), cudaMemcpyDeviceToHost);
// Generate the heat1Doutput.csv output file.
ofstream outFile;
outFile.open("heatOutput.csv", ios::out);
for (int i = 0; i < N; i++) {
if (i % (width * height) != width * height - 1) {
if (i % width != width - 1) {
outFile << current[i] << ", ";
} else {
outFile << current[i] << endl;
}
} else {
if (i == N - 1) {
outFile << current[i] << endl;
} else {
outFile << current[i] << endl << endl;
}
}
}
cleanup(&data);
return 0;
} |
6fb2c41021e4c45306ebe127260be98964559a1a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit
#include <thrust/device_vector.h>
#include <thrust/functional.h> // thrust::plus
#include <thrust/reduce.h>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "caffe/common.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <>
void caffe_gpu_gemm<float>(const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K,
const float alpha, const float* A, const float* B, const float beta,
float* C) {
// Note that cublas follows fortran order.
int lda = (TransA == CblasNoTrans) ? K : M;
int ldb = (TransB == CblasNoTrans) ? N : K;
hipblasOperation_t cuTransA =
(TransA == CblasNoTrans) ? HIPBLAS_OP_N : HIPBLAS_OP_T;
hipblasOperation_t cuTransB =
(TransB == CblasNoTrans) ? HIPBLAS_OP_N : HIPBLAS_OP_T;
CUBLAS_CHECK(hipblasSgemm(Caffe::cublas_handle(), cuTransB, cuTransA,
N, M, K, &alpha, B, ldb, A, lda, &beta, C, N));
}
template <>
void caffe_gpu_gemm<double>(const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K,
const double alpha, const double* A, const double* B, const double beta,
double* C) {
// Note that cublas follows fortran order.
int lda = (TransA == CblasNoTrans) ? K : M;
int ldb = (TransB == CblasNoTrans) ? N : K;
hipblasOperation_t cuTransA =
(TransA == CblasNoTrans) ? HIPBLAS_OP_N : HIPBLAS_OP_T;
hipblasOperation_t cuTransB =
(TransB == CblasNoTrans) ? HIPBLAS_OP_N : HIPBLAS_OP_T;
CUBLAS_CHECK(hipblasDgemm(Caffe::cublas_handle(), cuTransB, cuTransA,
N, M, K, &alpha, B, ldb, A, lda, &beta, C, N));
}
template <>
void caffe_gpu_gemv<float>(const CBLAS_TRANSPOSE TransA, const int M,
const int N, const float alpha, const float* A, const float* x,
const float beta, float* y) {
hipblasOperation_t cuTransA =
(TransA == CblasNoTrans) ? HIPBLAS_OP_T : HIPBLAS_OP_N;
CUBLAS_CHECK(hipblasSgemv(Caffe::cublas_handle(), cuTransA, N, M, &alpha,
A, N, x, 1, &beta, y, 1));
}
template <>
void caffe_gpu_gemv<double>(const CBLAS_TRANSPOSE TransA, const int M,
const int N, const double alpha, const double* A, const double* x,
const double beta, double* y) {
hipblasOperation_t cuTransA =
(TransA == CblasNoTrans) ? HIPBLAS_OP_T : HIPBLAS_OP_N;
CUBLAS_CHECK(hipblasDgemv(Caffe::cublas_handle(), cuTransA, N, M, &alpha,
A, N, x, 1, &beta, y, 1));
}
template <>
void caffe_gpu_axpy<float>(const int N, const float alpha, const float* X,
float* Y) {
CUBLAS_CHECK(hipblasSaxpy(Caffe::cublas_handle(), N, &alpha, X, 1, Y, 1));
}
template <>
void caffe_gpu_axpy<double>(const int N, const double alpha, const double* X,
double* Y) {
CUBLAS_CHECK(hipblasDaxpy(Caffe::cublas_handle(), N, &alpha, X, 1, Y, 1));
}
void caffe_gpu_memcpy(const size_t N, const void* X, void* Y) {
if (X != Y) {
CUDA_CHECK(hipMemcpy(Y, X, N, hipMemcpyDefault)); // NOLINT(caffe/alt_fn)
}
}
template <>
void caffe_gpu_scal<float>(const int N, const float alpha, float *X) {
CUBLAS_CHECK(hipblasSscal(Caffe::cublas_handle(), N, &alpha, X, 1));
}
template <>
void caffe_gpu_scal<double>(const int N, const double alpha, double *X) {
CUBLAS_CHECK(hipblasDscal(Caffe::cublas_handle(), N, &alpha, X, 1));
}
template <>
void caffe_gpu_axpby<float>(const int N, const float alpha, const float* X,
const float beta, float* Y) {
caffe_gpu_scal<float>(N, beta, Y);
caffe_gpu_axpy<float>(N, alpha, X, Y);
}
template <>
void caffe_gpu_axpby<double>(const int N, const double alpha, const double* X,
const double beta, double* Y) {
caffe_gpu_scal<double>(N, beta, Y);
caffe_gpu_axpy<double>(N, alpha, X, Y);
}
template <>
void caffe_gpu_dot<float>(const int n, const float* x, const float* y,
float* out) {
CUBLAS_CHECK(hipblasSdot(Caffe::cublas_handle(), n, x, 1, y, 1, out));
}
template <>
void caffe_gpu_dot<double>(const int n, const double* x, const double* y,
double * out) {
CUBLAS_CHECK(hipblasDdot(Caffe::cublas_handle(), n, x, 1, y, 1, out));
}
template <>
void caffe_gpu_asum<float>(const int n, const float* x, float* y) {
CUBLAS_CHECK(hipblasSasum(Caffe::cublas_handle(), n, x, 1, y));
}
template <>
void caffe_gpu_asum<double>(const int n, const double* x, double* y) {
CUBLAS_CHECK(hipblasDasum(Caffe::cublas_handle(), n, x, 1, y));
}
template <>
void caffe_gpu_scale<float>(const int n, const float alpha, const float *x,
float* y) {
CUBLAS_CHECK(hipblasScopy(Caffe::cublas_handle(), n, x, 1, y, 1));
CUBLAS_CHECK(hipblasSscal(Caffe::cublas_handle(), n, &alpha, y, 1));
}
template <>
void caffe_gpu_scale<double>(const int n, const double alpha, const double *x,
double* y) {
CUBLAS_CHECK(hipblasDcopy(Caffe::cublas_handle(), n, x, 1, y, 1));
CUBLAS_CHECK(hipblasDscal(Caffe::cublas_handle(), n, &alpha, y, 1));
}
template <typename Dtype>
__global__ void set_kernel(const int n, const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = alpha;
}
}
template <typename Dtype>
void caffe_gpu_set(const int N, const Dtype alpha, Dtype* Y) {
if (alpha == 0) {
CUDA_CHECK(hipMemset(Y, 0, sizeof(Dtype) * N)); // NOLINT(caffe/alt_fn)
return;
}
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( set_kernel<Dtype>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, alpha, Y);
}
template void caffe_gpu_set<int>(const int N, const int alpha, int* Y);
template void caffe_gpu_set<float>(const int N, const float alpha, float* Y);
template void caffe_gpu_set<double>(const int N, const double alpha, double* Y);
/*
Function to copy a select set of row indices from a matrix to another matrix Y
*/
/*template <>
void caffe_gpu_axpy_indices<float>(const int n, const int m, const float* X, const int* id, float* Y) {
CUDA_KERNEL_LOOP(index, n) {
caffe_gpu_axpy<float>(m, 1, X + index*m, Y + id[index]*m);
}
}
template <>
void caffe_gpu_axpy_indices<double>(const int n, const int m, const double* X, const int* id, double* Y) {
CUDA_KERNEL_LOOP(index, n) {
caffe_gpu_axpy<double>(m, 1, X + index*m, Y + id[index]*m);
}
}
template <>
void caffe_copy_indices_kernel<double>(const int n, const int m, const double* X, const int* id, double* Y) {
CUDA_KERNEL_LOOP(index, n) {
if ((X + id[index]*m) != (Y + index*m)) {
CUDA_CHECK(hipMemcpy(Y + index*m, X + id[index]*m, m, hipMemcpyDefault)); // NOLINT(caffe/alt_fn)
//memcpy(Y + index*m, X + id[index]*m, sizeof(Dtype)*m);
//caffe_gpu_axpy<Dtype>(m, 1, X + id[index]*m, Y + index*m);
}
}
}
template <>
void caffe_gpu_copy_indices<double>(const int n, const int m, const double* X, const int* id, double* Y) {
caffe_copy_indices_kernel<<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(n,m,X,id,Y);
}
template <>
void caffe_gpu_copy_indices<float>(const int n, const int m, const float* X, const int* id, float* Y) {
CUDA_KERNEL_LOOP(index, n) {
if ((X + id[index]*m) != (Y + index*m)) {
CUDA_CHECK(hipMemcpy(Y + index*m, X + id[index]*m, m, hipMemcpyDefault)); // NOLINT(caffe/alt_fn)
}
}
}*/
/*template <typename Dtype>
__global__ void copy_indices_from_kernel(const int n, const int m, const Dtype* X, const uint32_t* id, Dtype* Y) {
CUDA_KERNEL_LOOP(index, n) {
CUDA_KERNEL_LOOP(index_m, m) {
Y[index*m + index_m] = X[id[index]*m + index_m];
}
}
}*/
/*template <typename Dtype>
void caffe_gpu_copy_indices(const int n, const int m, const Dtype* X, const int* id, Dtype* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
copy_indices_from_kernel<Dtype><<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(
n, m, X, id, Y);
}
template void caffe_gpu_copy_indices(const int n, const int m, const float* X, const int* id, float* Y);
template void caffe_gpu_copy_indices(const int n, const int m, const int* X, const int* id, int* Y);
template void caffe_gpu_copy_indices(const int n, const int m, const double* X, const int* id, double* Y);*/
/*
End of the function
*/
template <typename Dtype>
__global__ void add_scalar_kernel(const int n, const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] += alpha;
}
}
template <>
void caffe_gpu_add_scalar(const int N, const float alpha, float* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( add_scalar_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, alpha, Y);
}
template <>
void caffe_gpu_add_scalar(const int N, const double alpha, double* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( add_scalar_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, alpha, Y);
}
template <typename Dtype>
__global__ void add_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] + b[index];
}
}
template <>
void caffe_gpu_add<float>(const int N, const float* a, const float* b,
float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( add_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <>
void caffe_gpu_add<double>(const int N, const double* a, const double* b,
double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( add_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <typename Dtype>
__global__ void sub_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] - b[index];
}
}
template <>
void caffe_gpu_sub<float>(const int N, const float* a, const float* b,
float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( sub_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <>
void caffe_gpu_sub<double>(const int N, const double* a, const double* b,
double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( sub_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <typename Dtype>
__global__ void mul_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] * b[index];
}
}
template <>
void caffe_gpu_mul<float>(const int N, const float* a,
const float* b, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( mul_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <>
void caffe_gpu_mul<double>(const int N, const double* a,
const double* b, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( mul_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <typename Dtype>
__global__ void div_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] / b[index];
}
}
template <>
void caffe_gpu_div<float>(const int N, const float* a,
const float* b, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( div_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <>
void caffe_gpu_div<double>(const int N, const double* a,
const double* b, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( div_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, b, y);
}
template <typename Dtype>
__global__ void abs_kernel(const int n, const Dtype* a, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = abs(a[index]);
}
}
template <>
void caffe_gpu_abs<float>(const int N, const float* a, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( abs_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, y);
}
template <>
void caffe_gpu_abs<double>(const int N, const double* a, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( abs_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, y);
}
template <typename Dtype>
__global__ void powx_kernel(const int n, const Dtype* a,
const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = pow(a[index], alpha);
}
}
template <>
void caffe_gpu_powx<float>(const int N, const float* a,
const float alpha, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( powx_kernel<float>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, alpha, y);
}
template <>
void caffe_gpu_powx<double>(const int N, const double* a,
const double alpha, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( powx_kernel<double>), dim3(CAFFE_GET_BLOCKS(N)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
N, a, alpha, y);
}
DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC(sign, y[index] = (Dtype(0) < x[index])
- (x[index] < Dtype(0)));
DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC(sgnbit, y[index] = signbit(x[index]));
__global__ void popc_kernel(const int n, const float* a,
const float* b, uint8_t* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = __popc(static_cast<uint32_t>(a[index]) ^
static_cast<uint32_t>(b[index]));
}
}
__global__ void popcll_kernel(const int n, const double* a,
const double* b, uint8_t* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = __popcll(static_cast<uint64_t>(a[index]) ^
static_cast<uint64_t>(b[index]));
}
}
template <>
uint32_t caffe_gpu_hamming_distance<float>(const int n, const float* x,
const float* y) {
// TODO: Fix caffe_gpu_hamming_distance (see failing unit test
// TestHammingDistanceGPU in test_math_functions.cpp).
NOT_IMPLEMENTED;
thrust::device_vector<uint8_t> popcounts(n);
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( popc_kernel), dim3(CAFFE_GET_BLOCKS(n)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
n, x, y, thrust::raw_pointer_cast(popcounts.data()));
return thrust::reduce(popcounts.begin(), popcounts.end(),
(uint32_t) 0, thrust::plus<uint32_t>());
}
template <>
uint32_t caffe_gpu_hamming_distance<double>(const int n, const double* x,
const double* y) {
// TODO: Fix caffe_gpu_hamming_distance (see failing unit test
// TestHammingDistanceGPU in test_math_functions.cpp).
NOT_IMPLEMENTED;
thrust::device_vector<uint8_t> popcounts(n);
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( popcll_kernel), dim3(CAFFE_GET_BLOCKS(n)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
n, x, y, thrust::raw_pointer_cast(popcounts.data()));
return thrust::reduce(popcounts.begin(), popcounts.end(),
/* NOLINT_NEXT_LINE(build/include_what_you_use) */
(uint32_t) 0, thrust::plus<uint32_t>());
}
void caffe_gpu_rng_uniform(const int n, unsigned int* r) {
CURAND_CHECK(hiprandGenerate(Caffe::curand_generator(), r, n));
}
template <>
void caffe_gpu_rng_uniform<float>(const int n, const float a, const float b,
float* r) {
CURAND_CHECK(hiprandGenerateUniform(Caffe::curand_generator(), r, n));
const float range = b - a;
if (range != static_cast<float>(1)) {
caffe_gpu_scal(n, range, r);
}
if (a != static_cast<float>(0)) {
caffe_gpu_add_scalar(n, a, r);
}
}
template <>
void caffe_gpu_rng_uniform<double>(const int n, const double a, const double b,
double* r) {
CURAND_CHECK(hiprandGenerateUniformDouble(Caffe::curand_generator(), r, n));
const double range = b - a;
if (range != static_cast<double>(1)) {
caffe_gpu_scal(n, range, r);
}
if (a != static_cast<double>(0)) {
caffe_gpu_add_scalar(n, a, r);
}
}
template <>
void caffe_gpu_rng_gaussian(const int n, const float mu, const float sigma,
float* r) {
CURAND_CHECK(
hiprandGenerateNormal(Caffe::curand_generator(), r, n, mu, sigma));
}
template <>
void caffe_gpu_rng_gaussian(const int n, const double mu, const double sigma,
double* r) {
CURAND_CHECK(
hiprandGenerateNormalDouble(Caffe::curand_generator(), r, n, mu, sigma));
}
} // namespace caffe
| 6fb2c41021e4c45306ebe127260be98964559a1a.cu | #include <math_functions.h> // CUDA's, not caffe's, for fabs, signbit
#include <thrust/device_vector.h>
#include <thrust/functional.h> // thrust::plus
#include <thrust/reduce.h>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "caffe/common.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <>
void caffe_gpu_gemm<float>(const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K,
const float alpha, const float* A, const float* B, const float beta,
float* C) {
// Note that cublas follows fortran order.
int lda = (TransA == CblasNoTrans) ? K : M;
int ldb = (TransB == CblasNoTrans) ? N : K;
cublasOperation_t cuTransA =
(TransA == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
cublasOperation_t cuTransB =
(TransB == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
CUBLAS_CHECK(cublasSgemm(Caffe::cublas_handle(), cuTransB, cuTransA,
N, M, K, &alpha, B, ldb, A, lda, &beta, C, N));
}
template <>
void caffe_gpu_gemm<double>(const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K,
const double alpha, const double* A, const double* B, const double beta,
double* C) {
// Note that cublas follows fortran order.
int lda = (TransA == CblasNoTrans) ? K : M;
int ldb = (TransB == CblasNoTrans) ? N : K;
cublasOperation_t cuTransA =
(TransA == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
cublasOperation_t cuTransB =
(TransB == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T;
CUBLAS_CHECK(cublasDgemm(Caffe::cublas_handle(), cuTransB, cuTransA,
N, M, K, &alpha, B, ldb, A, lda, &beta, C, N));
}
template <>
void caffe_gpu_gemv<float>(const CBLAS_TRANSPOSE TransA, const int M,
const int N, const float alpha, const float* A, const float* x,
const float beta, float* y) {
cublasOperation_t cuTransA =
(TransA == CblasNoTrans) ? CUBLAS_OP_T : CUBLAS_OP_N;
CUBLAS_CHECK(cublasSgemv(Caffe::cublas_handle(), cuTransA, N, M, &alpha,
A, N, x, 1, &beta, y, 1));
}
template <>
void caffe_gpu_gemv<double>(const CBLAS_TRANSPOSE TransA, const int M,
const int N, const double alpha, const double* A, const double* x,
const double beta, double* y) {
cublasOperation_t cuTransA =
(TransA == CblasNoTrans) ? CUBLAS_OP_T : CUBLAS_OP_N;
CUBLAS_CHECK(cublasDgemv(Caffe::cublas_handle(), cuTransA, N, M, &alpha,
A, N, x, 1, &beta, y, 1));
}
template <>
void caffe_gpu_axpy<float>(const int N, const float alpha, const float* X,
float* Y) {
CUBLAS_CHECK(cublasSaxpy(Caffe::cublas_handle(), N, &alpha, X, 1, Y, 1));
}
template <>
void caffe_gpu_axpy<double>(const int N, const double alpha, const double* X,
double* Y) {
CUBLAS_CHECK(cublasDaxpy(Caffe::cublas_handle(), N, &alpha, X, 1, Y, 1));
}
void caffe_gpu_memcpy(const size_t N, const void* X, void* Y) {
if (X != Y) {
CUDA_CHECK(cudaMemcpy(Y, X, N, cudaMemcpyDefault)); // NOLINT(caffe/alt_fn)
}
}
template <>
void caffe_gpu_scal<float>(const int N, const float alpha, float *X) {
CUBLAS_CHECK(cublasSscal(Caffe::cublas_handle(), N, &alpha, X, 1));
}
template <>
void caffe_gpu_scal<double>(const int N, const double alpha, double *X) {
CUBLAS_CHECK(cublasDscal(Caffe::cublas_handle(), N, &alpha, X, 1));
}
template <>
void caffe_gpu_axpby<float>(const int N, const float alpha, const float* X,
const float beta, float* Y) {
caffe_gpu_scal<float>(N, beta, Y);
caffe_gpu_axpy<float>(N, alpha, X, Y);
}
template <>
void caffe_gpu_axpby<double>(const int N, const double alpha, const double* X,
const double beta, double* Y) {
caffe_gpu_scal<double>(N, beta, Y);
caffe_gpu_axpy<double>(N, alpha, X, Y);
}
template <>
void caffe_gpu_dot<float>(const int n, const float* x, const float* y,
float* out) {
CUBLAS_CHECK(cublasSdot(Caffe::cublas_handle(), n, x, 1, y, 1, out));
}
template <>
void caffe_gpu_dot<double>(const int n, const double* x, const double* y,
double * out) {
CUBLAS_CHECK(cublasDdot(Caffe::cublas_handle(), n, x, 1, y, 1, out));
}
template <>
void caffe_gpu_asum<float>(const int n, const float* x, float* y) {
CUBLAS_CHECK(cublasSasum(Caffe::cublas_handle(), n, x, 1, y));
}
template <>
void caffe_gpu_asum<double>(const int n, const double* x, double* y) {
CUBLAS_CHECK(cublasDasum(Caffe::cublas_handle(), n, x, 1, y));
}
template <>
void caffe_gpu_scale<float>(const int n, const float alpha, const float *x,
float* y) {
CUBLAS_CHECK(cublasScopy(Caffe::cublas_handle(), n, x, 1, y, 1));
CUBLAS_CHECK(cublasSscal(Caffe::cublas_handle(), n, &alpha, y, 1));
}
template <>
void caffe_gpu_scale<double>(const int n, const double alpha, const double *x,
double* y) {
CUBLAS_CHECK(cublasDcopy(Caffe::cublas_handle(), n, x, 1, y, 1));
CUBLAS_CHECK(cublasDscal(Caffe::cublas_handle(), n, &alpha, y, 1));
}
template <typename Dtype>
__global__ void set_kernel(const int n, const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = alpha;
}
}
template <typename Dtype>
void caffe_gpu_set(const int N, const Dtype alpha, Dtype* Y) {
if (alpha == 0) {
CUDA_CHECK(cudaMemset(Y, 0, sizeof(Dtype) * N)); // NOLINT(caffe/alt_fn)
return;
}
// NOLINT_NEXT_LINE(whitespace/operators)
set_kernel<Dtype><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, alpha, Y);
}
template void caffe_gpu_set<int>(const int N, const int alpha, int* Y);
template void caffe_gpu_set<float>(const int N, const float alpha, float* Y);
template void caffe_gpu_set<double>(const int N, const double alpha, double* Y);
/*
Function to copy a select set of row indices from a matrix to another matrix Y
*/
/*template <>
void caffe_gpu_axpy_indices<float>(const int n, const int m, const float* X, const int* id, float* Y) {
CUDA_KERNEL_LOOP(index, n) {
caffe_gpu_axpy<float>(m, 1, X + index*m, Y + id[index]*m);
}
}
template <>
void caffe_gpu_axpy_indices<double>(const int n, const int m, const double* X, const int* id, double* Y) {
CUDA_KERNEL_LOOP(index, n) {
caffe_gpu_axpy<double>(m, 1, X + index*m, Y + id[index]*m);
}
}
template <>
void caffe_copy_indices_kernel<double>(const int n, const int m, const double* X, const int* id, double* Y) {
CUDA_KERNEL_LOOP(index, n) {
if ((X + id[index]*m) != (Y + index*m)) {
CUDA_CHECK(cudaMemcpy(Y + index*m, X + id[index]*m, m, cudaMemcpyDefault)); // NOLINT(caffe/alt_fn)
//memcpy(Y + index*m, X + id[index]*m, sizeof(Dtype)*m);
//caffe_gpu_axpy<Dtype>(m, 1, X + id[index]*m, Y + index*m);
}
}
}
template <>
void caffe_gpu_copy_indices<double>(const int n, const int m, const double* X, const int* id, double* Y) {
caffe_copy_indices_kernel<<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(n,m,X,id,Y);
}
template <>
void caffe_gpu_copy_indices<float>(const int n, const int m, const float* X, const int* id, float* Y) {
CUDA_KERNEL_LOOP(index, n) {
if ((X + id[index]*m) != (Y + index*m)) {
CUDA_CHECK(cudaMemcpy(Y + index*m, X + id[index]*m, m, cudaMemcpyDefault)); // NOLINT(caffe/alt_fn)
}
}
}*/
/*template <typename Dtype>
__global__ void copy_indices_from_kernel(const int n, const int m, const Dtype* X, const uint32_t* id, Dtype* Y) {
CUDA_KERNEL_LOOP(index, n) {
CUDA_KERNEL_LOOP(index_m, m) {
Y[index*m + index_m] = X[id[index]*m + index_m];
}
}
}*/
/*template <typename Dtype>
void caffe_gpu_copy_indices(const int n, const int m, const Dtype* X, const int* id, Dtype* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
copy_indices_from_kernel<Dtype><<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(
n, m, X, id, Y);
}
template void caffe_gpu_copy_indices(const int n, const int m, const float* X, const int* id, float* Y);
template void caffe_gpu_copy_indices(const int n, const int m, const int* X, const int* id, int* Y);
template void caffe_gpu_copy_indices(const int n, const int m, const double* X, const int* id, double* Y);*/
/*
End of the function
*/
template <typename Dtype>
__global__ void add_scalar_kernel(const int n, const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] += alpha;
}
}
template <>
void caffe_gpu_add_scalar(const int N, const float alpha, float* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
add_scalar_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, alpha, Y);
}
template <>
void caffe_gpu_add_scalar(const int N, const double alpha, double* Y) {
// NOLINT_NEXT_LINE(whitespace/operators)
add_scalar_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, alpha, Y);
}
template <typename Dtype>
__global__ void add_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] + b[index];
}
}
template <>
void caffe_gpu_add<float>(const int N, const float* a, const float* b,
float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
add_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <>
void caffe_gpu_add<double>(const int N, const double* a, const double* b,
double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
add_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <typename Dtype>
__global__ void sub_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] - b[index];
}
}
template <>
void caffe_gpu_sub<float>(const int N, const float* a, const float* b,
float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
sub_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <>
void caffe_gpu_sub<double>(const int N, const double* a, const double* b,
double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
sub_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <typename Dtype>
__global__ void mul_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] * b[index];
}
}
template <>
void caffe_gpu_mul<float>(const int N, const float* a,
const float* b, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
mul_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <>
void caffe_gpu_mul<double>(const int N, const double* a,
const double* b, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
mul_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <typename Dtype>
__global__ void div_kernel(const int n, const Dtype* a,
const Dtype* b, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = a[index] / b[index];
}
}
template <>
void caffe_gpu_div<float>(const int N, const float* a,
const float* b, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
div_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <>
void caffe_gpu_div<double>(const int N, const double* a,
const double* b, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
div_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, b, y);
}
template <typename Dtype>
__global__ void abs_kernel(const int n, const Dtype* a, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = abs(a[index]);
}
}
template <>
void caffe_gpu_abs<float>(const int N, const float* a, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
abs_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, y);
}
template <>
void caffe_gpu_abs<double>(const int N, const double* a, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
abs_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, y);
}
template <typename Dtype>
__global__ void powx_kernel(const int n, const Dtype* a,
const Dtype alpha, Dtype* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = pow(a[index], alpha);
}
}
template <>
void caffe_gpu_powx<float>(const int N, const float* a,
const float alpha, float* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
powx_kernel<float><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, alpha, y);
}
template <>
void caffe_gpu_powx<double>(const int N, const double* a,
const double alpha, double* y) {
// NOLINT_NEXT_LINE(whitespace/operators)
powx_kernel<double><<<CAFFE_GET_BLOCKS(N), CAFFE_CUDA_NUM_THREADS>>>(
N, a, alpha, y);
}
DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC(sign, y[index] = (Dtype(0) < x[index])
- (x[index] < Dtype(0)));
DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC(sgnbit, y[index] = signbit(x[index]));
__global__ void popc_kernel(const int n, const float* a,
const float* b, uint8_t* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = __popc(static_cast<uint32_t>(a[index]) ^
static_cast<uint32_t>(b[index]));
}
}
__global__ void popcll_kernel(const int n, const double* a,
const double* b, uint8_t* y) {
CUDA_KERNEL_LOOP(index, n) {
y[index] = __popcll(static_cast<uint64_t>(a[index]) ^
static_cast<uint64_t>(b[index]));
}
}
template <>
uint32_t caffe_gpu_hamming_distance<float>(const int n, const float* x,
const float* y) {
// TODO: Fix caffe_gpu_hamming_distance (see failing unit test
// TestHammingDistanceGPU in test_math_functions.cpp).
NOT_IMPLEMENTED;
thrust::device_vector<uint8_t> popcounts(n);
// NOLINT_NEXT_LINE(whitespace/operators)
popc_kernel<<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(
n, x, y, thrust::raw_pointer_cast(popcounts.data()));
return thrust::reduce(popcounts.begin(), popcounts.end(),
(uint32_t) 0, thrust::plus<uint32_t>());
}
template <>
uint32_t caffe_gpu_hamming_distance<double>(const int n, const double* x,
const double* y) {
// TODO: Fix caffe_gpu_hamming_distance (see failing unit test
// TestHammingDistanceGPU in test_math_functions.cpp).
NOT_IMPLEMENTED;
thrust::device_vector<uint8_t> popcounts(n);
// NOLINT_NEXT_LINE(whitespace/operators)
popcll_kernel<<<CAFFE_GET_BLOCKS(n), CAFFE_CUDA_NUM_THREADS>>>(
n, x, y, thrust::raw_pointer_cast(popcounts.data()));
return thrust::reduce(popcounts.begin(), popcounts.end(),
/* NOLINT_NEXT_LINE(build/include_what_you_use) */
(uint32_t) 0, thrust::plus<uint32_t>());
}
void caffe_gpu_rng_uniform(const int n, unsigned int* r) {
CURAND_CHECK(curandGenerate(Caffe::curand_generator(), r, n));
}
template <>
void caffe_gpu_rng_uniform<float>(const int n, const float a, const float b,
float* r) {
CURAND_CHECK(curandGenerateUniform(Caffe::curand_generator(), r, n));
const float range = b - a;
if (range != static_cast<float>(1)) {
caffe_gpu_scal(n, range, r);
}
if (a != static_cast<float>(0)) {
caffe_gpu_add_scalar(n, a, r);
}
}
template <>
void caffe_gpu_rng_uniform<double>(const int n, const double a, const double b,
double* r) {
CURAND_CHECK(curandGenerateUniformDouble(Caffe::curand_generator(), r, n));
const double range = b - a;
if (range != static_cast<double>(1)) {
caffe_gpu_scal(n, range, r);
}
if (a != static_cast<double>(0)) {
caffe_gpu_add_scalar(n, a, r);
}
}
template <>
void caffe_gpu_rng_gaussian(const int n, const float mu, const float sigma,
float* r) {
CURAND_CHECK(
curandGenerateNormal(Caffe::curand_generator(), r, n, mu, sigma));
}
template <>
void caffe_gpu_rng_gaussian(const int n, const double mu, const double sigma,
double* r) {
CURAND_CHECK(
curandGenerateNormalDouble(Caffe::curand_generator(), r, n, mu, sigma));
}
} // namespace caffe
|
e75dbaf9d8f2fa1e990da7db88adc780cddedae6.hip | // !!! This is a file automatically generated by hipify!!!
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2022, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <[email protected]>
//
// LLNL-CODE-697807.
// All rights reserved.
//
// This file is part of LBANN: Livermore Big Artificial Neural Network
// Toolkit. For details, see http://software.llnl.gov/LBANN or
// https://github.com/LLNL/LBANN.
//
// Licensed under the Apache License, Version 2.0 (the "Licensee"); you
// may not use this file except in compliance with the License. You may
// obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the license.
////////////////////////////////////////////////////////////////////////////////
#include "lbann/operators/math/abs.hpp"
#include "lbann/base.hpp"
#include "lbann/utils/gpu/helpers.hpp"
#include "common_hip.cuh"
namespace lbann {
namespace {
template <typename DataT>
struct AbsOpImpl {
using ComplexT = thrust::complex<DataT>;
inline __device__ DataT operator()(DataT const& x) const {
return gpu_lib::abs(x);
}
inline __device__ DataT operator()(ComplexT const& x) const {
return thrust::abs(x);
}
inline __device__ DataT operator()(DataT const& x, DataT const& dy) const {
return (x > (DataT) 0.
? dy
: (x < (DataT) 0.
? -dy
: (DataT) 0.));
}
inline __device__ ComplexT operator()(ComplexT const& x,
DataT const& dy) const {
return (x == ComplexT(0.f)
? ComplexT(0.f)
: thrust::conj(x * (dy / thrust::abs(x))));
}
};// struct AbsOpImpl
} // namespace
template <typename DataT, El::Device Device>
void AbsOperator<DataT, Device>::fp_compute_local(
std::vector<ConstLocalInputTensorType> inputs,
std::vector<LocalOutputTensorType> outputs) const
{
LBANN_ASSERT_DEBUG(inputs.size() == 1);
LBANN_ASSERT_DEBUG(outputs.size() == 1);
auto const& input = inputs.front().data();
auto& output = outputs.front().data();
El::EntrywiseMap(input,
output,
AbsOpImpl<El::Base<DataT>>{});
}
template <typename DataT, El::Device Device>
void AbsOperator<DataT, Device>::bp_compute_local(
std::vector<ConstLocalInputTensorType> inputs,
std::vector<ConstLocalOutputTensorType> grads_wrt_outputs,
std::vector<LocalInputTensorType> grads_wrt_inputs) const
{
LBANN_ASSERT_DEBUG(inputs.size() == 1);
LBANN_ASSERT_DEBUG(grads_wrt_outputs.size() == 1);
LBANN_ASSERT_DEBUG(grads_wrt_inputs.size() == 1);
auto const& input = inputs.front().data();
auto const& grad_wrt_output = grads_wrt_outputs.front().data();
auto& grad_wrt_input = grads_wrt_inputs.front().data();
internal::EntrywiseZipInto(input,
grad_wrt_output,
grad_wrt_input,
AbsOpImpl<El::Base<DataT>>{});
}
#define PROTO(T) template class AbsOperator<T, El::Device::GPU>
#define LBANN_INSTANTIATE_GPU_HALF
#include "lbann/macros/instantiate.hpp"
#undef LBANN_INSTANTIATE_GPU_HALF
#undef PROTO
#define PROTO(T) template class AbsOperator<El::Complex<T>, El::Device::GPU>
#include "lbann/macros/instantiate.hpp"
} // namespace lbann
| e75dbaf9d8f2fa1e990da7db88adc780cddedae6.cu | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2022, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <[email protected]>
//
// LLNL-CODE-697807.
// All rights reserved.
//
// This file is part of LBANN: Livermore Big Artificial Neural Network
// Toolkit. For details, see http://software.llnl.gov/LBANN or
// https://github.com/LLNL/LBANN.
//
// Licensed under the Apache License, Version 2.0 (the "Licensee"); you
// may not use this file except in compliance with the License. You may
// obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the license.
////////////////////////////////////////////////////////////////////////////////
#include "lbann/operators/math/abs.hpp"
#include "lbann/base.hpp"
#include "lbann/utils/gpu/helpers.hpp"
#include "common.cuh"
namespace lbann {
namespace {
template <typename DataT>
struct AbsOpImpl {
using ComplexT = thrust::complex<DataT>;
inline __device__ DataT operator()(DataT const& x) const {
return gpu_lib::abs(x);
}
inline __device__ DataT operator()(ComplexT const& x) const {
return thrust::abs(x);
}
inline __device__ DataT operator()(DataT const& x, DataT const& dy) const {
return (x > (DataT) 0.
? dy
: (x < (DataT) 0.
? -dy
: (DataT) 0.));
}
inline __device__ ComplexT operator()(ComplexT const& x,
DataT const& dy) const {
return (x == ComplexT(0.f)
? ComplexT(0.f)
: thrust::conj(x * (dy / thrust::abs(x))));
}
};// struct AbsOpImpl
} // namespace
template <typename DataT, El::Device Device>
void AbsOperator<DataT, Device>::fp_compute_local(
std::vector<ConstLocalInputTensorType> inputs,
std::vector<LocalOutputTensorType> outputs) const
{
LBANN_ASSERT_DEBUG(inputs.size() == 1);
LBANN_ASSERT_DEBUG(outputs.size() == 1);
auto const& input = inputs.front().data();
auto& output = outputs.front().data();
El::EntrywiseMap(input,
output,
AbsOpImpl<El::Base<DataT>>{});
}
template <typename DataT, El::Device Device>
void AbsOperator<DataT, Device>::bp_compute_local(
std::vector<ConstLocalInputTensorType> inputs,
std::vector<ConstLocalOutputTensorType> grads_wrt_outputs,
std::vector<LocalInputTensorType> grads_wrt_inputs) const
{
LBANN_ASSERT_DEBUG(inputs.size() == 1);
LBANN_ASSERT_DEBUG(grads_wrt_outputs.size() == 1);
LBANN_ASSERT_DEBUG(grads_wrt_inputs.size() == 1);
auto const& input = inputs.front().data();
auto const& grad_wrt_output = grads_wrt_outputs.front().data();
auto& grad_wrt_input = grads_wrt_inputs.front().data();
internal::EntrywiseZipInto(input,
grad_wrt_output,
grad_wrt_input,
AbsOpImpl<El::Base<DataT>>{});
}
#define PROTO(T) template class AbsOperator<T, El::Device::GPU>
#define LBANN_INSTANTIATE_GPU_HALF
#include "lbann/macros/instantiate.hpp"
#undef LBANN_INSTANTIATE_GPU_HALF
#undef PROTO
#define PROTO(T) template class AbsOperator<El::Complex<T>, El::Device::GPU>
#include "lbann/macros/instantiate.hpp"
} // namespace lbann
|
da6b1a08dfaad6cbc552f2979db331632b29f888.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <hiprand/hiprand_kernel.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
#include "index_init.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
hipSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
int *out_data = NULL;
hipMalloc(&out_data, XSIZE*YSIZE);
int h = YSIZE;
int w = XSIZE;
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
hipFree(0);hipLaunchKernelGGL((
index_init), dim3(gridBlock),dim3(threadBlock), 0, 0, out_data,h,w);
hipDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {hipLaunchKernelGGL((
index_init), dim3(gridBlock),dim3(threadBlock), 0, 0, out_data,h,w);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {hipLaunchKernelGGL((
index_init), dim3(gridBlock),dim3(threadBlock), 0, 0, out_data,h,w);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} | da6b1a08dfaad6cbc552f2979db331632b29f888.cu | #include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <curand_kernel.h>
#include <stdlib.h>
#include <cuda.h>
#include <sys/time.h>
#include "index_init.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
cudaSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
int *out_data = NULL;
cudaMalloc(&out_data, XSIZE*YSIZE);
int h = YSIZE;
int w = XSIZE;
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
cudaFree(0);
index_init<<<gridBlock,threadBlock>>>(out_data,h,w);
cudaDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {
index_init<<<gridBlock,threadBlock>>>(out_data,h,w);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {
index_init<<<gridBlock,threadBlock>>>(out_data,h,w);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} |
d18735cf4def729b26e55e1ad17069a97417a2a7.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include"pathalg.h"
static const int WORK_SIZE =258;
void Bellmanor::copydata(int s,vector<edge>&edges,int nodenum){
};
void Bellmanor::dellocate(){
};
void Bellmanor::allocate(int maxn,int maxedge){
}
void Bellmanor::topsort()
{
};
void Bellmanor::updatE(vector<vector<int>>&tesigns)
{
esigns=tesigns;
for(int k=0;k<LY;k++)
{
int off=k*nodenum*mm;
for(int i=0;i<nodenum;i++)
{
for(int j=0;j<mm;j++)
if(j<rus[i].size())
rudw[off+i*mm+j]=esigns[k][ruw[i][j]];
else
rudw[off+i*mm+j]=-1;
}
}
hipMemcpy(dev_rudw,rudw,mm*LY*nodenum*sizeof(int),hipMemcpyHostToDevice);
}
void Bellmanor::updatS(vector<vector<Sot>>&stpair)
{
L[0]=0;
L[1]=LY1;
L[2]=LY2;
S[0]=stpair[0].size();
S[1]=stpair[1].size();
stps=stpair;
int count=0;
ncount=L[1]*S[0]+L[2]*S[1];
memset(d,1,ncount*nodenum*sizeof(int));
memset(p,-1,ncount*nodenum*sizeof(int));
for(int k=0;k<L[1];k++)
{
for(int j=0;j<stpair[0].size();j++)
{
d[count*nodenum+stpair[0][j].s*NUT]=0;
count++;
}
}
for(int k=0;k<L[2];k++)
{
for(int j=0;j<stpair[1].size();j++)
{
d[count*nodenum+stpair[1][j].s*NUT]=0;
count++;
}
}
Size[0]=nodenum*L[1]*S[0];
Size[1]=nodenum*L[2]*S[1];
hipMemcpy(dev_d,d,ncount*nodenum*sizeof(int),hipMemcpyHostToDevice);
hipMemcpy(dev_p,p,ncount*nodenum*sizeof(int),hipMemcpyHostToDevice);
}
void Bellmanor::init(pair<vector<edge>,vector<vector<int>>>ext,vector<pair<int,int>>stpair,int _nodenum)
{
//cout<<"init bellmanor"<<endl;
nodenum=_nodenum;
edges=ext.first;
esigns=ext.second;
stp=stpair;
W=WD+1;
//st=new int[edges.size()*LY];
//te=new int[edges.size()*LY];
d=new int[nodenum*LY*YE];
has=new int[nodenum*LY*YE];
p=new int[nodenum*LY*YE];
w=new int[edges.size()*LY];
m1=new int;
m2=new int;
*m1=0,*m2=0;
esignes=new int[edges.size()*LY];
vector<vector<int>>nein(nodenum*LY,vector<int>());
neibn=nein;
vector<vector<int>>neie(nodenum,vector<int>());
vector<vector<int>>rs(nodenum,vector<int>());
vector<vector<int>>rw(nodenum,vector<int>());
rus=rs;
ruw=rw;
for(int i=0;i<edges.size();i++)
{
int s=edges[i].s;
int t=edges[i].t;
rus[t].push_back(s);
ruw[t].push_back(i);
neibn[s].push_back(t);
neie[s].push_back(i);
}
mm=0;
for(int i=0;i<rus.size();i++)
if(rus[i].size()>mm)mm=rus[i].size();
rudu=new int[nodenum*mm*LY];
rudw=new int[nodenum*mm*LY];
rid=new int[nodenum*mm*LY];
for(int k=0;k<LY;k++)
{
int off=k*nodenum*mm;
for(int i=0;i<nodenum;i++)
{
for(int j=0;j<mm;j++)
if(j<rus[i].size())
rudu[off+i*mm+j]=rus[i][j];
else
rudu[off+i*mm+j]=INT_MAX;
for(int j=0;j<mm;j++)
if(j<rus[i].size())
{
rudw[off+i*mm+j]=esigns[k][ruw[i][j]];
rid[off+i*mm+j]=ruw[i][j];
}
else
{
rudw[off+i*mm+j]=-1;
rid[off+i*mm+j]=-1;
}
}
}
int count=0;
/*for(int k=0;k<LY;k++)
for(int i=0;i<nodenum;i++)
for(int j=0;j<neibn[i].size();j++)
{
st[count]=i;
if(esigns[k][neie[i][j]]<0)
te[count]=i;
else
te[count]=neibn[i][j];
count++;
}*/
int cc=0;
for(int k=0;k<LY;k++)
for(int i=0;i<edges.size();i++)
w[cc++]=esigns[k][i];
//hipMalloc((void**)&dev_st,LY*edges.size()*sizeof(int));
//hipMalloc((void**)&dev_te,LY*edges.size()*sizeof(int));
hipMalloc((void**)&dev_d,YE*LY*nodenum*sizeof(int));
hipMalloc((void**)&dev_p,YE*LY*nodenum*sizeof(int));
hipMalloc((void**)&dev_w,LY*edges.size()*sizeof(int));
//hipMalloc((void**)&dev_m1,sizeof(int));
//hipMalloc((void**)&dev_m2,sizeof(int));
hipMalloc((void**)&dev_rudu,mm*LY*nodenum*sizeof(int));
hipMalloc((void**)&dev_rudw,mm*LY*nodenum*sizeof(int));
hipMalloc((void**)&dev_rid,mm*LY*nodenum*sizeof(int));
//hipMalloc((void**)&dev_ruid,mm*LY*nodenum*sizeof(int));
//hipMemcpy(dev_te,te,LY*edges.size()*sizeof(int),hipMemcpyHostToDevice);
//hipMemcpy(dev_st,st,LY*edges.size()*sizeof(int),hipMemcpyHostToDevice);
hipMemcpy(dev_w,w,LY*edges.size()*sizeof(int),hipMemcpyHostToDevice);
hipMemcpy(dev_rudu,rudu,mm*LY*nodenum*sizeof(int),hipMemcpyHostToDevice);
hipMemcpy(dev_rudw,rudw,mm*LY*nodenum*sizeof(int),hipMemcpyHostToDevice);
hipMemcpy(dev_rid,rid,mm*LY*nodenum*sizeof(int),hipMemcpyHostToDevice);
//hipMemcpy(dev_ruid,ruid,mm*LY*nodenum*sizeof(int),hipMemcpyHostToDevice);
//hipMemcpy(dev_m1,m1,sizeof(int),hipMemcpyHostToDevice);
//hipMemcpy(dev_m2,m2,sizeof(int),hipMemcpyHostToDevice);
};
Bellmanor::Bellmanor():L(PC+1,0),S(PC,0),NF(PC,0),Size(2,0)
{
};
__global__ void bellmandu(int *rudu,int*rudw,int *d,int*p,int N,int size,int sizeoff,int leveloff,int ye,int ly,int mm)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>=size)return;
int lyy=i/(ye*N);
int yee=(i%(ye*N))/N;
int off=lyy*N*ye+yee*N+sizeoff;
int roff=(i%N+(lyy+leveloff)*N)*mm;
i+=sizeoff;
int dm=d[i];
for(int k=0;k<mm;k++)
if(rudu[roff+k]<INT_MAX)
{
int node=rudu[roff+k]+off;
if(rudw[roff+k]<0)continue;
if(dm>d[node]+rudw[roff+k])
dm=d[node]+rudw[roff+k];
}
if(d[i]>dm)
d[i]=dm;
}
__global__ void bellmancolor(int *rudu,int*rudw,int*rid,int *d,int*p,int N,int size,int sizeoff,int leveloff,int ye,int ly,int mm)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>=size)return;
int lyy=i/(ye*N);
int yee=(i%(ye*N))/N;
int off=lyy*N*ye+yee*N+sizeoff;
int roff=(i%N+(lyy+leveloff)*N)*mm;
i+=sizeoff;
int dm=d[i];
int mark=-1;
for(int k=0;k<mm;k++)
if(rudu[roff+k]<INT_MAX)
{
int node=rudu[roff+k]+off;
if(rudw[roff+k]<0)continue;
if(dm==d[node]+rudw[roff+k])
{mark=rid[roff+k];break;}
}
p[i]=mark;
}
vector<vector<Rout>> Bellmanor::routalg(int s,int t,int bw)
{
//cout<<"inbellman"<<endl;
int kk=1;
time_t start,end;
start=clock();
hipStream_t stream0;
hipStreamCreate(&stream0);
hipStream_t stream1;
hipStreamCreate(&stream1);
for(int i=0;i<WD+1;i++)
{
hipLaunchKernelGGL(( bellmandu), dim3(Size[0]/512+1),dim3(512),0, 0, dev_rudu,dev_rudw,dev_d,dev_p,nodenum,Size[0],0,0,S[0],L[1],mm);
hipLaunchKernelGGL(( bellmandu), dim3(Size[1]/512+1),dim3(512),0, 0, dev_rudu,dev_rudw,dev_d,dev_p,nodenum,Size[1],Size[0],L[1],S[1],L[2],mm);
}
hipLaunchKernelGGL(( bellmancolor), dim3(Size[0]/512+1),dim3(512),0, 0, dev_rudu,dev_rudw,dev_rid,dev_d,dev_p,nodenum,Size[0],0,0,S[0],L[1],mm);
hipLaunchKernelGGL(( bellmancolor), dim3(Size[1]/512+1),dim3(512),0, 0, dev_rudu,dev_rudw,dev_rid,dev_d,dev_p,nodenum,Size[1],Size[0],L[1],S[1],L[2],mm);
hipStreamSynchronize(stream1);
hipStreamSynchronize(stream0);
hipMemcpy(d,dev_d,ncount*nodenum*sizeof(int),hipMemcpyDeviceToHost);
hipMemcpy(p,dev_p,ncount*nodenum*sizeof(int),hipMemcpyDeviceToHost);
end=clock();
vector<vector<Rout>>result(2,vector<Rout>());
vector<int>LL(3,0);
LL=L;
LL[2]+=LL[1];
int count=0;
for(int y=1;y<PC+1;y++)
for(int k=LL[y-1];k<LL[y];k++)
{
for(int l=0;l<stps[y-1].size();l++)
{
int offf=count*nodenum;
int s=stps[y-1][l].s*NUT;
vector<int>ters=stps[y-1][l].ters;
for(int i=0;i<ters.size();i++)
{
int id=stps[y-1][l].mmpid[ters[i]];
int hop=0;
int tt=ters[i];
int min=INF;
int prn=-1;
for(int i=1;i<W;i++)
{
if(d[offf+tt*W+i]<min)
{
min=d[offf+tt*W+i];
prn=offf+tt*W+i;
}
}
int node=prn-offf;
if(prn<0)continue;
Rout S(s,node,id,min,offf,k);
result[y-1].push_back(S);
}
count++;
}
}
//cout<<"GPU time is : "<<end-start<<endl;
return result;
};
/*
__global__ void bellmanhigh(int *st,int *te,int *d,int *has,int *w,int E,int N,int size,int *m,int round,int Leveloff,int numoff,int ye,int ly)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>size)return;
int eid=(i%(E*ly));
int eeid=eid+Leveloff;
int s=st[eeid],t=te[eeid],weight=w[eeid];
if(weight<0)return;
int off=(i/(E*ly))*N+(eid/E)*N*ye+numoff;
//if(has[s+off]<round-1)return;
if(d[s+off]+weight<d[t+off])
{
d[t+off]=weight+d[s+off];
//has[t+off]=round;
*m=1;
}
}*/
/*__global__ void color(int *st,int *te,int *d,int *pre,int *has,int *w,int E,int N,int size,int round,int Leveloff,int numoff,int ye,int ly)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>size)return;
int eid=(i%(E*ly));
int eeid=eid+Leveloff;
int s=st[eeid],t=te[eeid],weight=w[eeid];
if(weight<0)return;
int off=(i/(E*ly))*N+(eid/E)*N*ye+numoff;
//if(has[s+off]<round-1)return;
if(d[s+off]+weight==d[t+off])
pre[t+off]=s+off;
}*/
/*m1=1;
*m2=1;
int round=1;
cout<<"fuck wx!"<<endl;
int flag1=0,flag2=0;
int cc=0;
while(*m2==1||*m1==1)
{
*m2=0,*m1=0;
hipMemcpyAsync(dev_m2,m2,sizeof(int),hipMemcpyHostToDevice,stream1);
bellmanhigh<<<size[1]/1024+1,1024,0,stream1>>>(dev_st,dev_te,dev_d,dev_has,dev_w,edges.size(),nodenum,size[1],dev_m2,round,leveloff[1],nodeoff[1],S[1],L[1]);
hipMemcpyAsync(dev_m1,m1,sizeof(int),hipMemcpyHostToDevice,stream0);
bellmanhigh<<<size[0]/1024+1,1024,0,stream0>>>(dev_st,dev_te,dev_d,dev_has,dev_w,edges.size(),nodenum,size[0],dev_m2,round,leveloff[0],nodeoff[0],S[0],L[0]);
color<<<size[1]/1024+1,1024,0,stream1>>>(dev_st,dev_te,dev_d,dev_p,dev_has,dev_w,edges.size(),nodenum,size[1],round,leveloff[1],nodeoff[1],S[1],L[1]);
hipMemcpyAsync(m2,dev_m2,sizeof(int),hipMemcpyDeviceToHost,stream1);
color<<<size[0]/1024+1,1024,0,stream0>>>(dev_st,dev_te,dev_d,dev_p,dev_has,dev_w,edges.size(),nodenum,size[0],round,leveloff[0],nodeoff[0],S[0],L[0]);
hipMemcpyAsync(m1,dev_m1,sizeof(int),hipMemcpyDeviceToHost,stream0);
hipStreamSynchronize(stream1);
hipStreamSynchronize(stream0);
}*/ | d18735cf4def729b26e55e1ad17069a97417a2a7.cu | #include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include"pathalg.h"
static const int WORK_SIZE =258;
void Bellmanor::copydata(int s,vector<edge>&edges,int nodenum){
};
void Bellmanor::dellocate(){
};
void Bellmanor::allocate(int maxn,int maxedge){
}
void Bellmanor::topsort()
{
};
void Bellmanor::updatE(vector<vector<int>>&tesigns)
{
esigns=tesigns;
for(int k=0;k<LY;k++)
{
int off=k*nodenum*mm;
for(int i=0;i<nodenum;i++)
{
for(int j=0;j<mm;j++)
if(j<rus[i].size())
rudw[off+i*mm+j]=esigns[k][ruw[i][j]];
else
rudw[off+i*mm+j]=-1;
}
}
cudaMemcpy(dev_rudw,rudw,mm*LY*nodenum*sizeof(int),cudaMemcpyHostToDevice);
}
void Bellmanor::updatS(vector<vector<Sot>>&stpair)
{
L[0]=0;
L[1]=LY1;
L[2]=LY2;
S[0]=stpair[0].size();
S[1]=stpair[1].size();
stps=stpair;
int count=0;
ncount=L[1]*S[0]+L[2]*S[1];
memset(d,1,ncount*nodenum*sizeof(int));
memset(p,-1,ncount*nodenum*sizeof(int));
for(int k=0;k<L[1];k++)
{
for(int j=0;j<stpair[0].size();j++)
{
d[count*nodenum+stpair[0][j].s*NUT]=0;
count++;
}
}
for(int k=0;k<L[2];k++)
{
for(int j=0;j<stpair[1].size();j++)
{
d[count*nodenum+stpair[1][j].s*NUT]=0;
count++;
}
}
Size[0]=nodenum*L[1]*S[0];
Size[1]=nodenum*L[2]*S[1];
cudaMemcpy(dev_d,d,ncount*nodenum*sizeof(int),cudaMemcpyHostToDevice);
cudaMemcpy(dev_p,p,ncount*nodenum*sizeof(int),cudaMemcpyHostToDevice);
}
void Bellmanor::init(pair<vector<edge>,vector<vector<int>>>ext,vector<pair<int,int>>stpair,int _nodenum)
{
//cout<<"init bellmanor"<<endl;
nodenum=_nodenum;
edges=ext.first;
esigns=ext.second;
stp=stpair;
W=WD+1;
//st=new int[edges.size()*LY];
//te=new int[edges.size()*LY];
d=new int[nodenum*LY*YE];
has=new int[nodenum*LY*YE];
p=new int[nodenum*LY*YE];
w=new int[edges.size()*LY];
m1=new int;
m2=new int;
*m1=0,*m2=0;
esignes=new int[edges.size()*LY];
vector<vector<int>>nein(nodenum*LY,vector<int>());
neibn=nein;
vector<vector<int>>neie(nodenum,vector<int>());
vector<vector<int>>rs(nodenum,vector<int>());
vector<vector<int>>rw(nodenum,vector<int>());
rus=rs;
ruw=rw;
for(int i=0;i<edges.size();i++)
{
int s=edges[i].s;
int t=edges[i].t;
rus[t].push_back(s);
ruw[t].push_back(i);
neibn[s].push_back(t);
neie[s].push_back(i);
}
mm=0;
for(int i=0;i<rus.size();i++)
if(rus[i].size()>mm)mm=rus[i].size();
rudu=new int[nodenum*mm*LY];
rudw=new int[nodenum*mm*LY];
rid=new int[nodenum*mm*LY];
for(int k=0;k<LY;k++)
{
int off=k*nodenum*mm;
for(int i=0;i<nodenum;i++)
{
for(int j=0;j<mm;j++)
if(j<rus[i].size())
rudu[off+i*mm+j]=rus[i][j];
else
rudu[off+i*mm+j]=INT_MAX;
for(int j=0;j<mm;j++)
if(j<rus[i].size())
{
rudw[off+i*mm+j]=esigns[k][ruw[i][j]];
rid[off+i*mm+j]=ruw[i][j];
}
else
{
rudw[off+i*mm+j]=-1;
rid[off+i*mm+j]=-1;
}
}
}
int count=0;
/*for(int k=0;k<LY;k++)
for(int i=0;i<nodenum;i++)
for(int j=0;j<neibn[i].size();j++)
{
st[count]=i;
if(esigns[k][neie[i][j]]<0)
te[count]=i;
else
te[count]=neibn[i][j];
count++;
}*/
int cc=0;
for(int k=0;k<LY;k++)
for(int i=0;i<edges.size();i++)
w[cc++]=esigns[k][i];
//cudaMalloc((void**)&dev_st,LY*edges.size()*sizeof(int));
//cudaMalloc((void**)&dev_te,LY*edges.size()*sizeof(int));
cudaMalloc((void**)&dev_d,YE*LY*nodenum*sizeof(int));
cudaMalloc((void**)&dev_p,YE*LY*nodenum*sizeof(int));
cudaMalloc((void**)&dev_w,LY*edges.size()*sizeof(int));
//cudaMalloc((void**)&dev_m1,sizeof(int));
//cudaMalloc((void**)&dev_m2,sizeof(int));
cudaMalloc((void**)&dev_rudu,mm*LY*nodenum*sizeof(int));
cudaMalloc((void**)&dev_rudw,mm*LY*nodenum*sizeof(int));
cudaMalloc((void**)&dev_rid,mm*LY*nodenum*sizeof(int));
//cudaMalloc((void**)&dev_ruid,mm*LY*nodenum*sizeof(int));
//cudaMemcpy(dev_te,te,LY*edges.size()*sizeof(int),cudaMemcpyHostToDevice);
//cudaMemcpy(dev_st,st,LY*edges.size()*sizeof(int),cudaMemcpyHostToDevice);
cudaMemcpy(dev_w,w,LY*edges.size()*sizeof(int),cudaMemcpyHostToDevice);
cudaMemcpy(dev_rudu,rudu,mm*LY*nodenum*sizeof(int),cudaMemcpyHostToDevice);
cudaMemcpy(dev_rudw,rudw,mm*LY*nodenum*sizeof(int),cudaMemcpyHostToDevice);
cudaMemcpy(dev_rid,rid,mm*LY*nodenum*sizeof(int),cudaMemcpyHostToDevice);
//cudaMemcpy(dev_ruid,ruid,mm*LY*nodenum*sizeof(int),cudaMemcpyHostToDevice);
//cudaMemcpy(dev_m1,m1,sizeof(int),cudaMemcpyHostToDevice);
//cudaMemcpy(dev_m2,m2,sizeof(int),cudaMemcpyHostToDevice);
};
Bellmanor::Bellmanor():L(PC+1,0),S(PC,0),NF(PC,0),Size(2,0)
{
};
__global__ void bellmandu(int *rudu,int*rudw,int *d,int*p,int N,int size,int sizeoff,int leveloff,int ye,int ly,int mm)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>=size)return;
int lyy=i/(ye*N);
int yee=(i%(ye*N))/N;
int off=lyy*N*ye+yee*N+sizeoff;
int roff=(i%N+(lyy+leveloff)*N)*mm;
i+=sizeoff;
int dm=d[i];
for(int k=0;k<mm;k++)
if(rudu[roff+k]<INT_MAX)
{
int node=rudu[roff+k]+off;
if(rudw[roff+k]<0)continue;
if(dm>d[node]+rudw[roff+k])
dm=d[node]+rudw[roff+k];
}
if(d[i]>dm)
d[i]=dm;
}
__global__ void bellmancolor(int *rudu,int*rudw,int*rid,int *d,int*p,int N,int size,int sizeoff,int leveloff,int ye,int ly,int mm)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>=size)return;
int lyy=i/(ye*N);
int yee=(i%(ye*N))/N;
int off=lyy*N*ye+yee*N+sizeoff;
int roff=(i%N+(lyy+leveloff)*N)*mm;
i+=sizeoff;
int dm=d[i];
int mark=-1;
for(int k=0;k<mm;k++)
if(rudu[roff+k]<INT_MAX)
{
int node=rudu[roff+k]+off;
if(rudw[roff+k]<0)continue;
if(dm==d[node]+rudw[roff+k])
{mark=rid[roff+k];break;}
}
p[i]=mark;
}
vector<vector<Rout>> Bellmanor::routalg(int s,int t,int bw)
{
//cout<<"inbellman"<<endl;
int kk=1;
time_t start,end;
start=clock();
cudaStream_t stream0;
cudaStreamCreate(&stream0);
cudaStream_t stream1;
cudaStreamCreate(&stream1);
for(int i=0;i<WD+1;i++)
{
bellmandu<<<Size[0]/512+1,512,0>>>(dev_rudu,dev_rudw,dev_d,dev_p,nodenum,Size[0],0,0,S[0],L[1],mm);
bellmandu<<<Size[1]/512+1,512,0>>>(dev_rudu,dev_rudw,dev_d,dev_p,nodenum,Size[1],Size[0],L[1],S[1],L[2],mm);
}
bellmancolor<<<Size[0]/512+1,512,0>>>(dev_rudu,dev_rudw,dev_rid,dev_d,dev_p,nodenum,Size[0],0,0,S[0],L[1],mm);
bellmancolor<<<Size[1]/512+1,512,0>>>(dev_rudu,dev_rudw,dev_rid,dev_d,dev_p,nodenum,Size[1],Size[0],L[1],S[1],L[2],mm);
cudaStreamSynchronize(stream1);
cudaStreamSynchronize(stream0);
cudaMemcpy(d,dev_d,ncount*nodenum*sizeof(int),cudaMemcpyDeviceToHost);
cudaMemcpy(p,dev_p,ncount*nodenum*sizeof(int),cudaMemcpyDeviceToHost);
end=clock();
vector<vector<Rout>>result(2,vector<Rout>());
vector<int>LL(3,0);
LL=L;
LL[2]+=LL[1];
int count=0;
for(int y=1;y<PC+1;y++)
for(int k=LL[y-1];k<LL[y];k++)
{
for(int l=0;l<stps[y-1].size();l++)
{
int offf=count*nodenum;
int s=stps[y-1][l].s*NUT;
vector<int>ters=stps[y-1][l].ters;
for(int i=0;i<ters.size();i++)
{
int id=stps[y-1][l].mmpid[ters[i]];
int hop=0;
int tt=ters[i];
int min=INF;
int prn=-1;
for(int i=1;i<W;i++)
{
if(d[offf+tt*W+i]<min)
{
min=d[offf+tt*W+i];
prn=offf+tt*W+i;
}
}
int node=prn-offf;
if(prn<0)continue;
Rout S(s,node,id,min,offf,k);
result[y-1].push_back(S);
}
count++;
}
}
//cout<<"GPU time is : "<<end-start<<endl;
return result;
};
/*
__global__ void bellmanhigh(int *st,int *te,int *d,int *has,int *w,int E,int N,int size,int *m,int round,int Leveloff,int numoff,int ye,int ly)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>size)return;
int eid=(i%(E*ly));
int eeid=eid+Leveloff;
int s=st[eeid],t=te[eeid],weight=w[eeid];
if(weight<0)return;
int off=(i/(E*ly))*N+(eid/E)*N*ye+numoff;
//if(has[s+off]<round-1)return;
if(d[s+off]+weight<d[t+off])
{
d[t+off]=weight+d[s+off];
//has[t+off]=round;
*m=1;
}
}*/
/*__global__ void color(int *st,int *te,int *d,int *pre,int *has,int *w,int E,int N,int size,int round,int Leveloff,int numoff,int ye,int ly)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i>size)return;
int eid=(i%(E*ly));
int eeid=eid+Leveloff;
int s=st[eeid],t=te[eeid],weight=w[eeid];
if(weight<0)return;
int off=(i/(E*ly))*N+(eid/E)*N*ye+numoff;
//if(has[s+off]<round-1)return;
if(d[s+off]+weight==d[t+off])
pre[t+off]=s+off;
}*/
/*m1=1;
*m2=1;
int round=1;
cout<<"fuck wx!"<<endl;
int flag1=0,flag2=0;
int cc=0;
while(*m2==1||*m1==1)
{
*m2=0,*m1=0;
cudaMemcpyAsync(dev_m2,m2,sizeof(int),cudaMemcpyHostToDevice,stream1);
bellmanhigh<<<size[1]/1024+1,1024,0,stream1>>>(dev_st,dev_te,dev_d,dev_has,dev_w,edges.size(),nodenum,size[1],dev_m2,round,leveloff[1],nodeoff[1],S[1],L[1]);
cudaMemcpyAsync(dev_m1,m1,sizeof(int),cudaMemcpyHostToDevice,stream0);
bellmanhigh<<<size[0]/1024+1,1024,0,stream0>>>(dev_st,dev_te,dev_d,dev_has,dev_w,edges.size(),nodenum,size[0],dev_m2,round,leveloff[0],nodeoff[0],S[0],L[0]);
color<<<size[1]/1024+1,1024,0,stream1>>>(dev_st,dev_te,dev_d,dev_p,dev_has,dev_w,edges.size(),nodenum,size[1],round,leveloff[1],nodeoff[1],S[1],L[1]);
cudaMemcpyAsync(m2,dev_m2,sizeof(int),cudaMemcpyDeviceToHost,stream1);
color<<<size[0]/1024+1,1024,0,stream0>>>(dev_st,dev_te,dev_d,dev_p,dev_has,dev_w,edges.size(),nodenum,size[0],round,leveloff[0],nodeoff[0],S[0],L[0]);
cudaMemcpyAsync(m1,dev_m1,sizeof(int),cudaMemcpyDeviceToHost,stream0);
cudaStreamSynchronize(stream1);
cudaStreamSynchronize(stream0);
}*/ |
027ee8281b674271a9e45af5fbc3e09f979aed00.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "AddVector.h"
#include <iostream>
#include "Device.h"
using std::cout;
using std::endl;
/*----------------------------------------------------------------------*\
|* Declaration *|
\*---------------------------------------------------------------------*/
/*--------------------------------------*\
|* Imported *|
\*-------------------------------------*/
extern __global__ void addVector(float* ptrDevV1, float* ptrDevV2, float* ptrDevW,int n);
/*--------------------------------------*\
|* Public *|
\*-------------------------------------*/
/*--------------------------------------*\
|* Private *|
\*-------------------------------------*/
/*----------------------------------------------------------------------*\
|* Implementation *|
\*---------------------------------------------------------------------*/
/*--------------------------------------*\
|* Constructeur *|
\*-------------------------------------*/
AddVector::AddVector(const Grid& grid, float* ptrV1, float* ptrV2, float* ptrW, int n) :
ptrV1(ptrV1), ptrV2(ptrV2), ptrW(ptrW), n(n)
{
this->sizeOctet = n * sizeof(float); // octet
// MM
{
// MM (malloc Device)
{
Device::malloc(&ptrDevV1, sizeOctet);
Device::malloc(&ptrDevV2, sizeOctet);
Device::malloc(&ptrDevW, sizeOctet);
Device::memclear(ptrDevV1, sizeOctet);
Device::memclear(ptrDevV2, sizeOctet);
Device::memclear(ptrDevW, sizeOctet);
}
// MM (copy Host->Device)
{
Device::memcpyHToD(ptrDevV1, ptrV1, sizeOctet);
Device::memcpyHToD(ptrDevV2, ptrV2, sizeOctet);
}
Device::lastCudaError("AddVector MM (end allocation)"); // temp debug, facultatif
}
// Grid
{
this->dg = grid.dg;
this->db = grid.db;
}
}
AddVector::~AddVector(void)
{
//MM (device free)
{
Device::free(ptrDevV1);
// TODO ptrV2
// TODO ptrW
Device::free(ptrDevV2);
Device::free(ptrDevW);
Device::lastCudaError("AddVector MM (end deallocation)"); // temp debug, facultatif
}
}
/*--------------------------------------*\
|* Methode *|
\*-------------------------------------*/
void AddVector::run()
{
Device::lastCudaError("addVecteur (before)"); // temp debug
hipLaunchKernelGGL(( addVector), dim3(dg),dim3(db), 0, 0, ptrDevV1, ptrDevV2, ptrDevW, n); // assynchrone
Device::lastCudaError("addVecteur (after)"); // temp debug
Device::synchronize(); // Temp,debug, only for printf in GPU
// MM (Device -> Host)
{
Device::memcpyDToH(ptrW, ptrDevW, sizeOctet); // barriere synchronisation implicite
}
}
/*--------------------------------------*\
|* Private *|
\*-------------------------------------*/
/*----------------------------------------------------------------------*\
|* End *|
\*---------------------------------------------------------------------*/
| 027ee8281b674271a9e45af5fbc3e09f979aed00.cu | #include "AddVector.h"
#include <iostream>
#include "Device.h"
using std::cout;
using std::endl;
/*----------------------------------------------------------------------*\
|* Declaration *|
\*---------------------------------------------------------------------*/
/*--------------------------------------*\
|* Imported *|
\*-------------------------------------*/
extern __global__ void addVector(float* ptrDevV1, float* ptrDevV2, float* ptrDevW,int n);
/*--------------------------------------*\
|* Public *|
\*-------------------------------------*/
/*--------------------------------------*\
|* Private *|
\*-------------------------------------*/
/*----------------------------------------------------------------------*\
|* Implementation *|
\*---------------------------------------------------------------------*/
/*--------------------------------------*\
|* Constructeur *|
\*-------------------------------------*/
AddVector::AddVector(const Grid& grid, float* ptrV1, float* ptrV2, float* ptrW, int n) :
ptrV1(ptrV1), ptrV2(ptrV2), ptrW(ptrW), n(n)
{
this->sizeOctet = n * sizeof(float); // octet
// MM
{
// MM (malloc Device)
{
Device::malloc(&ptrDevV1, sizeOctet);
Device::malloc(&ptrDevV2, sizeOctet);
Device::malloc(&ptrDevW, sizeOctet);
Device::memclear(ptrDevV1, sizeOctet);
Device::memclear(ptrDevV2, sizeOctet);
Device::memclear(ptrDevW, sizeOctet);
}
// MM (copy Host->Device)
{
Device::memcpyHToD(ptrDevV1, ptrV1, sizeOctet);
Device::memcpyHToD(ptrDevV2, ptrV2, sizeOctet);
}
Device::lastCudaError("AddVector MM (end allocation)"); // temp debug, facultatif
}
// Grid
{
this->dg = grid.dg;
this->db = grid.db;
}
}
AddVector::~AddVector(void)
{
//MM (device free)
{
Device::free(ptrDevV1);
// TODO ptrV2
// TODO ptrW
Device::free(ptrDevV2);
Device::free(ptrDevW);
Device::lastCudaError("AddVector MM (end deallocation)"); // temp debug, facultatif
}
}
/*--------------------------------------*\
|* Methode *|
\*-------------------------------------*/
void AddVector::run()
{
Device::lastCudaError("addVecteur (before)"); // temp debug
addVector<<<dg,db>>>(ptrDevV1, ptrDevV2, ptrDevW, n); // assynchrone
Device::lastCudaError("addVecteur (after)"); // temp debug
Device::synchronize(); // Temp,debug, only for printf in GPU
// MM (Device -> Host)
{
Device::memcpyDToH(ptrW, ptrDevW, sizeOctet); // barriere synchronisation implicite
}
}
/*--------------------------------------*\
|* Private *|
\*-------------------------------------*/
/*----------------------------------------------------------------------*\
|* End *|
\*---------------------------------------------------------------------*/
|
b434ce0f3ddfc460dcfad321ea23cb9f34ce656d.hip | // !!! This is a file automatically generated by hipify!!!
// Matrix Multiplication in CUDA
#include <stdio.h>
//#include <string.h>
//#include <assert.h>
//#include <stdlib.h>
#include <hip/hip_runtime.h>
// includes, project
////////////////////////////////////////////////////////////////////////////////
// declarations, forward
#define WIDTH 32
extern "C"
void computeGold(float*, const float*, const float*, unsigned int, unsigned int, unsigned int);
// FILL HERE: define constant variable
// MatrixMul kernel
/**
* CUDA Kernel Device code
*
* Computes the matrix multiplication of A and B into C. The 3 matrices have the same
* number of elements WIDTH*WIDTH.
*/
// FILL HERE: translate C-version matrixMul to CUDA-version kernel code
void
MatrixMul(float* A, float* B, float* C)
{
// TODO : Kernel Function
// C = A * B
// -->
for(int i = 0; i < WIDTH; i++)
{
for(int j = 0; j < WIDTH; j++)
{
for(int k = 0; k < WIDTH; k++)
{
C[i*WIDTH + j] += A[i*WIDTH+k] * B[k*WIDTH + j];
}
}
}
// <--
}
/**
* Host main routine
*/
int
main(void)
{
// Error code to check return values for CUDA calls
hipError_t err = hipSuccess;
// Print the matrix size to be used, and compute its size
int size = WIDTH*WIDTH*sizeof(float);
printf("[MatrixMul of %d x %d elements]\n", WIDTH, WIDTH);
// Allocate the host input matrix h_A
float *h_A = (float *)malloc(size);
// Allocate the host input matrix h_B
float *h_B = (float *)malloc(size);
// Allocate the host input matrix h_C
float *h_C = (float *)malloc(size);
// Allocate the host matrix for compute check
float *reference = (float *)malloc(size);
// Verify that allocations succeeded
if (h_A == NULL || h_B == NULL || h_C == NULL || reference == NULL)
{
fprintf(stderr, "Failed to allocate host matrices!\n");
exit(EXIT_FAILURE);
}
// Initialize the host input matrices
for (int i = 0; i < WIDTH; ++i)
{
for (int j = 0; j < WIDTH; ++j)
{
h_A[i*WIDTH + j] = 0.01f;
h_B[i*WIDTH + j] = 1.0f;
}
}
memset(h_C, 0, size);
memset(reference, 0, size);
// compute the matrix multiplication on the CPU for comparison
computeGold(reference, h_A, h_B, WIDTH, WIDTH, WIDTH);
// Allocate device input matrices
// TODO : Leave/Remove the given hipMalloc code properly
// -->
float* d_A = NULL;
err = hipMalloc((void**)&d_A, size);
if (err != hipSuccess)
{
fprintf(stderr, "Failed to allocate device matrix A (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
float* d_B = NULL;
err = hipMalloc((void**)&d_B, size);
if (err != hipSuccess)
{
fprintf(stderr, "Failed to allocate device matrix B (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
// <--
// Allocate the device output matrix
float* d_C = NULL;
err = hipMalloc((void**)&d_C, size);
if (err != hipSuccess)
{
fprintf(stderr, "Failed to allocate device matrix C (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
// Copy the host input matrix A and B in host memory to the device input matrices in
// device memory
// TODO : Add proper mem copy APIs according to the memory that matrix A and B will be stored
// -->
printf("Copy input data from the host memory to the CUDA device\n");
err = ;// FILL HERE
if (err != hipSuccess)
{
fprintf(stderr, "Failed to copy matrix A from host to device (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
err = ;// FILL HERE
if (err != hipSuccess)
{
fprintf(stderr, "Failed to copy matrix B from host to device (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
// <--
// TODO : Clock Measurements
// Add code to return clock cycles from kernel
// -->
#ifdef TM
unsigned long long* d_runtime;
int r_size = WIDTH*WIDTH*sizeof(unsigned long long);
unsigned long long* runtime = (unsigned long long*)malloc(r_size);
memset(runtime, 0, r_size);
hipMalloc((void**)&d_runtime, r_size);
#endif
// <--
// TODO : Kernel Invocation
// Assign as many threads as the size of matrix in a thread block and
// invoke the kernel function.
// -->
int blocksPerGrid = ;// FILL HERE
int threadsPerBlock = ;// FILL HERE
printf("CUDA kernel launch with %d blocks of %d threads\n", blocksPerGrid, threadsPerBlock);
MatrixMul(d_A, d_B, d_C);
// <--
err = hipGetLastError();
if (err != hipSuccess)
{
fprintf(stderr, "Failed to launch matrixMul kernel (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
hipDeviceSynchronize();
// Copy the device result matrix in device memory to the host result matrix
// in host memory.
printf("Copy output data from the CUDA device to the host memory\n");
err = hipMemcpy(h_C, d_C, size, hipMemcpyDeviceToHost);
if (err != hipSuccess)
{
fprintf(stderr, "Failed to copy matrix C from device to host (error code %s)!\n", hipGetErrorString(err));
exit(EXIT_FAILURE);
}
hipDeviceSynchronize();
// Verify that the result matrix is correct
bool res = 1;
for (int i = 0; i < WIDTH*WIDTH; i++)
{
float diff = fabs(reference[i] - h_C[i]);
if(diff > 0.001f)
{
res = 0;
break;
}
}
printf("Test %s\n", (res == 1) ? "PASSED" : "FAILED");
// TODO : Get elapsed clock cycles from device to host
// Take the longest time as kernel execution time
// -->
#ifdef TM
hipMemcpy(runtime, d_runtime, r_size, hipMemcpyDeviceToHost);
hipDeviceSynchronize();
unsigned long long elapsed_time = 0;
for(int i = 0; i < WIDTH*WIDTH; i++)
if(elapsed_time < runtime[i])
elapsed_time = runtime[i];
printf("Kernel Execution Time: %llu cycles\n", elapsed_time);
#endif
// <--
// TODO : Free device global memory
// Leave/Remove the given hipFree statement according to your data allocation
// -->
hipFree(d_A);
hipFree(d_B);
hipFree(d_C);
#ifdef TM
hipFree(d_runtime);
#endif
// <--
// Free host memory
free(h_A);
free(h_B);
free(h_C);
free(reference);
#ifdef TM
free(runtime);
#endif
return 0;
}
void
computeGold(float* C, const float* A, const float* B, unsigned int hA, unsigned int wA, unsigned int wB)
{
for (unsigned int i = 0; i < hA; ++i)
for (unsigned int j = 0; j < wB; ++j) {
double sum = 0;
for (unsigned int k = 0; k < wA; ++k) {
double a = A[i * wA + k];
double b = B[k * wB + j];
sum += a * b;
}
C[i * wB + j] = (float)sum;
}
}
| b434ce0f3ddfc460dcfad321ea23cb9f34ce656d.cu | // Matrix Multiplication in CUDA
#include <stdio.h>
//#include <string.h>
//#include <assert.h>
//#include <stdlib.h>
#include <cuda_runtime.h>
// includes, project
////////////////////////////////////////////////////////////////////////////////
// declarations, forward
#define WIDTH 32
extern "C"
void computeGold(float*, const float*, const float*, unsigned int, unsigned int, unsigned int);
// FILL HERE: define constant variable
// MatrixMul kernel
/**
* CUDA Kernel Device code
*
* Computes the matrix multiplication of A and B into C. The 3 matrices have the same
* number of elements WIDTH*WIDTH.
*/
// FILL HERE: translate C-version matrixMul to CUDA-version kernel code
void
MatrixMul(float* A, float* B, float* C)
{
// TODO : Kernel Function
// C = A * B
// -->
for(int i = 0; i < WIDTH; i++)
{
for(int j = 0; j < WIDTH; j++)
{
for(int k = 0; k < WIDTH; k++)
{
C[i*WIDTH + j] += A[i*WIDTH+k] * B[k*WIDTH + j];
}
}
}
// <--
}
/**
* Host main routine
*/
int
main(void)
{
// Error code to check return values for CUDA calls
cudaError_t err = cudaSuccess;
// Print the matrix size to be used, and compute its size
int size = WIDTH*WIDTH*sizeof(float);
printf("[MatrixMul of %d x %d elements]\n", WIDTH, WIDTH);
// Allocate the host input matrix h_A
float *h_A = (float *)malloc(size);
// Allocate the host input matrix h_B
float *h_B = (float *)malloc(size);
// Allocate the host input matrix h_C
float *h_C = (float *)malloc(size);
// Allocate the host matrix for compute check
float *reference = (float *)malloc(size);
// Verify that allocations succeeded
if (h_A == NULL || h_B == NULL || h_C == NULL || reference == NULL)
{
fprintf(stderr, "Failed to allocate host matrices!\n");
exit(EXIT_FAILURE);
}
// Initialize the host input matrices
for (int i = 0; i < WIDTH; ++i)
{
for (int j = 0; j < WIDTH; ++j)
{
h_A[i*WIDTH + j] = 0.01f;
h_B[i*WIDTH + j] = 1.0f;
}
}
memset(h_C, 0, size);
memset(reference, 0, size);
// compute the matrix multiplication on the CPU for comparison
computeGold(reference, h_A, h_B, WIDTH, WIDTH, WIDTH);
// Allocate device input matrices
// TODO : Leave/Remove the given cudaMalloc code properly
// -->
float* d_A = NULL;
err = cudaMalloc((void**)&d_A, size);
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to allocate device matrix A (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
float* d_B = NULL;
err = cudaMalloc((void**)&d_B, size);
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to allocate device matrix B (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
// <--
// Allocate the device output matrix
float* d_C = NULL;
err = cudaMalloc((void**)&d_C, size);
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to allocate device matrix C (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
// Copy the host input matrix A and B in host memory to the device input matrices in
// device memory
// TODO : Add proper mem copy APIs according to the memory that matrix A and B will be stored
// -->
printf("Copy input data from the host memory to the CUDA device\n");
err = ;// FILL HERE
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to copy matrix A from host to device (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
err = ;// FILL HERE
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to copy matrix B from host to device (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
// <--
// TODO : Clock Measurements
// Add code to return clock cycles from kernel
// -->
#ifdef TM
unsigned long long* d_runtime;
int r_size = WIDTH*WIDTH*sizeof(unsigned long long);
unsigned long long* runtime = (unsigned long long*)malloc(r_size);
memset(runtime, 0, r_size);
cudaMalloc((void**)&d_runtime, r_size);
#endif
// <--
// TODO : Kernel Invocation
// Assign as many threads as the size of matrix in a thread block and
// invoke the kernel function.
// -->
int blocksPerGrid = ;// FILL HERE
int threadsPerBlock = ;// FILL HERE
printf("CUDA kernel launch with %d blocks of %d threads\n", blocksPerGrid, threadsPerBlock);
MatrixMul(d_A, d_B, d_C);
// <--
err = cudaGetLastError();
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to launch matrixMul kernel (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
cudaThreadSynchronize();
// Copy the device result matrix in device memory to the host result matrix
// in host memory.
printf("Copy output data from the CUDA device to the host memory\n");
err = cudaMemcpy(h_C, d_C, size, cudaMemcpyDeviceToHost);
if (err != cudaSuccess)
{
fprintf(stderr, "Failed to copy matrix C from device to host (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
cudaThreadSynchronize();
// Verify that the result matrix is correct
bool res = 1;
for (int i = 0; i < WIDTH*WIDTH; i++)
{
float diff = fabs(reference[i] - h_C[i]);
if(diff > 0.001f)
{
res = 0;
break;
}
}
printf("Test %s\n", (res == 1) ? "PASSED" : "FAILED");
// TODO : Get elapsed clock cycles from device to host
// Take the longest time as kernel execution time
// -->
#ifdef TM
cudaMemcpy(runtime, d_runtime, r_size, cudaMemcpyDeviceToHost);
cudaThreadSynchronize();
unsigned long long elapsed_time = 0;
for(int i = 0; i < WIDTH*WIDTH; i++)
if(elapsed_time < runtime[i])
elapsed_time = runtime[i];
printf("Kernel Execution Time: %llu cycles\n", elapsed_time);
#endif
// <--
// TODO : Free device global memory
// Leave/Remove the given cudaFree statement according to your data allocation
// -->
cudaFree(d_A);
cudaFree(d_B);
cudaFree(d_C);
#ifdef TM
cudaFree(d_runtime);
#endif
// <--
// Free host memory
free(h_A);
free(h_B);
free(h_C);
free(reference);
#ifdef TM
free(runtime);
#endif
return 0;
}
void
computeGold(float* C, const float* A, const float* B, unsigned int hA, unsigned int wA, unsigned int wB)
{
for (unsigned int i = 0; i < hA; ++i)
for (unsigned int j = 0; j < wB; ++j) {
double sum = 0;
for (unsigned int k = 0; k < wA; ++k) {
double a = A[i * wA + k];
double b = B[k * wB + j];
sum += a * b;
}
C[i * wB + j] = (float)sum;
}
}
|
108e8ec03fa921eac66d3bf5a56f145e29ff18d5.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "paddle/fluid/operators/elementwise/elementwise_add_op.h"
#include "paddle/fluid/operators/elementwise/elementwise_op_function.cu.h"
#include "paddle/fluid/platform/float16.h"
namespace ops = paddle::operators;
namespace plat = paddle::platform;
namespace paddle {
namespace operators {
template <typename T>
struct SameDimsElemwiseAdd<platform::CUDADeviceContext, T> {
void operator()(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
framework::Tensor* z) {
AddRangeFunctor<T> functor(x->data<T>(), y->data<T>(), z->data<T>());
auto& dev_ctx = ctx.template device_context<platform::CUDADeviceContext>();
platform::ForRange<platform::CUDADeviceContext> for_range(dev_ctx,
x->numel());
for_range(functor);
}
};
template <>
struct SameDimsElemwiseAdd<platform::CUDADeviceContext, platform::float16> {
void operator()(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
framework::Tensor* z) {
auto size = x->numel();
dim3 gird_size = dim3(
(size / 2 + PADDLE_CUDA_THREAD_SIZE - 1) / PADDLE_CUDA_THREAD_SIZE, 1);
dim3 block_size = dim3(PADDLE_CUDA_THREAD_SIZE, 1);
const half* x2 =
reinterpret_cast<const half*>(x->data<platform::float16>());
const half* y2 =
reinterpret_cast<const half*>(y->data<platform::float16>());
half* z2 = reinterpret_cast<half*>(z->data<platform::float16>());
hipLaunchKernelGGL(( SameDimsElemwiseAddCUDAKernel),
dim3(gird_size), dim3(block_size), 0,
ctx.template device_context<platform::CUDADeviceContext>().stream(),
x2, y2, z2, size);
}
};
template <typename T>
static __global__ void SimpleElemwiseAddGradCUDAKernel(const T* dout,
int64_t size, T* dx,
T* dy) {
int col = blockIdx.x * blockDim.x + threadIdx.x;
while (col < size) {
dx[col] = dout[col];
dy[col] = dout[col];
col += blockDim.x * gridDim.x;
}
}
template <typename DeviceContext, typename T>
typename std::enable_if<
std::is_same<DeviceContext, plat::CUDADeviceContext>::value>::type
elementwise_add_grad(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
const framework::Tensor* out,
const framework::Tensor* dout, framework::Tensor* dx,
framework::Tensor* dy) {
dim3 block_size = dim3(PADDLE_CUDA_THREAD_SIZE, 1);
auto size = x->numel();
dim3 gird_size =
dim3((size + PADDLE_CUDA_THREAD_SIZE - 1) / PADDLE_CUDA_THREAD_SIZE, 1);
hipLaunchKernelGGL(( SimpleElemwiseAddGradCUDAKernel<
T>), dim3(gird_size), dim3(block_size), 0,
ctx.template device_context<plat::CUDADeviceContext>().stream(),
dout->data<T>(), size, dx->mutable_data<T>(ctx.GetPlace()),
dy->mutable_data<T>(ctx.GetPlace()));
}
} // namespace operators
} // namespace paddle
REGISTER_OP_CUDA_KERNEL(
elementwise_add, ops::ElementwiseAddKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, plat::float16>);
REGISTER_OP_CUDA_KERNEL(
elementwise_add_grad,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, plat::float16>);
REGISTER_OP_CUDA_KERNEL(
elementwise_add_grad_grad,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext,
plat::float16>);
| 108e8ec03fa921eac66d3bf5a56f145e29ff18d5.cu | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "paddle/fluid/operators/elementwise/elementwise_add_op.h"
#include "paddle/fluid/operators/elementwise/elementwise_op_function.cu.h"
#include "paddle/fluid/platform/float16.h"
namespace ops = paddle::operators;
namespace plat = paddle::platform;
namespace paddle {
namespace operators {
template <typename T>
struct SameDimsElemwiseAdd<platform::CUDADeviceContext, T> {
void operator()(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
framework::Tensor* z) {
AddRangeFunctor<T> functor(x->data<T>(), y->data<T>(), z->data<T>());
auto& dev_ctx = ctx.template device_context<platform::CUDADeviceContext>();
platform::ForRange<platform::CUDADeviceContext> for_range(dev_ctx,
x->numel());
for_range(functor);
}
};
template <>
struct SameDimsElemwiseAdd<platform::CUDADeviceContext, platform::float16> {
void operator()(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
framework::Tensor* z) {
auto size = x->numel();
dim3 gird_size = dim3(
(size / 2 + PADDLE_CUDA_THREAD_SIZE - 1) / PADDLE_CUDA_THREAD_SIZE, 1);
dim3 block_size = dim3(PADDLE_CUDA_THREAD_SIZE, 1);
const half* x2 =
reinterpret_cast<const half*>(x->data<platform::float16>());
const half* y2 =
reinterpret_cast<const half*>(y->data<platform::float16>());
half* z2 = reinterpret_cast<half*>(z->data<platform::float16>());
SameDimsElemwiseAddCUDAKernel<<<
gird_size, block_size, 0,
ctx.template device_context<platform::CUDADeviceContext>().stream()>>>(
x2, y2, z2, size);
}
};
template <typename T>
static __global__ void SimpleElemwiseAddGradCUDAKernel(const T* dout,
int64_t size, T* dx,
T* dy) {
int col = blockIdx.x * blockDim.x + threadIdx.x;
while (col < size) {
dx[col] = dout[col];
dy[col] = dout[col];
col += blockDim.x * gridDim.x;
}
}
template <typename DeviceContext, typename T>
typename std::enable_if<
std::is_same<DeviceContext, plat::CUDADeviceContext>::value>::type
elementwise_add_grad(const framework::ExecutionContext& ctx,
const framework::Tensor* x, const framework::Tensor* y,
const framework::Tensor* out,
const framework::Tensor* dout, framework::Tensor* dx,
framework::Tensor* dy) {
dim3 block_size = dim3(PADDLE_CUDA_THREAD_SIZE, 1);
auto size = x->numel();
dim3 gird_size =
dim3((size + PADDLE_CUDA_THREAD_SIZE - 1) / PADDLE_CUDA_THREAD_SIZE, 1);
SimpleElemwiseAddGradCUDAKernel<
T><<<gird_size, block_size, 0,
ctx.template device_context<plat::CUDADeviceContext>().stream()>>>(
dout->data<T>(), size, dx->mutable_data<T>(ctx.GetPlace()),
dy->mutable_data<T>(ctx.GetPlace()));
}
} // namespace operators
} // namespace paddle
REGISTER_OP_CUDA_KERNEL(
elementwise_add, ops::ElementwiseAddKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddKernel<plat::CUDADeviceContext, plat::float16>);
REGISTER_OP_CUDA_KERNEL(
elementwise_add_grad,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddGradKernel<plat::CUDADeviceContext, plat::float16>);
REGISTER_OP_CUDA_KERNEL(
elementwise_add_grad_grad,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, float>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, double>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, int>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext, int64_t>,
ops::ElementwiseAddDoubleGradKernel<plat::CUDADeviceContext,
plat::float16>);
|
655211d76db6e7c27e1faf7ab4c82d399577aa40.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2019, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*#include <cudf/cudf.h>
#include <cudf/types.hpp>
#include <cudf/legacy/copying.hpp>
#include <cudf/legacy/stream_compaction.hpp>
#include <cudf/table.hpp>
#include "table/device_table.cuh"
#include <table/device_table_row_operators.cuh>*/
#include "copy_if_hip.cuh"
#include <cudf/legacy/table.hpp>
#include <table/legacy/device_table.cuh>
#include <table/legacy/device_table_row_operators.cuh>
#include <cudf/legacy/transform.hpp>
#include <rmm/thrust_rmm_allocator.h>
#include <cudf/utilities/legacy/nvcategory_util.hpp>
#include <nvstrings/NVCategory.h>
namespace cudf {
namespace detail {
/*
* unique_copy copies elements from the range [first, last) to a range beginning
* with output, except that in a consecutive group of duplicate elements only
* depending on last argument keep, only the first one is copied, or the last
* one is copied or neither is copied. The return value is the end of the range
* to which the elements are copied.
*/
template<typename Exec,
typename InputIterator,
typename OutputIterator,
typename BinaryPredicate,
typename IndexType = typename
thrust::iterator_difference<InputIterator>::type>
OutputIterator unique_copy(Exec&& exec,
InputIterator first,
InputIterator last,
OutputIterator output,
BinaryPredicate comp,
const duplicate_keep_option keep)
{
IndexType n = (last-first)-1;
if (keep == duplicate_keep_option::KEEP_FIRST) {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == 0 || !comp(first[i], first[i-1]));
});
} else if (keep == duplicate_keep_option::KEEP_LAST) {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == n || !comp(first[i], first[i+1]));
});
} else {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == 0 || !comp(first[i], first[i-1]))
&& (i == n || !comp(first[i], first[i+1]));
});
}
}
auto
get_unique_ordered_indices(const cudf::table& keys,
const duplicate_keep_option keep,
const bool nulls_are_equal = true,
hipStream_t stream=0)
{
cudf::size_type ncols = keys.num_columns();
cudf::size_type nrows = keys.num_rows();
// sort only indices
rmm::device_vector<cudf::size_type> sorted_indices(nrows);
gdf_context context;
gdf_column sorted_indices_col;
CUDF_TRY(gdf_column_view(&sorted_indices_col, (void*)(sorted_indices.data().get()),
nullptr, nrows, GDF_INT32));
CUDF_TRY(gdf_order_by(keys.begin(),
nullptr,
keys.num_columns(),
&sorted_indices_col,
&context));
// extract unique indices
rmm::device_vector<cudf::size_type> unique_indices(nrows);
auto device_input_table = device_table::create(keys, stream);
rmm::device_vector<cudf::size_type>::iterator result_end;
if(cudf::has_nulls(keys)) {
auto comp = row_equality_comparator<true>(*device_input_table,
nulls_are_equal);
result_end = unique_copy(rmm::exec_policy(stream)->on(stream),
sorted_indices.begin(),
sorted_indices.end(),
unique_indices.begin(),
comp,
keep);
} else {
auto comp = row_equality_comparator<false>(*device_input_table,
nulls_are_equal);
result_end = unique_copy(rmm::exec_policy(stream)->on(stream),
sorted_indices.begin(),
sorted_indices.end(),
unique_indices.begin(),
comp,
keep);
}
//not resizing vector to avoid copy
return std::make_pair(unique_indices,
thrust::distance(unique_indices.begin(), result_end));
}
cudf::size_type unique_count(const cudf::table& keys,
const bool nulls_are_equal = true,
hipStream_t stream=0)
{
cudf::size_type ncols = keys.num_columns();
cudf::size_type nrows = keys.num_rows();
// sort only indices
rmm::device_vector<cudf::size_type> sorted_indices(nrows);
gdf_context context;
gdf_column sorted_indices_col;
CUDF_TRY(gdf_column_view(&sorted_indices_col, static_cast<void*>(sorted_indices.data().get()),
nullptr, nrows, GDF_INT32));
CUDF_TRY(gdf_order_by(keys.begin(),
nullptr,
keys.num_columns(),
&sorted_indices_col,
&context));
// count unique elements
auto sorted_row_index = sorted_indices.begin();
auto device_input_table = device_table::create(keys, stream);
if(cudf::has_nulls(keys)) {
auto comp = row_equality_comparator<true>(*device_input_table,
nulls_are_equal);
return thrust::count_if(rmm::exec_policy(stream)->on(stream),
thrust::counting_iterator<cudf::size_type>(0),
thrust::counting_iterator<cudf::size_type>(nrows),
[sorted_row_index, comp]
__device__ (const cudf::size_type i) {
return (i == 0 || !comp(sorted_row_index[i], sorted_row_index[i-1]));
});
} else {
auto comp = row_equality_comparator<false>(*device_input_table,
nulls_are_equal);
return thrust::count_if(rmm::exec_policy(stream)->on(stream),
thrust::counting_iterator<cudf::size_type>(0),
thrust::counting_iterator<cudf::size_type>(nrows),
[sorted_row_index, comp]
__device__ (const cudf::size_type i) {
return (i == 0 || !comp(sorted_row_index[i], sorted_row_index[i-1]));
});
}
}
} //namespace detail
cudf::table drop_duplicates(const cudf::table& input,
const cudf::table& keys,
const duplicate_keep_option keep,
const bool nulls_are_equal)
{
CUDF_EXPECTS( input.num_rows() == keys.num_rows(), "number of \
rows in input table should be equal to number of rows in key colums table");
if (0 == input.num_rows() ||
0 == input.num_columns() ||
0 == keys.num_columns()
) {
return cudf::empty_like(input);
}
rmm::device_vector<cudf::size_type> unique_indices;
cudf::size_type unique_count;
std::tie(unique_indices, unique_count) =
detail::get_unique_ordered_indices(keys, keep, nulls_are_equal);
// Allocate output columns
cudf::table destination_table(unique_count,
cudf::column_dtypes(input),
cudf::column_dtype_infos(input), true);
// Ensure column names are preserved. Ideally we could call cudf::allocate_like
// here, but the above constructor allocates and fills null bitmaps differently
// than allocate_like. Doing this for now because the impending table + column
// re-design will handle this better than another cudf::allocate_like overload
std::transform(
input.begin(), input.end(),
destination_table.begin(), destination_table.begin(),
[](const gdf_column* inp_col, gdf_column* out_col) {
// a rather roundabout way to do a strcpy...
gdf_column_view_augmented(out_col,
out_col->data, out_col->valid,
out_col->size, out_col->dtype,
out_col->null_count,
out_col->dtype_info,
inp_col->col_name);
return out_col;
});
// run gather operation to establish new order
cudf::gather(&input, unique_indices.data().get(), &destination_table);
nvcategory_gather_table(input, destination_table);
return destination_table;
}
cudf::size_type unique_count(gdf_column const& input,
bool const ignore_nulls,
bool const nan_as_null)
{
if (0 == input.size || input.null_count == input.size) {
return 0;
}
gdf_column col{input};
//TODO: remove after NaN support to equality operator is added
//if (nan_as_null)
if ((col.dtype == GDF_FLOAT32 || col.dtype == GDF_FLOAT64)) {
auto temp = nans_to_nulls(col);
col.valid = reinterpret_cast<cudf::valid_type*>(temp.first);
col.null_count = temp.second;
}
bool const has_nans{col.null_count > input.null_count};
auto count = detail::unique_count({const_cast<gdf_column*>(&col)}, true);
if ((col.dtype == GDF_FLOAT32 || col.dtype == GDF_FLOAT64))
bit_mask::destroy_bit_mask(reinterpret_cast<bit_mask::bit_mask_t*>(col.valid));
//TODO: remove after NaN support to equality operator is added
// if nan is counted as null when null is already present.
if (not nan_as_null and has_nans and cudf::has_nulls(input))
++count;
if (ignore_nulls and cudf::has_nulls(input))
return --count;
else
return count;
}
} // namespace cudf
| 655211d76db6e7c27e1faf7ab4c82d399577aa40.cu | /*
* Copyright (c) 2019, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*#include <cudf/cudf.h>
#include <cudf/types.hpp>
#include <cudf/legacy/copying.hpp>
#include <cudf/legacy/stream_compaction.hpp>
#include <cudf/table.hpp>
#include "table/device_table.cuh"
#include <table/device_table_row_operators.cuh>*/
#include "copy_if.cuh"
#include <cudf/legacy/table.hpp>
#include <table/legacy/device_table.cuh>
#include <table/legacy/device_table_row_operators.cuh>
#include <cudf/legacy/transform.hpp>
#include <rmm/thrust_rmm_allocator.h>
#include <cudf/utilities/legacy/nvcategory_util.hpp>
#include <nvstrings/NVCategory.h>
namespace cudf {
namespace detail {
/*
* unique_copy copies elements from the range [first, last) to a range beginning
* with output, except that in a consecutive group of duplicate elements only
* depending on last argument keep, only the first one is copied, or the last
* one is copied or neither is copied. The return value is the end of the range
* to which the elements are copied.
*/
template<typename Exec,
typename InputIterator,
typename OutputIterator,
typename BinaryPredicate,
typename IndexType = typename
thrust::iterator_difference<InputIterator>::type>
OutputIterator unique_copy(Exec&& exec,
InputIterator first,
InputIterator last,
OutputIterator output,
BinaryPredicate comp,
const duplicate_keep_option keep)
{
IndexType n = (last-first)-1;
if (keep == duplicate_keep_option::KEEP_FIRST) {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == 0 || !comp(first[i], first[i-1]));
});
} else if (keep == duplicate_keep_option::KEEP_LAST) {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == n || !comp(first[i], first[i+1]));
});
} else {
return thrust::copy_if(exec,
first,
last,
thrust::counting_iterator<IndexType>(0),
output,
[first, comp, n] __device__ (const IndexType i) {
return (i == 0 || !comp(first[i], first[i-1]))
&& (i == n || !comp(first[i], first[i+1]));
});
}
}
auto
get_unique_ordered_indices(const cudf::table& keys,
const duplicate_keep_option keep,
const bool nulls_are_equal = true,
cudaStream_t stream=0)
{
cudf::size_type ncols = keys.num_columns();
cudf::size_type nrows = keys.num_rows();
// sort only indices
rmm::device_vector<cudf::size_type> sorted_indices(nrows);
gdf_context context;
gdf_column sorted_indices_col;
CUDF_TRY(gdf_column_view(&sorted_indices_col, (void*)(sorted_indices.data().get()),
nullptr, nrows, GDF_INT32));
CUDF_TRY(gdf_order_by(keys.begin(),
nullptr,
keys.num_columns(),
&sorted_indices_col,
&context));
// extract unique indices
rmm::device_vector<cudf::size_type> unique_indices(nrows);
auto device_input_table = device_table::create(keys, stream);
rmm::device_vector<cudf::size_type>::iterator result_end;
if(cudf::has_nulls(keys)) {
auto comp = row_equality_comparator<true>(*device_input_table,
nulls_are_equal);
result_end = unique_copy(rmm::exec_policy(stream)->on(stream),
sorted_indices.begin(),
sorted_indices.end(),
unique_indices.begin(),
comp,
keep);
} else {
auto comp = row_equality_comparator<false>(*device_input_table,
nulls_are_equal);
result_end = unique_copy(rmm::exec_policy(stream)->on(stream),
sorted_indices.begin(),
sorted_indices.end(),
unique_indices.begin(),
comp,
keep);
}
//not resizing vector to avoid copy
return std::make_pair(unique_indices,
thrust::distance(unique_indices.begin(), result_end));
}
cudf::size_type unique_count(const cudf::table& keys,
const bool nulls_are_equal = true,
cudaStream_t stream=0)
{
cudf::size_type ncols = keys.num_columns();
cudf::size_type nrows = keys.num_rows();
// sort only indices
rmm::device_vector<cudf::size_type> sorted_indices(nrows);
gdf_context context;
gdf_column sorted_indices_col;
CUDF_TRY(gdf_column_view(&sorted_indices_col, static_cast<void*>(sorted_indices.data().get()),
nullptr, nrows, GDF_INT32));
CUDF_TRY(gdf_order_by(keys.begin(),
nullptr,
keys.num_columns(),
&sorted_indices_col,
&context));
// count unique elements
auto sorted_row_index = sorted_indices.begin();
auto device_input_table = device_table::create(keys, stream);
if(cudf::has_nulls(keys)) {
auto comp = row_equality_comparator<true>(*device_input_table,
nulls_are_equal);
return thrust::count_if(rmm::exec_policy(stream)->on(stream),
thrust::counting_iterator<cudf::size_type>(0),
thrust::counting_iterator<cudf::size_type>(nrows),
[sorted_row_index, comp]
__device__ (const cudf::size_type i) {
return (i == 0 || !comp(sorted_row_index[i], sorted_row_index[i-1]));
});
} else {
auto comp = row_equality_comparator<false>(*device_input_table,
nulls_are_equal);
return thrust::count_if(rmm::exec_policy(stream)->on(stream),
thrust::counting_iterator<cudf::size_type>(0),
thrust::counting_iterator<cudf::size_type>(nrows),
[sorted_row_index, comp]
__device__ (const cudf::size_type i) {
return (i == 0 || !comp(sorted_row_index[i], sorted_row_index[i-1]));
});
}
}
} //namespace detail
cudf::table drop_duplicates(const cudf::table& input,
const cudf::table& keys,
const duplicate_keep_option keep,
const bool nulls_are_equal)
{
CUDF_EXPECTS( input.num_rows() == keys.num_rows(), "number of \
rows in input table should be equal to number of rows in key colums table");
if (0 == input.num_rows() ||
0 == input.num_columns() ||
0 == keys.num_columns()
) {
return cudf::empty_like(input);
}
rmm::device_vector<cudf::size_type> unique_indices;
cudf::size_type unique_count;
std::tie(unique_indices, unique_count) =
detail::get_unique_ordered_indices(keys, keep, nulls_are_equal);
// Allocate output columns
cudf::table destination_table(unique_count,
cudf::column_dtypes(input),
cudf::column_dtype_infos(input), true);
// Ensure column names are preserved. Ideally we could call cudf::allocate_like
// here, but the above constructor allocates and fills null bitmaps differently
// than allocate_like. Doing this for now because the impending table + column
// re-design will handle this better than another cudf::allocate_like overload
std::transform(
input.begin(), input.end(),
destination_table.begin(), destination_table.begin(),
[](const gdf_column* inp_col, gdf_column* out_col) {
// a rather roundabout way to do a strcpy...
gdf_column_view_augmented(out_col,
out_col->data, out_col->valid,
out_col->size, out_col->dtype,
out_col->null_count,
out_col->dtype_info,
inp_col->col_name);
return out_col;
});
// run gather operation to establish new order
cudf::gather(&input, unique_indices.data().get(), &destination_table);
nvcategory_gather_table(input, destination_table);
return destination_table;
}
cudf::size_type unique_count(gdf_column const& input,
bool const ignore_nulls,
bool const nan_as_null)
{
if (0 == input.size || input.null_count == input.size) {
return 0;
}
gdf_column col{input};
//TODO: remove after NaN support to equality operator is added
//if (nan_as_null)
if ((col.dtype == GDF_FLOAT32 || col.dtype == GDF_FLOAT64)) {
auto temp = nans_to_nulls(col);
col.valid = reinterpret_cast<cudf::valid_type*>(temp.first);
col.null_count = temp.second;
}
bool const has_nans{col.null_count > input.null_count};
auto count = detail::unique_count({const_cast<gdf_column*>(&col)}, true);
if ((col.dtype == GDF_FLOAT32 || col.dtype == GDF_FLOAT64))
bit_mask::destroy_bit_mask(reinterpret_cast<bit_mask::bit_mask_t*>(col.valid));
//TODO: remove after NaN support to equality operator is added
// if nan is counted as null when null is already present.
if (not nan_as_null and has_nans and cudf::has_nulls(input))
++count;
if (ignore_nulls and cudf::has_nulls(input))
return --count;
else
return count;
}
} // namespace cudf
|
ae1b9597661887b8b622fe1bc4cfd448bc183e0e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Simple CUDA example by Ingemar Ragnemalm 2009. Simplest possible?
// Assigns every element in an array with its index.
// nvcc simple.cu -L /usr/local/cuda/lib -lcudart -o simple
#include <stdio.h>
static const int N = 2048;
static const int block_xDim = 256;
static const int block_yDim = 1;
__global__
void matrix_add(float* a, float* b, float *c)
{
uint i = (blockIdx.y * blockDim.y) + threadIdx.y;
uint j = (blockIdx.x * blockDim.x) + threadIdx.x;
if (i < N && j < N) {
uint idx = i * N + j;
c[idx] = a[idx] + b[idx];
}
}
int main()
{
const int size = N*N*sizeof(float);
hipEvent_t startEvent, endEvent;
float time;
float* a = new float[N*N];
float* b = new float[N*N];
float* c = new float[N*N];
float *ad, *bd, *cd;
// Initialize a and b
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
{
a[i+j*N] = 10 + i;
b[i+j*N] = (float)j / N;
}
hipMalloc( (void**)&ad, size );
hipMalloc((void**)&bd, size);
hipMalloc((void**)&cd, size);
/* Upload a to ad and b to bd */
hipMemcpy(ad, a, size, hipMemcpyHostToDevice);
hipMemcpy(bd, b, size, hipMemcpyHostToDevice);
// Insert event before kernel has run
hipEventCreate(&startEvent);
hipEventRecord(startEvent);
dim3 dimBlock( block_xDim, block_yDim);
dim3 dimGrid( (N + block_xDim - 1)/block_xDim, (N + block_yDim - 1)/block_yDim);
hipLaunchKernelGGL(( matrix_add), dim3(dimGrid), dim3(dimBlock), 0, 0, ad, bd, cd);
// Insert event after kernel has run
hipEventCreate(&endEvent);
hipEventRecord(endEvent);
// Wait for event to finish
hipEventSynchronize(endEvent);
hipDeviceSynchronize();
hipMemcpy( c, cd, size, hipMemcpyDeviceToHost );
hipFree( ad );
hipFree( bd );
hipFree( cd );
#if 0
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
printf("%0.2f ", c[i+j*N]);
}
printf("\n");
}
#endif
hipEventElapsedTime(&time, startEvent, endEvent);
printf("Time: %f milliseconds\n", time);
return EXIT_SUCCESS;
}
| ae1b9597661887b8b622fe1bc4cfd448bc183e0e.cu | // Simple CUDA example by Ingemar Ragnemalm 2009. Simplest possible?
// Assigns every element in an array with its index.
// nvcc simple.cu -L /usr/local/cuda/lib -lcudart -o simple
#include <stdio.h>
static const int N = 2048;
static const int block_xDim = 256;
static const int block_yDim = 1;
__global__
void matrix_add(float* a, float* b, float *c)
{
uint i = (blockIdx.y * blockDim.y) + threadIdx.y;
uint j = (blockIdx.x * blockDim.x) + threadIdx.x;
if (i < N && j < N) {
uint idx = i * N + j;
c[idx] = a[idx] + b[idx];
}
}
int main()
{
const int size = N*N*sizeof(float);
cudaEvent_t startEvent, endEvent;
float time;
float* a = new float[N*N];
float* b = new float[N*N];
float* c = new float[N*N];
float *ad, *bd, *cd;
// Initialize a and b
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
{
a[i+j*N] = 10 + i;
b[i+j*N] = (float)j / N;
}
cudaMalloc( (void**)&ad, size );
cudaMalloc((void**)&bd, size);
cudaMalloc((void**)&cd, size);
/* Upload a to ad and b to bd */
cudaMemcpy(ad, a, size, cudaMemcpyHostToDevice);
cudaMemcpy(bd, b, size, cudaMemcpyHostToDevice);
// Insert event before kernel has run
cudaEventCreate(&startEvent);
cudaEventRecord(startEvent);
dim3 dimBlock( block_xDim, block_yDim);
dim3 dimGrid( (N + block_xDim - 1)/block_xDim, (N + block_yDim - 1)/block_yDim);
matrix_add<<<dimGrid, dimBlock>>>(ad, bd, cd);
// Insert event after kernel has run
cudaEventCreate(&endEvent);
cudaEventRecord(endEvent);
// Wait for event to finish
cudaEventSynchronize(endEvent);
cudaThreadSynchronize();
cudaMemcpy( c, cd, size, cudaMemcpyDeviceToHost );
cudaFree( ad );
cudaFree( bd );
cudaFree( cd );
#if 0
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
printf("%0.2f ", c[i+j*N]);
}
printf("\n");
}
#endif
cudaEventElapsedTime(&time, startEvent, endEvent);
printf("Time: %f milliseconds\n", time);
return EXIT_SUCCESS;
}
|
6a482988235ac2efd9ba8596627f0865ffbb83ff.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "hist-equ.h"
#include <hip/hip_runtime.h>
#include <assert.h>
PGM_IMG contrast_enhancement_g_gpu_tiled(PGM_IMG img_in)
{
// time testing
hipEvent_t start, stop;
hipEventCreate(&start);
hipEventCreate(&stop);
float milliseconds =0;
PGM_IMG result;
int hist[256];
int cdf[256];
int imgsize;
int nbr_bin;
int min, d, i;
int lines;
// device variables
int *d_hist;
unsigned char *d_img;
int *d_imgsize;
int *d_nbr_bin;
unsigned char *d_result;
int *d_min;
int *d_d;
int *d_cdf;
int *d_lines;
int *d_lut;
result.w = img_in.w;
result.h = img_in.h;
result.img = (unsigned char *)malloc(result.w * result.h * sizeof(unsigned char));
imgsize = img_in.w * img_in.h;
nbr_bin = 256;
lines = (img_in.w*img_in.h)/256;
for(i = 0; i < 256; ++i){
hist[i] = 0;
}
// device memory allocation and copying data over
hipMalloc(&d_hist, sizeof(int) * 256);
hipMalloc(&d_img, img_in.w * img_in.h * sizeof(unsigned char));
hipMalloc(&d_imgsize, sizeof(int));
hipMalloc(&d_nbr_bin, sizeof(int));
hipMalloc(&d_lines, sizeof(int));
hipMemcpy(d_img, img_in.img, img_in.w * img_in.h * sizeof(unsigned char), hipMemcpyHostToDevice);
hipMemcpy(d_imgsize, &imgsize, sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(d_nbr_bin, &nbr_bin, sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(d_lines, &lines, sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(d_hist, hist, sizeof(int)*256, hipMemcpyHostToDevice);
// gpu function
hipEventRecord(start);
hipLaunchKernelGGL(( histogram_gpu_tiled), dim3(BLOCKS), dim3(256), 0, 0, d_hist, d_img, d_imgsize, d_nbr_bin, d_lines );
hipEventRecord(stop);
hipMemcpy(hist, d_hist, sizeof(int)*256, hipMemcpyDeviceToHost);
hipEventSynchronize(stop);
hipEventElapsedTime(&milliseconds, start, stop);
//printf("GPU-tiled MILISEC: %f\n", milliseconds * 0.001);
// cdf needs to be constructed sequentially here
cdf[0] = hist[0];
for(i = 1; i < 256; ++i){
cdf[i] = hist[i] + cdf[i-1];
}
i = 0;
min = 0;
while(min == 0){
min = hist[i++];
}
d = imgsize - min;
// device memory allocation and copying data over
hipMalloc(&d_min, sizeof(int));
hipMalloc(&d_d , sizeof(int));
hipMalloc(&d_result, sizeof(unsigned char) * img_in.w * img_in.h);
hipMalloc(&d_cdf, sizeof(int) * 256);
hipMalloc(&d_lut, sizeof(int) * 256);
hipMemcpy(d_min, &min, sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(d_d , &d , sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(d_cdf, cdf , sizeof(int)*256, hipMemcpyHostToDevice);
// gpu function
hipLaunchKernelGGL(( histogram_equalization_gpu_tiled), dim3(1),dim3(256), 0, 0, d_min, d_d, d_cdf, d_lut);
hipLaunchKernelGGL(( histogram_equalization_gpu_tiled_p2), dim3(BLOCKS),dim3(THREADS), 0, 0, d_result, d_img, d_imgsize, d_lut, d_lines);
hipMemcpy(result.img, d_result, sizeof(unsigned char) * img_in.w * img_in.h, hipMemcpyDeviceToHost);
// free device memory
hipFree( d_cdf );
hipFree( d_result );
hipFree( d_min);
hipFree( d_d );
hipFree( d_hist );
hipFree( d_img );
hipFree( d_imgsize );
hipFree( d_nbr_bin );
return result;
}
PPM_IMG contrast_enhancement_c_yuv_gpu_tiled(PPM_IMG img_in){
// Timing
hipEvent_t start, stop;
hipEventCreate(&start);
hipEventCreate(&stop);
PPM_IMG result;
result.w = img_in.w;
result.h = img_in.h;
int imgsize = (img_in.h * img_in.w);
PGM_IMG temp;
int lines = ceil( imgsize / THREADS ) ;
// Device Variables
unsigned char *d_img_in_r;
unsigned char *d_img_in_g;
unsigned char *d_img_in_b;
unsigned char *d_img_out_y;
unsigned char *d_img_out_u;
unsigned char *d_img_out_v;
int *d_lines;
int *d_imgsize;
float milliseconds = 0;
hipMalloc( &d_img_in_r , sizeof(unsigned char) * imgsize );
hipMemcpy(d_img_in_r, img_in.img_r , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_in_g , sizeof(unsigned char) * imgsize );
hipMemcpy(d_img_in_g, img_in.img_g , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_in_b , sizeof(unsigned char) * imgsize );
hipMemcpy(d_img_in_b, img_in.img_b , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_out_y , sizeof(unsigned char) * img_in.h * img_in.w );
hipMalloc( &d_img_out_u , sizeof(unsigned char) * img_in.h * img_in.w );
hipMalloc( &d_img_out_v , sizeof(unsigned char) * img_in.h * img_in.w );
hipMalloc( &d_lines , sizeof(int) );
hipMalloc( &d_imgsize, sizeof(int) );
hipMemcpy( d_lines, &lines, sizeof(int), hipMemcpyHostToDevice );
hipMemcpy( d_imgsize, &imgsize, sizeof(int), hipMemcpyHostToDevice );
hipEventRecord(start);
hipLaunchKernelGGL(( rbg2yuv_gpu), dim3(BLOCKS),dim3(THREADS), 0, 0, d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_y, d_img_out_u, d_img_out_v, d_lines, d_imgsize);
temp.w = img_in.w;
temp.h = img_in.h;
temp.img = (unsigned char *)malloc( sizeof(unsigned char) * temp.w * temp.h);
hipMemcpy(temp.img, d_img_out_y, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
// do histogram stuff here -- no diff than gray scale so just use the same function.
temp = contrast_enhancement_g_gpu_tiled(temp);
hipMemcpy(d_img_out_y, temp.img, sizeof(unsigned char) * imgsize, hipMemcpyHostToDevice);
hipLaunchKernelGGL(( yuv2rbg_gpu), dim3(BLOCKS),dim3(THREADS), 0, 0, d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_y, d_img_out_u, d_img_out_v, d_lines, d_imgsize);
hipEventRecord(stop);
hipEventSynchronize(stop);
hipEventElapsedTime(&milliseconds, start, stop);
printf("contrast_enhancement_c_yuv_gpu_tiled: %f\n", milliseconds*0.001);
// init result arrays while gpu is doing work
result.img_r = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_g = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_b = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
// cpy over gpu work to the return array
hipMemcpy( result.img_r , d_img_in_r, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
hipMemcpy( result.img_g , d_img_in_g, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
hipMemcpy( result.img_b , d_img_in_b, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
// free cuda variables
hipFree( d_img_in_r );
hipFree( d_img_in_g );
hipFree( d_img_in_b );
hipFree( d_img_out_y );
hipFree( d_img_out_u );
hipFree( d_img_out_v );
hipFree( d_lines );
hipFree( d_imgsize );
return result;
}
PPM_IMG contrast_enhancement_c_hsl_gpu_tiled(PPM_IMG img_in){
// Timing
hipEvent_t start, stop;
float milliseconds = 0;
hipEventCreate(&start);
hipEventCreate(&stop);
PPM_IMG result;
PGM_IMG temp;
temp.w = img_in.w;
temp.h = img_in.h;
result.w = img_in.w;
result.h = img_in.h;
int imgsize = img_in.w * img_in.h;
int lines = ceil( imgsize / THREADS ) ;
// Device Variables
unsigned char *d_img_in_r;
unsigned char *d_img_in_g;
unsigned char *d_img_in_b;
float *d_img_out_h;
float *d_img_out_s;
unsigned char *d_img_out_l;
int *d_lines;
int *d_imgsize;
hipMalloc( &d_img_in_r , sizeof(unsigned char) * imgsize );
hipMemcpy( d_img_in_r, img_in.img_r , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_in_g , sizeof(unsigned char) * imgsize );
hipMemcpy( d_img_in_g, img_in.img_g , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_in_b , sizeof(unsigned char) * imgsize );
hipMemcpy( d_img_in_b, img_in.img_b , sizeof(unsigned char) * imgsize , hipMemcpyHostToDevice);
hipMalloc( &d_img_out_h , sizeof(float) * imgsize );
hipMalloc( &d_img_out_s , sizeof(float) * imgsize );
hipMalloc( &d_img_out_l , sizeof(unsigned char) * imgsize );
hipMalloc( &d_lines, sizeof(int) );
hipMalloc( &d_imgsize, sizeof(int) );
hipMemcpy( d_lines, &lines, sizeof(int), hipMemcpyHostToDevice);
hipMemcpy( d_imgsize, &imgsize, sizeof(int), hipMemcpyHostToDevice);
hipEventRecord(start);
hipLaunchKernelGGL(( rgb2hsl_gpu), dim3(BLOCKS),dim3(THREADS), 0, 0, d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_h, d_img_out_s, d_img_out_l, d_lines, d_imgsize);
if(!(temp.img = (unsigned char*)malloc(sizeof(unsigned char) * imgsize))){
printf("Malloc failed\n");
assert(0);
}
hipMemcpy( temp.img, d_img_out_l, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
temp = contrast_enhancement_g_gpu_tiled(temp);
hipMemcpy( d_img_out_l, temp.img, sizeof(unsigned char) * imgsize, hipMemcpyHostToDevice);
hipLaunchKernelGGL(( hsl2rgb_gpu), dim3(BLOCKS),dim3(THREADS), 0, 0, d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_h, d_img_out_s, d_img_out_l, d_lines, d_imgsize);
hipEventRecord(stop);
result.img_r = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_g = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_b = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
hipEventSynchronize(stop);
hipEventElapsedTime(&milliseconds, start, stop);
printf("contrast_enhancement_c_hsl_gpu_tiled: %f\n", milliseconds*0.001);
// cpy over gpu work to the return array
hipMemcpy( result.img_r , d_img_in_r, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
hipMemcpy( result.img_g , d_img_in_g, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
hipMemcpy( result.img_b , d_img_in_b, sizeof(unsigned char) * imgsize, hipMemcpyDeviceToHost);
// free cuda variables
hipFree( d_img_in_r );
hipFree( d_img_in_g );
hipFree( d_img_in_b );
hipFree( d_img_out_h );
hipFree( d_img_out_s );
hipFree( d_img_out_l );
hipFree( d_lines );
hipFree( d_imgsize );
return result;
}
PPM_IMG contrast_enhancement_c_rgb_gpu_tiled(PPM_IMG img_in)
{
// Timing
hipEvent_t start, stop;
float milliseconds = 0;
hipEventCreate(&start);
hipEventCreate(&stop);
PPM_IMG result;
result.w = img_in.w;
result.h = img_in.h;
PGM_IMG temp;
temp.w = img_in.w;
temp.h = img_in.h;
hipEventRecord(start);
temp.img = img_in.img_r;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_r = temp.img;
temp.img = img_in.img_g;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_g = temp.img;
temp.img = img_in.img_b;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_b = temp.img;
hipEventRecord(stop);
hipEventSynchronize(stop);
hipEventElapsedTime(&milliseconds, start, stop);
printf("colour_enhancement_c_rgb_gpu_tiled: %f\n", milliseconds * 0.001);
return result;
}
| 6a482988235ac2efd9ba8596627f0865ffbb83ff.cu | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "hist-equ.h"
#include <cuda_runtime.h>
#include <assert.h>
PGM_IMG contrast_enhancement_g_gpu_tiled(PGM_IMG img_in)
{
// time testing
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
float milliseconds =0;
PGM_IMG result;
int hist[256];
int cdf[256];
int imgsize;
int nbr_bin;
int min, d, i;
int lines;
// device variables
int *d_hist;
unsigned char *d_img;
int *d_imgsize;
int *d_nbr_bin;
unsigned char *d_result;
int *d_min;
int *d_d;
int *d_cdf;
int *d_lines;
int *d_lut;
result.w = img_in.w;
result.h = img_in.h;
result.img = (unsigned char *)malloc(result.w * result.h * sizeof(unsigned char));
imgsize = img_in.w * img_in.h;
nbr_bin = 256;
lines = (img_in.w*img_in.h)/256;
for(i = 0; i < 256; ++i){
hist[i] = 0;
}
// device memory allocation and copying data over
cudaMalloc(&d_hist, sizeof(int) * 256);
cudaMalloc(&d_img, img_in.w * img_in.h * sizeof(unsigned char));
cudaMalloc(&d_imgsize, sizeof(int));
cudaMalloc(&d_nbr_bin, sizeof(int));
cudaMalloc(&d_lines, sizeof(int));
cudaMemcpy(d_img, img_in.img, img_in.w * img_in.h * sizeof(unsigned char), cudaMemcpyHostToDevice);
cudaMemcpy(d_imgsize, &imgsize, sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(d_nbr_bin, &nbr_bin, sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(d_lines, &lines, sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(d_hist, hist, sizeof(int)*256, cudaMemcpyHostToDevice);
// gpu function
cudaEventRecord(start);
histogram_gpu_tiled<<<BLOCKS, 256>>>( d_hist, d_img, d_imgsize, d_nbr_bin, d_lines );
cudaEventRecord(stop);
cudaMemcpy(hist, d_hist, sizeof(int)*256, cudaMemcpyDeviceToHost);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&milliseconds, start, stop);
//printf("GPU-tiled MILISEC: %f\n", milliseconds * 0.001);
// cdf needs to be constructed sequentially here
cdf[0] = hist[0];
for(i = 1; i < 256; ++i){
cdf[i] = hist[i] + cdf[i-1];
}
i = 0;
min = 0;
while(min == 0){
min = hist[i++];
}
d = imgsize - min;
// device memory allocation and copying data over
cudaMalloc(&d_min, sizeof(int));
cudaMalloc(&d_d , sizeof(int));
cudaMalloc(&d_result, sizeof(unsigned char) * img_in.w * img_in.h);
cudaMalloc(&d_cdf, sizeof(int) * 256);
cudaMalloc(&d_lut, sizeof(int) * 256);
cudaMemcpy(d_min, &min, sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(d_d , &d , sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(d_cdf, cdf , sizeof(int)*256, cudaMemcpyHostToDevice);
// gpu function
histogram_equalization_gpu_tiled<<<1,256>>>( d_min, d_d, d_cdf, d_lut);
histogram_equalization_gpu_tiled_p2<<<BLOCKS,THREADS>>>(d_result, d_img, d_imgsize, d_lut, d_lines);
cudaMemcpy(result.img, d_result, sizeof(unsigned char) * img_in.w * img_in.h, cudaMemcpyDeviceToHost);
// free device memory
cudaFree( d_cdf );
cudaFree( d_result );
cudaFree( d_min);
cudaFree( d_d );
cudaFree( d_hist );
cudaFree( d_img );
cudaFree( d_imgsize );
cudaFree( d_nbr_bin );
return result;
}
PPM_IMG contrast_enhancement_c_yuv_gpu_tiled(PPM_IMG img_in){
// Timing
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
PPM_IMG result;
result.w = img_in.w;
result.h = img_in.h;
int imgsize = (img_in.h * img_in.w);
PGM_IMG temp;
int lines = ceil( imgsize / THREADS ) ;
// Device Variables
unsigned char *d_img_in_r;
unsigned char *d_img_in_g;
unsigned char *d_img_in_b;
unsigned char *d_img_out_y;
unsigned char *d_img_out_u;
unsigned char *d_img_out_v;
int *d_lines;
int *d_imgsize;
float milliseconds = 0;
cudaMalloc( &d_img_in_r , sizeof(unsigned char) * imgsize );
cudaMemcpy(d_img_in_r, img_in.img_r , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_in_g , sizeof(unsigned char) * imgsize );
cudaMemcpy(d_img_in_g, img_in.img_g , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_in_b , sizeof(unsigned char) * imgsize );
cudaMemcpy(d_img_in_b, img_in.img_b , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_out_y , sizeof(unsigned char) * img_in.h * img_in.w );
cudaMalloc( &d_img_out_u , sizeof(unsigned char) * img_in.h * img_in.w );
cudaMalloc( &d_img_out_v , sizeof(unsigned char) * img_in.h * img_in.w );
cudaMalloc( &d_lines , sizeof(int) );
cudaMalloc( &d_imgsize, sizeof(int) );
cudaMemcpy( d_lines, &lines, sizeof(int), cudaMemcpyHostToDevice );
cudaMemcpy( d_imgsize, &imgsize, sizeof(int), cudaMemcpyHostToDevice );
cudaEventRecord(start);
rbg2yuv_gpu<<<BLOCKS,THREADS>>>(d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_y, d_img_out_u, d_img_out_v, d_lines, d_imgsize);
temp.w = img_in.w;
temp.h = img_in.h;
temp.img = (unsigned char *)malloc( sizeof(unsigned char) * temp.w * temp.h);
cudaMemcpy(temp.img, d_img_out_y, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
// do histogram stuff here -- no diff than gray scale so just use the same function.
temp = contrast_enhancement_g_gpu_tiled(temp);
cudaMemcpy(d_img_out_y, temp.img, sizeof(unsigned char) * imgsize, cudaMemcpyHostToDevice);
yuv2rbg_gpu<<<BLOCKS,THREADS>>>(d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_y, d_img_out_u, d_img_out_v, d_lines, d_imgsize);
cudaEventRecord(stop);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&milliseconds, start, stop);
printf("contrast_enhancement_c_yuv_gpu_tiled: %f\n", milliseconds*0.001);
// init result arrays while gpu is doing work
result.img_r = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_g = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_b = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
// cpy over gpu work to the return array
cudaMemcpy( result.img_r , d_img_in_r, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
cudaMemcpy( result.img_g , d_img_in_g, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
cudaMemcpy( result.img_b , d_img_in_b, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
// free cuda variables
cudaFree( d_img_in_r );
cudaFree( d_img_in_g );
cudaFree( d_img_in_b );
cudaFree( d_img_out_y );
cudaFree( d_img_out_u );
cudaFree( d_img_out_v );
cudaFree( d_lines );
cudaFree( d_imgsize );
return result;
}
PPM_IMG contrast_enhancement_c_hsl_gpu_tiled(PPM_IMG img_in){
// Timing
cudaEvent_t start, stop;
float milliseconds = 0;
cudaEventCreate(&start);
cudaEventCreate(&stop);
PPM_IMG result;
PGM_IMG temp;
temp.w = img_in.w;
temp.h = img_in.h;
result.w = img_in.w;
result.h = img_in.h;
int imgsize = img_in.w * img_in.h;
int lines = ceil( imgsize / THREADS ) ;
// Device Variables
unsigned char *d_img_in_r;
unsigned char *d_img_in_g;
unsigned char *d_img_in_b;
float *d_img_out_h;
float *d_img_out_s;
unsigned char *d_img_out_l;
int *d_lines;
int *d_imgsize;
cudaMalloc( &d_img_in_r , sizeof(unsigned char) * imgsize );
cudaMemcpy( d_img_in_r, img_in.img_r , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_in_g , sizeof(unsigned char) * imgsize );
cudaMemcpy( d_img_in_g, img_in.img_g , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_in_b , sizeof(unsigned char) * imgsize );
cudaMemcpy( d_img_in_b, img_in.img_b , sizeof(unsigned char) * imgsize , cudaMemcpyHostToDevice);
cudaMalloc( &d_img_out_h , sizeof(float) * imgsize );
cudaMalloc( &d_img_out_s , sizeof(float) * imgsize );
cudaMalloc( &d_img_out_l , sizeof(unsigned char) * imgsize );
cudaMalloc( &d_lines, sizeof(int) );
cudaMalloc( &d_imgsize, sizeof(int) );
cudaMemcpy( d_lines, &lines, sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy( d_imgsize, &imgsize, sizeof(int), cudaMemcpyHostToDevice);
cudaEventRecord(start);
rgb2hsl_gpu<<<BLOCKS,THREADS>>>( d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_h, d_img_out_s, d_img_out_l, d_lines, d_imgsize);
if(!(temp.img = (unsigned char*)malloc(sizeof(unsigned char) * imgsize))){
printf("Malloc failed\n");
assert(0);
}
cudaMemcpy( temp.img, d_img_out_l, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
temp = contrast_enhancement_g_gpu_tiled(temp);
cudaMemcpy( d_img_out_l, temp.img, sizeof(unsigned char) * imgsize, cudaMemcpyHostToDevice);
hsl2rgb_gpu<<<BLOCKS,THREADS>>>( d_img_in_r, d_img_in_g, d_img_in_b, d_img_out_h, d_img_out_s, d_img_out_l, d_lines, d_imgsize);
cudaEventRecord(stop);
result.img_r = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_g = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
result.img_b = (unsigned char *)malloc( sizeof(unsigned char) * imgsize );
cudaEventSynchronize(stop);
cudaEventElapsedTime(&milliseconds, start, stop);
printf("contrast_enhancement_c_hsl_gpu_tiled: %f\n", milliseconds*0.001);
// cpy over gpu work to the return array
cudaMemcpy( result.img_r , d_img_in_r, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
cudaMemcpy( result.img_g , d_img_in_g, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
cudaMemcpy( result.img_b , d_img_in_b, sizeof(unsigned char) * imgsize, cudaMemcpyDeviceToHost);
// free cuda variables
cudaFree( d_img_in_r );
cudaFree( d_img_in_g );
cudaFree( d_img_in_b );
cudaFree( d_img_out_h );
cudaFree( d_img_out_s );
cudaFree( d_img_out_l );
cudaFree( d_lines );
cudaFree( d_imgsize );
return result;
}
PPM_IMG contrast_enhancement_c_rgb_gpu_tiled(PPM_IMG img_in)
{
// Timing
cudaEvent_t start, stop;
float milliseconds = 0;
cudaEventCreate(&start);
cudaEventCreate(&stop);
PPM_IMG result;
result.w = img_in.w;
result.h = img_in.h;
PGM_IMG temp;
temp.w = img_in.w;
temp.h = img_in.h;
cudaEventRecord(start);
temp.img = img_in.img_r;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_r = temp.img;
temp.img = img_in.img_g;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_g = temp.img;
temp.img = img_in.img_b;
temp = contrast_enhancement_g_gpu_tiled( temp );
result.img_b = temp.img;
cudaEventRecord(stop);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&milliseconds, start, stop);
printf("colour_enhancement_c_rgb_gpu_tiled: %f\n", milliseconds * 0.001);
return result;
}
|
988aba8a4e48409aab571147a4b1961bc8d26d88.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/scan.h>
#include "common.h"
#include "thrust.h"
namespace StreamCompaction {
namespace Thrust {
/**
* Performs prefix-sum (aka scan) on idata, storing the result into odata.
*/
void scan(int n, int *odata, const int *idata) {
// TODO use `thrust::exclusive_scan`
// example: for device_vectors dv_in and dv_out:
// thrust::exclusive_scan(dv_in.begin(), dv_in.end(), dv_out.begin());
// Initialize
thrust::host_vector<int> hst_v_in(idata,idata+n);
thrust::device_vector<int> v_in = hst_v_in;
thrust::device_vector<int> v_out(n);
hipEvent_t start, stop;
hipEventCreate(&start);
hipEventCreate(&stop);
hipEventRecord(start);
// Scan
thrust::exclusive_scan(v_in.begin(), v_in.end(), v_in.begin());
hipEventRecord(stop);
hipEventSynchronize(stop);
float ms = 0;
hipEventElapsedTime(&ms, start, stop);
printf("thrust time (s): %f\n",ms/1000.0);
thrust::host_vector<int> hst_v_out = v_in;
memcpy(odata,hst_v_out.data(),n*sizeof(int));
}
}
}
| 988aba8a4e48409aab571147a4b1961bc8d26d88.cu | #include <cuda.h>
#include <cuda_runtime.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/scan.h>
#include "common.h"
#include "thrust.h"
namespace StreamCompaction {
namespace Thrust {
/**
* Performs prefix-sum (aka scan) on idata, storing the result into odata.
*/
void scan(int n, int *odata, const int *idata) {
// TODO use `thrust::exclusive_scan`
// example: for device_vectors dv_in and dv_out:
// thrust::exclusive_scan(dv_in.begin(), dv_in.end(), dv_out.begin());
// Initialize
thrust::host_vector<int> hst_v_in(idata,idata+n);
thrust::device_vector<int> v_in = hst_v_in;
thrust::device_vector<int> v_out(n);
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start);
// Scan
thrust::exclusive_scan(v_in.begin(), v_in.end(), v_in.begin());
cudaEventRecord(stop);
cudaEventSynchronize(stop);
float ms = 0;
cudaEventElapsedTime(&ms, start, stop);
printf("thrust time (s): %f\n",ms/1000.0);
thrust::host_vector<int> hst_v_out = v_in;
memcpy(odata,hst_v_out.data(),n*sizeof(int));
}
}
}
|
8ca579fa8fe025066433c4e4376f04c656eb1c16.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <fstream>
#include <hiprand/hiprand.h>
#include <rocblas.h>
#include <iomanip>
#include <omp.h>
//author C.H. Wang
//enable OMP
//#define OPENMP_ENABLE
#define MAX(x, y) ((x>y) ? x : y)
// Define some error checking macros.
#define cudaErrCheck(stat) { cudaErrCheck_((stat), __FILE__, __LINE__); }
void cudaErrCheck_(hipError_t stat, const char *file, int line) {
if (stat != hipSuccess) {
fprintf(stderr, "CUDA Error: %s %s %d\n", hipGetErrorString(stat), file, line);
}
}
#define cublasErrCheck(stat) { cublasErrCheck_((stat), __FILE__, __LINE__); }
void cublasErrCheck_(hipblasStatus_t stat, const char *file, int line) {
if (stat != HIPBLAS_STATUS_SUCCESS) {
fprintf(stderr, "cuBLAS Error: %d %s %d\n", stat, file, line);
}
}
#define curandErrCheck(stat) { curandErrCheck_((stat), __FILE__, __LINE__); }
void curandErrCheck_(hiprandStatus_t stat, const char *file, int line) {
if (stat != HIPRAND_STATUS_SUCCESS) {
fprintf(stderr, "cuRand Error: %d %s %d\n", stat, file, line);
}
}
double cal_tflops(int m, int n, int k, double msec)
{
double flops = 2. * m * n * k;
double tflops = (1E-12*flops) / (1E-3*msec);
return tflops;
}
__global__ void assignFloatValue (float *out, int n, float value) {
int idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < n) {
out[idx] = value;
}
}
__global__ void assignHalfValue (half *out, int n, float value) {
int idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < n) {
out[idx] = value;
}
}
void correctnessCheck(int m, int n, int k, float *host, float value){
for (int i = 0; i < m * n; i++) {
float val = host[i];
if ( val != k * value * value) {
std::cout << "ERROR value = " << val<< std::endl;
}
}
}
void printTime(float cublasTime, int m, int n, int k, float &s_max_tflops, int &s_max_m_n, int &s_max_k ){
float tflops = cal_tflops(m, n, k, cublasTime);
if (tflops > s_max_tflops){
s_max_tflops = tflops;
s_max_m_n = m;
s_max_k = k;
}
std::cout << std::setw(7) << m << ",";
std::cout << std::setw(7) << n << ",";
std::cout << std::setw(7) << k << ",";
std::cout << std::setw(15) << std::setprecision(4) << cublasTime << ",";
std::cout << std::setw(15) << std::setprecision(4) << tflops << "," << std::endl;
}
//arguments
bool parseString(const char* arg, const char* name, std::string& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = arg + n + 3;
std::cout << name << ": " << value << std::endl;
}
return match;
}
bool parseInt(const char* arg, const char* name, int& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = atoi(arg + n + 3);
std::cout << name << ": " << value << std::endl;
}
return match;
}
bool parseBool(const char* arg, const char* name, bool& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n);
if (match)
{
std::cout << name << std::endl;
value = true;
}
return match;
}
bool parseFloat(const char* arg, const char* name, float& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = atof(arg + n + 3);
std::cout << name << ": " << value << std::endl;
}
return match;
}
//author C.H. Wang
struct Params
{
int mn{512};
int k{512};
int gemmTypes{1};
bool findBest{false};
bool stress{false};
bool autoStress{false};
} gParams;
static void printUsage()
{
printf("\n");
printf("Find Best MNK Usage : ./all_gemm --gemmType=N --findBest \n");
printf("Find Best MNK + Stress Usage: ./all_gemm --gemmType=N --autoStress \n");
printf("Stress Usage : ./all_gemm --gemmType=N --stress --mn=xxx --k=yyy \n");
printf("gemmTypes: FP32_CUDA =1\n");
//author C.h. Wang
printf(" FP16_CUDA =2\n");
printf(" INT8_TENSOR =3\n");
printf(" FP16_TENSOR =4\n");
printf(" FP16_32_TENSOR=5\n");
fflush(stdout);
}
bool parseArgs(int argc, char* argv[])
{
if (argc < 1)
{
printUsage();
return false;
}
for (int j = 1; j < argc; j++)
{
if (parseInt(argv[j], "k", gParams.k)
|| parseInt(argv[j], "mn", gParams.mn)
|| parseInt(argv[j], "gemmTypes", gParams.gemmTypes)
)
continue;
if (parseBool(argv[j], "findBest", gParams.findBest)
|| parseBool(argv[j], "stress", gParams.stress)
|| parseBool(argv[j], "autoStress", gParams.autoStress) )
continue;
printf("Unknown argument: %s\n", argv[j]);
return false;
}
return true;
}
//arguments end
// find mnk
void findMaxMNK(int argc, char* argv[] ){
int m,n,k;
float s_max_tflops = 0;
int s_max_m_n = 0;
int s_max_k = 0;
if (gParams.gemmTypes==3 ) {
std::cout << "[TensorCore INT8(INT32 accumulation) Time and TOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TOPS";
std::cout << std::endl;
// for tensorcore test TODO: to verify the int8 with int8 accumulation
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
int8_t *a_;
int8_t *b_;
int *c_cublas;
int *c_host_cublas;
//const int value = 1;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_, m * k * sizeof(int8_t)));
cudaErrCheck(hipMalloc((void**)&b_, k * m * sizeof(int8_t)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(int)));
c_host_cublas = (int*)malloc(m * n * sizeof(int));
//TODO hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
//assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
int alpha = 1;
int beta = 0;
int numRepeats = 1;
// Warp up not really needed here as many params will be tested
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_, HIP_R_8I, m,
b_, HIP_R_8I, n,
&beta,
c_cublas, HIP_R_32I, m,
HIP_R_32I, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_));
cudaErrCheck(hipFree(b_));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==4 ) {
std::cout << "[TensorCore FP16(FP16 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
s_max_m_n = 0;
s_max_k = 0;
// for tensorcore test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, HIP_R_16F, m,
b_fp16, HIP_R_16F, n,
&beta,
c_cublas, HIP_R_16F, m,
HIP_R_16F, CUBLAS_GEMM_DFALT_TENSOR_OP);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==5 ) {
std::cout << "[TensorCore FP16(FP32 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for tensorcore test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Warp up not really needed
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, HIP_R_16F, m,
b_fp16, HIP_R_16F, n,
&beta,
c_cublas, HIP_R_32F, m,
HIP_R_32F, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==1 ) {
std::cout << "[CUDA core FP32 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
float *a_fp32;
float *b_fp32;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp32, m * k * sizeof(float)));
cudaErrCheck(hipMalloc((void**)&b_fp32, k * n * sizeof(float)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignFloatValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp32, m*k, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp32, k*n, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasSgemm(cublasHandle,
HIPBLAS_OP_N,
HIPBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp32, m,
b_fp32, n,
&beta,
c_cublas, m);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime = 0.0f;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp32));
cudaErrCheck(hipFree(b_fp32));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==2 ) {
std::cout << "[CUDA core FP16 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
half alpha = 1.0f;
half beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasHgemm(cublasHandle,
HIPBLAS_OP_N,
HIPBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp16, m,
b_fp16, n,
&beta,
c_cublas, m);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
}
gParams.mn=s_max_m_n;
gParams.k=s_max_k;
}
//Stress
void stress(int argc, char* argv[] ){
int m=gParams.mn;
int n=gParams.mn;
int k=gParams.k;
//setup the mnk
#ifdef OPENMP_ENABLE
int num_gpus;
hipGetDeviceCount(&num_gpus);
printf("Num GPU->%d \n",num_gpus);
if(num_gpus < 1)
{
printf("no CUDA capable devices were detected\n");
exit(1);
}
//OMP starting...
#pragma omp parallel num_threads(num_gpus)
{
unsigned int cpu_thread_id = omp_get_thread_num();
int gpu_id = -1;
hipSetDevice(cpu_thread_id % num_gpus); // "% num_gpus" allows more CPU threads than GPU devices
hipGetDevice(&gpu_id);
printf("GPU->%d \n",gpu_id);
#endif
float s_max_tflops = 0;
int s_max_m_n = 0;
int s_max_k = 0;
if (gParams.gemmTypes==3) {
std::cout << "[TensorCore INT8(INT32 accumulation) Time and TOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TOPS";
std::cout << std::endl;
// for tensorcore test TODO: to verify the int8 with int8 accumulation
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
int8_t *a_;
int8_t *b_;
int *c_cublas;
int *c_host_cublas;
//const int value = 1;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_, m * k * sizeof(int8_t)));
cudaErrCheck(hipMalloc((void**)&b_, k * m * sizeof(int8_t)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(int)));
c_host_cublas = (int*)malloc(m * n * sizeof(int));
//TODO hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
//assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
int alpha = 1;
int beta = 0;
int numRepeats = 1;
// Warp up not really needed here as many params will be tested
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_, HIP_R_8I, m,
b_, HIP_R_8I, n,
&beta,
c_cublas, HIP_R_32I, m,
HIP_R_32I, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_));
cudaErrCheck(hipFree(b_));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(hipDeviceReset());
#ifdef OPENMP_ENABLE
#pragma omp barrier
hipDeviceSynchronize();
#endif
}
if (gParams.gemmTypes==4 ) {
std::cout << "[TensorCore FP16(FP16 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
s_max_m_n = 0;
s_max_k = 0;
// for tensorcore test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, HIP_R_16F, m,
b_fp16, HIP_R_16F, n,
&beta,
c_cublas, HIP_R_16F, m,
HIP_R_16F, CUBLAS_GEMM_DFALT_TENSOR_OP);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
}//}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
hipDeviceSynchronize();
#endif
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==5) {
std::cout << "[TensorCore FP16(FP32 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for tensorcore test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Warp up not really needed
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(hipblasGemmEx(cublasHandle, HIPBLAS_OP_N, HIPBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, HIP_R_16F, m,
b_fp16, HIP_R_16F, n,
&beta,
c_cublas, HIP_R_32F, m,
HIP_R_32F, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
hipDeviceSynchronize();
#endif
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==1 ) {
std::cout << "[CUDA core FP32 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
float *a_fp32;
float *b_fp32;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp32, m * k * sizeof(float)));
cudaErrCheck(hipMalloc((void**)&b_fp32, k * n * sizeof(float)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignFloatValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp32, m*k, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp32, k*n, value);
hipLaunchKernelGGL(( assignFloatValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasSgemm(cublasHandle,
HIPBLAS_OP_N,
HIPBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp32, m,
b_fp32, n,
&beta,
c_cublas, m);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime = 0.0f;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp32));
cudaErrCheck(hipFree(b_fp32));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
hipDeviceSynchronize();
#endif
cudaErrCheck(hipDeviceReset());
}
if (gParams.gemmTypes==2 ) {
std::cout << "[CUDA core FP16 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
hipblasHandle_t cublasHandle;
hipEvent_t startcublas;
hipEvent_t stopcublas;
cudaErrCheck(hipEventCreate(&startcublas));
cudaErrCheck(hipEventCreate(&stopcublas));
cublasErrCheck(hipblasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(hipMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(hipMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// hiprand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
hipLaunchKernelGGL(( assignHalfValue) , dim3((m * k + 255) / 256), dim3(256) , 0, 0, a_fp16, m*k, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, b_fp16, k*n, value);
hipLaunchKernelGGL(( assignHalfValue) , dim3((k * n + 255) / 256), dim3(256) , 0, 0, c_cublas, m*n, 0.0f);
half alpha = 1.0f;
half beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(hipEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
hipblasHgemm(cublasHandle,
HIPBLAS_OP_N,
HIPBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp16, m,
b_fp16, n,
&beta,
c_cublas, m);
}
cudaErrCheck(hipEventRecord(stopcublas));
cudaErrCheck(hipEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(hipMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), hipMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(hipEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(hipEventDestroy(startcublas));
cudaErrCheck(hipEventDestroy(stopcublas));
cudaErrCheck(hipFree(a_fp16));
cudaErrCheck(hipFree(b_fp16));
cudaErrCheck(hipFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
hipDeviceSynchronize();
#endif
cudaErrCheck(hipDeviceReset());
}
#ifdef OPENMP_ENABLE
}//end OPENMP_ENABLE
#endif
}
int main(int argc, char* argv[]) {
printf("Find Best MNK Usage : ./all_gemm --gemmType=N --findBest \n");
printf("Find Best MNK + Stress Usage: ./all_gemm --gemmType=N --autoStress \n");
printf("Stress Usage : ./all_gemm --gemmType=N --stress --mn=xxx --k=yyy \n");
printf(" FP32_CUDA =1\n");
//author C.h. Wang
printf(" FP16_CUDA =2\n");
printf("gemmTypes: INT8_TENSOR =3\n");
printf(" FP16_TENSOR =4\n");
printf(" FP16_32_TENSOR=5 \n");
if (!parseArgs(argc, argv))
return -1;
if(gParams.findBest)
{
printf("Starting Find Best MNK\n\n");
findMaxMNK(argc,argv);
}else if(gParams.stress)
{
printf("Starting Stress MNK\n\n");
stress(argc,argv);
}else if(gParams.autoStress)
{
printf("Starting Find Best MNK\n\n");
findMaxMNK(argc,argv);
printf("Starting Stress MNK\n\n");
stress(argc,argv);
}
return 0;
}
| 8ca579fa8fe025066433c4e4376f04c656eb1c16.cu | #include <iostream>
#include <fstream>
#include <curand.h>
#include <cublas_v2.h>
#include <iomanip>
#include <omp.h>
//author C.H. Wang
//enable OMP
//#define OPENMP_ENABLE
#define MAX(x, y) ((x>y) ? x : y)
// Define some error checking macros.
#define cudaErrCheck(stat) { cudaErrCheck_((stat), __FILE__, __LINE__); }
void cudaErrCheck_(cudaError_t stat, const char *file, int line) {
if (stat != cudaSuccess) {
fprintf(stderr, "CUDA Error: %s %s %d\n", cudaGetErrorString(stat), file, line);
}
}
#define cublasErrCheck(stat) { cublasErrCheck_((stat), __FILE__, __LINE__); }
void cublasErrCheck_(cublasStatus_t stat, const char *file, int line) {
if (stat != CUBLAS_STATUS_SUCCESS) {
fprintf(stderr, "cuBLAS Error: %d %s %d\n", stat, file, line);
}
}
#define curandErrCheck(stat) { curandErrCheck_((stat), __FILE__, __LINE__); }
void curandErrCheck_(curandStatus_t stat, const char *file, int line) {
if (stat != CURAND_STATUS_SUCCESS) {
fprintf(stderr, "cuRand Error: %d %s %d\n", stat, file, line);
}
}
double cal_tflops(int m, int n, int k, double msec)
{
double flops = 2. * m * n * k;
double tflops = (1E-12*flops) / (1E-3*msec);
return tflops;
}
__global__ void assignFloatValue (float *out, int n, float value) {
int idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < n) {
out[idx] = value;
}
}
__global__ void assignHalfValue (half *out, int n, float value) {
int idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < n) {
out[idx] = value;
}
}
void correctnessCheck(int m, int n, int k, float *host, float value){
for (int i = 0; i < m * n; i++) {
float val = host[i];
if ( val != k * value * value) {
std::cout << "ERROR value = " << val<< std::endl;
}
}
}
void printTime(float cublasTime, int m, int n, int k, float &s_max_tflops, int &s_max_m_n, int &s_max_k ){
float tflops = cal_tflops(m, n, k, cublasTime);
if (tflops > s_max_tflops){
s_max_tflops = tflops;
s_max_m_n = m;
s_max_k = k;
}
std::cout << std::setw(7) << m << ",";
std::cout << std::setw(7) << n << ",";
std::cout << std::setw(7) << k << ",";
std::cout << std::setw(15) << std::setprecision(4) << cublasTime << ",";
std::cout << std::setw(15) << std::setprecision(4) << tflops << "," << std::endl;
}
//arguments
bool parseString(const char* arg, const char* name, std::string& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = arg + n + 3;
std::cout << name << ": " << value << std::endl;
}
return match;
}
bool parseInt(const char* arg, const char* name, int& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = atoi(arg + n + 3);
std::cout << name << ": " << value << std::endl;
}
return match;
}
bool parseBool(const char* arg, const char* name, bool& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n);
if (match)
{
std::cout << name << std::endl;
value = true;
}
return match;
}
bool parseFloat(const char* arg, const char* name, float& value)
{
size_t n = strlen(name);
bool match = arg[0] == '-' && arg[1] == '-' && !strncmp(arg + 2, name, n) && arg[n + 2] == '=';
if (match)
{
value = atof(arg + n + 3);
std::cout << name << ": " << value << std::endl;
}
return match;
}
//author C.H. Wang
struct Params
{
int mn{512};
int k{512};
int gemmTypes{1};
bool findBest{false};
bool stress{false};
bool autoStress{false};
} gParams;
static void printUsage()
{
printf("\n");
printf("Find Best MNK Usage : ./all_gemm --gemmType=N --findBest \n");
printf("Find Best MNK + Stress Usage: ./all_gemm --gemmType=N --autoStress \n");
printf("Stress Usage : ./all_gemm --gemmType=N --stress --mn=xxx --k=yyy \n");
printf("gemmTypes: FP32_CUDA =1\n");
//author C.h. Wang
printf(" FP16_CUDA =2\n");
printf(" INT8_TENSOR =3\n");
printf(" FP16_TENSOR =4\n");
printf(" FP16_32_TENSOR=5\n");
fflush(stdout);
}
bool parseArgs(int argc, char* argv[])
{
if (argc < 1)
{
printUsage();
return false;
}
for (int j = 1; j < argc; j++)
{
if (parseInt(argv[j], "k", gParams.k)
|| parseInt(argv[j], "mn", gParams.mn)
|| parseInt(argv[j], "gemmTypes", gParams.gemmTypes)
)
continue;
if (parseBool(argv[j], "findBest", gParams.findBest)
|| parseBool(argv[j], "stress", gParams.stress)
|| parseBool(argv[j], "autoStress", gParams.autoStress) )
continue;
printf("Unknown argument: %s\n", argv[j]);
return false;
}
return true;
}
//arguments end
// find mnk
void findMaxMNK(int argc, char* argv[] ){
int m,n,k;
float s_max_tflops = 0;
int s_max_m_n = 0;
int s_max_k = 0;
if (gParams.gemmTypes==3 ) {
std::cout << "[TensorCore INT8(INT32 accumulation) Time and TOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TOPS";
std::cout << std::endl;
// for tensorcore test TODO: to verify the int8 with int8 accumulation
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
int8_t *a_;
int8_t *b_;
int *c_cublas;
int *c_host_cublas;
//const int value = 1;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_, m * k * sizeof(int8_t)));
cudaErrCheck(cudaMalloc((void**)&b_, k * m * sizeof(int8_t)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(int)));
c_host_cublas = (int*)malloc(m * n * sizeof(int));
//TODO curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
//assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
int alpha = 1;
int beta = 0;
int numRepeats = 1;
// Warp up not really needed here as many params will be tested
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_, CUDA_R_8I, m,
b_, CUDA_R_8I, n,
&beta,
c_cublas, CUDA_R_32I, m,
CUDA_R_32I, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_));
cudaErrCheck(cudaFree(b_));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==4 ) {
std::cout << "[TensorCore FP16(FP16 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
s_max_m_n = 0;
s_max_k = 0;
// for tensorcore test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, CUDA_R_16F, m,
b_fp16, CUDA_R_16F, n,
&beta,
c_cublas, CUDA_R_16F, m,
CUDA_R_16F, CUBLAS_GEMM_DFALT_TENSOR_OP);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==5 ) {
std::cout << "[TensorCore FP16(FP32 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for tensorcore test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Warp up not really needed
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, CUDA_R_16F, m,
b_fp16, CUDA_R_16F, n,
&beta,
c_cublas, CUDA_R_32F, m,
CUDA_R_32F, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==1 ) {
std::cout << "[CUDA core FP32 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
float *a_fp32;
float *b_fp32;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp32, m * k * sizeof(float)));
cudaErrCheck(cudaMalloc((void**)&b_fp32, k * n * sizeof(float)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignFloatValue <<< (m * k + 255) / 256, 256 >>> (a_fp32, m*k, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (b_fp32, k*n, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasSgemm(cublasHandle,
CUBLAS_OP_N,
CUBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp32, m,
b_fp32, n,
&beta,
c_cublas, m);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime = 0.0f;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp32));
cudaErrCheck(cudaFree(b_fp32));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==2 ) {
std::cout << "[CUDA core FP16 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
for(k=1024; k <= 5120; k+=1024) {
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
half alpha = 1.0f;
half beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasHgemm(cublasHandle,
CUBLAS_OP_N,
CUBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp16, m,
b_fp16, n,
&beta,
c_cublas, m);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
}
gParams.mn=s_max_m_n;
gParams.k=s_max_k;
}
//Stress
void stress(int argc, char* argv[] ){
int m=gParams.mn;
int n=gParams.mn;
int k=gParams.k;
//setup the mnk
#ifdef OPENMP_ENABLE
int num_gpus;
cudaGetDeviceCount(&num_gpus);
printf("Num GPU->%d \n",num_gpus);
if(num_gpus < 1)
{
printf("no CUDA capable devices were detected\n");
exit(1);
}
//OMP starting...
#pragma omp parallel num_threads(num_gpus)
{
unsigned int cpu_thread_id = omp_get_thread_num();
int gpu_id = -1;
cudaSetDevice(cpu_thread_id % num_gpus); // "% num_gpus" allows more CPU threads than GPU devices
cudaGetDevice(&gpu_id);
printf("GPU->%d \n",gpu_id);
#endif
float s_max_tflops = 0;
int s_max_m_n = 0;
int s_max_k = 0;
if (gParams.gemmTypes==3) {
std::cout << "[TensorCore INT8(INT32 accumulation) Time and TOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TOPS";
std::cout << std::endl;
// for tensorcore test TODO: to verify the int8 with int8 accumulation
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
int8_t *a_;
int8_t *b_;
int *c_cublas;
int *c_host_cublas;
//const int value = 1;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_, m * k * sizeof(int8_t)));
cudaErrCheck(cudaMalloc((void**)&b_, k * m * sizeof(int8_t)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(int)));
c_host_cublas = (int*)malloc(m * n * sizeof(int));
//TODO curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
//assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
//assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
int alpha = 1;
int beta = 0;
int numRepeats = 1;
// Warp up not really needed here as many params will be tested
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_, CUDA_R_8I, m,
b_, CUDA_R_8I, n,
&beta,
c_cublas, CUDA_R_32I, m,
CUDA_R_32I, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_));
cudaErrCheck(cudaFree(b_));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
cudaErrCheck(cudaDeviceReset());
#ifdef OPENMP_ENABLE
#pragma omp barrier
cudaDeviceSynchronize();
#endif
}
if (gParams.gemmTypes==4 ) {
std::cout << "[TensorCore FP16(FP16 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
s_max_m_n = 0;
s_max_k = 0;
// for tensorcore test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, CUDA_R_16F, m,
b_fp16, CUDA_R_16F, n,
&beta,
c_cublas, CUDA_R_16F, m,
CUDA_R_16F, CUBLAS_GEMM_DFALT_TENSOR_OP);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
}//}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
cudaDeviceSynchronize();
#endif
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==5) {
std::cout << "[TensorCore FP16(FP32 accumulation) Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for tensorcore test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// Use tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_TENSOR_OP_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
// Warp up not really needed
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasErrCheck(cublasGemmEx(cublasHandle, CUBLAS_OP_N, CUBLAS_OP_T,
m, n, k,
&alpha,
a_fp16, CUDA_R_16F, m,
b_fp16, CUDA_R_16F, n,
&beta,
c_cublas, CUDA_R_32F, m,
CUDA_R_32F, CUBLAS_GEMM_DFALT_TENSOR_OP));
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
cublasTime /= numRepeats;
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
cudaDeviceSynchronize();
#endif
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==1 ) {
std::cout << "[CUDA core FP32 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
float *a_fp32;
float *b_fp32;
float *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp32, m * k * sizeof(float)));
cudaErrCheck(cudaMalloc((void**)&b_fp32, k * n * sizeof(float)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(float)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignFloatValue <<< (m * k + 255) / 256, 256 >>> (a_fp32, m*k, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (b_fp32, k*n, value);
assignFloatValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
float alpha = 1.0f;
float beta = 0.0f;
int numRepeats = 1;
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasSgemm(cublasHandle,
CUBLAS_OP_N,
CUBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp32, m,
b_fp32, n,
&beta,
c_cublas, m);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// Correctness check
cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime = 0.0f;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp32));
cudaErrCheck(cudaFree(b_fp32));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
cudaDeviceSynchronize();
#endif
cudaErrCheck(cudaDeviceReset());
}
if (gParams.gemmTypes==2 ) {
std::cout << "[CUDA core FP16 Time and TFLOPS Result]" << std::endl;
std::cout << std::setw(7) << "m" << std::setw(7) << "n" << std::setw(7) << "k";
std::cout << std::setw(15) << "Time (msec)" << std::setw(15) << "TFLOPS";
std::cout << std::endl;
s_max_tflops = 0;
// for float test
//for(m=1024, n = 1024; m <= 25600; m+=1024, n+=1024) {
//for(k=1024; k <= 5120; k+=1024) {
while(true){
half *a_fp16;
half *b_fp16;
half *c_cublas;
float *c_host_cublas;
const float value = 1.0f;
cublasHandle_t cublasHandle;
cudaEvent_t startcublas;
cudaEvent_t stopcublas;
cudaErrCheck(cudaEventCreate(&startcublas));
cudaErrCheck(cudaEventCreate(&stopcublas));
cublasErrCheck(cublasCreate(&cublasHandle));
// No tensor cores
cublasErrCheck(cublasSetMathMode(cublasHandle, CUBLAS_DEFAULT_MATH));
cudaErrCheck(cudaMalloc((void**)&a_fp16, m * k * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&b_fp16, k * n * sizeof(half)));
cudaErrCheck(cudaMalloc((void**)&c_cublas, m * n * sizeof(half)));
c_host_cublas = (float*)malloc(m * n * sizeof(float));
// curand doesn't currently support fp16 so we generate in fp32 and convert to fp16.
assignHalfValue <<< (m * k + 255) / 256, 256 >>> (a_fp16, m*k, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (b_fp16, k*n, value);
assignHalfValue <<< (k * n + 255) / 256, 256 >>> (c_cublas, m*n, 0.0f);
half alpha = 1.0f;
half beta = 0.0f;
int numRepeats = 1;
// Now using cuBLAS
cudaErrCheck(cudaEventRecord(startcublas));
for (int iteration = 0; iteration < numRepeats; ++iteration) {
cublasHgemm(cublasHandle,
CUBLAS_OP_N,
CUBLAS_OP_T,
m,
n,
k,
&alpha,
a_fp16, m,
b_fp16, n,
&beta,
c_cublas, m);
}
cudaErrCheck(cudaEventRecord(stopcublas));
cudaErrCheck(cudaEventSynchronize(stopcublas));
// TODO: Correctness check
//cudaErrCheck(cudaMemcpy(c_host_cublas, c_cublas, m * n * sizeof(float), cudaMemcpyDeviceToHost));
//correctnessCheck(m, n, k, c_host_cublas, value);
// Check time
float cublasTime;
cudaErrCheck(cudaEventElapsedTime(&cublasTime, startcublas, stopcublas));
printTime(cublasTime, m, n, k, s_max_tflops, s_max_m_n, s_max_k);
cudaErrCheck(cudaEventDestroy(startcublas));
cudaErrCheck(cudaEventDestroy(stopcublas));
cudaErrCheck(cudaFree(a_fp16));
cudaErrCheck(cudaFree(b_fp16));
cudaErrCheck(cudaFree(c_cublas));
free(c_host_cublas);
} //}}
std::cout << "[Peak TFLOPS]=" << s_max_tflops << ", m=n="<< s_max_m_n << ", k="<<s_max_k<< std::endl;
#ifdef OPENMP_ENABLE
#pragma omp barrier
cudaDeviceSynchronize();
#endif
cudaErrCheck(cudaDeviceReset());
}
#ifdef OPENMP_ENABLE
}//end OPENMP_ENABLE
#endif
}
int main(int argc, char* argv[]) {
printf("Find Best MNK Usage : ./all_gemm --gemmType=N --findBest \n");
printf("Find Best MNK + Stress Usage: ./all_gemm --gemmType=N --autoStress \n");
printf("Stress Usage : ./all_gemm --gemmType=N --stress --mn=xxx --k=yyy \n");
printf(" FP32_CUDA =1\n");
//author C.h. Wang
printf(" FP16_CUDA =2\n");
printf("gemmTypes: INT8_TENSOR =3\n");
printf(" FP16_TENSOR =4\n");
printf(" FP16_32_TENSOR=5 \n");
if (!parseArgs(argc, argv))
return -1;
if(gParams.findBest)
{
printf("Starting Find Best MNK\n\n");
findMaxMNK(argc,argv);
}else if(gParams.stress)
{
printf("Starting Stress MNK\n\n");
stress(argc,argv);
}else if(gParams.autoStress)
{
printf("Starting Find Best MNK\n\n");
findMaxMNK(argc,argv);
printf("Starting Stress MNK\n\n");
stress(argc,argv);
}
return 0;
}
|
6f611dd44faf278e0f56675d3f4669d116201286.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// Copyright (c) 2011 Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The names of its contributors may not be used to endorse or promote
// products derived from this software without specific prior written
// permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* This code implements both (i) the color opponency model (De Valoisetal.,1958; LivingstoneandHubel,1984) as well as
* (ii) the motion energy model (Simoncelli & Heeger, 1998). The original version of this code has been released as
* part of the publication:
* Richert, M., Nageswaran, J.M., Dutt, N., and Krichmar, J.L. (2011). "An efficient simulation environment for modeling
* large-scale cortical processing". Frontiers in Neuroinformatics 5, 1-15.
*
* It has been modified in 2013 by Michael Beyeler to better match the original C/Matlab implementation
* by (Simoncelli & Heeger, 1998).
*
* Created by: Micah Richert
* Maintained by: Michael Beyeler <[email protected]>
*
* Ver 07/19/2013
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hipfft.h>
//#if __CUDA3__
// #include <cutil_inline.h>
//#elif __CUDA5__
#include <helper_cuda.h>
//#endif
#include "CUDAVersionControl.h"
#define IMUL(a, b) __mul24(a, b)
// 28 space-time orientations of V1 simple cells
#define nrDirs 28
// each of these is a unit vector (e.g. d_v1Dirs[0][1..3] => (-0.6559)^2+(0.7246)^2+(0.2113)^2 == 1
// all vectors lie on the surface of a dome (hemisphere) in 3D Fourier space
__constant__ float d_v1Dirs[3][nrDirs] = {{-0.6559, -0.1019, 0.6240, -0.7797, 0.9692, -0.2312, -0.9151, 0.4207, -0.9533, 0.8175, 0.2398, 0.8810, -0.4430, 0.0588, -0.5384, 0.5644, 0.7931, 0.5142, -0.7680, -0.0669, -0.6670, -0.2747, 0.5034, 0.5042, 0.1580, 0.1332, -0.5159, -0.3549},
{ 0.7246, -0.9718, 0.7496, -0.5837, -0.0810, 0.9439, 0.3203, -0.8712, -0.1593, -0.5142, 0.9304, 0.3737, -0.8031, -0.8126, 0.6004, -0.5738, 0.0024, 0.5969, 0.1436, 0.7757, -0.4004, -0.5108, 0.2375, -0.2221, -0.5140, 0.5194, -0.0870, 0.3838},
{ 0.2113, 0.2126, 0.2210, 0.2266, 0.2327, 0.2359, 0.2451, 0.2529, 0.2567, 0.2593, 0.2772, 0.2902, 0.3984, 0.5799, 0.5913, 0.5935, 0.6091, 0.6160, 0.6241, 0.6275, 0.6283, 0.8146, 0.8308, 0.8345, 0.8431, 0.8441, 0.8522, 0.8525}};
// this filter is used for the 3 different scales in space/time:
// first scale == original image resolution
// second scale == first scale blurred with Gaussian (width 1)
// third scale == second scale blurred with Gaussian (width 1) once again
#define scalingFiltSize 5
__constant__ float d_scalingFilt[scalingFiltSize] = {0.0884, 0.3536, 0.5303, 0.3536, 0.0884};
float* scalingFilt;
// d_v1Gaus defines the 1D receptive field of a V1 unit, which is then used for all three dimensions (X,Y and T)
// this guy can be reproduced in matlab with g=normpdf(-4:4,0,1.25);
// it is the same as provided by the S&H matlab code
#define v1GausSize 9
__constant__ float d_v1Gaus[v1GausSize] = {0.0007, 0.0155, 0.0903, 0.2345, 0.3179, 0.2345, 0.0903, 0.0155, 0.0007};
float* v1Gaus;
// d_complexV1Filt is the spacial filter for complex cells; it averages over "simple" V1 cells
// all simple cells must have the same space-time orientation and phase
// this guy can be reproduced in matlab with g=normpdf(-5:5,0,1.6);
// it is the same as provided by the S&H matlab code
#define complexV1FiltSize 11
__constant__ float d_complexV1Filt[complexV1FiltSize] = {0.0019, 0.0110, 0.0430, 0.1142, 0.2052, 0.2495, 0.2052, 0.1142, 0.0430, 0.0110, 0.0019};
float* complexV1Filt;
// d_normV1filt is the spatial filter used complex cell normalization
// this guy can be reproduced in matlab with: g=normpdf(-10:10,0,3.35);
#define normV1filtSize 21
__constant__ float d_normV1filt[normV1filtSize] = {0.0013, 0.0031, 0.0067, 0.0132, 0.0237, 0.0389, 0.0584, 0.0800, 0.1001, 0.1146, 0.1199, 0.1146, 0.1001, 0.0800, 0.0584, 0.0389, 0.0237, 0.0132, 0.0067, 0.0031, 0.0013};
float* normV1filt;
// difference operator for taking the first-order derivative
#define diff1filtSize 3
__constant__ float d_diff1filt[diff1filtSize] = {-1/2.0, 0, 1/2.0};
float* diff1filt;
// difference operator for taking the second-order derivative
#define diff2filtSize 3
__constant__ float d_diff2filt[diff2filtSize] = {1, -2, 1};
float* diff2filt;
// difference operator for taking the third-order derivative
// the grayscale values of our input stimuli will be convolved with d_scalingFilt in 3D
#define diff3filtSize 5
__constant__ float d_diff3filt[diff3filtSize] = {-1/2.0, 1, 0, -1, 1/2.0};
float* diff3filt;
// 3 different spatio-temporal scales (these must correspond to the 3 blobs along the x-, y-, or t-axis in Fig. 3 in
// the Simoncelli & Heeger paper... because they are scales in the x,y,t-space they cannot be temporal frequency or
// "speed" alone)
#define nrScales 3
// number of time steps to be considered in computation
// nrT = 5*(3-1)-1 = 9
#define nrT 9 // (scalingFiltSize*(nrScales-1)-1)
int stimBufX, stimBufY;
float* d_resp; // will be the returned ME responses
float* d_stimBuf;
float* d_scalingStimBuf; // the temporary matrix that will be filtered once for each scale...
float* d_v1GausBuf;
float* d_v1GausBuf2;
float* d_diffV1GausBuf;
float* diffV1GausBufT;
unsigned char* d_stim; // the video input
float* d_pop;
// following 3 lines are needed for dev_split(), altho we only care about d_stim
float* d_red;
float* d_green;
float* d_blue;
float* d_center;
float* d_surround;
float* d_color_tmp;
float* d_color_tmp_green;
float* d_color_tmp_yellow;
#define iDivUp(a,b) ((a)+(b)-1)/(b)
// convolve idata with filt and store output in odata
# define CONV1_THREAD_SIZE 256
__global__ void dev_conv1(float* idata, float* odata, int len, const float* filt, int filtlen) {
__shared__ float block[CONV1_THREAD_SIZE];
const int nrValidConv = CONV1_THREAD_SIZE - (filtlen-1);
const int offset = (filtlen-1)/2;
int xInd = blockIdx.x*nrValidConv + threadIdx.x - offset;
int idx = blockIdx.y * len + xInd;
block[threadIdx.x] = (xInd>=0 && xInd<len)?idata[idx]:0;
__syncthreads();
xInd += offset;
idx += offset;
if (xInd<len && threadIdx.x < nrValidConv) {
float sum = 0;
for (int i = 0; i< filtlen; i++) sum += block[threadIdx.x+i]*filt[i];
odata[idx] = sum;
}
}
#define CONVN_THREAD_SIZE1 16
#define CONVN_THREAD_SIZE2 31 //31 is faster than 32 because shared memory is too full
__global__ void dev_convn(float* idata, float* odata, int nrX, int nrN, int stride, int blockStride, int nrBlocks, const float* filt, int filtlen) {
__shared__ float block[CONVN_THREAD_SIZE1*CONVN_THREAD_SIZE2];
const int nrValidConv = (CONVN_THREAD_SIZE2-(filtlen-1));
const int offset = (filtlen-1)/2;
const int blockY = blockIdx.y/nrBlocks;
const int b = blockIdx.y - blockY*nrBlocks;
const int ind1 = blockIdx.x*CONVN_THREAD_SIZE1 + threadIdx.x;
int ind2 = blockY*nrValidConv + threadIdx.y - offset;
int idx = ind2*stride + ind1 + b*blockStride;
const int threadxy = threadIdx.x*CONVN_THREAD_SIZE2+threadIdx.y;
block[threadxy] = (ind2>=0 && ind2<nrN && ind1 < nrX)?idata[idx]:0;
__syncthreads();
ind2 += offset;
idx += offset*stride;
if (ind2<nrN && ind1 < nrX && threadIdx.y < nrValidConv) {
float sum = 0;
for (int i = 0; i< filtlen; i++) sum += block[threadxy+i]*filt[i];
odata[idx] = sum;
}
}
// conv2D is only used in the color model
// odata must be pre-allocated
// the result will end up in idata...
// filtlen can not be greater than CONVN_THREAD_SIZE2
void conv2D(float* idata, float* odata, dim3 _sizes, const float* filt, int filtlen) {
unsigned int* sizes = (unsigned int*)&_sizes;
float* tmp;
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
hipLaunchKernelGGL(( dev_conv1), dim3(grid1), dim3(threads1), 0, 0, idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
hipLaunchKernelGGL(( dev_convn), dim3(grid2), dim3(threads2), 0, 0, idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
}
// conv3D is only used in the motion model in freq space (\omega_x,\omega_y,\omega_t)
// odata must be pre-allocated
// the result will end up in idata
// filtlen can not be greater than CONVN_THREAD_SIZE2
void conv3D(float* idata, float* odata, dim3 _sizes, const float* filt, int filtlen) {
unsigned int* sizes = (unsigned int*)&_sizes;
float* tmp;
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
hipLaunchKernelGGL(( dev_conv1), dim3(grid1), dim3(threads1), 0, 0, idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
hipLaunchKernelGGL(( dev_convn), dim3(grid2), dim3(threads2), 0, 0, idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the third dimension
dim3 grid3(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[2], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[1]);
dim3 threads3(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
hipLaunchKernelGGL(( dev_convn), dim3(grid3), dim3(threads3), 0, 0, idata, odata, sizes[0], sizes[2], sizes[0]*sizes[1], sizes[0], sizes[1], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
}
//will free idata
// this computes the difference / approximates the derivative of idata
float* diff(float* idata, uint3 _sizes, int order, int dim)
{
unsigned int* sizes = (unsigned int*)&_sizes;
int filtlen;
float* filt;
float* odata;
CUDA_CHECK_ERRORS(hipMalloc((void**)&odata, sizeof(float)*sizes[0]*sizes[1]*sizes[2]));
switch (order) {
case 1:
filtlen = diff1filtSize;
filt = diff1filt;
break;
case 2:
filtlen = diff2filtSize;
filt = diff2filt;
break;
case 3:
filtlen = diff3filtSize;
filt = diff3filt;
break;
}
switch (dim) {
case 0: {
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
hipLaunchKernelGGL(( dev_conv1), dim3(grid1), dim3(threads1), 0, 0, idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
break;
}
case 1: {
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
hipLaunchKernelGGL(( dev_convn), dim3(grid2), dim3(threads2), 0, 0, idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
break;
}
case 2: {
// convolve the third dimension
dim3 grid3(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[2], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[1]);
dim3 threads3(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
hipLaunchKernelGGL(( dev_convn), dim3(grid3), dim3(threads3), 0, 0, idata, odata, sizes[0], sizes[2], sizes[0]*sizes[1], sizes[0], sizes[1], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
break;
}
}
CUDA_CHECK_ERRORS(hipFree (idata));
return odata;
}
__global__ void dev_accumDiffStims(float *d_resp, float *diffV1GausBuf, int nrXnrY, int c, int orderX, int orderY, int orderT) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
__shared__ float dirorders[nrDirs];
if (threadIdx.x < nrDirs) {
const float dir1 = d_v1Dirs[0][threadIdx.x]; // x-component
const float dir2 = d_v1Dirs[1][threadIdx.x]; // y-component
const float dir3 = d_v1Dirs[2][threadIdx.x]; // t-component
float dirX = (orderX==0)?1:(orderX==1)?dir1:(orderX==2)?dir1*dir1:dir1*dir1*dir1;
float dirY = (orderY==0)?1:(orderY==1)?dir2:(orderY==2)?dir2*dir2:dir2*dir2*dir2;
float dirT = (orderT==0)?1:(orderT==1)?dir3:(orderT==2)?dir3*dir3:dir3*dir3*dir3;
dirorders[threadIdx.x] = dirX*dirY*dirT;
}
__syncthreads();
for(int i = tid; i < nrXnrY; i += threadN)
{
float d = diffV1GausBuf[i];
for (int j=0; j<nrDirs; j++)
d_resp[i+j*nrXnrY] += c*d*dirorders[j];
}
}
void accumDiffStims(float *d_resp, float* diffV1GausBuf, uint3 _sizes, int orderX, int orderY, int orderT) {
// a useful list of factorials for computing the scaling factors for the derivatives
int factorials[4] = {1, 1, 2, 6};
// the scaling factor for this directial derivative; similar to the binomial coefficients
int c = 6/factorials[orderX]/factorials[orderY]/factorials[orderT];
hipLaunchKernelGGL(( dev_accumDiffStims), dim3(iDivUp(_sizes.x*_sizes.y, 128)), dim3(128), 0, 0, d_resp, diffV1GausBuf, _sizes.x*_sizes.y, c, orderX, orderY, orderT);
CUDA_GET_LAST_ERROR("dev_accumDiffStims() execution failed\n");
}
// consider edge effects
__global__ void dev_edges(float *data, int len, int nrX, int nrY) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
float edgeFactor;
for(int i = tid; i < len; i += threadN) {
int X = i%nrX;
int Y = (i/nrX)%nrY;
int scale = i/(nrX*nrY*28);
// we decrease filter responses near edges (use a different scaling factor per spatiotemporal scale level)
// scaling factors are chosen such that no more edge effects are visible in the direction tuning task, whatever
// works...
float edgedist = (float)min(min(X,nrX-1-X),min(Y,nrY-1-Y)); // box-shaped instead of round
if (scale==0)
edgeFactor = fmin(125.0f,edgedist*edgedist*edgedist)/125.0f; // 5px^3
else if (scale==1)
edgeFactor = fmin(1296.0f,edgedist*edgedist*edgedist*edgedist)/1296.0f; // 6px^4
else
edgeFactor = fmin(7776.0f,edgedist*edgedist*edgedist*edgedist*edgedist)/7776.0f; // 6px^5
float d = data[i]*edgeFactor;
data[i] = d;
}
}
// parallel half-wave rectification and squaring
__global__ void dev_halfRect2(float *data, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float d = data[i]*6.6084f; // scaleFactors.v1Linear
// d = (d>0)?d:0; // Matlab code and Rust et al, 2006 do not half-rectify anymore
data[i] = d*d*1.9263; // scaleFactors.v1FullWaveRectified
}
}
// compute the mean on the array's third dimension
// this is used to compute the mean of all 28 filter responses at a given location/scale (used in the complex cell
// normalization step)
__global__ void dev_mean3(float *idata, float *odata, int nrXnrY, int nrZ) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
const int blockSize = nrXnrY*nrZ;
for(int i = tid; i < nrXnrY; i += threadN) {
float sum = 0;
int ind = i + blockIdx.y*blockSize;
for (int j=0; j < nrZ; j++) sum += idata[ind+j*nrXnrY];
odata[i+blockIdx.y*nrXnrY] = sum/nrZ;
}
}
// population normalization of complex cell responses
__global__ void dev_normalize(float *resp, float *pop, int nrXnrY, int nrZ) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
const int blockSize = nrXnrY*nrZ;
for(int i = tid; i < nrXnrY; i += threadN) {
float norm = pop[i+blockIdx.y*nrXnrY];
int ind = i + blockIdx.y*blockSize;
for (int j=0; j < nrZ; j++) resp[ind+j*nrXnrY] /= (norm + 0.1*0.1); // scaleFactors.v1sigma
}
}
// reads in stimuli in RGB format and extracts R, G, B, and grayscale values (normalized to [0,1])
__global__ void dev_split(unsigned char *idata, float *red, float *green, float *blue, float *gray, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
typedef struct rgb_s {
unsigned char r,g,b;
} rgb_t;
rgb_t* rgbs = (rgb_t*)idata;
for(int i = tid; i < len; i += threadN) {
rgb_t rgb=rgbs[i];
float r = rgb.r/255.0;
float g = rgb.g/255.0;
float b = rgb.b/255.0;
gray[i] = (r+g+b)/3;
red[i] = r;
green[i] = g;
blue[i] = b;
}
}
// parallel subtraction
__global__ void dev_sub(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = i1data[i] - i2data[i];
}
}
// parallel averaging
__global__ void dev_ave(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = (i1data[i] + i2data[i])/2;
}
}
// parallel summing
__global__ void dev_sum(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = i1data[i] + i2data[i];
}
}
// parallel half-rectification at a given scale
__global__ void dev_scaleHalfRect(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float tmp = data[i];
data[i] = (tmp>0)?sqrt(sqrt(tmp))*scale:0;
}
}
// parallel mulitplying with a scale factor
__global__ void dev_scale(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
data[i] *= scale;
}
}
// parallel taking the square root and multiplying with a scale factor
__global__ void dev_scaleSqrt(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float tmp = data[i];
data[i] = (tmp>0)?sqrt(tmp)*scale:0;
}
}
// stim should be an array of lenght nrX*nrY*3 with the data being organized such as: R1 G1 B1 R2 G2 B2 ...
// void calcColorME(int spatFreq, int nrX, int nrY, unsigned char* stim, float* red_green, float* green_red, float* blue_yellow, float* yellow_blue, float* ME, bool GPUpointers)
void calcColorME(int nrX, int nrY, unsigned char* stim, float* red_green, float* green_red, float* blue_yellow, float* yellow_blue, float* ME, bool GPUpointers)
{
// allocate memory on the GPU
if (nrX != stimBufX || nrY != stimBufY) {
stimBufX = nrX;
stimBufY = nrY;
// allocate the response matrix
CUDA_CHECK_ERRORS(hipMalloc((void**)&d_resp, sizeof(float)*nrX*nrY*nrDirs*nrScales));
// probably should free previous buffers if they were previously allocated...
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_stimBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(hipMemset (d_stimBuf, 0, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc((void**)&diffV1GausBufT, sizeof(float)*nrX*nrY*v1GausSize));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_stim, nrX*nrY*3));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_scalingStimBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_v1GausBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_diffV1GausBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_pop, nrX*sizeof(float)*nrY*nrScales)); // mean of 28 filter responses for all x,y and spatial scales, at a given step in time
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_red, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_green, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_blue, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_center, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_surround, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_color_tmp, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_color_tmp_green, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipMalloc ((void**)&d_color_tmp_yellow, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&scalingFilt, d_scalingFilt));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&v1Gaus, d_v1Gaus));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&complexV1Filt, d_complexV1Filt));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&normV1filt, d_normV1filt));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&diff1filt, d_diff1filt));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&diff2filt, d_diff2filt));
CUDA_CHECK_ERRORS(hipGetSymbolAddress((void**)&diff3filt, d_diff3filt));
}
// use the preexisting filters because they are about the right size and give good results
float* center_filt = v1Gaus;
float* surround_filt = complexV1Filt;
const int center_filtSize = v1GausSize;
const int surround_filtSize = complexV1FiltSize;
/* size_t avail, total, previous;
float toGB = 1024.0*1024.0*1024.0;
hipMemGetInfo(&avail,&total);
printf("after ME:\t\t\t%2.3f GB\t%2.3f GB\t%2.3f GB\n",(float)(avail)/toGB,(float)((total-avail)/toGB),(float)(avail/toGB));
previous=avail; */
CUDA_CHECK_ERRORS(hipMemcpy(d_stim,stim,3*nrX*nrY,hipMemcpyHostToDevice));
hipLaunchKernelGGL(( dev_split), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_stim, d_red, d_green, d_blue, &d_stimBuf[nrX*nrY*(nrT-1)], nrX*nrY);
CUDA_GET_LAST_ERROR("dev_split() execution failed\n");
/* ***** COLOR MODEL ***** */
uint3 color_sizes = make_uint3(nrX,nrY,1);
//d_center will contain center_red
CUDA_CHECK_ERRORS(hipMemcpy(d_center,d_red,sizeof(float)*nrX*nrY,hipMemcpyDeviceToDevice));
conv2D(d_center, d_color_tmp, color_sizes, center_filt, center_filtSize);
//d_color_tmp_green will contain center_green
CUDA_CHECK_ERRORS(hipMemcpy(d_color_tmp_green,d_green,sizeof(float)*nrX*nrY,hipMemcpyDeviceToDevice));
conv2D(d_color_tmp_green, d_color_tmp, color_sizes, center_filt, center_filtSize);
//d_color_tmp_yellow will contain center_yellow
hipLaunchKernelGGL(( dev_ave), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_center, d_color_tmp_green, d_color_tmp_yellow, nrX*nrY);
//d_green will contain surround_green
conv2D(d_green, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_color_tmp will contain the result
hipLaunchKernelGGL(( dev_sub), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_center, d_green, d_color_tmp, nrX*nrY);
hipLaunchKernelGGL(( dev_scaleHalfRect), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(hipMemcpy(red_green,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?hipMemcpyDeviceToDevice:hipMemcpyDeviceToHost));
//d_red will contain surround_red
conv2D(d_red, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_surround will contain surround_blue
CUDA_CHECK_ERRORS(hipMemcpy(d_surround,d_blue,sizeof(float)*nrX*nrY,hipMemcpyDeviceToDevice));
conv2D(d_surround, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_color_tmp_yellow will contain the result
hipLaunchKernelGGL(( dev_sub), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp_yellow, d_surround, d_color_tmp, nrX*nrY);
hipLaunchKernelGGL(( dev_scaleHalfRect), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(hipMemcpy(yellow_blue,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?hipMemcpyDeviceToDevice:hipMemcpyDeviceToHost));
hipLaunchKernelGGL(( dev_sub), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp_green, d_red, d_color_tmp, nrX*nrY);
hipLaunchKernelGGL(( dev_scaleHalfRect), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(hipMemcpy(green_red,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?hipMemcpyDeviceToDevice:hipMemcpyDeviceToHost));
//d_surround will contain surround_yellow
hipLaunchKernelGGL(( dev_ave), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_red, d_green, d_surround, nrX*nrY);
//d_blue will contain center_blue
conv2D(d_blue, d_color_tmp, color_sizes, center_filt, center_filtSize);
hipLaunchKernelGGL(( dev_sub), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_blue, d_surround, d_color_tmp, nrX*nrY);
hipLaunchKernelGGL(( dev_scaleHalfRect), dim3(iDivUp(nrX*nrY,128)), dim3(128), 0, 0, d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(hipMemcpy(blue_yellow,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?hipMemcpyDeviceToDevice:hipMemcpyDeviceToHost));
/* ***** MOTION ENERGY MODEL ***** */
// ME responses do not depend on color responses, but on grayscale values found in d_stimBuf[]
// shift d_stimBuf in time by 1 frame, from frame i to frame i-1
for(int i=1;i<nrT;i++)
CUDA_CHECK_ERRORS(hipMemcpy(&d_stimBuf[nrX*nrY*(i-1)],&d_stimBuf[nrX*nrY*i],sizeof(float)*nrX*nrY,hipMemcpyDeviceToDevice));
// allocate d_resp, which will contain the response to all 28 (nrDirs) space-time orientation at 3 (nrScales) scales
// for every pixel location (x,y)
CUDA_CHECK_ERRORS(hipMemset (d_resp, 0, sizeof(float)*nrX*nrY*nrDirs*nrScales));
// working copy of grayscale values: copy d_stimBuf to d_scalingStimBuf
CUDA_CHECK_ERRORS(hipMemcpy(d_scalingStimBuf,d_stimBuf,sizeof(float)*nrX*nrY*nrT,hipMemcpyDeviceToDevice));
// compute the V1 simple cell responses at 3 different spatial scales
for (int scale=1; scale<=nrScales; scale++) {
// blur/scale the image... each time this is called stim is blurred more
// scale 1 == original image resolution (space/time)
if (scale > 1) {
float* tmp;
CUDA_CHECK_ERRORS(hipMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrT));
// convolve d_scalingStimBuf by scalingFilt in 3D
uint3 sizes = make_uint3(nrX,nrY,nrT);
conv3D(d_scalingStimBuf, tmp, sizes, scalingFilt, scalingFiltSize);
CUDA_CHECK_ERRORS(hipFree(d_scalingStimBuf));
d_scalingStimBuf = tmp;
}
// nrT is 9, v1GaussSize is 9, so we're taking d_scalingStimBuf[0-0+nrX*nrY*9]
// since nrT could be greater than v1GaussSize, we take "only the part we want", quote Micah comment
CUDA_CHECK_ERRORS(hipMemcpy(d_v1GausBuf, &d_scalingStimBuf[nrX*nrY*((nrT-v1GausSize)/2)], sizeof(float)*nrX*nrY*v1GausSize, hipMemcpyDeviceToDevice));
float* tmp;
CUDA_CHECK_ERRORS(hipMalloc((void**)&tmp, sizeof(float)*nrX*nrY*v1GausSize));
// convolve d_v1GausBuf by v1Gaus in 3D
uint3 sizes = make_uint3(nrX,nrY,v1GausSize);
conv3D(d_v1GausBuf, tmp, sizes, v1Gaus, v1GausSize);
CUDA_CHECK_ERRORS(hipFree(d_v1GausBuf));
d_v1GausBuf = tmp;
// go through and calculate all directional derivatives and then combine them to calculate the diferent
// space-time oriented filters
for (int orderT=0; orderT<=3; orderT++) {
// reset diffV1GausBufT back to the 3D gaussian filtered version
CUDA_CHECK_ERRORS(hipMemcpy(diffV1GausBufT, d_v1GausBuf, sizeof(float)*nrX*nrY*v1GausSize, hipMemcpyDeviceToDevice));
if (orderT > 0) {
// take the derivative
// sizes: tripel (nrX,nrY,v1GaussSize)
diffV1GausBufT = diff(diffV1GausBufT, sizes, orderT,2);
}
for (int orderY=0; orderY<=3-orderT; orderY++) {
int orderX = 3-orderY-orderT;
CUDA_CHECK_ERRORS(hipMemcpy(d_diffV1GausBuf, diffV1GausBufT, sizeof(float)*nrX*nrY*v1GausSize, hipMemcpyDeviceToDevice));
if (orderX > 0) d_diffV1GausBuf = diff(d_diffV1GausBuf, sizes, orderX,0);
if (orderY > 0) d_diffV1GausBuf = diff(d_diffV1GausBuf, sizes, orderY,1);
// combine the directional derivative by the direction of the space-time filter
accumDiffStims(&d_resp[(scale-1)*nrX*nrY*nrDirs], &d_diffV1GausBuf[nrX*nrY*(v1GausSize/2)], sizes, orderX, orderY, orderT);
}
}
}
// consider edge effects
hipLaunchKernelGGL(( dev_edges), dim3(iDivUp(nrX*nrY*nrDirs*nrScales,128)), dim3(128), 0, 0, d_resp, nrX*nrY*nrDirs*nrScales, nrX, nrY);
CUDA_GET_LAST_ERROR("dev_edges() execution failed\n");
// half-square the linear responses
// contains scaleFactor.v1Linear and scaleFactor.v1FullWaveRectified
hipLaunchKernelGGL(( dev_halfRect2), dim3(iDivUp(nrX*nrY*nrDirs*nrScales,128)), dim3(128), 0, 0, d_resp, nrX*nrY*nrDirs*nrScales);
CUDA_GET_LAST_ERROR("dev_halfRect2() execution failed\n");
float* tmp;
// complex: convolve by d_complexV1Filt in 2D
CUDA_CHECK_ERRORS(hipMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrDirs*nrScales));
uint3 sizes = make_uint3(nrX,nrY,nrDirs*nrScales);
conv2D(d_resp, tmp, sizes, complexV1Filt, complexV1FiltSize);
CUDA_CHECK_ERRORS(hipFree(tmp));
// scale with scaleFactors.v1Blur
// NOTE: scaling with 1.0205..? Skip to save computation time
// dev_scale<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, 1.0205, nrX*nrY*nrDirs*nrScales);
// CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// we need to associate each filter at pixel position (x,y) with a power/intensity, but there are 28 filter
// responses at each location... so we need to (i) average over the 28 filters (3rd dimension in d_resp) and put it
// into d_pop ...
dim3 gridm(iDivUp(nrX*nrY,128), nrScales);
hipLaunchKernelGGL(( dev_mean3), dim3(gridm), dim3(128), 0, 0, d_resp, d_pop, nrX*nrY, nrDirs);
CUDA_GET_LAST_ERROR("dev_mean3() execution failed\n");
// ... (ii) scale with scaleFactors.v1Complex
// NOTE: Scale with 0.99..? Skip to save computation time
// dev_scale<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, 0.99, nrX*nrY*nrDirs*nrScales);
// CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// ... and (iii) sum over some spatial neighborhood
// population normalization: convolve by d_normV1filtSize in 2D
uint3 nsizes = make_uint3(nrX,nrY,nrScales);
CUDA_CHECK_ERRORS(hipMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrScales));
conv2D(d_pop, tmp, nsizes, normV1filt, normV1filtSize);
CUDA_CHECK_ERRORS(hipFree(tmp));
// don't scale with scaleFactors.v1NormalizationStrength * scaleFactors.v1NormalizationPopulationK
// since we don't normalize over the WHOLE population, these factors are off
// the purpose of this normalization is to get a htan()-like response normalization: a scaling factor of 1.0 turns
// out to be good enough
hipLaunchKernelGGL(( dev_scale), dim3(iDivUp(nrX*nrY*nrScales,128)), dim3(128), 0, 0, d_pop, 1.0, nrX*nrY*nrScales);
CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// d_resp is the numerator, d_pop the denominator sum term
hipLaunchKernelGGL(( dev_normalize), dim3(gridm), dim3(128), 0, 0, d_resp, d_pop, nrX*nrY, nrDirs);
CUDA_GET_LAST_ERROR("dev_normalize() execution failed\n");
// Scaling factors were chosen such that in a RDK task all 3 scales have similar mean responses
// We believe this to be a reasonable assumption considering that dots do not suffer from the aperture problem;
// thus the model should have similar response strengths at all 3 scales
for (int scale=0; scale<nrScales; scale++)
hipLaunchKernelGGL(( dev_scale), dim3(iDivUp(nrX*nrY*nrDirs,128)), dim3(128), 0, 0, &d_resp[scale*nrX*nrY*nrDirs], (scale==0?15.0f:(scale==1?17.0f:11.0f)), nrX*nrY*nrDirs); // 15 17.5 17
// copy response to device or host (depending on whether we run in CPU_MODE or GPU_MODE)
CUDA_CHECK_ERRORS(hipMemcpy(ME,d_resp,sizeof(float)*nrX*nrY*nrDirs*nrScales,GPUpointers?hipMemcpyDeviceToDevice:hipMemcpyDeviceToHost));
/*
size_t avail, total, used;
hipMemGetInfo( &avail, &total );
used = total - avail;
printf("used GPU memory %f MB\n",(float)(used/1024.0/1024.0));
*/
}
// free all allocated blocks
void freeAllCUDA() {
CUDA_CHECK_ERRORS(hipFree(d_stimBuf));
CUDA_CHECK_ERRORS(hipFree(diffV1GausBufT));
CUDA_CHECK_ERRORS(hipFree(d_stim));
CUDA_CHECK_ERRORS(hipFree(d_scalingStimBuf));
CUDA_CHECK_ERRORS(hipFree(d_v1GausBuf));
CUDA_CHECK_ERRORS(hipFree(d_diffV1GausBuf));
CUDA_CHECK_ERRORS(hipFree(d_pop));
CUDA_CHECK_ERRORS(hipFree(d_red));
CUDA_CHECK_ERRORS(hipFree(d_green));
CUDA_CHECK_ERRORS(hipFree(d_blue));
CUDA_CHECK_ERRORS(hipFree(d_center));
CUDA_CHECK_ERRORS(hipFree(d_surround));
CUDA_CHECK_ERRORS(hipFree(d_color_tmp));
CUDA_CHECK_ERRORS(hipFree(d_color_tmp_green));
CUDA_CHECK_ERRORS(hipFree(d_color_tmp_yellow));
stimBufX = 0;
stimBufY = 0;
}
| 6f611dd44faf278e0f56675d3f4669d116201286.cu | //
// Copyright (c) 2011 Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The names of its contributors may not be used to endorse or promote
// products derived from this software without specific prior written
// permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* This code implements both (i) the color opponency model (De Valoisetal.,1958; LivingstoneandHubel,1984) as well as
* (ii) the motion energy model (Simoncelli & Heeger, 1998). The original version of this code has been released as
* part of the publication:
* Richert, M., Nageswaran, J.M., Dutt, N., and Krichmar, J.L. (2011). "An efficient simulation environment for modeling
* large-scale cortical processing". Frontiers in Neuroinformatics 5, 1-15.
*
* It has been modified in 2013 by Michael Beyeler to better match the original C/Matlab implementation
* by (Simoncelli & Heeger, 1998).
*
* Created by: Micah Richert
* Maintained by: Michael Beyeler <[email protected]>
*
* Ver 07/19/2013
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cufft.h>
//#if __CUDA3__
// #include <cutil_inline.h>
//#elif __CUDA5__
#include <helper_cuda.h>
//#endif
#include "CUDAVersionControl.h"
#define IMUL(a, b) __mul24(a, b)
// 28 space-time orientations of V1 simple cells
#define nrDirs 28
// each of these is a unit vector (e.g. d_v1Dirs[0][1..3] => (-0.6559)^2+(0.7246)^2+(0.2113)^2 == 1
// all vectors lie on the surface of a dome (hemisphere) in 3D Fourier space
__constant__ float d_v1Dirs[3][nrDirs] = {{-0.6559, -0.1019, 0.6240, -0.7797, 0.9692, -0.2312, -0.9151, 0.4207, -0.9533, 0.8175, 0.2398, 0.8810, -0.4430, 0.0588, -0.5384, 0.5644, 0.7931, 0.5142, -0.7680, -0.0669, -0.6670, -0.2747, 0.5034, 0.5042, 0.1580, 0.1332, -0.5159, -0.3549},
{ 0.7246, -0.9718, 0.7496, -0.5837, -0.0810, 0.9439, 0.3203, -0.8712, -0.1593, -0.5142, 0.9304, 0.3737, -0.8031, -0.8126, 0.6004, -0.5738, 0.0024, 0.5969, 0.1436, 0.7757, -0.4004, -0.5108, 0.2375, -0.2221, -0.5140, 0.5194, -0.0870, 0.3838},
{ 0.2113, 0.2126, 0.2210, 0.2266, 0.2327, 0.2359, 0.2451, 0.2529, 0.2567, 0.2593, 0.2772, 0.2902, 0.3984, 0.5799, 0.5913, 0.5935, 0.6091, 0.6160, 0.6241, 0.6275, 0.6283, 0.8146, 0.8308, 0.8345, 0.8431, 0.8441, 0.8522, 0.8525}};
// this filter is used for the 3 different scales in space/time:
// first scale == original image resolution
// second scale == first scale blurred with Gaussian (width 1)
// third scale == second scale blurred with Gaussian (width 1) once again
#define scalingFiltSize 5
__constant__ float d_scalingFilt[scalingFiltSize] = {0.0884, 0.3536, 0.5303, 0.3536, 0.0884};
float* scalingFilt;
// d_v1Gaus defines the 1D receptive field of a V1 unit, which is then used for all three dimensions (X,Y and T)
// this guy can be reproduced in matlab with g=normpdf(-4:4,0,1.25);
// it is the same as provided by the S&H matlab code
#define v1GausSize 9
__constant__ float d_v1Gaus[v1GausSize] = {0.0007, 0.0155, 0.0903, 0.2345, 0.3179, 0.2345, 0.0903, 0.0155, 0.0007};
float* v1Gaus;
// d_complexV1Filt is the spacial filter for complex cells; it averages over "simple" V1 cells
// all simple cells must have the same space-time orientation and phase
// this guy can be reproduced in matlab with g=normpdf(-5:5,0,1.6);
// it is the same as provided by the S&H matlab code
#define complexV1FiltSize 11
__constant__ float d_complexV1Filt[complexV1FiltSize] = {0.0019, 0.0110, 0.0430, 0.1142, 0.2052, 0.2495, 0.2052, 0.1142, 0.0430, 0.0110, 0.0019};
float* complexV1Filt;
// d_normV1filt is the spatial filter used complex cell normalization
// this guy can be reproduced in matlab with: g=normpdf(-10:10,0,3.35);
#define normV1filtSize 21
__constant__ float d_normV1filt[normV1filtSize] = {0.0013, 0.0031, 0.0067, 0.0132, 0.0237, 0.0389, 0.0584, 0.0800, 0.1001, 0.1146, 0.1199, 0.1146, 0.1001, 0.0800, 0.0584, 0.0389, 0.0237, 0.0132, 0.0067, 0.0031, 0.0013};
float* normV1filt;
// difference operator for taking the first-order derivative
#define diff1filtSize 3
__constant__ float d_diff1filt[diff1filtSize] = {-1/2.0, 0, 1/2.0};
float* diff1filt;
// difference operator for taking the second-order derivative
#define diff2filtSize 3
__constant__ float d_diff2filt[diff2filtSize] = {1, -2, 1};
float* diff2filt;
// difference operator for taking the third-order derivative
// the grayscale values of our input stimuli will be convolved with d_scalingFilt in 3D
#define diff3filtSize 5
__constant__ float d_diff3filt[diff3filtSize] = {-1/2.0, 1, 0, -1, 1/2.0};
float* diff3filt;
// 3 different spatio-temporal scales (these must correspond to the 3 blobs along the x-, y-, or t-axis in Fig. 3 in
// the Simoncelli & Heeger paper... because they are scales in the x,y,t-space they cannot be temporal frequency or
// "speed" alone)
#define nrScales 3
// number of time steps to be considered in computation
// nrT = 5*(3-1)-1 = 9
#define nrT 9 // (scalingFiltSize*(nrScales-1)-1)
int stimBufX, stimBufY;
float* d_resp; // will be the returned ME responses
float* d_stimBuf;
float* d_scalingStimBuf; // the temporary matrix that will be filtered once for each scale...
float* d_v1GausBuf;
float* d_v1GausBuf2;
float* d_diffV1GausBuf;
float* diffV1GausBufT;
unsigned char* d_stim; // the video input
float* d_pop;
// following 3 lines are needed for dev_split(), altho we only care about d_stim
float* d_red;
float* d_green;
float* d_blue;
float* d_center;
float* d_surround;
float* d_color_tmp;
float* d_color_tmp_green;
float* d_color_tmp_yellow;
#define iDivUp(a,b) ((a)+(b)-1)/(b)
// convolve idata with filt and store output in odata
# define CONV1_THREAD_SIZE 256
__global__ void dev_conv1(float* idata, float* odata, int len, const float* filt, int filtlen) {
__shared__ float block[CONV1_THREAD_SIZE];
const int nrValidConv = CONV1_THREAD_SIZE - (filtlen-1);
const int offset = (filtlen-1)/2;
int xInd = blockIdx.x*nrValidConv + threadIdx.x - offset;
int idx = blockIdx.y * len + xInd;
block[threadIdx.x] = (xInd>=0 && xInd<len)?idata[idx]:0;
__syncthreads();
xInd += offset;
idx += offset;
if (xInd<len && threadIdx.x < nrValidConv) {
float sum = 0;
for (int i = 0; i< filtlen; i++) sum += block[threadIdx.x+i]*filt[i];
odata[idx] = sum;
}
}
#define CONVN_THREAD_SIZE1 16
#define CONVN_THREAD_SIZE2 31 //31 is faster than 32 because shared memory is too full
__global__ void dev_convn(float* idata, float* odata, int nrX, int nrN, int stride, int blockStride, int nrBlocks, const float* filt, int filtlen) {
__shared__ float block[CONVN_THREAD_SIZE1*CONVN_THREAD_SIZE2];
const int nrValidConv = (CONVN_THREAD_SIZE2-(filtlen-1));
const int offset = (filtlen-1)/2;
const int blockY = blockIdx.y/nrBlocks;
const int b = blockIdx.y - blockY*nrBlocks;
const int ind1 = blockIdx.x*CONVN_THREAD_SIZE1 + threadIdx.x;
int ind2 = blockY*nrValidConv + threadIdx.y - offset;
int idx = ind2*stride + ind1 + b*blockStride;
const int threadxy = threadIdx.x*CONVN_THREAD_SIZE2+threadIdx.y;
block[threadxy] = (ind2>=0 && ind2<nrN && ind1 < nrX)?idata[idx]:0;
__syncthreads();
ind2 += offset;
idx += offset*stride;
if (ind2<nrN && ind1 < nrX && threadIdx.y < nrValidConv) {
float sum = 0;
for (int i = 0; i< filtlen; i++) sum += block[threadxy+i]*filt[i];
odata[idx] = sum;
}
}
// conv2D is only used in the color model
// odata must be pre-allocated
// the result will end up in idata...
// filtlen can not be greater than CONVN_THREAD_SIZE2
void conv2D(float* idata, float* odata, dim3 _sizes, const float* filt, int filtlen) {
unsigned int* sizes = (unsigned int*)&_sizes;
float* tmp;
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
dev_conv1<<<grid1, threads1>>>(idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
dev_convn<<<grid2, threads2>>>(idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
}
// conv3D is only used in the motion model in freq space (\omega_x,\omega_y,\omega_t)
// odata must be pre-allocated
// the result will end up in idata
// filtlen can not be greater than CONVN_THREAD_SIZE2
void conv3D(float* idata, float* odata, dim3 _sizes, const float* filt, int filtlen) {
unsigned int* sizes = (unsigned int*)&_sizes;
float* tmp;
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
dev_conv1<<<grid1, threads1>>>(idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
dev_convn<<<grid2, threads2>>>(idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
// convolve the third dimension
dim3 grid3(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[2], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[1]);
dim3 threads3(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
dev_convn<<<grid3, threads3>>>(idata, odata, sizes[0], sizes[2], sizes[0]*sizes[1], sizes[0], sizes[1], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
tmp = idata;
idata = odata;
odata = tmp;
}
//will free idata
// this computes the difference / approximates the derivative of idata
float* diff(float* idata, uint3 _sizes, int order, int dim)
{
unsigned int* sizes = (unsigned int*)&_sizes;
int filtlen;
float* filt;
float* odata;
CUDA_CHECK_ERRORS(cudaMalloc((void**)&odata, sizeof(float)*sizes[0]*sizes[1]*sizes[2]));
switch (order) {
case 1:
filtlen = diff1filtSize;
filt = diff1filt;
break;
case 2:
filtlen = diff2filtSize;
filt = diff2filt;
break;
case 3:
filtlen = diff3filtSize;
filt = diff3filt;
break;
}
switch (dim) {
case 0: {
// convolve the first dimension
dim3 grid1(iDivUp(sizes[0], CONV1_THREAD_SIZE-(filtlen-1)), sizes[1]*sizes[2]);
dim3 threads1(CONV1_THREAD_SIZE, 1, 1);
dev_conv1<<<grid1, threads1>>>(idata, odata, sizes[0], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_conv1() execution failed\n");
break;
}
case 1: {
// convolve the second dimension
dim3 grid2(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[1], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[2]);
dim3 threads2(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
dev_convn<<<grid2, threads2>>>(idata, odata, sizes[0], sizes[1], sizes[0], sizes[0]*sizes[1], sizes[2], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
break;
}
case 2: {
// convolve the third dimension
dim3 grid3(iDivUp(sizes[0], CONVN_THREAD_SIZE1), iDivUp(sizes[2], CONVN_THREAD_SIZE2-(filtlen-1))*sizes[1]);
dim3 threads3(CONVN_THREAD_SIZE1, CONVN_THREAD_SIZE2, 1);
dev_convn<<<grid3, threads3>>>(idata, odata, sizes[0], sizes[2], sizes[0]*sizes[1], sizes[0], sizes[1], filt, filtlen);
CUDA_GET_LAST_ERROR("dev_convn() execution failed\n");
break;
}
}
CUDA_CHECK_ERRORS(cudaFree (idata));
return odata;
}
__global__ void dev_accumDiffStims(float *d_resp, float *diffV1GausBuf, int nrXnrY, int c, int orderX, int orderY, int orderT) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
__shared__ float dirorders[nrDirs];
if (threadIdx.x < nrDirs) {
const float dir1 = d_v1Dirs[0][threadIdx.x]; // x-component
const float dir2 = d_v1Dirs[1][threadIdx.x]; // y-component
const float dir3 = d_v1Dirs[2][threadIdx.x]; // t-component
float dirX = (orderX==0)?1:(orderX==1)?dir1:(orderX==2)?dir1*dir1:dir1*dir1*dir1;
float dirY = (orderY==0)?1:(orderY==1)?dir2:(orderY==2)?dir2*dir2:dir2*dir2*dir2;
float dirT = (orderT==0)?1:(orderT==1)?dir3:(orderT==2)?dir3*dir3:dir3*dir3*dir3;
dirorders[threadIdx.x] = dirX*dirY*dirT;
}
__syncthreads();
for(int i = tid; i < nrXnrY; i += threadN)
{
float d = diffV1GausBuf[i];
for (int j=0; j<nrDirs; j++)
d_resp[i+j*nrXnrY] += c*d*dirorders[j];
}
}
void accumDiffStims(float *d_resp, float* diffV1GausBuf, uint3 _sizes, int orderX, int orderY, int orderT) {
// a useful list of factorials for computing the scaling factors for the derivatives
int factorials[4] = {1, 1, 2, 6};
// the scaling factor for this directial derivative; similar to the binomial coefficients
int c = 6/factorials[orderX]/factorials[orderY]/factorials[orderT];
dev_accumDiffStims<<<iDivUp(_sizes.x*_sizes.y, 128), 128>>>(d_resp, diffV1GausBuf, _sizes.x*_sizes.y, c, orderX, orderY, orderT);
CUDA_GET_LAST_ERROR("dev_accumDiffStims() execution failed\n");
}
// consider edge effects
__global__ void dev_edges(float *data, int len, int nrX, int nrY) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
float edgeFactor;
for(int i = tid; i < len; i += threadN) {
int X = i%nrX;
int Y = (i/nrX)%nrY;
int scale = i/(nrX*nrY*28);
// we decrease filter responses near edges (use a different scaling factor per spatiotemporal scale level)
// scaling factors are chosen such that no more edge effects are visible in the direction tuning task, whatever
// works...
float edgedist = (float)min(min(X,nrX-1-X),min(Y,nrY-1-Y)); // box-shaped instead of round
if (scale==0)
edgeFactor = fmin(125.0f,edgedist*edgedist*edgedist)/125.0f; // 5px^3
else if (scale==1)
edgeFactor = fmin(1296.0f,edgedist*edgedist*edgedist*edgedist)/1296.0f; // 6px^4
else
edgeFactor = fmin(7776.0f,edgedist*edgedist*edgedist*edgedist*edgedist)/7776.0f; // 6px^5
float d = data[i]*edgeFactor;
data[i] = d;
}
}
// parallel half-wave rectification and squaring
__global__ void dev_halfRect2(float *data, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float d = data[i]*6.6084f; // scaleFactors.v1Linear
// d = (d>0)?d:0; // Matlab code and Rust et al, 2006 do not half-rectify anymore
data[i] = d*d*1.9263; // scaleFactors.v1FullWaveRectified
}
}
// compute the mean on the array's third dimension
// this is used to compute the mean of all 28 filter responses at a given location/scale (used in the complex cell
// normalization step)
__global__ void dev_mean3(float *idata, float *odata, int nrXnrY, int nrZ) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
const int blockSize = nrXnrY*nrZ;
for(int i = tid; i < nrXnrY; i += threadN) {
float sum = 0;
int ind = i + blockIdx.y*blockSize;
for (int j=0; j < nrZ; j++) sum += idata[ind+j*nrXnrY];
odata[i+blockIdx.y*nrXnrY] = sum/nrZ;
}
}
// population normalization of complex cell responses
__global__ void dev_normalize(float *resp, float *pop, int nrXnrY, int nrZ) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
const int blockSize = nrXnrY*nrZ;
for(int i = tid; i < nrXnrY; i += threadN) {
float norm = pop[i+blockIdx.y*nrXnrY];
int ind = i + blockIdx.y*blockSize;
for (int j=0; j < nrZ; j++) resp[ind+j*nrXnrY] /= (norm + 0.1*0.1); // scaleFactors.v1sigma
}
}
// reads in stimuli in RGB format and extracts R, G, B, and grayscale values (normalized to [0,1])
__global__ void dev_split(unsigned char *idata, float *red, float *green, float *blue, float *gray, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
typedef struct rgb_s {
unsigned char r,g,b;
} rgb_t;
rgb_t* rgbs = (rgb_t*)idata;
for(int i = tid; i < len; i += threadN) {
rgb_t rgb=rgbs[i];
float r = rgb.r/255.0;
float g = rgb.g/255.0;
float b = rgb.b/255.0;
gray[i] = (r+g+b)/3;
red[i] = r;
green[i] = g;
blue[i] = b;
}
}
// parallel subtraction
__global__ void dev_sub(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = i1data[i] - i2data[i];
}
}
// parallel averaging
__global__ void dev_ave(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = (i1data[i] + i2data[i])/2;
}
}
// parallel summing
__global__ void dev_sum(float *i1data, float *i2data, float* odata, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
odata[i] = i1data[i] + i2data[i];
}
}
// parallel half-rectification at a given scale
__global__ void dev_scaleHalfRect(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float tmp = data[i];
data[i] = (tmp>0)?sqrt(sqrt(tmp))*scale:0;
}
}
// parallel mulitplying with a scale factor
__global__ void dev_scale(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
data[i] *= scale;
}
}
// parallel taking the square root and multiplying with a scale factor
__global__ void dev_scaleSqrt(float *data, float scale, int len) {
const int tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
const int threadN = IMUL(blockDim.x, gridDim.x);
for(int i = tid; i < len; i += threadN) {
float tmp = data[i];
data[i] = (tmp>0)?sqrt(tmp)*scale:0;
}
}
// stim should be an array of lenght nrX*nrY*3 with the data being organized such as: R1 G1 B1 R2 G2 B2 ...
// void calcColorME(int spatFreq, int nrX, int nrY, unsigned char* stim, float* red_green, float* green_red, float* blue_yellow, float* yellow_blue, float* ME, bool GPUpointers)
void calcColorME(int nrX, int nrY, unsigned char* stim, float* red_green, float* green_red, float* blue_yellow, float* yellow_blue, float* ME, bool GPUpointers)
{
// allocate memory on the GPU
if (nrX != stimBufX || nrY != stimBufY) {
stimBufX = nrX;
stimBufY = nrY;
// allocate the response matrix
CUDA_CHECK_ERRORS(cudaMalloc((void**)&d_resp, sizeof(float)*nrX*nrY*nrDirs*nrScales));
// probably should free previous buffers if they were previously allocated...
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_stimBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMemset (d_stimBuf, 0, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc((void**)&diffV1GausBufT, sizeof(float)*nrX*nrY*v1GausSize));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_stim, nrX*nrY*3));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_scalingStimBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_v1GausBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_diffV1GausBuf, nrX*nrY*nrT*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_pop, nrX*sizeof(float)*nrY*nrScales)); // mean of 28 filter responses for all x,y and spatial scales, at a given step in time
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_red, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_green, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_blue, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_center, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_surround, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_color_tmp, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_color_tmp_green, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaMalloc ((void**)&d_color_tmp_yellow, nrX*nrY*sizeof(float)));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&scalingFilt, d_scalingFilt));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&v1Gaus, d_v1Gaus));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&complexV1Filt, d_complexV1Filt));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&normV1filt, d_normV1filt));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&diff1filt, d_diff1filt));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&diff2filt, d_diff2filt));
CUDA_CHECK_ERRORS(cudaGetSymbolAddress((void**)&diff3filt, d_diff3filt));
}
// use the preexisting filters because they are about the right size and give good results
float* center_filt = v1Gaus;
float* surround_filt = complexV1Filt;
const int center_filtSize = v1GausSize;
const int surround_filtSize = complexV1FiltSize;
/* size_t avail, total, previous;
float toGB = 1024.0*1024.0*1024.0;
cudaMemGetInfo(&avail,&total);
printf("after ME:\t\t\t%2.3f GB\t%2.3f GB\t%2.3f GB\n",(float)(avail)/toGB,(float)((total-avail)/toGB),(float)(avail/toGB));
previous=avail; */
CUDA_CHECK_ERRORS(cudaMemcpy(d_stim,stim,3*nrX*nrY,cudaMemcpyHostToDevice));
dev_split<<<iDivUp(nrX*nrY,128), 128>>>(d_stim, d_red, d_green, d_blue, &d_stimBuf[nrX*nrY*(nrT-1)], nrX*nrY);
CUDA_GET_LAST_ERROR("dev_split() execution failed\n");
/* ***** COLOR MODEL ***** */
uint3 color_sizes = make_uint3(nrX,nrY,1);
//d_center will contain center_red
CUDA_CHECK_ERRORS(cudaMemcpy(d_center,d_red,sizeof(float)*nrX*nrY,cudaMemcpyDeviceToDevice));
conv2D(d_center, d_color_tmp, color_sizes, center_filt, center_filtSize);
//d_color_tmp_green will contain center_green
CUDA_CHECK_ERRORS(cudaMemcpy(d_color_tmp_green,d_green,sizeof(float)*nrX*nrY,cudaMemcpyDeviceToDevice));
conv2D(d_color_tmp_green, d_color_tmp, color_sizes, center_filt, center_filtSize);
//d_color_tmp_yellow will contain center_yellow
dev_ave<<<iDivUp(nrX*nrY,128), 128>>>(d_center, d_color_tmp_green, d_color_tmp_yellow, nrX*nrY);
//d_green will contain surround_green
conv2D(d_green, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_color_tmp will contain the result
dev_sub<<<iDivUp(nrX*nrY,128), 128>>>(d_center, d_green, d_color_tmp, nrX*nrY);
dev_scaleHalfRect<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(cudaMemcpy(red_green,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?cudaMemcpyDeviceToDevice:cudaMemcpyDeviceToHost));
//d_red will contain surround_red
conv2D(d_red, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_surround will contain surround_blue
CUDA_CHECK_ERRORS(cudaMemcpy(d_surround,d_blue,sizeof(float)*nrX*nrY,cudaMemcpyDeviceToDevice));
conv2D(d_surround, d_color_tmp, color_sizes, surround_filt, surround_filtSize);
//d_color_tmp_yellow will contain the result
dev_sub<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp_yellow, d_surround, d_color_tmp, nrX*nrY);
dev_scaleHalfRect<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(cudaMemcpy(yellow_blue,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?cudaMemcpyDeviceToDevice:cudaMemcpyDeviceToHost));
dev_sub<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp_green, d_red, d_color_tmp, nrX*nrY);
dev_scaleHalfRect<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(cudaMemcpy(green_red,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?cudaMemcpyDeviceToDevice:cudaMemcpyDeviceToHost));
//d_surround will contain surround_yellow
dev_ave<<<iDivUp(nrX*nrY,128), 128>>>(d_red, d_green, d_surround, nrX*nrY);
//d_blue will contain center_blue
conv2D(d_blue, d_color_tmp, color_sizes, center_filt, center_filtSize);
dev_sub<<<iDivUp(nrX*nrY,128), 128>>>(d_blue, d_surround, d_color_tmp, nrX*nrY);
dev_scaleHalfRect<<<iDivUp(nrX*nrY,128), 128>>>(d_color_tmp, 50.0, nrX*nrY);
CUDA_CHECK_ERRORS(cudaMemcpy(blue_yellow,d_color_tmp,sizeof(float)*nrX*nrY,GPUpointers?cudaMemcpyDeviceToDevice:cudaMemcpyDeviceToHost));
/* ***** MOTION ENERGY MODEL ***** */
// ME responses do not depend on color responses, but on grayscale values found in d_stimBuf[]
// shift d_stimBuf in time by 1 frame, from frame i to frame i-1
for(int i=1;i<nrT;i++)
CUDA_CHECK_ERRORS(cudaMemcpy(&d_stimBuf[nrX*nrY*(i-1)],&d_stimBuf[nrX*nrY*i],sizeof(float)*nrX*nrY,cudaMemcpyDeviceToDevice));
// allocate d_resp, which will contain the response to all 28 (nrDirs) space-time orientation at 3 (nrScales) scales
// for every pixel location (x,y)
CUDA_CHECK_ERRORS(cudaMemset (d_resp, 0, sizeof(float)*nrX*nrY*nrDirs*nrScales));
// working copy of grayscale values: copy d_stimBuf to d_scalingStimBuf
CUDA_CHECK_ERRORS(cudaMemcpy(d_scalingStimBuf,d_stimBuf,sizeof(float)*nrX*nrY*nrT,cudaMemcpyDeviceToDevice));
// compute the V1 simple cell responses at 3 different spatial scales
for (int scale=1; scale<=nrScales; scale++) {
// blur/scale the image... each time this is called stim is blurred more
// scale 1 == original image resolution (space/time)
if (scale > 1) {
float* tmp;
CUDA_CHECK_ERRORS(cudaMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrT));
// convolve d_scalingStimBuf by scalingFilt in 3D
uint3 sizes = make_uint3(nrX,nrY,nrT);
conv3D(d_scalingStimBuf, tmp, sizes, scalingFilt, scalingFiltSize);
CUDA_CHECK_ERRORS(cudaFree(d_scalingStimBuf));
d_scalingStimBuf = tmp;
}
// nrT is 9, v1GaussSize is 9, so we're taking d_scalingStimBuf[0-0+nrX*nrY*9]
// since nrT could be greater than v1GaussSize, we take "only the part we want", quote Micah comment
CUDA_CHECK_ERRORS(cudaMemcpy(d_v1GausBuf, &d_scalingStimBuf[nrX*nrY*((nrT-v1GausSize)/2)], sizeof(float)*nrX*nrY*v1GausSize, cudaMemcpyDeviceToDevice));
float* tmp;
CUDA_CHECK_ERRORS(cudaMalloc((void**)&tmp, sizeof(float)*nrX*nrY*v1GausSize));
// convolve d_v1GausBuf by v1Gaus in 3D
uint3 sizes = make_uint3(nrX,nrY,v1GausSize);
conv3D(d_v1GausBuf, tmp, sizes, v1Gaus, v1GausSize);
CUDA_CHECK_ERRORS(cudaFree(d_v1GausBuf));
d_v1GausBuf = tmp;
// go through and calculate all directional derivatives and then combine them to calculate the diferent
// space-time oriented filters
for (int orderT=0; orderT<=3; orderT++) {
// reset diffV1GausBufT back to the 3D gaussian filtered version
CUDA_CHECK_ERRORS(cudaMemcpy(diffV1GausBufT, d_v1GausBuf, sizeof(float)*nrX*nrY*v1GausSize, cudaMemcpyDeviceToDevice));
if (orderT > 0) {
// take the derivative
// sizes: tripel (nrX,nrY,v1GaussSize)
diffV1GausBufT = diff(diffV1GausBufT, sizes, orderT,2);
}
for (int orderY=0; orderY<=3-orderT; orderY++) {
int orderX = 3-orderY-orderT;
CUDA_CHECK_ERRORS(cudaMemcpy(d_diffV1GausBuf, diffV1GausBufT, sizeof(float)*nrX*nrY*v1GausSize, cudaMemcpyDeviceToDevice));
if (orderX > 0) d_diffV1GausBuf = diff(d_diffV1GausBuf, sizes, orderX,0);
if (orderY > 0) d_diffV1GausBuf = diff(d_diffV1GausBuf, sizes, orderY,1);
// combine the directional derivative by the direction of the space-time filter
accumDiffStims(&d_resp[(scale-1)*nrX*nrY*nrDirs], &d_diffV1GausBuf[nrX*nrY*(v1GausSize/2)], sizes, orderX, orderY, orderT);
}
}
}
// consider edge effects
dev_edges<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, nrX*nrY*nrDirs*nrScales, nrX, nrY);
CUDA_GET_LAST_ERROR("dev_edges() execution failed\n");
// half-square the linear responses
// contains scaleFactor.v1Linear and scaleFactor.v1FullWaveRectified
dev_halfRect2<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, nrX*nrY*nrDirs*nrScales);
CUDA_GET_LAST_ERROR("dev_halfRect2() execution failed\n");
float* tmp;
// complex: convolve by d_complexV1Filt in 2D
CUDA_CHECK_ERRORS(cudaMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrDirs*nrScales));
uint3 sizes = make_uint3(nrX,nrY,nrDirs*nrScales);
conv2D(d_resp, tmp, sizes, complexV1Filt, complexV1FiltSize);
CUDA_CHECK_ERRORS(cudaFree(tmp));
// scale with scaleFactors.v1Blur
// NOTE: scaling with 1.0205..? Skip to save computation time
// dev_scale<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, 1.0205, nrX*nrY*nrDirs*nrScales);
// CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// we need to associate each filter at pixel position (x,y) with a power/intensity, but there are 28 filter
// responses at each location... so we need to (i) average over the 28 filters (3rd dimension in d_resp) and put it
// into d_pop ...
dim3 gridm(iDivUp(nrX*nrY,128), nrScales);
dev_mean3<<<gridm, 128>>>(d_resp, d_pop, nrX*nrY, nrDirs);
CUDA_GET_LAST_ERROR("dev_mean3() execution failed\n");
// ... (ii) scale with scaleFactors.v1Complex
// NOTE: Scale with 0.99..? Skip to save computation time
// dev_scale<<<iDivUp(nrX*nrY*nrDirs*nrScales,128), 128>>>(d_resp, 0.99, nrX*nrY*nrDirs*nrScales);
// CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// ... and (iii) sum over some spatial neighborhood
// population normalization: convolve by d_normV1filtSize in 2D
uint3 nsizes = make_uint3(nrX,nrY,nrScales);
CUDA_CHECK_ERRORS(cudaMalloc((void**)&tmp, sizeof(float)*nrX*nrY*nrScales));
conv2D(d_pop, tmp, nsizes, normV1filt, normV1filtSize);
CUDA_CHECK_ERRORS(cudaFree(tmp));
// don't scale with scaleFactors.v1NormalizationStrength * scaleFactors.v1NormalizationPopulationK
// since we don't normalize over the WHOLE population, these factors are off
// the purpose of this normalization is to get a htan()-like response normalization: a scaling factor of 1.0 turns
// out to be good enough
dev_scale<<<iDivUp(nrX*nrY*nrScales,128), 128>>>(d_pop, 1.0, nrX*nrY*nrScales);
CUDA_GET_LAST_ERROR("dev_scale() execution failed\n");
// d_resp is the numerator, d_pop the denominator sum term
dev_normalize<<<gridm, 128>>>(d_resp, d_pop, nrX*nrY, nrDirs);
CUDA_GET_LAST_ERROR("dev_normalize() execution failed\n");
// Scaling factors were chosen such that in a RDK task all 3 scales have similar mean responses
// We believe this to be a reasonable assumption considering that dots do not suffer from the aperture problem;
// thus the model should have similar response strengths at all 3 scales
for (int scale=0; scale<nrScales; scale++)
dev_scale<<<iDivUp(nrX*nrY*nrDirs,128), 128>>>(&d_resp[scale*nrX*nrY*nrDirs], (scale==0?15.0f:(scale==1?17.0f:11.0f)), nrX*nrY*nrDirs); // 15 17.5 17
// copy response to device or host (depending on whether we run in CPU_MODE or GPU_MODE)
CUDA_CHECK_ERRORS(cudaMemcpy(ME,d_resp,sizeof(float)*nrX*nrY*nrDirs*nrScales,GPUpointers?cudaMemcpyDeviceToDevice:cudaMemcpyDeviceToHost));
/*
size_t avail, total, used;
cudaMemGetInfo( &avail, &total );
used = total - avail;
printf("used GPU memory %f MB\n",(float)(used/1024.0/1024.0));
*/
}
// free all allocated blocks
void freeAllCUDA() {
CUDA_CHECK_ERRORS(cudaFree(d_stimBuf));
CUDA_CHECK_ERRORS(cudaFree(diffV1GausBufT));
CUDA_CHECK_ERRORS(cudaFree(d_stim));
CUDA_CHECK_ERRORS(cudaFree(d_scalingStimBuf));
CUDA_CHECK_ERRORS(cudaFree(d_v1GausBuf));
CUDA_CHECK_ERRORS(cudaFree(d_diffV1GausBuf));
CUDA_CHECK_ERRORS(cudaFree(d_pop));
CUDA_CHECK_ERRORS(cudaFree(d_red));
CUDA_CHECK_ERRORS(cudaFree(d_green));
CUDA_CHECK_ERRORS(cudaFree(d_blue));
CUDA_CHECK_ERRORS(cudaFree(d_center));
CUDA_CHECK_ERRORS(cudaFree(d_surround));
CUDA_CHECK_ERRORS(cudaFree(d_color_tmp));
CUDA_CHECK_ERRORS(cudaFree(d_color_tmp_green));
CUDA_CHECK_ERRORS(cudaFree(d_color_tmp_yellow));
stimBufX = 0;
stimBufY = 0;
}
|
d580266f291397c37481be2e0362b7de0ed8248c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* BestDiffKernel.cu
* heuristic CUDA
*
* Created by Roberto Roverso on 25/08/09.
* Copyright 2009 Peerialism. All rights reserved.
*
*/
#include <stdio.h>
//#define KERNEL_DEBUG
__device__ void removeDifferenceG(AijMatrix A, Difference* differences, int id) {
setEmptyDiff(&differences[id]);
int i;
for (i = id + 1; i < A.height + A.width; i++)
{
if (differences[i].value != -1)
{
differences[i - 1] = differences[i];
} else
{
break;
}
}
}
__device__ void bestDiffInternalRepeatOne(int rowId, Difference* diffs,
float* srtDiffs, AijMatrix A, int* persons, int* objects,
bool* bannedSwitches, bool* clearedBannedSwitches, Difference ret) {
float maxDiff = 0.009f;
int bestChangeCol = -1;
int myCol = persons[rowId];
if (myCol == -1)
maxDiff = NEGINF;
int myRow = rowId;
int foundFreeObject = 0;
int otherCol;
int m1 = 0;
int m2 = A.width;
for (otherCol = m1; otherCol < m2; otherCol++)
{
int otherRow = objects[otherCol];
float difference = NEGINF;
// Person is not assigned
if (myCol == -1)
{
// Object considered not assigned
if (otherRow == -1)
{
// happiness value for the per-obj association
difference = m(A, myRow, otherCol);
if (foundFreeObject == 0)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
foundFreeObject = 1;
} else if (foundFreeObject == 0 && !bannedSwitches[myRow * A.width
+ otherRow])
// object is not free
// Compare old case with new case
// pos...better me
// neg...better him
difference = m(A, myRow, otherCol) - m(A, otherRow, otherCol);
} else if (otherRow == -1)
// Compare old case with new case
difference = m(A, myRow, otherCol) - m(A, myRow, myCol);
else if (m(A, otherRow, myCol) != NEGINF)
{
// Both assigned
// Switch improves overall happiness of the two assignments
difference = m(A, myRow, otherCol) + m(A, otherRow, myCol) - (m(A,
myRow, myCol) + m(A, otherRow, otherCol));
}
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
}
//#ifdef KERNEL_DEBUG
// printf("D%d -> %f\n",rowId,maxDiff);
//#endif
if (maxDiff < 0)
{
maxDiff = -maxDiff;
}
if (maxDiff > 0.1 || myCol == -1)
{
if (bestChangeCol == -1)
{
if (clearedBannedSwitches[myRow])
{
persons[myRow] = -1;
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
}
if (myCol == -1)
maxDiff = maxDiff * 1000;
ret.index = rowId;
ret.bestChange = bestChangeCol;
ret.type = 0;
ret.value = maxDiff;
return;
}
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
__device__ void bestDiffOne(AijMatrix A, Difference* diffs, float* srtDiffs,
int* persons, int* objects, bool* bannedSwitches,
bool* clearedBannedSwitches, int rowId, Difference ret) {
float maxDiff = 0.009f;
int myCol = persons[rowId];
if (myCol == -1)
maxDiff = NEGINF;
int myRow = rowId;
int foundFreeObject = 0;
int otherCol;
int bestChangeCol = -1;
int m1 = 0;
int m2 = A.width;
for (otherCol = m1; otherCol < m2; otherCol++)
{
int otherRow = objects[otherCol];
float difference = NEGINF;
// Person is not assigned
if (myCol == -1)
{
// Object considered not assigned
if (otherRow == -1)
{
// happiness value for the per-obj association
difference = m(A, myRow, otherCol);
if (foundFreeObject == 0)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
foundFreeObject = 1;
} else if (foundFreeObject == 0 && !bannedSwitches[myRow * A.width
+ otherRow])
// object is not free
// Compare old case with new case
// pos...better me
// neg...better him
difference = m(A, myRow, otherCol) - m(A, otherRow, otherCol);
} else if (otherRow == -1)
// Compare old case with new case
difference = m(A, myRow, otherCol) - m(A, myRow, myCol);
else if (m(A, otherRow, myCol) != NEGINF)
{
// Both assigned
// Switch improves overall happiness of the two assignments
difference = m(A, myRow, otherCol) + m(A, otherRow, myCol) - (m(A,
myRow, myCol) + m(A, otherRow, otherCol));
}
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
}
if (maxDiff < 0)
maxDiff = -maxDiff;
if (maxDiff > 0.1 || myCol == -1)
{
if (bestChangeCol == -1)
{
if (clearedBannedSwitches[rowId])
{
// No suitable assignment due to banning
persons[rowId] = -1;
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
//return myDifference;
}
clearedBannedSwitches[rowId] = true;
int x;
for (x = 0; x < A.height; x++)
bannedSwitches[rowId * A.width + x] = false;
bestDiffInternalRepeatOne(rowId, diffs, srtDiffs, A, persons,
objects, bannedSwitches, clearedBannedSwitches, ret);
return;
}
if (myCol == -1)
maxDiff = maxDiff * 1000;
ret.index = rowId;
ret.bestChange = bestChangeCol;
ret.type = 0;
ret.value = maxDiff;
return;
}
// Difference not worth to consider
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
__device__ void addRowBestDifference(AijMatrix A, Difference* differences,
Difference* rowDifferences, float* srtDiffs, int* persons,
int* objects, bool* bannedSwitches, bool* clearedBannedSwitches,
int rowId, int sort, Difference ret) {
bestDiffOne(A, differences, srtDiffs, persons, objects, bannedSwitches,
clearedBannedSwitches, rowId, ret);
Difference myDifference = ret;
int numberOfPersons = A.height;
int numberOfObjects = A.width;
if (myDifference.index != -1)
{
myDifference.myAssigned = persons[rowId];
myDifference.bestChangeAssigned = objects[myDifference.bestChange];
if (sort == 0)
{
differences[rowId] = myDifference;
} else
{
int i;
float maxDiff = myDifference.value;
for (i = 0; i < numberOfPersons + numberOfObjects; i++)
{
if (maxDiff > differences[i].value)
{
Difference currentDiff = myDifference;
int j;
for (j = i; j < numberOfObjects + numberOfPersons; j++)
{
if (differences[j].value != -1)
{
Difference temp = differences[j];
differences[j] = currentDiff;
currentDiff = temp;
} else
{
differences[j] = currentDiff;
break;
}
}
break;
}
}
//addSortedDifference(myDifference);
}
rowDifferences[rowId] = myDifference;
}
}
__device__ void addColBestDifferenceG(AijMatrix A, Difference* differences,
Difference* columnDifferences, int* persons, int* objects, int colId,
int sort) {
if (colId == -1 || objects[colId] == -1)
return;
float maxDiff = 0.009;
int bestChangeRow = -1;
int myRow = objects[colId];
int myCol = colId;
int otherRow;
int numberOfPersons = A.height;
int numberOfObjects = A.width;
for (otherRow = 0; otherRow < numberOfPersons; otherRow++)
{
int otherCol = persons[otherRow];
if (otherCol == -1)
continue;
if (m(A, otherRow, myCol) != NEGINF && m(A, myRow, otherCol) != NEGINF)
{
float difference = m(A, myRow, otherCol) + m(A, otherRow, myCol)
- (m(A, myRow, myCol) + m(A, otherRow, otherCol));
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeRow = otherRow;
}
}
}
if (maxDiff > 0.1)
{
Difference myDifference;
myDifference.index = colId;
myDifference.bestChange = bestChangeRow;
myDifference.type = 1;
myDifference.value = maxDiff;
myDifference.myAssigned = objects[colId];
myDifference.bestChangeAssigned = persons[bestChangeRow];
if (sort == 0)
{
differences[numberOfPersons + colId] = myDifference;
} else
{
int i;
float maxDiff = myDifference.value;
for (i = 0; i < numberOfPersons + numberOfObjects; i++)
{
if (maxDiff > differences[i].value)
{
Difference currentDiff = myDifference;
int j;
for (j = i; j < numberOfObjects + numberOfPersons; j++)
{
if (differences[j].value != -1)
{
Difference temp = differences[j];
differences[j] = currentDiff;
currentDiff = temp;
} else
{
differences[j] = currentDiff;
break;
}
}
break;
}
}
//addSortedDifference(myDifference);
}
columnDifferences[colId] = myDifference;
}
}
__global__ void first(AijMatrix A, Difference* differences,
Difference* rowDifferences, Difference* columnDifferences,
float* srtDiffs, int* persons, int* objects, bool* bannedSwitches,
bool* clearedBannedSwitches, Difference ret) {
int rowId = blockIdx.x * blockDim.x + threadIdx.x;
if (rowId == 0)
{
int numberOfPersons = A.height;
int numberOfObjects = A.width;
int switchedRows[2];
int switchedColumns[2];
while (differences[1].index > 1)
{
Difference myDiff = differences[0];
int row1, row2, col1, col2;
// Here I need to retrieve the 2 columns and 2 rows that will be
// altered due to switch ...
// to not reUpdate all the differences in the Tree
float diffCheck;
if (myDiff.type == 0)
{ // Found in row..i.e. switching happens
//printf("Switching on row: \n");
// along columns
row1 = myDiff.index; // index of row of the difference
//printf("index: \n");
col1 = persons[row1]; // index of column of the chosen
// cell in the row of difference
col2 = myDiff.bestChange; // index of column of the best
//printf("bc: \n");
// cell in the row of difference
row2 = objects[col2]; // index of row of the chosen in the
// column of the best cell in the
// difference row
//printf("ma %d, bca %d",myDiff.myAssigned,myDiff.bestChangeAssigned);
if (col1 != myDiff.myAssigned || row2
!= myDiff.bestChangeAssigned)
{
diffCheck = -1.0;
} else if (row2 == -1)
{
diffCheck = m(A, row1, col2) - m(A, row1, col1);
} else
{
diffCheck = m(A, row1, col2) + m(A, row2, col1) - (m(A,
row1, col1) + m(A, row2, col2));
}
} else
{
//printf("Switching on column: \n");
col1 = myDiff.index; // index of column of the difference
row1 = objects[col1]; // index of row of the chosen cell
// in the column of difference
row2 = myDiff.bestChange; // index of row of the best cell
// in the column of difference
col2 = persons[row2]; // index of column of the chosen in
// the row of the best cell in the
// difference column
if (row1 != myDiff.myAssigned || col2
!= myDiff.bestChangeAssigned)
diffCheck = -1.0f;
else
diffCheck = m(A, row1, col2) + m(A, row2, col1) - (m(A,
row1, col1) + m(A, row2, col2));
}
//printf("DiffCheck: \n");
// We need to check that our previous calculation still holds
// It may not due to second order effects
if (diffCheck <= 0)
{
if (myDiff.type == 0)
setEmptyDiff(&rowDifferences[myDiff.index]);
else
setEmptyDiff(&columnDifferences[myDiff.index]);
removeDifferenceG(A, differences, 0);
continue;
}
#ifdef KERNEL_DEBUG
printf("DiffCheck -> %f\n",diffCheck);
#endif
persons[row1] = col2;
if (row2 != -1)
{
// if (col1 == -1)
// bannedSwitches[row1].add(row2);
persons[row2] = col1;
}
// if (col1 != -1)
objects[col1] = row2;
objects[col2] = row1;
// if (col1 == -1 && row2 == -1)
// return;
// System.out.println("Happiness after switch:
// "+calculateTotalHappiness());
// Now we update the modified rows and columns
switchedRows[0] = row1;
switchedRows[1] = row2;
switchedColumns[0] = col1;
switchedColumns[1] = col2;
int i;
for (i = 0; i < 2; i++)
{
if (columnDifferences[switchedColumns[i]].index != -1)
{
Difference toRemove = columnDifferences[switchedColumns[i]];
int z;
for (z = 1; z < numberOfObjects + numberOfPersons; z++)
{
Difference toCheck = differences[z];
if (toCheck.index == -1)
break;
if (toCheck.index == toRemove.index && toCheck.type
== toRemove.type)
{
removeDifferenceG(A, differences, z);
break;
}
}
setEmptyDiff(&columnDifferences[switchedColumns[i]]);
}
addColBestDifferenceG(A, differences, columnDifferences,
persons, objects, switchedColumns[i], 1);
}
for (i = 0; i < 2; i++)
{
if (rowDifferences[switchedRows[i]].index != -1)
{
Difference toRemove = rowDifferences[switchedRows[i]];
int z;
for (z = 1; z < numberOfObjects + numberOfPersons; z++)
{
Difference toCheck = differences[z];
if (toCheck.index == -1)
break;
if (toCheck.index == toRemove.index && toCheck.type
== toRemove.type)
{
removeDifferenceG(A, differences, z);
break;
}
}
setEmptyDiff(&rowDifferences[switchedRows[i]]);
}
addRowBestDifference(A, differences, rowDifferences, srtDiffs,
persons, objects, bannedSwitches,
clearedBannedSwitches, rowId, 1, ret);
}
}
//__syncthreads();
}
}
| d580266f291397c37481be2e0362b7de0ed8248c.cu | /*
* BestDiffKernel.cu
* heuristic CUDA
*
* Created by Roberto Roverso on 25/08/09.
* Copyright 2009 Peerialism. All rights reserved.
*
*/
#include <stdio.h>
//#define KERNEL_DEBUG
__device__ void removeDifferenceG(AijMatrix A, Difference* differences, int id) {
setEmptyDiff(&differences[id]);
int i;
for (i = id + 1; i < A.height + A.width; i++)
{
if (differences[i].value != -1)
{
differences[i - 1] = differences[i];
} else
{
break;
}
}
}
__device__ void bestDiffInternalRepeatOne(int rowId, Difference* diffs,
float* srtDiffs, AijMatrix A, int* persons, int* objects,
bool* bannedSwitches, bool* clearedBannedSwitches, Difference ret) {
float maxDiff = 0.009f;
int bestChangeCol = -1;
int myCol = persons[rowId];
if (myCol == -1)
maxDiff = NEGINF;
int myRow = rowId;
int foundFreeObject = 0;
int otherCol;
int m1 = 0;
int m2 = A.width;
for (otherCol = m1; otherCol < m2; otherCol++)
{
int otherRow = objects[otherCol];
float difference = NEGINF;
// Person is not assigned
if (myCol == -1)
{
// Object considered not assigned
if (otherRow == -1)
{
// happiness value for the per-obj association
difference = m(A, myRow, otherCol);
if (foundFreeObject == 0)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
foundFreeObject = 1;
} else if (foundFreeObject == 0 && !bannedSwitches[myRow * A.width
+ otherRow])
// object is not free
// Compare old case with new case
// pos...better me
// neg...better him
difference = m(A, myRow, otherCol) - m(A, otherRow, otherCol);
} else if (otherRow == -1)
// Compare old case with new case
difference = m(A, myRow, otherCol) - m(A, myRow, myCol);
else if (m(A, otherRow, myCol) != NEGINF)
{
// Both assigned
// Switch improves overall happiness of the two assignments
difference = m(A, myRow, otherCol) + m(A, otherRow, myCol) - (m(A,
myRow, myCol) + m(A, otherRow, otherCol));
}
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
}
//#ifdef KERNEL_DEBUG
// printf("D%d -> %f\n",rowId,maxDiff);
//#endif
if (maxDiff < 0)
{
maxDiff = -maxDiff;
}
if (maxDiff > 0.1 || myCol == -1)
{
if (bestChangeCol == -1)
{
if (clearedBannedSwitches[myRow])
{
persons[myRow] = -1;
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
}
if (myCol == -1)
maxDiff = maxDiff * 1000;
ret.index = rowId;
ret.bestChange = bestChangeCol;
ret.type = 0;
ret.value = maxDiff;
return;
}
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
__device__ void bestDiffOne(AijMatrix A, Difference* diffs, float* srtDiffs,
int* persons, int* objects, bool* bannedSwitches,
bool* clearedBannedSwitches, int rowId, Difference ret) {
float maxDiff = 0.009f;
int myCol = persons[rowId];
if (myCol == -1)
maxDiff = NEGINF;
int myRow = rowId;
int foundFreeObject = 0;
int otherCol;
int bestChangeCol = -1;
int m1 = 0;
int m2 = A.width;
for (otherCol = m1; otherCol < m2; otherCol++)
{
int otherRow = objects[otherCol];
float difference = NEGINF;
// Person is not assigned
if (myCol == -1)
{
// Object considered not assigned
if (otherRow == -1)
{
// happiness value for the per-obj association
difference = m(A, myRow, otherCol);
if (foundFreeObject == 0)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
foundFreeObject = 1;
} else if (foundFreeObject == 0 && !bannedSwitches[myRow * A.width
+ otherRow])
// object is not free
// Compare old case with new case
// pos...better me
// neg...better him
difference = m(A, myRow, otherCol) - m(A, otherRow, otherCol);
} else if (otherRow == -1)
// Compare old case with new case
difference = m(A, myRow, otherCol) - m(A, myRow, myCol);
else if (m(A, otherRow, myCol) != NEGINF)
{
// Both assigned
// Switch improves overall happiness of the two assignments
difference = m(A, myRow, otherCol) + m(A, otherRow, myCol) - (m(A,
myRow, myCol) + m(A, otherRow, otherCol));
}
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeCol = otherCol;
}
}
if (maxDiff < 0)
maxDiff = -maxDiff;
if (maxDiff > 0.1 || myCol == -1)
{
if (bestChangeCol == -1)
{
if (clearedBannedSwitches[rowId])
{
// No suitable assignment due to banning
persons[rowId] = -1;
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
//return myDifference;
}
clearedBannedSwitches[rowId] = true;
int x;
for (x = 0; x < A.height; x++)
bannedSwitches[rowId * A.width + x] = false;
bestDiffInternalRepeatOne(rowId, diffs, srtDiffs, A, persons,
objects, bannedSwitches, clearedBannedSwitches, ret);
return;
}
if (myCol == -1)
maxDiff = maxDiff * 1000;
ret.index = rowId;
ret.bestChange = bestChangeCol;
ret.type = 0;
ret.value = maxDiff;
return;
}
// Difference not worth to consider
ret.index = -1;
ret.myAssigned = -1;
ret.bestChangeAssigned = -1;
return;
}
__device__ void addRowBestDifference(AijMatrix A, Difference* differences,
Difference* rowDifferences, float* srtDiffs, int* persons,
int* objects, bool* bannedSwitches, bool* clearedBannedSwitches,
int rowId, int sort, Difference ret) {
bestDiffOne(A, differences, srtDiffs, persons, objects, bannedSwitches,
clearedBannedSwitches, rowId, ret);
Difference myDifference = ret;
int numberOfPersons = A.height;
int numberOfObjects = A.width;
if (myDifference.index != -1)
{
myDifference.myAssigned = persons[rowId];
myDifference.bestChangeAssigned = objects[myDifference.bestChange];
if (sort == 0)
{
differences[rowId] = myDifference;
} else
{
int i;
float maxDiff = myDifference.value;
for (i = 0; i < numberOfPersons + numberOfObjects; i++)
{
if (maxDiff > differences[i].value)
{
Difference currentDiff = myDifference;
int j;
for (j = i; j < numberOfObjects + numberOfPersons; j++)
{
if (differences[j].value != -1)
{
Difference temp = differences[j];
differences[j] = currentDiff;
currentDiff = temp;
} else
{
differences[j] = currentDiff;
break;
}
}
break;
}
}
//addSortedDifference(myDifference);
}
rowDifferences[rowId] = myDifference;
}
}
__device__ void addColBestDifferenceG(AijMatrix A, Difference* differences,
Difference* columnDifferences, int* persons, int* objects, int colId,
int sort) {
if (colId == -1 || objects[colId] == -1)
return;
float maxDiff = 0.009;
int bestChangeRow = -1;
int myRow = objects[colId];
int myCol = colId;
int otherRow;
int numberOfPersons = A.height;
int numberOfObjects = A.width;
for (otherRow = 0; otherRow < numberOfPersons; otherRow++)
{
int otherCol = persons[otherRow];
if (otherCol == -1)
continue;
if (m(A, otherRow, myCol) != NEGINF && m(A, myRow, otherCol) != NEGINF)
{
float difference = m(A, myRow, otherCol) + m(A, otherRow, myCol)
- (m(A, myRow, myCol) + m(A, otherRow, otherCol));
if (difference > maxDiff)
{
maxDiff = difference;
bestChangeRow = otherRow;
}
}
}
if (maxDiff > 0.1)
{
Difference myDifference;
myDifference.index = colId;
myDifference.bestChange = bestChangeRow;
myDifference.type = 1;
myDifference.value = maxDiff;
myDifference.myAssigned = objects[colId];
myDifference.bestChangeAssigned = persons[bestChangeRow];
if (sort == 0)
{
differences[numberOfPersons + colId] = myDifference;
} else
{
int i;
float maxDiff = myDifference.value;
for (i = 0; i < numberOfPersons + numberOfObjects; i++)
{
if (maxDiff > differences[i].value)
{
Difference currentDiff = myDifference;
int j;
for (j = i; j < numberOfObjects + numberOfPersons; j++)
{
if (differences[j].value != -1)
{
Difference temp = differences[j];
differences[j] = currentDiff;
currentDiff = temp;
} else
{
differences[j] = currentDiff;
break;
}
}
break;
}
}
//addSortedDifference(myDifference);
}
columnDifferences[colId] = myDifference;
}
}
__global__ void first(AijMatrix A, Difference* differences,
Difference* rowDifferences, Difference* columnDifferences,
float* srtDiffs, int* persons, int* objects, bool* bannedSwitches,
bool* clearedBannedSwitches, Difference ret) {
int rowId = blockIdx.x * blockDim.x + threadIdx.x;
if (rowId == 0)
{
int numberOfPersons = A.height;
int numberOfObjects = A.width;
int switchedRows[2];
int switchedColumns[2];
while (differences[1].index > 1)
{
Difference myDiff = differences[0];
int row1, row2, col1, col2;
// Here I need to retrieve the 2 columns and 2 rows that will be
// altered due to switch ...
// to not reUpdate all the differences in the Tree
float diffCheck;
if (myDiff.type == 0)
{ // Found in row..i.e. switching happens
//printf("Switching on row: \n");
// along columns
row1 = myDiff.index; // index of row of the difference
//printf("index: \n");
col1 = persons[row1]; // index of column of the chosen
// cell in the row of difference
col2 = myDiff.bestChange; // index of column of the best
//printf("bc: \n");
// cell in the row of difference
row2 = objects[col2]; // index of row of the chosen in the
// column of the best cell in the
// difference row
//printf("ma %d, bca %d",myDiff.myAssigned,myDiff.bestChangeAssigned);
if (col1 != myDiff.myAssigned || row2
!= myDiff.bestChangeAssigned)
{
diffCheck = -1.0;
} else if (row2 == -1)
{
diffCheck = m(A, row1, col2) - m(A, row1, col1);
} else
{
diffCheck = m(A, row1, col2) + m(A, row2, col1) - (m(A,
row1, col1) + m(A, row2, col2));
}
} else
{
//printf("Switching on column: \n");
col1 = myDiff.index; // index of column of the difference
row1 = objects[col1]; // index of row of the chosen cell
// in the column of difference
row2 = myDiff.bestChange; // index of row of the best cell
// in the column of difference
col2 = persons[row2]; // index of column of the chosen in
// the row of the best cell in the
// difference column
if (row1 != myDiff.myAssigned || col2
!= myDiff.bestChangeAssigned)
diffCheck = -1.0f;
else
diffCheck = m(A, row1, col2) + m(A, row2, col1) - (m(A,
row1, col1) + m(A, row2, col2));
}
//printf("DiffCheck: \n");
// We need to check that our previous calculation still holds
// It may not due to second order effects
if (diffCheck <= 0)
{
if (myDiff.type == 0)
setEmptyDiff(&rowDifferences[myDiff.index]);
else
setEmptyDiff(&columnDifferences[myDiff.index]);
removeDifferenceG(A, differences, 0);
continue;
}
#ifdef KERNEL_DEBUG
printf("DiffCheck -> %f\n",diffCheck);
#endif
persons[row1] = col2;
if (row2 != -1)
{
// if (col1 == -1)
// bannedSwitches[row1].add(row2);
persons[row2] = col1;
}
// if (col1 != -1)
objects[col1] = row2;
objects[col2] = row1;
// if (col1 == -1 && row2 == -1)
// return;
// System.out.println("Happiness after switch:
// "+calculateTotalHappiness());
// Now we update the modified rows and columns
switchedRows[0] = row1;
switchedRows[1] = row2;
switchedColumns[0] = col1;
switchedColumns[1] = col2;
int i;
for (i = 0; i < 2; i++)
{
if (columnDifferences[switchedColumns[i]].index != -1)
{
Difference toRemove = columnDifferences[switchedColumns[i]];
int z;
for (z = 1; z < numberOfObjects + numberOfPersons; z++)
{
Difference toCheck = differences[z];
if (toCheck.index == -1)
break;
if (toCheck.index == toRemove.index && toCheck.type
== toRemove.type)
{
removeDifferenceG(A, differences, z);
break;
}
}
setEmptyDiff(&columnDifferences[switchedColumns[i]]);
}
addColBestDifferenceG(A, differences, columnDifferences,
persons, objects, switchedColumns[i], 1);
}
for (i = 0; i < 2; i++)
{
if (rowDifferences[switchedRows[i]].index != -1)
{
Difference toRemove = rowDifferences[switchedRows[i]];
int z;
for (z = 1; z < numberOfObjects + numberOfPersons; z++)
{
Difference toCheck = differences[z];
if (toCheck.index == -1)
break;
if (toCheck.index == toRemove.index && toCheck.type
== toRemove.type)
{
removeDifferenceG(A, differences, z);
break;
}
}
setEmptyDiff(&rowDifferences[switchedRows[i]]);
}
addRowBestDifference(A, differences, rowDifferences, srtDiffs,
persons, objects, bannedSwitches,
clearedBannedSwitches, rowId, 1, ret);
}
}
//__syncthreads();
}
}
|
4d87b078294d9840d2aa4d0ab8dce470aa3e1eea.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <color_spinor_field.h>
#include <color_spinor_field_order.h>
#include <tune_quda.h>
#include <typeinfo>
#include <vector>
#include <assert.h>
namespace quda {
#ifdef GPU_MULTIGRID
using namespace quda::colorspinor;
template<typename real, int nSpin, int nColor, int nVec, QudaFieldOrder order>
struct FillVArg {
FieldOrderCB<real,nSpin,nColor,nVec,order> V;
FieldOrderCB<real,nSpin,nColor,1,order> B;
const int v;
FillVArg(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int v)
: V(V), B(*(B[v])), v(v) { }
};
// CPU routine to copy the null-space vectors into the V-field
template <typename Float, int nSpin, int nColor, int nVec, typename Arg>
void FillVCPU(Arg &arg, int v) {
for (int parity=0; parity<arg.V.Nparity(); parity++) {
for (int x_cb=0; x_cb<arg.V.VolumeCB(); x_cb++) {
for (int s=0; s<nSpin; s++) {
for (int c=0; c<nColor; c++) {
arg.V(parity, x_cb, s, c, arg.v) = arg.B(parity, x_cb, s, c);
}
}
}
}
}
// GPU kernel to copy the null-space vectors into the V-field
template <typename Float, int nSpin, int nColor, int nVec, typename Arg>
__global__ void FillVGPU(Arg arg, int v) {
int x_cb = threadIdx.x + blockDim.x*blockIdx.x;
int parity = threadIdx.y + blockDim.y*blockIdx.y;
for (int s=0; s<nSpin; s++) {
for (int c=0; c<nColor; c++) {
arg.V(parity, x_cb, s, c, arg.v) = arg.B(parity, x_cb, s, c);
}
}
}
template <typename real, int nSpin, int nColor, int nVec>
class FillVLaunch : public TunableVectorY {
ColorSpinorField &V;
const std::vector<ColorSpinorField*> &B;
const int v;
unsigned int minThreads() const { return V.VolumeCB(); }
public:
FillVLaunch(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, const int v)
: TunableVectorY(2), V(V), B(B), v(v) {
(V.Location() == QUDA_CPU_FIELD_LOCATION) ? strcpy(aux,"CPU") : strcpy(aux,"GPU");
}
virtual ~FillVLaunch() { }
void apply(const hipStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (V.Location() == QUDA_CPU_FIELD_LOCATION) {
if (V.FieldOrder() == QUDA_SPACE_SPIN_COLOR_FIELD_ORDER) {
FillVArg<real,nSpin,nColor,nVec,QUDA_SPACE_SPIN_COLOR_FIELD_ORDER> arg(V,B,v);
FillVCPU<real,nSpin,nColor,nVec>(arg,v);
} else {
errorQuda("Field order not implemented %d", V.FieldOrder());
}
} else {
if (V.FieldOrder() == QUDA_FLOAT2_FIELD_ORDER) {
FillVArg<real,nSpin,nColor,nVec,QUDA_FLOAT2_FIELD_ORDER> arg(V,B,v);
hipLaunchKernelGGL(( FillVGPU<real,nSpin,nColor,nVec>) , dim3(tp.grid),dim3(tp.block),tp.shared_bytes, 0, arg,v);
} else {
errorQuda("Field order not implemented %d", V.FieldOrder());
}
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(V.VolString(), typeid(*this).name(), aux); }
long long flops() const { return 0; }
long long bytes() const { return 2*V.Bytes(); }
};
template <typename real, int nSpin, int nColor, int nVec>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B) {
for (int v=0; v<nVec; v++) {
FillVLaunch<real,nSpin,nColor,nVec> f(V,B,v);
f.apply(0);
}
}
// For staggered this does not include factor 2 due to parity decomposition!
template <typename Float, int nSpin, int nColor>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (Nvec == 2) {
FillV<Float,nSpin,nColor,2>(V,B);
} else if (Nvec == 4) {
FillV<Float,nSpin,nColor,4>(V,B);
} else if (Nvec == 8) {
FillV<Float,nSpin,nColor,8>(V,B);
} else if (Nvec == 12) {
FillV<Float,nSpin,nColor,12>(V,B);
} else if (Nvec == 16) {
FillV<Float,nSpin,nColor,16>(V,B);
} else if (Nvec == 20) {
FillV<Float,nSpin,nColor,20>(V,B);
} else if (Nvec == 24) {
FillV<Float,nSpin,nColor,24>(V,B);
} else if (Nvec == 32) {
FillV<Float,nSpin,nColor,32>(V,B);
} else if (Nvec == 48) {
FillV<Float,nSpin,nColor,48>(V,B);
} else {
errorQuda("Unsupported Nvec %d", Nvec);
}
}
template <typename Float, int nSpin>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (B[0]->Ncolor()*Nvec != V.Ncolor()) errorQuda("Something wrong here");
if (B[0]->Ncolor() == 2) {
FillV<Float,nSpin,2>(V,B,Nvec);
} else if(B[0]->Ncolor() == 3) {
FillV<Float,nSpin,3>(V,B,Nvec);
} else if(B[0]->Ncolor() == 8) {
FillV<Float,nSpin,8>(V,B,Nvec);
} else if(B[0]->Ncolor() == 16) {
FillV<Float,nSpin,16>(V,B,Nvec);
} else if(B[0]->Ncolor() == 24) {
FillV<Float,nSpin,24>(V,B,Nvec);
} else if(B[0]->Ncolor() == 32) {
FillV<Float,nSpin,32>(V,B,Nvec);
} else {
errorQuda("Unsupported nColor %d", B[0]->Ncolor());
}
}
template <typename Float>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (V.Nspin() == 4) {
FillV<Float,4>(V,B,Nvec);
} else if (V.Nspin() == 2) {
FillV<Float,2>(V,B,Nvec);
#ifdef GPU_STAGGERED_DIRAC
} else if (V.Nspin() == 1) {
FillV<Float,1>(V,B,Nvec);
#endif
} else {
errorQuda("Unsupported nSpin %d", V.Nspin());
}
}
#endif // GPU_MULTIGRID
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
#ifdef GPU_MULTIGRID
if (V.Precision() == QUDA_DOUBLE_PRECISION) {
#ifdef GPU_MULTIGRID_DOUBLE
FillV<double>(V,B,Nvec);
#else
errorQuda("Double precision multigrid has not been enabled");
#endif
} else if (V.Precision() == QUDA_SINGLE_PRECISION) {
FillV<float>(V,B,Nvec);
} else {
errorQuda("Unsupported precision %d", V.Precision());
}
#else
errorQuda("Multigrid has not been built");
#endif
}
#ifdef GPU_MULTIGRID
// Creates a block-ordered version of a ColorSpinorField
// N.B.: Only works for the V field, as we need to block spin.
template <bool toBlock, int nVec, class Complex, class FieldOrder>
void blockOrderV(Complex *out, FieldOrder &in,
const int *geo_map, const int *geo_bs, int spin_bs,
const cpuColorSpinorField &V) {
//printfQuda("in.Ncolor = %d\n", in.Ncolor());
int nSpin_coarse = in.Nspin() / spin_bs; // this is number of chiral blocks
//Compute the size of each block
int geoBlockSize = 1;
for (int d=0; d<in.Ndim(); d++) geoBlockSize *= geo_bs[d];
int blockSize = geoBlockSize * in.Ncolor() * spin_bs; // blockSize includes internal dof
int x[QUDA_MAX_DIM]; // global coordinates
int y[QUDA_MAX_DIM]; // local coordinates within a block (full site ordering)
int checkLength = in.Nparity() * in.VolumeCB() * in.Ncolor() * in.Nspin() * in.Nvec();
int *check = new int[checkLength];
int count = 0;
// Run through the fine grid and do the block ordering
for (int parity = 0; parity<in.Nparity(); parity++) {
for (int x_cb=0; x_cb<in.VolumeCB(); x_cb++) {
int i = parity*in.VolumeCB() + x_cb;
// Get fine grid coordinates
V.LatticeIndex(x, i);
//Compute the geometric offset within a block
// (x fastest direction, t is slowest direction, non-parity ordered)
int blockOffset = 0;
for (int d=in.Ndim()-1; d>=0; d--) {
y[d] = x[d]%geo_bs[d];
blockOffset *= geo_bs[d];
blockOffset += y[d];
}
//Take the block-ordered offset from the coarse grid offset (geo_map)
int offset = geo_map[i]*nSpin_coarse*nVec*geoBlockSize*in.Ncolor()*spin_bs;
for (int v=0; v<in.Nvec(); v++) {
for (int s=0; s<in.Nspin(); s++) {
for (int c=0; c<in.Ncolor(); c++) {
int chirality = s / spin_bs; // chirality is the coarse spin
int blockSpin = s % spin_bs; // the remaining spin dof left in each block
int index = offset + // geo block
chirality * nVec * geoBlockSize * spin_bs * in.Ncolor() + // chiral block
v * geoBlockSize * spin_bs * in.Ncolor() + // vector
blockOffset * spin_bs * in.Ncolor() + // local geometry
blockSpin*in.Ncolor() + // block spin
c; // color
if (toBlock) out[index] = in(parity, x_cb, s, c, v); // going to block order
else in(parity, x_cb, s, c, v) = out[index]; // coming from block order
check[count++] = index;
}
}
}
}
//printf("blockOrderV done %d / %d\n", i, in.Volume());
}
if (count != checkLength) {
errorQuda("Number of elements packed %d does not match expected value %d nvec=%d nspin=%d ncolor=%d",
count, checkLength, in.Nvec(), in.Nspin(), in.Ncolor());
}
/*
// need non-quadratic check
for (int i=0; i<checkLength; i++) {
for (int j=0; j<i; j++) {
if (check[i] == check[j]) errorQuda("Collision detected in block ordering\n");
}
}
*/
delete []check;
}
// Creates a block-ordered version of a ColorSpinorField, with parity blocking (for staggered fields)
// N.B.: same as above but parity are separated.
template <bool toBlock, int nVec, class Complex, class FieldOrder>
void blockCBOrderV(Complex *out, FieldOrder &in,
const int *geo_map, const int *geo_bs, int spin_bs,
const cpuColorSpinorField &V) {
//Compute the size of each block
int geoBlockSize = 1;
for (int d=0; d<in.Ndim(); d++) geoBlockSize *= geo_bs[d];
int blockSize = geoBlockSize * in.Ncolor(); // blockSize includes internal dof
int x[QUDA_MAX_DIM]; // global coordinates
int y[QUDA_MAX_DIM]; // local coordinates within a block (full site ordering)
int checkLength = in.Nparity() * in.VolumeCB() * in.Ncolor() * in.Nvec();
int *check = new int[checkLength];
int count = 0;
// Run through the fine grid and do the block ordering
for (int parity = 0; parity<in.Nparity(); parity++) {
for (int x_cb=0; x_cb<in.VolumeCB(); x_cb++) {
int i = parity*in.VolumeCB() + x_cb;
// Get fine grid coordinates
V.LatticeIndex(x, i);
//Compute the geometric offset within a block
// (x fastest direction, t is slowest direction, non-parity ordered)
int blockOffset = 0;
for (int d=in.Ndim()-1; d>=0; d--) {
y[d] = x[d]%geo_bs[d];
blockOffset *= geo_bs[d];
blockOffset += y[d];
}
//Take the block-ordered offset from the coarse grid offset (geo_map)
//A.S.: geo_map introduced for the full site ordering, so ok to use it for the offset
int offset = geo_map[i]*nVec*geoBlockSize*in.Ncolor();
const int s = 0;
for (int v=0; v<in.Nvec(); v++) {
for (int c=0; c<in.Ncolor(); c++) {
int chirality = (x[0]+x[1]+x[2]+x[3])%2; // chirality is the fine-grid parity flag
int index = offset + // geo block
chirality * nVec * geoBlockSize * in.Ncolor() + // chiral block
v * geoBlockSize * in.Ncolor() + // vector
blockOffset * in.Ncolor() + // local geometry
c; // color
if (toBlock) out[index] = in(parity, x_cb, s, c, v); // going to block order
else in(parity, x_cb, s, c, v) = out[index]; // coming from block order
check[count++] = index;
}
}
//printf("blockOrderV done %d / %d\n", i, in.Volume());
} // x_cb
} // parity
if (count != checkLength) {
errorQuda("Number of elements packed %d does not match expected value %d nvec=%d ncolor=%d",
count, checkLength, in.Nvec(), in.Ncolor());
}
delete []check;
}
// Orthogonalise the nc vectors v[] of length n
// this assumes the ordering v[(b * Nvec + v) * blocksize + i]
template <typename sumFloat, typename Float, int N>
void blockGramSchmidt(complex<Float> *v, int nBlocks, int blockSize) {
for (int b=0; b<nBlocks; b++) {
for (int jc=0; jc<N; jc++) {
for (int ic=0; ic<jc; ic++) {
// Calculate dot product.
complex<Float> dot = 0.0;
for (int i=0; i<blockSize; i++)
dot += conj(v[(b*N+ic)*blockSize+i]) * v[(b*N+jc)*blockSize+i];
// Subtract the blocks to orthogonalise
for (int i=0; i<blockSize; i++)
v[(b*N+jc)*blockSize+i] -= dot * v[(b*N+ic)*blockSize+i];
}
// Normalize the block
// nrm2 is pure real, but need to use Complex because of template.
sumFloat nrm2 = 0.0;
for (int i=0; i<blockSize; i++) nrm2 += norm(v[(b*N+jc)*blockSize+i]);
sumFloat scale = nrm2 > 0.0 ? 1.0/sqrt(nrm2) : 0.0;
for (int i=0; i<blockSize; i++) v[(b*N+jc)*blockSize+i] *= scale;
}
/*
for (int jc=0; jc<N; jc++) {
complex<sumFloat> nrm2 = 0.0;
for(int i=0; i<blockSize; i++) nrm2 += norm(v[(b*N+jc)*blockSize+i]);
//printfQuda("block = %d jc = %d nrm2 = %f\n", b, jc, nrm2.real());
}
*/
//printf("blockGramSchmidt done %d / %d\n", b, nBlocks);
}
}
template <typename sumType, typename real, int N>
class BlockGramSchmidt : public Tunable {
complex<real> *v;
int nBlock;
int blockSize;
const ColorSpinorField &meta;
unsigned int sharedBytesPerThread() const { return 0; }
unsigned int sharedBytesPerBlock(const TuneParam ¶m) const { return 0; }
public:
BlockGramSchmidt(complex<real> *v, int nBlock, int blockSize, const ColorSpinorField &meta)
: v(v), nBlock(nBlock), blockSize(blockSize), meta(meta) {
if (meta.Location() == QUDA_CPU_FIELD_LOCATION) sprintf(aux, "nBlock=%d,blockSize=%d,CPU", nBlock, blockSize);
else sprintf(aux, "nBlock=%d,blockSize=%d,GPU", nBlock, blockSize);
}
virtual ~BlockGramSchmidt() { }
void apply(const hipStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (meta.Location() == QUDA_CPU_FIELD_LOCATION) {
blockGramSchmidt<sumType, real, N>(v, nBlock, blockSize);
} else {
errorQuda("Not implemented for GPU");
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(meta.VolString(), typeid(*this).name(), aux); }
long long flops() const { return nBlock * N * ((N-1) * (8l + 8l) + 2l) * blockSize; }
long long bytes() const { return 2*meta.Bytes(); }
};
template <bool toBlock, int N, typename real, typename Order>
class BlockOrderV : public Tunable {
complex<real> *vBlock;
Order &vOrder;
const int *geo_map;
const int *geo_bs;
int spin_bs;
const ColorSpinorField &V;
unsigned int sharedBytesPerThread() const { return 0; }
unsigned int sharedBytesPerBlock(const TuneParam ¶m) const { return 0; }
public:
BlockOrderV(complex<real> *vBlock, Order &vOrder, const int *geo_map, const int *geo_bs, int spin_bs, const ColorSpinorField &V)
: vBlock(vBlock), vOrder(vOrder), geo_map(geo_map), geo_bs(geo_bs), spin_bs(spin_bs), V(V) {
(V.Location() == QUDA_CPU_FIELD_LOCATION) ? strcpy(aux, "CPU") : strcpy(aux,"GPU");
}
virtual ~BlockOrderV() { }
void apply(const hipStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (V.Location() == QUDA_CPU_FIELD_LOCATION) {
blockOrderV<toBlock,N,complex<real>,Order>(vBlock,vOrder,geo_map,geo_bs,spin_bs,V);
} else {
errorQuda("Not implemented for GPU");
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(V.VolString(), typeid(*this).name(), aux); }
long long flops() const { return 0; }
long long bytes() const { return 2*V.Bytes(); }
};
#if 0
using namespace quda::colorspinor;
/**
Kernel argument struct
*/
template <typename Out, typename In, typename Rotator, int fineSpin, int coarseSpin>
struct BlockOrthoArg {
const Rotator V;
const int *fine_to_coarse;
const int *coarse_to_fine;
const spin_mapper<fineSpin,coarseSpin> spin_map;
const int parity; // the parity of the input field (if single parity)
const int nParity; // number of parities of input fine field
int swizzle; // swizzle factor for transposing blockIdx.x mapping to coarse grid coordinate
BlockOrthoArg(Rotator &V, const int *fine_to_coarse, const int *coarse_to_fine,
int parity, const ColorSpinorField &meta) :
out(out), in(in), V(V), fine_to_coarse(fine_to_coarse), coarse_to_fine(coarse_to_fine),
spin_map(), parity(parity), nParity(meta.SiteSubset()), swizzle(1)
{ }
BlockOrthoArg(const BlockOrthoArg<Out,In,Rotator,fineSpin,coarseSpin> &arg) :
out(arg.out), in(arg.in), V(arg.V),
fine_to_coarse(arg.fine_to_coarse), coarse_to_fine(arg.coarse_to_fine), spin_map(),
parity(arg.parity), nParity(arg.nParity), swizzle(arg.swizzle)
{ }
};
template <typename Float, int nVec, int fineSpin, int coarseSpin, typename Arg>
void BlockOrtho(Arg &arg) {
constexpr spinBlocks = fineSpin / coarseSpin;
for (int b=0; b<nBlocks; b++) {
for (int s=0; s<spinBlocks; s++) {
for (int k=0; k<nVec; k++) {
for (int l=0; l<k; l++) {
complex<Float> dot = 0.0;
for (int i=0; i<blockSize; i++) {
dot += conj(v(parity, x_cb, s, c, l)) * v(parity, x_cb, s, c, k);
}
}
}
}
for (int parity_coarse=0; parity_coarse<2; parity_coarse++)
for (int x_coarse_cb=0; x_coarse_cb<arg.out.VolumeCB(); x_coarse_cb++)
for (int s=0; s<coarseSpin; s++)
for (int c=0; c<coarseColor; c++)
arg.out(parity_coarse, x_coarse_cb, s, c) = 0.0;
// loop over fine degrees of freedom
for (int parity=0; parity<arg.nParity; parity++) {
parity = (arg.nParity == 2) ? parity : arg.parity;
for (int x_cb=0; x_cb<arg.in.VolumeCB(); x_cb++) {
int x = parity*arg.in.VolumeCB() + x_cb;
int x_coarse = arg.fine_to_coarse[x];
int parity_coarse = (x_coarse >= arg.out.VolumeCB()) ? 1 : 0;
int x_coarse_cb = x_coarse - parity_coarse*arg.out.VolumeCB();
for (int coarse_color_block=0; coarse_color_block<coarseColor; coarse_color_block+=coarse_colors_per_thread) {
complex<Float> tmp[fineSpin*coarse_colors_per_thread];
rotateCoarseColor<Float,fineSpin,fineColor,coarseColor,coarse_colors_per_thread>
(tmp, arg.in, arg.V, parity, arg.nParity, x_cb, coarse_color_block);
for (int s=0; s<fineSpin; s++) {
for (int coarse_color_local=0; coarse_color_local<coarse_colors_per_thread; coarse_color_local++) {
int c = coarse_color_block + coarse_color_local;
arg.out(parity_coarse,x_coarse_cb,arg.spin_map(s),c) += tmp[s*coarse_colors_per_thread+coarse_color_local];
}
}
}
}
}
}
#endif
template<typename Float, int nSpin, int nColor, int nVec>
void BlockOrthogonalize(ColorSpinorField &V, const int *geo_bs, const int *geo_map, int spin_bs) {
complex<Float> *Vblock = new complex<Float>[V.Volume()*V.Nspin()*V.Ncolor()];
if (V.FieldOrder() == QUDA_SPACE_SPIN_COLOR_FIELD_ORDER) {
constexpr QudaFieldOrder order = QUDA_SPACE_SPIN_COLOR_FIELD_ORDER;
typedef FieldOrderCB<Float,nSpin,nColor,nVec,order> VectorField;
VectorField vOrder(const_cast<ColorSpinorField&>(V));
int geo_blocksize = 1;
for (int d = 0; d < V.Ndim(); d++) geo_blocksize *= geo_bs[d];
int blocksize = geo_blocksize * vOrder.Ncolor() * spin_bs;
int chiralBlocks = (V.Nspin() == 1) ? 2 : vOrder.Nspin() / spin_bs; //always 2 for staggered.
int numblocks = (V.Volume()/geo_blocksize) * chiralBlocks;
if (V.Nspin() == 1) blocksize /= chiralBlocks; //for staggered chiral block size is a parity block size
printfQuda("Block Orthogonalizing %d blocks of %d length and width %d\n", numblocks, blocksize, nVec);
#if 0
BlockOrthoArg<> arg(V);
BlockOrtho ortho();
otho.apply(0);
#endif
BlockOrderV<true,nVec,Float,VectorField> reorder(Vblock, vOrder, geo_map, geo_bs, spin_bs, V);
reorder.apply(0);
BlockGramSchmidt<double,Float,nVec> ortho(Vblock, numblocks, blocksize, V);
ortho.apply(0);
BlockOrderV<false,nVec,Float,VectorField> reset(Vblock, vOrder, geo_map, geo_bs, spin_bs, V);
reset.apply(0);
delete []Vblock;
} else {
errorQuda("Unsupported field order %d\n", V.FieldOrder());
}
}
template<typename Float, int nSpin, int nColor>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec, const int *geo_bs, const int *geo_map, int spin_bs) {
if (Nvec == 2) {
BlockOrthogonalize<Float,nSpin,nColor,2>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 4) {
BlockOrthogonalize<Float,nSpin,nColor,4>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 8) {
BlockOrthogonalize<Float,nSpin,nColor,8>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 12) {
BlockOrthogonalize<Float,nSpin,nColor,12>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 16) {
BlockOrthogonalize<Float,nSpin,nColor,16>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 20) {
BlockOrthogonalize<Float,nSpin,nColor,20>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 24) {
BlockOrthogonalize<Float,nSpin,nColor,24>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 32) {
BlockOrthogonalize<Float,nSpin,nColor,32>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 48) {
BlockOrthogonalize<Float,nSpin,nColor,48>(V, geo_bs, geo_map, spin_bs);
} else {
errorQuda("Unsupported nVec %d\n", Nvec);
}
}
template<typename Float, int nSpin>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
if (V.Ncolor()/Nvec == 3) {
BlockOrthogonalize<Float,nSpin,3>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 2) {
BlockOrthogonalize<Float,nSpin,2>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 8) {
BlockOrthogonalize<Float,nSpin,8>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 16) {
BlockOrthogonalize<Float,nSpin,16>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 24) {
BlockOrthogonalize<Float,nSpin,24>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 32) {
BlockOrthogonalize<Float,nSpin,32>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 48) {
BlockOrthogonalize<Float,nSpin,48>(V, Nvec, geo_bs, geo_map, spin_bs); //for staggered, even-odd blocking presumed
}
else {
errorQuda("Unsupported nColor %d\n", V.Ncolor()/Nvec);
}
}
template<typename Float>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
if (V.Nspin() == 4) {
BlockOrthogonalize<Float,4>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if(V.Nspin() ==2) {
BlockOrthogonalize<Float,2>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Nspin() == 1) {
BlockOrthogonalize<Float,1>(V, Nvec, geo_bs, geo_map, 1);
}
else {
errorQuda("Unsupported nSpin %d\n", V.Nspin());
}
}
#endif // GPU_MULTIGRID
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
#ifdef GPU_MULTIGRID
if (V.Precision() == QUDA_DOUBLE_PRECISION) {
#ifdef GPU_MULTIGRID_DOUBLE
BlockOrthogonalize<double>(V, Nvec, geo_bs, geo_map, spin_bs);
#else
errorQuda("Double precision multigrid has not been enabled");
#endif
} else if (V.Precision() == QUDA_SINGLE_PRECISION) {
BlockOrthogonalize<float>(V, Nvec, geo_bs, geo_map, spin_bs);
} else {
errorQuda("Unsupported precision %d\n", V.Precision());
}
#else
errorQuda("Multigrid has not been built");
#endif // GPU_MULTIGRID
}
} // namespace quda
| 4d87b078294d9840d2aa4d0ab8dce470aa3e1eea.cu | #include <color_spinor_field.h>
#include <color_spinor_field_order.h>
#include <tune_quda.h>
#include <typeinfo>
#include <vector>
#include <assert.h>
namespace quda {
#ifdef GPU_MULTIGRID
using namespace quda::colorspinor;
template<typename real, int nSpin, int nColor, int nVec, QudaFieldOrder order>
struct FillVArg {
FieldOrderCB<real,nSpin,nColor,nVec,order> V;
FieldOrderCB<real,nSpin,nColor,1,order> B;
const int v;
FillVArg(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int v)
: V(V), B(*(B[v])), v(v) { }
};
// CPU routine to copy the null-space vectors into the V-field
template <typename Float, int nSpin, int nColor, int nVec, typename Arg>
void FillVCPU(Arg &arg, int v) {
for (int parity=0; parity<arg.V.Nparity(); parity++) {
for (int x_cb=0; x_cb<arg.V.VolumeCB(); x_cb++) {
for (int s=0; s<nSpin; s++) {
for (int c=0; c<nColor; c++) {
arg.V(parity, x_cb, s, c, arg.v) = arg.B(parity, x_cb, s, c);
}
}
}
}
}
// GPU kernel to copy the null-space vectors into the V-field
template <typename Float, int nSpin, int nColor, int nVec, typename Arg>
__global__ void FillVGPU(Arg arg, int v) {
int x_cb = threadIdx.x + blockDim.x*blockIdx.x;
int parity = threadIdx.y + blockDim.y*blockIdx.y;
for (int s=0; s<nSpin; s++) {
for (int c=0; c<nColor; c++) {
arg.V(parity, x_cb, s, c, arg.v) = arg.B(parity, x_cb, s, c);
}
}
}
template <typename real, int nSpin, int nColor, int nVec>
class FillVLaunch : public TunableVectorY {
ColorSpinorField &V;
const std::vector<ColorSpinorField*> &B;
const int v;
unsigned int minThreads() const { return V.VolumeCB(); }
public:
FillVLaunch(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, const int v)
: TunableVectorY(2), V(V), B(B), v(v) {
(V.Location() == QUDA_CPU_FIELD_LOCATION) ? strcpy(aux,"CPU") : strcpy(aux,"GPU");
}
virtual ~FillVLaunch() { }
void apply(const cudaStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (V.Location() == QUDA_CPU_FIELD_LOCATION) {
if (V.FieldOrder() == QUDA_SPACE_SPIN_COLOR_FIELD_ORDER) {
FillVArg<real,nSpin,nColor,nVec,QUDA_SPACE_SPIN_COLOR_FIELD_ORDER> arg(V,B,v);
FillVCPU<real,nSpin,nColor,nVec>(arg,v);
} else {
errorQuda("Field order not implemented %d", V.FieldOrder());
}
} else {
if (V.FieldOrder() == QUDA_FLOAT2_FIELD_ORDER) {
FillVArg<real,nSpin,nColor,nVec,QUDA_FLOAT2_FIELD_ORDER> arg(V,B,v);
FillVGPU<real,nSpin,nColor,nVec> <<<tp.grid,tp.block,tp.shared_bytes>>>(arg,v);
} else {
errorQuda("Field order not implemented %d", V.FieldOrder());
}
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(V.VolString(), typeid(*this).name(), aux); }
long long flops() const { return 0; }
long long bytes() const { return 2*V.Bytes(); }
};
template <typename real, int nSpin, int nColor, int nVec>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B) {
for (int v=0; v<nVec; v++) {
FillVLaunch<real,nSpin,nColor,nVec> f(V,B,v);
f.apply(0);
}
}
// For staggered this does not include factor 2 due to parity decomposition!
template <typename Float, int nSpin, int nColor>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (Nvec == 2) {
FillV<Float,nSpin,nColor,2>(V,B);
} else if (Nvec == 4) {
FillV<Float,nSpin,nColor,4>(V,B);
} else if (Nvec == 8) {
FillV<Float,nSpin,nColor,8>(V,B);
} else if (Nvec == 12) {
FillV<Float,nSpin,nColor,12>(V,B);
} else if (Nvec == 16) {
FillV<Float,nSpin,nColor,16>(V,B);
} else if (Nvec == 20) {
FillV<Float,nSpin,nColor,20>(V,B);
} else if (Nvec == 24) {
FillV<Float,nSpin,nColor,24>(V,B);
} else if (Nvec == 32) {
FillV<Float,nSpin,nColor,32>(V,B);
} else if (Nvec == 48) {
FillV<Float,nSpin,nColor,48>(V,B);
} else {
errorQuda("Unsupported Nvec %d", Nvec);
}
}
template <typename Float, int nSpin>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (B[0]->Ncolor()*Nvec != V.Ncolor()) errorQuda("Something wrong here");
if (B[0]->Ncolor() == 2) {
FillV<Float,nSpin,2>(V,B,Nvec);
} else if(B[0]->Ncolor() == 3) {
FillV<Float,nSpin,3>(V,B,Nvec);
} else if(B[0]->Ncolor() == 8) {
FillV<Float,nSpin,8>(V,B,Nvec);
} else if(B[0]->Ncolor() == 16) {
FillV<Float,nSpin,16>(V,B,Nvec);
} else if(B[0]->Ncolor() == 24) {
FillV<Float,nSpin,24>(V,B,Nvec);
} else if(B[0]->Ncolor() == 32) {
FillV<Float,nSpin,32>(V,B,Nvec);
} else {
errorQuda("Unsupported nColor %d", B[0]->Ncolor());
}
}
template <typename Float>
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
if (V.Nspin() == 4) {
FillV<Float,4>(V,B,Nvec);
} else if (V.Nspin() == 2) {
FillV<Float,2>(V,B,Nvec);
#ifdef GPU_STAGGERED_DIRAC
} else if (V.Nspin() == 1) {
FillV<Float,1>(V,B,Nvec);
#endif
} else {
errorQuda("Unsupported nSpin %d", V.Nspin());
}
}
#endif // GPU_MULTIGRID
void FillV(ColorSpinorField &V, const std::vector<ColorSpinorField*> &B, int Nvec) {
#ifdef GPU_MULTIGRID
if (V.Precision() == QUDA_DOUBLE_PRECISION) {
#ifdef GPU_MULTIGRID_DOUBLE
FillV<double>(V,B,Nvec);
#else
errorQuda("Double precision multigrid has not been enabled");
#endif
} else if (V.Precision() == QUDA_SINGLE_PRECISION) {
FillV<float>(V,B,Nvec);
} else {
errorQuda("Unsupported precision %d", V.Precision());
}
#else
errorQuda("Multigrid has not been built");
#endif
}
#ifdef GPU_MULTIGRID
// Creates a block-ordered version of a ColorSpinorField
// N.B.: Only works for the V field, as we need to block spin.
template <bool toBlock, int nVec, class Complex, class FieldOrder>
void blockOrderV(Complex *out, FieldOrder &in,
const int *geo_map, const int *geo_bs, int spin_bs,
const cpuColorSpinorField &V) {
//printfQuda("in.Ncolor = %d\n", in.Ncolor());
int nSpin_coarse = in.Nspin() / spin_bs; // this is number of chiral blocks
//Compute the size of each block
int geoBlockSize = 1;
for (int d=0; d<in.Ndim(); d++) geoBlockSize *= geo_bs[d];
int blockSize = geoBlockSize * in.Ncolor() * spin_bs; // blockSize includes internal dof
int x[QUDA_MAX_DIM]; // global coordinates
int y[QUDA_MAX_DIM]; // local coordinates within a block (full site ordering)
int checkLength = in.Nparity() * in.VolumeCB() * in.Ncolor() * in.Nspin() * in.Nvec();
int *check = new int[checkLength];
int count = 0;
// Run through the fine grid and do the block ordering
for (int parity = 0; parity<in.Nparity(); parity++) {
for (int x_cb=0; x_cb<in.VolumeCB(); x_cb++) {
int i = parity*in.VolumeCB() + x_cb;
// Get fine grid coordinates
V.LatticeIndex(x, i);
//Compute the geometric offset within a block
// (x fastest direction, t is slowest direction, non-parity ordered)
int blockOffset = 0;
for (int d=in.Ndim()-1; d>=0; d--) {
y[d] = x[d]%geo_bs[d];
blockOffset *= geo_bs[d];
blockOffset += y[d];
}
//Take the block-ordered offset from the coarse grid offset (geo_map)
int offset = geo_map[i]*nSpin_coarse*nVec*geoBlockSize*in.Ncolor()*spin_bs;
for (int v=0; v<in.Nvec(); v++) {
for (int s=0; s<in.Nspin(); s++) {
for (int c=0; c<in.Ncolor(); c++) {
int chirality = s / spin_bs; // chirality is the coarse spin
int blockSpin = s % spin_bs; // the remaining spin dof left in each block
int index = offset + // geo block
chirality * nVec * geoBlockSize * spin_bs * in.Ncolor() + // chiral block
v * geoBlockSize * spin_bs * in.Ncolor() + // vector
blockOffset * spin_bs * in.Ncolor() + // local geometry
blockSpin*in.Ncolor() + // block spin
c; // color
if (toBlock) out[index] = in(parity, x_cb, s, c, v); // going to block order
else in(parity, x_cb, s, c, v) = out[index]; // coming from block order
check[count++] = index;
}
}
}
}
//printf("blockOrderV done %d / %d\n", i, in.Volume());
}
if (count != checkLength) {
errorQuda("Number of elements packed %d does not match expected value %d nvec=%d nspin=%d ncolor=%d",
count, checkLength, in.Nvec(), in.Nspin(), in.Ncolor());
}
/*
// need non-quadratic check
for (int i=0; i<checkLength; i++) {
for (int j=0; j<i; j++) {
if (check[i] == check[j]) errorQuda("Collision detected in block ordering\n");
}
}
*/
delete []check;
}
// Creates a block-ordered version of a ColorSpinorField, with parity blocking (for staggered fields)
// N.B.: same as above but parity are separated.
template <bool toBlock, int nVec, class Complex, class FieldOrder>
void blockCBOrderV(Complex *out, FieldOrder &in,
const int *geo_map, const int *geo_bs, int spin_bs,
const cpuColorSpinorField &V) {
//Compute the size of each block
int geoBlockSize = 1;
for (int d=0; d<in.Ndim(); d++) geoBlockSize *= geo_bs[d];
int blockSize = geoBlockSize * in.Ncolor(); // blockSize includes internal dof
int x[QUDA_MAX_DIM]; // global coordinates
int y[QUDA_MAX_DIM]; // local coordinates within a block (full site ordering)
int checkLength = in.Nparity() * in.VolumeCB() * in.Ncolor() * in.Nvec();
int *check = new int[checkLength];
int count = 0;
// Run through the fine grid and do the block ordering
for (int parity = 0; parity<in.Nparity(); parity++) {
for (int x_cb=0; x_cb<in.VolumeCB(); x_cb++) {
int i = parity*in.VolumeCB() + x_cb;
// Get fine grid coordinates
V.LatticeIndex(x, i);
//Compute the geometric offset within a block
// (x fastest direction, t is slowest direction, non-parity ordered)
int blockOffset = 0;
for (int d=in.Ndim()-1; d>=0; d--) {
y[d] = x[d]%geo_bs[d];
blockOffset *= geo_bs[d];
blockOffset += y[d];
}
//Take the block-ordered offset from the coarse grid offset (geo_map)
//A.S.: geo_map introduced for the full site ordering, so ok to use it for the offset
int offset = geo_map[i]*nVec*geoBlockSize*in.Ncolor();
const int s = 0;
for (int v=0; v<in.Nvec(); v++) {
for (int c=0; c<in.Ncolor(); c++) {
int chirality = (x[0]+x[1]+x[2]+x[3])%2; // chirality is the fine-grid parity flag
int index = offset + // geo block
chirality * nVec * geoBlockSize * in.Ncolor() + // chiral block
v * geoBlockSize * in.Ncolor() + // vector
blockOffset * in.Ncolor() + // local geometry
c; // color
if (toBlock) out[index] = in(parity, x_cb, s, c, v); // going to block order
else in(parity, x_cb, s, c, v) = out[index]; // coming from block order
check[count++] = index;
}
}
//printf("blockOrderV done %d / %d\n", i, in.Volume());
} // x_cb
} // parity
if (count != checkLength) {
errorQuda("Number of elements packed %d does not match expected value %d nvec=%d ncolor=%d",
count, checkLength, in.Nvec(), in.Ncolor());
}
delete []check;
}
// Orthogonalise the nc vectors v[] of length n
// this assumes the ordering v[(b * Nvec + v) * blocksize + i]
template <typename sumFloat, typename Float, int N>
void blockGramSchmidt(complex<Float> *v, int nBlocks, int blockSize) {
for (int b=0; b<nBlocks; b++) {
for (int jc=0; jc<N; jc++) {
for (int ic=0; ic<jc; ic++) {
// Calculate dot product.
complex<Float> dot = 0.0;
for (int i=0; i<blockSize; i++)
dot += conj(v[(b*N+ic)*blockSize+i]) * v[(b*N+jc)*blockSize+i];
// Subtract the blocks to orthogonalise
for (int i=0; i<blockSize; i++)
v[(b*N+jc)*blockSize+i] -= dot * v[(b*N+ic)*blockSize+i];
}
// Normalize the block
// nrm2 is pure real, but need to use Complex because of template.
sumFloat nrm2 = 0.0;
for (int i=0; i<blockSize; i++) nrm2 += norm(v[(b*N+jc)*blockSize+i]);
sumFloat scale = nrm2 > 0.0 ? 1.0/sqrt(nrm2) : 0.0;
for (int i=0; i<blockSize; i++) v[(b*N+jc)*blockSize+i] *= scale;
}
/*
for (int jc=0; jc<N; jc++) {
complex<sumFloat> nrm2 = 0.0;
for(int i=0; i<blockSize; i++) nrm2 += norm(v[(b*N+jc)*blockSize+i]);
//printfQuda("block = %d jc = %d nrm2 = %f\n", b, jc, nrm2.real());
}
*/
//printf("blockGramSchmidt done %d / %d\n", b, nBlocks);
}
}
template <typename sumType, typename real, int N>
class BlockGramSchmidt : public Tunable {
complex<real> *v;
int nBlock;
int blockSize;
const ColorSpinorField &meta;
unsigned int sharedBytesPerThread() const { return 0; }
unsigned int sharedBytesPerBlock(const TuneParam ¶m) const { return 0; }
public:
BlockGramSchmidt(complex<real> *v, int nBlock, int blockSize, const ColorSpinorField &meta)
: v(v), nBlock(nBlock), blockSize(blockSize), meta(meta) {
if (meta.Location() == QUDA_CPU_FIELD_LOCATION) sprintf(aux, "nBlock=%d,blockSize=%d,CPU", nBlock, blockSize);
else sprintf(aux, "nBlock=%d,blockSize=%d,GPU", nBlock, blockSize);
}
virtual ~BlockGramSchmidt() { }
void apply(const cudaStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (meta.Location() == QUDA_CPU_FIELD_LOCATION) {
blockGramSchmidt<sumType, real, N>(v, nBlock, blockSize);
} else {
errorQuda("Not implemented for GPU");
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(meta.VolString(), typeid(*this).name(), aux); }
long long flops() const { return nBlock * N * ((N-1) * (8l + 8l) + 2l) * blockSize; }
long long bytes() const { return 2*meta.Bytes(); }
};
template <bool toBlock, int N, typename real, typename Order>
class BlockOrderV : public Tunable {
complex<real> *vBlock;
Order &vOrder;
const int *geo_map;
const int *geo_bs;
int spin_bs;
const ColorSpinorField &V;
unsigned int sharedBytesPerThread() const { return 0; }
unsigned int sharedBytesPerBlock(const TuneParam ¶m) const { return 0; }
public:
BlockOrderV(complex<real> *vBlock, Order &vOrder, const int *geo_map, const int *geo_bs, int spin_bs, const ColorSpinorField &V)
: vBlock(vBlock), vOrder(vOrder), geo_map(geo_map), geo_bs(geo_bs), spin_bs(spin_bs), V(V) {
(V.Location() == QUDA_CPU_FIELD_LOCATION) ? strcpy(aux, "CPU") : strcpy(aux,"GPU");
}
virtual ~BlockOrderV() { }
void apply(const cudaStream_t &stream) {
TuneParam tp = tuneLaunch(*this, getTuning(), getVerbosity());
if (V.Location() == QUDA_CPU_FIELD_LOCATION) {
blockOrderV<toBlock,N,complex<real>,Order>(vBlock,vOrder,geo_map,geo_bs,spin_bs,V);
} else {
errorQuda("Not implemented for GPU");
}
}
bool advanceTuneParam(TuneParam ¶m) const { return false; }
TuneKey tuneKey() const { return TuneKey(V.VolString(), typeid(*this).name(), aux); }
long long flops() const { return 0; }
long long bytes() const { return 2*V.Bytes(); }
};
#if 0
using namespace quda::colorspinor;
/**
Kernel argument struct
*/
template <typename Out, typename In, typename Rotator, int fineSpin, int coarseSpin>
struct BlockOrthoArg {
const Rotator V;
const int *fine_to_coarse;
const int *coarse_to_fine;
const spin_mapper<fineSpin,coarseSpin> spin_map;
const int parity; // the parity of the input field (if single parity)
const int nParity; // number of parities of input fine field
int swizzle; // swizzle factor for transposing blockIdx.x mapping to coarse grid coordinate
BlockOrthoArg(Rotator &V, const int *fine_to_coarse, const int *coarse_to_fine,
int parity, const ColorSpinorField &meta) :
out(out), in(in), V(V), fine_to_coarse(fine_to_coarse), coarse_to_fine(coarse_to_fine),
spin_map(), parity(parity), nParity(meta.SiteSubset()), swizzle(1)
{ }
BlockOrthoArg(const BlockOrthoArg<Out,In,Rotator,fineSpin,coarseSpin> &arg) :
out(arg.out), in(arg.in), V(arg.V),
fine_to_coarse(arg.fine_to_coarse), coarse_to_fine(arg.coarse_to_fine), spin_map(),
parity(arg.parity), nParity(arg.nParity), swizzle(arg.swizzle)
{ }
};
template <typename Float, int nVec, int fineSpin, int coarseSpin, typename Arg>
void BlockOrtho(Arg &arg) {
constexpr spinBlocks = fineSpin / coarseSpin;
for (int b=0; b<nBlocks; b++) {
for (int s=0; s<spinBlocks; s++) {
for (int k=0; k<nVec; k++) {
for (int l=0; l<k; l++) {
complex<Float> dot = 0.0;
for (int i=0; i<blockSize; i++) {
dot += conj(v(parity, x_cb, s, c, l)) * v(parity, x_cb, s, c, k);
}
}
}
}
for (int parity_coarse=0; parity_coarse<2; parity_coarse++)
for (int x_coarse_cb=0; x_coarse_cb<arg.out.VolumeCB(); x_coarse_cb++)
for (int s=0; s<coarseSpin; s++)
for (int c=0; c<coarseColor; c++)
arg.out(parity_coarse, x_coarse_cb, s, c) = 0.0;
// loop over fine degrees of freedom
for (int parity=0; parity<arg.nParity; parity++) {
parity = (arg.nParity == 2) ? parity : arg.parity;
for (int x_cb=0; x_cb<arg.in.VolumeCB(); x_cb++) {
int x = parity*arg.in.VolumeCB() + x_cb;
int x_coarse = arg.fine_to_coarse[x];
int parity_coarse = (x_coarse >= arg.out.VolumeCB()) ? 1 : 0;
int x_coarse_cb = x_coarse - parity_coarse*arg.out.VolumeCB();
for (int coarse_color_block=0; coarse_color_block<coarseColor; coarse_color_block+=coarse_colors_per_thread) {
complex<Float> tmp[fineSpin*coarse_colors_per_thread];
rotateCoarseColor<Float,fineSpin,fineColor,coarseColor,coarse_colors_per_thread>
(tmp, arg.in, arg.V, parity, arg.nParity, x_cb, coarse_color_block);
for (int s=0; s<fineSpin; s++) {
for (int coarse_color_local=0; coarse_color_local<coarse_colors_per_thread; coarse_color_local++) {
int c = coarse_color_block + coarse_color_local;
arg.out(parity_coarse,x_coarse_cb,arg.spin_map(s),c) += tmp[s*coarse_colors_per_thread+coarse_color_local];
}
}
}
}
}
}
#endif
template<typename Float, int nSpin, int nColor, int nVec>
void BlockOrthogonalize(ColorSpinorField &V, const int *geo_bs, const int *geo_map, int spin_bs) {
complex<Float> *Vblock = new complex<Float>[V.Volume()*V.Nspin()*V.Ncolor()];
if (V.FieldOrder() == QUDA_SPACE_SPIN_COLOR_FIELD_ORDER) {
constexpr QudaFieldOrder order = QUDA_SPACE_SPIN_COLOR_FIELD_ORDER;
typedef FieldOrderCB<Float,nSpin,nColor,nVec,order> VectorField;
VectorField vOrder(const_cast<ColorSpinorField&>(V));
int geo_blocksize = 1;
for (int d = 0; d < V.Ndim(); d++) geo_blocksize *= geo_bs[d];
int blocksize = geo_blocksize * vOrder.Ncolor() * spin_bs;
int chiralBlocks = (V.Nspin() == 1) ? 2 : vOrder.Nspin() / spin_bs; //always 2 for staggered.
int numblocks = (V.Volume()/geo_blocksize) * chiralBlocks;
if (V.Nspin() == 1) blocksize /= chiralBlocks; //for staggered chiral block size is a parity block size
printfQuda("Block Orthogonalizing %d blocks of %d length and width %d\n", numblocks, blocksize, nVec);
#if 0
BlockOrthoArg<> arg(V);
BlockOrtho ortho();
otho.apply(0);
#endif
BlockOrderV<true,nVec,Float,VectorField> reorder(Vblock, vOrder, geo_map, geo_bs, spin_bs, V);
reorder.apply(0);
BlockGramSchmidt<double,Float,nVec> ortho(Vblock, numblocks, blocksize, V);
ortho.apply(0);
BlockOrderV<false,nVec,Float,VectorField> reset(Vblock, vOrder, geo_map, geo_bs, spin_bs, V);
reset.apply(0);
delete []Vblock;
} else {
errorQuda("Unsupported field order %d\n", V.FieldOrder());
}
}
template<typename Float, int nSpin, int nColor>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec, const int *geo_bs, const int *geo_map, int spin_bs) {
if (Nvec == 2) {
BlockOrthogonalize<Float,nSpin,nColor,2>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 4) {
BlockOrthogonalize<Float,nSpin,nColor,4>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 8) {
BlockOrthogonalize<Float,nSpin,nColor,8>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 12) {
BlockOrthogonalize<Float,nSpin,nColor,12>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 16) {
BlockOrthogonalize<Float,nSpin,nColor,16>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 20) {
BlockOrthogonalize<Float,nSpin,nColor,20>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 24) {
BlockOrthogonalize<Float,nSpin,nColor,24>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 32) {
BlockOrthogonalize<Float,nSpin,nColor,32>(V, geo_bs, geo_map, spin_bs);
} else if (Nvec == 48) {
BlockOrthogonalize<Float,nSpin,nColor,48>(V, geo_bs, geo_map, spin_bs);
} else {
errorQuda("Unsupported nVec %d\n", Nvec);
}
}
template<typename Float, int nSpin>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
if (V.Ncolor()/Nvec == 3) {
BlockOrthogonalize<Float,nSpin,3>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 2) {
BlockOrthogonalize<Float,nSpin,2>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 8) {
BlockOrthogonalize<Float,nSpin,8>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 16) {
BlockOrthogonalize<Float,nSpin,16>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 24) {
BlockOrthogonalize<Float,nSpin,24>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 32) {
BlockOrthogonalize<Float,nSpin,32>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Ncolor()/Nvec == 48) {
BlockOrthogonalize<Float,nSpin,48>(V, Nvec, geo_bs, geo_map, spin_bs); //for staggered, even-odd blocking presumed
}
else {
errorQuda("Unsupported nColor %d\n", V.Ncolor()/Nvec);
}
}
template<typename Float>
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
if (V.Nspin() == 4) {
BlockOrthogonalize<Float,4>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if(V.Nspin() ==2) {
BlockOrthogonalize<Float,2>(V, Nvec, geo_bs, geo_map, spin_bs);
} else if (V.Nspin() == 1) {
BlockOrthogonalize<Float,1>(V, Nvec, geo_bs, geo_map, 1);
}
else {
errorQuda("Unsupported nSpin %d\n", V.Nspin());
}
}
#endif // GPU_MULTIGRID
void BlockOrthogonalize(ColorSpinorField &V, int Nvec,
const int *geo_bs, const int *geo_map, int spin_bs) {
#ifdef GPU_MULTIGRID
if (V.Precision() == QUDA_DOUBLE_PRECISION) {
#ifdef GPU_MULTIGRID_DOUBLE
BlockOrthogonalize<double>(V, Nvec, geo_bs, geo_map, spin_bs);
#else
errorQuda("Double precision multigrid has not been enabled");
#endif
} else if (V.Precision() == QUDA_SINGLE_PRECISION) {
BlockOrthogonalize<float>(V, Nvec, geo_bs, geo_map, spin_bs);
} else {
errorQuda("Unsupported precision %d\n", V.Precision());
}
#else
errorQuda("Multigrid has not been built");
#endif // GPU_MULTIGRID
}
} // namespace quda
|
01034f169f39f914ec0a69e4e4e1a30b0e2e4425.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <ATen/hip/HIPContext.h>
#include <ATen/Config.h>
#include <ATen/Dispatch.h>
#include <ATen/Utils.h>
#include <ATen/NativeFunctions.h>
#include <ATen/hip/detail/KernelUtils.h>
#include <ATen/hip/detail/OffsetCalculator.cuh>
#include <ATen/detail/CUDAHooksInterface.h>
#include <ATen/native/Resize.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/SpectralOpsUtils.h>
#include <ATen/native/hip/CuFFTUtils.h>
#include <ATen/native/hip/CuFFTPlanCache.h>
#include <c10/util/accumulate.h>
#include <THH/THHTensorSort.cuh>
#include <THH/THHThrustAllocator.cuh>
#include <thrust/execution_policy.h>
#include <thrust/unique.h>
#include <hipfft.h>
#include <hipfftXt.h>
#include <cmath>
#include <vector>
namespace at { namespace native {
using namespace at::native::detail;
// Offset calculator for indexing in Hermitian mirrored order.
// In mirrored dims, maps linear index i to (n - i) % n
template <typename index_t>
struct HermitianSymmetryOffsetCalculator {
using offset_type = at::detail::Array<index_t, 1>;
using dim_type = std::remove_cv_t<decltype(MAX_DIMS)>;
dim_type dims;
IntDivider<index_t> sizes_[MAX_DIMS];
index_t strides_[MAX_DIMS];
uint32_t mirror_dim_; // bit mask
static_assert(MAX_DIMS < 32, "Need a bigger mask type");
HermitianSymmetryOffsetCalculator(
IntArrayRef sizes, IntArrayRef strides, IntArrayRef dim,
const int64_t element_size){
TORCH_INTERNAL_ASSERT(sizes.size() == strides.size());
TORCH_INTERNAL_ASSERT(sizes.size() <= MAX_DIMS);
dims = sizes.size();
for (dim_type i = 0; i < MAX_DIMS; ++i) {
if (i < dims) {
sizes_[i] = IntDivider<index_t>(sizes[i]);
strides_[i] = strides[i] / element_size;
} else {
sizes_[i] = IntDivider<index_t>(1);
strides_[i] = 0;
}
}
mirror_dim_ = 0;
for (int64_t i = 0; i < dim.size(); ++i) {
mirror_dim_ |= (uint32_t{1} << dim[i]);
}
}
C10_HOST_DEVICE offset_type get(index_t linear_idx) const {
index_t offset = 0;
for (dim_type dim = 0; dim < dims; ++dim) {
auto divmod = sizes_[dim].divmod(linear_idx);
linear_idx = divmod.div;
if ((mirror_dim_ & (uint32_t{1} << dim)) == 0) {
offset += divmod.mod * strides_[dim];
} else if (divmod.mod != 0) {
offset += (sizes_[dim].divisor - divmod.mod) * strides_[dim];
}
}
offset_type offsets;
offsets[0] = offset;
return offsets;
}
};
// out[:] = conj(in[:]) where in and out ordering is generalized by offset calculators
template <typename scalar_t, typename inp_calc_t, typename out_calc_t>
C10_LAUNCH_BOUNDS_1(cuda::detail::CUDA_NUM_THREADS)
__global__ void _fft_conjugate_copy_kernel(
int64_t numel, scalar_t * out_data, const scalar_t * in_data,
inp_calc_t ic, out_calc_t oc) {
CUDA_KERNEL_LOOP_TYPE(index, numel, int64_t) {
auto in_offset = ic.get(index)[0];
auto out_offset = oc.get(index)[0];
out_data[out_offset] = std::conj(in_data[in_offset]);
}
}
// In real-to-complex transform, cuFFT only fills half of the values due to
// conjugate symmetry. See native/SpectralUtils.h for more details.
// The following function fills in the other half with symmetry in
// case of real-to-complex transform with onesided=False flag.
// See NOTE [ Fourier Transform Conjugate Symmetry ] in native/SpectralOpsUtils.h.
// input should be a tensor of same size as full (twosided)
// signals, but only contains half (onesided) of the values.
// This function modifies inplace.
void _fft_fill_with_conjugate_symmetry_cuda_(
ScalarType dtype, IntArrayRef mirror_dims, IntArrayRef signal_half_sizes,
IntArrayRef in_strides, const void * in_data,
IntArrayRef out_strides, void * out_data) {
// Do the actual conjugate mirroring.
// TODO: consider adding a 32bit indexed kernel for improved performance
auto* in_strides_ptr = in_strides.data();
const int ndim = in_strides.size();
const int64_t element_size = scalarTypeToTypeMeta(dtype).itemsize();
OffsetCalculator<1, int64_t> input_offset_calculator(
ndim, signal_half_sizes.data(), &in_strides_ptr, &element_size);
HermitianSymmetryOffsetCalculator<int64_t> output_offset_calculator(
signal_half_sizes, out_strides, mirror_dims, element_size);
const auto numel = c10::multiply_integers(signal_half_sizes);
AT_DISPATCH_COMPLEX_TYPES(dtype, "_fft_fill_with_conjugate_symmetry", [&] {
using namespace cuda::detail;
hipLaunchKernelGGL(( _fft_conjugate_copy_kernel),
dim3(GET_BLOCKS(numel)), dim3(CUDA_NUM_THREADS), 0, at::hip::getCurrentHIPStreamMasqueradingAsCUDA(),
numel,
static_cast<scalar_t*>(out_data),
static_cast<const scalar_t*>(in_data),
input_offset_calculator,
output_offset_calculator);
C10_HIP_KERNEL_LAUNCH_CHECK();
});
}
REGISTER_DISPATCH(fft_fill_with_conjugate_symmetry_stub, &_fft_fill_with_conjugate_symmetry_cuda_);
// Execute a pre-planned tranform
static void exec_cufft_plan(
const CuFFTConfig &config, void* in_data, void* out_data, bool forward) {
auto& plan = config.plan();
#ifdef __HIP_PLATFORM_HCC__
auto value_type = config.data_type();
if (value_type == kFloat) {
switch (config.transform_type()) {
case CuFFTTransformType::C2C: {
CUFFT_CHECK(hipfftExecC2C(plan, static_cast<hipfftComplex*>(in_data),
static_cast<hipfftComplex*>(out_data),
forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD));
return;
}
case CuFFTTransformType::R2C: {
CUFFT_CHECK(hipfftExecR2C(plan, static_cast<hipfftReal*>(in_data),
static_cast<hipfftComplex*>(out_data)));
return;
}
case CuFFTTransformType::C2R: {
CUFFT_CHECK(hipfftExecC2R(plan, static_cast<hipfftComplex*>(in_data),
static_cast<hipfftReal*>(out_data)));
return;
}
}
} else if (value_type == kDouble) {
switch (config.transform_type()) {
case CuFFTTransformType::C2C: {
CUFFT_CHECK(hipfftExecZ2Z(plan, static_cast<hipfftDoubleComplex*>(in_data),
static_cast<hipfftDoubleComplex*>(out_data),
forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD));
return;
}
case CuFFTTransformType::R2C: {
CUFFT_CHECK(hipfftExecD2Z(plan, static_cast<hipfftDoubleReal*>(in_data),
static_cast<hipfftDoubleComplex*>(out_data)));
return;
}
case CuFFTTransformType::C2R: {
CUFFT_CHECK(hipfftExecZ2D(plan, static_cast<hipfftDoubleComplex*>(in_data),
static_cast<hipfftDoubleReal*>(out_data)));
return;
}
}
}
TORCH_CHECK(false, "hipFFT doesn't support transforms on type: ", value_type);
#else
CUFFT_CHECK(cufftXtExec(plan, in_data, out_data,
forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD));
#endif
}
// NOTE [ cuFFT Embedded Strides ]
//
// cuFFT supports a subset of arbitrary strides via their "advanced data layout"
// option (http://docs.nvidia.com/cuda/cufft/index.html#advanced-data-layout).
// Specifically, these are tensors that can be viewed as subtensors resulted
// from slicing a larger contiguous tensors. For such input tensors, let the
// sizes of the enclosing tensor be `inembed`, and we can have in 3d case:
//
// input[x, y, z] = input[((x * inembed[1] + y) * inembed[2] + z)]
//
// Above is the simplified formula ignoring the batch dimension. In fact, the
// last dimension of the enclosing tensor doesn't have to be contiguous, i.e.,
// it can be greater than 1. Then one can set the base stride for the enclosing
// tensor with `istride`. Then we have
//
// input[x, y, z] = input[((x * inembed[1] + y) * inembed[2] + z) * istride]
//
// For example, consider
//
// enclosing = torch.zeros(6, 8, 10) # contiguous
// input = enclosing[:4, 2:6, 6:]
// input.size() # [ 4, 4, 4]
// input.stride() # [80, 10, 1]
// # inembed = [6, 8, 10]
// input[2, 1, 3] = input[((2 * 8) + 1) * 10 + 3] # using above formula
// = input[173]
// = input[2 * 80 + 1 * 10 + 1 * 3] # using strides directly
//
// Generally, the embedded strides can be computed as
//
// embed[i] = stride[i - 1] / stride[i].
//
// Note that the value of embed[0] isn't used to compute indices and doesn't
// matter.
//
// Contrary to advanced data layout, simple layout means that *embeds have
// unit-strides. In particular, unit-stride refers to that the input and output
// tensors being contiguous, and that the strides at the innermost signal
// dimension being unit (1) w.r.t. the corresponding data type.
static inline Tensor _run_cufft(
const CuFFTConfig &config, Tensor& input, int64_t signal_ndim,
bool complex_input, bool complex_output, bool inverse,
IntArrayRef checked_signal_sizes, fft_norm_mode norm, bool onesided,
IntArrayRef output_sizes, bool input_was_cloned
) {
if (config.should_clone_input() && !input_was_cloned) {
input = input.clone(at::MemoryFormat::Contiguous);
}
auto& plan = config.plan();
auto& ctx = at::globalContext();
// set output
auto output = at::empty(output_sizes, input.options());
// set to current stream
CUFFT_CHECK(hipfftSetStream(plan, at::hip::getCurrentHIPStreamMasqueradingAsCUDA()));
auto ws = at::empty({ config.workspace_size() }, at::device(at::kCUDA).dtype(at::kByte));
CUFFT_CHECK(hipfftSetWorkArea(plan, ws.data_ptr()));
// run
exec_cufft_plan(config, input.data_ptr(), output.data_ptr(), !inverse);
// rescale if requested
auto size_last_signal_dim = checked_signal_sizes[signal_ndim - 1];
if (norm != fft_norm_mode::none) {
auto signal_numel = c10::multiply_integers(checked_signal_sizes);
double scale_denom;
if (norm == fft_norm_mode::by_root_n) {
scale_denom = std::sqrt(static_cast<double>(signal_numel));
} else {
scale_denom = static_cast<double>(signal_numel);
}
if (!complex_input && complex_output && !onesided) {
auto end_data_slice = infer_ft_real_to_complex_onesided_size(size_last_signal_dim);
output.narrow(signal_ndim, 0, end_data_slice).div_(scale_denom);
} else {
output.div_(scale_denom);
}
}
// if needed, fill out the other half using conjugate symmetry
if (!complex_input && complex_output && !onesided) {
DimVector signal_dims(signal_ndim);
std::iota(signal_dims.begin(), signal_dims.end(), 1);
auto out_as_complex = at::view_as_complex(output);
at::native::_fft_fill_with_conjugate_symmetry_(out_as_complex, signal_dims);
}
return output;
}
// The cuFFT plan cache
// unique_ptr for nullability and to avoid reference invalidation on vector resize
static std::vector<std::unique_ptr<CuFFTParamsLRUCache>> plan_caches;
static std::mutex plan_caches_mutex;
static inline
CuFFTParamsLRUCache &cufft_get_plan_cache(int64_t device_index) {
std::lock_guard<std::mutex> guard(plan_caches_mutex);
AT_ASSERT(device_index >= 0);
if (device_index >= plan_caches.size()) {
plan_caches.resize(device_index + 1);
}
if (!plan_caches[device_index]) {
plan_caches[device_index] = std::make_unique<CuFFTParamsLRUCache>();
}
return *plan_caches[device_index];
}
namespace detail {
int64_t cufft_get_plan_cache_max_size_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_get_plan_cache_max_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).max_size();
}
void cufft_set_plan_cache_max_size_impl(int64_t device_index, int64_t max_size) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_set_plan_cache_max_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).resize(max_size);
}
int64_t cufft_get_plan_cache_size_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_get_plan_cache_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).size();
}
void cufft_clear_plan_cache_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_clear_plan_cache: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).clear();
}
} // namespace at::native::detail
namespace {
constexpr int64_t cufft_max_ndim = 3;
// Execute a general fft operation (can be c2c, onesided r2c or onesided c2r)
static Tensor& _exec_fft(Tensor& out, const Tensor& self, IntArrayRef out_sizes,
IntArrayRef dim, bool forward) {
const auto ndim = self.dim();
const int64_t signal_ndim = dim.size();
const auto batch_dims = ndim - signal_ndim;
// Permute dimensions so batch dimensions come first, and in stride order
// This maximizes data locality when collapsing to a single batch dimension
DimVector dim_permute(ndim);
std::iota(dim_permute.begin(), dim_permute.end(), int64_t{0});
c10::SmallVector<bool, kDimVectorStaticSize> is_transformed_dim(ndim);
for (const auto& d : dim) {
is_transformed_dim[d] = true;
}
auto batch_end = std::partition(dim_permute.begin(), dim_permute.end(),
[&](int64_t d) {return !is_transformed_dim[d]; });
auto self_strides = self.strides();
std::sort(dim_permute.begin(), batch_end,
[&](int64_t a, int64_t b) { return self_strides[a] > self_strides[b]; });
std::copy(dim.cbegin(), dim.cend(), batch_end);
auto input = self.permute(dim_permute);
// Collapse batch dimensions into a single dimension
DimVector batched_sizes(signal_ndim + 1);
batched_sizes[0] = -1;
std::copy(input.sizes().cbegin() + batch_dims, input.sizes().cend(), batched_sizes.begin() + 1);
input = input.reshape(batched_sizes);
const auto batch_size = input.sizes()[0];
DimVector signal_size(signal_ndim + 1);
signal_size[0] = batch_size;
for (int64_t i = 0; i < signal_ndim; ++i) {
auto in_size = input.sizes()[i + 1];
auto out_size = out_sizes[dim[i]];
signal_size[i + 1] = ::max(in_size, out_size);
TORCH_INTERNAL_ASSERT(in_size == signal_size[i + 1] ||
in_size == (signal_size[i + 1] / 2) + 1);
TORCH_INTERNAL_ASSERT(out_size == signal_size[i + 1] ||
out_size == (signal_size[i + 1] / 2) + 1);
}
batched_sizes[0] = batch_size;
DimVector batched_out_sizes(batched_sizes.begin(), batched_sizes.end());
for (size_t i = 0; i < dim.size(); ++i) {
batched_out_sizes[i + 1] = out_sizes[dim[i]];
}
out.resize_(batched_out_sizes, MemoryFormat::Contiguous);
// Create the transform plan (either from cache or locally)
const auto value_type = c10::toValueType(input.scalar_type());
auto fft_type = GetCuFFTTransformType(input.is_complex(), out.is_complex());
CuFFTParams Params(input.strides(), out.strides(), signal_size, fft_type, value_type);
CuFFTParamsLRUCache& plan_cache = cufft_get_plan_cache(input.device().index());
std::unique_lock<std::mutex> guard(plan_cache.mutex, std::defer_lock);
c10::optional<CuFFTConfig> uncached_plan;
const CuFFTConfig * config = nullptr;
if (plan_cache.max_size() > 0) {
guard.lock();
if (plan_cache.max_size() > 0) { // check again after acquiring the lock
config = &plan_cache.lookup(Params);
}
}
if (config == nullptr) {
uncached_plan.emplace(Params);
config = &uncached_plan.value();
}
auto & plan = config->plan();
if (config->should_clone_input()) {
input = input.clone(MemoryFormat::Contiguous);
}
// prepare cufft for execution
CUFFT_CHECK(hipfftSetStream(plan, at::hip::getCurrentHIPStreamMasqueradingAsCUDA()));
auto workspace = at::empty({ config->workspace_size() }, at::device(at::kCUDA).dtype(at::kByte));
CUFFT_CHECK(hipfftSetWorkArea(plan, workspace.data_ptr()));
// execute transform plan
exec_cufft_plan(*config, input.data_ptr(), out.data_ptr(), forward);
// Inplace reshaping to original batch shape and inverting the dimension permutation
DimVector out_strides(ndim);
int64_t batch_numel = 1;
for (int64_t i = batch_dims - 1; i >= 0; --i) {
out_strides[dim_permute[i]] = batch_numel * out.strides()[0];
batch_numel *= out_sizes[dim_permute[i]];
}
for (int64_t i = batch_dims; i < ndim; ++i) {
out_strides[dim_permute[i]] = out.strides()[1 + (i - batch_dims)];
}
return out.as_strided_(out_sizes, out_strides, out.storage_offset());
}
// Calculates the normalization constant and applies it in-place to self
// sizes is the sizes of a twosided tensor and dims are all transformed dims
double _fft_normalization_scale(int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto norm = static_cast<fft_norm_mode>(normalization);
if (norm == fft_norm_mode::none) {
return 1.0;
}
int64_t signal_numel = 1;
for (auto dim : dims) {
signal_numel *= sizes[dim];
}
const double scale_denom = (norm == fft_norm_mode::by_root_n) ?
std::sqrt(signal_numel) : static_cast<double>(signal_numel);
return 1.0 / scale_denom;
}
const Tensor& _fft_apply_normalization(const Tensor& self, int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto scale = _fft_normalization_scale(normalization, sizes, dims);
return (scale == 1.0) ? self : self.mul_(scale);
}
Tensor& _fft_apply_normalization_out(Tensor& out, const Tensor& self, int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto scale = _fft_normalization_scale(normalization, sizes, dims);
return at::mul_out(out, self, c10::scalar_to_tensor(scale));
}
} // namespace (anonymous)
// n-dimensional real to complex FFT
Tensor _fft_r2c_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, bool onesided) {
TORCH_CHECK(self.is_floating_point());
auto input_sizes = self.sizes();
DimVector onesided_sizes(input_sizes.begin(), input_sizes.end());
auto last_dim = dim.back();
auto last_dim_halfsize = (input_sizes[last_dim]) / 2 + 1;
onesided_sizes[last_dim] = last_dim_halfsize;
IntArrayRef out_sizes = onesided ? onesided_sizes : input_sizes;
const auto out_options = self.options().dtype(c10::toComplexType(self.scalar_type()));
auto output = at::empty(out_sizes, out_options);
// CuFFT requires real input to be over-aligned, as if it were complex
const auto complex_size = 2 * self.element_size();
const bool complex_aligned = (
reinterpret_cast<std::uintptr_t>(self.data_ptr()) % complex_size == 0);
auto working_tensor = self;
if (!complex_aligned) {
working_tensor = self.movedim(last_dim, -1)
.clone(MemoryFormat::Contiguous)
.movedim(-1, last_dim);
}
// First do the R2C transform on the last dimension
{
auto target_sizes = dim.size() == 1 ? out_sizes : onesided_sizes;
_exec_fft(output, working_tensor, target_sizes, last_dim, /*forward=*/true);
if (dim.size() > 1) {
working_tensor = at::empty(out_sizes, out_options);
}
}
// Then any remaining C2C transforms
DimVector sorted_dims(dim.begin(), dim.end() - 1);
while (!sorted_dims.empty()) {
std::swap(output, working_tensor);
// Resort dimensions every time as _exec_fft re-strides the output
auto strides = working_tensor.strides();
std::sort(sorted_dims.begin(), sorted_dims.end(),
[&](int64_t a, int64_t b) { return strides[a] > strides[b]; });
const auto max_dims = ::min(static_cast<size_t>(cufft_max_ndim), sorted_dims.size());
auto last_dims = IntArrayRef(sorted_dims).slice(sorted_dims.size() - max_dims, max_dims);
// Intermediate results are always onesided
_exec_fft(output, working_tensor, onesided_sizes, last_dims, /*forward=*/true);
sorted_dims.resize(sorted_dims.size() - max_dims);
}
// Only need to normalize the onesided slice since data in the other half is overwritten
auto out_slice = output.slice(last_dim, 0, last_dim_halfsize);
_fft_apply_normalization(out_slice, normalization, input_sizes, dim);
if (!onesided) {
if (output.sizes()[last_dim] != out_sizes[last_dim]) {
working_tensor.resize_(out_sizes, MemoryFormat::Contiguous);
working_tensor.slice(last_dim, 0, last_dim_halfsize).copy_(output);
output = std::move(working_tensor);
}
at::native::_fft_fill_with_conjugate_symmetry_(output, dim);
}
return output;
}
Tensor& _fft_r2c_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, bool onesided, Tensor& out) {
auto result = _fft_r2c_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), /*onesided=*/true);
if (onesided) {
return _fft_apply_normalization_out(out, result, normalization, self.sizes(), dim);
}
resize_output(out, self.sizes());
auto last_dim = dim.back();
auto last_dim_halfsize = result.sizes()[last_dim];
auto out_slice = out.slice(last_dim, 0, last_dim_halfsize);
_fft_apply_normalization_out(out_slice, result, normalization, self.sizes(), dim);
at::native::_fft_fill_with_conjugate_symmetry_(out, dim);
return out;
}
// n-dimensional complex to real IFFT
Tensor _fft_c2r_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, int64_t lastdim) {
TORCH_CHECK(self.is_complex());
auto in_sizes = self.sizes();
DimVector out_sizes(in_sizes.begin(), in_sizes.end());
out_sizes[dim.back()] = lastdim;
// First complete any C2C transforms
Tensor temp;
if (dim.size() > 1) {
temp = _fft_c2c_cufft(
self, dim.slice(0, dim.size() - 1),
static_cast<int64_t>(fft_norm_mode::none), /*forward=*/false);
} else {
// Complex to real FFTs may overwrite the input buffer, so must always clone (gh-34551)
temp = self.clone(MemoryFormat::Contiguous);
}
// Finally, do a 1D C2R transform
// TODO: could transform up to 2 other dims in the same cuFFT operation
auto output = at::empty(out_sizes, self.options().dtype(c10::toValueType(self.scalar_type())));
_exec_fft(output, temp, out_sizes, dim.back(), /*forward=*/false);
return _fft_apply_normalization(output, normalization, out_sizes, dim);
}
Tensor& _fft_c2r_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, int64_t lastdim, Tensor& out) {
auto result = _fft_c2r_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), lastdim);
return _fft_apply_normalization_out(out, result, normalization, result.sizes(), dim);
}
// n-dimensional complex to complex FFT/IFFT
Tensor _fft_c2c_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, bool forward) {
TORCH_CHECK(self.is_complex());
if (dim.empty()) {
return self.clone();
}
auto out_sizes = self.sizes();
auto output = at::empty(out_sizes, self.options());
// Perform any number of C2C transforms
DimVector sorted_dims(dim.begin(), dim.end());
auto self_strides = self.strides();
auto working_tensor = self;
while (true) {
// Sort dimensions every time as _exec_fft re-strides the output
auto strides = working_tensor.strides();
std::sort(sorted_dims.begin(), sorted_dims.end(),
[&](int64_t a, int64_t b) { return strides[a] > strides[b]; });
const auto max_dims = ::min(static_cast<size_t>(cufft_max_ndim), sorted_dims.size());
auto first_dims = IntArrayRef(sorted_dims).slice(sorted_dims.size() - max_dims, max_dims);
_exec_fft(output, working_tensor, out_sizes, first_dims, forward);
sorted_dims.resize(sorted_dims.size() - max_dims);
if (sorted_dims.empty()) {
break;
}
if (working_tensor.is_same(self)) {
working_tensor = std::move(output);
output = at::empty(out_sizes, self.options());
} else {
std::swap(output, working_tensor);
}
}
return _fft_apply_normalization(output, normalization, out_sizes, dim);
}
Tensor& _fft_c2c_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, bool forward, Tensor& out) {
auto result = _fft_c2c_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), forward);
return _fft_apply_normalization_out(out, result, normalization, result.sizes(), dim);
}
}} // at::native
| 01034f169f39f914ec0a69e4e4e1a30b0e2e4425.cu | #include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/Config.h>
#include <ATen/Dispatch.h>
#include <ATen/Utils.h>
#include <ATen/NativeFunctions.h>
#include <ATen/cuda/detail/KernelUtils.h>
#include <ATen/cuda/detail/OffsetCalculator.cuh>
#include <ATen/detail/CUDAHooksInterface.h>
#include <ATen/native/Resize.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/SpectralOpsUtils.h>
#include <ATen/native/cuda/CuFFTUtils.h>
#include <ATen/native/cuda/CuFFTPlanCache.h>
#include <c10/util/accumulate.h>
#include <THC/THCTensorSort.cuh>
#include <THC/THCThrustAllocator.cuh>
#include <thrust/execution_policy.h>
#include <thrust/unique.h>
#include <cufft.h>
#include <cufftXt.h>
#include <cmath>
#include <vector>
namespace at { namespace native {
using namespace at::native::detail;
// Offset calculator for indexing in Hermitian mirrored order.
// In mirrored dims, maps linear index i to (n - i) % n
template <typename index_t>
struct HermitianSymmetryOffsetCalculator {
using offset_type = at::detail::Array<index_t, 1>;
using dim_type = std::remove_cv_t<decltype(MAX_DIMS)>;
dim_type dims;
IntDivider<index_t> sizes_[MAX_DIMS];
index_t strides_[MAX_DIMS];
uint32_t mirror_dim_; // bit mask
static_assert(MAX_DIMS < 32, "Need a bigger mask type");
HermitianSymmetryOffsetCalculator(
IntArrayRef sizes, IntArrayRef strides, IntArrayRef dim,
const int64_t element_size){
TORCH_INTERNAL_ASSERT(sizes.size() == strides.size());
TORCH_INTERNAL_ASSERT(sizes.size() <= MAX_DIMS);
dims = sizes.size();
for (dim_type i = 0; i < MAX_DIMS; ++i) {
if (i < dims) {
sizes_[i] = IntDivider<index_t>(sizes[i]);
strides_[i] = strides[i] / element_size;
} else {
sizes_[i] = IntDivider<index_t>(1);
strides_[i] = 0;
}
}
mirror_dim_ = 0;
for (int64_t i = 0; i < dim.size(); ++i) {
mirror_dim_ |= (uint32_t{1} << dim[i]);
}
}
C10_HOST_DEVICE offset_type get(index_t linear_idx) const {
index_t offset = 0;
for (dim_type dim = 0; dim < dims; ++dim) {
auto divmod = sizes_[dim].divmod(linear_idx);
linear_idx = divmod.div;
if ((mirror_dim_ & (uint32_t{1} << dim)) == 0) {
offset += divmod.mod * strides_[dim];
} else if (divmod.mod != 0) {
offset += (sizes_[dim].divisor - divmod.mod) * strides_[dim];
}
}
offset_type offsets;
offsets[0] = offset;
return offsets;
}
};
// out[:] = conj(in[:]) where in and out ordering is generalized by offset calculators
template <typename scalar_t, typename inp_calc_t, typename out_calc_t>
C10_LAUNCH_BOUNDS_1(cuda::detail::CUDA_NUM_THREADS)
__global__ void _fft_conjugate_copy_kernel(
int64_t numel, scalar_t * out_data, const scalar_t * in_data,
inp_calc_t ic, out_calc_t oc) {
CUDA_KERNEL_LOOP_TYPE(index, numel, int64_t) {
auto in_offset = ic.get(index)[0];
auto out_offset = oc.get(index)[0];
out_data[out_offset] = std::conj(in_data[in_offset]);
}
}
// In real-to-complex transform, cuFFT only fills half of the values due to
// conjugate symmetry. See native/SpectralUtils.h for more details.
// The following function fills in the other half with symmetry in
// case of real-to-complex transform with onesided=False flag.
// See NOTE [ Fourier Transform Conjugate Symmetry ] in native/SpectralOpsUtils.h.
// input should be a tensor of same size as full (twosided)
// signals, but only contains half (onesided) of the values.
// This function modifies inplace.
void _fft_fill_with_conjugate_symmetry_cuda_(
ScalarType dtype, IntArrayRef mirror_dims, IntArrayRef signal_half_sizes,
IntArrayRef in_strides, const void * in_data,
IntArrayRef out_strides, void * out_data) {
// Do the actual conjugate mirroring.
// TODO: consider adding a 32bit indexed kernel for improved performance
auto* in_strides_ptr = in_strides.data();
const int ndim = in_strides.size();
const int64_t element_size = scalarTypeToTypeMeta(dtype).itemsize();
OffsetCalculator<1, int64_t> input_offset_calculator(
ndim, signal_half_sizes.data(), &in_strides_ptr, &element_size);
HermitianSymmetryOffsetCalculator<int64_t> output_offset_calculator(
signal_half_sizes, out_strides, mirror_dims, element_size);
const auto numel = c10::multiply_integers(signal_half_sizes);
AT_DISPATCH_COMPLEX_TYPES(dtype, "_fft_fill_with_conjugate_symmetry", [&] {
using namespace cuda::detail;
_fft_conjugate_copy_kernel<<<
GET_BLOCKS(numel), CUDA_NUM_THREADS, 0, at::cuda::getCurrentCUDAStream()>>>(
numel,
static_cast<scalar_t*>(out_data),
static_cast<const scalar_t*>(in_data),
input_offset_calculator,
output_offset_calculator);
C10_CUDA_KERNEL_LAUNCH_CHECK();
});
}
REGISTER_DISPATCH(fft_fill_with_conjugate_symmetry_stub, &_fft_fill_with_conjugate_symmetry_cuda_);
// Execute a pre-planned tranform
static void exec_cufft_plan(
const CuFFTConfig &config, void* in_data, void* out_data, bool forward) {
auto& plan = config.plan();
#ifdef __HIP_PLATFORM_HCC__
auto value_type = config.data_type();
if (value_type == kFloat) {
switch (config.transform_type()) {
case CuFFTTransformType::C2C: {
CUFFT_CHECK(hipfftExecC2C(plan, static_cast<hipfftComplex*>(in_data),
static_cast<hipfftComplex*>(out_data),
forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD));
return;
}
case CuFFTTransformType::R2C: {
CUFFT_CHECK(hipfftExecR2C(plan, static_cast<hipfftReal*>(in_data),
static_cast<hipfftComplex*>(out_data)));
return;
}
case CuFFTTransformType::C2R: {
CUFFT_CHECK(hipfftExecC2R(plan, static_cast<hipfftComplex*>(in_data),
static_cast<hipfftReal*>(out_data)));
return;
}
}
} else if (value_type == kDouble) {
switch (config.transform_type()) {
case CuFFTTransformType::C2C: {
CUFFT_CHECK(hipfftExecZ2Z(plan, static_cast<hipfftDoubleComplex*>(in_data),
static_cast<hipfftDoubleComplex*>(out_data),
forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD));
return;
}
case CuFFTTransformType::R2C: {
CUFFT_CHECK(hipfftExecD2Z(plan, static_cast<hipfftDoubleReal*>(in_data),
static_cast<hipfftDoubleComplex*>(out_data)));
return;
}
case CuFFTTransformType::C2R: {
CUFFT_CHECK(hipfftExecZ2D(plan, static_cast<hipfftDoubleComplex*>(in_data),
static_cast<hipfftDoubleReal*>(out_data)));
return;
}
}
}
TORCH_CHECK(false, "hipFFT doesn't support transforms on type: ", value_type);
#else
CUFFT_CHECK(cufftXtExec(plan, in_data, out_data,
forward ? CUFFT_FORWARD : CUFFT_INVERSE));
#endif
}
// NOTE [ cuFFT Embedded Strides ]
//
// cuFFT supports a subset of arbitrary strides via their "advanced data layout"
// option (http://docs.nvidia.com/cuda/cufft/index.html#advanced-data-layout).
// Specifically, these are tensors that can be viewed as subtensors resulted
// from slicing a larger contiguous tensors. For such input tensors, let the
// sizes of the enclosing tensor be `inembed`, and we can have in 3d case:
//
// input[x, y, z] = input[((x * inembed[1] + y) * inembed[2] + z)]
//
// Above is the simplified formula ignoring the batch dimension. In fact, the
// last dimension of the enclosing tensor doesn't have to be contiguous, i.e.,
// it can be greater than 1. Then one can set the base stride for the enclosing
// tensor with `istride`. Then we have
//
// input[x, y, z] = input[((x * inembed[1] + y) * inembed[2] + z) * istride]
//
// For example, consider
//
// enclosing = torch.zeros(6, 8, 10) # contiguous
// input = enclosing[:4, 2:6, 6:]
// input.size() # [ 4, 4, 4]
// input.stride() # [80, 10, 1]
// # inembed = [6, 8, 10]
// input[2, 1, 3] = input[((2 * 8) + 1) * 10 + 3] # using above formula
// = input[173]
// = input[2 * 80 + 1 * 10 + 1 * 3] # using strides directly
//
// Generally, the embedded strides can be computed as
//
// embed[i] = stride[i - 1] / stride[i].
//
// Note that the value of embed[0] isn't used to compute indices and doesn't
// matter.
//
// Contrary to advanced data layout, simple layout means that *embeds have
// unit-strides. In particular, unit-stride refers to that the input and output
// tensors being contiguous, and that the strides at the innermost signal
// dimension being unit (1) w.r.t. the corresponding data type.
static inline Tensor _run_cufft(
const CuFFTConfig &config, Tensor& input, int64_t signal_ndim,
bool complex_input, bool complex_output, bool inverse,
IntArrayRef checked_signal_sizes, fft_norm_mode norm, bool onesided,
IntArrayRef output_sizes, bool input_was_cloned
) {
if (config.should_clone_input() && !input_was_cloned) {
input = input.clone(at::MemoryFormat::Contiguous);
}
auto& plan = config.plan();
auto& ctx = at::globalContext();
// set output
auto output = at::empty(output_sizes, input.options());
// set to current stream
CUFFT_CHECK(cufftSetStream(plan, at::cuda::getCurrentCUDAStream()));
auto ws = at::empty({ config.workspace_size() }, at::device(at::kCUDA).dtype(at::kByte));
CUFFT_CHECK(cufftSetWorkArea(plan, ws.data_ptr()));
// run
exec_cufft_plan(config, input.data_ptr(), output.data_ptr(), !inverse);
// rescale if requested
auto size_last_signal_dim = checked_signal_sizes[signal_ndim - 1];
if (norm != fft_norm_mode::none) {
auto signal_numel = c10::multiply_integers(checked_signal_sizes);
double scale_denom;
if (norm == fft_norm_mode::by_root_n) {
scale_denom = std::sqrt(static_cast<double>(signal_numel));
} else {
scale_denom = static_cast<double>(signal_numel);
}
if (!complex_input && complex_output && !onesided) {
auto end_data_slice = infer_ft_real_to_complex_onesided_size(size_last_signal_dim);
output.narrow(signal_ndim, 0, end_data_slice).div_(scale_denom);
} else {
output.div_(scale_denom);
}
}
// if needed, fill out the other half using conjugate symmetry
if (!complex_input && complex_output && !onesided) {
DimVector signal_dims(signal_ndim);
std::iota(signal_dims.begin(), signal_dims.end(), 1);
auto out_as_complex = at::view_as_complex(output);
at::native::_fft_fill_with_conjugate_symmetry_(out_as_complex, signal_dims);
}
return output;
}
// The cuFFT plan cache
// unique_ptr for nullability and to avoid reference invalidation on vector resize
static std::vector<std::unique_ptr<CuFFTParamsLRUCache>> plan_caches;
static std::mutex plan_caches_mutex;
static inline
CuFFTParamsLRUCache &cufft_get_plan_cache(int64_t device_index) {
std::lock_guard<std::mutex> guard(plan_caches_mutex);
AT_ASSERT(device_index >= 0);
if (device_index >= plan_caches.size()) {
plan_caches.resize(device_index + 1);
}
if (!plan_caches[device_index]) {
plan_caches[device_index] = std::make_unique<CuFFTParamsLRUCache>();
}
return *plan_caches[device_index];
}
namespace detail {
int64_t cufft_get_plan_cache_max_size_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_get_plan_cache_max_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).max_size();
}
void cufft_set_plan_cache_max_size_impl(int64_t device_index, int64_t max_size) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_set_plan_cache_max_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).resize(max_size);
}
int64_t cufft_get_plan_cache_size_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_get_plan_cache_size: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).size();
}
void cufft_clear_plan_cache_impl(int64_t device_index) {
TORCH_CHECK(0 <= device_index && device_index < at::detail::getCUDAHooks().getNumGPUs(),
"cufft_clear_plan_cache: expected 0 <= device_index < ",
at::detail::getCUDAHooks().getNumGPUs(), "], but got device_index=",
device_index);
return cufft_get_plan_cache(device_index).clear();
}
} // namespace at::native::detail
namespace {
constexpr int64_t cufft_max_ndim = 3;
// Execute a general fft operation (can be c2c, onesided r2c or onesided c2r)
static Tensor& _exec_fft(Tensor& out, const Tensor& self, IntArrayRef out_sizes,
IntArrayRef dim, bool forward) {
const auto ndim = self.dim();
const int64_t signal_ndim = dim.size();
const auto batch_dims = ndim - signal_ndim;
// Permute dimensions so batch dimensions come first, and in stride order
// This maximizes data locality when collapsing to a single batch dimension
DimVector dim_permute(ndim);
std::iota(dim_permute.begin(), dim_permute.end(), int64_t{0});
c10::SmallVector<bool, kDimVectorStaticSize> is_transformed_dim(ndim);
for (const auto& d : dim) {
is_transformed_dim[d] = true;
}
auto batch_end = std::partition(dim_permute.begin(), dim_permute.end(),
[&](int64_t d) {return !is_transformed_dim[d]; });
auto self_strides = self.strides();
std::sort(dim_permute.begin(), batch_end,
[&](int64_t a, int64_t b) { return self_strides[a] > self_strides[b]; });
std::copy(dim.cbegin(), dim.cend(), batch_end);
auto input = self.permute(dim_permute);
// Collapse batch dimensions into a single dimension
DimVector batched_sizes(signal_ndim + 1);
batched_sizes[0] = -1;
std::copy(input.sizes().cbegin() + batch_dims, input.sizes().cend(), batched_sizes.begin() + 1);
input = input.reshape(batched_sizes);
const auto batch_size = input.sizes()[0];
DimVector signal_size(signal_ndim + 1);
signal_size[0] = batch_size;
for (int64_t i = 0; i < signal_ndim; ++i) {
auto in_size = input.sizes()[i + 1];
auto out_size = out_sizes[dim[i]];
signal_size[i + 1] = std::max(in_size, out_size);
TORCH_INTERNAL_ASSERT(in_size == signal_size[i + 1] ||
in_size == (signal_size[i + 1] / 2) + 1);
TORCH_INTERNAL_ASSERT(out_size == signal_size[i + 1] ||
out_size == (signal_size[i + 1] / 2) + 1);
}
batched_sizes[0] = batch_size;
DimVector batched_out_sizes(batched_sizes.begin(), batched_sizes.end());
for (size_t i = 0; i < dim.size(); ++i) {
batched_out_sizes[i + 1] = out_sizes[dim[i]];
}
out.resize_(batched_out_sizes, MemoryFormat::Contiguous);
// Create the transform plan (either from cache or locally)
const auto value_type = c10::toValueType(input.scalar_type());
auto fft_type = GetCuFFTTransformType(input.is_complex(), out.is_complex());
CuFFTParams Params(input.strides(), out.strides(), signal_size, fft_type, value_type);
CuFFTParamsLRUCache& plan_cache = cufft_get_plan_cache(input.device().index());
std::unique_lock<std::mutex> guard(plan_cache.mutex, std::defer_lock);
c10::optional<CuFFTConfig> uncached_plan;
const CuFFTConfig * config = nullptr;
if (plan_cache.max_size() > 0) {
guard.lock();
if (plan_cache.max_size() > 0) { // check again after acquiring the lock
config = &plan_cache.lookup(Params);
}
}
if (config == nullptr) {
uncached_plan.emplace(Params);
config = &uncached_plan.value();
}
auto & plan = config->plan();
if (config->should_clone_input()) {
input = input.clone(MemoryFormat::Contiguous);
}
// prepare cufft for execution
CUFFT_CHECK(cufftSetStream(plan, at::cuda::getCurrentCUDAStream()));
auto workspace = at::empty({ config->workspace_size() }, at::device(at::kCUDA).dtype(at::kByte));
CUFFT_CHECK(cufftSetWorkArea(plan, workspace.data_ptr()));
// execute transform plan
exec_cufft_plan(*config, input.data_ptr(), out.data_ptr(), forward);
// Inplace reshaping to original batch shape and inverting the dimension permutation
DimVector out_strides(ndim);
int64_t batch_numel = 1;
for (int64_t i = batch_dims - 1; i >= 0; --i) {
out_strides[dim_permute[i]] = batch_numel * out.strides()[0];
batch_numel *= out_sizes[dim_permute[i]];
}
for (int64_t i = batch_dims; i < ndim; ++i) {
out_strides[dim_permute[i]] = out.strides()[1 + (i - batch_dims)];
}
return out.as_strided_(out_sizes, out_strides, out.storage_offset());
}
// Calculates the normalization constant and applies it in-place to self
// sizes is the sizes of a twosided tensor and dims are all transformed dims
double _fft_normalization_scale(int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto norm = static_cast<fft_norm_mode>(normalization);
if (norm == fft_norm_mode::none) {
return 1.0;
}
int64_t signal_numel = 1;
for (auto dim : dims) {
signal_numel *= sizes[dim];
}
const double scale_denom = (norm == fft_norm_mode::by_root_n) ?
std::sqrt(signal_numel) : static_cast<double>(signal_numel);
return 1.0 / scale_denom;
}
const Tensor& _fft_apply_normalization(const Tensor& self, int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto scale = _fft_normalization_scale(normalization, sizes, dims);
return (scale == 1.0) ? self : self.mul_(scale);
}
Tensor& _fft_apply_normalization_out(Tensor& out, const Tensor& self, int64_t normalization, IntArrayRef sizes, IntArrayRef dims) {
auto scale = _fft_normalization_scale(normalization, sizes, dims);
return at::mul_out(out, self, c10::scalar_to_tensor(scale));
}
} // namespace (anonymous)
// n-dimensional real to complex FFT
Tensor _fft_r2c_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, bool onesided) {
TORCH_CHECK(self.is_floating_point());
auto input_sizes = self.sizes();
DimVector onesided_sizes(input_sizes.begin(), input_sizes.end());
auto last_dim = dim.back();
auto last_dim_halfsize = (input_sizes[last_dim]) / 2 + 1;
onesided_sizes[last_dim] = last_dim_halfsize;
IntArrayRef out_sizes = onesided ? onesided_sizes : input_sizes;
const auto out_options = self.options().dtype(c10::toComplexType(self.scalar_type()));
auto output = at::empty(out_sizes, out_options);
// CuFFT requires real input to be over-aligned, as if it were complex
const auto complex_size = 2 * self.element_size();
const bool complex_aligned = (
reinterpret_cast<std::uintptr_t>(self.data_ptr()) % complex_size == 0);
auto working_tensor = self;
if (!complex_aligned) {
working_tensor = self.movedim(last_dim, -1)
.clone(MemoryFormat::Contiguous)
.movedim(-1, last_dim);
}
// First do the R2C transform on the last dimension
{
auto target_sizes = dim.size() == 1 ? out_sizes : onesided_sizes;
_exec_fft(output, working_tensor, target_sizes, last_dim, /*forward=*/true);
if (dim.size() > 1) {
working_tensor = at::empty(out_sizes, out_options);
}
}
// Then any remaining C2C transforms
DimVector sorted_dims(dim.begin(), dim.end() - 1);
while (!sorted_dims.empty()) {
std::swap(output, working_tensor);
// Resort dimensions every time as _exec_fft re-strides the output
auto strides = working_tensor.strides();
std::sort(sorted_dims.begin(), sorted_dims.end(),
[&](int64_t a, int64_t b) { return strides[a] > strides[b]; });
const auto max_dims = std::min(static_cast<size_t>(cufft_max_ndim), sorted_dims.size());
auto last_dims = IntArrayRef(sorted_dims).slice(sorted_dims.size() - max_dims, max_dims);
// Intermediate results are always onesided
_exec_fft(output, working_tensor, onesided_sizes, last_dims, /*forward=*/true);
sorted_dims.resize(sorted_dims.size() - max_dims);
}
// Only need to normalize the onesided slice since data in the other half is overwritten
auto out_slice = output.slice(last_dim, 0, last_dim_halfsize);
_fft_apply_normalization(out_slice, normalization, input_sizes, dim);
if (!onesided) {
if (output.sizes()[last_dim] != out_sizes[last_dim]) {
working_tensor.resize_(out_sizes, MemoryFormat::Contiguous);
working_tensor.slice(last_dim, 0, last_dim_halfsize).copy_(output);
output = std::move(working_tensor);
}
at::native::_fft_fill_with_conjugate_symmetry_(output, dim);
}
return output;
}
Tensor& _fft_r2c_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, bool onesided, Tensor& out) {
auto result = _fft_r2c_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), /*onesided=*/true);
if (onesided) {
return _fft_apply_normalization_out(out, result, normalization, self.sizes(), dim);
}
resize_output(out, self.sizes());
auto last_dim = dim.back();
auto last_dim_halfsize = result.sizes()[last_dim];
auto out_slice = out.slice(last_dim, 0, last_dim_halfsize);
_fft_apply_normalization_out(out_slice, result, normalization, self.sizes(), dim);
at::native::_fft_fill_with_conjugate_symmetry_(out, dim);
return out;
}
// n-dimensional complex to real IFFT
Tensor _fft_c2r_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, int64_t lastdim) {
TORCH_CHECK(self.is_complex());
auto in_sizes = self.sizes();
DimVector out_sizes(in_sizes.begin(), in_sizes.end());
out_sizes[dim.back()] = lastdim;
// First complete any C2C transforms
Tensor temp;
if (dim.size() > 1) {
temp = _fft_c2c_cufft(
self, dim.slice(0, dim.size() - 1),
static_cast<int64_t>(fft_norm_mode::none), /*forward=*/false);
} else {
// Complex to real FFTs may overwrite the input buffer, so must always clone (gh-34551)
temp = self.clone(MemoryFormat::Contiguous);
}
// Finally, do a 1D C2R transform
// TODO: could transform up to 2 other dims in the same cuFFT operation
auto output = at::empty(out_sizes, self.options().dtype(c10::toValueType(self.scalar_type())));
_exec_fft(output, temp, out_sizes, dim.back(), /*forward=*/false);
return _fft_apply_normalization(output, normalization, out_sizes, dim);
}
Tensor& _fft_c2r_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, int64_t lastdim, Tensor& out) {
auto result = _fft_c2r_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), lastdim);
return _fft_apply_normalization_out(out, result, normalization, result.sizes(), dim);
}
// n-dimensional complex to complex FFT/IFFT
Tensor _fft_c2c_cufft(const Tensor& self, IntArrayRef dim, int64_t normalization, bool forward) {
TORCH_CHECK(self.is_complex());
if (dim.empty()) {
return self.clone();
}
auto out_sizes = self.sizes();
auto output = at::empty(out_sizes, self.options());
// Perform any number of C2C transforms
DimVector sorted_dims(dim.begin(), dim.end());
auto self_strides = self.strides();
auto working_tensor = self;
while (true) {
// Sort dimensions every time as _exec_fft re-strides the output
auto strides = working_tensor.strides();
std::sort(sorted_dims.begin(), sorted_dims.end(),
[&](int64_t a, int64_t b) { return strides[a] > strides[b]; });
const auto max_dims = std::min(static_cast<size_t>(cufft_max_ndim), sorted_dims.size());
auto first_dims = IntArrayRef(sorted_dims).slice(sorted_dims.size() - max_dims, max_dims);
_exec_fft(output, working_tensor, out_sizes, first_dims, forward);
sorted_dims.resize(sorted_dims.size() - max_dims);
if (sorted_dims.empty()) {
break;
}
if (working_tensor.is_same(self)) {
working_tensor = std::move(output);
output = at::empty(out_sizes, self.options());
} else {
std::swap(output, working_tensor);
}
}
return _fft_apply_normalization(output, normalization, out_sizes, dim);
}
Tensor& _fft_c2c_cufft_out(const Tensor& self, IntArrayRef dim,
int64_t normalization, bool forward, Tensor& out) {
auto result = _fft_c2c_cufft(self, dim, static_cast<int64_t>(fft_norm_mode::none), forward);
return _fft_apply_normalization_out(out, result, normalization, result.sizes(), dim);
}
}} // at::native
|
883758e02ee866e51dda072d2f3f6ffc30202799.hip | // !!! This is a file automatically generated by hipify!!!
#include "nativeCUDA.cuh"
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#define DEBUG
inline
hipError_t checkCuda(hipError_t result) {
#if defined(DEBUG) || defined(_DEBUG)
if (result != hipSuccess) {
LOGI("CUDA Runtime Error: %sn", hipGetErrorString(result));
//assert(result == hipSuccess);
}
#endif
return result;
}
__global__ void addKernel(float* d_a, float* d_b, float* d_ret, int n);
void launchAddKernel(float* d_a, float* d_b, float* d_ret, int n) {
hipLaunchKernelGGL(( addKernel), dim3((n + TPB-1) / TPB), dim3(TPB), 0, 0, d_a, d_b, d_ret, n);
}
float* CUDA_addVectors(float* a, float* b, int n) {
size_t arr_size = n * sizeof(float);
// Allocate space for sum
float *ret, *d_ret;
checkCuda( hipHostMalloc((void**) &ret, arr_size) ); // Host
checkCuda( hipMalloc((void**) &d_ret, arr_size) ); // Device
// Allocate device space for a and b
float *d_a, *d_b;
checkCuda (hipMalloc((void**) &d_a, arr_size) );
checkCuda (hipMalloc((void**) &d_b, arr_size) );
// Copy a and b to device memory asynchronously
checkCuda( hipMemcpyAsync(d_a, a, arr_size, hipMemcpyHostToDevice) );
checkCuda( hipMemcpyAsync(d_b, b, arr_size, hipMemcpyHostToDevice) );
// Wait for copies to complete
hipDeviceSynchronize();
// Launch device kernel
launchAddKernel(d_a, d_b, d_ret, n);
// Wait for kernel to finish
hipDeviceSynchronize();
// Check for any errors created by kernel
checkCuda(hipGetLastError());
// Copy back sum array
checkCuda( hipMemcpy(ret, d_ret, arr_size, hipMemcpyDeviceToHost) );
// Free allocated memory
hipFree(d_ret);
hipFree(d_a);
hipFree(d_b);
return ret;
}
// GPU kernel
__global__ void addKernel(float* d_a, float* d_b, float* d_ret, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if (index >= n) {
return;
}
d_ret[index] = d_a[index] + d_b[index];
} | 883758e02ee866e51dda072d2f3f6ffc30202799.cu | #include "nativeCUDA.cuh"
#include <cuda_runtime.h>
#include <cuda.h>
#define DEBUG
inline
cudaError_t checkCuda(cudaError_t result) {
#if defined(DEBUG) || defined(_DEBUG)
if (result != cudaSuccess) {
LOGI("CUDA Runtime Error: %sn", cudaGetErrorString(result));
//assert(result == cudaSuccess);
}
#endif
return result;
}
__global__ void addKernel(float* d_a, float* d_b, float* d_ret, int n);
void launchAddKernel(float* d_a, float* d_b, float* d_ret, int n) {
addKernel<<<(n + TPB-1) / TPB, TPB>>>(d_a, d_b, d_ret, n);
}
float* CUDA_addVectors(float* a, float* b, int n) {
size_t arr_size = n * sizeof(float);
// Allocate space for sum
float *ret, *d_ret;
checkCuda( cudaMallocHost((void**) &ret, arr_size) ); // Host
checkCuda( cudaMalloc((void**) &d_ret, arr_size) ); // Device
// Allocate device space for a and b
float *d_a, *d_b;
checkCuda (cudaMalloc((void**) &d_a, arr_size) );
checkCuda (cudaMalloc((void**) &d_b, arr_size) );
// Copy a and b to device memory asynchronously
checkCuda( cudaMemcpyAsync(d_a, a, arr_size, cudaMemcpyHostToDevice) );
checkCuda( cudaMemcpyAsync(d_b, b, arr_size, cudaMemcpyHostToDevice) );
// Wait for copies to complete
cudaDeviceSynchronize();
// Launch device kernel
launchAddKernel(d_a, d_b, d_ret, n);
// Wait for kernel to finish
cudaDeviceSynchronize();
// Check for any errors created by kernel
checkCuda(cudaGetLastError());
// Copy back sum array
checkCuda( cudaMemcpy(ret, d_ret, arr_size, cudaMemcpyDeviceToHost) );
// Free allocated memory
cudaFree(d_ret);
cudaFree(d_a);
cudaFree(d_b);
return ret;
}
// GPU kernel
__global__ void addKernel(float* d_a, float* d_b, float* d_ret, int n) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
if (index >= n) {
return;
}
d_ret[index] = d_a[index] + d_b[index];
} |
c2b850e7fbc1e9e479e2f62f3148c23df1333678.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void chol_kernel_optimized(float * U, int k, int stride) {
//With stride...
//Iterators
unsigned int j;
unsigned int num_rows = MATRIX_SIZE;
//This call acts as a single K iteration
//Each block does a single i iteration
//Need to consider offset,
int i = blockIdx.x + (k + 1);
//Each thread does some part of j
//Stide in units of 'stride'
//Thread 0 does 0, 16, 32
//Thread 1 does 1, 17, 33
//..etc.
int offset = i; //From original loop
int jstart = threadIdx.x + offset;
int jstep = stride;
//Only continue if in bounds?
//Top limit on i for whole (original) loop
int jtop = num_rows - 1;
//Bottom limit on i for whole (original) loop
int jbottom = i;
//Do work for this i iteration
//Want to stride across
for (j = jstart; (j >= jbottom) && (j <= jtop); j += jstep) {
U[i * num_rows + j] -= U[k * num_rows + i] * U[k * num_rows + j];
}
} | c2b850e7fbc1e9e479e2f62f3148c23df1333678.cu | #include "includes.h"
__global__ void chol_kernel_optimized(float * U, int k, int stride) {
//With stride...
//Iterators
unsigned int j;
unsigned int num_rows = MATRIX_SIZE;
//This call acts as a single K iteration
//Each block does a single i iteration
//Need to consider offset,
int i = blockIdx.x + (k + 1);
//Each thread does some part of j
//Stide in units of 'stride'
//Thread 0 does 0, 16, 32
//Thread 1 does 1, 17, 33
//..etc.
int offset = i; //From original loop
int jstart = threadIdx.x + offset;
int jstep = stride;
//Only continue if in bounds?
//Top limit on i for whole (original) loop
int jtop = num_rows - 1;
//Bottom limit on i for whole (original) loop
int jbottom = i;
//Do work for this i iteration
//Want to stride across
for (j = jstart; (j >= jbottom) && (j <= jtop); j += jstep) {
U[i * num_rows + j] -= U[k * num_rows + i] * U[k * num_rows + j];
}
} |
8f3ab238c617e3632ba980d90316e8ca96774d60.hip | // !!! This is a file automatically generated by hipify!!!
#ifdef USE_OPENCV
#include <opencv2/core/core.hpp>
#endif // USE_OPENCV
#include <stdint.h>
#include <boost/thread.hpp>
#include <vector>
#include "caffe/data_transformer.hpp"
#include "caffe/layers/mtcnn_data_layer.hpp"
#include "caffe/util/benchmark.hpp"
#include "caffe/blob.hpp"
#include "caffe/data_transformer.hpp"
#include "caffe/internal_thread.hpp"
#include "caffe/layer.hpp"
#include "caffe/layers/base_data_layer.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/util/blocking_queue.hpp"
namespace caffe {
template <typename Dtype>
void MTCNNDataLayer<Dtype>::Forward_gpu(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
Batch<Dtype>* batch = prefetch_full_.pop("Data layer prefetch queue empty");
// Reshape to loaded data.
top[0]->ReshapeLike(batch->data_);
// Copy the data
caffe_copy(batch->data_.count(), batch->data_.gpu_data(),
top[0]->mutable_gpu_data(), 3);
DLOG(INFO) << "Prefetch copied";
//label
top[1]->ReshapeLike(batch->label_);
caffe_copy(batch->label_.count(), batch->label_.gpu_data(),
top[1]->mutable_gpu_data(), 3);
//roi
top[2]->ReshapeLike(batch->roi_);
caffe_copy(batch->roi_.count(), batch->roi_.gpu_data(),
top[2]->mutable_gpu_data(), 3);
if (output_pts_){
//pts
top[3]->ReshapeLike(batch->pts_);
caffe_copy(batch->pts_.count(), batch->pts_.gpu_data(),
top[3]->mutable_gpu_data(), 3);
}
CUDA_CHECK(hipStreamSynchronize(hipStreamDefault));
prefetch_free_.push(batch);
}
template <typename Dtype>
void MTCNNDataLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom){}
INSTANTIATE_LAYER_GPU_FUNCS(MTCNNDataLayer);
} // namespace caffe
| 8f3ab238c617e3632ba980d90316e8ca96774d60.cu | #ifdef USE_OPENCV
#include <opencv2/core/core.hpp>
#endif // USE_OPENCV
#include <stdint.h>
#include <boost/thread.hpp>
#include <vector>
#include "caffe/data_transformer.hpp"
#include "caffe/layers/mtcnn_data_layer.hpp"
#include "caffe/util/benchmark.hpp"
#include "caffe/blob.hpp"
#include "caffe/data_transformer.hpp"
#include "caffe/internal_thread.hpp"
#include "caffe/layer.hpp"
#include "caffe/layers/base_data_layer.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/util/blocking_queue.hpp"
namespace caffe {
template <typename Dtype>
void MTCNNDataLayer<Dtype>::Forward_gpu(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
Batch<Dtype>* batch = prefetch_full_.pop("Data layer prefetch queue empty");
// Reshape to loaded data.
top[0]->ReshapeLike(batch->data_);
// Copy the data
caffe_copy(batch->data_.count(), batch->data_.gpu_data(),
top[0]->mutable_gpu_data(), 3);
DLOG(INFO) << "Prefetch copied";
//label
top[1]->ReshapeLike(batch->label_);
caffe_copy(batch->label_.count(), batch->label_.gpu_data(),
top[1]->mutable_gpu_data(), 3);
//roi
top[2]->ReshapeLike(batch->roi_);
caffe_copy(batch->roi_.count(), batch->roi_.gpu_data(),
top[2]->mutable_gpu_data(), 3);
if (output_pts_){
//pts
top[3]->ReshapeLike(batch->pts_);
caffe_copy(batch->pts_.count(), batch->pts_.gpu_data(),
top[3]->mutable_gpu_data(), 3);
}
CUDA_CHECK(cudaStreamSynchronize(cudaStreamDefault));
prefetch_free_.push(batch);
}
template <typename Dtype>
void MTCNNDataLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom){}
INSTANTIATE_LAYER_GPU_FUNCS(MTCNNDataLayer);
} // namespace caffe
|
eed272aae97d9c8c14bcf4996d2422c9b5dfdc26.hip | // !!! This is a file automatically generated by hipify!!!
#include <string.h>
#include <stdio.h>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime.h>
#include <rocblas.h>
#include <hiprand/hiprand.h>
#include "../utils.h"
#include "../types.h"
#include "execution.h"
#include "gpu_env.h"
#include "gpu_kernels.h"
#define max_gpu_threads 10000000000
/////////////////CURAND ERROR/////////////////////////
static const char *_curandGetErrorEnum(hiprandStatus_t error)
{
switch (error)
{
case HIPRAND_STATUS_ALLOCATION_FAILED:
return "HIPRAND_STATUS_ALLOCATION_FAILED";
break;
case HIPRAND_STATUS_INITIALIZATION_FAILED:
return "HIPRAND_STATUS_INITIALIZATION_FAILED";
break;
case HIPRAND_STATUS_VERSION_MISMATCH:
return "HIPRAND_STATUS_VERSION_MISMATCH";
break;
case HIPRAND_STATUS_TYPE_ERROR:
return "HIPRAND_STATUS_TYPE_ERROR";
break;
case HIPRAND_STATUS_OUT_OF_RANGE:
return "HIPRAND_STATUS_OUT_OF_RANGE";
break;
case HIPRAND_STATUS_PREEXISTING_FAILURE:
return "HIPRAND_STATUS_PREEXISTING_FAILURE";
break;
case HIPRAND_STATUS_NOT_INITIALIZED:
return "HIPRAND_STATUS_NOT_INITIALIZED";
break;
case HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED:
return "HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED";
break;
default:
fprintf(stderr,"Not all hiprand errors here\n");
exit(-1);
}
}
/////////////////////////////////////////////////////////////
gpu_env::gpu_env()
{
}
//error function for random numbers
void gpu_env::error_rand()
{
if(rand_error!=HIPRAND_STATUS_SUCCESS)
{
fprintf(stderr,"Problem in cuda random execution getting: %s\n", _curandGetErrorEnum(rand_error));
exit(-1);
}
}
//error function for check internally
void gpu_env::error_f()
{
if ( error!=hipSuccess)
{
fprintf(stderr,"\nProblem in cuda execution getting: %s\n", hipGetErrorString(error));
exit(-1);
}
}
//////////////////////////////////////////
/////////////Memory Transfer//////////////
//////////////////////////////////////////
//JUAN_FIX: change for cuda malloc pitch
//make tensor in GPU and alloc memory
float* gpu_env::makeTensor( int a, int b, int c, int d)
{
float* devicePointer;
error=hipMalloc((void**)&devicePointer,a*b*c*d*sizeof(float));
error_f();
return devicePointer;
}
//destroy tensor
void gpu_env::destroyTensor(float* p)
{
error=hipFree(p);
error_f();
}
//transfer scalar array
void gpu_env::set_sc(float* gpu, float sc, tensor_gpu_specs* sp)
{
if (gpu==NULL)
{fprintf(stderr,"Correctly allocate tensor in GPU and CPU\n");exit(-1);}
//use Memset if int value, for float we need a kernel
//error=hipMemset(p,sc,size);
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops=sp->batch*sp->row*sp->col*sp->featureMap;
hipLaunchKernelGGL(( tensor_set_value), dim3(dimBlock),dim3(dimGrid), 0, 0, gpu,sc,ops);
error_f();
error=hipDeviceSynchronize();
error_f();
}
//JUAN_FIX:implement function which stack all the device pointer to dealloc when error happens.
//transfer array to array
void gpu_env::copy_data(float* cpu, float* gpu,tr_type t,size_t size)
{
if (cpu==NULL || gpu==NULL)
{fprintf(stderr,"Correctly allocate tensor in GPU and CPU\n");exit(-1);}
if (t==TOGPU)
error=hipMemcpy(gpu,cpu,size,hipMemcpyHostToDevice);
else if (t==FROMGPU)
{
error=hipMemcpy(cpu,gpu,size,hipMemcpyDeviceToHost);
}
else if (t==GPU)
error=hipMemcpy(cpu,gpu,size,hipMemcpyDeviceToDevice);
else
{fprintf(stderr,"NOT IMPLEMENTED");exit(-1);}
error_f();
error=hipDeviceSynchronize();
error_f();
}
/////////////////////////////////////
/////////Neural Networks/////////////
/////////////////////////////////////
//activation functions
void gpu_env::activation(float* E,float* N, int f,tensor_gpu_specs* sp)
{
if (E==NULL || N==NULL)
{fprintf(stderr,"Fill data in pointer.\n");exit(-1);}
dim3 dimBlock;
dim3 dimGrid;
if (f==ACT_SOF)
{
dimBlock.x=sp->row;
dimGrid.x=1;
}
else
{
dimBlock.x=sp->col;
dimGrid.x=sp->row;
}
long int ops = sp->col*sp->row;
long int sample_dim=sp->col;
double alfa=1;
float* auxE=NULL;
switch(f)
{
case ACT_RLU:
hipLaunchKernelGGL(( ReLu), dim3(dimBlock),dim3(dimGrid), 0, 0, E,N,ops);
break;
case ACT_ELU:
hipLaunchKernelGGL(( ELU), dim3(dimBlock),dim3(dimGrid), 0, 0, E,N,alfa,ops);
break;
case ACT_SOF:
{
ops=sp->row;
auxE = makeTensor(sp->col,sp->row);
set_sc(auxE, 0.0, sp);
hipLaunchKernelGGL(( Softmax), dim3(dimBlock),dim3(dimGrid), 0, 0, E,N,auxE,sample_dim,ops);
break;
}
case ACT_SIG:
hipLaunchKernelGGL(( Sigmoid), dim3(dimBlock),dim3(dimGrid), 0, 0, E,N,ops);
break;
case ACT_LIN:
//N=E;
error = hipMemcpy(N,E,sp->batch*sp->featureMap*sp->col*sp->row*sizeof(float),hipMemcpyDeviceToDevice);
break;
default:
fprintf(stderr,"Activation function not implemented\n");
exit(-1);
}
error_f();
error=hipDeviceSynchronize();
error_f();
if (auxE!=NULL)
destroyTensor(auxE);
}
//derivative of activation functions
void gpu_env::dactivation(float* E, float* N,float* D, int f,tensor_gpu_specs* sp)
{
if (E==NULL || N==NULL || D==NULL)
{fprintf(stderr,"Fill data in pointer.\n");exit(-1);}
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->row*sp->col;
long int sample_dim=sp->col*sp->row;
switch(f)
{
case ACT_RLU:
hipLaunchKernelGGL(( dReLu), dim3(dimBlock),dim3(dimGrid), 0, 0, E,D,ops);
break;
case ACT_ELU:
hipLaunchKernelGGL(( dELU), dim3(dimBlock),dim3(dimGrid), 0, 0, E,N,D,ops);
break;
case ACT_SIG:
hipLaunchKernelGGL(( dSigmoid), dim3(dimBlock),dim3(dimGrid), 0, 0, E,D,ops);
break;
case ACT_LIN:
set_sc(D,1.0,sp);
break;
default:
fprintf(stderr,"Activation function not implemented\n");
exit(-1);
}
error_f();
error=hipDeviceSynchronize();
error_f();
}
//loss functions
void gpu_env::compute_loss(float* T, float* N,loss_type t,tensor_gpu_specs* gsp,double* ent, double* cerr)
{
dim3 dimBlock(gsp->row);
dim3 dimGrid(1);
long int ops = gsp->row;
switch(t)
{
case CE:
{
float* max_row=makeTensor(gsp->row);//store it from device but use in gpu
int* cerr_g;
error=hipMalloc((void**)&cerr_g,sizeof(int));
error_f();
hipMemset(cerr_g, 0, sizeof(int));
error_f();
hipLaunchKernelGGL(( MC_loss), dim3(dimBlock),dim3(dimGrid), 0, 0, T,N,max_row,gsp->col,ops,cerr_g);
error_f();
hipDeviceSynchronize();
error_f();
float* CE_vec;
error=hipMalloc((void**)&CE_vec,sizeof(float)*gsp->row*gsp->col);
error_f();
hipLaunchKernelGGL(( CE_loss), dim3(dimBlock),dim3(dimGrid), 0, 0, N,max_row,CE_vec,gsp->col,ops);
hipDeviceSynchronize();
error_f();
float* result_ce;
error=hipMalloc((void**)&result_ce,sizeof(float));
error_f();
hipLaunchKernelGGL(( reduce_array_sum), dim3(dimGrid),dim3(dimBlock),ops*sizeof(float), 0, CE_vec,ops, gsp->col,result_ce);
hipDeviceSynchronize();
error_f();
float aux1;
error=hipMemcpy(&aux1,result_ce,sizeof(float),hipMemcpyDeviceToHost);
error_f();
*ent=(double)aux1;
int aux=0;
error=hipMemcpy(&aux,cerr_g,sizeof(int),hipMemcpyDeviceToHost);
*cerr=(double)aux;
destroyTensor(max_row);
hipFree(result_ce);
hipFree(cerr_g);
hipFree(CE_vec);
break;
}
case SSE:
fprintf(stderr,"GPU COST NOT IMPLEMENTED\n");
exit(-1);
break;
default:
fprintf(stderr,"GPU COST NOT IMPLEMENTED\n");
exit(-1);
}
}
/////////////////////////////////////////
///////////////gpu parsing///////////////
////////////////////////////////////////
void gpu_env::gpu_info(int selected_gpu)
{
int nDevices;
hipGetDeviceCount(&nDevices);
if (selected_gpu>nDevices)
{
fprintf(stderr,"Error. GPU %d not available. Number of available GPU is %d. Further information running nvidia-smi\n",selected_gpu,nDevices);
exit(-1);
}
fprintf(stderr,"Selecting GPU device %d\n",selected_gpu);
hipSetDevice(selected_gpu);
hipDeviceProp_t prop;
hipGetDeviceProperties(&prop,selected_gpu);
fprintf(stderr,"Layers is running on GPU %s\n",prop.name);
gpuI.warpSize=prop.warpSize;
gpuI.maxThreadPerBlock=prop.maxThreadsPerBlock;
}
///////////////////////////////////////////
///////////////Linear Albegra//////////////
///////////////////////////////////////////
//MATRIX TO MATRIX OPERATIONS
//matrix operator
//Perform matrix produc c=a*b
//float pointer are matrix
//tensor_gpu_spcs matrix specifications
//tA and tB are for transposing matrix
// acc{0,1}->whether to accumulate result in C (1) or set (0)
void gpu_env::matMul(float* a,float* b,float* c, tensor_gpu_specs* sA,tensor_gpu_specs* sB, tensor_gpu_specs* sC, int acc, int tA, int tB)
{
//for the moment only available cublas for operation
cublas.matrixProduct(a,b,c,sA,sB,sC,acc,tA,tB);
error=hipDeviceSynchronize();
error_f();
}
//SCALAR VECTOR OPERATOR
void gpu_env::scVec(float* vec_o,float* vec_i, tensor_gpu_specs* sA, float sc ,int op,int acc)
{
//gpuI has info about GPU for kernel dimensions
if (op==0)
{
dim3 dimBlock(sA->row);//maybe move this to declaration
dim3 dimGrid(sA->col);
long int ops = sA->row*sA->col;
//add -> no blas operation (we could use same as product buth we should fill B in gpu and that is shit. Home made kernel)
hipLaunchKernelGGL(( sc_add_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, vec_o,vec_i,sc,ops,acc);//could be same as matrix scalar operator because we treat as float*
error_f();
error=hipDeviceSynchronize();
error_f();
}
else if (op==1)
{
//prod -> use same as matrix + matrix just matrix B is 0
if (vec_o==NULL || vec_i==NULL)
{printf("Error\n");exit(-1);}
error=hipMemcpy(vec_o,vec_i,sA->row*sA->col*sizeof(float),hipMemcpyDeviceToDevice);
error_f();
cublas.sc_prod_vec(vec_o,vec_i,sc,sA,acc);
error=hipDeviceSynchronize();
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
//MATRIX SCALAR OPERATORS
//Scalar product/sum Matrix
//op{0,1}-> 0 is add and 1 is product
//acc{0,1}-> accumulate (1) or set (0)
void gpu_env::scMat(float* mat_o,float* mat_i, tensor_gpu_specs* sA, float sc ,int op,int acc)
{
//gpuI has info about GPU for kernel dimensions
if (op==0)
{
dim3 dimBlock(sA->row);//maybe move this to declaration
dim3 dimGrid(sA->col);
long int ops = sA->row*sA->col;
//add -> no blas operation (we could use same as product buth we should fill B in gpu and that is shit. Home made kernel)
hipLaunchKernelGGL(( sc_add_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, mat_o,mat_i,sc,ops,acc);
error_f();
error=hipDeviceSynchronize();
error_f();
}
else if (op==1)
{
//prod -> use same as matrix + matrix just matrix B is 0
cublas.sc_prod_mat(mat_o,mat_i,sc,sA,acc);
error=hipDeviceSynchronize();
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
///////////////////////////////////////////
///////////ELEMENT WISE OPERATOR///////////
///////////////////////////////////////////
//(sum or product)
// op{0,1,2}->0 is add and 1 is product 2 is sqrt
//Division can be performed by multiplying by inverse and subtraction can be done as a sum using scb and sca correctly (with -)
// acc{0,1}->whether to accumulate result in C (1) or set (0)
//tA and tB are for transposing matrix
//sca and scb only available when sum is done. Not contemplate for el wise product as it is the same as making the product and then scalar dot product. We do not save memory performing this operation in the same operation as in the sum(where we first make a new float* with the result of scalar dot matrix and then sum)
void gpu_env::mat_elwise_mat(float* A, float* B, float* C,tensor_gpu_specs* sA,tensor_gpu_specs* sB,tensor_gpu_specs* sC,int op, int acc, int trA, int trB,float sca, float scb)
{
if (op==0)
{
//transpose is done in cublas routine. We have cublas routine for this
if (acc==0)
{//not accumulateA
cublas.mat_ewsum_mat(A,B,C,sA,sB,trA,trB,sca,scb);
}
else if (acc==1)
{//accumulate
float* aux=makeTensor(sA->row,sA->col,1,1);
set_sc(aux,0.0, sA);
cublas.mat_ewsum_mat(A,B,aux,sA,sB,trA,trB,sca,scb);
cublas.mat_ewsum_mat(C,aux,C,sC,sC,0,0);
destroyTensor(aux);
}
}
else if(op==1)
{
float* tA;
float* tB;
if (trA==1)
{
//transpose A
tA=makeTensor(sA->row,sA->col,1,1);
set_sc(tA,0.0, sA);
cublas.mat_transp(tA,A,sA);
error=hipDeviceSynchronize();
error_f();
}
if (trB==1)
{
//transpose B
tB=makeTensor(sB->row,sB->col,1,1);
set_sc(tB,0.0, sB);
cublas.mat_transp(tB,B,sB);
error=hipDeviceSynchronize();
error_f();
}
dim3 dimBlock(sA->col);//maybe move this to declaration
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
if (trA==1 && trB==1)
{
hipLaunchKernelGGL(( mat_ewprod_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, C,tA,tB,acc,ops);
}
if (trA==1 && trB==0)
{
hipLaunchKernelGGL(( mat_ewprod_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, C,tA,B,acc,ops);
}
if (trA==0 && trB==1)hipLaunchKernelGGL(({mat_ewprod_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, C,A,tB,acc,ops);}
if (trA==0 && trB==0){
hipLaunchKernelGGL(( mat_ewprod_mat), dim3(dimBlock),dim3(dimGrid), 0, 0, C,A,B,acc,ops);
}
error_f();
error=hipDeviceSynchronize();
error_f();
if (trA)
destroyTensor(tA);
if (trB)
destroyTensor(tB);
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
//compare to tensor element by element
int gpu_env::tensor_equal(float* A, float* B,tensor_gpu_specs* sA)
{
dim3 dimBlock(sA->col);//maybe move this to declaration
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
hipLaunchKernelGGL(( kern_tensor_equal), dim3(dimBlock),dim3(dimGrid), 0, 0, A,B,ops);
error=hipDeviceSynchronize();
if (error==hipErrorLaunchFailure)
return 0;
else if(error!=hipSuccess)
{fprintf(stderr,"Error launching gpu kernel: %s",hipGetErrorString(error));
exit(-1);}
else
return 1;
}
//elwise operator matrix vector
//op=0 is sum and 1 is prod
void gpu_env::mat_elwise_vec(float* mat_o,float* mat, float* vec, tensor_gpu_specs* sA,int op,int acc,float sca, float scb, int rdim)
{
//op 0 is sum
//op 1 is multiplication
//op 2 is division
if (rdim==1)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
hipLaunchKernelGGL(( mat_ewcol_vec), dim3(dimBlock),dim3(dimGrid), 0, 0, mat_o,mat,vec,ops,sA->col,op,acc,sca, scb);
}
else
{
dim3 dimBlock(sA->col);
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
hipLaunchKernelGGL(( mat_ewrow_vec), dim3(dimBlock),dim3(dimGrid), 0, 0, mat_o,mat,vec,ops,sA->row,op,acc,sca, scb);
}
error_f();
error=hipDeviceSynchronize();
error_f();
}
//elwise operator vector vector
void gpu_env::vec_elwise_vec(float* A, float* B, float* C,tensor_gpu_specs* sA,int op, int acc,float sca, float scb)
{
//trasposition is not contemplated. This is real programming not grandfather programming.
if (op==0)//sum
{
cublas.vec_sum_vec(C,B,A,sA,acc,sca,scb);
error=hipDeviceSynchronize();
error_f();
}
else if(op==1) //product
{
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
///////////////////////////////////////////////
/////////////////INPLACE OPERATOR//////////////
///////////////////////////////////////////////
void gpu_env::mat_inplace_mat(float* o, float* i,tensor_gpu_specs* si,int op, int acc)
{
dim3 dimBlock(si->row);
dim3 dimGrid(si->col);
if (op==0)//sqrt
{
hipLaunchKernelGGL(( tensor_sqrt), dim3(dimGrid),dim3(dimBlock), 0, 0, o,i, acc,si->col*si->row);
}
else
{fprintf(stderr,"Not implemented mat_inplace_mat\n");exit(-1);}
}
///////////////////////////////////////////////
///////////////REDUCTION OPERATOR//////////////
///////////////////////////////////////////////
//This operators should be programed manually using reduction
//techniques. For the moment we can use wonderfull thurst library
//or cuBlas. For performance self-programmed or cuBlas is better.
//We use cannonical float* whenever we can (always looking for avoiding
//warping divergence )
void gpu_env::sum_abs(float* p,tensor_gpu_specs* gsp,float* acc)
{
hipblasStatus_t error_cb=hipblasSasum(p_cublas,gsp->row*gsp->col,p,1,acc);
if (error_cb!=HIPBLAS_STATUS_SUCCESS)
fprintf(stderr,"Error calling sum_abs with hipblasSasum routine\n");
}
void gpu_env::reduce_operator(float* p,tensor_gpu_specs* gsp,float* acc)
{
float* sum_aux;
error = hipMalloc((void**)&sum_aux,sizeof(float));
error_f();
dim3 dimGrid(1);
dim3 dimBlock(gsp->row);
long int ops = gsp->row;
hipLaunchKernelGGL(( reduce_array_sum), dim3(dimGrid),dim3(dimBlock),ops*sizeof(float), 0, p,ops, gsp->col,sum_aux);
hipDeviceSynchronize();
error_f();
copy_data(acc,sum_aux,FROMGPU,sizeof(float));
}
void gpu_env::row_sum(float* A, tensor_gpu_specs* sA,float* B)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(1);
long int ops = sA->row;
hipLaunchKernelGGL(( tensor_set_value), dim3(dimBlock),dim3(dimGrid), 0, 0, B,0.0,sA->row);
error_f();
error=hipDeviceSynchronize();
error_f();
hipLaunchKernelGGL(( kernel_row_sum), dim3(dimBlock),dim3(dimGrid), 0, 0, A,B,(int)sA->row,(int)sA->col,ops);
error_f();
error=hipDeviceSynchronize();
error_f();
}
void gpu_env::col_sum(float* A, tensor_gpu_specs* sA,float* B)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(1);
long int ops = sA->col;
hipLaunchKernelGGL(( tensor_set_value), dim3(dimBlock),dim3(dimGrid), 0, 0, B,0.0,sA->col);
error_f();
error=hipDeviceSynchronize();
error_f();
hipLaunchKernelGGL(( kernel_col_sum), dim3(dimBlock),dim3(dimGrid), 0, 0, A,B,(int)sA->row,(int)sA->col,ops);
error_f();
error=hipDeviceSynchronize();
error_f();
}
int gpu_env::row_max(float* A, tensor_gpu_specs* sA,int ind)
{
//ind is the row index;
//use thrurst for this in future or cubla. As we copy to thurst we only copy the row we operate.
if (ind > sA->row)
{fprintf(stderr,"Error. Row not available\n");exit(-1);}
hipblasStatus_t error_cb;
// printf ("===Indice pasado %d",ind);
float *Aaux=A+ind*sA->col;
int result;
error_cb = hipblasIsamax(p_cublas,sA->col,Aaux,1,&result);
if (error_cb!=HIPBLAS_STATUS_SUCCESS)
{fprintf(stderr,"Error in cublas execution\n");exit(-1);}
//printf("====columns routine %d \n",sA->col);
//printf("====cublas routine %d \n",result);
hipDeviceSynchronize();
error_f();
return result;
}
//////////////////////////////////////////////
///////////////RANDOM GENERATOR///////////////
//////////////////////////////////////////////
/*use host api -> when we need to save generated values. Easier to implement but poor performance:
-on one side we store values on GPU so waste memory
-on other side we cannot use generated values online->we loose time accesing memory for reading stored buffers
*/
void gpu_env::random_number_host_binary(float* rand_vec,tensor_gpu_specs* sp,float p)
{
if(rand_vec==NULL)
{fprintf(stderr,"Error. Allocate gpu Rand vector\n");exit(-1);}
rand_error=hiprandGenerateUniform(random_generator,rand_vec,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=hipDeviceSynchronize();
error_f();
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->col*sp->row;
hipLaunchKernelGGL(( drop_mask), dim3(dimBlock),dim3(dimGrid), 0, 0, rand_vec,p,ops);
error_f();
error=hipDeviceSynchronize();
error_f();
}
void gpu_env::random_number_host_gaussian(float* rand_vec,tensor_gpu_specs* sp,float mean,float std)
{
rand_error=hiprandGenerateNormal (random_generator, rand_vec, sp->row*sp->col*sp->batch*sp->featureMap, mean, std );
error_rand();
error=hipDeviceSynchronize();
error_f();
}
void gpu_env::add_noise(float* vec, float* rand_vec, float noiser, tensor_gpu_specs* sp)
{
float* mask = makeTensor(sp->row,sp->col);
rand_error=hiprandGenerateUniform(random_generator,mask,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=hipDeviceSynchronize();
error_f();
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->col*sp->row;
hipLaunchKernelGGL(( add_noise_with_mask), dim3(dimBlock),dim3(dimGrid), 0, 0, vec,rand_vec,mask,noiser,ops);
error_f();
error=hipDeviceSynchronize();
error_f();
destroyTensor(mask);
}
/*
void gpu_env::random_number_device_binary(float* rand_vec,tensor_gpu_specs* sp,float p)
{
if(rand_vec==NULL)
{fprintf(stderr,"Error. Allocate gpu Rand vector\n");exit(-1);}
//for avoid to kernel launch(one for generating and one for rounding we do in one. However we take care of actual state)
rand_error=hiprandGenerateUniform(random_generator,rand_vec,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=hipDeviceSynchronize();
error_f();
}
*/
| eed272aae97d9c8c14bcf4996d2422c9b5dfdc26.cu | #include <string.h>
#include <stdio.h>
#include <cuda_runtime_api.h>
#include <cuda.h>
#include <cublas_v2.h>
#include <curand.h>
#include "../utils.h"
#include "../types.h"
#include "execution.h"
#include "gpu_env.h"
#include "gpu_kernels.h"
#define max_gpu_threads 10000000000
/////////////////CURAND ERROR/////////////////////////
static const char *_curandGetErrorEnum(curandStatus_t error)
{
switch (error)
{
case CURAND_STATUS_ALLOCATION_FAILED:
return "CURAND_STATUS_ALLOCATION_FAILED";
break;
case CURAND_STATUS_INITIALIZATION_FAILED:
return "CURAND_STATUS_INITIALIZATION_FAILED";
break;
case CURAND_STATUS_VERSION_MISMATCH:
return "CURAND_STATUS_VERSION_MISMATCH";
break;
case CURAND_STATUS_TYPE_ERROR:
return "CURAND_STATUS_TYPE_ERROR";
break;
case CURAND_STATUS_OUT_OF_RANGE:
return "CURAND_STATUS_OUT_OF_RANGE";
break;
case CURAND_STATUS_PREEXISTING_FAILURE:
return "CURAND_STATUS_PREEXISTING_FAILURE";
break;
case CURAND_STATUS_NOT_INITIALIZED:
return "CURAND_STATUS_NOT_INITIALIZED";
break;
case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED:
return "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED";
break;
default:
fprintf(stderr,"Not all curand errors here\n");
exit(-1);
}
}
/////////////////////////////////////////////////////////////
gpu_env::gpu_env()
{
}
//error function for random numbers
void gpu_env::error_rand()
{
if(rand_error!=CURAND_STATUS_SUCCESS)
{
fprintf(stderr,"Problem in cuda random execution getting: %s\n", _curandGetErrorEnum(rand_error));
exit(-1);
}
}
//error function for check internally
void gpu_env::error_f()
{
if ( error!=cudaSuccess)
{
fprintf(stderr,"\nProblem in cuda execution getting: %s\n", cudaGetErrorString(error));
exit(-1);
}
}
//////////////////////////////////////////
/////////////Memory Transfer//////////////
//////////////////////////////////////////
//JUAN_FIX: change for cuda malloc pitch
//make tensor in GPU and alloc memory
float* gpu_env::makeTensor( int a, int b, int c, int d)
{
float* devicePointer;
error=cudaMalloc((void**)&devicePointer,a*b*c*d*sizeof(float));
error_f();
return devicePointer;
}
//destroy tensor
void gpu_env::destroyTensor(float* p)
{
error=cudaFree(p);
error_f();
}
//transfer scalar array
void gpu_env::set_sc(float* gpu, float sc, tensor_gpu_specs* sp)
{
if (gpu==NULL)
{fprintf(stderr,"Correctly allocate tensor in GPU and CPU\n");exit(-1);}
//use Memset if int value, for float we need a kernel
//error=cudaMemset(p,sc,size);
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops=sp->batch*sp->row*sp->col*sp->featureMap;
tensor_set_value<<<dimBlock,dimGrid>>>(gpu,sc,ops);
error_f();
error=cudaDeviceSynchronize();
error_f();
}
//JUAN_FIX:implement function which stack all the device pointer to dealloc when error happens.
//transfer array to array
void gpu_env::copy_data(float* cpu, float* gpu,tr_type t,size_t size)
{
if (cpu==NULL || gpu==NULL)
{fprintf(stderr,"Correctly allocate tensor in GPU and CPU\n");exit(-1);}
if (t==TOGPU)
error=cudaMemcpy(gpu,cpu,size,cudaMemcpyHostToDevice);
else if (t==FROMGPU)
{
error=cudaMemcpy(cpu,gpu,size,cudaMemcpyDeviceToHost);
}
else if (t==GPU)
error=cudaMemcpy(cpu,gpu,size,cudaMemcpyDeviceToDevice);
else
{fprintf(stderr,"NOT IMPLEMENTED");exit(-1);}
error_f();
error=cudaDeviceSynchronize();
error_f();
}
/////////////////////////////////////
/////////Neural Networks/////////////
/////////////////////////////////////
//activation functions
void gpu_env::activation(float* E,float* N, int f,tensor_gpu_specs* sp)
{
if (E==NULL || N==NULL)
{fprintf(stderr,"Fill data in pointer.\n");exit(-1);}
dim3 dimBlock;
dim3 dimGrid;
if (f==ACT_SOF)
{
dimBlock.x=sp->row;
dimGrid.x=1;
}
else
{
dimBlock.x=sp->col;
dimGrid.x=sp->row;
}
long int ops = sp->col*sp->row;
long int sample_dim=sp->col;
double alfa=1;
float* auxE=NULL;
switch(f)
{
case ACT_RLU:
ReLu<<<dimBlock,dimGrid>>>(E,N,ops);
break;
case ACT_ELU:
ELU<<<dimBlock,dimGrid>>>(E,N,alfa,ops);
break;
case ACT_SOF:
{
ops=sp->row;
auxE = makeTensor(sp->col,sp->row);
set_sc(auxE, 0.0, sp);
Softmax<<<dimBlock,dimGrid>>>(E,N,auxE,sample_dim,ops);
break;
}
case ACT_SIG:
Sigmoid<<<dimBlock,dimGrid>>>(E,N,ops);
break;
case ACT_LIN:
//N=E;
error = cudaMemcpy(N,E,sp->batch*sp->featureMap*sp->col*sp->row*sizeof(float),cudaMemcpyDeviceToDevice);
break;
default:
fprintf(stderr,"Activation function not implemented\n");
exit(-1);
}
error_f();
error=cudaDeviceSynchronize();
error_f();
if (auxE!=NULL)
destroyTensor(auxE);
}
//derivative of activation functions
void gpu_env::dactivation(float* E, float* N,float* D, int f,tensor_gpu_specs* sp)
{
if (E==NULL || N==NULL || D==NULL)
{fprintf(stderr,"Fill data in pointer.\n");exit(-1);}
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->row*sp->col;
long int sample_dim=sp->col*sp->row;
switch(f)
{
case ACT_RLU:
dReLu<<<dimBlock,dimGrid>>>(E,D,ops);
break;
case ACT_ELU:
dELU<<<dimBlock,dimGrid>>>(E,N,D,ops);
break;
case ACT_SIG:
dSigmoid<<<dimBlock,dimGrid>>>(E,D,ops);
break;
case ACT_LIN:
set_sc(D,1.0,sp);
break;
default:
fprintf(stderr,"Activation function not implemented\n");
exit(-1);
}
error_f();
error=cudaDeviceSynchronize();
error_f();
}
//loss functions
void gpu_env::compute_loss(float* T, float* N,loss_type t,tensor_gpu_specs* gsp,double* ent, double* cerr)
{
dim3 dimBlock(gsp->row);
dim3 dimGrid(1);
long int ops = gsp->row;
switch(t)
{
case CE:
{
float* max_row=makeTensor(gsp->row);//store it from device but use in gpu
int* cerr_g;
error=cudaMalloc((void**)&cerr_g,sizeof(int));
error_f();
cudaMemset(cerr_g, 0, sizeof(int));
error_f();
MC_loss<<<dimBlock,dimGrid>>>(T,N,max_row,gsp->col,ops,cerr_g);
error_f();
cudaDeviceSynchronize();
error_f();
float* CE_vec;
error=cudaMalloc((void**)&CE_vec,sizeof(float)*gsp->row*gsp->col);
error_f();
CE_loss<<<dimBlock,dimGrid>>>(N,max_row,CE_vec,gsp->col,ops);
cudaDeviceSynchronize();
error_f();
float* result_ce;
error=cudaMalloc((void**)&result_ce,sizeof(float));
error_f();
reduce_array_sum<<<dimGrid,dimBlock,ops*sizeof(float)>>>(CE_vec,ops, gsp->col,result_ce);
cudaDeviceSynchronize();
error_f();
float aux1;
error=cudaMemcpy(&aux1,result_ce,sizeof(float),cudaMemcpyDeviceToHost);
error_f();
*ent=(double)aux1;
int aux=0;
error=cudaMemcpy(&aux,cerr_g,sizeof(int),cudaMemcpyDeviceToHost);
*cerr=(double)aux;
destroyTensor(max_row);
cudaFree(result_ce);
cudaFree(cerr_g);
cudaFree(CE_vec);
break;
}
case SSE:
fprintf(stderr,"GPU COST NOT IMPLEMENTED\n");
exit(-1);
break;
default:
fprintf(stderr,"GPU COST NOT IMPLEMENTED\n");
exit(-1);
}
}
/////////////////////////////////////////
///////////////gpu parsing///////////////
////////////////////////////////////////
void gpu_env::gpu_info(int selected_gpu)
{
int nDevices;
cudaGetDeviceCount(&nDevices);
if (selected_gpu>nDevices)
{
fprintf(stderr,"Error. GPU %d not available. Number of available GPU is %d. Further information running nvidia-smi\n",selected_gpu,nDevices);
exit(-1);
}
fprintf(stderr,"Selecting GPU device %d\n",selected_gpu);
cudaSetDevice(selected_gpu);
cudaDeviceProp prop;
cudaGetDeviceProperties(&prop,selected_gpu);
fprintf(stderr,"Layers is running on GPU %s\n",prop.name);
gpuI.warpSize=prop.warpSize;
gpuI.maxThreadPerBlock=prop.maxThreadsPerBlock;
}
///////////////////////////////////////////
///////////////Linear Albegra//////////////
///////////////////////////////////////////
//MATRIX TO MATRIX OPERATIONS
//matrix operator
//Perform matrix produc c=a*b
//float pointer are matrix
//tensor_gpu_spcs matrix specifications
//tA and tB are for transposing matrix
// acc{0,1}->whether to accumulate result in C (1) or set (0)
void gpu_env::matMul(float* a,float* b,float* c, tensor_gpu_specs* sA,tensor_gpu_specs* sB, tensor_gpu_specs* sC, int acc, int tA, int tB)
{
//for the moment only available cublas for operation
cublas.matrixProduct(a,b,c,sA,sB,sC,acc,tA,tB);
error=cudaDeviceSynchronize();
error_f();
}
//SCALAR VECTOR OPERATOR
void gpu_env::scVec(float* vec_o,float* vec_i, tensor_gpu_specs* sA, float sc ,int op,int acc)
{
//gpuI has info about GPU for kernel dimensions
if (op==0)
{
dim3 dimBlock(sA->row);//maybe move this to declaration
dim3 dimGrid(sA->col);
long int ops = sA->row*sA->col;
//add -> no blas operation (we could use same as product buth we should fill B in gpu and that is shit. Home made kernel)
sc_add_mat<<<dimBlock,dimGrid>>>(vec_o,vec_i,sc,ops,acc);//could be same as matrix scalar operator because we treat as float*
error_f();
error=cudaDeviceSynchronize();
error_f();
}
else if (op==1)
{
//prod -> use same as matrix + matrix just matrix B is 0
if (vec_o==NULL || vec_i==NULL)
{printf("Error\n");exit(-1);}
error=cudaMemcpy(vec_o,vec_i,sA->row*sA->col*sizeof(float),cudaMemcpyDeviceToDevice);
error_f();
cublas.sc_prod_vec(vec_o,vec_i,sc,sA,acc);
error=cudaDeviceSynchronize();
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
//MATRIX SCALAR OPERATORS
//Scalar product/sum Matrix
//op{0,1}-> 0 is add and 1 is product
//acc{0,1}-> accumulate (1) or set (0)
void gpu_env::scMat(float* mat_o,float* mat_i, tensor_gpu_specs* sA, float sc ,int op,int acc)
{
//gpuI has info about GPU for kernel dimensions
if (op==0)
{
dim3 dimBlock(sA->row);//maybe move this to declaration
dim3 dimGrid(sA->col);
long int ops = sA->row*sA->col;
//add -> no blas operation (we could use same as product buth we should fill B in gpu and that is shit. Home made kernel)
sc_add_mat<<<dimBlock,dimGrid>>>(mat_o,mat_i,sc,ops,acc);
error_f();
error=cudaDeviceSynchronize();
error_f();
}
else if (op==1)
{
//prod -> use same as matrix + matrix just matrix B is 0
cublas.sc_prod_mat(mat_o,mat_i,sc,sA,acc);
error=cudaDeviceSynchronize();
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
///////////////////////////////////////////
///////////ELEMENT WISE OPERATOR///////////
///////////////////////////////////////////
//(sum or product)
// op{0,1,2}->0 is add and 1 is product 2 is sqrt
//Division can be performed by multiplying by inverse and subtraction can be done as a sum using scb and sca correctly (with -)
// acc{0,1}->whether to accumulate result in C (1) or set (0)
//tA and tB are for transposing matrix
//sca and scb only available when sum is done. Not contemplate for el wise product as it is the same as making the product and then scalar dot product. We do not save memory performing this operation in the same operation as in the sum(where we first make a new float* with the result of scalar dot matrix and then sum)
void gpu_env::mat_elwise_mat(float* A, float* B, float* C,tensor_gpu_specs* sA,tensor_gpu_specs* sB,tensor_gpu_specs* sC,int op, int acc, int trA, int trB,float sca, float scb)
{
if (op==0)
{
//transpose is done in cublas routine. We have cublas routine for this
if (acc==0)
{//not accumulateA
cublas.mat_ewsum_mat(A,B,C,sA,sB,trA,trB,sca,scb);
}
else if (acc==1)
{//accumulate
float* aux=makeTensor(sA->row,sA->col,1,1);
set_sc(aux,0.0, sA);
cublas.mat_ewsum_mat(A,B,aux,sA,sB,trA,trB,sca,scb);
cublas.mat_ewsum_mat(C,aux,C,sC,sC,0,0);
destroyTensor(aux);
}
}
else if(op==1)
{
float* tA;
float* tB;
if (trA==1)
{
//transpose A
tA=makeTensor(sA->row,sA->col,1,1);
set_sc(tA,0.0, sA);
cublas.mat_transp(tA,A,sA);
error=cudaDeviceSynchronize();
error_f();
}
if (trB==1)
{
//transpose B
tB=makeTensor(sB->row,sB->col,1,1);
set_sc(tB,0.0, sB);
cublas.mat_transp(tB,B,sB);
error=cudaDeviceSynchronize();
error_f();
}
dim3 dimBlock(sA->col);//maybe move this to declaration
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
if (trA==1 && trB==1)
{
mat_ewprod_mat<<<dimBlock,dimGrid>>>(C,tA,tB,acc,ops);
}
if (trA==1 && trB==0)
{
mat_ewprod_mat<<<dimBlock,dimGrid>>>(C,tA,B,acc,ops);
}
if (trA==0 && trB==1){mat_ewprod_mat<<<dimBlock,dimGrid>>>(C,A,tB,acc,ops);}
if (trA==0 && trB==0){
mat_ewprod_mat<<<dimBlock,dimGrid>>>(C,A,B,acc,ops);
}
error_f();
error=cudaDeviceSynchronize();
error_f();
if (trA)
destroyTensor(tA);
if (trB)
destroyTensor(tB);
error_f();
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
//compare to tensor element by element
int gpu_env::tensor_equal(float* A, float* B,tensor_gpu_specs* sA)
{
dim3 dimBlock(sA->col);//maybe move this to declaration
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
kern_tensor_equal<<<dimBlock,dimGrid>>>(A,B,ops);
error=cudaDeviceSynchronize();
if (error==cudaErrorLaunchFailure)
return 0;
else if(error!=cudaSuccess)
{fprintf(stderr,"Error launching gpu kernel: %s",cudaGetErrorString(error));
exit(-1);}
else
return 1;
}
//elwise operator matrix vector
//op=0 is sum and 1 is prod
void gpu_env::mat_elwise_vec(float* mat_o,float* mat, float* vec, tensor_gpu_specs* sA,int op,int acc,float sca, float scb, int rdim)
{
//op 0 is sum
//op 1 is multiplication
//op 2 is division
if (rdim==1)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
mat_ewcol_vec<<<dimBlock,dimGrid>>>(mat_o,mat,vec,ops,sA->col,op,acc,sca, scb);
}
else
{
dim3 dimBlock(sA->col);
dim3 dimGrid(sA->row);
long int ops = sA->row*sA->col;
mat_ewrow_vec<<<dimBlock,dimGrid>>>(mat_o,mat,vec,ops,sA->row,op,acc,sca, scb);
}
error_f();
error=cudaDeviceSynchronize();
error_f();
}
//elwise operator vector vector
void gpu_env::vec_elwise_vec(float* A, float* B, float* C,tensor_gpu_specs* sA,int op, int acc,float sca, float scb)
{
//trasposition is not contemplated. This is real programming not grandfather programming.
if (op==0)//sum
{
cublas.vec_sum_vec(C,B,A,sA,acc,sca,scb);
error=cudaDeviceSynchronize();
error_f();
}
else if(op==1) //product
{
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
else
{fprintf(stderr,"Not implemented\n");exit(-1);}
}
///////////////////////////////////////////////
/////////////////INPLACE OPERATOR//////////////
///////////////////////////////////////////////
void gpu_env::mat_inplace_mat(float* o, float* i,tensor_gpu_specs* si,int op, int acc)
{
dim3 dimBlock(si->row);
dim3 dimGrid(si->col);
if (op==0)//sqrt
{
tensor_sqrt<<<dimGrid,dimBlock>>>(o,i, acc,si->col*si->row);
}
else
{fprintf(stderr,"Not implemented mat_inplace_mat\n");exit(-1);}
}
///////////////////////////////////////////////
///////////////REDUCTION OPERATOR//////////////
///////////////////////////////////////////////
//This operators should be programed manually using reduction
//techniques. For the moment we can use wonderfull thurst library
//or cuBlas. For performance self-programmed or cuBlas is better.
//We use cannonical float* whenever we can (always looking for avoiding
//warping divergence )
void gpu_env::sum_abs(float* p,tensor_gpu_specs* gsp,float* acc)
{
cublasStatus_t error_cb=cublasSasum(p_cublas,gsp->row*gsp->col,p,1,acc);
if (error_cb!=CUBLAS_STATUS_SUCCESS)
fprintf(stderr,"Error calling sum_abs with cublasSasum routine\n");
}
void gpu_env::reduce_operator(float* p,tensor_gpu_specs* gsp,float* acc)
{
float* sum_aux;
error = cudaMalloc((void**)&sum_aux,sizeof(float));
error_f();
dim3 dimGrid(1);
dim3 dimBlock(gsp->row);
long int ops = gsp->row;
reduce_array_sum<<<dimGrid,dimBlock,ops*sizeof(float)>>>(p,ops, gsp->col,sum_aux);
cudaDeviceSynchronize();
error_f();
copy_data(acc,sum_aux,FROMGPU,sizeof(float));
}
void gpu_env::row_sum(float* A, tensor_gpu_specs* sA,float* B)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(1);
long int ops = sA->row;
tensor_set_value<<<dimBlock,dimGrid>>>(B,0.0,sA->row);
error_f();
error=cudaDeviceSynchronize();
error_f();
kernel_row_sum<<<dimBlock,dimGrid>>>(A,B,(int)sA->row,(int)sA->col,ops);
error_f();
error=cudaDeviceSynchronize();
error_f();
}
void gpu_env::col_sum(float* A, tensor_gpu_specs* sA,float* B)
{
dim3 dimBlock(sA->col);
dim3 dimGrid(1);
long int ops = sA->col;
tensor_set_value<<<dimBlock,dimGrid>>>(B,0.0,sA->col);
error_f();
error=cudaDeviceSynchronize();
error_f();
kernel_col_sum<<<dimBlock,dimGrid>>>(A,B,(int)sA->row,(int)sA->col,ops);
error_f();
error=cudaDeviceSynchronize();
error_f();
}
int gpu_env::row_max(float* A, tensor_gpu_specs* sA,int ind)
{
//ind is the row index;
//use thrurst for this in future or cubla. As we copy to thurst we only copy the row we operate.
if (ind > sA->row)
{fprintf(stderr,"Error. Row not available\n");exit(-1);}
cublasStatus_t error_cb;
// printf ("===Indice pasado %d",ind);
float *Aaux=A+ind*sA->col;
int result;
error_cb = cublasIsamax(p_cublas,sA->col,Aaux,1,&result);
if (error_cb!=CUBLAS_STATUS_SUCCESS)
{fprintf(stderr,"Error in cublas execution\n");exit(-1);}
//printf("====columns routine %d \n",sA->col);
//printf("====cublas routine %d \n",result);
cudaDeviceSynchronize();
error_f();
return result;
}
//////////////////////////////////////////////
///////////////RANDOM GENERATOR///////////////
//////////////////////////////////////////////
/*use host api -> when we need to save generated values. Easier to implement but poor performance:
-on one side we store values on GPU so waste memory
-on other side we cannot use generated values online->we loose time accesing memory for reading stored buffers
*/
void gpu_env::random_number_host_binary(float* rand_vec,tensor_gpu_specs* sp,float p)
{
if(rand_vec==NULL)
{fprintf(stderr,"Error. Allocate gpu Rand vector\n");exit(-1);}
rand_error=curandGenerateUniform(random_generator,rand_vec,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=cudaDeviceSynchronize();
error_f();
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->col*sp->row;
drop_mask<<<dimBlock,dimGrid>>>(rand_vec,p,ops);
error_f();
error=cudaDeviceSynchronize();
error_f();
}
void gpu_env::random_number_host_gaussian(float* rand_vec,tensor_gpu_specs* sp,float mean,float std)
{
rand_error=curandGenerateNormal (random_generator, rand_vec, sp->row*sp->col*sp->batch*sp->featureMap, mean, std );
error_rand();
error=cudaDeviceSynchronize();
error_f();
}
void gpu_env::add_noise(float* vec, float* rand_vec, float noiser, tensor_gpu_specs* sp)
{
float* mask = makeTensor(sp->row,sp->col);
rand_error=curandGenerateUniform(random_generator,mask,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=cudaDeviceSynchronize();
error_f();
dim3 dimBlock(sp->col);
dim3 dimGrid(sp->row);
long int ops = sp->col*sp->row;
add_noise_with_mask<<<dimBlock,dimGrid>>>(vec,rand_vec,mask,noiser,ops);
error_f();
error=cudaDeviceSynchronize();
error_f();
destroyTensor(mask);
}
/*
void gpu_env::random_number_device_binary(float* rand_vec,tensor_gpu_specs* sp,float p)
{
if(rand_vec==NULL)
{fprintf(stderr,"Error. Allocate gpu Rand vector\n");exit(-1);}
//for avoid to kernel launch(one for generating and one for rounding we do in one. However we take care of actual state)
rand_error=curandGenerateUniform(random_generator,rand_vec,sp->row*sp->col*sp->batch*sp->featureMap);
error_rand();
error=cudaDeviceSynchronize();
error_f();
}
*/
|
c579d6f7a01ebe54dfd6804fcd9c468d34ac7ae0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2014, September 8 - October 10
// ###
// ###
// ### Maria Klodt, Jan Stuehmer, Mohamed Souiai, Thomas Moellenhoff
// ###
// ###
// ###
// ###
// ### TODO: For every student of your group, please provide here:
// ###
// ### name, email, login username (for example p123)
// ###
// ###
// C Libraries
//extern "C"{
#include "CFD/cfd.h"
//}
#include "aux.h"
#include "functionalities.h"
#include <iostream>
#include <math.h>
using namespace std;
// uncomment to use the camera
//#define CAMERA
int main(int argc, char **argv)
{
// Before the GPU can process your kernels, a so called "CUDA context" must be initialized
// This happens on the very first call to a CUDA function, and takes some time (around half a second)
// We will do it right here, so that the run time measurements are accurate
hipDeviceSynchronize(); CUDA_CHECK;
// Reading command line parameters:
// getParam("param", var, argc, argv) looks whether "-param xyz" is specified, and if so stores the value "xyz" in "var"
// If "-param" is not specified, the value of "var" remains unchanged
//
// return value: getParam("param", ...) returns true if "-param" is specified, and false otherwise
#ifdef CAMERA
bool ret;
#else
// input image
string image = "";
bool ret = getParam("i", image, argc, argv);
if (!ret) cerr << "ERROR: no image specified" << endl;
if (argc <= 1) { cout << "Usage: " << argv[0] << " -i <image> <gamma> [-repeats <repeats>] [-gray]" << endl; return 1; }
#endif
// number of computation repetitions to get a better run time measurement
int repeats = 1;
getParam("repeats", repeats, argc, argv);
cout << "repeats: " << repeats << endl;
// load the input image as grayscale if "-gray" is specifed
bool gray = false;
getParam("gray", gray, argc, argv);
cout << "gray: " << gray << endl;
// ### Define your own parameters here as needed
// input image
string mask = "";
ret = getParam("mask", mask, argc, argv);
if (!ret) cerr << "ERROR: no image specified" << endl;
if (argc <= 1) { cout << "Usage: " << argv[0] << " -mask <mask>" << endl; return 1; }
int poisson = 1000;
getParam("poisson", poisson, argc, argv);
cout << "poisson: " << poisson << endl;
int iter = 10;
getParam("iter", iter, argc, argv);
cout << "iter: " << iter << endl;
// Run option: 0 - Laplace Equation, 1 - NS
int option = 1;
getParam("option", option, argc, argv);
cout << "option: " << option << endl;
// Timestep for anisotropic diffusion
float tau = 0.02;
getParam("tau", tau, argc, argv);
cout << "tau: " << tau << endl;
// Theta for sor
float sor_theta = 0.7;
getParam("sor_theta", sor_theta, argc, argv);
cout << "sor_theta: " << sor_theta << endl;
// Timestep for anisotropic diffusion
int aniso_iter = 5;
getParam("aniso_iter", aniso_iter, argc, argv);
cout << "aniso_iter: " << tau << endl;
// Full image: 1 - Image without superimposed inpainting domain, 0 - image with ...
int FullImage = 1;
getParam("FullImage", FullImage, argc, argv);
cout << "FullImage: " << FullImage << endl;
// Init camera / Load input image
#ifdef CAMERA
// Init camera
cv::VideoCapture camera(0);
if(!camera.isOpened()) { cerr << "ERROR: Could not open camera" << endl; return 1; }
int camW = 640;
int camH = 480;
camera.set(CV_CAP_PROP_FRAME_WIDTH,camW);
camera.set(CV_CAP_PROP_FRAME_HEIGHT,camH);
// read in first frame to get the dimensions
cv::Mat mIn;
camera >> mIn;
#else
// Load the input image using opencv (load as grayscale if "gray==true", otherwise as is (may be color or grayscale))
cv::Mat mIn = cv::imread(image.c_str(), (gray? CV_LOAD_IMAGE_GRAYSCALE : -1));
// check
if (mIn.data == NULL) { cerr << "ERROR: Could not load image " << image << endl; return 1; }
#endif
// convert to float representation (opencv loads image values as single bytes by default)
mIn.convertTo(mIn,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mIn /= 255.f;
// get image dimensions
int w = mIn.cols; // width
int h = mIn.rows; // height
int nc = mIn.channels(); // number of channels
cout << "image: " << w << " x " << h << endl;
// Load the mask
cv::Mat mMask = cv::imread(mask.c_str(), (gray? CV_LOAD_IMAGE_GRAYSCALE : -1));
// check
if (mMask.data == NULL) { cerr << "ERROR: Could not load image " << mask << endl; return 1; }
// convert to float representation (opencv loads image values as single bytes by default)
mMask.convertTo(mMask,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mMask /= 255.f;
// Set the output image format
// ###
// ###
// ### TODO: Change the output image format as needed
// ###
// ###
cv::Mat mOut(h,w,mIn.type()); // mOut will have the same number of channels as the input image, nc layers
//cv::Mat mOut(h,w,CV_32FC3); // mOut will be a color image, 3 layers
//cv::Mat mOut(h,w,CV_32FC1); // mOut will be a grayscale image, 1 layer
// ### Define your own output images here as needed
// Allocate arrays
// input/output image width: w
// input/output image height: h
// input image number of channels: nc
// output image number of channels: mOut.channels(), as defined above (nc, 3, or 1)
// allocate raw input image array
float *imgIn = new float[(size_t)w*h*nc];
// allocate mask image array
float *imgMask = new float[(size_t)w*h];
// allocate raw output array (the computation result will be stored in this array, then later converted to mOut for displaying)
float *imgOut = new float[(size_t)w*h*nc];
float *v1 = new float[(size_t)w*h*nc];
float *v2 = new float[(size_t)w*h*nc];
float *imgVorticity = new float[(size_t)w*h*nc];
float *initVorticity = new float[(size_t)w*h*nc];
int *imgDomain = new int[(size_t)w*h];
float *imgU = new float[(size_t)w*h*nc];
float *imgV = new float[(size_t)w*h*nc];
float *initU = new float[(size_t)w*h*nc];
float *initV = new float[(size_t)w*h*nc];
// TODO: Introduced temporarily to display the domain
float *floatDomain = new float[(size_t)w*h];
// For camera mode: Make a loop to read in camera frames
#ifdef CAMERA
// Read a camera image frame every 30 milliseconds:
// cv::waitKey(30) waits 30 milliseconds for a keyboard input,
// returns a value <0 if no key is pressed during this time, returns immediately with a value >=0 if a key is pressed
while (cv::waitKey(30) < 0)
{
// Get camera image
camera >> mIn;//convert_layered_to_mat_int
// convert to float representation (opencv loads image values as single bytes by default)
mIn.convertTo(mIn,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mIn /= 255.f;
#endif
// Init raw input image array
// opencv images are interleaved: rgb rgb rgb... (actually bgr bgr bgr...)
// But for CUDA it's better to work with layered images: rrr... ggg... bbb...
// So we will convert as necessary, using interleaved "cv::Mat" for loading/saving/displaying, and layered "float*" for CUDA computations
convert_mat_to_layered (imgIn, mIn);
// Creating the mask
convert_mat_to_layered (imgMask, mMask);
Timer timer; timer.start();
// ###
// ###
// ### TODO: Main computation
// ###
// ###
int n = w*h*nc;
//===============================================================================================//
// TEST RGB transformation - It returns a 3-channel picture.
// In the algorithm we are working with 1-channel picture.
// We have to execute the algorithm three times and to combine the pictures at the end.
// forward_color_transf( imgIn, imgOut, w, h, nc );
// inverse_color_transf( imgOut, imgIn, w, h, nc );
//===============================================================================================//
forward_color_transf( imgIn, imgIn, w, h, nc );
// Trying to do everything on GPU
float *gpu_initVorticity, *gpu_Vorticity, *gpu_Mask, *gpu_v1, *gpu_v2, *gpu_U, *gpu_V;;
int *gpu_Domain;
// Allocate GPU memory
hipMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
hipMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
hipMalloc(&gpu_Mask, w*h*sizeof(float));CUDA_CHECK;
hipMalloc(&gpu_v1, n*sizeof(float));CUDA_CHECK;
hipMalloc(&gpu_v2, n*sizeof(float));CUDA_CHECK;
hipMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
hipMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
dim3 block = dim3(128,1,1);
dim3 grid = dim3((n + block.x - 1) / block.x, 1, 1);
if (option == 0)
{
for (int ind=0; ind<n; ind++)
{
imgVorticity[ind] = 0.0f;
initVorticity[ind] = 0.0f;
}
hipMemcpy(gpu_initVorticity, initVorticity, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
hipMemcpy(gpu_Vorticity, imgVorticity, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
}
// Calculate the inpainting domain
// allocate GPU memory
//hipMalloc(&gpu_Mask, w*h*sizeof(float));CUDA_CHECK;
hipMalloc(&gpu_Domain, w*h*sizeof(int));CUDA_CHECK;
// copy host memory to device
hipMemcpy(gpu_Mask, imgMask, w*h*sizeof(float), hipMemcpyHostToDevice);CUDA_CHECK;
hipMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), hipMemcpyHostToDevice);CUDA_CHECK;
// launch kernel
hipLaunchKernelGGL(( global_detect_domain1) , dim3(grid),dim3(block), 0, 0, gpu_Mask, gpu_Domain, w, h, w*h);
hipLaunchKernelGGL(( global_detect_domain2) , dim3(grid),dim3(block), 0, 0, gpu_Mask, gpu_Domain, w, h, w*h);
hipLaunchKernelGGL(( global_detect_domain3) , dim3(grid),dim3(block), 0, 0, gpu_Mask, gpu_Domain, w, h, w*h);
// copy result back to host (CPU) memory
hipMemcpy(imgDomain, gpu_Domain, w*h * sizeof(int), hipMemcpyDeviceToHost );CUDA_CHECK;
// free device (GPU) memory
hipFree(gpu_Mask);CUDA_CHECK;
//hipFree(gpu_Domain);CUDA_CHECK;
// Main loop
for (int j=0; j<iter; j++)
{
cout << "Global iteration: " << j << endl;
// allocate GPU memory
float *gpu_In, *gpu_Out;//, *gpu_U, *gpu_V;// ,*gpu_v1, *gpu_v2;//, *gpu_Vorticity;//, *gpu_Mask; //, *gpu_initVorticity;
//int *gpu_Domain;
if (option == 1)
{
// Calculate gradient
hipMalloc(&gpu_In, n*sizeof(float));CUDA_CHECK;
//hipMalloc(&gpu_v1, n*sizeof(float));CUDA_CHECK;
//hipMalloc(&gpu_v2, n*sizeof(float));CUDA_CHECK;
//hipMalloc(&gpu_Domain, w*h*sizeof(int));CUDA_CHECK;
//hipMalloc(&gpu_U, n*sizeof(float));CUDA_CHECK;
//hipMalloc(&gpu_V, n*sizeof(float));CUDA_CHECK;
// copy host memory to device
hipMemcpy(gpu_In, imgIn, n*sizeof(float), hipMemcpyHostToDevice);CUDA_CHECK;
//hipMemcpy(gpu_v1, v1, n*sizeof(float), hipMemcpyHostToDevice);CUDA_CHECK;
//hipMemcpy(gpu_v2, v2, n*sizeof(float), hipMemcpyHostToDevice);CUDA_CHECK;
//hipMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), hipMemcpyHostToDevice);CUDA_CHECK;
// launch kernel
hipLaunchKernelGGL(( global_grad) , dim3(grid),dim3(block), 0, 0, gpu_In, gpu_Domain, gpu_v1, gpu_v2, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//hipMemcpy( v1, gpu_v1, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
//hipMemcpy( v2, gpu_v2, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
// Invert the V values according t: V = -dI/dx
hipLaunchKernelGGL(( global_reverse_sign) , dim3(grid),dim3(block), 0, 0, gpu_v2, n);
hipMemcpy( imgU, gpu_v2, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy( imgV, gpu_v1, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
hipFree(gpu_In); CUDA_CHECK;
//hipFree(gpu_v1); CUDA_CHECK;
//hipFree(gpu_v2); CUDA_CHECK;
//hipFree(gpu_U); CUDA_CHECK;
//hipFree(gpu_V); CUDA_CHECK;
//hipFree(gpu_Domain); CUDA_CHECK;
// // Invert the V values according t: V = -dI/dx
// // TODO: Invert in parallel
// for (int i=0; i<n; i++)
// {
// //imgV[i] = -imgV[i];
// imgU[i] = -imgU[i];
// }
}
if (option == 1)
{
if ( j == 0 )
{
// Calculate init vorticity
// allocate GPU memory
//hipMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
hipMemcpy(gpu_U, imgU, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
hipMemcpy(gpu_V, imgV, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
//hipMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), hipMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
hipLaunchKernelGGL(( global_vorticity) , dim3(grid),dim3(block), 0, 0, gpu_U, gpu_V, gpu_initVorticity, gpu_Domain, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//hipMemcpy(initVorticity, gpu_Vorticity, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
//hipMemcpy(initVorticity, gpu_initVorticity, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy(initU, gpu_U, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy(initV, gpu_V, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
//hipFree(gpu_U); CUDA_CHECK;
//hipFree(gpu_V); CUDA_CHECK;
//hipFree(gpu_Vorticity); CUDA_CHECK;
//hipFree(gpu_initVorticity); CUDA_CHECK;
//hipFree(gpu_Domain); CUDA_CHECK;
}
// CFD solver
for (int channel = 0; channel < nc; channel++)
{
cfd( argc, argv, &(imgU[channel*w*h]), &(imgV[channel*w*h]), imgDomain, &(initU[channel*w*h]), &(initV[channel*w*h]), w, h, j , grid, block);
}
// Calculate vorticity
// allocate GPU memory
//hipMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
hipMemcpy(gpu_U, imgU, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
hipMemcpy(gpu_V, imgV, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
//hipMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), hipMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
hipLaunchKernelGGL(( global_vorticity) , dim3(grid),dim3(block), 0, 0, gpu_U, gpu_V, gpu_Vorticity, gpu_Domain, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//hipMemcpy(imgVorticity, gpu_Vorticity, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy(imgU, gpu_U, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy(imgV, gpu_V, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
//hipFree(gpu_U); CUDA_CHECK;
//hipFree(gpu_V); CUDA_CHECK;
//hipFree(gpu_Vorticity); CUDA_CHECK;
//hipFree(gpu_Domain); CUDA_CHECK;
}
/*else if (option == 0)
{
for (int ind=0; ind<n; ind++)
{
imgVorticity[ind] = 0.0f;
initVorticity[ind] = 0.0f;
}
}*/
if ( j == 0 )
{
for ( int ind = 0; ind < n; ind++ )
{
int x, y, ch;
ch = (int)(ind) / (int)(w*h);
y = ( ind - ch*w*h ) / w;
x = ( ind - ch*w*h ) % w;
int indDomain = x + w*y;
if ( imgDomain[indDomain] == 1 )
imgIn[ind] = 1.0;
}
//Display the image with cut inpainting domain
inverse_color_transf( imgIn, imgIn, w, h, nc );
convert_layered_to_mat(mIn, imgIn);
forward_color_transf( imgIn, imgIn, w, h, nc );
}
// Solve the Poisson equation - update the image
hipMalloc(&gpu_Out, n*sizeof(float)); CUDA_CHECK;
hipMalloc(&gpu_In, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
//hipMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
hipMemcpy(gpu_In, imgIn, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
hipMemcpy(gpu_Out, imgIn, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
//hipMemcpy(gpu_Vorticity, imgVorticity, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
//hipMemcpy(gpu_initVorticity, initVorticity, n*sizeof(float), hipMemcpyHostToDevice); CUDA_CHECK;
//hipMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), hipMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
for (int i=0; i<poisson; i++)
{
hipLaunchKernelGGL(( global_solve_Poisson) , dim3(grid),dim3(block), 0, 0, gpu_In, gpu_In, gpu_initVorticity, gpu_Vorticity, gpu_Domain, w, h, nc, n, sor_theta, 1);
hipLaunchKernelGGL(( global_solve_Poisson) , dim3(grid),dim3(block), 0, 0, gpu_In, gpu_In, gpu_initVorticity, gpu_Vorticity, gpu_Domain, w, h, nc, n, sor_theta, 0);
}
//global_solve_Poisson <<<grid,block>>> (gpu_Out, gpu_In, gpu_Vorticity, gpu_Domain, w, h, nc, n, 0.7, 1);
// copy result back to host (CPU) memory
hipMemcpy(imgOut, gpu_In, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
hipMemcpy(imgIn, gpu_In, n * sizeof(float), hipMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
hipFree(gpu_Out); CUDA_CHECK;
hipFree(gpu_In); CUDA_CHECK;
//hipFree(gpu_initVorticity); CUDA_CHECK;
//hipFree(gpu_Vorticity); CUDA_CHECK;
//hipFree(gpu_Domain); CUDA_CHECK;
//if ( j+1 % 10 == 0 ) aniso_diff(imgIn, imgDomain, imgIn, w, h, nc, tau, aniso_iter, grid, block);
}
// Trying to make it run just on GPU
hipFree(gpu_initVorticity); CUDA_CHECK;
hipFree(gpu_Vorticity); CUDA_CHECK;
hipFree(gpu_Domain);CUDA_CHECK;
hipFree(gpu_v1); CUDA_CHECK;
hipFree(gpu_v2); CUDA_CHECK;
hipFree(gpu_U); CUDA_CHECK;
hipFree(gpu_V); CUDA_CHECK;
inverse_color_transf( imgIn, imgOut, w, h, nc );
timer.end(); float t = timer.get(); // elapsed time in seconds
cout << "time: " << t*1000 << " ms" << endl;
// show input image
//mIn /= 255.f;
showImage("Input", mIn, 100, 100); // show at position (x_from_left=100,y_from_above=100)
//
// // TODO: Just for diagnostic purposes
/* for (int i=0; i<w*h; i++)
{
floatDomain[i] = imgDomain[i]*0.5;
}
convert_layered_to_mat(mOut, floatDomain);
showImage("imgDomain", mOut, 100+w+80, 100);
// show output image: first convert to interleaved opencv format from the layered raw array
convert_layered_to_mat(mOut, imgVorticity);
mOut *=1000;
showImage("Heating", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, imgVorticity);
mOut *=-1000;
showImage("Cooling ", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, v1);
mOut *=1000;
showImage("v1 ", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, v2);
mOut *=1000;
showImage("v2 ", mOut, 100+w+80, 100);
*/
// show output image: first convert to interleaved opencv format from the layered raw array
convert_layered_to_mat(mOut, imgOut);
//mOut /= 255.f;
showImage("Output", mOut, 100+w+40, 100);
// ### Display your own output images here as needed
#ifdef CAMERA
// end of camera loop
}
#else
// wait for key inputs
cv::waitKey(0);
#endif
// save input and result
cv::imwrite("image_input.png",mIn*255.f); // "imwrite" assumes channel range [0,255]
cv::imwrite("image_result.png",mOut*255.f);
// free allocated arrays
delete[] imgIn;
delete[] imgMask;
delete[] imgVorticity;
delete[] initVorticity;
delete[] initU;
delete[] initV;
delete[] imgDomain;
delete[] floatDomain;
delete[] v1;
delete[] v2;
// close all opencv windows
cvDestroyAllWindows();
return 0;
}
| c579d6f7a01ebe54dfd6804fcd9c468d34ac7ae0.cu | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Summer Semester 2014, September 8 - October 10
// ###
// ###
// ### Maria Klodt, Jan Stuehmer, Mohamed Souiai, Thomas Moellenhoff
// ###
// ###
// ###
// ###
// ### TODO: For every student of your group, please provide here:
// ###
// ### name, email, login username (for example p123)
// ###
// ###
// C Libraries
//extern "C"{
#include "CFD/cfd.h"
//}
#include "aux.h"
#include "functionalities.h"
#include <iostream>
#include <math.h>
using namespace std;
// uncomment to use the camera
//#define CAMERA
int main(int argc, char **argv)
{
// Before the GPU can process your kernels, a so called "CUDA context" must be initialized
// This happens on the very first call to a CUDA function, and takes some time (around half a second)
// We will do it right here, so that the run time measurements are accurate
cudaDeviceSynchronize(); CUDA_CHECK;
// Reading command line parameters:
// getParam("param", var, argc, argv) looks whether "-param xyz" is specified, and if so stores the value "xyz" in "var"
// If "-param" is not specified, the value of "var" remains unchanged
//
// return value: getParam("param", ...) returns true if "-param" is specified, and false otherwise
#ifdef CAMERA
bool ret;
#else
// input image
string image = "";
bool ret = getParam("i", image, argc, argv);
if (!ret) cerr << "ERROR: no image specified" << endl;
if (argc <= 1) { cout << "Usage: " << argv[0] << " -i <image> <gamma> [-repeats <repeats>] [-gray]" << endl; return 1; }
#endif
// number of computation repetitions to get a better run time measurement
int repeats = 1;
getParam("repeats", repeats, argc, argv);
cout << "repeats: " << repeats << endl;
// load the input image as grayscale if "-gray" is specifed
bool gray = false;
getParam("gray", gray, argc, argv);
cout << "gray: " << gray << endl;
// ### Define your own parameters here as needed
// input image
string mask = "";
ret = getParam("mask", mask, argc, argv);
if (!ret) cerr << "ERROR: no image specified" << endl;
if (argc <= 1) { cout << "Usage: " << argv[0] << " -mask <mask>" << endl; return 1; }
int poisson = 1000;
getParam("poisson", poisson, argc, argv);
cout << "poisson: " << poisson << endl;
int iter = 10;
getParam("iter", iter, argc, argv);
cout << "iter: " << iter << endl;
// Run option: 0 - Laplace Equation, 1 - NS
int option = 1;
getParam("option", option, argc, argv);
cout << "option: " << option << endl;
// Timestep for anisotropic diffusion
float tau = 0.02;
getParam("tau", tau, argc, argv);
cout << "tau: " << tau << endl;
// Theta for sor
float sor_theta = 0.7;
getParam("sor_theta", sor_theta, argc, argv);
cout << "sor_theta: " << sor_theta << endl;
// Timestep for anisotropic diffusion
int aniso_iter = 5;
getParam("aniso_iter", aniso_iter, argc, argv);
cout << "aniso_iter: " << tau << endl;
// Full image: 1 - Image without superimposed inpainting domain, 0 - image with ...
int FullImage = 1;
getParam("FullImage", FullImage, argc, argv);
cout << "FullImage: " << FullImage << endl;
// Init camera / Load input image
#ifdef CAMERA
// Init camera
cv::VideoCapture camera(0);
if(!camera.isOpened()) { cerr << "ERROR: Could not open camera" << endl; return 1; }
int camW = 640;
int camH = 480;
camera.set(CV_CAP_PROP_FRAME_WIDTH,camW);
camera.set(CV_CAP_PROP_FRAME_HEIGHT,camH);
// read in first frame to get the dimensions
cv::Mat mIn;
camera >> mIn;
#else
// Load the input image using opencv (load as grayscale if "gray==true", otherwise as is (may be color or grayscale))
cv::Mat mIn = cv::imread(image.c_str(), (gray? CV_LOAD_IMAGE_GRAYSCALE : -1));
// check
if (mIn.data == NULL) { cerr << "ERROR: Could not load image " << image << endl; return 1; }
#endif
// convert to float representation (opencv loads image values as single bytes by default)
mIn.convertTo(mIn,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mIn /= 255.f;
// get image dimensions
int w = mIn.cols; // width
int h = mIn.rows; // height
int nc = mIn.channels(); // number of channels
cout << "image: " << w << " x " << h << endl;
// Load the mask
cv::Mat mMask = cv::imread(mask.c_str(), (gray? CV_LOAD_IMAGE_GRAYSCALE : -1));
// check
if (mMask.data == NULL) { cerr << "ERROR: Could not load image " << mask << endl; return 1; }
// convert to float representation (opencv loads image values as single bytes by default)
mMask.convertTo(mMask,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mMask /= 255.f;
// Set the output image format
// ###
// ###
// ### TODO: Change the output image format as needed
// ###
// ###
cv::Mat mOut(h,w,mIn.type()); // mOut will have the same number of channels as the input image, nc layers
//cv::Mat mOut(h,w,CV_32FC3); // mOut will be a color image, 3 layers
//cv::Mat mOut(h,w,CV_32FC1); // mOut will be a grayscale image, 1 layer
// ### Define your own output images here as needed
// Allocate arrays
// input/output image width: w
// input/output image height: h
// input image number of channels: nc
// output image number of channels: mOut.channels(), as defined above (nc, 3, or 1)
// allocate raw input image array
float *imgIn = new float[(size_t)w*h*nc];
// allocate mask image array
float *imgMask = new float[(size_t)w*h];
// allocate raw output array (the computation result will be stored in this array, then later converted to mOut for displaying)
float *imgOut = new float[(size_t)w*h*nc];
float *v1 = new float[(size_t)w*h*nc];
float *v2 = new float[(size_t)w*h*nc];
float *imgVorticity = new float[(size_t)w*h*nc];
float *initVorticity = new float[(size_t)w*h*nc];
int *imgDomain = new int[(size_t)w*h];
float *imgU = new float[(size_t)w*h*nc];
float *imgV = new float[(size_t)w*h*nc];
float *initU = new float[(size_t)w*h*nc];
float *initV = new float[(size_t)w*h*nc];
// TODO: Introduced temporarily to display the domain
float *floatDomain = new float[(size_t)w*h];
// For camera mode: Make a loop to read in camera frames
#ifdef CAMERA
// Read a camera image frame every 30 milliseconds:
// cv::waitKey(30) waits 30 milliseconds for a keyboard input,
// returns a value <0 if no key is pressed during this time, returns immediately with a value >=0 if a key is pressed
while (cv::waitKey(30) < 0)
{
// Get camera image
camera >> mIn;//convert_layered_to_mat_int
// convert to float representation (opencv loads image values as single bytes by default)
mIn.convertTo(mIn,CV_32F);
// convert range of each channel to [0,1] (opencv default is [0,255])
mIn /= 255.f;
#endif
// Init raw input image array
// opencv images are interleaved: rgb rgb rgb... (actually bgr bgr bgr...)
// But for CUDA it's better to work with layered images: rrr... ggg... bbb...
// So we will convert as necessary, using interleaved "cv::Mat" for loading/saving/displaying, and layered "float*" for CUDA computations
convert_mat_to_layered (imgIn, mIn);
// Creating the mask
convert_mat_to_layered (imgMask, mMask);
Timer timer; timer.start();
// ###
// ###
// ### TODO: Main computation
// ###
// ###
int n = w*h*nc;
//===============================================================================================//
// TEST RGB transformation - It returns a 3-channel picture.
// In the algorithm we are working with 1-channel picture.
// We have to execute the algorithm three times and to combine the pictures at the end.
// forward_color_transf( imgIn, imgOut, w, h, nc );
// inverse_color_transf( imgOut, imgIn, w, h, nc );
//===============================================================================================//
forward_color_transf( imgIn, imgIn, w, h, nc );
// Trying to do everything on GPU
float *gpu_initVorticity, *gpu_Vorticity, *gpu_Mask, *gpu_v1, *gpu_v2, *gpu_U, *gpu_V;;
int *gpu_Domain;
// Allocate GPU memory
cudaMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
cudaMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
cudaMalloc(&gpu_Mask, w*h*sizeof(float));CUDA_CHECK;
cudaMalloc(&gpu_v1, n*sizeof(float));CUDA_CHECK;
cudaMalloc(&gpu_v2, n*sizeof(float));CUDA_CHECK;
cudaMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
cudaMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
dim3 block = dim3(128,1,1);
dim3 grid = dim3((n + block.x - 1) / block.x, 1, 1);
if (option == 0)
{
for (int ind=0; ind<n; ind++)
{
imgVorticity[ind] = 0.0f;
initVorticity[ind] = 0.0f;
}
cudaMemcpy(gpu_initVorticity, initVorticity, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
cudaMemcpy(gpu_Vorticity, imgVorticity, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
}
// Calculate the inpainting domain
// allocate GPU memory
//cudaMalloc(&gpu_Mask, w*h*sizeof(float));CUDA_CHECK;
cudaMalloc(&gpu_Domain, w*h*sizeof(int));CUDA_CHECK;
// copy host memory to device
cudaMemcpy(gpu_Mask, imgMask, w*h*sizeof(float), cudaMemcpyHostToDevice);CUDA_CHECK;
cudaMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), cudaMemcpyHostToDevice);CUDA_CHECK;
// launch kernel
global_detect_domain1 <<<grid,block>>> (gpu_Mask, gpu_Domain, w, h, w*h);
global_detect_domain2 <<<grid,block>>> (gpu_Mask, gpu_Domain, w, h, w*h);
global_detect_domain3 <<<grid,block>>> (gpu_Mask, gpu_Domain, w, h, w*h);
// copy result back to host (CPU) memory
cudaMemcpy(imgDomain, gpu_Domain, w*h * sizeof(int), cudaMemcpyDeviceToHost );CUDA_CHECK;
// free device (GPU) memory
cudaFree(gpu_Mask);CUDA_CHECK;
//cudaFree(gpu_Domain);CUDA_CHECK;
// Main loop
for (int j=0; j<iter; j++)
{
cout << "Global iteration: " << j << endl;
// allocate GPU memory
float *gpu_In, *gpu_Out;//, *gpu_U, *gpu_V;// ,*gpu_v1, *gpu_v2;//, *gpu_Vorticity;//, *gpu_Mask; //, *gpu_initVorticity;
//int *gpu_Domain;
if (option == 1)
{
// Calculate gradient
cudaMalloc(&gpu_In, n*sizeof(float));CUDA_CHECK;
//cudaMalloc(&gpu_v1, n*sizeof(float));CUDA_CHECK;
//cudaMalloc(&gpu_v2, n*sizeof(float));CUDA_CHECK;
//cudaMalloc(&gpu_Domain, w*h*sizeof(int));CUDA_CHECK;
//cudaMalloc(&gpu_U, n*sizeof(float));CUDA_CHECK;
//cudaMalloc(&gpu_V, n*sizeof(float));CUDA_CHECK;
// copy host memory to device
cudaMemcpy(gpu_In, imgIn, n*sizeof(float), cudaMemcpyHostToDevice);CUDA_CHECK;
//cudaMemcpy(gpu_v1, v1, n*sizeof(float), cudaMemcpyHostToDevice);CUDA_CHECK;
//cudaMemcpy(gpu_v2, v2, n*sizeof(float), cudaMemcpyHostToDevice);CUDA_CHECK;
//cudaMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), cudaMemcpyHostToDevice);CUDA_CHECK;
// launch kernel
global_grad <<<grid,block>>> (gpu_In, gpu_Domain, gpu_v1, gpu_v2, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//cudaMemcpy( v1, gpu_v1, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
//cudaMemcpy( v2, gpu_v2, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
// Invert the V values according t: V = -dI/dx
global_reverse_sign <<<grid,block>>> (gpu_v2, n);
cudaMemcpy( imgU, gpu_v2, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy( imgV, gpu_v1, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
cudaFree(gpu_In); CUDA_CHECK;
//cudaFree(gpu_v1); CUDA_CHECK;
//cudaFree(gpu_v2); CUDA_CHECK;
//cudaFree(gpu_U); CUDA_CHECK;
//cudaFree(gpu_V); CUDA_CHECK;
//cudaFree(gpu_Domain); CUDA_CHECK;
// // Invert the V values according t: V = -dI/dx
// // TODO: Invert in parallel
// for (int i=0; i<n; i++)
// {
// //imgV[i] = -imgV[i];
// imgU[i] = -imgU[i];
// }
}
if (option == 1)
{
if ( j == 0 )
{
// Calculate init vorticity
// allocate GPU memory
//cudaMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
cudaMemcpy(gpu_U, imgU, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
cudaMemcpy(gpu_V, imgV, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
//cudaMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), cudaMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
global_vorticity <<<grid,block>>> ( gpu_U, gpu_V, gpu_initVorticity, gpu_Domain, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//cudaMemcpy(initVorticity, gpu_Vorticity, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
//cudaMemcpy(initVorticity, gpu_initVorticity, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy(initU, gpu_U, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy(initV, gpu_V, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
//cudaFree(gpu_U); CUDA_CHECK;
//cudaFree(gpu_V); CUDA_CHECK;
//cudaFree(gpu_Vorticity); CUDA_CHECK;
//cudaFree(gpu_initVorticity); CUDA_CHECK;
//cudaFree(gpu_Domain); CUDA_CHECK;
}
// CFD solver
for (int channel = 0; channel < nc; channel++)
{
cfd( argc, argv, &(imgU[channel*w*h]), &(imgV[channel*w*h]), imgDomain, &(initU[channel*w*h]), &(initV[channel*w*h]), w, h, j , grid, block);
}
// Calculate vorticity
// allocate GPU memory
//cudaMalloc(&gpu_U, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_V, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
cudaMemcpy(gpu_U, imgU, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
cudaMemcpy(gpu_V, imgV, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
//cudaMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), cudaMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
global_vorticity <<<grid,block>>> ( gpu_U, gpu_V, gpu_Vorticity, gpu_Domain, w, h, nc, n, FullImage);
// copy result back to host (CPU) memory
//cudaMemcpy(imgVorticity, gpu_Vorticity, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy(imgU, gpu_U, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy(imgV, gpu_V, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
//cudaFree(gpu_U); CUDA_CHECK;
//cudaFree(gpu_V); CUDA_CHECK;
//cudaFree(gpu_Vorticity); CUDA_CHECK;
//cudaFree(gpu_Domain); CUDA_CHECK;
}
/*else if (option == 0)
{
for (int ind=0; ind<n; ind++)
{
imgVorticity[ind] = 0.0f;
initVorticity[ind] = 0.0f;
}
}*/
if ( j == 0 )
{
for ( int ind = 0; ind < n; ind++ )
{
int x, y, ch;
ch = (int)(ind) / (int)(w*h);
y = ( ind - ch*w*h ) / w;
x = ( ind - ch*w*h ) % w;
int indDomain = x + w*y;
if ( imgDomain[indDomain] == 1 )
imgIn[ind] = 1.0;
}
//Display the image with cut inpainting domain
inverse_color_transf( imgIn, imgIn, w, h, nc );
convert_layered_to_mat(mIn, imgIn);
forward_color_transf( imgIn, imgIn, w, h, nc );
}
// Solve the Poisson equation - update the image
cudaMalloc(&gpu_Out, n*sizeof(float)); CUDA_CHECK;
cudaMalloc(&gpu_In, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Vorticity, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_initVorticity, n*sizeof(float)); CUDA_CHECK;
//cudaMalloc(&gpu_Domain, w*h*sizeof(int)); CUDA_CHECK;
// copy host memory to device
cudaMemcpy(gpu_In, imgIn, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
cudaMemcpy(gpu_Out, imgIn, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
//cudaMemcpy(gpu_Vorticity, imgVorticity, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
//cudaMemcpy(gpu_initVorticity, initVorticity, n*sizeof(float), cudaMemcpyHostToDevice); CUDA_CHECK;
//cudaMemcpy(gpu_Domain, imgDomain, w*h*sizeof(int), cudaMemcpyHostToDevice); CUDA_CHECK;
// launch kernel
for (int i=0; i<poisson; i++)
{
global_solve_Poisson <<<grid,block>>> (gpu_In, gpu_In, gpu_initVorticity, gpu_Vorticity, gpu_Domain, w, h, nc, n, sor_theta, 1);
global_solve_Poisson <<<grid,block>>> (gpu_In, gpu_In, gpu_initVorticity, gpu_Vorticity, gpu_Domain, w, h, nc, n, sor_theta, 0);
}
//global_solve_Poisson <<<grid,block>>> (gpu_Out, gpu_In, gpu_Vorticity, gpu_Domain, w, h, nc, n, 0.7, 1);
// copy result back to host (CPU) memory
cudaMemcpy(imgOut, gpu_In, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
cudaMemcpy(imgIn, gpu_In, n * sizeof(float), cudaMemcpyDeviceToHost ); CUDA_CHECK;
// free device (GPU) memory
cudaFree(gpu_Out); CUDA_CHECK;
cudaFree(gpu_In); CUDA_CHECK;
//cudaFree(gpu_initVorticity); CUDA_CHECK;
//cudaFree(gpu_Vorticity); CUDA_CHECK;
//cudaFree(gpu_Domain); CUDA_CHECK;
//if ( j+1 % 10 == 0 ) aniso_diff(imgIn, imgDomain, imgIn, w, h, nc, tau, aniso_iter, grid, block);
}
// Trying to make it run just on GPU
cudaFree(gpu_initVorticity); CUDA_CHECK;
cudaFree(gpu_Vorticity); CUDA_CHECK;
cudaFree(gpu_Domain);CUDA_CHECK;
cudaFree(gpu_v1); CUDA_CHECK;
cudaFree(gpu_v2); CUDA_CHECK;
cudaFree(gpu_U); CUDA_CHECK;
cudaFree(gpu_V); CUDA_CHECK;
inverse_color_transf( imgIn, imgOut, w, h, nc );
timer.end(); float t = timer.get(); // elapsed time in seconds
cout << "time: " << t*1000 << " ms" << endl;
// show input image
//mIn /= 255.f;
showImage("Input", mIn, 100, 100); // show at position (x_from_left=100,y_from_above=100)
//
// // TODO: Just for diagnostic purposes
/* for (int i=0; i<w*h; i++)
{
floatDomain[i] = imgDomain[i]*0.5;
}
convert_layered_to_mat(mOut, floatDomain);
showImage("imgDomain", mOut, 100+w+80, 100);
// show output image: first convert to interleaved opencv format from the layered raw array
convert_layered_to_mat(mOut, imgVorticity);
mOut *=1000;
showImage("Heating", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, imgVorticity);
mOut *=-1000;
showImage("Cooling ", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, v1);
mOut *=1000;
showImage("v1 ", mOut, 100+w+80, 100);
convert_layered_to_mat(mOut, v2);
mOut *=1000;
showImage("v2 ", mOut, 100+w+80, 100);
*/
// show output image: first convert to interleaved opencv format from the layered raw array
convert_layered_to_mat(mOut, imgOut);
//mOut /= 255.f;
showImage("Output", mOut, 100+w+40, 100);
// ### Display your own output images here as needed
#ifdef CAMERA
// end of camera loop
}
#else
// wait for key inputs
cv::waitKey(0);
#endif
// save input and result
cv::imwrite("image_input.png",mIn*255.f); // "imwrite" assumes channel range [0,255]
cv::imwrite("image_result.png",mOut*255.f);
// free allocated arrays
delete[] imgIn;
delete[] imgMask;
delete[] imgVorticity;
delete[] initVorticity;
delete[] initU;
delete[] initV;
delete[] imgDomain;
delete[] floatDomain;
delete[] v1;
delete[] v2;
// close all opencv windows
cvDestroyAllWindows();
return 0;
}
|
91ebc60cabedab1146e1eaf3a81c87ef6f64c336.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "pairwise_transform.h"
__device__ double op(double d1,double d2,double *params) {
return d1 / d2;
}
__device__ double op(double d1,double *params) {
return d1;
}
extern "C"
__global__ void div_strided_double(int n,int xOffset,int yOffset, double *dx, double *dy,int incx,int incy,double *params,double *result) {
transform(n,xOffset,yOffset,dx,dy,incx,incy,params,result);
}
| 91ebc60cabedab1146e1eaf3a81c87ef6f64c336.cu | #include "pairwise_transform.h"
__device__ double op(double d1,double d2,double *params) {
return d1 / d2;
}
__device__ double op(double d1,double *params) {
return d1;
}
extern "C"
__global__ void div_strided_double(int n,int xOffset,int yOffset, double *dx, double *dy,int incx,int incy,double *params,double *result) {
transform(n,xOffset,yOffset,dx,dy,incx,incy,params,result);
}
|
da0c2e6e83c99a28358de2594754ba67b4def9b8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../Common/ImageWriter.cuh"
#include "../Common/Ray.cuh"
#include "../Common/Vector3.cuh"
const int ImageWidth = 1024;
const int ImageHeight = 512;
const int BlockSize = 1;
__host__ __device__
float HitSphere(const Vector3 ¢er, const float radius, const Ray &r)
{
Vector3 oc = r.Origin() - center;
float a = Dot(r.Direction(), r.Direction());
float b = 2.0f * Dot(oc, r.Direction());
float c = Dot(oc, oc) - radius * radius;
float discriminant = b*b - 4.0f*a*c;
if (discriminant < 0.0)
{
return -1.0;
}
else
{
return (-b - sqrt(discriminant))/(2.0f*a);
}
}
__host__ __device__
Vector3 CalculateColor(const Ray &r)
{
const Vector3 sphereCenter(0.0f, 0.0f, -1.0f);
const float sphereRadius = 0.5f;
float t = HitSphere(sphereCenter, sphereRadius, r);
if (t > 0.0)
{
Vector3 normal = UnitVector(r.PointAtParameter(t) - sphereCenter);
normal.MakeUnitVector();
return 0.5 * (normal + Vector3::One());
}
Vector3 unitDirection = UnitVector(r.Direction());
t = 0.5f * (unitDirection.Y() + 1.0f);
t = min(1.0f, max(0.0, t));
return (1.0f - t) * Vector3::One() + t * Vector3(0.5f, 0.7f, 1.0f);
}
__global__
void CalculateImage(int width, int height, Vector3* pixels)
{
const Vector3 lowerLeft(-2.0, -1.0, -1.0);
const Vector3 horizontal(4.0, 0.0, 0.0);
const Vector3 vertical(0.0, 2.0, 0.0);
const Vector3 origin = Vector3::Zero();
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
int numPixels = width * height;
for (int k = index; k < numPixels; k += stride)
{
int j = height - 1 - (k / width);
int i = k % width;
float u = static_cast<float>(i) / static_cast<float>(width);
float v = static_cast<float>(j) / static_cast<float>(height);
Ray ray(origin, lowerLeft + u * horizontal + v * vertical);
pixels[k] = CalculateColor(ray);
}
}
int main(int argc, char** argv)
{
std::string fileName = ImageWriter::GetFileName(argc, argv);
// Allocate Unified Memory accessible from CPU or GPU
int numPixels = ImageWidth*ImageHeight;
Vector3 *pixels;
hipMallocManaged(&pixels, numPixels*sizeof(Vector3));
// Run kernel on the GPU
int numBlocks = (numPixels + BlockSize - 1) / BlockSize;
hipLaunchKernelGGL(( CalculateImage), dim3(numBlocks), dim3(BlockSize), 0, 0, ImageWidth, ImageHeight, pixels);
// Wait for GPU to finish before accessing on host
hipDeviceSynchronize();
ImageWriter::WritePPM(fileName, ImageWidth, ImageHeight, pixels);
// Free memory
hipFree(pixels);
return 0;
} | da0c2e6e83c99a28358de2594754ba67b4def9b8.cu | #include "../Common/ImageWriter.cuh"
#include "../Common/Ray.cuh"
#include "../Common/Vector3.cuh"
const int ImageWidth = 1024;
const int ImageHeight = 512;
const int BlockSize = 1;
__host__ __device__
float HitSphere(const Vector3 ¢er, const float radius, const Ray &r)
{
Vector3 oc = r.Origin() - center;
float a = Dot(r.Direction(), r.Direction());
float b = 2.0f * Dot(oc, r.Direction());
float c = Dot(oc, oc) - radius * radius;
float discriminant = b*b - 4.0f*a*c;
if (discriminant < 0.0)
{
return -1.0;
}
else
{
return (-b - sqrt(discriminant))/(2.0f*a);
}
}
__host__ __device__
Vector3 CalculateColor(const Ray &r)
{
const Vector3 sphereCenter(0.0f, 0.0f, -1.0f);
const float sphereRadius = 0.5f;
float t = HitSphere(sphereCenter, sphereRadius, r);
if (t > 0.0)
{
Vector3 normal = UnitVector(r.PointAtParameter(t) - sphereCenter);
normal.MakeUnitVector();
return 0.5 * (normal + Vector3::One());
}
Vector3 unitDirection = UnitVector(r.Direction());
t = 0.5f * (unitDirection.Y() + 1.0f);
t = min(1.0f, max(0.0, t));
return (1.0f - t) * Vector3::One() + t * Vector3(0.5f, 0.7f, 1.0f);
}
__global__
void CalculateImage(int width, int height, Vector3* pixels)
{
const Vector3 lowerLeft(-2.0, -1.0, -1.0);
const Vector3 horizontal(4.0, 0.0, 0.0);
const Vector3 vertical(0.0, 2.0, 0.0);
const Vector3 origin = Vector3::Zero();
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
int numPixels = width * height;
for (int k = index; k < numPixels; k += stride)
{
int j = height - 1 - (k / width);
int i = k % width;
float u = static_cast<float>(i) / static_cast<float>(width);
float v = static_cast<float>(j) / static_cast<float>(height);
Ray ray(origin, lowerLeft + u * horizontal + v * vertical);
pixels[k] = CalculateColor(ray);
}
}
int main(int argc, char** argv)
{
std::string fileName = ImageWriter::GetFileName(argc, argv);
// Allocate Unified Memory – accessible from CPU or GPU
int numPixels = ImageWidth*ImageHeight;
Vector3 *pixels;
cudaMallocManaged(&pixels, numPixels*sizeof(Vector3));
// Run kernel on the GPU
int numBlocks = (numPixels + BlockSize - 1) / BlockSize;
CalculateImage<<<numBlocks, BlockSize>>>(ImageWidth, ImageHeight, pixels);
// Wait for GPU to finish before accessing on host
cudaDeviceSynchronize();
ImageWriter::WritePPM(fileName, ImageWidth, ImageHeight, pixels);
// Free memory
cudaFree(pixels);
return 0;
} |
6914ac8083c96504f5d1e88549b051349887b5fa.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0
// DeepSpeed Team
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <cmath>
#include "ATen/ATen.h"
#include "ATen/TensorUtils.h"
#include "ATen/hip/HIPContext.h"
#include "ATen/hip/detail/IndexUtils.cuh"
// #include "ATen/Type.h"
#include "ATen/AccumulateType.h"
#include <iostream>
// #include <helper_functions.h>
#if defined(__HIP_PLATFORM_HCC__) && HIP_VERSION > 305
#include <hip/hip_cooperative_groups.h>
#else
#include <hip/hip_cooperative_groups.h>
#endif
#include <hip/hip_runtime_api.h>
#include <stdio.h>
namespace cg = cooperative_groups;
// Utility class used to avoid linker errors with extern
// unsized shared memory arrays with templated type
namespace {
// This is the un-specialized struct. Note that we prevent instantiation of this
// struct by putting an undefined symbol in the function body so it won't compile.
template <typename T>
struct SharedMemory {
// Ensure that we won't compile any un-specialized types
__device__ inline operator T*()
{
#ifndef _WIN32
extern __device__ void error(void);
error();
#endif
return NULL;
}
};
template <>
struct SharedMemory<float> {
__device__ inline operator float*()
{
extern __shared__ float s_float[];
return s_float;
}
};
template <>
struct SharedMemory<double> {
__device__ inline operator double*()
{
extern __shared__ double s_double[];
return s_double;
}
};
} // namespace
#include "type_shim.h"
typedef enum {
ADAM_MODE_0 = 0, // eps under square root
ADAM_MODE_1 = 1 // eps outside square root
} adamMode_t;
// s_a and s_b are in shared memory
// g_a and g_b are in shared memory
template <typename T, int blockSize>
__device__ void reduce_block_in_shared_memory(T* s_a, T* s_b, T* g_a, T* g_b)
{
// Handle to thread block group
cg::thread_block cta = cg::this_thread_block();
// perform block reduction in shared memory,
unsigned int tid = cta.thread_rank();
T a_sum = s_a[tid];
T b_sum = s_b[tid];
cg::sync(cta);
// do reduction in shared mem
if ((blockSize >= 512) && (tid < 256)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 256];
s_b[tid] = b_sum = b_sum + s_b[tid + 256];
}
cg::sync(cta);
if ((blockSize >= 256) && (tid < 128)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 128];
s_b[tid] = b_sum = b_sum + s_b[tid + 128];
}
cg::sync(cta);
if ((blockSize >= 128) && (tid < 64)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 64];
s_b[tid] = b_sum = b_sum + s_b[tid + 64];
}
cg::sync(cta);
#if (__CUDA_ARCH__ >= 300) || (defined(__HIP_PLATFORM_HCC__) && HIP_VERSION >= 502)
if (tid < 32) {
cg::coalesced_group active = cg::coalesced_threads();
// Fetch final intermediate sum from 2nd warp
if (blockSize >= 64) {
a_sum = a_sum + s_a[tid + 32];
b_sum = b_sum + s_b[tid + 32];
}
// Reduce final warp using shuffle
for (int offset = warpSize / 2; offset > 0; offset /= 2) {
a_sum += active.shfl_down(a_sum, offset);
b_sum += active.shfl_down(b_sum, offset);
}
}
#else
if ((blockSize >= 64) && (tid < 32)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 32];
s_b[tid] = b_sum = b_sum + s_b[tid + 32];
}
cg::sync(cta);
if ((blockSize >= 32) && (tid < 16)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 16];
s_b[tid] = b_sum = b_sum + s_b[tid + 16];
}
cg::sync(cta);
if ((blockSize >= 16) && (tid < 8)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 8];
s_b[tid] = b_sum = b_sum + s_b[tid + 8];
}
cg::sync(cta);
if ((blockSize >= 8) && (tid < 4)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 4];
s_b[tid] = b_sum = b_sum + s_b[tid + 4];
}
cg::sync(cta);
if ((blockSize >= 4) && (tid < 2)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 2];
s_b[tid] = b_sum = b_sum + s_b[tid + 2];
}
cg::sync(cta);
if ((blockSize >= 2) && (tid < 1)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 1];
s_b[tid] = b_sum = b_sum + s_b[tid + 1];
}
cg::sync(cta);
#endif
// write result for this block to global mem
if (tid == 0) {
g_a[blockIdx.x] = (T)a_sum;
g_b[blockIdx.x] = (T)b_sum;
}
}
template <typename T, int blockSize>
__device__ void reduce_two_vectors_in_register(T a, T b, T* g_a, T* g_b)
{
const int threadIdInBlock = cg::this_thread_block().thread_rank();
T* s_a = SharedMemory<T>();
T* s_b = SharedMemory<T>() + cg::this_thread_block().size();
s_a[threadIdInBlock] = a;
s_b[threadIdInBlock] = b;
reduce_block_in_shared_memory<T, blockSize>(s_a, s_b, g_a, g_b);
}
template <typename T, typename GRAD_T, int blockSize>
__global__ void lamb_cuda_kernel_part1(
T* __restrict__ p,
GRAD_T* __restrict__ p_copy, // For mixed precision training, pass NULL if not needed
T* __restrict__ m,
T* __restrict__ v,
const GRAD_T* __restrict__ g,
const float b1,
const float b2,
const float eps,
const float grad_scale,
const float step_size,
const size_t tsize,
adamMode_t mode,
const float decay,
T* __restrict__ w_l2_i,
T* __restrict__ u_l2_i)
{
// Assuming 2D grids and 2D blocks
const int blockId = gridDim.x * blockIdx.y + blockIdx.x;
const int threadsPerBlock = blockDim.x * blockDim.y;
const int threadIdInBlock = cg::this_thread_block().thread_rank();
const int i = (blockId * threadsPerBlock + threadIdInBlock);
const int totThreads = gridDim.x * gridDim.y * threadsPerBlock;
T reg_w = 0;
T reg_u = 0;
for (int j = i; j < tsize; j += totThreads) {
T scaled_grad = g[j] / grad_scale;
T pj = p[j];
m[j] = b1 * m[j] + (1 - b1) * scaled_grad;
v[j] = b2 * v[j] + (1 - b2) * scaled_grad * scaled_grad;
float denom;
if (mode == ADAM_MODE_0)
denom = sqrtf(v[j] + eps);
else // Mode 1
denom = sqrtf(v[j]) + eps;
T update = (m[j] / denom) + (decay * p[j]);
reg_u += update * update;
reg_w += pj * pj;
}
reduce_two_vectors_in_register<T, blockSize>(reg_w, reg_u, w_l2_i, u_l2_i);
}
template <typename T, typename GRAD_T, int blockSize>
__global__ void lamb_cuda_kernel_part2(const size_t tsize, T* __restrict__ g_a, T* __restrict__ g_b)
{
T* s_a = SharedMemory<T>();
T* s_b = SharedMemory<T>() + cg::this_thread_block().size();
const int threadIdInBlock = cg::this_thread_block().thread_rank();
s_a[threadIdInBlock] = g_a[threadIdInBlock];
s_b[threadIdInBlock] = g_b[threadIdInBlock];
if (threadIdInBlock >= tsize) {
s_a[threadIdInBlock] = 0.0;
s_b[threadIdInBlock] = 0.0;
}
reduce_block_in_shared_memory<T, blockSize>(s_a, s_b, g_a, g_b);
}
template <typename T, typename GRAD_T>
__global__ void lamb_cuda_kernel_part3(
T* __restrict__ p,
GRAD_T* __restrict__ p_copy, // For mixed precision training, pass NULL if not needed
T* __restrict__ m,
T* __restrict__ v,
const GRAD_T* __restrict__ g,
const float b1,
const float b2,
const float max_coeff,
const float min_coeff,
const float eps,
const float grad_scale,
const float step_size,
const size_t tsize,
adamMode_t mode,
const float decay,
T* __restrict__ w_l2_i,
T* __restrict__ u_l2_i,
T* __restrict__ lamb_coeff_val)
{
// Assuming 2D grids and 2D blocks
const int blockId = gridDim.x * blockIdx.y + blockIdx.x;
const int threadsPerBlock = blockDim.x * blockDim.y;
const int threadIdInBlock = cg::this_thread_block().thread_rank();
const int i = (blockId * threadsPerBlock + threadIdInBlock);
const int totThreads = gridDim.x * gridDim.y * threadsPerBlock;
T reg_w = sqrtf(w_l2_i[0]);
T reg_u = sqrtf(u_l2_i[0]);
float lamb_coeff = 1.0;
if (reg_w != 0 && reg_u != 0) {
lamb_coeff = reg_w / reg_u;
if (lamb_coeff > max_coeff) { lamb_coeff = max_coeff; }
if (lamb_coeff < min_coeff) { lamb_coeff = min_coeff; }
}
if (blockId == 0 && threadIdInBlock == 0) {
lamb_coeff_val[0] = lamb_coeff;
// printf("Cuda Lamb Coeff is %.6f \n",lamb_coeff);
}
for (int j = i; j < tsize; j += totThreads) {
T pj = (float)p[j];
T mj = m[j];
T vj = v[j];
float denom;
if (mode == ADAM_MODE_0)
denom = sqrtf(vj + eps);
else // Mode 1
denom = sqrtf(vj) + eps;
T update = (mj / denom) + (decay * pj);
pj = pj - (step_size * lamb_coeff * update);
p[j] = pj;
if (p_copy != NULL) p_copy[j] = (GRAD_T)pj;
}
}
void fused_lamb_cuda(at::Tensor& p,
at::Tensor& p_copy,
at::Tensor& m,
at::Tensor& v,
at::Tensor& g,
float lr,
float beta1,
float beta2,
float max_coeff,
float min_coeff,
float eps,
float grad_scale,
int step,
int mode,
int bias_correction,
float decay,
at::Tensor& w_l2_i,
at::Tensor& u_l2_i,
at::Tensor& lamb_coeff)
{
// using namespace at;
// Get tensor size
int tsize = p.numel();
// Determine #threads and #blocks
const int threadsPerBlock = 512;
int num_blocks = (tsize + threadsPerBlock - 1) / threadsPerBlock;
if (num_blocks > 512) num_blocks = 512;
int smemsize = 0;
if (p.type().scalarType() == at::ScalarType::Double)
smemsize = 2 * threadsPerBlock * sizeof(double);
else
smemsize = 2 * threadsPerBlock * sizeof(float);
const dim3 blocks(num_blocks);
const dim3 threads(threadsPerBlock);
AT_ASSERTM(at::cuda::detail::canUse32BitIndexMath(p),
"parameter tensor is too large to be indexed with int32");
// Constants
float step_size = 0;
if (bias_correction == 1) {
const float bias_correction1 = 1 - ::pow(beta1, step);
const float bias_correction2 = 1 - ::pow(beta2, step);
step_size = lr * std::sqrt(bias_correction2) / bias_correction1;
} else {
step_size = lr;
}
hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
if (g.type().scalarType() == at::ScalarType::Half) {
// all other values should be fp32 for half gradients
AT_ASSERTM(p.type().scalarType() == at::ScalarType::Float,
"expected parameter to be of float type");
// dispatch is done on the gradient type
using namespace at; // prevents "toString is undefined" errors
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
g.scalar_type(), "lamb_cuda_kernel", ([&] {
using accscalar_t = at::acc_type<scalar_t, true>;
hipLaunchKernelGGL(( lamb_cuda_kernel_part1<accscalar_t, scalar_t, threadsPerBlock>)
, dim3(blocks), dim3(threadsPerBlock), smemsize, stream,
p.data<accscalar_t>(),
p_copy.numel() ? p_copy.data<scalar_t>() : NULL,
m.data<accscalar_t>(),
v.data<accscalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<accscalar_t>(),
u_l2_i.data<accscalar_t>());
hipLaunchKernelGGL(( lamb_cuda_kernel_part2<accscalar_t, scalar_t, threadsPerBlock>)
, dim3(1), dim3(threadsPerBlock), smemsize, stream,
num_blocks, w_l2_i.data<accscalar_t>(), u_l2_i.data<accscalar_t>());
hipLaunchKernelGGL(( lamb_cuda_kernel_part3<accscalar_t, scalar_t>)
, dim3(blocks), dim3(threadsPerBlock), smemsize, stream,
p.data<accscalar_t>(),
p_copy.numel() ? p_copy.data<scalar_t>() : NULL,
m.data<accscalar_t>(),
v.data<accscalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
max_coeff,
min_coeff,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<accscalar_t>(),
u_l2_i.data<accscalar_t>(),
lamb_coeff.data<accscalar_t>());
}));
} else {
using namespace at;
AT_DISPATCH_FLOATING_TYPES(
g.scalar_type(), "lamb_cuda_kernel", ([&] {
hipLaunchKernelGGL(( lamb_cuda_kernel_part1<scalar_t, scalar_t, threadsPerBlock>)
, dim3(blocks), dim3(threadsPerBlock), smemsize, stream,
p.data<scalar_t>(),
NULL, // don't output p_copy for fp32, it's wasted write
m.data<scalar_t>(),
v.data<scalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<scalar_t>(),
u_l2_i.data<scalar_t>());
hipLaunchKernelGGL(( lamb_cuda_kernel_part2<scalar_t, scalar_t, threadsPerBlock>)
, dim3(1), dim3(threadsPerBlock), smemsize, stream,
num_blocks, w_l2_i.data<scalar_t>(), u_l2_i.data<scalar_t>());
hipLaunchKernelGGL(( lamb_cuda_kernel_part3<scalar_t, scalar_t>)
, dim3(blocks), dim3(threadsPerBlock), smemsize, stream,
p.data<scalar_t>(),
NULL, // don't output p_copy for fp32, it's wasted write
m.data<scalar_t>(),
v.data<scalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
max_coeff,
min_coeff,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<scalar_t>(),
u_l2_i.data<scalar_t>(),
lamb_coeff.data<scalar_t>());
}));
}
C10_HIP_CHECK(hipGetLastError());
}
// template __device__ void reduce_two_vectors_in_register<float,512>(float a, float b, float* g_a,
// float* g_b, cg::grid_group &cgg);
| 6914ac8083c96504f5d1e88549b051349887b5fa.cu | // Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0
// DeepSpeed Team
#include <cuda.h>
#include <cuda_runtime.h>
#include <stdio.h>
#include <cmath>
#include "ATen/ATen.h"
#include "ATen/TensorUtils.h"
#include "ATen/cuda/CUDAContext.h"
#include "ATen/cuda/detail/IndexUtils.cuh"
// #include "ATen/Type.h"
#include "ATen/AccumulateType.h"
#include <iostream>
// #include <helper_functions.h>
#if defined(__HIP_PLATFORM_HCC__) && HIP_VERSION > 305
#include <hip/hip_cooperative_groups.h>
#else
#include <cooperative_groups.h>
#endif
#include <cuda_runtime_api.h>
#include <stdio.h>
namespace cg = cooperative_groups;
// Utility class used to avoid linker errors with extern
// unsized shared memory arrays with templated type
namespace {
// This is the un-specialized struct. Note that we prevent instantiation of this
// struct by putting an undefined symbol in the function body so it won't compile.
template <typename T>
struct SharedMemory {
// Ensure that we won't compile any un-specialized types
__device__ inline operator T*()
{
#ifndef _WIN32
extern __device__ void error(void);
error();
#endif
return NULL;
}
};
template <>
struct SharedMemory<float> {
__device__ inline operator float*()
{
extern __shared__ float s_float[];
return s_float;
}
};
template <>
struct SharedMemory<double> {
__device__ inline operator double*()
{
extern __shared__ double s_double[];
return s_double;
}
};
} // namespace
#include "type_shim.h"
typedef enum {
ADAM_MODE_0 = 0, // eps under square root
ADAM_MODE_1 = 1 // eps outside square root
} adamMode_t;
// s_a and s_b are in shared memory
// g_a and g_b are in shared memory
template <typename T, int blockSize>
__device__ void reduce_block_in_shared_memory(T* s_a, T* s_b, T* g_a, T* g_b)
{
// Handle to thread block group
cg::thread_block cta = cg::this_thread_block();
// perform block reduction in shared memory,
unsigned int tid = cta.thread_rank();
T a_sum = s_a[tid];
T b_sum = s_b[tid];
cg::sync(cta);
// do reduction in shared mem
if ((blockSize >= 512) && (tid < 256)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 256];
s_b[tid] = b_sum = b_sum + s_b[tid + 256];
}
cg::sync(cta);
if ((blockSize >= 256) && (tid < 128)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 128];
s_b[tid] = b_sum = b_sum + s_b[tid + 128];
}
cg::sync(cta);
if ((blockSize >= 128) && (tid < 64)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 64];
s_b[tid] = b_sum = b_sum + s_b[tid + 64];
}
cg::sync(cta);
#if (__CUDA_ARCH__ >= 300) || (defined(__HIP_PLATFORM_HCC__) && HIP_VERSION >= 502)
if (tid < 32) {
cg::coalesced_group active = cg::coalesced_threads();
// Fetch final intermediate sum from 2nd warp
if (blockSize >= 64) {
a_sum = a_sum + s_a[tid + 32];
b_sum = b_sum + s_b[tid + 32];
}
// Reduce final warp using shuffle
for (int offset = warpSize / 2; offset > 0; offset /= 2) {
a_sum += active.shfl_down(a_sum, offset);
b_sum += active.shfl_down(b_sum, offset);
}
}
#else
if ((blockSize >= 64) && (tid < 32)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 32];
s_b[tid] = b_sum = b_sum + s_b[tid + 32];
}
cg::sync(cta);
if ((blockSize >= 32) && (tid < 16)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 16];
s_b[tid] = b_sum = b_sum + s_b[tid + 16];
}
cg::sync(cta);
if ((blockSize >= 16) && (tid < 8)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 8];
s_b[tid] = b_sum = b_sum + s_b[tid + 8];
}
cg::sync(cta);
if ((blockSize >= 8) && (tid < 4)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 4];
s_b[tid] = b_sum = b_sum + s_b[tid + 4];
}
cg::sync(cta);
if ((blockSize >= 4) && (tid < 2)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 2];
s_b[tid] = b_sum = b_sum + s_b[tid + 2];
}
cg::sync(cta);
if ((blockSize >= 2) && (tid < 1)) {
s_a[tid] = a_sum = a_sum + s_a[tid + 1];
s_b[tid] = b_sum = b_sum + s_b[tid + 1];
}
cg::sync(cta);
#endif
// write result for this block to global mem
if (tid == 0) {
g_a[blockIdx.x] = (T)a_sum;
g_b[blockIdx.x] = (T)b_sum;
}
}
template <typename T, int blockSize>
__device__ void reduce_two_vectors_in_register(T a, T b, T* g_a, T* g_b)
{
const int threadIdInBlock = cg::this_thread_block().thread_rank();
T* s_a = SharedMemory<T>();
T* s_b = SharedMemory<T>() + cg::this_thread_block().size();
s_a[threadIdInBlock] = a;
s_b[threadIdInBlock] = b;
reduce_block_in_shared_memory<T, blockSize>(s_a, s_b, g_a, g_b);
}
template <typename T, typename GRAD_T, int blockSize>
__global__ void lamb_cuda_kernel_part1(
T* __restrict__ p,
GRAD_T* __restrict__ p_copy, // For mixed precision training, pass NULL if not needed
T* __restrict__ m,
T* __restrict__ v,
const GRAD_T* __restrict__ g,
const float b1,
const float b2,
const float eps,
const float grad_scale,
const float step_size,
const size_t tsize,
adamMode_t mode,
const float decay,
T* __restrict__ w_l2_i,
T* __restrict__ u_l2_i)
{
// Assuming 2D grids and 2D blocks
const int blockId = gridDim.x * blockIdx.y + blockIdx.x;
const int threadsPerBlock = blockDim.x * blockDim.y;
const int threadIdInBlock = cg::this_thread_block().thread_rank();
const int i = (blockId * threadsPerBlock + threadIdInBlock);
const int totThreads = gridDim.x * gridDim.y * threadsPerBlock;
T reg_w = 0;
T reg_u = 0;
for (int j = i; j < tsize; j += totThreads) {
T scaled_grad = g[j] / grad_scale;
T pj = p[j];
m[j] = b1 * m[j] + (1 - b1) * scaled_grad;
v[j] = b2 * v[j] + (1 - b2) * scaled_grad * scaled_grad;
float denom;
if (mode == ADAM_MODE_0)
denom = sqrtf(v[j] + eps);
else // Mode 1
denom = sqrtf(v[j]) + eps;
T update = (m[j] / denom) + (decay * p[j]);
reg_u += update * update;
reg_w += pj * pj;
}
reduce_two_vectors_in_register<T, blockSize>(reg_w, reg_u, w_l2_i, u_l2_i);
}
template <typename T, typename GRAD_T, int blockSize>
__global__ void lamb_cuda_kernel_part2(const size_t tsize, T* __restrict__ g_a, T* __restrict__ g_b)
{
T* s_a = SharedMemory<T>();
T* s_b = SharedMemory<T>() + cg::this_thread_block().size();
const int threadIdInBlock = cg::this_thread_block().thread_rank();
s_a[threadIdInBlock] = g_a[threadIdInBlock];
s_b[threadIdInBlock] = g_b[threadIdInBlock];
if (threadIdInBlock >= tsize) {
s_a[threadIdInBlock] = 0.0;
s_b[threadIdInBlock] = 0.0;
}
reduce_block_in_shared_memory<T, blockSize>(s_a, s_b, g_a, g_b);
}
template <typename T, typename GRAD_T>
__global__ void lamb_cuda_kernel_part3(
T* __restrict__ p,
GRAD_T* __restrict__ p_copy, // For mixed precision training, pass NULL if not needed
T* __restrict__ m,
T* __restrict__ v,
const GRAD_T* __restrict__ g,
const float b1,
const float b2,
const float max_coeff,
const float min_coeff,
const float eps,
const float grad_scale,
const float step_size,
const size_t tsize,
adamMode_t mode,
const float decay,
T* __restrict__ w_l2_i,
T* __restrict__ u_l2_i,
T* __restrict__ lamb_coeff_val)
{
// Assuming 2D grids and 2D blocks
const int blockId = gridDim.x * blockIdx.y + blockIdx.x;
const int threadsPerBlock = blockDim.x * blockDim.y;
const int threadIdInBlock = cg::this_thread_block().thread_rank();
const int i = (blockId * threadsPerBlock + threadIdInBlock);
const int totThreads = gridDim.x * gridDim.y * threadsPerBlock;
T reg_w = sqrtf(w_l2_i[0]);
T reg_u = sqrtf(u_l2_i[0]);
float lamb_coeff = 1.0;
if (reg_w != 0 && reg_u != 0) {
lamb_coeff = reg_w / reg_u;
if (lamb_coeff > max_coeff) { lamb_coeff = max_coeff; }
if (lamb_coeff < min_coeff) { lamb_coeff = min_coeff; }
}
if (blockId == 0 && threadIdInBlock == 0) {
lamb_coeff_val[0] = lamb_coeff;
// printf("Cuda Lamb Coeff is %.6f \n",lamb_coeff);
}
for (int j = i; j < tsize; j += totThreads) {
T pj = (float)p[j];
T mj = m[j];
T vj = v[j];
float denom;
if (mode == ADAM_MODE_0)
denom = sqrtf(vj + eps);
else // Mode 1
denom = sqrtf(vj) + eps;
T update = (mj / denom) + (decay * pj);
pj = pj - (step_size * lamb_coeff * update);
p[j] = pj;
if (p_copy != NULL) p_copy[j] = (GRAD_T)pj;
}
}
void fused_lamb_cuda(at::Tensor& p,
at::Tensor& p_copy,
at::Tensor& m,
at::Tensor& v,
at::Tensor& g,
float lr,
float beta1,
float beta2,
float max_coeff,
float min_coeff,
float eps,
float grad_scale,
int step,
int mode,
int bias_correction,
float decay,
at::Tensor& w_l2_i,
at::Tensor& u_l2_i,
at::Tensor& lamb_coeff)
{
// using namespace at;
// Get tensor size
int tsize = p.numel();
// Determine #threads and #blocks
const int threadsPerBlock = 512;
int num_blocks = (tsize + threadsPerBlock - 1) / threadsPerBlock;
if (num_blocks > 512) num_blocks = 512;
int smemsize = 0;
if (p.type().scalarType() == at::ScalarType::Double)
smemsize = 2 * threadsPerBlock * sizeof(double);
else
smemsize = 2 * threadsPerBlock * sizeof(float);
const dim3 blocks(num_blocks);
const dim3 threads(threadsPerBlock);
AT_ASSERTM(at::cuda::detail::canUse32BitIndexMath(p),
"parameter tensor is too large to be indexed with int32");
// Constants
float step_size = 0;
if (bias_correction == 1) {
const float bias_correction1 = 1 - std::pow(beta1, step);
const float bias_correction2 = 1 - std::pow(beta2, step);
step_size = lr * std::sqrt(bias_correction2) / bias_correction1;
} else {
step_size = lr;
}
cudaStream_t stream = at::cuda::getCurrentCUDAStream();
if (g.type().scalarType() == at::ScalarType::Half) {
// all other values should be fp32 for half gradients
AT_ASSERTM(p.type().scalarType() == at::ScalarType::Float,
"expected parameter to be of float type");
// dispatch is done on the gradient type
using namespace at; // prevents "toString is undefined" errors
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
g.scalar_type(), "lamb_cuda_kernel", ([&] {
using accscalar_t = at::acc_type<scalar_t, true>;
lamb_cuda_kernel_part1<accscalar_t, scalar_t, threadsPerBlock>
<<<blocks, threadsPerBlock, smemsize, stream>>>(
p.data<accscalar_t>(),
p_copy.numel() ? p_copy.data<scalar_t>() : NULL,
m.data<accscalar_t>(),
v.data<accscalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<accscalar_t>(),
u_l2_i.data<accscalar_t>());
lamb_cuda_kernel_part2<accscalar_t, scalar_t, threadsPerBlock>
<<<1, threadsPerBlock, smemsize, stream>>>(
num_blocks, w_l2_i.data<accscalar_t>(), u_l2_i.data<accscalar_t>());
lamb_cuda_kernel_part3<accscalar_t, scalar_t>
<<<blocks, threadsPerBlock, smemsize, stream>>>(
p.data<accscalar_t>(),
p_copy.numel() ? p_copy.data<scalar_t>() : NULL,
m.data<accscalar_t>(),
v.data<accscalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
max_coeff,
min_coeff,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<accscalar_t>(),
u_l2_i.data<accscalar_t>(),
lamb_coeff.data<accscalar_t>());
}));
} else {
using namespace at;
AT_DISPATCH_FLOATING_TYPES(
g.scalar_type(), "lamb_cuda_kernel", ([&] {
lamb_cuda_kernel_part1<scalar_t, scalar_t, threadsPerBlock>
<<<blocks, threadsPerBlock, smemsize, stream>>>(
p.data<scalar_t>(),
NULL, // don't output p_copy for fp32, it's wasted write
m.data<scalar_t>(),
v.data<scalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<scalar_t>(),
u_l2_i.data<scalar_t>());
lamb_cuda_kernel_part2<scalar_t, scalar_t, threadsPerBlock>
<<<1, threadsPerBlock, smemsize, stream>>>(
num_blocks, w_l2_i.data<scalar_t>(), u_l2_i.data<scalar_t>());
lamb_cuda_kernel_part3<scalar_t, scalar_t>
<<<blocks, threadsPerBlock, smemsize, stream>>>(
p.data<scalar_t>(),
NULL, // don't output p_copy for fp32, it's wasted write
m.data<scalar_t>(),
v.data<scalar_t>(),
g.data<scalar_t>(),
beta1,
beta2,
max_coeff,
min_coeff,
eps,
grad_scale,
step_size,
tsize,
(adamMode_t)mode,
decay,
w_l2_i.data<scalar_t>(),
u_l2_i.data<scalar_t>(),
lamb_coeff.data<scalar_t>());
}));
}
C10_CUDA_CHECK(cudaGetLastError());
}
// template __device__ void reduce_two_vectors_in_register<float,512>(float a, float b, float* g_a,
// float* g_b, cg::grid_group &cgg);
|
00c8852f6af89a0ef725e3ab3347a8f5992b2161.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "helper.hpp"
/******************************************************************************
GPU main computation kernels
*******************************************************************************/
__global__ void gpu_normal_kernel(float *in_val, float *in_pos, float *out,
int grid_size, int num_in) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
float result = 0;
if (idx < grid_size){
for (int i = 0;i < num_in;i++){
const float dist = in_pos[i] - idx;
result += in_val[i] * in_val[i] / (dist * dist);
}
out[idx] = result;
}
}
__global__ void gpu_cutoff_kernel(float *in_val, float *in_pos, float *out,
int grid_size, int num_in,
float cutoff2) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
float result = 0;
if (idx < grid_size){
for (int i = 0;i < num_in;i++){
const float dist = in_pos[i] - idx;
const float dist2 = dist * dist;
if (dist2 >= cutoff2)
continue;
result += in_val[i] * in_val[i] / dist2;
}
out[idx] = result;
}
}
// Ver 1.0
// __global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
// float *in_val_sorted,
// float *in_pos_sorted, float *out,
// int grid_size, float cutoff) {
// //@@ INSERT CODE HERE
// #define BLOCK_SIZE 512
// const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
// const int idx = tx + bx * bs;
// if (idx < grid_size){
// const int cutoff2 = cutoff * cutoff;
// float result = 0;
// // Calculate neighborhood offset for one thread(one lattice point)
// const int max_thread_binIdx = idx + cutoff < grid_size ? (int) ((idx + cutoff) / grid_size * NUM_BINS) : NUM_BINS-1;
// const int min_thread_binIdx = idx - cutoff >= 0 ? (int) ((idx - cutoff) / grid_size * NUM_BINS) : 0;
// const int max_thread_inIdx = bin_ptrs[max_thread_binIdx + 1];
// const int min_thread_inIdx = bin_ptrs[min_thread_binIdx];
// // Compute
// for (int j = min_thread_inIdx;j < max_thread_inIdx;j++){
// const float dist2 = (idx - in_pos_sorted[j]) * (idx - in_pos_sorted[j]);
// if (dist2 <= cutoff2)
// result += in_val_sorted[j] * in_val_sorted[j] / dist2;
// }
// out[idx] = result;
// }
// #undef BLOCK_SIZE
// }
// Ver 2.0
// __global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
// float *in_val_sorted,
// float *in_pos_sorted, float *out,
// int grid_size, float cutoff) {
// //@@ INSERT CODE HERE
// #define BLOCK_SIZE 512
// __shared__ float shared_pos[BLOCK_SIZE];
// __shared__ float shared_val[BLOCK_SIZE];
// const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
// const int idx = tx + bx * bs;
// const int cutoff2 = cutoff * cutoff;
// float result = 0;
// // Locate possible bin index, same as neighborhood offset list in 2D/3D
// const float upper = (bx + 1) * bs + cutoff - 1;
// const float lower = bx * bs - cutoff;
// const int max_binIdx = upper < grid_size ? (int) (upper / grid_size * NUM_BINS) : NUM_BINS-1;
// const int min_binIdx = lower >= 0 ? (int) (lower / grid_size * NUM_BINS) : 0;
// const int max_inIdx = bin_ptrs[max_binIdx + 1];
// const int min_inIdx = bin_ptrs[min_binIdx];
// // Collaboratively load one valid bins into shared memory and compute result correspondingly
// for (int i = min_inIdx;i < max_inIdx;i += bs){
// // Load
// if (tx + i < max_inIdx){
// shared_pos[tx] = in_pos_sorted[tx + i];
// shared_val[tx] = in_val_sorted[tx + i];
// }
// else{
// shared_pos[tx] = -1;
// shared_val[tx] = 0;
// }
// __syncthreads();
// // Compute
// for (int j = 0;j < bs;j++){
// const float dist2 = (idx - shared_pos[j]) * (idx - shared_pos[j]);
// if (dist2 <= cutoff2)
// result += shared_val[j] * shared_val[j] / dist2;
// }
// __syncthreads();
// }
// if (idx < grid_size)
// out[idx] = result;
// #undef BLOCK_SIZE
// }
// Ver 3.0
__global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
float *in_val_sorted,
float *in_pos_sorted, float *out,
int grid_size, float cutoff) {
//@@ INSERT CODE HERE
#define BLOCK_SIZE 512
__shared__ float shared_pos[BLOCK_SIZE];
__shared__ float shared_val[BLOCK_SIZE];
const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
const int idx = tx + bx * bs;
const int cutoff2 = cutoff * cutoff;
float result = 0;
// Locate possible bin index, same as neighborhood offset list in 2D/3D
const float upper = (bx + 1) * bs + cutoff - 1;
const float lower = bx * bs - cutoff;
const int max_binIdx = upper < grid_size ? (int) (upper / grid_size * NUM_BINS) : NUM_BINS-1;
const int min_binIdx = lower >= 0 ? (int) (lower / grid_size * NUM_BINS) : 0;
const int max_inIdx = bin_ptrs[max_binIdx + 1];
const int min_inIdx = bin_ptrs[min_binIdx];
// Calculate neighborhood offset for one thread
const int max_thread_binIdx = idx + cutoff < grid_size ? (int) ((idx + cutoff) / grid_size * NUM_BINS) : NUM_BINS-1;
const int min_thread_binIdx = idx - cutoff >= 0 ? (int) ((idx - cutoff) / grid_size * NUM_BINS) : 0;
const int max_thread_inIdx = bin_ptrs[max_thread_binIdx + 1];
const int min_thread_inIdx = bin_ptrs[min_thread_binIdx];
// Collaboratively load one valid bins into shared memory and compute result correspondingly
for (int i = min_inIdx;i < max_inIdx;i += bs){
// Load
if (tx + i < max_inIdx){
shared_pos[tx] = in_pos_sorted[tx + i];
shared_val[tx] = in_val_sorted[tx + i];
}
else{
shared_pos[tx] = -1;
shared_val[tx] = 0;
}
__syncthreads();
// Compute
// Calculate the index range each thread(grid point) needs to compute
// This version is much faster than the one above, it reduces many unnaccessary computation.
const int start = max(min_thread_inIdx - i, 0);
const int end = max(0, min(max_thread_inIdx - i, BLOCK_SIZE));
for (int j = start;j < end;j++){
const float dist2 = (idx - shared_pos[j]) * (idx - shared_pos[j]);
if (dist2 <= cutoff2)
result += shared_val[j] * shared_val[j] / dist2;
}
__syncthreads();
}
if (idx < grid_size)
out[idx] = result;
#undef BLOCK_SIZE
}
/******************************************************************************
Main computation functions
*******************************************************************************/
void cpu_normal(float *in_val, float *in_pos, float *out, int grid_size,
int num_in) {
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const float in_val2 = in_val[inIdx] * in_val[inIdx];
for (int outIdx = 0; outIdx < grid_size; ++outIdx) {
const float dist = in_pos[inIdx] - (float)outIdx;
out[outIdx] += in_val2 / (dist * dist);
}
}
}
void gpu_normal(float *in_val, float *in_pos, float *out, int grid_size,
int num_in) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
hipLaunchKernelGGL(( gpu_normal_kernel), dim3(numBlocks), dim3(numThreadsPerBlock), 0, 0, in_val, in_pos, out,
grid_size, num_in);
}
void gpu_cutoff(float *in_val, float *in_pos, float *out, int grid_size,
int num_in, float cutoff2) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
hipLaunchKernelGGL(( gpu_cutoff_kernel), dim3(numBlocks), dim3(numThreadsPerBlock), 0, 0,
in_val, in_pos, out, grid_size, num_in, cutoff2);
}
void gpu_cutoff_binned(int *bin_ptrs, float *in_val_sorted,
float *in_pos_sorted, float *out, int grid_size,
float cutoff) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
hipLaunchKernelGGL(( gpu_cutoff_binned_kernel), dim3(numBlocks), dim3(numThreadsPerBlock), 0, 0,
bin_ptrs, in_val_sorted, in_pos_sorted, out, grid_size, cutoff);
}
/******************************************************************************
Preprocessing kernels
*******************************************************************************/
// Ver 1.0
// __global__ void histogram(float *in_pos, int *bin_counts, int num_in,
// int grid_size) {
// //@@ INSERT CODE HERE
// // NUM_BINS = 1024 BLOCK_SIZE = 512
// const int idx = threadIdx.x + blockIdx.x * blockDim.x;
// if (idx < num_in){
// const int binIdx = (int) (in_pos[idx] / grid_size * NUM_BINS);
// atomicAdd(&(bin_counts[binIdx]), 1);
// }
// }
// Ver 2.0
__global__ void histogram(float *in_pos, int *bin_counts, int num_in,
int grid_size) {
//@@ INSERT CODE HERE
// NUM_BINS = 1024 BLOCK_SIZE = 512
__shared__ float share_bin_counts[NUM_BINS];
const int tx = threadIdx.x;
const int bs = blockDim.x;
const int idx = tx + blockIdx.x * bs;
// Is it faster?
// Use shared memory reduce conflicts, but the global memory access per block
// increases from 512 to 1024. We also have to add two sycthreads().
// For some test cases, num_in / grid_size = 40, which is a large number,
// conflict accesses will be frequent. It might be a good idea to use shared memory
// But for some small num_in / grid_size, it is definitely not worth it.
// Initialize local hist
share_bin_counts[tx] = 0;
share_bin_counts[tx + bs] = 0;
__syncthreads();
if (idx < num_in){
const int binIdx = (int) ((in_pos[idx] / grid_size) * NUM_BINS);
atomicAdd(&(share_bin_counts[binIdx]), 1);
}
__syncthreads();
atomicAdd(&(bin_counts[tx]), share_bin_counts[tx]);
atomicAdd(&(bin_counts[tx + bs]), share_bin_counts[tx + bs]);
}
// __global__ void scan(int *bin_counts, int *bin_ptrs) {
// //@@ INSERT CODE HERE
// // Load the input into shared memory
// #define BLOCK_SIZE 512
// __shared__ float array[2 * BLOCK_SIZE];
// int tid = threadIdx.x;
// int bid = blockIdx.x;
// int start = bid * BLOCK_SIZE * 2 + tid;
// if(start < NUM_BINS)
// array[tid] = bin_counts[start];
// else
// array[tid] = 0;
// if(start + BLOCK_SIZE < NUM_BINS)
// array[tid + BLOCK_SIZE] = bin_counts[start + BLOCK_SIZE];
// else
// array[tid + BLOCK_SIZE] = 0;
// // Reduction phase
// int stride = 1;
// while(stride < 2 * BLOCK_SIZE)
// {
// __syncthreads();
// int index = (tid + 1) * stride * 2 - 1;
// if(index < 2 * BLOCK_SIZE)
// array[index] += array[index - stride];
// stride *= 2;
// }
// // Post scan phase
// stride = BLOCK_SIZE / 2;
// while(stride > 0)
// {
// __syncthreads();
// int index = (tid + 1) * 2 * stride - 1;
// if(index + stride < 2 * BLOCK_SIZE)
// array[index + stride] += array[index];
// stride /= 2;
// }
// __syncthreads();
// // Directly write output
// if(start < NUM_BINS)
// bin_ptrs[start + 1] = array[tid];
// if(start + BLOCK_SIZE < NUM_BINS)
// bin_ptrs[start + BLOCK_SIZE + 1] = array[tid + BLOCK_SIZE];
// // Since the number of bins is 1024, which just fits into one block
// // No need for futher prefixFixup
// if(tid == 0)
// bin_ptrs[0] = 0;
// #undef BLOCK_SIZE
// }
__global__ void scan(int *bin_counts, int *bin_ptrs) {
//@@ INSERT CODE HERE
// Load the input into shared memory
#define BLOCK_SIZE 512
__shared__ float array[2 * BLOCK_SIZE];
int tx = threadIdx.x;
array[tx] = bin_counts[tx];
array[tx + BLOCK_SIZE] = bin_counts[tx + BLOCK_SIZE];
// Reduction phase
int stride = 1;
while(stride < 2 * BLOCK_SIZE)
{
__syncthreads();
int index = (tx + 1) * stride * 2 - 1;
if(index < 2 * BLOCK_SIZE)
array[index] += array[index - stride];
stride *= 2;
}
// Post scan phase
stride = BLOCK_SIZE / 2;
while(stride > 0)
{
__syncthreads();
int index = (tx + 1) * 2 * stride - 1;
if(index + stride < 2 * BLOCK_SIZE)
array[index + stride] += array[index];
stride /= 2;
}
__syncthreads();
// Directly write output
bin_ptrs[tx + 1] = array[tx];
bin_ptrs[tx + BLOCK_SIZE + 1] = array[tx + BLOCK_SIZE];
// Since the number of bins is 1024, which just fits into one block
// No need for futher prefixFixup
if(tx == 0)
bin_ptrs[0] = 0;
#undef BLOCK_SIZE
}
__global__ void sort(float *in_val, float *in_pos, float *in_val_sorted,
float *in_pos_sorted, int grid_size, int num_in,
int *bin_counts, int *bin_ptrs) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < num_in){
const int binIdx = (int) (in_pos[idx] / grid_size * NUM_BINS);
const int count = atomicAdd(&(bin_counts[binIdx]), -1);
const int newIdx = bin_ptrs[binIdx + 1] - count;
in_pos_sorted[newIdx] = in_pos[idx];
in_val_sorted[newIdx] = in_val[idx];
}
}
/******************************************************************************
Preprocessing functions
*******************************************************************************/
static void cpu_preprocess(float *in_val, float *in_pos,
float *in_val_sorted, float *in_pos_sorted,
int grid_size, int num_in, int *bin_counts,
int *bin_ptrs) {
// Histogram the input positions
for (int binIdx = 0; binIdx < NUM_BINS; ++binIdx) {
bin_counts[binIdx] = 0;
}
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const int binIdx = (int)((in_pos[inIdx] / grid_size) * NUM_BINS);
++bin_counts[binIdx];
}
// Scan the histogram to get the bin pointers
bin_ptrs[0] = 0;
for (int binIdx = 0; binIdx < NUM_BINS; ++binIdx) {
bin_ptrs[binIdx + 1] = bin_ptrs[binIdx] + bin_counts[binIdx];
}
// Sort the inputs into the bins
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const int binIdx = (int)((in_pos[inIdx] / grid_size) * NUM_BINS);
const int newIdx = bin_ptrs[binIdx + 1] - bin_counts[binIdx];
--bin_counts[binIdx];
in_val_sorted[newIdx] = in_val[inIdx];
in_pos_sorted[newIdx] = in_pos[inIdx];
}
}
static void gpu_preprocess(float *in_val, float *in_pos,
float *in_val_sorted, float *in_pos_sorted,
int grid_size, int num_in, int *bin_counts,
int *bin_ptrs) {
const int numThreadsPerBlock = 512;
// Histogram the input positions
// ceil(num_in / numThreadsPerBlock)
hipLaunchKernelGGL(( histogram), dim3((num_in - 1) / numThreadsPerBlock + 1), dim3(numThreadsPerBlock), 0, 0, in_pos, bin_counts, num_in,
grid_size);
// Scan the histogram to get the bin pointers
if (NUM_BINS != 1024) {
FAIL("NUM_BINS must be 1024. Do not change.");
return;
}
hipLaunchKernelGGL(( scan), dim3(1), dim3(numThreadsPerBlock), 0, 0, bin_counts, bin_ptrs);
// Sort the inputs into the bins
hipLaunchKernelGGL(( sort), dim3((num_in -1) / numThreadsPerBlock + 1), dim3(numThreadsPerBlock), 0, 0, in_val, in_pos, in_val_sorted,
in_pos_sorted, grid_size, num_in,
bin_counts, bin_ptrs);
}
template <Mode mode>
int eval(const int num_in, const int max, const int grid_size) {
const std::string mode_info = mode_name(mode);
const std::string conf_info =
std::string("[len:") + std::to_string(num_in) + "/max:" + std::to_string(max) + "/gridSize:" + std::to_string(grid_size) + "]";
// Initialize host variables
// ----------------------------------------------
// Variables
std::vector<float> in_val_h;
std::vector<float> in_pos_h;
float *in_val_d = nullptr;
float *in_pos_d = nullptr;
float *out_d = nullptr;
// Constants
const float cutoff = 3000.0f; // Cutoff distance for optimized computation
const float cutoff2 = cutoff * cutoff;
// Extras needed for input binning
std::vector<int> bin_counts_h;
std::vector<int> bin_ptrs_h;
std::vector<float> in_val_sorted_h;
std::vector<float> in_pos_sorted_h;
int *bin_counts_d = nullptr;
int *bin_ptrs_d = nullptr;
float *in_val_sorted_d = nullptr;
float *in_pos_sorted_d = nullptr;
in_val_h = generate_input(num_in, max);
in_pos_h = generate_input(num_in, grid_size);
std::vector<float> out_h(grid_size);
std::fill_n(out_h.begin(), grid_size, 0.0f);
INFO("Running " << mode_info << conf_info);
// CPU Preprocessing
// ------------------------------------------------------
if (mode == Mode::GPUBinnedCPUPreprocessing) {
timer_start("Allocating data for preprocessing");
// Data structures needed to preprocess the bins on the CPU
bin_counts_h.reserve(NUM_BINS);
bin_ptrs_h.reserve(NUM_BINS + 1);
in_val_sorted_h.reserve(num_in);
in_pos_sorted_h.reserve(num_in);
cpu_preprocess(in_val_h.data(), in_pos_h.data(), in_val_sorted_h.data(), in_pos_sorted_h.data(), grid_size, num_in, bin_counts_h.data(),
bin_ptrs_h.data());
timer_stop();
}
// Allocate device variables
// ----------------------------------------------
if (mode != Mode::CPUNormal) {
timer_start("Allocating data");
// If preprocessing on the CPU, GPU doesn't need the unsorted arrays
if (mode != Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(hipMalloc((void **) &in_val_d, num_in * sizeof(float)));
THROW_IF_ERROR(hipMalloc((void **) &in_pos_d, num_in * sizeof(float)));
}
// All modes need the output array
THROW_IF_ERROR(hipMalloc((void **) &out_d, grid_size * sizeof(float)));
// Only binning modes need binning information
if (mode == Mode::GPUBinnedCPUPreprocessing || mode == Mode::GPUBinnedGPUPreprocessing) {
THROW_IF_ERROR(hipMalloc((void **) &in_val_sorted_d, num_in * sizeof(float)));
THROW_IF_ERROR(hipMalloc((void **) &in_pos_sorted_d, num_in * sizeof(float)));
THROW_IF_ERROR(hipMalloc((void **) &bin_ptrs_d, (NUM_BINS + 1) * sizeof(int)));
if (mode == Mode::GPUBinnedGPUPreprocessing) {
// Only used in preprocessing but not the actual computation
THROW_IF_ERROR(hipMalloc((void **) &bin_counts_d, NUM_BINS * sizeof(int)));
}
}
hipDeviceSynchronize();
timer_stop();
}
// Copy host variables to device
// ------------------------------------------
if (mode != Mode::CPUNormal) {
timer_start("Copying data");
// If preprocessing on the CPU, GPU doesn't need the unsorted arrays
if (mode != Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(hipMemcpy(in_val_d, in_val_h.data(), num_in * sizeof(float), hipMemcpyHostToDevice));
THROW_IF_ERROR(hipMemcpy(in_pos_d, in_pos_h.data(), num_in * sizeof(float), hipMemcpyHostToDevice));
}
// All modes need the output array
THROW_IF_ERROR(hipMemset(out_d, 0, grid_size * sizeof(float)));
if (mode == Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(hipMemcpy(in_val_sorted_d, in_val_sorted_h.data(), num_in * sizeof(float), hipMemcpyHostToDevice));
THROW_IF_ERROR(hipMemcpy(in_pos_sorted_d, in_pos_sorted_h.data(), num_in * sizeof(float), hipMemcpyHostToDevice));
THROW_IF_ERROR(hipMemcpy(bin_ptrs_d, bin_ptrs_h.data(), (NUM_BINS + 1) * sizeof(int), hipMemcpyHostToDevice));
} else if (mode == Mode::GPUBinnedGPUPreprocessing) {
// If preprocessing on the GPU, bin counts need to be initialized
// and nothing needs to be copied
THROW_IF_ERROR(hipMemset(bin_counts_d, 0, NUM_BINS * sizeof(int)));
}
THROW_IF_ERROR(hipDeviceSynchronize());
timer_stop();
}
// GPU Preprocessing
// ------------------------------------------------------
if (mode == Mode::GPUBinnedGPUPreprocessing) {
timer_start("Preprocessing data on the GPU...");
gpu_preprocess(in_val_d, in_pos_d, in_val_sorted_d, in_pos_sorted_d, grid_size, num_in, bin_counts_d, bin_ptrs_d);
THROW_IF_ERROR(hipDeviceSynchronize());
timer_stop();
}
// Launch kernel
// ----------------------------------------------------------
timer_start(std::string("Performing ") + mode_info + conf_info + std::string(" computation"));
switch (mode) {
case Mode::CPUNormal:
cpu_normal(in_val_h.data(), in_pos_h.data(), out_h.data(), grid_size, num_in);
break;
case Mode::GPUNormal:
gpu_normal(in_val_d, in_pos_d, out_d, grid_size, num_in);
break;
case Mode::GPUCutoff:
gpu_cutoff(in_val_d, in_pos_d, out_d, grid_size, num_in, cutoff2);
break;
case Mode::GPUBinnedCPUPreprocessing:
case Mode::GPUBinnedGPUPreprocessing:
gpu_cutoff_binned(bin_ptrs_d, in_val_sorted_d, in_pos_sorted_d, out_d, grid_size, cutoff);
break;
default:
FAIL("Invalid mode " << (int) mode);
}
THROW_IF_ERROR(hipDeviceSynchronize());
timer_stop();
// Copy device variables from host
// ----------------------------------------
if (mode != Mode::CPUNormal) {
THROW_IF_ERROR(hipMemcpy(out_h.data(), out_d, grid_size * sizeof(float), hipMemcpyDeviceToHost));
THROW_IF_ERROR(hipDeviceSynchronize());
}
// Verify correctness
// -----------------------------------------------------
const auto actual_output = compute_output(in_val_h, in_pos_h, num_in, grid_size);
verify(actual_output, out_h);
// Free memory
// ------------------------------------------------------------
if (mode != Mode::CPUNormal) {
if (mode != Mode::GPUBinnedCPUPreprocessing) {
hipFree(in_val_d);
hipFree(in_pos_d);
}
hipFree(out_d);
if (mode == Mode::GPUBinnedCPUPreprocessing || mode == Mode::GPUBinnedGPUPreprocessing) {
hipFree(in_val_sorted_d);
hipFree(in_pos_sorted_d);
hipFree(bin_ptrs_d);
if (mode == Mode::GPUBinnedGPUPreprocessing) {
hipFree(bin_counts_d);
}
}
}
std::cout << "----------------------------------------\n";
return 0;
}
TEST_CASE("CPUNormal", "[cpu_normal]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::CPUNormal>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::CPUNormal>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::CPUNormal>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::CPUNormal>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::CPUNormal>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::CPUNormal>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::CPUNormal>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::CPUNormal>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::CPUNormal>(696, 1, 232);
}
}
TEST_CASE("GPUNormal", "[gpu_normal]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUNormal>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUNormal>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUNormal>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUNormal>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUNormal>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUNormal>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUNormal>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUNormal>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUNormal>(696, 1, 232);
}
}
TEST_CASE("GPUCutoff", "[gpu_cutoff]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUCutoff>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUCutoff>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUCutoff>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUCutoff>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUCutoff>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUCutoff>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUCutoff>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUCutoff>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUCutoff>(696, 1, 232);
}
}
TEST_CASE("GPUBinnedCPUPreprocessing", "[gpu_binned_cpu_preprocessing]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUBinnedCPUPreprocessing>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUBinnedCPUPreprocessing>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUBinnedCPUPreprocessing>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUBinnedCPUPreprocessing>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUBinnedCPUPreprocessing>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUBinnedCPUPreprocessing>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUBinnedCPUPreprocessing>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUBinnedCPUPreprocessing>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUBinnedCPUPreprocessing>(696, 1, 232);
}
}
TEST_CASE("GPUBinnedGPUPreprocessing", "[gpu_binned_gpu_preprocessing]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUBinnedGPUPreprocessing>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUBinnedGPUPreprocessing>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUBinnedGPUPreprocessing>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUBinnedGPUPreprocessing>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUBinnedGPUPreprocessing>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUBinnedGPUPreprocessing>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUBinnedGPUPreprocessing>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUBinnedGPUPreprocessing>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUBinnedGPUPreprocessing>(696, 1, 232);
}
}
| 00c8852f6af89a0ef725e3ab3347a8f5992b2161.cu | #include "helper.hpp"
/******************************************************************************
GPU main computation kernels
*******************************************************************************/
__global__ void gpu_normal_kernel(float *in_val, float *in_pos, float *out,
int grid_size, int num_in) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
float result = 0;
if (idx < grid_size){
for (int i = 0;i < num_in;i++){
const float dist = in_pos[i] - idx;
result += in_val[i] * in_val[i] / (dist * dist);
}
out[idx] = result;
}
}
__global__ void gpu_cutoff_kernel(float *in_val, float *in_pos, float *out,
int grid_size, int num_in,
float cutoff2) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
float result = 0;
if (idx < grid_size){
for (int i = 0;i < num_in;i++){
const float dist = in_pos[i] - idx;
const float dist2 = dist * dist;
if (dist2 >= cutoff2)
continue;
result += in_val[i] * in_val[i] / dist2;
}
out[idx] = result;
}
}
// Ver 1.0
// __global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
// float *in_val_sorted,
// float *in_pos_sorted, float *out,
// int grid_size, float cutoff) {
// //@@ INSERT CODE HERE
// #define BLOCK_SIZE 512
// const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
// const int idx = tx + bx * bs;
// if (idx < grid_size){
// const int cutoff2 = cutoff * cutoff;
// float result = 0;
// // Calculate neighborhood offset for one thread(one lattice point)
// const int max_thread_binIdx = idx + cutoff < grid_size ? (int) ((idx + cutoff) / grid_size * NUM_BINS) : NUM_BINS-1;
// const int min_thread_binIdx = idx - cutoff >= 0 ? (int) ((idx - cutoff) / grid_size * NUM_BINS) : 0;
// const int max_thread_inIdx = bin_ptrs[max_thread_binIdx + 1];
// const int min_thread_inIdx = bin_ptrs[min_thread_binIdx];
// // Compute
// for (int j = min_thread_inIdx;j < max_thread_inIdx;j++){
// const float dist2 = (idx - in_pos_sorted[j]) * (idx - in_pos_sorted[j]);
// if (dist2 <= cutoff2)
// result += in_val_sorted[j] * in_val_sorted[j] / dist2;
// }
// out[idx] = result;
// }
// #undef BLOCK_SIZE
// }
// Ver 2.0
// __global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
// float *in_val_sorted,
// float *in_pos_sorted, float *out,
// int grid_size, float cutoff) {
// //@@ INSERT CODE HERE
// #define BLOCK_SIZE 512
// __shared__ float shared_pos[BLOCK_SIZE];
// __shared__ float shared_val[BLOCK_SIZE];
// const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
// const int idx = tx + bx * bs;
// const int cutoff2 = cutoff * cutoff;
// float result = 0;
// // Locate possible bin index, same as neighborhood offset list in 2D/3D
// const float upper = (bx + 1) * bs + cutoff - 1;
// const float lower = bx * bs - cutoff;
// const int max_binIdx = upper < grid_size ? (int) (upper / grid_size * NUM_BINS) : NUM_BINS-1;
// const int min_binIdx = lower >= 0 ? (int) (lower / grid_size * NUM_BINS) : 0;
// const int max_inIdx = bin_ptrs[max_binIdx + 1];
// const int min_inIdx = bin_ptrs[min_binIdx];
// // Collaboratively load one valid bins into shared memory and compute result correspondingly
// for (int i = min_inIdx;i < max_inIdx;i += bs){
// // Load
// if (tx + i < max_inIdx){
// shared_pos[tx] = in_pos_sorted[tx + i];
// shared_val[tx] = in_val_sorted[tx + i];
// }
// else{
// shared_pos[tx] = -1;
// shared_val[tx] = 0;
// }
// __syncthreads();
// // Compute
// for (int j = 0;j < bs;j++){
// const float dist2 = (idx - shared_pos[j]) * (idx - shared_pos[j]);
// if (dist2 <= cutoff2)
// result += shared_val[j] * shared_val[j] / dist2;
// }
// __syncthreads();
// }
// if (idx < grid_size)
// out[idx] = result;
// #undef BLOCK_SIZE
// }
// Ver 3.0
__global__ void gpu_cutoff_binned_kernel(int *bin_ptrs,
float *in_val_sorted,
float *in_pos_sorted, float *out,
int grid_size, float cutoff) {
//@@ INSERT CODE HERE
#define BLOCK_SIZE 512
__shared__ float shared_pos[BLOCK_SIZE];
__shared__ float shared_val[BLOCK_SIZE];
const int tx = threadIdx.x, bx = blockIdx.x, bs = blockDim.x;
const int idx = tx + bx * bs;
const int cutoff2 = cutoff * cutoff;
float result = 0;
// Locate possible bin index, same as neighborhood offset list in 2D/3D
const float upper = (bx + 1) * bs + cutoff - 1;
const float lower = bx * bs - cutoff;
const int max_binIdx = upper < grid_size ? (int) (upper / grid_size * NUM_BINS) : NUM_BINS-1;
const int min_binIdx = lower >= 0 ? (int) (lower / grid_size * NUM_BINS) : 0;
const int max_inIdx = bin_ptrs[max_binIdx + 1];
const int min_inIdx = bin_ptrs[min_binIdx];
// Calculate neighborhood offset for one thread
const int max_thread_binIdx = idx + cutoff < grid_size ? (int) ((idx + cutoff) / grid_size * NUM_BINS) : NUM_BINS-1;
const int min_thread_binIdx = idx - cutoff >= 0 ? (int) ((idx - cutoff) / grid_size * NUM_BINS) : 0;
const int max_thread_inIdx = bin_ptrs[max_thread_binIdx + 1];
const int min_thread_inIdx = bin_ptrs[min_thread_binIdx];
// Collaboratively load one valid bins into shared memory and compute result correspondingly
for (int i = min_inIdx;i < max_inIdx;i += bs){
// Load
if (tx + i < max_inIdx){
shared_pos[tx] = in_pos_sorted[tx + i];
shared_val[tx] = in_val_sorted[tx + i];
}
else{
shared_pos[tx] = -1;
shared_val[tx] = 0;
}
__syncthreads();
// Compute
// Calculate the index range each thread(grid point) needs to compute
// This version is much faster than the one above, it reduces many unnaccessary computation.
const int start = max(min_thread_inIdx - i, 0);
const int end = max(0, min(max_thread_inIdx - i, BLOCK_SIZE));
for (int j = start;j < end;j++){
const float dist2 = (idx - shared_pos[j]) * (idx - shared_pos[j]);
if (dist2 <= cutoff2)
result += shared_val[j] * shared_val[j] / dist2;
}
__syncthreads();
}
if (idx < grid_size)
out[idx] = result;
#undef BLOCK_SIZE
}
/******************************************************************************
Main computation functions
*******************************************************************************/
void cpu_normal(float *in_val, float *in_pos, float *out, int grid_size,
int num_in) {
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const float in_val2 = in_val[inIdx] * in_val[inIdx];
for (int outIdx = 0; outIdx < grid_size; ++outIdx) {
const float dist = in_pos[inIdx] - (float)outIdx;
out[outIdx] += in_val2 / (dist * dist);
}
}
}
void gpu_normal(float *in_val, float *in_pos, float *out, int grid_size,
int num_in) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
gpu_normal_kernel<<<numBlocks, numThreadsPerBlock>>>(in_val, in_pos, out,
grid_size, num_in);
}
void gpu_cutoff(float *in_val, float *in_pos, float *out, int grid_size,
int num_in, float cutoff2) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
gpu_cutoff_kernel<<<numBlocks, numThreadsPerBlock>>>(
in_val, in_pos, out, grid_size, num_in, cutoff2);
}
void gpu_cutoff_binned(int *bin_ptrs, float *in_val_sorted,
float *in_pos_sorted, float *out, int grid_size,
float cutoff) {
const int numThreadsPerBlock = 512;
const int numBlocks = (grid_size - 1) / numThreadsPerBlock + 1;
gpu_cutoff_binned_kernel<<<numBlocks, numThreadsPerBlock>>>(
bin_ptrs, in_val_sorted, in_pos_sorted, out, grid_size, cutoff);
}
/******************************************************************************
Preprocessing kernels
*******************************************************************************/
// Ver 1.0
// __global__ void histogram(float *in_pos, int *bin_counts, int num_in,
// int grid_size) {
// //@@ INSERT CODE HERE
// // NUM_BINS = 1024 BLOCK_SIZE = 512
// const int idx = threadIdx.x + blockIdx.x * blockDim.x;
// if (idx < num_in){
// const int binIdx = (int) (in_pos[idx] / grid_size * NUM_BINS);
// atomicAdd(&(bin_counts[binIdx]), 1);
// }
// }
// Ver 2.0
__global__ void histogram(float *in_pos, int *bin_counts, int num_in,
int grid_size) {
//@@ INSERT CODE HERE
// NUM_BINS = 1024 BLOCK_SIZE = 512
__shared__ float share_bin_counts[NUM_BINS];
const int tx = threadIdx.x;
const int bs = blockDim.x;
const int idx = tx + blockIdx.x * bs;
// Is it faster?
// Use shared memory reduce conflicts, but the global memory access per block
// increases from 512 to 1024. We also have to add two sycthreads().
// For some test cases, num_in / grid_size = 40, which is a large number,
// conflict accesses will be frequent. It might be a good idea to use shared memory
// But for some small num_in / grid_size, it is definitely not worth it.
// Initialize local hist
share_bin_counts[tx] = 0;
share_bin_counts[tx + bs] = 0;
__syncthreads();
if (idx < num_in){
const int binIdx = (int) ((in_pos[idx] / grid_size) * NUM_BINS);
atomicAdd(&(share_bin_counts[binIdx]), 1);
}
__syncthreads();
atomicAdd(&(bin_counts[tx]), share_bin_counts[tx]);
atomicAdd(&(bin_counts[tx + bs]), share_bin_counts[tx + bs]);
}
// __global__ void scan(int *bin_counts, int *bin_ptrs) {
// //@@ INSERT CODE HERE
// // Load the input into shared memory
// #define BLOCK_SIZE 512
// __shared__ float array[2 * BLOCK_SIZE];
// int tid = threadIdx.x;
// int bid = blockIdx.x;
// int start = bid * BLOCK_SIZE * 2 + tid;
// if(start < NUM_BINS)
// array[tid] = bin_counts[start];
// else
// array[tid] = 0;
// if(start + BLOCK_SIZE < NUM_BINS)
// array[tid + BLOCK_SIZE] = bin_counts[start + BLOCK_SIZE];
// else
// array[tid + BLOCK_SIZE] = 0;
// // Reduction phase
// int stride = 1;
// while(stride < 2 * BLOCK_SIZE)
// {
// __syncthreads();
// int index = (tid + 1) * stride * 2 - 1;
// if(index < 2 * BLOCK_SIZE)
// array[index] += array[index - stride];
// stride *= 2;
// }
// // Post scan phase
// stride = BLOCK_SIZE / 2;
// while(stride > 0)
// {
// __syncthreads();
// int index = (tid + 1) * 2 * stride - 1;
// if(index + stride < 2 * BLOCK_SIZE)
// array[index + stride] += array[index];
// stride /= 2;
// }
// __syncthreads();
// // Directly write output
// if(start < NUM_BINS)
// bin_ptrs[start + 1] = array[tid];
// if(start + BLOCK_SIZE < NUM_BINS)
// bin_ptrs[start + BLOCK_SIZE + 1] = array[tid + BLOCK_SIZE];
// // Since the number of bins is 1024, which just fits into one block
// // No need for futher prefixFixup
// if(tid == 0)
// bin_ptrs[0] = 0;
// #undef BLOCK_SIZE
// }
__global__ void scan(int *bin_counts, int *bin_ptrs) {
//@@ INSERT CODE HERE
// Load the input into shared memory
#define BLOCK_SIZE 512
__shared__ float array[2 * BLOCK_SIZE];
int tx = threadIdx.x;
array[tx] = bin_counts[tx];
array[tx + BLOCK_SIZE] = bin_counts[tx + BLOCK_SIZE];
// Reduction phase
int stride = 1;
while(stride < 2 * BLOCK_SIZE)
{
__syncthreads();
int index = (tx + 1) * stride * 2 - 1;
if(index < 2 * BLOCK_SIZE)
array[index] += array[index - stride];
stride *= 2;
}
// Post scan phase
stride = BLOCK_SIZE / 2;
while(stride > 0)
{
__syncthreads();
int index = (tx + 1) * 2 * stride - 1;
if(index + stride < 2 * BLOCK_SIZE)
array[index + stride] += array[index];
stride /= 2;
}
__syncthreads();
// Directly write output
bin_ptrs[tx + 1] = array[tx];
bin_ptrs[tx + BLOCK_SIZE + 1] = array[tx + BLOCK_SIZE];
// Since the number of bins is 1024, which just fits into one block
// No need for futher prefixFixup
if(tx == 0)
bin_ptrs[0] = 0;
#undef BLOCK_SIZE
}
__global__ void sort(float *in_val, float *in_pos, float *in_val_sorted,
float *in_pos_sorted, int grid_size, int num_in,
int *bin_counts, int *bin_ptrs) {
//@@ INSERT CODE HERE
const int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < num_in){
const int binIdx = (int) (in_pos[idx] / grid_size * NUM_BINS);
const int count = atomicAdd(&(bin_counts[binIdx]), -1);
const int newIdx = bin_ptrs[binIdx + 1] - count;
in_pos_sorted[newIdx] = in_pos[idx];
in_val_sorted[newIdx] = in_val[idx];
}
}
/******************************************************************************
Preprocessing functions
*******************************************************************************/
static void cpu_preprocess(float *in_val, float *in_pos,
float *in_val_sorted, float *in_pos_sorted,
int grid_size, int num_in, int *bin_counts,
int *bin_ptrs) {
// Histogram the input positions
for (int binIdx = 0; binIdx < NUM_BINS; ++binIdx) {
bin_counts[binIdx] = 0;
}
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const int binIdx = (int)((in_pos[inIdx] / grid_size) * NUM_BINS);
++bin_counts[binIdx];
}
// Scan the histogram to get the bin pointers
bin_ptrs[0] = 0;
for (int binIdx = 0; binIdx < NUM_BINS; ++binIdx) {
bin_ptrs[binIdx + 1] = bin_ptrs[binIdx] + bin_counts[binIdx];
}
// Sort the inputs into the bins
for (int inIdx = 0; inIdx < num_in; ++inIdx) {
const int binIdx = (int)((in_pos[inIdx] / grid_size) * NUM_BINS);
const int newIdx = bin_ptrs[binIdx + 1] - bin_counts[binIdx];
--bin_counts[binIdx];
in_val_sorted[newIdx] = in_val[inIdx];
in_pos_sorted[newIdx] = in_pos[inIdx];
}
}
static void gpu_preprocess(float *in_val, float *in_pos,
float *in_val_sorted, float *in_pos_sorted,
int grid_size, int num_in, int *bin_counts,
int *bin_ptrs) {
const int numThreadsPerBlock = 512;
// Histogram the input positions
// ceil(num_in / numThreadsPerBlock)
histogram<<<(num_in - 1) / numThreadsPerBlock + 1, numThreadsPerBlock>>>(in_pos, bin_counts, num_in,
grid_size);
// Scan the histogram to get the bin pointers
if (NUM_BINS != 1024) {
FAIL("NUM_BINS must be 1024. Do not change.");
return;
}
scan<<<1, numThreadsPerBlock>>>(bin_counts, bin_ptrs);
// Sort the inputs into the bins
sort<<<(num_in -1) / numThreadsPerBlock + 1, numThreadsPerBlock>>>(in_val, in_pos, in_val_sorted,
in_pos_sorted, grid_size, num_in,
bin_counts, bin_ptrs);
}
template <Mode mode>
int eval(const int num_in, const int max, const int grid_size) {
const std::string mode_info = mode_name(mode);
const std::string conf_info =
std::string("[len:") + std::to_string(num_in) + "/max:" + std::to_string(max) + "/gridSize:" + std::to_string(grid_size) + "]";
// Initialize host variables
// ----------------------------------------------
// Variables
std::vector<float> in_val_h;
std::vector<float> in_pos_h;
float *in_val_d = nullptr;
float *in_pos_d = nullptr;
float *out_d = nullptr;
// Constants
const float cutoff = 3000.0f; // Cutoff distance for optimized computation
const float cutoff2 = cutoff * cutoff;
// Extras needed for input binning
std::vector<int> bin_counts_h;
std::vector<int> bin_ptrs_h;
std::vector<float> in_val_sorted_h;
std::vector<float> in_pos_sorted_h;
int *bin_counts_d = nullptr;
int *bin_ptrs_d = nullptr;
float *in_val_sorted_d = nullptr;
float *in_pos_sorted_d = nullptr;
in_val_h = generate_input(num_in, max);
in_pos_h = generate_input(num_in, grid_size);
std::vector<float> out_h(grid_size);
std::fill_n(out_h.begin(), grid_size, 0.0f);
INFO("Running " << mode_info << conf_info);
// CPU Preprocessing
// ------------------------------------------------------
if (mode == Mode::GPUBinnedCPUPreprocessing) {
timer_start("Allocating data for preprocessing");
// Data structures needed to preprocess the bins on the CPU
bin_counts_h.reserve(NUM_BINS);
bin_ptrs_h.reserve(NUM_BINS + 1);
in_val_sorted_h.reserve(num_in);
in_pos_sorted_h.reserve(num_in);
cpu_preprocess(in_val_h.data(), in_pos_h.data(), in_val_sorted_h.data(), in_pos_sorted_h.data(), grid_size, num_in, bin_counts_h.data(),
bin_ptrs_h.data());
timer_stop();
}
// Allocate device variables
// ----------------------------------------------
if (mode != Mode::CPUNormal) {
timer_start("Allocating data");
// If preprocessing on the CPU, GPU doesn't need the unsorted arrays
if (mode != Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(cudaMalloc((void **) &in_val_d, num_in * sizeof(float)));
THROW_IF_ERROR(cudaMalloc((void **) &in_pos_d, num_in * sizeof(float)));
}
// All modes need the output array
THROW_IF_ERROR(cudaMalloc((void **) &out_d, grid_size * sizeof(float)));
// Only binning modes need binning information
if (mode == Mode::GPUBinnedCPUPreprocessing || mode == Mode::GPUBinnedGPUPreprocessing) {
THROW_IF_ERROR(cudaMalloc((void **) &in_val_sorted_d, num_in * sizeof(float)));
THROW_IF_ERROR(cudaMalloc((void **) &in_pos_sorted_d, num_in * sizeof(float)));
THROW_IF_ERROR(cudaMalloc((void **) &bin_ptrs_d, (NUM_BINS + 1) * sizeof(int)));
if (mode == Mode::GPUBinnedGPUPreprocessing) {
// Only used in preprocessing but not the actual computation
THROW_IF_ERROR(cudaMalloc((void **) &bin_counts_d, NUM_BINS * sizeof(int)));
}
}
cudaDeviceSynchronize();
timer_stop();
}
// Copy host variables to device
// ------------------------------------------
if (mode != Mode::CPUNormal) {
timer_start("Copying data");
// If preprocessing on the CPU, GPU doesn't need the unsorted arrays
if (mode != Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(cudaMemcpy(in_val_d, in_val_h.data(), num_in * sizeof(float), cudaMemcpyHostToDevice));
THROW_IF_ERROR(cudaMemcpy(in_pos_d, in_pos_h.data(), num_in * sizeof(float), cudaMemcpyHostToDevice));
}
// All modes need the output array
THROW_IF_ERROR(cudaMemset(out_d, 0, grid_size * sizeof(float)));
if (mode == Mode::GPUBinnedCPUPreprocessing) {
THROW_IF_ERROR(cudaMemcpy(in_val_sorted_d, in_val_sorted_h.data(), num_in * sizeof(float), cudaMemcpyHostToDevice));
THROW_IF_ERROR(cudaMemcpy(in_pos_sorted_d, in_pos_sorted_h.data(), num_in * sizeof(float), cudaMemcpyHostToDevice));
THROW_IF_ERROR(cudaMemcpy(bin_ptrs_d, bin_ptrs_h.data(), (NUM_BINS + 1) * sizeof(int), cudaMemcpyHostToDevice));
} else if (mode == Mode::GPUBinnedGPUPreprocessing) {
// If preprocessing on the GPU, bin counts need to be initialized
// and nothing needs to be copied
THROW_IF_ERROR(cudaMemset(bin_counts_d, 0, NUM_BINS * sizeof(int)));
}
THROW_IF_ERROR(cudaDeviceSynchronize());
timer_stop();
}
// GPU Preprocessing
// ------------------------------------------------------
if (mode == Mode::GPUBinnedGPUPreprocessing) {
timer_start("Preprocessing data on the GPU...");
gpu_preprocess(in_val_d, in_pos_d, in_val_sorted_d, in_pos_sorted_d, grid_size, num_in, bin_counts_d, bin_ptrs_d);
THROW_IF_ERROR(cudaDeviceSynchronize());
timer_stop();
}
// Launch kernel
// ----------------------------------------------------------
timer_start(std::string("Performing ") + mode_info + conf_info + std::string(" computation"));
switch (mode) {
case Mode::CPUNormal:
cpu_normal(in_val_h.data(), in_pos_h.data(), out_h.data(), grid_size, num_in);
break;
case Mode::GPUNormal:
gpu_normal(in_val_d, in_pos_d, out_d, grid_size, num_in);
break;
case Mode::GPUCutoff:
gpu_cutoff(in_val_d, in_pos_d, out_d, grid_size, num_in, cutoff2);
break;
case Mode::GPUBinnedCPUPreprocessing:
case Mode::GPUBinnedGPUPreprocessing:
gpu_cutoff_binned(bin_ptrs_d, in_val_sorted_d, in_pos_sorted_d, out_d, grid_size, cutoff);
break;
default:
FAIL("Invalid mode " << (int) mode);
}
THROW_IF_ERROR(cudaDeviceSynchronize());
timer_stop();
// Copy device variables from host
// ----------------------------------------
if (mode != Mode::CPUNormal) {
THROW_IF_ERROR(cudaMemcpy(out_h.data(), out_d, grid_size * sizeof(float), cudaMemcpyDeviceToHost));
THROW_IF_ERROR(cudaDeviceSynchronize());
}
// Verify correctness
// -----------------------------------------------------
const auto actual_output = compute_output(in_val_h, in_pos_h, num_in, grid_size);
verify(actual_output, out_h);
// Free memory
// ------------------------------------------------------------
if (mode != Mode::CPUNormal) {
if (mode != Mode::GPUBinnedCPUPreprocessing) {
cudaFree(in_val_d);
cudaFree(in_pos_d);
}
cudaFree(out_d);
if (mode == Mode::GPUBinnedCPUPreprocessing || mode == Mode::GPUBinnedGPUPreprocessing) {
cudaFree(in_val_sorted_d);
cudaFree(in_pos_sorted_d);
cudaFree(bin_ptrs_d);
if (mode == Mode::GPUBinnedGPUPreprocessing) {
cudaFree(bin_counts_d);
}
}
}
std::cout << "----------------------------------------\n";
return 0;
}
TEST_CASE("CPUNormal", "[cpu_normal]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::CPUNormal>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::CPUNormal>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::CPUNormal>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::CPUNormal>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::CPUNormal>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::CPUNormal>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::CPUNormal>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::CPUNormal>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::CPUNormal>(696, 1, 232);
}
}
TEST_CASE("GPUNormal", "[gpu_normal]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUNormal>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUNormal>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUNormal>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUNormal>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUNormal>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUNormal>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUNormal>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUNormal>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUNormal>(696, 1, 232);
}
}
TEST_CASE("GPUCutoff", "[gpu_cutoff]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUCutoff>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUCutoff>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUCutoff>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUCutoff>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUCutoff>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUCutoff>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUCutoff>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUCutoff>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUCutoff>(696, 1, 232);
}
}
TEST_CASE("GPUBinnedCPUPreprocessing", "[gpu_binned_cpu_preprocessing]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUBinnedCPUPreprocessing>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUBinnedCPUPreprocessing>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUBinnedCPUPreprocessing>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUBinnedCPUPreprocessing>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUBinnedCPUPreprocessing>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUBinnedCPUPreprocessing>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUBinnedCPUPreprocessing>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUBinnedCPUPreprocessing>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUBinnedCPUPreprocessing>(696, 1, 232);
}
}
TEST_CASE("GPUBinnedGPUPreprocessing", "[gpu_binned_gpu_preprocessing]") {
SECTION("[len:60/max:1/gridSize:60]") {
eval<Mode::GPUBinnedGPUPreprocessing>(60, 1, 60);
}
SECTION("[len:600/max:1/gridSize:100]") {
eval<Mode::GPUBinnedGPUPreprocessing>(600, 1, 100);
}
SECTION("[len:603/max:1/gridSize:201]") {
eval<Mode::GPUBinnedGPUPreprocessing>(603, 1, 201);
}
SECTION("[len:409/max:1/gridSize:160]") {
eval<Mode::GPUBinnedGPUPreprocessing>(409, 1, 160);
}
SECTION("[len:419/max:1/gridSize:100]") {
eval<Mode::GPUBinnedGPUPreprocessing>(419, 1, 100);
}
SECTION("[len:8065/max:1/gridSize:201]") {
eval<Mode::GPUBinnedGPUPreprocessing>(8065, 1, 201);
}
SECTION("[len:1440/max:1/gridSize:443]") {
eval<Mode::GPUBinnedGPUPreprocessing>(1440, 1, 443);
}
SECTION("[len:400/max:1/gridSize:200]") {
eval<Mode::GPUBinnedGPUPreprocessing>(400, 1, 200);
}
SECTION("[len:696/max:1/gridSize:232]") {
eval<Mode::GPUBinnedGPUPreprocessing>(696, 1, 232);
}
}
|
4cef317dd15da9acfb8045758abe348c4048c5c8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "shared.cuh"
struct ParticleRef {
Point pos;
Point dir;
double nextdist;
};
inline __device__ ParticleRef make_ref(const ParticleView &view, int i) {
return {view.get_pos(i), view.get_dir(i), view.get_nextdist(i)};
}
__device__ inline void move_impl(const ParticleRef ref) {
*ref.pos.x += *ref.dir.x * ref.nextdist;
*ref.pos.y += *ref.dir.y * ref.nextdist;
*ref.pos.z += *ref.dir.z * ref.nextdist;
}
__global__ void move(ParticleView view) {
int i = thread_id();
if (i >= view.size) return;
move_impl(make_ref(view, i));
}
| 4cef317dd15da9acfb8045758abe348c4048c5c8.cu | #include "shared.cuh"
struct ParticleRef {
Point pos;
Point dir;
double nextdist;
};
inline __device__ ParticleRef make_ref(const ParticleView &view, int i) {
return {view.get_pos(i), view.get_dir(i), view.get_nextdist(i)};
}
__device__ inline void move_impl(const ParticleRef ref) {
*ref.pos.x += *ref.dir.x * ref.nextdist;
*ref.pos.y += *ref.dir.y * ref.nextdist;
*ref.pos.z += *ref.dir.z * ref.nextdist;
}
__global__ void move(ParticleView view) {
int i = thread_id();
if (i >= view.size) return;
move_impl(make_ref(view, i));
}
|
884cd37e1c0c195358cd9cbb542fe69a7e8263dc.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "scan.h"
#include <math.h>
/*
*/
__global__
void naive_scan(float *d_in, float *d_out, size_t length)
{
/*
Your kernel here: Make sure to check for boundary conditions
*/
int idx = blockIdx.x * blockDim.x + threadIdx.x;
int j;
__shared__ float tmp[BLOCK];
if (idx < length) tmp[threadIdx.x] = d_in[idx];
for (j = 1; j <= threadIdx.x; j *= 2)
{
__syncthreads();
float in1 = tmp[threadIdx.x - j];
__syncthreads();
tmp[threadIdx.x] += in1;
}
if (idx < length) d_out[idx] = tmp[threadIdx.x];
}
__global__
void naive_scan2(float *d_in, float *d_out, size_t length)
{
int i = threadIdx.x;
int n = blockDim.x;
for (int offset = 1; offset < n; offset *= 2)
{
float t;
if (i >= offset) t = d_in[i - offset];
__syncthreads();
if (i >= offset) d_in[i] += t;
__syncthreads();
}
if (i < length) d_out[i] = d_in[i];
}
__global__
void scan(float *d_in, float *d_out, float *d_sums, size_t length)
{
__shared__ float temp[2 * BLOCK];
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// load shared memory
if (idx < length / 2) temp[2 * threadIdx.x] = d_in[2 * idx];
else temp[2 * threadIdx.x] = 0;
if (2 * idx + 1 < length) temp[2 * threadIdx.x + 1] = d_in[2 * idx + 1];
else temp[2 * threadIdx.x + 1] = 0;
__syncthreads();
for (int stride = 1; stride <= BLOCK; stride *= 2)
{
int i = (threadIdx.x + 1) * stride * 2 - 1; // data index
if (i < 2 * BLOCK)
{
temp[i] += temp[i - stride];
}
__syncthreads();
}
for (int stride = BLOCK / 2; stride > 0; stride /= 2)
{
int i = (threadIdx.x + 1) * stride * 2 - 1;
if (i + stride < 2 * BLOCK)
{
temp[i + stride] += temp[i];
}
__syncthreads();
}
if (idx < length / 2)
{
d_out[2 * idx] = temp[2 * threadIdx.x];
d_out[2 * idx + 1] = temp[2 * threadIdx.x + 1];
}
if (d_sums && threadIdx.x == 0) d_sums[blockIdx.x] = temp[2 * BLOCK - 1];
}
__global__
void increment_scan(float *d_in, float *d_out, float *d_inc, size_t length)
{
__shared__ float temp[2 * BLOCK];
__shared__ float increment;
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// load shared memory
temp[2 * threadIdx.x] = d_out[2 * idx];
temp[2 * threadIdx.x + 1] = d_out[2 * idx + 1];
if (!threadIdx.x)
{
if (blockIdx.x == 0) increment = 0;
else increment = d_inc[blockIdx.x - 1];
}
__syncthreads();
temp[2 * threadIdx.x] += increment;
temp[2 * threadIdx.x + 1] += increment;
__syncthreads();
d_out[2 * idx] = temp[2 * threadIdx.x];
d_out[2 * idx + 1] = temp[2 * threadIdx.x + 1];
}
void launch_scan(float *d_in, float *d_out, float *d_sums, float *d_incs, size_t length)
{
// configure launch params here
dim3 block(BLOCK, 1, 1);
int grid_d = ceil(length / (2.0 * BLOCK));
dim3 grid(grid_d, 1, 1);
hipLaunchKernelGGL(( scan), dim3(grid),dim3(block), 0, 0, d_in, d_out, d_sums, length);
hipDeviceSynchronize();
checkCudaErrors(hipGetLastError());
int grid_d2 = ceil(grid_d / (2.0 * BLOCK));
dim3 grid2(grid_d2, 1, 1);
hipLaunchKernelGGL(( scan), dim3(grid2),dim3(block), 0, 0, d_sums, d_incs, NULL, length);
hipDeviceSynchronize();
checkCudaErrors(hipGetLastError());
hipLaunchKernelGGL(( increment_scan), dim3(grid),dim3(block), 0, 0, d_in, d_out, d_incs, length);
hipDeviceSynchronize();
checkCudaErrors(hipGetLastError());
}
| 884cd37e1c0c195358cd9cbb542fe69a7e8263dc.cu | #include "scan.h"
#include <math.h>
/*
*/
__global__
void naive_scan(float *d_in, float *d_out, size_t length)
{
/*
Your kernel here: Make sure to check for boundary conditions
*/
int idx = blockIdx.x * blockDim.x + threadIdx.x;
int j;
__shared__ float tmp[BLOCK];
if (idx < length) tmp[threadIdx.x] = d_in[idx];
for (j = 1; j <= threadIdx.x; j *= 2)
{
__syncthreads();
float in1 = tmp[threadIdx.x - j];
__syncthreads();
tmp[threadIdx.x] += in1;
}
if (idx < length) d_out[idx] = tmp[threadIdx.x];
}
__global__
void naive_scan2(float *d_in, float *d_out, size_t length)
{
int i = threadIdx.x;
int n = blockDim.x;
for (int offset = 1; offset < n; offset *= 2)
{
float t;
if (i >= offset) t = d_in[i - offset];
__syncthreads();
if (i >= offset) d_in[i] += t;
__syncthreads();
}
if (i < length) d_out[i] = d_in[i];
}
__global__
void scan(float *d_in, float *d_out, float *d_sums, size_t length)
{
__shared__ float temp[2 * BLOCK];
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// load shared memory
if (idx < length / 2) temp[2 * threadIdx.x] = d_in[2 * idx];
else temp[2 * threadIdx.x] = 0;
if (2 * idx + 1 < length) temp[2 * threadIdx.x + 1] = d_in[2 * idx + 1];
else temp[2 * threadIdx.x + 1] = 0;
__syncthreads();
for (int stride = 1; stride <= BLOCK; stride *= 2)
{
int i = (threadIdx.x + 1) * stride * 2 - 1; // data index
if (i < 2 * BLOCK)
{
temp[i] += temp[i - stride];
}
__syncthreads();
}
for (int stride = BLOCK / 2; stride > 0; stride /= 2)
{
int i = (threadIdx.x + 1) * stride * 2 - 1;
if (i + stride < 2 * BLOCK)
{
temp[i + stride] += temp[i];
}
__syncthreads();
}
if (idx < length / 2)
{
d_out[2 * idx] = temp[2 * threadIdx.x];
d_out[2 * idx + 1] = temp[2 * threadIdx.x + 1];
}
if (d_sums && threadIdx.x == 0) d_sums[blockIdx.x] = temp[2 * BLOCK - 1];
}
__global__
void increment_scan(float *d_in, float *d_out, float *d_inc, size_t length)
{
__shared__ float temp[2 * BLOCK];
__shared__ float increment;
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// load shared memory
temp[2 * threadIdx.x] = d_out[2 * idx];
temp[2 * threadIdx.x + 1] = d_out[2 * idx + 1];
if (!threadIdx.x)
{
if (blockIdx.x == 0) increment = 0;
else increment = d_inc[blockIdx.x - 1];
}
__syncthreads();
temp[2 * threadIdx.x] += increment;
temp[2 * threadIdx.x + 1] += increment;
__syncthreads();
d_out[2 * idx] = temp[2 * threadIdx.x];
d_out[2 * idx + 1] = temp[2 * threadIdx.x + 1];
}
void launch_scan(float *d_in, float *d_out, float *d_sums, float *d_incs, size_t length)
{
// configure launch params here
dim3 block(BLOCK, 1, 1);
int grid_d = ceil(length / (2.0 * BLOCK));
dim3 grid(grid_d, 1, 1);
scan<<<grid,block>>>(d_in, d_out, d_sums, length);
cudaDeviceSynchronize();
checkCudaErrors(cudaGetLastError());
int grid_d2 = ceil(grid_d / (2.0 * BLOCK));
dim3 grid2(grid_d2, 1, 1);
scan<<<grid2,block>>>(d_sums, d_incs, NULL, length);
cudaDeviceSynchronize();
checkCudaErrors(cudaGetLastError());
increment_scan<<<grid,block>>>(d_in, d_out, d_incs, length);
cudaDeviceSynchronize();
checkCudaErrors(cudaGetLastError());
}
|
f6191a2a1bfb867d9ac0f94f7ba798e794b2870c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
extern "C" __global__ void hconv_bprop_C32_N128(
float* param_Sum,
unsigned short* param_O,
const unsigned short* param_I,
const unsigned short* param_F,
float param_alpha,
float param_beta,
int param_flags,
int param_offset_K,
int param_N,
int param_K,
int param_D,
int param_H,
int param_W,
int param_WN,
int param_HWN,
int param_DHWN,
int param_C,
int param_CRST,
int param_RST,
int param_RS,
int param_magic_RS,
int param_shift_RS,
int param_S,
int param_magic_S,
int param_shift_S,
int param_pad_d,
int param_pad_h,
int param_pad_w,
int param_str_d,
int param_str_h,
int param_str_w,
int param_Q,
int param_PQ,
int param_QN,
int param_PQN,
int param_MPQN,
int param_magic_Q,
int param_shift_Q,
int param_magic_PQ,
int param_shift_PQ,
int param_R,
int param_T,
int param_magic_str_w,
int param_shift_str_w,
int param_magic_str_h,
int param_shift_str_h,
int param_magic_str_d,
int param_shift_str_d
) {
__shared__ float share[ 32*8*2 + 128*8*2 + 8];
*param_Sum = share[0];
}
| f6191a2a1bfb867d9ac0f94f7ba798e794b2870c.cu |
extern "C" __global__ void hconv_bprop_C32_N128(
float* param_Sum,
unsigned short* param_O,
const unsigned short* param_I,
const unsigned short* param_F,
float param_alpha,
float param_beta,
int param_flags,
int param_offset_K,
int param_N,
int param_K,
int param_D,
int param_H,
int param_W,
int param_WN,
int param_HWN,
int param_DHWN,
int param_C,
int param_CRST,
int param_RST,
int param_RS,
int param_magic_RS,
int param_shift_RS,
int param_S,
int param_magic_S,
int param_shift_S,
int param_pad_d,
int param_pad_h,
int param_pad_w,
int param_str_d,
int param_str_h,
int param_str_w,
int param_Q,
int param_PQ,
int param_QN,
int param_PQN,
int param_MPQN,
int param_magic_Q,
int param_shift_Q,
int param_magic_PQ,
int param_shift_PQ,
int param_R,
int param_T,
int param_magic_str_w,
int param_shift_str_w,
int param_magic_str_h,
int param_shift_str_h,
int param_magic_str_d,
int param_shift_str_d
) {
__shared__ float share[ 32*8*2 + 128*8*2 + 8];
*param_Sum = share[0];
}
|
f9fe3941d00f2e1d92b043cecafd9e1b53bfe89b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SIZE 1024
__global__ void trial(long int *prime, long int *number, long int *length) {
long int i = threadIdx.x + blockIdx.x * blockDim.x;
/* long int i = blockIdx.x * blockDim.x * blockDim.y *
blockDim.z + threadIdx.z * blockDim.y * blockDim.x +
threadIdx.y * blockDim.x + threadIdx.x;
*/
if ((i > 1) && (i <= *length))
{
if (prime[i])
{
long int val = i;
if (val * val == *number)
{
printf("\nPrime factors are %ld and %ld\n", val, val);
return;
}
if (*number % val == 0)
{
printf("\nPrime factors are %ld ", val);
long int val2 = *number / val;
printf("and %ld.\n", val2);
}
}
}
__syncthreads();
}
void main()
{
long int *d_length;
long int *prime;
long int *d_prime;
long int n = 2;
long int elim;
long int number;
long int *d_number;
printf("Enter number to factorize: ");
scanf("%d", &number);
clock_t start, end;
double tempo;
start = clock();
long int length = floor(sqrt(number));
prime = (long int *)malloc(SIZE * sizeof(long int));
hipMalloc((void**) &d_prime, SIZE * sizeof(long int));
hipMalloc((void**) &d_number, sizeof(long int));
hipMalloc((void**) &d_length, sizeof(long int));
//Eratosthenes Sieve
for (int i = 0; i < length; i++)
prime[i] = 1;
while (n <= length)
{
if (prime[n] == 1)
{
elim = n + n;
while (elim <= length)
{
prime[elim] = 0;
elim += n;
}
}
n++;
}
hipMemcpy(d_prime, prime, SIZE * sizeof(long int), hipMemcpyHostToDevice);
hipMemcpy(d_number, &number, sizeof(long int), hipMemcpyHostToDevice);
hipMemcpy(d_length, &length, sizeof(long int), hipMemcpyHostToDevice);
int requiredBlocks = (length / SIZE) + 1;
dim3 grid(requiredBlocks, 1, 1);
dim3 block(SIZE, 1, 1);
trial << <grid, block >> > (d_prime, d_number, d_length);
free(prime);
hipFree(d_prime);
hipFree(d_number);
hipFree(d_length);
end = clock();
tempo = ((double)(end - start)) / CLOCKS_PER_SEC;
printf("Time: %f\n", tempo);
}
| f9fe3941d00f2e1d92b043cecafd9e1b53bfe89b.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SIZE 1024
__global__ void trial(long int *prime, long int *number, long int *length) {
long int i = threadIdx.x + blockIdx.x * blockDim.x;
/* long int i = blockIdx.x * blockDim.x * blockDim.y *
blockDim.z + threadIdx.z * blockDim.y * blockDim.x +
threadIdx.y * blockDim.x + threadIdx.x;
*/
if ((i > 1) && (i <= *length))
{
if (prime[i])
{
long int val = i;
if (val * val == *number)
{
printf("\nPrime factors are %ld and %ld\n", val, val);
return;
}
if (*number % val == 0)
{
printf("\nPrime factors are %ld ", val);
long int val2 = *number / val;
printf("and %ld.\n", val2);
}
}
}
__syncthreads();
}
void main()
{
long int *d_length;
long int *prime;
long int *d_prime;
long int n = 2;
long int elim;
long int number;
long int *d_number;
printf("Enter number to factorize: ");
scanf("%d", &number);
clock_t start, end;
double tempo;
start = clock();
long int length = floor(sqrt(number));
prime = (long int *)malloc(SIZE * sizeof(long int));
cudaMalloc((void**) &d_prime, SIZE * sizeof(long int));
cudaMalloc((void**) &d_number, sizeof(long int));
cudaMalloc((void**) &d_length, sizeof(long int));
//Eratosthenes Sieve
for (int i = 0; i < length; i++)
prime[i] = 1;
while (n <= length)
{
if (prime[n] == 1)
{
elim = n + n;
while (elim <= length)
{
prime[elim] = 0;
elim += n;
}
}
n++;
}
cudaMemcpy(d_prime, prime, SIZE * sizeof(long int), cudaMemcpyHostToDevice);
cudaMemcpy(d_number, &number, sizeof(long int), cudaMemcpyHostToDevice);
cudaMemcpy(d_length, &length, sizeof(long int), cudaMemcpyHostToDevice);
int requiredBlocks = (length / SIZE) + 1;
dim3 grid(requiredBlocks, 1, 1);
dim3 block(SIZE, 1, 1);
trial << <grid, block >> > (d_prime, d_number, d_length);
free(prime);
cudaFree(d_prime);
cudaFree(d_number);
cudaFree(d_length);
end = clock();
tempo = ((double)(end - start)) / CLOCKS_PER_SEC;
printf("Time: %f\n", tempo);
}
|
b172c3841bf5ee6eceb27d746eb12463b082ce7d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel_common.h"
#include "datatypes.h"
__device__
score_dt device_ilog2(const score_dt v)
{
if (v < 2) return 0;
else if (v < 4) return 1;
else if (v < 8) return 2;
else if (v < 16) return 3;
else if (v < 32) return 4;
else if (v < 64) return 5;
else if (v < 128) return 6;
else if (v < 256) return 7;
else return 8;
}
__device__
score_dt chain_dp_score(const anchor_dt *active, const anchor_dt curr,
const float avg_qspan, const int max_dist_x, const int max_dist_y, const int bw, const int id)
{
anchor_dt act;
*((short4*)&act) = ((short4*)active)[id];
if (curr.tag != act.tag) return NEG_INF_SCORE_GPU;
score_dt dist_x = act.x - curr.x;
if (dist_x == 0 || dist_x > max_dist_x) return NEG_INF_SCORE_GPU;
score_dt dist_y = act.y - curr.y;
if (dist_y > max_dist_y || dist_y <= 0) return NEG_INF_SCORE_GPU;
score_dt dd = dist_x > dist_y ? dist_x - dist_y : dist_y - dist_x;
if (dd > bw) return NEG_INF_SCORE_GPU;
score_dt min_d = dist_y < dist_x ? dist_y : dist_x;
score_dt log_dd = device_ilog2(dd);
score_dt sc = min_d > act.w ? act.w : min_d;
sc -= (score_dt)(dd * (0.01f * avg_qspan)) + (log_dd >> 1);
return sc;
}
__global__
void device_chain_tiled(
return_dt *ret, const anchor_dt *a,
const control_dt *cont, score_dt **max_tracker_g, parent_dt **j_tracker_g,
const int max_dist_x, const int max_dist_y, const int bw)
{
int block = blockIdx.x;
int id = threadIdx.x;
int ofs = block;
auto control = cont[ofs];
__shared__ anchor_dt active[BACK_SEARCH_COUNT_GPU];
__shared__ score_dt max_tracker[BACK_SEARCH_COUNT_GPU];
__shared__ parent_dt j_tracker[BACK_SEARCH_COUNT_GPU];
((short4*)active)[id] = ((short4*)a)[ofs * TILE_SIZE_ACTUAL + id];
if (control.is_new_read) {
max_tracker[id] = 0;
j_tracker[id] = -1;
} else {
max_tracker[id] = max_tracker_g[ofs][id];
j_tracker[id] = j_tracker_g[ofs][id];
}
for (int i = BACK_SEARCH_COUNT_GPU, curr_idx = 0; curr_idx < TILE_SIZE; i++, curr_idx++) {
__syncthreads();
anchor_dt curr;
*((short4*)&curr) = ((short4*)active)[i % BACK_SEARCH_COUNT_GPU];
score_dt f_curr = max_tracker[i % BACK_SEARCH_COUNT_GPU];
parent_dt p_curr = j_tracker[i % BACK_SEARCH_COUNT_GPU];
if (curr.w >= f_curr) {
f_curr = curr.w;
p_curr = (parent_dt)-1;
}
/* read in new query anchor, put into active array*/
__syncthreads();
if (id == i % BACK_SEARCH_COUNT_GPU) {
((short4*)active)[id] = ((short4*)a)[ofs * TILE_SIZE_ACTUAL + i];
max_tracker[id] = 0;
j_tracker[id] = -1;
}
__syncthreads();
score_dt sc = chain_dp_score(active, curr,
control.avg_qspan, max_dist_x, max_dist_y, bw, id);
__syncthreads();
if (sc + f_curr >= max_tracker[id]) {
max_tracker[id] = sc + f_curr;
j_tracker[id] = (parent_dt)curr_idx + (parent_dt)control.tile_num * TILE_SIZE;
}
__syncthreads();
if (id == curr_idx % BACK_SEARCH_COUNT_GPU) {
return_dt tmp;
tmp.score = f_curr;
tmp.parent = p_curr;
((short4*)ret)[ofs * TILE_SIZE + curr_idx] = *((short4*)&tmp);
}
}
__syncthreads();
max_tracker_g[ofs][id] = max_tracker[id];
j_tracker_g[ofs][id] = j_tracker[id];
}
| b172c3841bf5ee6eceb27d746eb12463b082ce7d.cu | #include "kernel_common.h"
#include "datatypes.h"
__device__
score_dt device_ilog2(const score_dt v)
{
if (v < 2) return 0;
else if (v < 4) return 1;
else if (v < 8) return 2;
else if (v < 16) return 3;
else if (v < 32) return 4;
else if (v < 64) return 5;
else if (v < 128) return 6;
else if (v < 256) return 7;
else return 8;
}
__device__
score_dt chain_dp_score(const anchor_dt *active, const anchor_dt curr,
const float avg_qspan, const int max_dist_x, const int max_dist_y, const int bw, const int id)
{
anchor_dt act;
*((short4*)&act) = ((short4*)active)[id];
if (curr.tag != act.tag) return NEG_INF_SCORE_GPU;
score_dt dist_x = act.x - curr.x;
if (dist_x == 0 || dist_x > max_dist_x) return NEG_INF_SCORE_GPU;
score_dt dist_y = act.y - curr.y;
if (dist_y > max_dist_y || dist_y <= 0) return NEG_INF_SCORE_GPU;
score_dt dd = dist_x > dist_y ? dist_x - dist_y : dist_y - dist_x;
if (dd > bw) return NEG_INF_SCORE_GPU;
score_dt min_d = dist_y < dist_x ? dist_y : dist_x;
score_dt log_dd = device_ilog2(dd);
score_dt sc = min_d > act.w ? act.w : min_d;
sc -= (score_dt)(dd * (0.01f * avg_qspan)) + (log_dd >> 1);
return sc;
}
__global__
void device_chain_tiled(
return_dt *ret, const anchor_dt *a,
const control_dt *cont, score_dt **max_tracker_g, parent_dt **j_tracker_g,
const int max_dist_x, const int max_dist_y, const int bw)
{
int block = blockIdx.x;
int id = threadIdx.x;
int ofs = block;
auto control = cont[ofs];
__shared__ anchor_dt active[BACK_SEARCH_COUNT_GPU];
__shared__ score_dt max_tracker[BACK_SEARCH_COUNT_GPU];
__shared__ parent_dt j_tracker[BACK_SEARCH_COUNT_GPU];
((short4*)active)[id] = ((short4*)a)[ofs * TILE_SIZE_ACTUAL + id];
if (control.is_new_read) {
max_tracker[id] = 0;
j_tracker[id] = -1;
} else {
max_tracker[id] = max_tracker_g[ofs][id];
j_tracker[id] = j_tracker_g[ofs][id];
}
for (int i = BACK_SEARCH_COUNT_GPU, curr_idx = 0; curr_idx < TILE_SIZE; i++, curr_idx++) {
__syncthreads();
anchor_dt curr;
*((short4*)&curr) = ((short4*)active)[i % BACK_SEARCH_COUNT_GPU];
score_dt f_curr = max_tracker[i % BACK_SEARCH_COUNT_GPU];
parent_dt p_curr = j_tracker[i % BACK_SEARCH_COUNT_GPU];
if (curr.w >= f_curr) {
f_curr = curr.w;
p_curr = (parent_dt)-1;
}
/* read in new query anchor, put into active array*/
__syncthreads();
if (id == i % BACK_SEARCH_COUNT_GPU) {
((short4*)active)[id] = ((short4*)a)[ofs * TILE_SIZE_ACTUAL + i];
max_tracker[id] = 0;
j_tracker[id] = -1;
}
__syncthreads();
score_dt sc = chain_dp_score(active, curr,
control.avg_qspan, max_dist_x, max_dist_y, bw, id);
__syncthreads();
if (sc + f_curr >= max_tracker[id]) {
max_tracker[id] = sc + f_curr;
j_tracker[id] = (parent_dt)curr_idx + (parent_dt)control.tile_num * TILE_SIZE;
}
__syncthreads();
if (id == curr_idx % BACK_SEARCH_COUNT_GPU) {
return_dt tmp;
tmp.score = f_curr;
tmp.parent = p_curr;
((short4*)ret)[ofs * TILE_SIZE + curr_idx] = *((short4*)&tmp);
}
}
__syncthreads();
max_tracker_g[ofs][id] = max_tracker[id];
j_tracker_g[ofs][id] = j_tracker[id];
}
|
aaddeaa38b4498f2f96041c06485fb89726a93e7.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <hiprand/hiprand_kernel.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
#include "simpleMPIKernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
hipSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
float *input = NULL;
hipMalloc(&input, XSIZE*YSIZE);
float *output = NULL;
hipMalloc(&output, XSIZE*YSIZE);
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
hipFree(0);hipLaunchKernelGGL((
simpleMPIKernel), dim3(gridBlock),dim3(threadBlock), 0, 0, input,output);
hipDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {hipLaunchKernelGGL((
simpleMPIKernel), dim3(gridBlock),dim3(threadBlock), 0, 0, input,output);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {hipLaunchKernelGGL((
simpleMPIKernel), dim3(gridBlock),dim3(threadBlock), 0, 0, input,output);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} | aaddeaa38b4498f2f96041c06485fb89726a93e7.cu | #include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <curand_kernel.h>
#include <stdlib.h>
#include <cuda.h>
#include <sys/time.h>
#include "simpleMPIKernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
cudaSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
float *input = NULL;
cudaMalloc(&input, XSIZE*YSIZE);
float *output = NULL;
cudaMalloc(&output, XSIZE*YSIZE);
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
cudaFree(0);
simpleMPIKernel<<<gridBlock,threadBlock>>>(input,output);
cudaDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {
simpleMPIKernel<<<gridBlock,threadBlock>>>(input,output);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {
simpleMPIKernel<<<gridBlock,threadBlock>>>(input,output);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} |
47767e325d043f71066d3741b80a670b9c36b8f8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#if !defined CUDA_DISABLER
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/vec_traits.hpp"
#include "opencv2/core/cuda/vec_math.hpp"
#include "opencv2/core/cuda/border_interpolate.hpp"
using namespace cv::cuda;
typedef unsigned char uchar;
typedef unsigned short ushort;
//////////////////////////////////////////////////////////////////////////////////
/// Bilateral filtering
namespace cv { namespace cuda { namespace device
{
namespace imgproc
{
__device__ __forceinline__ float norm_l1(const float& a) { return ::fabs(a); }
__device__ __forceinline__ float norm_l1(const float2& a) { return ::fabs(a.x) + ::fabs(a.y); }
__device__ __forceinline__ float norm_l1(const float3& a) { return ::fabs(a.x) + ::fabs(a.y) + ::fabs(a.z); }
__device__ __forceinline__ float norm_l1(const float4& a) { return ::fabs(a.x) + ::fabs(a.y) + ::fabs(a.z) + ::fabs(a.w); }
__device__ __forceinline__ float sqr(const float& a) { return a * a; }
template<typename T, typename B>
__global__ void bilateral_kernel(const PtrStepSz<T> src, PtrStep<T> dst, const B b, const int ksz, const float sigma_spatial2_inv_half, const float sigma_color2_inv_half)
{
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type value_type;
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
if (x >= src.cols || y >= src.rows)
return;
value_type center = saturate_cast<value_type>(src(y, x));
value_type sum1 = VecTraits<value_type>::all(0);
float sum2 = 0;
int r = ksz / 2;
float r2 = (float)(r * r);
int tx = x - r + ksz;
int ty = y - r + ksz;
if (x - ksz/2 >=0 && y - ksz/2 >=0 && tx < src.cols && ty < src.rows)
{
for (int cy = y - r; cy < ty; ++cy)
for (int cx = x - r; cx < tx; ++cx)
{
float space2 = (x - cx) * (x - cx) + (y - cy) * (y - cy);
if (space2 > r2)
continue;
value_type value = saturate_cast<value_type>(src(cy, cx));
float weight = ::exp(space2 * sigma_spatial2_inv_half + sqr(norm_l1(value - center)) * sigma_color2_inv_half);
sum1 = sum1 + weight * value;
sum2 = sum2 + weight;
}
}
else
{
for (int cy = y - r; cy < ty; ++cy)
for (int cx = x - r; cx < tx; ++cx)
{
float space2 = (x - cx) * (x - cx) + (y - cy) * (y - cy);
if (space2 > r2)
continue;
value_type value = saturate_cast<value_type>(b.at(cy, cx, src.data, src.step));
float weight = ::exp(space2 * sigma_spatial2_inv_half + sqr(norm_l1(value - center)) * sigma_color2_inv_half);
sum1 = sum1 + weight * value;
sum2 = sum2 + weight;
}
}
dst(y, x) = saturate_cast<T>(sum1 / sum2);
}
template<typename T, template <typename> class B>
void bilateral_caller(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float sigma_spatial, float sigma_color, hipStream_t stream)
{
dim3 block (32, 8);
dim3 grid (divUp (src.cols, block.x), divUp (src.rows, block.y));
B<T> b(src.rows, src.cols);
float sigma_spatial2_inv_half = -0.5f/(sigma_spatial * sigma_spatial);
float sigma_color2_inv_half = -0.5f/(sigma_color * sigma_color);
cudaSafeCall( hipFuncSetCacheConfig (bilateral_kernel<T, B<T> >, hipFuncCachePreferL1) );
hipLaunchKernelGGL(( bilateral_kernel), dim3(grid), dim3(block), 0, 0, (PtrStepSz<T>)src, (PtrStepSz<T>)dst, b, kernel_size, sigma_spatial2_inv_half, sigma_color2_inv_half);
cudaSafeCall ( hipGetLastError () );
if (stream == 0)
cudaSafeCall( hipDeviceSynchronize() );
}
template<typename T>
void bilateral_filter_gpu(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float gauss_spatial_coeff, float gauss_color_coeff, int borderMode, hipStream_t stream)
{
typedef void (*caller_t)(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float sigma_spatial, float sigma_color, hipStream_t stream);
static caller_t funcs[] =
{
bilateral_caller<T, BrdConstant>,
bilateral_caller<T, BrdReplicate>,
bilateral_caller<T, BrdReflect>,
bilateral_caller<T, BrdWrap>,
bilateral_caller<T, BrdReflect101>
};
funcs[borderMode](src, dst, kernel_size, gauss_spatial_coeff, gauss_color_coeff, stream);
}
}
}}}
#define OCV_INSTANTIATE_BILATERAL_FILTER(T) \
template void cv::cuda::device::imgproc::bilateral_filter_gpu<T>(const PtrStepSzb&, PtrStepSzb, int, float, float, int, hipStream_t);
OCV_INSTANTIATE_BILATERAL_FILTER(uchar)
//OCV_INSTANTIATE_BILATERAL_FILTER(uchar2)
OCV_INSTANTIATE_BILATERAL_FILTER(uchar3)
OCV_INSTANTIATE_BILATERAL_FILTER(uchar4)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar2)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar3)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar4)
OCV_INSTANTIATE_BILATERAL_FILTER(short)
//OCV_INSTANTIATE_BILATERAL_FILTER(short2)
OCV_INSTANTIATE_BILATERAL_FILTER(short3)
OCV_INSTANTIATE_BILATERAL_FILTER(short4)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort)
//OCV_INSTANTIATE_BILATERAL_FILTER(ushort2)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort3)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort4)
//OCV_INSTANTIATE_BILATERAL_FILTER(int)
//OCV_INSTANTIATE_BILATERAL_FILTER(int2)
//OCV_INSTANTIATE_BILATERAL_FILTER(int3)
//OCV_INSTANTIATE_BILATERAL_FILTER(int4)
OCV_INSTANTIATE_BILATERAL_FILTER(float)
//OCV_INSTANTIATE_BILATERAL_FILTER(float2)
OCV_INSTANTIATE_BILATERAL_FILTER(float3)
OCV_INSTANTIATE_BILATERAL_FILTER(float4)
#endif /* CUDA_DISABLER */
| 47767e325d043f71066d3741b80a670b9c36b8f8.cu | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#if !defined CUDA_DISABLER
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/vec_traits.hpp"
#include "opencv2/core/cuda/vec_math.hpp"
#include "opencv2/core/cuda/border_interpolate.hpp"
using namespace cv::cuda;
typedef unsigned char uchar;
typedef unsigned short ushort;
//////////////////////////////////////////////////////////////////////////////////
/// Bilateral filtering
namespace cv { namespace cuda { namespace device
{
namespace imgproc
{
__device__ __forceinline__ float norm_l1(const float& a) { return ::fabs(a); }
__device__ __forceinline__ float norm_l1(const float2& a) { return ::fabs(a.x) + ::fabs(a.y); }
__device__ __forceinline__ float norm_l1(const float3& a) { return ::fabs(a.x) + ::fabs(a.y) + ::fabs(a.z); }
__device__ __forceinline__ float norm_l1(const float4& a) { return ::fabs(a.x) + ::fabs(a.y) + ::fabs(a.z) + ::fabs(a.w); }
__device__ __forceinline__ float sqr(const float& a) { return a * a; }
template<typename T, typename B>
__global__ void bilateral_kernel(const PtrStepSz<T> src, PtrStep<T> dst, const B b, const int ksz, const float sigma_spatial2_inv_half, const float sigma_color2_inv_half)
{
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type value_type;
int x = threadIdx.x + blockIdx.x * blockDim.x;
int y = threadIdx.y + blockIdx.y * blockDim.y;
if (x >= src.cols || y >= src.rows)
return;
value_type center = saturate_cast<value_type>(src(y, x));
value_type sum1 = VecTraits<value_type>::all(0);
float sum2 = 0;
int r = ksz / 2;
float r2 = (float)(r * r);
int tx = x - r + ksz;
int ty = y - r + ksz;
if (x - ksz/2 >=0 && y - ksz/2 >=0 && tx < src.cols && ty < src.rows)
{
for (int cy = y - r; cy < ty; ++cy)
for (int cx = x - r; cx < tx; ++cx)
{
float space2 = (x - cx) * (x - cx) + (y - cy) * (y - cy);
if (space2 > r2)
continue;
value_type value = saturate_cast<value_type>(src(cy, cx));
float weight = ::exp(space2 * sigma_spatial2_inv_half + sqr(norm_l1(value - center)) * sigma_color2_inv_half);
sum1 = sum1 + weight * value;
sum2 = sum2 + weight;
}
}
else
{
for (int cy = y - r; cy < ty; ++cy)
for (int cx = x - r; cx < tx; ++cx)
{
float space2 = (x - cx) * (x - cx) + (y - cy) * (y - cy);
if (space2 > r2)
continue;
value_type value = saturate_cast<value_type>(b.at(cy, cx, src.data, src.step));
float weight = ::exp(space2 * sigma_spatial2_inv_half + sqr(norm_l1(value - center)) * sigma_color2_inv_half);
sum1 = sum1 + weight * value;
sum2 = sum2 + weight;
}
}
dst(y, x) = saturate_cast<T>(sum1 / sum2);
}
template<typename T, template <typename> class B>
void bilateral_caller(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float sigma_spatial, float sigma_color, cudaStream_t stream)
{
dim3 block (32, 8);
dim3 grid (divUp (src.cols, block.x), divUp (src.rows, block.y));
B<T> b(src.rows, src.cols);
float sigma_spatial2_inv_half = -0.5f/(sigma_spatial * sigma_spatial);
float sigma_color2_inv_half = -0.5f/(sigma_color * sigma_color);
cudaSafeCall( cudaFuncSetCacheConfig (bilateral_kernel<T, B<T> >, cudaFuncCachePreferL1) );
bilateral_kernel<<<grid, block>>>((PtrStepSz<T>)src, (PtrStepSz<T>)dst, b, kernel_size, sigma_spatial2_inv_half, sigma_color2_inv_half);
cudaSafeCall ( cudaGetLastError () );
if (stream == 0)
cudaSafeCall( cudaDeviceSynchronize() );
}
template<typename T>
void bilateral_filter_gpu(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float gauss_spatial_coeff, float gauss_color_coeff, int borderMode, cudaStream_t stream)
{
typedef void (*caller_t)(const PtrStepSzb& src, PtrStepSzb dst, int kernel_size, float sigma_spatial, float sigma_color, cudaStream_t stream);
static caller_t funcs[] =
{
bilateral_caller<T, BrdConstant>,
bilateral_caller<T, BrdReplicate>,
bilateral_caller<T, BrdReflect>,
bilateral_caller<T, BrdWrap>,
bilateral_caller<T, BrdReflect101>
};
funcs[borderMode](src, dst, kernel_size, gauss_spatial_coeff, gauss_color_coeff, stream);
}
}
}}}
#define OCV_INSTANTIATE_BILATERAL_FILTER(T) \
template void cv::cuda::device::imgproc::bilateral_filter_gpu<T>(const PtrStepSzb&, PtrStepSzb, int, float, float, int, cudaStream_t);
OCV_INSTANTIATE_BILATERAL_FILTER(uchar)
//OCV_INSTANTIATE_BILATERAL_FILTER(uchar2)
OCV_INSTANTIATE_BILATERAL_FILTER(uchar3)
OCV_INSTANTIATE_BILATERAL_FILTER(uchar4)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar2)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar3)
//OCV_INSTANTIATE_BILATERAL_FILTER(schar4)
OCV_INSTANTIATE_BILATERAL_FILTER(short)
//OCV_INSTANTIATE_BILATERAL_FILTER(short2)
OCV_INSTANTIATE_BILATERAL_FILTER(short3)
OCV_INSTANTIATE_BILATERAL_FILTER(short4)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort)
//OCV_INSTANTIATE_BILATERAL_FILTER(ushort2)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort3)
OCV_INSTANTIATE_BILATERAL_FILTER(ushort4)
//OCV_INSTANTIATE_BILATERAL_FILTER(int)
//OCV_INSTANTIATE_BILATERAL_FILTER(int2)
//OCV_INSTANTIATE_BILATERAL_FILTER(int3)
//OCV_INSTANTIATE_BILATERAL_FILTER(int4)
OCV_INSTANTIATE_BILATERAL_FILTER(float)
//OCV_INSTANTIATE_BILATERAL_FILTER(float2)
OCV_INSTANTIATE_BILATERAL_FILTER(float3)
OCV_INSTANTIATE_BILATERAL_FILTER(float4)
#endif /* CUDA_DISABLER */
|
fb1a096434a11ba4b7636d4eebb25ca6b2a3f12f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* * License for the specific language governing permissions and limitations
* * under the License.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
//
// @author GS <[email protected]>
//
#include <system/op_boilerplate.h>
#include <array/NDArray.h>
#include <helpers/MmulHelper.h>
#include <helpers/ShapeUtils.h>
#include <helpers/ConstantTadHelper.h>
#include <ops/declarable/helpers/triangular_solve.h>
#include <ops/declarable/helpers/lup.h>
#include <ops/declarable/helpers/qr.h>
#include <ops/declarable/helpers/lstsq.h>
namespace sd {
namespace ops {
namespace helpers {
template <typename T>
static __global__ void fillRegularizerKernel(T* ioMatrixData, const Nd4jLong* ioMatrixShape, const Nd4jLong* ioMatrixTads, const Nd4jLong* ioMatrixOffsets, Nd4jLong batchSize, Nd4jLong rows, T const value) {
for (auto x = blockIdx.x; x < batchSize; x += gridDim.x) {
auto z = ioMatrixData + ioMatrixOffsets[x];
for (auto r = threadIdx.x; r < rows; r += blockDim.x) {
Nd4jLong pos[] = {r,r};
auto zIndex = shape::getOffset(ioMatrixTads, pos);
z[zIndex] = value;
}
}
}
template <typename T>
static void fillRegularizer(sd::LaunchContext* context, NDArray& ioMatrix, double const value) {
auto lastDimsTads = ConstantTadHelper::getInstance().tadForDimensions(ioMatrix.shapeInfo(), {-2, -1});
auto stream = context->getCudaStream();
auto rows = ioMatrix.sizeAt(-2);
//auto cols = ioMatrix.sizeAt(-1);
hipLaunchKernelGGL(( fillRegularizerKernel<T>), dim3(256), dim3(256), 128, *stream, ioMatrix.dataBuffer()->specialAsT<T>(), ioMatrix.specialShapeInfo(), lastDimsTads.specialShapeInfo(), lastDimsTads.specialOffsets(), lastDimsTads.numberOfTads(), rows, (T)value);
}
template <typename T>
int leastSquaresSolveFunctor_(sd::LaunchContext* context, NDArray const* leftInput, NDArray const* rightInput, double const l2Regularizer, bool const fast, NDArray* output) {
if (fast) { // Cholesky decomposition approach
// Equation for solve A^T * Ax = A^T * b, so
// 1. Computing A2:
auto tAtShape = ShapeUtils::evalShapeForMatmul(leftInput->shapeInfo(), leftInput->shapeInfo(), true, false);
//tAtShape[tAtShape.size() - 2] = output->sizeAt(-2);
NDArray leftOutput(leftInput->ordering(), tAtShape, output->dataType(), context);
MmulHelper::matmul(leftInput, leftInput, &leftOutput, true, false); // Computing A2 = A^T * A
// 2. Computing B' = A^T * b
auto rightOutput = output->ulike();
MmulHelper::matmul(leftInput, rightInput, &rightOutput, true, false); // Computing B' = A^T * b
// 3. Regularization ( indeed A' = A2 - l2Regularizer * I)
if (l2Regularizer != 0.0) {
auto regularizer = leftOutput.ulike(); regularizer.nullify();
fillRegularizer<T>(context, regularizer, (T)l2Regularizer);
leftOutput += regularizer;
}
// 4. Cholesky decomposition -- output matrix is square and lower triangular
helpers::cholesky(context, &leftOutput, &leftOutput, true); // inplace decomposition
// 5. Solve two triangular systems:
auto rightB = rightOutput.ulike(); rightB.nullify();
helpers::triangularSolveFunctor(context, &leftOutput, &rightOutput, true, false, &rightB);
helpers::adjointMatrix(context, &leftOutput, true, &leftOutput);
helpers::triangularSolveFunctor(context, &leftOutput, &rightB, false, false, output);
// All done
}
else { // QR decomposition approach
// Equation for solve Rx = Q^T * b, where A = Q * R, where Q - orthogonal matrix, and R - upper triangular
// 1. QR decomposition
auto qShape = leftInput->getShapeAsVector();
auto rShape = leftInput->getShapeAsVector();
qShape[leftInput->rankOf() - 1] = leftInput->sizeAt(-2);
NDArray Q(leftInput->ordering(), qShape, leftInput->dataType(), context);// = leftInput->ulike();
NDArray R(leftInput->ordering(), rShape, leftInput->dataType(), context); // = rightInput->ulike();
helpers::qr(context, leftInput, &Q, &R, true);
// 2. b` = Q^t * b:
auto rightOutput = rightInput->ulike();
MmulHelper::matmul(&Q, rightInput, &rightOutput, true, false);
// 3. Solve triangular system
helpers::triangularSolveFunctor(context, &R, &rightOutput, false, false, output);
}
return Status::OK();
}
int leastSquaresSolveFunctor(sd::LaunchContext* context, NDArray const* leftInput, NDArray const* rightInput, double const l2Regularizer, bool const fast, NDArray* output) {
BUILD_SINGLE_SELECTOR(leftInput->dataType(), return leastSquaresSolveFunctor_, (context, leftInput, rightInput, l2Regularizer, fast, output), FLOAT_TYPES);
}
}
}
}
| fb1a096434a11ba4b7636d4eebb25ca6b2a3f12f.cu | /*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* * License for the specific language governing permissions and limitations
* * under the License.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
//
// @author GS <[email protected]>
//
#include <system/op_boilerplate.h>
#include <array/NDArray.h>
#include <helpers/MmulHelper.h>
#include <helpers/ShapeUtils.h>
#include <helpers/ConstantTadHelper.h>
#include <ops/declarable/helpers/triangular_solve.h>
#include <ops/declarable/helpers/lup.h>
#include <ops/declarable/helpers/qr.h>
#include <ops/declarable/helpers/lstsq.h>
namespace sd {
namespace ops {
namespace helpers {
template <typename T>
static __global__ void fillRegularizerKernel(T* ioMatrixData, const Nd4jLong* ioMatrixShape, const Nd4jLong* ioMatrixTads, const Nd4jLong* ioMatrixOffsets, Nd4jLong batchSize, Nd4jLong rows, T const value) {
for (auto x = blockIdx.x; x < batchSize; x += gridDim.x) {
auto z = ioMatrixData + ioMatrixOffsets[x];
for (auto r = threadIdx.x; r < rows; r += blockDim.x) {
Nd4jLong pos[] = {r,r};
auto zIndex = shape::getOffset(ioMatrixTads, pos);
z[zIndex] = value;
}
}
}
template <typename T>
static void fillRegularizer(sd::LaunchContext* context, NDArray& ioMatrix, double const value) {
auto lastDimsTads = ConstantTadHelper::getInstance().tadForDimensions(ioMatrix.shapeInfo(), {-2, -1});
auto stream = context->getCudaStream();
auto rows = ioMatrix.sizeAt(-2);
//auto cols = ioMatrix.sizeAt(-1);
fillRegularizerKernel<T><<<256, 256, 128, *stream>>>(ioMatrix.dataBuffer()->specialAsT<T>(), ioMatrix.specialShapeInfo(), lastDimsTads.specialShapeInfo(), lastDimsTads.specialOffsets(), lastDimsTads.numberOfTads(), rows, (T)value);
}
template <typename T>
int leastSquaresSolveFunctor_(sd::LaunchContext* context, NDArray const* leftInput, NDArray const* rightInput, double const l2Regularizer, bool const fast, NDArray* output) {
if (fast) { // Cholesky decomposition approach
// Equation for solve A^T * Ax = A^T * b, so
// 1. Computing A2:
auto tAtShape = ShapeUtils::evalShapeForMatmul(leftInput->shapeInfo(), leftInput->shapeInfo(), true, false);
//tAtShape[tAtShape.size() - 2] = output->sizeAt(-2);
NDArray leftOutput(leftInput->ordering(), tAtShape, output->dataType(), context);
MmulHelper::matmul(leftInput, leftInput, &leftOutput, true, false); // Computing A2 = A^T * A
// 2. Computing B' = A^T * b
auto rightOutput = output->ulike();
MmulHelper::matmul(leftInput, rightInput, &rightOutput, true, false); // Computing B' = A^T * b
// 3. Regularization ( indeed A' = A2 - l2Regularizer * I)
if (l2Regularizer != 0.0) {
auto regularizer = leftOutput.ulike(); regularizer.nullify();
fillRegularizer<T>(context, regularizer, (T)l2Regularizer);
leftOutput += regularizer;
}
// 4. Cholesky decomposition -- output matrix is square and lower triangular
helpers::cholesky(context, &leftOutput, &leftOutput, true); // inplace decomposition
// 5. Solve two triangular systems:
auto rightB = rightOutput.ulike(); rightB.nullify();
helpers::triangularSolveFunctor(context, &leftOutput, &rightOutput, true, false, &rightB);
helpers::adjointMatrix(context, &leftOutput, true, &leftOutput);
helpers::triangularSolveFunctor(context, &leftOutput, &rightB, false, false, output);
// All done
}
else { // QR decomposition approach
// Equation for solve Rx = Q^T * b, where A = Q * R, where Q - orthogonal matrix, and R - upper triangular
// 1. QR decomposition
auto qShape = leftInput->getShapeAsVector();
auto rShape = leftInput->getShapeAsVector();
qShape[leftInput->rankOf() - 1] = leftInput->sizeAt(-2);
NDArray Q(leftInput->ordering(), qShape, leftInput->dataType(), context);// = leftInput->ulike();
NDArray R(leftInput->ordering(), rShape, leftInput->dataType(), context); // = rightInput->ulike();
helpers::qr(context, leftInput, &Q, &R, true);
// 2. b` = Q^t * b:
auto rightOutput = rightInput->ulike();
MmulHelper::matmul(&Q, rightInput, &rightOutput, true, false);
// 3. Solve triangular system
helpers::triangularSolveFunctor(context, &R, &rightOutput, false, false, output);
}
return Status::OK();
}
int leastSquaresSolveFunctor(sd::LaunchContext* context, NDArray const* leftInput, NDArray const* rightInput, double const l2Regularizer, bool const fast, NDArray* output) {
BUILD_SINGLE_SELECTOR(leftInput->dataType(), return leastSquaresSolveFunctor_, (context, leftInput, rightInput, l2Regularizer, fast, output), FLOAT_TYPES);
}
}
}
}
|
4061fb3a8c06476891696cd1440033baf44a84c8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <read_gauge.h>
#include <gauge_field.h>
#include "gauge_force_quda.h"
__constant__ int path_max_length;
#define GF_SITE_MATRIX_LOAD_TEX 1
//single precsison, 12-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE_TEX(siteLink0TexSingle_recon, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE_TEX(siteLink1TexSingle_recon, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var) RECONSTRUCT_LINK_12(dir,idx,sign,var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4
#define N_IN_FLOATN 4
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_sp12
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//double precsison, 12-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE_TEX(siteLink0TexDouble, linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE_TEX(siteLink1TexDouble, linkOdd, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var) RECONSTRUCT_LINK_12(dir,idx,sign,var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_dp12
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//single precision, 18-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18_SINGLE_TEX(siteLink0TexSingle, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18_SINGLE_TEX(siteLink1TexSingle, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_sp18
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//double precision, 18-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18_DOUBLE_TEX(siteLink0TexDouble, linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18_DOUBLE_TEX(siteLink1TexDouble, linkOdd, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_dp18
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
void
gauge_force_init_cuda(QudaGaugeParam* param, int path_max_length)
{
#ifdef MULTI_GPU
#error "multi gpu is not supported for gauge force computation"
#endif
static int gauge_force_init_cuda_flag = 0;
if (gauge_force_init_cuda_flag){
return;
}
gauge_force_init_cuda_flag=1;
init_kernel_cuda(param);
hipMemcpyToSymbol("path_max_length", &path_max_length, sizeof(int));
}
void
gauge_force_cuda(cudaGaugeField& cudaMom, int dir, double eb3, cudaGaugeField& cudaSiteLink,
QudaGaugeParam* param, int** input_path,
int* length, void* path_coeff, int num_paths, int max_length)
{
int i, j;
//input_path
int bytes = num_paths*max_length* sizeof(int);
int* input_path_d;
hipMalloc((void**)&input_path_d, bytes); checkCudaError();
hipMemset(input_path_d, 0, bytes);checkCudaError();
int* input_path_h = (int*)malloc(bytes);
if (input_path_h == NULL){
printf("ERROR: malloc failed for input_path_h in function %s\n", __FUNCTION__);
exit(1);
}
memset(input_path_h, 0, bytes);
for(i=0;i < num_paths;i++){
for(j=0; j < length[i]; j++){
input_path_h[i*max_length + j] =input_path[i][j];
}
}
hipMemcpy(input_path_d, input_path_h, bytes, hipMemcpyHostToDevice); checkCudaError();
//length
int* length_d;
hipMalloc((void**)&length_d, num_paths*sizeof(int)); checkCudaError();
hipMemcpy(length_d, length, num_paths*sizeof(int), hipMemcpyHostToDevice); checkCudaError();
//path_coeff
int gsize;
if (param->cuda_prec == QUDA_DOUBLE_PRECISION){
gsize = sizeof(double);
}else{
gsize= sizeof(float);
}
void* path_coeff_d;
hipMalloc((void**)&path_coeff_d, num_paths*gsize); checkCudaError();
hipMemcpy(path_coeff_d, path_coeff, num_paths*gsize, hipMemcpyHostToDevice); checkCudaError();
//compute the gauge forces
int volume = param->X[0]*param->X[1]*param->X[2]*param->X[3];
dim3 blockDim(BLOCK_DIM, 1,1);
dim3 gridDim(volume/blockDim.x, 1, 1);
dim3 halfGridDim(volume/(2*blockDim.x), 1, 1);
void* momEven = (void*)cudaMom.Even_p();
void* momOdd = (void*)cudaMom.Odd_p();
void* linkEven = (void*)cudaSiteLink.Even_p();
void* linkOdd = (void*)cudaSiteLink.Odd_p();
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
hipBindTexture(0, siteLink0TexDouble, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
hipBindTexture(0, siteLink1TexDouble, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
hipBindTexture(0, siteLink0TexSingle, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
hipBindTexture(0, siteLink1TexSingle, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}else{//QUDA_RECONSTRUCT_12
hipBindTexture(0, siteLink0TexSingle_recon, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
hipBindTexture(0, siteLink1TexSingle_recon, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}
}
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_dp18<0>), dim3(halfGridDim), dim3(blockDim), 0, 0, (double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_dp18<1>), dim3(halfGridDim), dim3(blockDim), 0, 0, (double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
}else{ //QUDA_RECONSTRUCT_12
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_dp12<0>), dim3(halfGridDim), dim3(blockDim), 0, 0, (double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_dp12<1>), dim3(halfGridDim), dim3(blockDim), 0, 0, (double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
}
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_sp18<0>), dim3(halfGridDim), dim3(blockDim), 0, 0, (float2*)momEven, (float2*)momOdd,
dir, eb3,
(float2*)linkEven, (float2*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_sp18<1>), dim3(halfGridDim), dim3(blockDim), 0, 0, (float2*)momEven, (float2*)momOdd,
dir, eb3,
(float2*)linkEven, (float2*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
}else{ //QUDA_RECONSTRUCT_12
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_sp12<0>), dim3(halfGridDim), dim3(blockDim), 0, 0, (float2*)momEven, (float2*)momOdd,
dir, eb3,
(float4*)linkEven, (float4*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
//odd
/* The reason we do not switch the even/odd function input paramemters and the texture binding
* is that we use the oddbit to decided where to load, in the kernel function
*/
hipLaunchKernelGGL(( parity_compute_gauge_force_kernel_sp12<1>), dim3(halfGridDim), dim3(blockDim), 0, 0, (float2*)momEven, (float2*)momOdd,
dir, eb3,
(float4*)linkEven, (float4*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
}
}
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
hipUnbindTexture(siteLink0TexDouble);
hipUnbindTexture(siteLink1TexDouble);
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
hipUnbindTexture(siteLink0TexSingle);
hipUnbindTexture(siteLink1TexSingle);
}else{//QUDA_RECONSTRUCT_12
hipUnbindTexture(siteLink0TexSingle_recon);
hipUnbindTexture(siteLink1TexSingle_recon);
}
}
checkCudaError();
hipFree(input_path_d); checkCudaError();
free(input_path_h);
hipFree(length_d);
hipFree(path_coeff_d);
}
| 4061fb3a8c06476891696cd1440033baf44a84c8.cu | #include <read_gauge.h>
#include <gauge_field.h>
#include "gauge_force_quda.h"
__constant__ int path_max_length;
#define GF_SITE_MATRIX_LOAD_TEX 1
//single precsison, 12-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE_TEX(siteLink0TexSingle_recon, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE_TEX(siteLink1TexSingle_recon, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_SINGLE(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var) RECONSTRUCT_LINK_12(dir,idx,sign,var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4
#define N_IN_FLOATN 4
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_sp12
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//double precsison, 12-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE_TEX(siteLink0TexDouble, linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE_TEX(siteLink1TexDouble, linkOdd, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_12_DOUBLE(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var) RECONSTRUCT_LINK_12(dir,idx,sign,var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_dp12
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//single precision, 18-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18_SINGLE_TEX(siteLink0TexSingle, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18_SINGLE_TEX(siteLink1TexSingle, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_sp18
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
//double precision, 18-reconstruct
#if (GF_SITE_MATRIX_LOAD_TEX == 1)
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18_DOUBLE_TEX(siteLink0TexDouble, linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18_DOUBLE_TEX(siteLink1TexDouble, linkOdd, dir, idx, var, Vh)
#else
#define LOAD_EVEN_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkEven, dir, idx, var, Vh)
#define LOAD_ODD_MATRIX(dir, idx, var) LOAD_MATRIX_18(linkOdd, dir, idx, var, Vh)
#endif
#define LOAD_ANTI_HERMITIAN LOAD_ANTI_HERMITIAN_DIRECT
#define RECONSTRUCT_MATRIX(dir, idx, sign, var)
#define DECLARE_LINK_VARS(var) FloatN var##0, var##1, var##2, var##3, var##4, var##5, var##6, var##7, var##8
#define N_IN_FLOATN 2
#define GAUGE_FORCE_KERN_NAME parity_compute_gauge_force_kernel_dp18
#include "gauge_force_core.h"
#undef LOAD_EVEN_MATRIX
#undef LOAD_ODD_MATRIX
#undef LOAD_ANTI_HERMITIAN
#undef RECONSTRUCT_MATRIX
#undef DECLARE_LINK_VARS
#undef N_IN_FLOATN
#undef GAUGE_FORCE_KERN_NAME
void
gauge_force_init_cuda(QudaGaugeParam* param, int path_max_length)
{
#ifdef MULTI_GPU
#error "multi gpu is not supported for gauge force computation"
#endif
static int gauge_force_init_cuda_flag = 0;
if (gauge_force_init_cuda_flag){
return;
}
gauge_force_init_cuda_flag=1;
init_kernel_cuda(param);
cudaMemcpyToSymbol("path_max_length", &path_max_length, sizeof(int));
}
void
gauge_force_cuda(cudaGaugeField& cudaMom, int dir, double eb3, cudaGaugeField& cudaSiteLink,
QudaGaugeParam* param, int** input_path,
int* length, void* path_coeff, int num_paths, int max_length)
{
int i, j;
//input_path
int bytes = num_paths*max_length* sizeof(int);
int* input_path_d;
cudaMalloc((void**)&input_path_d, bytes); checkCudaError();
cudaMemset(input_path_d, 0, bytes);checkCudaError();
int* input_path_h = (int*)malloc(bytes);
if (input_path_h == NULL){
printf("ERROR: malloc failed for input_path_h in function %s\n", __FUNCTION__);
exit(1);
}
memset(input_path_h, 0, bytes);
for(i=0;i < num_paths;i++){
for(j=0; j < length[i]; j++){
input_path_h[i*max_length + j] =input_path[i][j];
}
}
cudaMemcpy(input_path_d, input_path_h, bytes, cudaMemcpyHostToDevice); checkCudaError();
//length
int* length_d;
cudaMalloc((void**)&length_d, num_paths*sizeof(int)); checkCudaError();
cudaMemcpy(length_d, length, num_paths*sizeof(int), cudaMemcpyHostToDevice); checkCudaError();
//path_coeff
int gsize;
if (param->cuda_prec == QUDA_DOUBLE_PRECISION){
gsize = sizeof(double);
}else{
gsize= sizeof(float);
}
void* path_coeff_d;
cudaMalloc((void**)&path_coeff_d, num_paths*gsize); checkCudaError();
cudaMemcpy(path_coeff_d, path_coeff, num_paths*gsize, cudaMemcpyHostToDevice); checkCudaError();
//compute the gauge forces
int volume = param->X[0]*param->X[1]*param->X[2]*param->X[3];
dim3 blockDim(BLOCK_DIM, 1,1);
dim3 gridDim(volume/blockDim.x, 1, 1);
dim3 halfGridDim(volume/(2*blockDim.x), 1, 1);
void* momEven = (void*)cudaMom.Even_p();
void* momOdd = (void*)cudaMom.Odd_p();
void* linkEven = (void*)cudaSiteLink.Even_p();
void* linkOdd = (void*)cudaSiteLink.Odd_p();
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
cudaBindTexture(0, siteLink0TexDouble, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
cudaBindTexture(0, siteLink1TexDouble, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
cudaBindTexture(0, siteLink0TexSingle, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
cudaBindTexture(0, siteLink1TexSingle, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}else{//QUDA_RECONSTRUCT_12
cudaBindTexture(0, siteLink0TexSingle_recon, cudaSiteLink.Even_p(), cudaSiteLink.Bytes());
cudaBindTexture(0, siteLink1TexSingle_recon, cudaSiteLink.Odd_p(), cudaSiteLink.Bytes());
}
}
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
parity_compute_gauge_force_kernel_dp18<0><<<halfGridDim, blockDim>>>((double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
parity_compute_gauge_force_kernel_dp18<1><<<halfGridDim, blockDim>>>((double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
}else{ //QUDA_RECONSTRUCT_12
parity_compute_gauge_force_kernel_dp12<0><<<halfGridDim, blockDim>>>((double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
parity_compute_gauge_force_kernel_dp12<1><<<halfGridDim, blockDim>>>((double2*)momEven, (double2*)momOdd,
dir, eb3,
(double2*)linkEven, (double2*)linkOdd,
input_path_d, length_d, (double*)path_coeff_d,
num_paths);
}
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
parity_compute_gauge_force_kernel_sp18<0><<<halfGridDim, blockDim>>>((float2*)momEven, (float2*)momOdd,
dir, eb3,
(float2*)linkEven, (float2*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
parity_compute_gauge_force_kernel_sp18<1><<<halfGridDim, blockDim>>>((float2*)momEven, (float2*)momOdd,
dir, eb3,
(float2*)linkEven, (float2*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
}else{ //QUDA_RECONSTRUCT_12
parity_compute_gauge_force_kernel_sp12<0><<<halfGridDim, blockDim>>>((float2*)momEven, (float2*)momOdd,
dir, eb3,
(float4*)linkEven, (float4*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
//odd
/* The reason we do not switch the even/odd function input paramemters and the texture binding
* is that we use the oddbit to decided where to load, in the kernel function
*/
parity_compute_gauge_force_kernel_sp12<1><<<halfGridDim, blockDim>>>((float2*)momEven, (float2*)momOdd,
dir, eb3,
(float4*)linkEven, (float4*)linkOdd,
input_path_d, length_d, (float*)path_coeff_d,
num_paths);
}
}
if(param->cuda_prec == QUDA_DOUBLE_PRECISION){
cudaUnbindTexture(siteLink0TexDouble);
cudaUnbindTexture(siteLink1TexDouble);
}else{ //QUDA_SINGLE_PRECISION
if(param->reconstruct == QUDA_RECONSTRUCT_NO){
cudaUnbindTexture(siteLink0TexSingle);
cudaUnbindTexture(siteLink1TexSingle);
}else{//QUDA_RECONSTRUCT_12
cudaUnbindTexture(siteLink0TexSingle_recon);
cudaUnbindTexture(siteLink1TexSingle_recon);
}
}
checkCudaError();
cudaFree(input_path_d); checkCudaError();
free(input_path_h);
cudaFree(length_d);
cudaFree(path_coeff_d);
}
|
995875c7b8b9cd01a6c341572a98f9a8bd8f56cb.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#ifdef UNIX
#include <stdint.h>
#include <unistd.h>
#endif
#include "mex.h"
// CUDA
#include "hip/hip_runtime.h"
#include "hip/hip_runtime.h"
#include "rocblas.h"
#include "cudaCommon.h"
// GPU_Tag = GPU_clone(GPU_type)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
// At least 2 arguments expected
// Input and result
if((nlhs != 0) || (nrhs != 2)) { mexErrMsgTxt("Form: GPU_copy(to tag, from tag)"); }
int returnCode = CHECK_CUDA_ERROR("entering GPU_copy");
if(returnCode != SUCCESSFUL) return;
MGArray orig[2];
returnCode = MGA_accessMatlabArrays(prhs, 0, 1, &orig[0]);
if(returnCode != SUCCESSFUL) {
CHECK_IMOGEN_ERROR(returnCode);
return;
}
int j;
int sub[6];
int64_t dan;
for(j = 0; j < orig[0].nGPUs; j++) {
calcPartitionExtent(&orig[0], j, &sub[0]);
dan = sub[3]*sub[4]*sub[5];
hipSetDevice(orig[0].deviceID[j]);
CHECK_CUDA_ERROR("setdevice");
hipMemcpyPeerAsync((void *)orig[0].devicePtr[j], orig[0].deviceID[j], (void*)orig[1].devicePtr[j], orig[1].deviceID[j], dan*sizeof(double));
returnCode = CHECK_CUDA_ERROR("cudamemcpy");
if(returnCode != SUCCESSFUL) break;
}
CHECK_IMOGEN_ERROR(returnCode);
return;
}
| 995875c7b8b9cd01a6c341572a98f9a8bd8f56cb.cu | #include <stdio.h>
#include <string.h>
#include <stdarg.h>
#ifdef UNIX
#include <stdint.h>
#include <unistd.h>
#endif
#include "mex.h"
// CUDA
#include "cuda.h"
#include "cuda_runtime.h"
#include "cublas.h"
#include "cudaCommon.h"
// GPU_Tag = GPU_clone(GPU_type)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
// At least 2 arguments expected
// Input and result
if((nlhs != 0) || (nrhs != 2)) { mexErrMsgTxt("Form: GPU_copy(to tag, from tag)"); }
int returnCode = CHECK_CUDA_ERROR("entering GPU_copy");
if(returnCode != SUCCESSFUL) return;
MGArray orig[2];
returnCode = MGA_accessMatlabArrays(prhs, 0, 1, &orig[0]);
if(returnCode != SUCCESSFUL) {
CHECK_IMOGEN_ERROR(returnCode);
return;
}
int j;
int sub[6];
int64_t dan;
for(j = 0; j < orig[0].nGPUs; j++) {
calcPartitionExtent(&orig[0], j, &sub[0]);
dan = sub[3]*sub[4]*sub[5];
cudaSetDevice(orig[0].deviceID[j]);
CHECK_CUDA_ERROR("setdevice");
cudaMemcpyPeerAsync((void *)orig[0].devicePtr[j], orig[0].deviceID[j], (void*)orig[1].devicePtr[j], orig[1].deviceID[j], dan*sizeof(double));
returnCode = CHECK_CUDA_ERROR("cudamemcpy");
if(returnCode != SUCCESSFUL) break;
}
CHECK_IMOGEN_ERROR(returnCode);
return;
}
|
37e241ae8fd540c69530ac163f6db3032e8a4b68.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/vision_layers.hpp"
namespace caffe {
template <typename Dtype>
__global__ void MaxPoolForward(const int nthreads,
const Dtype* const bottom_data, const int num, const int channels,
const int height, const int width, const int pooled_height,
const int pooled_width, const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w, const int pad_h, const int pad_w,
Dtype* const top_data, int* mask, Dtype* top_mask) {
CUDA_KERNEL_LOOP(index, nthreads) {
const int pw = index % pooled_width;
const int ph = (index / pooled_width) % pooled_height;
const int c = (index / pooled_width / pooled_height) % channels;
const int n = index / pooled_width / pooled_height / channels;
int hstart = ph * stride_h - pad_h;
int wstart = pw * stride_w - pad_w;
const int hend = min(hstart + ext_kernel_h, height);
const int wend = min(wstart + ext_kernel_w, width);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
Dtype maxval = -FLT_MAX;
int maxidx = -1;
const Dtype* const bottom_slice =
bottom_data + (n * channels + c) * height * width;
for (int h = hstart; h < hend; h += kstride_h) {
for (int w = wstart; w < wend; w += kstride_w) {
if (bottom_slice[h * width + w] > maxval) {
maxidx = h * width + w;
maxval = bottom_slice[maxidx];
}
}
}
top_data[index] = maxval;
if (mask) {
mask[index] = maxidx;
} else {
top_mask[index] = maxidx;
}
}
}
template <typename Dtype>
__global__ void AvePoolForward(const int nthreads,
const Dtype* const bottom_data, const int num, const int channels,
const int height, const int width, const int pooled_height,
const int pooled_width, const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w, const int pad_h, const int pad_w,
Dtype* const top_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
const int pw = index % pooled_width;
const int ph = (index / pooled_width) % pooled_height;
const int c = (index / pooled_width / pooled_height) % channels;
const int n = index / pooled_width / pooled_height / channels;
int hstart = ph * stride_h - pad_h;
int wstart = pw * stride_w - pad_w;
int hend = min(hstart + ext_kernel_h, height + pad_h);
int wend = min(wstart + ext_kernel_w, width + pad_w);
const int pool_size = (hend - hstart) * (wend - wstart);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
hend = min(hend, height);
wend = min(wend, width);
Dtype aveval = 0;
const Dtype* const bottom_slice =
bottom_data + (n * channels + c) * height * width;
for (int h = hstart; h < hend; h += kstride_h) {
for (int w = wstart; w < wend; w += kstride_w) {
aveval += bottom_slice[h * width + w];
}
}
top_data[index] = aveval / pool_size;
}
}
template <typename Dtype>
void PoolingSKLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
const Dtype* bottom_data = bottom[0]->gpu_data();
Dtype* top_data = top[0]->mutable_gpu_data();
int count = top[0]->count();
// We'll output the mask to top[1] if it's of size >1.
const bool use_top_mask = top.size() > 1;
int* mask = NULL;
Dtype* top_mask = NULL;
switch (this->layer_param_.pooling_param().pool()) {
case PoolingParameter_PoolMethod_MAX:
if (use_top_mask) {
top_mask = top[1]->mutable_gpu_data();
} else {
mask = max_idx_.mutable_gpu_data();
}
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( MaxPoolForward<Dtype>), dim3(CAFFE_GET_BLOCKS(count)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
count, bottom_data, bottom[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_, top_data,
mask, top_mask);
break;
case PoolingParameter_PoolMethod_AVE:
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( AvePoolForward<Dtype>), dim3(CAFFE_GET_BLOCKS(count)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
count, bottom_data, bottom[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_, top_data);
break;
case PoolingParameter_PoolMethod_STOCHASTIC:
NOT_IMPLEMENTED;
break;
default:
LOG(FATAL) << "Unknown pooling method.";
}
CUDA_POST_KERNEL_CHECK;
}
template <typename Dtype>
__global__ void MaxPoolBackward(const int nthreads, const Dtype* top_diff,
const int* mask, const Dtype* const top_mask, const int num,
const int channels, const int height, const int width,
const int pooled_height, const int pooled_width,
const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w,
const int pad_h, const int pad_w, Dtype* const bottom_diff) {
CUDA_KERNEL_LOOP(index, nthreads) {
// find out the local index
// find out the local offset
const int w = index % width;
const int h = (index / width) % height;
const int c = (index / width / height) % channels;
const int n = index / width / height / channels;
int pooled_height_1 = pooled_height - 1;
int pooled_width_1 = pooled_width - 1;
int phstart =
(h + pad_h < ext_kernel_h) ? h % kstride_h : (h + pad_h - ext_kernel_h) + 1;
int phend = (h + pad_h >= pooled_height) ? pooled_height_1 - (pooled_height_1 - phstart) % kstride_h : h + pad_h;
int pwstart =
(w +pad_w < ext_kernel_w) ? w % kstride_w : (w + pad_w - ext_kernel_w) + 1;
int pwend = (w + pad_w >= pooled_width) ? pooled_width_1 - (pooled_width_1 - pwstart) % kstride_w : w + pad_w;
Dtype gradient = 0;
int offset = (n * channels + c) * pooled_height * pooled_width;
top_diff += offset;
if (mask) {
mask += offset;
for (int ph = phstart; ph <= phend; ph += kstride_h) {
for (int pw = pwstart; pw <= pwend; pw += kstride_w) {
if (mask[ph * pooled_width + pw] == h * width + w) {
gradient += top_diff[ph * pooled_width + pw];
}
}
}
} else {
mask += offset;
for (int ph = phstart; ph <= phend; ph += kstride_h) {
for (int pw = pwstart; pw <= pwend; pw += kstride_w) {
if (top_mask[ph * pooled_width + pw] == h * width + w) {
gradient += top_diff[ph * pooled_width + pw];
}
}
}
}
bottom_diff[index] = gradient;
}
}
template <typename Dtype>
void PoolingSKLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
if (!propagate_down[0]) {
return;
}
const Dtype* top_diff = top[0]->gpu_diff();
Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();
const int count = bottom[0]->count();
caffe_gpu_set(count, Dtype(0.), bottom_diff);
// We'll output the mask to top[1] if it's of size >1.
const bool use_top_mask = top.size() > 1;
const int* mask = NULL;
const Dtype* top_mask = NULL;
switch (this->layer_param_.pooling_param().pool()) {
case PoolingParameter_PoolMethod_MAX:
if (use_top_mask) {
top_mask = top[1]->gpu_data();
} else {
mask = max_idx_.gpu_data();
}
// NOLINT_NEXT_LINE(whitespace/operators)
hipLaunchKernelGGL(( MaxPoolBackward<Dtype>), dim3(CAFFE_GET_BLOCKS(count)), dim3(CAFFE_CUDA_NUM_THREADS), 0, 0,
count, top_diff, mask, top_mask, top[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_,
bottom_diff);
break;
case PoolingParameter_PoolMethod_AVE:
// NOLINT_NEXT_LINE(whitespace/operators)
NOT_IMPLEMENTED;
break;
case PoolingParameter_PoolMethod_STOCHASTIC:
NOT_IMPLEMENTED;
break;
default:
LOG(FATAL) << "Unknown pooling method.";
}
CUDA_POST_KERNEL_CHECK;
}
INSTANTIATE_LAYER_GPU_FUNCS(PoolingSKLayer);
} // namespace caffe
| 37e241ae8fd540c69530ac163f6db3032e8a4b68.cu | #include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/vision_layers.hpp"
namespace caffe {
template <typename Dtype>
__global__ void MaxPoolForward(const int nthreads,
const Dtype* const bottom_data, const int num, const int channels,
const int height, const int width, const int pooled_height,
const int pooled_width, const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w, const int pad_h, const int pad_w,
Dtype* const top_data, int* mask, Dtype* top_mask) {
CUDA_KERNEL_LOOP(index, nthreads) {
const int pw = index % pooled_width;
const int ph = (index / pooled_width) % pooled_height;
const int c = (index / pooled_width / pooled_height) % channels;
const int n = index / pooled_width / pooled_height / channels;
int hstart = ph * stride_h - pad_h;
int wstart = pw * stride_w - pad_w;
const int hend = min(hstart + ext_kernel_h, height);
const int wend = min(wstart + ext_kernel_w, width);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
Dtype maxval = -FLT_MAX;
int maxidx = -1;
const Dtype* const bottom_slice =
bottom_data + (n * channels + c) * height * width;
for (int h = hstart; h < hend; h += kstride_h) {
for (int w = wstart; w < wend; w += kstride_w) {
if (bottom_slice[h * width + w] > maxval) {
maxidx = h * width + w;
maxval = bottom_slice[maxidx];
}
}
}
top_data[index] = maxval;
if (mask) {
mask[index] = maxidx;
} else {
top_mask[index] = maxidx;
}
}
}
template <typename Dtype>
__global__ void AvePoolForward(const int nthreads,
const Dtype* const bottom_data, const int num, const int channels,
const int height, const int width, const int pooled_height,
const int pooled_width, const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w, const int pad_h, const int pad_w,
Dtype* const top_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
const int pw = index % pooled_width;
const int ph = (index / pooled_width) % pooled_height;
const int c = (index / pooled_width / pooled_height) % channels;
const int n = index / pooled_width / pooled_height / channels;
int hstart = ph * stride_h - pad_h;
int wstart = pw * stride_w - pad_w;
int hend = min(hstart + ext_kernel_h, height + pad_h);
int wend = min(wstart + ext_kernel_w, width + pad_w);
const int pool_size = (hend - hstart) * (wend - wstart);
hstart = max(hstart, 0);
wstart = max(wstart, 0);
hend = min(hend, height);
wend = min(wend, width);
Dtype aveval = 0;
const Dtype* const bottom_slice =
bottom_data + (n * channels + c) * height * width;
for (int h = hstart; h < hend; h += kstride_h) {
for (int w = wstart; w < wend; w += kstride_w) {
aveval += bottom_slice[h * width + w];
}
}
top_data[index] = aveval / pool_size;
}
}
template <typename Dtype>
void PoolingSKLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
const Dtype* bottom_data = bottom[0]->gpu_data();
Dtype* top_data = top[0]->mutable_gpu_data();
int count = top[0]->count();
// We'll output the mask to top[1] if it's of size >1.
const bool use_top_mask = top.size() > 1;
int* mask = NULL;
Dtype* top_mask = NULL;
switch (this->layer_param_.pooling_param().pool()) {
case PoolingParameter_PoolMethod_MAX:
if (use_top_mask) {
top_mask = top[1]->mutable_gpu_data();
} else {
mask = max_idx_.mutable_gpu_data();
}
// NOLINT_NEXT_LINE(whitespace/operators)
MaxPoolForward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>(
count, bottom_data, bottom[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_, top_data,
mask, top_mask);
break;
case PoolingParameter_PoolMethod_AVE:
// NOLINT_NEXT_LINE(whitespace/operators)
AvePoolForward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>(
count, bottom_data, bottom[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_, top_data);
break;
case PoolingParameter_PoolMethod_STOCHASTIC:
NOT_IMPLEMENTED;
break;
default:
LOG(FATAL) << "Unknown pooling method.";
}
CUDA_POST_KERNEL_CHECK;
}
template <typename Dtype>
__global__ void MaxPoolBackward(const int nthreads, const Dtype* top_diff,
const int* mask, const Dtype* const top_mask, const int num,
const int channels, const int height, const int width,
const int pooled_height, const int pooled_width,
const int kernel_h, const int kernel_w, const int ext_kernel_h, const int ext_kernel_w,
const int stride_h, const int stride_w, const int kstride_h, const int kstride_w,
const int pad_h, const int pad_w, Dtype* const bottom_diff) {
CUDA_KERNEL_LOOP(index, nthreads) {
// find out the local index
// find out the local offset
const int w = index % width;
const int h = (index / width) % height;
const int c = (index / width / height) % channels;
const int n = index / width / height / channels;
int pooled_height_1 = pooled_height - 1;
int pooled_width_1 = pooled_width - 1;
int phstart =
(h + pad_h < ext_kernel_h) ? h % kstride_h : (h + pad_h - ext_kernel_h) + 1;
int phend = (h + pad_h >= pooled_height) ? pooled_height_1 - (pooled_height_1 - phstart) % kstride_h : h + pad_h;
int pwstart =
(w +pad_w < ext_kernel_w) ? w % kstride_w : (w + pad_w - ext_kernel_w) + 1;
int pwend = (w + pad_w >= pooled_width) ? pooled_width_1 - (pooled_width_1 - pwstart) % kstride_w : w + pad_w;
Dtype gradient = 0;
int offset = (n * channels + c) * pooled_height * pooled_width;
top_diff += offset;
if (mask) {
mask += offset;
for (int ph = phstart; ph <= phend; ph += kstride_h) {
for (int pw = pwstart; pw <= pwend; pw += kstride_w) {
if (mask[ph * pooled_width + pw] == h * width + w) {
gradient += top_diff[ph * pooled_width + pw];
}
}
}
} else {
mask += offset;
for (int ph = phstart; ph <= phend; ph += kstride_h) {
for (int pw = pwstart; pw <= pwend; pw += kstride_w) {
if (top_mask[ph * pooled_width + pw] == h * width + w) {
gradient += top_diff[ph * pooled_width + pw];
}
}
}
}
bottom_diff[index] = gradient;
}
}
template <typename Dtype>
void PoolingSKLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
if (!propagate_down[0]) {
return;
}
const Dtype* top_diff = top[0]->gpu_diff();
Dtype* bottom_diff = bottom[0]->mutable_gpu_diff();
const int count = bottom[0]->count();
caffe_gpu_set(count, Dtype(0.), bottom_diff);
// We'll output the mask to top[1] if it's of size >1.
const bool use_top_mask = top.size() > 1;
const int* mask = NULL;
const Dtype* top_mask = NULL;
switch (this->layer_param_.pooling_param().pool()) {
case PoolingParameter_PoolMethod_MAX:
if (use_top_mask) {
top_mask = top[1]->gpu_data();
} else {
mask = max_idx_.gpu_data();
}
// NOLINT_NEXT_LINE(whitespace/operators)
MaxPoolBackward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>(
count, top_diff, mask, top_mask, top[0]->num(), channels_,
height_, width_, pooled_height_, pooled_width_,
kernel_h_, kernel_w_, ext_kernel_h_, ext_kernel_w_,
stride_h_, stride_w_, kstride_h_, kstride_w_,
pad_h_, pad_w_,
bottom_diff);
break;
case PoolingParameter_PoolMethod_AVE:
// NOLINT_NEXT_LINE(whitespace/operators)
NOT_IMPLEMENTED;
break;
case PoolingParameter_PoolMethod_STOCHASTIC:
NOT_IMPLEMENTED;
break;
default:
LOG(FATAL) << "Unknown pooling method.";
}
CUDA_POST_KERNEL_CHECK;
}
INSTANTIATE_LAYER_GPU_FUNCS(PoolingSKLayer);
} // namespace caffe
|
8539574d9acb639328b43f1e36aa7e5e8c5a8438.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <hipcub/hipcub.hpp>
#include <vector>
#include "ssdOpt.h"
#include "ssdOptMacros.h"
namespace nvinfer1
{
namespace plugin
{
namespace {
// sort one segment per cta
template<typename T_SCORE, int BLOCK_THREADS, int ELEMENTS_PER_THREAD>
__global__ void blockSortKernel(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items_, int stride_items, int num_segments)
{
// Specialize BlockRadixSort for a 1D block
typedef cub::BlockRadixSort<T_SCORE, BLOCK_THREADS, ELEMENTS_PER_THREAD, int> BlockRadixSort;
// Allocate shared memory for BlockRadixSort
__shared__ typename BlockRadixSort::TempStorage temp_storage;
if (blockIdx.x >= num_segments)
return;
int num_items = active_counts[blockIdx.x] > num_items_ ? num_items_ : active_counts[blockIdx.x];
if (num_items == 0) {
return;
}
// Obtain a segment of consecutive items that are blocked across threads
T_SCORE thread_keys[ELEMENTS_PER_THREAD];
int thread_values[ELEMENTS_PER_THREAD];
int block_offset = blockIdx.x * stride_items;
cub::LoadDirectStriped<BLOCK_THREADS>(threadIdx.x, d_keys_out + block_offset, thread_keys, num_items, 0);
cub::LoadDirectStriped<BLOCK_THREADS>(threadIdx.x, d_values_out + block_offset, thread_values, num_items, -1);
__syncthreads();
// Collectively sort the keys and values among block threads
BlockRadixSort(temp_storage).SortDescendingBlockedToStriped(thread_keys, thread_values);
// Store output in striped fashion
cub::StoreDirectStriped<BLOCK_THREADS>(threadIdx.x, d_keys_out + block_offset, thread_keys, num_items);
cub::StoreDirectStriped<BLOCK_THREADS>(threadIdx.x, d_values_out + block_offset, thread_values, num_items);
}
/// block sort kernel
template <typename T_SCORE>
void blockSort(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items, int stride_items, int num_segments, hipStream_t stream)
{
if (num_items == 0)
return;
int warps_per_cta = (num_items + 31) / 32;
assert(warps_per_cta <= 8);
dim3 block(warps_per_cta * 32);
dim3 grid(num_segments);
using kernel_func = void (*)(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items, int stride_items, int num_segments);
static const kernel_func kernel_funcs[] = {
&blockSortKernel<T_SCORE, 32, 1>,
&blockSortKernel<T_SCORE, 64, 1>,
&blockSortKernel<T_SCORE, 96, 1>,
&blockSortKernel<T_SCORE, 128, 1>,
&blockSortKernel<T_SCORE, 160, 1>,
&blockSortKernel<T_SCORE, 192, 1>,
&blockSortKernel<T_SCORE, 224, 1>,
&blockSortKernel<T_SCORE, 256, 1>,
};
kernel_funcs[warps_per_cta -hipLaunchKernelGGL(( 1)], dim3(grid), dim3(block), 0, stream, d_keys_in, d_keys_out, d_values_in, d_values_out, active_counts, num_items, stride_items, num_segments);
}
#ifdef SSD_STABLE_TOPK
struct BlockPrefixCallbackOp
{
// Running prefix
int running_total;
// Constructor
__device__ BlockPrefixCallbackOp(int running_total) : running_total(running_total) {}
// Callback operator to be entered by the first warp of threads in the block.
// Thread-0 is responsible for returning a value for seeding the block-wide scan.
__device__ int operator()(int block_aggregate)
{
int old_prefix = running_total;
running_total += block_aggregate;
return old_prefix;
}
};
#endif
template <int ITEMS_PER_THREAD, int BLOCK_THREADS = 512>
__global__ void top_k_cuda_fused_prepare(int *in, int *out, int* out_indices, int* active_counts_per_class, int* active_count_per_batch, int items, unsigned int num_top_k, int segments, int background_class_id, float threshold)
{
extern __shared__ int2 dynamic_smem[];
int2* selected_elements = dynamic_smem;
#ifdef SSD_STABLE_TOPK
int active_count;
__shared__ unsigned int selected_count;
#else
__shared__ unsigned int selected_count;
// stores the number of elements which are above the threshold
__shared__ unsigned int active_count;
#endif
#ifdef SSD_STABLE_TOPK
// Specialize BlockScan type for our thread block
typedef hipcub::BlockScan<int, BLOCK_THREADS> BlockScan;
__shared__ typename BlockScan::TempStorage temp_storage;
// Initialize running total
BlockPrefixCallbackOp prefix_op(0);
#endif
unsigned int old_selected_count;
int class_id = blockIdx.x;
int segment = blockIdx.y * gridDim.x + blockIdx.x;
if (threadIdx.x == 0) {
// We have to initialize active_count_per_batch for the following allClassNMS kernel.
// Do it here to avoid to avoid an extra memset launch.
if (blockIdx.x == 0) {
active_count_per_batch[blockIdx.y] = 0;
}
active_count = 0;
}
__syncthreads();
int first_index = segment * items;
in += first_index;
out += first_index;
out_indices += first_index;
int index_limit = items;
uint32_t thread_items[ITEMS_PER_THREAD];
int local_filtered = 0;
// number of items whose score is >0 int he current thread
int thread_active = 0;
// in case <= top_k are active, offset where to write the thread items to in the output
int thread_offset;
if (background_class_id != class_id) {
#pragma unroll
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
int offset = threadIdx.x + i * blockDim.x;
thread_items[i] = 0;
if (offset < index_limit) {
thread_items[i] = in[offset];
}
}
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
if (__int_as_float(thread_items[i]) < threshold) {
thread_items[i] = 0;
// todo a bitmask + popc might be faster here
int offset = threadIdx.x + i * blockDim.x;
if (offset < index_limit) {
++local_filtered;
}
}
if (thread_items[i] > 0) {
thread_active++;
}
}
#ifdef SSD_STABLE_TOPK
BlockScan(temp_storage).ExclusiveSum(thread_active, thread_offset, active_count);
#else
thread_offset = atomicAdd(&active_count, thread_active);
#endif
}
uint32_t select_mask = 0;
uint32_t save_mask = 0;
uint32_t save_bit = 0;
if (threadIdx.x == 0) {
selected_count = 0;
old_selected_count = 0;
}
__syncthreads();
if (threadIdx.x == 0 ) {
active_counts_per_class[segment] = active_count;
}
// all elements are filtered, nothing to do
if (active_count == 0) {
return;
}
// we have at maximum top_k elements. there's no need to filter those, store them directly as result.
if (active_count <= num_top_k) {
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
if (thread_items[i] != 0) {
out_indices[thread_offset] = threadIdx.x + i * blockDim.x + items * blockIdx.x;
out[thread_offset] = thread_items[i];
++thread_offset;
}
}
return;
}
// iterate over bits.
// skip the first two bits,
// * bit 31 is the sign bit. all values are positive
// * bit 30 is only set for values >= 2, but the input consists only of values in the range of [0,1]
const int skip_bits = 2;
int selected;
for (int bit = 31 - skip_bits; true; --bit) {
__syncthreads();
uint32_t bit_mask = select_mask | (1u << bit);
uint32_t enabled = 0;
for (int item = 0; item < ITEMS_PER_THREAD; ++item) {
enabled |= (((thread_items[item] ^ bit_mask) & bit_mask) == 0) << item;
}
selected = __popc(enabled);
#ifdef SSD_STABLE_TOPK
int offset;
BlockScan(temp_storage).ExclusiveSum(selected, offset, prefix_op);
if (threadIdx.x == 0) {
selected_count = prefix_op.running_total;
}
#else
unsigned int offset = atomicAdd(&selected_count,selected);
#endif
__syncthreads();
int sc = selected_count;
__syncthreads();
if ((sc <= num_top_k && sc > 0) || (bit == 0 && sc > 0)) {
for (int item = 0; item < ITEMS_PER_THREAD; ++item) {
if (enabled & (1u << item) && offset < num_top_k) {
selected_elements[offset] = make_int2(thread_items[item], threadIdx.x + item * blockDim.x + items * blockIdx.x);
++offset;
thread_items[item] = 0;
}
}
}
if (sc == num_top_k || bit == 0) {
break;
}
else if (sc > num_top_k)
{
// There are too many bits in the current selection
// Save the current state and go to the next bit
// If there are not enough items left using the next bit
// it's necessary to restart here with the current bit not set
save_mask = bit_mask;
save_bit = bit - 1;
select_mask |= bit_mask;
if (threadIdx.x == 0)
{
selected_count = old_selected_count;
#ifdef SSD_STABLE_TOPK
prefix_op.running_total = old_selected_count;
#endif
}
}
else {
if (save_mask) {
select_mask = save_mask;
bit = save_bit;
save_mask = 0;
}
if (threadIdx.x == 0) {
old_selected_count = sc;
}
}
}
__syncthreads();
// store data to global memory
int sc = selected_count;
for (int i = threadIdx.x; i < num_top_k; i += blockDim.x) {
int2 selected_element = selected_elements[i];
int out_element = i < sc ? selected_element.x : 0;
out[i] = out_element;
out_indices[i] = out_element > 0 ? selected_element.y : -1;
}
}
}
template <typename T_SCORE>
ssdStatus_t topKScoresPerClass_gpu(
hipStream_t stream,
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const int background_label_id,
const float confidence_threshold,
void* conf_scores_gpu,
void* index_array_gpu,
void *active_counts_gpu,
void* active_counts_per_batch_gpu,
void* workspace)
{
const int BLOCK_THREADS = 512;
using top_k_kernel = void (*)(int *in, int *out, int* out_indices, int *active_counts_gpu, int* active_counts_per_batch_gpu, int items, unsigned int num_top_k, int segments, int background_class_id, float threshold) ;
top_k_kernel top_k_kernels[] = {
top_k_cuda_fused_prepare<1, BLOCK_THREADS>,
top_k_cuda_fused_prepare<2, BLOCK_THREADS>,
top_k_cuda_fused_prepare<3, BLOCK_THREADS>,
top_k_cuda_fused_prepare<4, BLOCK_THREADS>,
top_k_cuda_fused_prepare<5, BLOCK_THREADS>,
top_k_cuda_fused_prepare<6, BLOCK_THREADS>,
top_k_cuda_fused_prepare<7, BLOCK_THREADS>,
top_k_cuda_fused_prepare<8, BLOCK_THREADS>,
top_k_cuda_fused_prepare<9, BLOCK_THREADS>,
top_k_cuda_fused_prepare<10, BLOCK_THREADS>,
top_k_cuda_fused_prepare<11, BLOCK_THREADS>,
top_k_cuda_fused_prepare<12, BLOCK_THREADS>,
top_k_cuda_fused_prepare<13, BLOCK_THREADS>,
top_k_cuda_fused_prepare<14, BLOCK_THREADS>,
top_k_cuda_fused_prepare<15, BLOCK_THREADS>,
top_k_cuda_fused_prepare<16, BLOCK_THREADS>,
top_k_cuda_fused_prepare<17, BLOCK_THREADS>,
top_k_cuda_fused_prepare<18, BLOCK_THREADS>,
top_k_cuda_fused_prepare<19, BLOCK_THREADS>,
top_k_cuda_fused_prepare<20, BLOCK_THREADS>,
top_k_cuda_fused_prepare<21, BLOCK_THREADS>,
top_k_cuda_fused_prepare<22, BLOCK_THREADS>,
top_k_cuda_fused_prepare<23, BLOCK_THREADS>,
top_k_cuda_fused_prepare<24, BLOCK_THREADS>,
top_k_cuda_fused_prepare<25, BLOCK_THREADS>,
top_k_cuda_fused_prepare<26, BLOCK_THREADS>,
top_k_cuda_fused_prepare<27, BLOCK_THREADS>,
top_k_cuda_fused_prepare<28, BLOCK_THREADS>,
top_k_cuda_fused_prepare<29, BLOCK_THREADS>,
top_k_cuda_fused_prepare<30, BLOCK_THREADS>,
top_k_cuda_fused_prepare<31, BLOCK_THREADS>,
top_k_cuda_fused_prepare<32, BLOCK_THREADS>,
};
const int num_segments = num * num_classes;
uint32_t smem_size = num_top_k * (sizeof(int) + sizeof(uint32_t));
#ifdef SSD_STABLE_TOPK
// TODO implement multi-stage topk
int kernel_index = (num_preds_per_class + BLOCK_THREADS - 1) / BLOCK_THREADS;
dim3 block(BLOCK_THREADS);
#else
uint32_t num_warps = (num_preds_per_class > 128) ? (128/32) : (num_preds_per_class + 31) / 32;
int kernel_index = num_preds_per_class / (num_warps * 32);
// we have kernels with up to 16 registers per thread
// increase the number of threads if necessary
while (kernel_index >= 32) {
kernel_index /= 2;
num_warps *= 2;
}
// a maximum of 1024 threads is supported
assert(num_warps * 32 <= 1024);
dim3 block(num_warps * 32);
#endif
dim3 grid(num_classes, num);
assert(kernel_index < 32);
top_k_kernelshipLaunchKernelGGL(([kernel_index)], dim3(grid), dim3(block), smem_size, stream, (int*) (conf_scores_gpu), (int*) (conf_scores_gpu), (int*)index_array_gpu, (int*)active_counts_gpu, (int*)active_counts_per_batch_gpu, num_preds_per_class, num_top_k, num_segments, background_label_id, confidence_threshold);
blockSort<T_SCORE>(
(const T_SCORE*) (conf_scores_gpu), (T_SCORE*) (conf_scores_gpu),
(const int*) (index_array_gpu), (int*) (index_array_gpu), (int*)active_counts_gpu,
num_top_k, num_preds_per_class, num_segments, stream
);
CSC(hipGetLastError(), STATUS_FAILURE);
return STATUS_SUCCESS;
}
// sortScoresPerClass LAUNCH CONFIG {{{
typedef ssdStatus_t (*tkspcFunc)(hipStream_t,
const int,
const int,
const int,
const int,
const int,
const float,
void*,
void*,
void*,
void*,
void*);
struct tkspcLaunchConfig
{
DType_t t_score;
tkspcFunc function;
tkspcLaunchConfig(DType_t t_score)
: t_score(t_score)
{
}
tkspcLaunchConfig(DType_t t_score, tkspcFunc function)
: t_score(t_score)
, function(function)
{
}
bool operator==(const tkspcLaunchConfig& other)
{
return t_score == other.t_score;
}
};
static std::vector<tkspcLaunchConfig> tkspcFuncVec;
bool tkspcInit()
{
tkspcFuncVec.push_back(tkspcLaunchConfig(DataType::kFLOAT,
topKScoresPerClass_gpu<float>));
return true;
}
static bool initialized = tkspcInit();
//}}}
ssdStatus_t topKScoresPerClass(
hipStream_t stream,
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const int background_label_id,
const float confidence_threshold,
const DType_t DT_SCORE,
void* conf_scores_gpu,
void* index_array_gpu,
void *active_count_per_class,
void *active_count_per_batch,
void* workspace)
{
tkspcLaunchConfig lc = tkspcLaunchConfig(DT_SCORE);
for (unsigned i = 0; i < tkspcFuncVec.size(); ++i)
{
if (lc == tkspcFuncVec[i])
{
DEBUG_PRINTF("sortScoresPerClass kernel %d\n", i);
return tkspcFuncVec[i].function(stream,
num,
num_classes,
num_preds_per_class,
num_top_k,
background_label_id,
confidence_threshold,
conf_scores_gpu,
index_array_gpu,
active_count_per_class,
active_count_per_batch,
workspace);
}
}
return STATUS_BAD_PARAM;
}
size_t topKScoresPerClassWorkspaceSize(
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const DType_t DT_CONF)
{
return 0;
}
} // namespace plugin
} // namespace nvinfer1
| 8539574d9acb639328b43f1e36aa7e5e8c5a8438.cu | /*
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cub/cub.cuh>
#include <vector>
#include "ssdOpt.h"
#include "ssdOptMacros.h"
namespace nvinfer1
{
namespace plugin
{
namespace {
// sort one segment per cta
template<typename T_SCORE, int BLOCK_THREADS, int ELEMENTS_PER_THREAD>
__global__ void blockSortKernel(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items_, int stride_items, int num_segments)
{
// Specialize BlockRadixSort for a 1D block
typedef cub::BlockRadixSort<T_SCORE, BLOCK_THREADS, ELEMENTS_PER_THREAD, int> BlockRadixSort;
// Allocate shared memory for BlockRadixSort
__shared__ typename BlockRadixSort::TempStorage temp_storage;
if (blockIdx.x >= num_segments)
return;
int num_items = active_counts[blockIdx.x] > num_items_ ? num_items_ : active_counts[blockIdx.x];
if (num_items == 0) {
return;
}
// Obtain a segment of consecutive items that are blocked across threads
T_SCORE thread_keys[ELEMENTS_PER_THREAD];
int thread_values[ELEMENTS_PER_THREAD];
int block_offset = blockIdx.x * stride_items;
cub::LoadDirectStriped<BLOCK_THREADS>(threadIdx.x, d_keys_out + block_offset, thread_keys, num_items, 0);
cub::LoadDirectStriped<BLOCK_THREADS>(threadIdx.x, d_values_out + block_offset, thread_values, num_items, -1);
__syncthreads();
// Collectively sort the keys and values among block threads
BlockRadixSort(temp_storage).SortDescendingBlockedToStriped(thread_keys, thread_values);
// Store output in striped fashion
cub::StoreDirectStriped<BLOCK_THREADS>(threadIdx.x, d_keys_out + block_offset, thread_keys, num_items);
cub::StoreDirectStriped<BLOCK_THREADS>(threadIdx.x, d_values_out + block_offset, thread_values, num_items);
}
/// block sort kernel
template <typename T_SCORE>
void blockSort(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items, int stride_items, int num_segments, cudaStream_t stream)
{
if (num_items == 0)
return;
int warps_per_cta = (num_items + 31) / 32;
assert(warps_per_cta <= 8);
dim3 block(warps_per_cta * 32);
dim3 grid(num_segments);
using kernel_func = void (*)(const T_SCORE *d_keys_in, T_SCORE *d_keys_out, const int *d_values_in, int *d_values_out, const int* active_counts, int num_items, int stride_items, int num_segments);
static const kernel_func kernel_funcs[] = {
&blockSortKernel<T_SCORE, 32, 1>,
&blockSortKernel<T_SCORE, 64, 1>,
&blockSortKernel<T_SCORE, 96, 1>,
&blockSortKernel<T_SCORE, 128, 1>,
&blockSortKernel<T_SCORE, 160, 1>,
&blockSortKernel<T_SCORE, 192, 1>,
&blockSortKernel<T_SCORE, 224, 1>,
&blockSortKernel<T_SCORE, 256, 1>,
};
kernel_funcs[warps_per_cta - 1]<<<grid, block, 0, stream>>>(d_keys_in, d_keys_out, d_values_in, d_values_out, active_counts, num_items, stride_items, num_segments);
}
#ifdef SSD_STABLE_TOPK
struct BlockPrefixCallbackOp
{
// Running prefix
int running_total;
// Constructor
__device__ BlockPrefixCallbackOp(int running_total) : running_total(running_total) {}
// Callback operator to be entered by the first warp of threads in the block.
// Thread-0 is responsible for returning a value for seeding the block-wide scan.
__device__ int operator()(int block_aggregate)
{
int old_prefix = running_total;
running_total += block_aggregate;
return old_prefix;
}
};
#endif
template <int ITEMS_PER_THREAD, int BLOCK_THREADS = 512>
__global__ void top_k_cuda_fused_prepare(int *in, int *out, int* out_indices, int* active_counts_per_class, int* active_count_per_batch, int items, unsigned int num_top_k, int segments, int background_class_id, float threshold)
{
extern __shared__ int2 dynamic_smem[];
int2* selected_elements = dynamic_smem;
#ifdef SSD_STABLE_TOPK
int active_count;
__shared__ unsigned int selected_count;
#else
__shared__ unsigned int selected_count;
// stores the number of elements which are above the threshold
__shared__ unsigned int active_count;
#endif
#ifdef SSD_STABLE_TOPK
// Specialize BlockScan type for our thread block
typedef cub::BlockScan<int, BLOCK_THREADS> BlockScan;
__shared__ typename BlockScan::TempStorage temp_storage;
// Initialize running total
BlockPrefixCallbackOp prefix_op(0);
#endif
unsigned int old_selected_count;
int class_id = blockIdx.x;
int segment = blockIdx.y * gridDim.x + blockIdx.x;
if (threadIdx.x == 0) {
// We have to initialize active_count_per_batch for the following allClassNMS kernel.
// Do it here to avoid to avoid an extra memset launch.
if (blockIdx.x == 0) {
active_count_per_batch[blockIdx.y] = 0;
}
active_count = 0;
}
__syncthreads();
int first_index = segment * items;
in += first_index;
out += first_index;
out_indices += first_index;
int index_limit = items;
uint32_t thread_items[ITEMS_PER_THREAD];
int local_filtered = 0;
// number of items whose score is >0 int he current thread
int thread_active = 0;
// in case <= top_k are active, offset where to write the thread items to in the output
int thread_offset;
if (background_class_id != class_id) {
#pragma unroll
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
int offset = threadIdx.x + i * blockDim.x;
thread_items[i] = 0;
if (offset < index_limit) {
thread_items[i] = in[offset];
}
}
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
if (__int_as_float(thread_items[i]) < threshold) {
thread_items[i] = 0;
// todo a bitmask + popc might be faster here
int offset = threadIdx.x + i * blockDim.x;
if (offset < index_limit) {
++local_filtered;
}
}
if (thread_items[i] > 0) {
thread_active++;
}
}
#ifdef SSD_STABLE_TOPK
BlockScan(temp_storage).ExclusiveSum(thread_active, thread_offset, active_count);
#else
thread_offset = atomicAdd(&active_count, thread_active);
#endif
}
uint32_t select_mask = 0;
uint32_t save_mask = 0;
uint32_t save_bit = 0;
if (threadIdx.x == 0) {
selected_count = 0;
old_selected_count = 0;
}
__syncthreads();
if (threadIdx.x == 0 ) {
active_counts_per_class[segment] = active_count;
}
// all elements are filtered, nothing to do
if (active_count == 0) {
return;
}
// we have at maximum top_k elements. there's no need to filter those, store them directly as result.
if (active_count <= num_top_k) {
for (int i = 0; i < ITEMS_PER_THREAD; ++i) {
if (thread_items[i] != 0) {
out_indices[thread_offset] = threadIdx.x + i * blockDim.x + items * blockIdx.x;
out[thread_offset] = thread_items[i];
++thread_offset;
}
}
return;
}
// iterate over bits.
// skip the first two bits,
// * bit 31 is the sign bit. all values are positive
// * bit 30 is only set for values >= 2, but the input consists only of values in the range of [0,1]
const int skip_bits = 2;
int selected;
for (int bit = 31 - skip_bits; true; --bit) {
__syncthreads();
uint32_t bit_mask = select_mask | (1u << bit);
uint32_t enabled = 0;
for (int item = 0; item < ITEMS_PER_THREAD; ++item) {
enabled |= (((thread_items[item] ^ bit_mask) & bit_mask) == 0) << item;
}
selected = __popc(enabled);
#ifdef SSD_STABLE_TOPK
int offset;
BlockScan(temp_storage).ExclusiveSum(selected, offset, prefix_op);
if (threadIdx.x == 0) {
selected_count = prefix_op.running_total;
}
#else
unsigned int offset = atomicAdd(&selected_count,selected);
#endif
__syncthreads();
int sc = selected_count;
__syncthreads();
if ((sc <= num_top_k && sc > 0) || (bit == 0 && sc > 0)) {
for (int item = 0; item < ITEMS_PER_THREAD; ++item) {
if (enabled & (1u << item) && offset < num_top_k) {
selected_elements[offset] = make_int2(thread_items[item], threadIdx.x + item * blockDim.x + items * blockIdx.x);
++offset;
thread_items[item] = 0;
}
}
}
if (sc == num_top_k || bit == 0) {
break;
}
else if (sc > num_top_k)
{
// There are too many bits in the current selection
// Save the current state and go to the next bit
// If there are not enough items left using the next bit
// it's necessary to restart here with the current bit not set
save_mask = bit_mask;
save_bit = bit - 1;
select_mask |= bit_mask;
if (threadIdx.x == 0)
{
selected_count = old_selected_count;
#ifdef SSD_STABLE_TOPK
prefix_op.running_total = old_selected_count;
#endif
}
}
else {
if (save_mask) {
select_mask = save_mask;
bit = save_bit;
save_mask = 0;
}
if (threadIdx.x == 0) {
old_selected_count = sc;
}
}
}
__syncthreads();
// store data to global memory
int sc = selected_count;
for (int i = threadIdx.x; i < num_top_k; i += blockDim.x) {
int2 selected_element = selected_elements[i];
int out_element = i < sc ? selected_element.x : 0;
out[i] = out_element;
out_indices[i] = out_element > 0 ? selected_element.y : -1;
}
}
}
template <typename T_SCORE>
ssdStatus_t topKScoresPerClass_gpu(
cudaStream_t stream,
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const int background_label_id,
const float confidence_threshold,
void* conf_scores_gpu,
void* index_array_gpu,
void *active_counts_gpu,
void* active_counts_per_batch_gpu,
void* workspace)
{
const int BLOCK_THREADS = 512;
using top_k_kernel = void (*)(int *in, int *out, int* out_indices, int *active_counts_gpu, int* active_counts_per_batch_gpu, int items, unsigned int num_top_k, int segments, int background_class_id, float threshold) ;
top_k_kernel top_k_kernels[] = {
top_k_cuda_fused_prepare<1, BLOCK_THREADS>,
top_k_cuda_fused_prepare<2, BLOCK_THREADS>,
top_k_cuda_fused_prepare<3, BLOCK_THREADS>,
top_k_cuda_fused_prepare<4, BLOCK_THREADS>,
top_k_cuda_fused_prepare<5, BLOCK_THREADS>,
top_k_cuda_fused_prepare<6, BLOCK_THREADS>,
top_k_cuda_fused_prepare<7, BLOCK_THREADS>,
top_k_cuda_fused_prepare<8, BLOCK_THREADS>,
top_k_cuda_fused_prepare<9, BLOCK_THREADS>,
top_k_cuda_fused_prepare<10, BLOCK_THREADS>,
top_k_cuda_fused_prepare<11, BLOCK_THREADS>,
top_k_cuda_fused_prepare<12, BLOCK_THREADS>,
top_k_cuda_fused_prepare<13, BLOCK_THREADS>,
top_k_cuda_fused_prepare<14, BLOCK_THREADS>,
top_k_cuda_fused_prepare<15, BLOCK_THREADS>,
top_k_cuda_fused_prepare<16, BLOCK_THREADS>,
top_k_cuda_fused_prepare<17, BLOCK_THREADS>,
top_k_cuda_fused_prepare<18, BLOCK_THREADS>,
top_k_cuda_fused_prepare<19, BLOCK_THREADS>,
top_k_cuda_fused_prepare<20, BLOCK_THREADS>,
top_k_cuda_fused_prepare<21, BLOCK_THREADS>,
top_k_cuda_fused_prepare<22, BLOCK_THREADS>,
top_k_cuda_fused_prepare<23, BLOCK_THREADS>,
top_k_cuda_fused_prepare<24, BLOCK_THREADS>,
top_k_cuda_fused_prepare<25, BLOCK_THREADS>,
top_k_cuda_fused_prepare<26, BLOCK_THREADS>,
top_k_cuda_fused_prepare<27, BLOCK_THREADS>,
top_k_cuda_fused_prepare<28, BLOCK_THREADS>,
top_k_cuda_fused_prepare<29, BLOCK_THREADS>,
top_k_cuda_fused_prepare<30, BLOCK_THREADS>,
top_k_cuda_fused_prepare<31, BLOCK_THREADS>,
top_k_cuda_fused_prepare<32, BLOCK_THREADS>,
};
const int num_segments = num * num_classes;
uint32_t smem_size = num_top_k * (sizeof(int) + sizeof(uint32_t));
#ifdef SSD_STABLE_TOPK
// TODO implement multi-stage topk
int kernel_index = (num_preds_per_class + BLOCK_THREADS - 1) / BLOCK_THREADS;
dim3 block(BLOCK_THREADS);
#else
uint32_t num_warps = (num_preds_per_class > 128) ? (128/32) : (num_preds_per_class + 31) / 32;
int kernel_index = num_preds_per_class / (num_warps * 32);
// we have kernels with up to 16 registers per thread
// increase the number of threads if necessary
while (kernel_index >= 32) {
kernel_index /= 2;
num_warps *= 2;
}
// a maximum of 1024 threads is supported
assert(num_warps * 32 <= 1024);
dim3 block(num_warps * 32);
#endif
dim3 grid(num_classes, num);
assert(kernel_index < 32);
top_k_kernels[kernel_index]<<<grid, block, smem_size, stream>>>((int*) (conf_scores_gpu), (int*) (conf_scores_gpu), (int*)index_array_gpu, (int*)active_counts_gpu, (int*)active_counts_per_batch_gpu, num_preds_per_class, num_top_k, num_segments, background_label_id, confidence_threshold);
blockSort<T_SCORE>(
(const T_SCORE*) (conf_scores_gpu), (T_SCORE*) (conf_scores_gpu),
(const int*) (index_array_gpu), (int*) (index_array_gpu), (int*)active_counts_gpu,
num_top_k, num_preds_per_class, num_segments, stream
);
CSC(cudaGetLastError(), STATUS_FAILURE);
return STATUS_SUCCESS;
}
// sortScoresPerClass LAUNCH CONFIG {{{
typedef ssdStatus_t (*tkspcFunc)(cudaStream_t,
const int,
const int,
const int,
const int,
const int,
const float,
void*,
void*,
void*,
void*,
void*);
struct tkspcLaunchConfig
{
DType_t t_score;
tkspcFunc function;
tkspcLaunchConfig(DType_t t_score)
: t_score(t_score)
{
}
tkspcLaunchConfig(DType_t t_score, tkspcFunc function)
: t_score(t_score)
, function(function)
{
}
bool operator==(const tkspcLaunchConfig& other)
{
return t_score == other.t_score;
}
};
static std::vector<tkspcLaunchConfig> tkspcFuncVec;
bool tkspcInit()
{
tkspcFuncVec.push_back(tkspcLaunchConfig(DataType::kFLOAT,
topKScoresPerClass_gpu<float>));
return true;
}
static bool initialized = tkspcInit();
//}}}
ssdStatus_t topKScoresPerClass(
cudaStream_t stream,
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const int background_label_id,
const float confidence_threshold,
const DType_t DT_SCORE,
void* conf_scores_gpu,
void* index_array_gpu,
void *active_count_per_class,
void *active_count_per_batch,
void* workspace)
{
tkspcLaunchConfig lc = tkspcLaunchConfig(DT_SCORE);
for (unsigned i = 0; i < tkspcFuncVec.size(); ++i)
{
if (lc == tkspcFuncVec[i])
{
DEBUG_PRINTF("sortScoresPerClass kernel %d\n", i);
return tkspcFuncVec[i].function(stream,
num,
num_classes,
num_preds_per_class,
num_top_k,
background_label_id,
confidence_threshold,
conf_scores_gpu,
index_array_gpu,
active_count_per_class,
active_count_per_batch,
workspace);
}
}
return STATUS_BAD_PARAM;
}
size_t topKScoresPerClassWorkspaceSize(
const int num,
const int num_classes,
const int num_preds_per_class,
const int num_top_k,
const DType_t DT_CONF)
{
return 0;
}
} // namespace plugin
} // namespace nvinfer1
|
1d72670d10560ad16b5cf03619f22809ef537ce2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//FIXME: mutex & cond variable
#include<cstdio>
#include<pthread.h>
typedef struct {
int size;
int v;
int *vs;
} VertexList;
const float eps = 1e-7;
pthread_cond_t tcond;
__global__ void vecAdd(float *C, float *A, float *B, int N){
int i = threadIdx.x + blockDim.x * blockIdx.x;
if(i<N)C[i] = A[i] + B[i];
}
void testMem(void *x){
int z = (int) x;
printf("child here\n");
pthread_exit(NULL);
}
int main(){
const int n = (1<<23);
srand(time(NULL));
const int ns = n * sizeof(float);
pthread_t child;
pthread_attr_t attr;
pthread_cond_init(&tcond, NULL);
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
pthread_create(&child, &attr, testMem, (void *)n);
printf("%d\n",ns);
//printf("waiting for cond.\n");
//pthread_mutex_lock(&tcondLock);
//pthread_cond_wait(&tcond, &tcondLock);
float *A,*B,*C,*dA,*dB,*dC;
A=(float *)malloc(ns);
B=(float *)malloc(ns);
C=(float *)malloc(ns);
hipMalloc((void **)&dA, ns);
hipMalloc((void **)&dB, ns);
hipMalloc((void **)&dC, ns);
for(int i=0;i<1000;i++){
A[i]=float(rand())/RAND_MAX;
B[i]=float(rand())/RAND_MAX;
}
hipMemcpy(dA, A, ns, hipMemcpyHostToDevice);
hipMemcpy(dB, B, ns, hipMemcpyHostToDevice);
pthread_join(child, NULL);
printf("child exited.\n");
hipLaunchKernelGGL(( vecAdd), dim3(n/256), dim3(256), 0, 0, dC, dA, dB, n);
hipMemcpy(C, dC, ns, hipMemcpyDeviceToHost);
for(int i=0;i<100;i++){
if(abs(C[i] - A[i] - B[i])<eps)continue;
printf("%.3f + %.3f = %.3f\t %.3f\n", A[i], B[i], C[i], A[i] + B[i]);
}
gets(NULL);
hipFree(dA);
hipFree(dB);
hipFree(dC);
free(A);
free(B);
free(C);
pthread_attr_destroy(&attr);
pthread_cond_destroy(&tcond);
pthread_exit(NULL);
}
| 1d72670d10560ad16b5cf03619f22809ef537ce2.cu | //FIXME: mutex & cond variable
#include<cstdio>
#include<pthread.h>
typedef struct {
int size;
int v;
int *vs;
} VertexList;
const float eps = 1e-7;
pthread_cond_t tcond;
__global__ void vecAdd(float *C, float *A, float *B, int N){
int i = threadIdx.x + blockDim.x * blockIdx.x;
if(i<N)C[i] = A[i] + B[i];
}
void testMem(void *x){
int z = (int) x;
printf("child here\n");
pthread_exit(NULL);
}
int main(){
const int n = (1<<23);
srand(time(NULL));
const int ns = n * sizeof(float);
pthread_t child;
pthread_attr_t attr;
pthread_cond_init(&tcond, NULL);
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
pthread_create(&child, &attr, testMem, (void *)n);
printf("%d\n",ns);
//printf("waiting for cond.\n");
//pthread_mutex_lock(&tcondLock);
//pthread_cond_wait(&tcond, &tcondLock);
float *A,*B,*C,*dA,*dB,*dC;
A=(float *)malloc(ns);
B=(float *)malloc(ns);
C=(float *)malloc(ns);
cudaMalloc((void **)&dA, ns);
cudaMalloc((void **)&dB, ns);
cudaMalloc((void **)&dC, ns);
for(int i=0;i<1000;i++){
A[i]=float(rand())/RAND_MAX;
B[i]=float(rand())/RAND_MAX;
}
cudaMemcpy(dA, A, ns, cudaMemcpyHostToDevice);
cudaMemcpy(dB, B, ns, cudaMemcpyHostToDevice);
pthread_join(child, NULL);
printf("child exited.\n");
vecAdd<<<n/256, 256>>> (dC, dA, dB, n);
cudaMemcpy(C, dC, ns, cudaMemcpyDeviceToHost);
for(int i=0;i<100;i++){
if(abs(C[i] - A[i] - B[i])<eps)continue;
printf("%.3f + %.3f = %.3f\t %.3f\n", A[i], B[i], C[i], A[i] + B[i]);
}
gets(NULL);
cudaFree(dA);
cudaFree(dB);
cudaFree(dC);
free(A);
free(B);
free(C);
pthread_attr_destroy(&attr);
pthread_cond_destroy(&tcond);
pthread_exit(NULL);
}
|
5b6fdf3f3235f3f0e0fbb01b1aea21b9804ba2c1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "ball_query_gpu.h"
#include "cuda_utils.h"
__global__ void ball_query_kernel_fast(int b, int n, int m, float radius, int nsample,
const float *__restrict__ new_xyz, const float *__restrict__ xyz, int *__restrict__ idx) {
// new_xyz: (B, M, 3)
// xyz: (B, N, 3)
// output:
// idx: (B, M, nsample)
int bs_idx = blockIdx.y;
int pt_idx = blockIdx.x * blockDim.x + threadIdx.x;
if (bs_idx >= b || pt_idx >= m) return;
new_xyz += bs_idx * m * 3 + pt_idx * 3;
xyz += bs_idx * n * 3;
idx += bs_idx * m * nsample + pt_idx * nsample;
float radius2 = radius * radius;
float new_x = new_xyz[0];
float new_y = new_xyz[1];
float new_z = new_xyz[2];
int cnt = 0;
for (int k = 0; k < n; ++k) {
float x = xyz[k * 3 + 0];
float y = xyz[k * 3 + 1];
float z = xyz[k * 3 + 2];
float d2 = (new_x - x) * (new_x - x) + (new_y - y) * (new_y - y) + (new_z - z) * (new_z - z);
if (d2 < radius2){
if (cnt == 0){
for (int l = 0; l < nsample; ++l) {
idx[l] = k;
}
}
idx[cnt] = k;
++cnt;
if (cnt >= nsample) break;
}
}
}
void ball_query_kernel_launcher_fast(int b, int n, int m, float radius, int nsample, \
const float *new_xyz, const float *xyz, int *idx) {
// new_xyz: (B, M, 3)
// xyz: (B, N, 3)
// output:
// idx: (B, M, nsample)
hipError_t err;
dim3 blocks(DIVUP(m, THREADS_PER_BLOCK), b); // blockIdx.x(col), blockIdx.y(row)
dim3 threads(THREADS_PER_BLOCK);
hipLaunchKernelGGL(( ball_query_kernel_fast), dim3(blocks), dim3(threads), 0, 0, b, n, m, radius, nsample, new_xyz, xyz, idx);
// hipDeviceSynchronize(); // for using printf in kernel function
err = hipGetLastError();
if (hipSuccess != err) {
fprintf(stderr, "CUDA kernel failed : %s\n", hipGetErrorString(err));
exit(-1);
}
} | 5b6fdf3f3235f3f0e0fbb01b1aea21b9804ba2c1.cu | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "ball_query_gpu.h"
#include "cuda_utils.h"
__global__ void ball_query_kernel_fast(int b, int n, int m, float radius, int nsample,
const float *__restrict__ new_xyz, const float *__restrict__ xyz, int *__restrict__ idx) {
// new_xyz: (B, M, 3)
// xyz: (B, N, 3)
// output:
// idx: (B, M, nsample)
int bs_idx = blockIdx.y;
int pt_idx = blockIdx.x * blockDim.x + threadIdx.x;
if (bs_idx >= b || pt_idx >= m) return;
new_xyz += bs_idx * m * 3 + pt_idx * 3;
xyz += bs_idx * n * 3;
idx += bs_idx * m * nsample + pt_idx * nsample;
float radius2 = radius * radius;
float new_x = new_xyz[0];
float new_y = new_xyz[1];
float new_z = new_xyz[2];
int cnt = 0;
for (int k = 0; k < n; ++k) {
float x = xyz[k * 3 + 0];
float y = xyz[k * 3 + 1];
float z = xyz[k * 3 + 2];
float d2 = (new_x - x) * (new_x - x) + (new_y - y) * (new_y - y) + (new_z - z) * (new_z - z);
if (d2 < radius2){
if (cnt == 0){
for (int l = 0; l < nsample; ++l) {
idx[l] = k;
}
}
idx[cnt] = k;
++cnt;
if (cnt >= nsample) break;
}
}
}
void ball_query_kernel_launcher_fast(int b, int n, int m, float radius, int nsample, \
const float *new_xyz, const float *xyz, int *idx) {
// new_xyz: (B, M, 3)
// xyz: (B, N, 3)
// output:
// idx: (B, M, nsample)
cudaError_t err;
dim3 blocks(DIVUP(m, THREADS_PER_BLOCK), b); // blockIdx.x(col), blockIdx.y(row)
dim3 threads(THREADS_PER_BLOCK);
ball_query_kernel_fast<<<blocks, threads>>>(b, n, m, radius, nsample, new_xyz, xyz, idx);
// cudaDeviceSynchronize(); // for using printf in kernel function
err = cudaGetLastError();
if (cudaSuccess != err) {
fprintf(stderr, "CUDA kernel failed : %s\n", cudaGetErrorString(err));
exit(-1);
}
} |
c1e31c0f9d8c575c43ecab18fc8dc4681b826f78.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "wb.h"
#define check(A, M) { if (!A) wbLog(ERROR, M); }
__global__
void vecAdd (float * in1, float * in2, float * out, int len)
{
//@@ Insert code to implement vector addition here
int i = blockIdx.x * blockDiim.x + threadIdx.x;
if (i < len) out[i] = in1[i] + in2[i];
}
int main (int argc, char ** argv)
{
wbArg_t args;
hipError_t error;
int inputSize;
int inputLength;
float * hostInput1;
float * hostInput2;
float * hostOutput;
float * deviceInput1;
float * deviceInput2;
float * deviceOutput;
args = wbArg_read(argc, argv);
wbTime_start(Generic, "Importing data and creating memory on host");
hostInput1 = (float *) wbImport(wbArg_getInputFile(args, 0), &inputLength);
hostInput2 = (float *) wbImport(wbArg_getInputFile(args, 1), &inputLength);
hostOutput = (float *) malloc(inputLength * sizeof(float));
wbTime_stop(Generic, "Importing data and creating memory on host");
wbLog(TRACE, "The input length is ", inputLength);
inputSize = inputLength * sizeof(float);
wbTime_start(GPU, "Allocating GPU memory.");
//@@ Allocate GPU memory here
error = hipMalloc((void **) &deviceInput1, inputSize);
check(error == hipSuccess, "Couldn't allocate memory of Input1");
error = hipMalloc((void **) &deviceInput2, inputSize);
check(error == hipSuccess, "Couldn't allocate memory of Input2");
error = hipMalloc((void **) &deviceOutput, inputSize);
check(error == hipSuccess, "Couldn't allocate memory of Output");
wbTime_stop(GPU, "Allocating GPU memory.");
wbTime_start(GPU, "Copying input memory to the GPU.");
//@@ Copy memory to the GPU here
error = hipMemcpy(deviceInput1, hostInput1, inputSize, hipMemcpyHostToDevice);
check(error == hipSuccess, "Couldn't copy Input1 data to the GPU");
error = hipMemcpy(deviceInput2, hostInput2, inputSize, hipMemcpyHostToDevice);
check(error == hipSuccess, "Couldn't copy Input2 data to the GPU");
wbTime_stop(GPU, "Copying input memory to the GPU.");
//@@ Initialize the grid and block dimensions here
dim3 DimGrid(ceil(inputLength / 256.f), 1, 1);
dim3 DimBlock(256, 1, 1);
wbTime_start(Compute, "Performing CUDA computation");
//@@ Launch the GPU Kernel here
hipLaunchKernelGGL(( vecAdd), dim3(DimGrid), dim3(DimBlock), 0, 0, deviceInput1, deviceInput2, deviceOutput, inputLength);
hipDeviceSynchronize();
wbTime_stop(Compute, "Performing CUDA computation");
wbTime_start(Copy, "Copying output memory to the CPU");
//@@ Copy the GPU memory back to the CPU here
error = hipMemcpy(hostOutput, deviceOutput, inputSize, hipMemcpyDeviceToHost);
check(error == hipSuccess, "Couldn't copy Output memory to CPU");
wbTime_stop(Copy, "Copying output memory to the CPU");
wbTime_start(GPU, "Freeing GPU Memory");
//@@ Free the GPU memory here
hipFree(deviceInput1);
hipFree(deviceInput2);
hipFree(deviceOutput);
wbTime_stop(GPU, "Freeing GPU Memory");
wbSolution(args, hostOutput, inputLength);
free(hostInput1);
free(hostInput2);
free(hostOutput);
return 0;
}
| c1e31c0f9d8c575c43ecab18fc8dc4681b826f78.cu | #include "wb.h"
#define check(A, M) { if (!A) wbLog(ERROR, M); }
__global__
void vecAdd (float * in1, float * in2, float * out, int len)
{
//@@ Insert code to implement vector addition here
int i = blockIdx.x * blockDiim.x + threadIdx.x;
if (i < len) out[i] = in1[i] + in2[i];
}
int main (int argc, char ** argv)
{
wbArg_t args;
cudaError_t error;
int inputSize;
int inputLength;
float * hostInput1;
float * hostInput2;
float * hostOutput;
float * deviceInput1;
float * deviceInput2;
float * deviceOutput;
args = wbArg_read(argc, argv);
wbTime_start(Generic, "Importing data and creating memory on host");
hostInput1 = (float *) wbImport(wbArg_getInputFile(args, 0), &inputLength);
hostInput2 = (float *) wbImport(wbArg_getInputFile(args, 1), &inputLength);
hostOutput = (float *) malloc(inputLength * sizeof(float));
wbTime_stop(Generic, "Importing data and creating memory on host");
wbLog(TRACE, "The input length is ", inputLength);
inputSize = inputLength * sizeof(float);
wbTime_start(GPU, "Allocating GPU memory.");
//@@ Allocate GPU memory here
error = cudaMalloc((void **) &deviceInput1, inputSize);
check(error == cudaSuccess, "Couldn't allocate memory of Input1");
error = cudaMalloc((void **) &deviceInput2, inputSize);
check(error == cudaSuccess, "Couldn't allocate memory of Input2");
error = cudaMalloc((void **) &deviceOutput, inputSize);
check(error == cudaSuccess, "Couldn't allocate memory of Output");
wbTime_stop(GPU, "Allocating GPU memory.");
wbTime_start(GPU, "Copying input memory to the GPU.");
//@@ Copy memory to the GPU here
error = cudaMemcpy(deviceInput1, hostInput1, inputSize, cudaMemcpyHostToDevice);
check(error == cudaSuccess, "Couldn't copy Input1 data to the GPU");
error = cudaMemcpy(deviceInput2, hostInput2, inputSize, cudaMemcpyHostToDevice);
check(error == cudaSuccess, "Couldn't copy Input2 data to the GPU");
wbTime_stop(GPU, "Copying input memory to the GPU.");
//@@ Initialize the grid and block dimensions here
dim3 DimGrid(ceil(inputLength / 256.f), 1, 1);
dim3 DimBlock(256, 1, 1);
wbTime_start(Compute, "Performing CUDA computation");
//@@ Launch the GPU Kernel here
vecAdd<<<DimGrid, DimBlock>>>(deviceInput1, deviceInput2, deviceOutput, inputLength);
cudaThreadSynchronize();
wbTime_stop(Compute, "Performing CUDA computation");
wbTime_start(Copy, "Copying output memory to the CPU");
//@@ Copy the GPU memory back to the CPU here
error = cudaMemcpy(hostOutput, deviceOutput, inputSize, cudaMemcpyDeviceToHost);
check(error == cudaSuccess, "Couldn't copy Output memory to CPU");
wbTime_stop(Copy, "Copying output memory to the CPU");
wbTime_start(GPU, "Freeing GPU Memory");
//@@ Free the GPU memory here
cudaFree(deviceInput1);
cudaFree(deviceInput2);
cudaFree(deviceOutput);
wbTime_stop(GPU, "Freeing GPU Memory");
wbSolution(args, hostOutput, inputLength);
free(hostInput1);
free(hostInput2);
free(hostOutput);
return 0;
}
|
4fb5dfa2185ca038687c4c75a09a0c138ef3bba4.hip | // !!! This is a file automatically generated by hipify!!!
#include "tensor.cuh"
Tensor::Tensor(size_t x_dim, size_t y_dim) : shape(x_dim, y_dim), data_device(nullptr), data_host(nullptr),
device_allocated(false), host_allocated(false){
}
Tensor::Tensor(Shape shape) : Tensor(shape.x, shape.y){
}
Tensor::Tensor(Shape shape, std::vector<float> input) : Tensor(shape.x, shape.y){
allocateMemory();
for(int i=0; i<input.size(); i++){
data_host.get()[i] = input[i];
}
copyHostToDevice();
}
void Tensor::allocateCudaMemory(){
if (!device_allocated){
float *device_memory = nullptr;
hipMalloc(&device_memory, shape.x * shape.y * sizeof(float));
NNException::throwIfDeviceErrorsOccurred("Cannot allocate CUDA memory for Tensor3D.");
data_device = std::shared_ptr<float>(device_memory,
[&](float *ptr) { hipFree(ptr); });
device_allocated = true;
}
}
void Tensor::allocateHostMemory(){
if (!host_allocated){
data_host = std::shared_ptr<float>(new float[shape.x * shape.y],
[&](float *ptr) { delete[] ptr; });
host_allocated = true;
}
}
void Tensor::allocateMemory(){
allocateCudaMemory();
allocateHostMemory();
}
void Tensor::allocateMemoryIfNotAllocated(Shape shape){
if (!device_allocated && !host_allocated){
this->shape = shape;
allocateMemory();
}
}
void Tensor::copyHostToDevice(){
if (device_allocated && host_allocated){
hipMemcpy(data_device.get(), data_host.get(), shape.x * shape.y * sizeof(float), hipMemcpyHostToDevice);
NNException::throwIfDeviceErrorsOccurred("Cannot copy host data to CUDA device.");
}
else{
throw NNException("Cannot copy host data to not allocated memory on device.");
}
}
void Tensor::copyDeviceToHost(){
if (device_allocated && host_allocated){
hipMemcpy(data_host.get(), data_device.get(), shape.x * shape.y * sizeof(float), hipMemcpyDeviceToHost);
NNException::throwIfDeviceErrorsOccurred("Cannot copy device data to host.");
}
else{
throw NNException("Cannot copy device data to not allocated memory on host.");
}
}
float &Tensor::operator[](const int index){
return data_host.get()[index];
}
const float &Tensor::operator[](const int index) const{
return data_host.get()[index];
}
| 4fb5dfa2185ca038687c4c75a09a0c138ef3bba4.cu | #include "tensor.cuh"
Tensor::Tensor(size_t x_dim, size_t y_dim) : shape(x_dim, y_dim), data_device(nullptr), data_host(nullptr),
device_allocated(false), host_allocated(false){
}
Tensor::Tensor(Shape shape) : Tensor(shape.x, shape.y){
}
Tensor::Tensor(Shape shape, std::vector<float> input) : Tensor(shape.x, shape.y){
allocateMemory();
for(int i=0; i<input.size(); i++){
data_host.get()[i] = input[i];
}
copyHostToDevice();
}
void Tensor::allocateCudaMemory(){
if (!device_allocated){
float *device_memory = nullptr;
cudaMalloc(&device_memory, shape.x * shape.y * sizeof(float));
NNException::throwIfDeviceErrorsOccurred("Cannot allocate CUDA memory for Tensor3D.");
data_device = std::shared_ptr<float>(device_memory,
[&](float *ptr) { cudaFree(ptr); });
device_allocated = true;
}
}
void Tensor::allocateHostMemory(){
if (!host_allocated){
data_host = std::shared_ptr<float>(new float[shape.x * shape.y],
[&](float *ptr) { delete[] ptr; });
host_allocated = true;
}
}
void Tensor::allocateMemory(){
allocateCudaMemory();
allocateHostMemory();
}
void Tensor::allocateMemoryIfNotAllocated(Shape shape){
if (!device_allocated && !host_allocated){
this->shape = shape;
allocateMemory();
}
}
void Tensor::copyHostToDevice(){
if (device_allocated && host_allocated){
cudaMemcpy(data_device.get(), data_host.get(), shape.x * shape.y * sizeof(float), cudaMemcpyHostToDevice);
NNException::throwIfDeviceErrorsOccurred("Cannot copy host data to CUDA device.");
}
else{
throw NNException("Cannot copy host data to not allocated memory on device.");
}
}
void Tensor::copyDeviceToHost(){
if (device_allocated && host_allocated){
cudaMemcpy(data_host.get(), data_device.get(), shape.x * shape.y * sizeof(float), cudaMemcpyDeviceToHost);
NNException::throwIfDeviceErrorsOccurred("Cannot copy device data to host.");
}
else{
throw NNException("Cannot copy device data to not allocated memory on host.");
}
}
float &Tensor::operator[](const int index){
return data_host.get()[index];
}
const float &Tensor::operator[](const int index) const{
return data_host.get()[index];
}
|
57961ddee393e3b417301ccbba05c9e0948baf64.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include <THH/THHAtomics.cuh>
#include <stdio.h>
#include <math.h>
#include <float.h>
using namespace at;
#define CUDA_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); \
i += blockDim.x * gridDim.x)
const int CUDA_NUM_THREADS = 1024;
const int kMaxGridNum = 65535;
inline int GET_BLOCKS(const int N)
{
return ::min(kMaxGridNum, (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS);
}
template <typename scalar_t>
__device__ scalar_t deformable_im2col_bilinear(const scalar_t *bottom_data, const int data_width,
const int height, const int width, scalar_t h, scalar_t w)
{
int h_low = floor(h);
int w_low = floor(w);
int h_high = h_low + 1;
int w_high = w_low + 1;
scalar_t lh = h - h_low;
scalar_t lw = w - w_low;
scalar_t hh = 1 - lh, hw = 1 - lw;
scalar_t v1 = 0;
if (h_low >= 0 && w_low >= 0)
v1 = bottom_data[h_low * data_width + w_low];
scalar_t v2 = 0;
if (h_low >= 0 && w_high <= width - 1)
v2 = bottom_data[h_low * data_width + w_high];
scalar_t v3 = 0;
if (h_high <= height - 1 && w_low >= 0)
v3 = bottom_data[h_high * data_width + w_low];
scalar_t v4 = 0;
if (h_high <= height - 1 && w_high <= width - 1)
v4 = bottom_data[h_high * data_width + w_high];
scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw;
scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
return val;
}
template <typename scalar_t>
__device__ scalar_t get_gradient_weight(scalar_t argmax_h, scalar_t argmax_w,
const int h, const int w, const int height, const int width)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (h == argmax_h_low && w == argmax_w_low)
weight = (h + 1 - argmax_h) * (w + 1 - argmax_w);
if (h == argmax_h_low && w == argmax_w_high)
weight = (h + 1 - argmax_h) * (argmax_w + 1 - w);
if (h == argmax_h_high && w == argmax_w_low)
weight = (argmax_h + 1 - h) * (w + 1 - argmax_w);
if (h == argmax_h_high && w == argmax_w_high)
weight = (argmax_h + 1 - h) * (argmax_w + 1 - w);
return weight;
}
template <typename scalar_t>
__device__ scalar_t get_coordinate_weight(scalar_t argmax_h, scalar_t argmax_w,
const int height, const int width, const scalar_t *im_data,
const int data_width, const int bp_dir)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (bp_dir == 0)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
else if (bp_dir == 1)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
return weight;
}
template <typename scalar_t>
__global__ void deformable_im2col_gpu_kernel(const int n, const scalar_t *data_im, const scalar_t *data_offset,
const int height, const int width, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w, const int channel_per_deformable_group,
const int batch_size, const int num_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *data_col)
{
CUDA_KERNEL_LOOP(index, n)
{
// index index of output matrix
const int w_col = index % width_col;
const int h_col = (index / width_col) % height_col;
const int b_col = (index / width_col / height_col) % batch_size;
const int c_im = (index / width_col / height_col) / batch_size;
const int c_col = c_im * kernel_h * kernel_w;
// compute deformable group index
const int deformable_group_index = c_im / channel_per_deformable_group;
const int h_in = h_col * stride_h - pad_h;
const int w_in = w_col * stride_w - pad_w;
scalar_t *data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col;
//const scalar_t* data_im_ptr = data_im + ((b_col * num_channels + c_im) * height + h_in) * width + w_in;
const scalar_t *data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width;
const scalar_t *data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
for (int i = 0; i < kernel_h; ++i)
{
for (int j = 0; j < kernel_w; ++j)
{
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
scalar_t val = static_cast<scalar_t>(0);
const scalar_t h_im = h_in + i * dilation_h + offset_h;
const scalar_t w_im = w_in + j * dilation_w + offset_w;
if (h_im > -1 && w_im > -1 && h_im < height && w_im < width)
{
//const scalar_t map_h = i * dilation_h + offset_h;
//const scalar_t map_w = j * dilation_w + offset_w;
//const int cur_height = height - h_in;
//const int cur_width = width - w_in;
//val = deformable_im2col_bilinear(data_im_ptr, width, cur_height, cur_width, map_h, map_w);
val = deformable_im2col_bilinear(data_im_ptr, width, height, width, h_im, w_im);
}
*data_col_ptr = val;
data_col_ptr += batch_size * height_col * width_col;
}
}
}
}
void deformable_im2col(
const at::Tensor data_im, const at::Tensor data_offset, const int channels,
const int height, const int width, const int ksize_h, const int ksize_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w, const int parallel_imgs,
const int deformable_group, at::Tensor data_col)
{
// num_axes should be smaller than block size
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = channels * height_col * width_col * parallel_imgs;
int channel_per_deformable_group = channels / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_im.type(), "deformable_im2col_gpu", ([&] {
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *data_col_ = data_col.data<scalar_t>();
hipLaunchKernelGGL(( deformable_im2col_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_im_, data_offset_, height, width, ksize_h, ksize_w,
pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w,
channel_per_deformable_group, parallel_imgs, channels, deformable_group,
height_col, width_col, data_col_);
}));
hipError_t err = hipGetLastError();
if (err != hipSuccess)
{
printf("error in deformable_im2col: %s\n", hipGetErrorString(err));
}
}
template <typename scalar_t>
__global__ void deformable_col2im_gpu_kernel(
const int n, const scalar_t *data_col, const scalar_t *data_offset,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_im)
{
CUDA_KERNEL_LOOP(index, n)
{
const int j = (index / width_col / height_col / batch_size) % kernel_w;
const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h;
const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h;
// compute the start and end of the output
const int deformable_group_index = c / channel_per_deformable_group;
int w_out = index % width_col;
int h_out = (index / width_col) % height_col;
int b = (index / width_col / height_col) % batch_size;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) *
2 * kernel_h * kernel_w * height_col * width_col;
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h;
const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w;
const scalar_t cur_top_grad = data_col[index];
const int cur_h = (int)cur_inv_h_data;
const int cur_w = (int)cur_inv_w_data;
for (int dy = -2; dy <= 2; dy++)
{
for (int dx = -2; dx <= 2; dx++)
{
if (cur_h + dy >= 0 && cur_h + dy < height &&
cur_w + dx >= 0 && cur_w + dx < width &&
abs(cur_inv_h_data - (cur_h + dy)) < 1 &&
abs(cur_inv_w_data - (cur_w + dx)) < 1)
{
int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx;
scalar_t weight = get_gradient_weight(cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width);
atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad);
}
}
}
}
}
void deformable_col2im(
const at::Tensor data_col, const at::Tensor data_offset, const int channels,
const int height, const int width, const int ksize_h,
const int ksize_w, const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int parallel_imgs, const int deformable_group,
at::Tensor grad_im)
{
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = channels * ksize_h * ksize_w * height_col * width_col * parallel_imgs;
int channel_per_deformable_group = channels / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "deformable_col2im_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *grad_im_ = grad_im.data<scalar_t>();
hipLaunchKernelGGL(( deformable_col2im_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_col_, data_offset_, channels, height, width, ksize_h,
ksize_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
parallel_imgs, deformable_group, height_col, width_col, grad_im_);
}));
hipError_t err = hipGetLastError();
if (err != hipSuccess)
{
printf("error in deformable_col2im: %s\n", hipGetErrorString(err));
}
}
template <typename scalar_t>
__global__ void deformable_col2im_coord_gpu_kernel(const int n, const scalar_t *data_col,
const scalar_t *data_im, const scalar_t *data_offset,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int offset_channels, const int deformable_group,
const int height_col, const int width_col, scalar_t *grad_offset)
{
CUDA_KERNEL_LOOP(index, n)
{
scalar_t val = 0;
int w = index % width_col;
int h = (index / width_col) % height_col;
int c = (index / width_col / height_col) % offset_channels;
int b = (index / width_col / height_col) / offset_channels;
// compute the start and end of the output
const int deformable_group_index = c / (2 * kernel_h * kernel_w);
const int col_step = kernel_h * kernel_w;
int cnt = 0;
const scalar_t *data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group *
batch_size * width_col * height_col;
const scalar_t *data_im_ptr = data_im + (b * deformable_group + deformable_group_index) *
channel_per_deformable_group / kernel_h / kernel_w * height * width;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 *
kernel_h * kernel_w * height_col * width_col;
const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w;
for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step)
{
const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w;
const int bp_dir = offset_c % 2;
int j = (col_pos / width_col / height_col / batch_size) % kernel_w;
int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h;
int w_out = col_pos % width_col;
int h_out = (col_pos / width_col) % height_col;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out);
const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out);
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
scalar_t inv_h = h_in + i * dilation_h + offset_h;
scalar_t inv_w = w_in + j * dilation_w + offset_w;
if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width)
{
inv_h = inv_w = -2;
}
const scalar_t weight = get_coordinate_weight(
inv_h, inv_w,
height, width, data_im_ptr + cnt * height * width, width, bp_dir);
val += weight * data_col_ptr[col_pos];
cnt += 1;
}
grad_offset[index] = val;
}
}
void deformable_col2im_coord(
const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset,
const int channels, const int height, const int width, const int ksize_h,
const int ksize_w, const int pad_h, const int pad_w, const int stride_h,
const int stride_w, const int dilation_h, const int dilation_w,
const int parallel_imgs, const int deformable_group, at::Tensor grad_offset)
{
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = height_col * width_col * 2 * ksize_h * ksize_w * deformable_group * parallel_imgs;
int channel_per_deformable_group = channels * ksize_h * ksize_w / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "deformable_col2im_coord_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *grad_offset_ = grad_offset.data<scalar_t>();
hipLaunchKernelGGL(( deformable_col2im_coord_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_col_, data_im_, data_offset_, channels, height, width,
ksize_h, ksize_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
parallel_imgs, 2 * ksize_h * ksize_w * deformable_group, deformable_group,
height_col, width_col, grad_offset_);
}));
}
template <typename scalar_t>
__device__ scalar_t dmcn_im2col_bilinear(const scalar_t *bottom_data, const int data_width,
const int height, const int width, scalar_t h, scalar_t w)
{
int h_low = floor(h);
int w_low = floor(w);
int h_high = h_low + 1;
int w_high = w_low + 1;
scalar_t lh = h - h_low;
scalar_t lw = w - w_low;
scalar_t hh = 1 - lh, hw = 1 - lw;
scalar_t v1 = 0;
if (h_low >= 0 && w_low >= 0)
v1 = bottom_data[h_low * data_width + w_low];
scalar_t v2 = 0;
if (h_low >= 0 && w_high <= width - 1)
v2 = bottom_data[h_low * data_width + w_high];
scalar_t v3 = 0;
if (h_high <= height - 1 && w_low >= 0)
v3 = bottom_data[h_high * data_width + w_low];
scalar_t v4 = 0;
if (h_high <= height - 1 && w_high <= width - 1)
v4 = bottom_data[h_high * data_width + w_high];
scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw;
scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
return val;
}
template <typename scalar_t>
__device__ scalar_t dmcn_get_gradient_weight(scalar_t argmax_h, scalar_t argmax_w,
const int h, const int w, const int height, const int width)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (h == argmax_h_low && w == argmax_w_low)
weight = (h + 1 - argmax_h) * (w + 1 - argmax_w);
if (h == argmax_h_low && w == argmax_w_high)
weight = (h + 1 - argmax_h) * (argmax_w + 1 - w);
if (h == argmax_h_high && w == argmax_w_low)
weight = (argmax_h + 1 - h) * (w + 1 - argmax_w);
if (h == argmax_h_high && w == argmax_w_high)
weight = (argmax_h + 1 - h) * (argmax_w + 1 - w);
return weight;
}
template <typename scalar_t>
__device__ scalar_t dmcn_get_coordinate_weight(scalar_t argmax_h, scalar_t argmax_w,
const int height, const int width, const scalar_t *im_data,
const int data_width, const int bp_dir)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (bp_dir == 0)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
else if (bp_dir == 1)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
return weight;
}
template <typename scalar_t>
__global__ void modulated_deformable_im2col_gpu_kernel(const int n,
const scalar_t *data_im, const scalar_t *data_offset, const scalar_t *data_mask,
const int height, const int width, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int num_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *data_col)
{
CUDA_KERNEL_LOOP(index, n)
{
// index index of output matrix
// height_out -> height_col , width_out -> width_col
const int w_col = index % width_col; // width index
const int h_col = (index / width_col) % height_col; // height index
const int b_col = (index / width_col / height_col) % batch_size;
const int c_im = (index / width_col / height_col) / batch_size;
const int c_col = c_im * kernel_h * kernel_w;
// compute deformable group index
const int deformable_group_index = c_im / channel_per_deformable_group;
const int h_in = h_col * stride_h - pad_h;
const int w_in = w_col * stride_w - pad_w;
scalar_t *data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col;
//const float* data_im_ptr = data_im + ((b_col * num_channels + c_im) * height + h_in) * width + w_in;
const scalar_t *data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width;
const scalar_t *data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b_col * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
for (int i = 0; i < kernel_h; ++i)
{
for (int j = 0; j < kernel_w; ++j)
{
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col;
const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_col) * width_col + w_col;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
scalar_t val = static_cast<scalar_t>(0);
const scalar_t h_im = h_in + i * dilation_h + offset_h;
const scalar_t w_im = w_in + j * dilation_w + offset_w;
//if (h_im >= 0 && w_im >= 0 && h_im < height && w_im < width) {
if (h_im > -1 && w_im > -1 && h_im < height && w_im < width)
{
//const float map_h = i * dilation_h + offset_h;
//const float map_w = j * dilation_w + offset_w;
//const int cur_height = height - h_in;
//const int cur_width = width - w_in;
//val = dmcn_im2col_bilinear(data_im_ptr, width, cur_height, cur_width, map_h, map_w);
val = dmcn_im2col_bilinear(data_im_ptr, width, height, width, h_im, w_im);
}
*data_col_ptr = val * mask;
data_col_ptr += batch_size * height_col * width_col;
//data_col_ptr += height_col * width_col;
}
}
}
}
template <typename scalar_t>
__global__ void modulated_deformable_col2im_gpu_kernel(const int n,
const scalar_t *data_col, const scalar_t *data_offset, const scalar_t *data_mask,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_im)
{
CUDA_KERNEL_LOOP(index, n)
{
const int j = (index / width_col / height_col / batch_size) % kernel_w;
const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h;
const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h;
// compute the start and end of the output
const int deformable_group_index = c / channel_per_deformable_group;
int w_out = index % width_col;
int h_out = (index / width_col) % height_col;
int b = (index / width_col / height_col) % batch_size;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out;
const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_out) * width_col + w_out;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h;
const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w;
const scalar_t cur_top_grad = data_col[index] * mask;
const int cur_h = (int)cur_inv_h_data;
const int cur_w = (int)cur_inv_w_data;
for (int dy = -2; dy <= 2; dy++)
{
for (int dx = -2; dx <= 2; dx++)
{
if (cur_h + dy >= 0 && cur_h + dy < height &&
cur_w + dx >= 0 && cur_w + dx < width &&
abs(cur_inv_h_data - (cur_h + dy)) < 1 &&
abs(cur_inv_w_data - (cur_w + dx)) < 1)
{
int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx;
scalar_t weight = dmcn_get_gradient_weight(cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width);
atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad);
}
}
}
}
}
template <typename scalar_t>
__global__ void modulated_deformable_col2im_coord_gpu_kernel(const int n,
const scalar_t *data_col, const scalar_t *data_im,
const scalar_t *data_offset, const scalar_t *data_mask,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int offset_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_offset, scalar_t *grad_mask)
{
CUDA_KERNEL_LOOP(index, n)
{
scalar_t val = 0, mval = 0;
int w = index % width_col;
int h = (index / width_col) % height_col;
int c = (index / width_col / height_col) % offset_channels;
int b = (index / width_col / height_col) / offset_channels;
// compute the start and end of the output
const int deformable_group_index = c / (2 * kernel_h * kernel_w);
const int col_step = kernel_h * kernel_w;
int cnt = 0;
const scalar_t *data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group * batch_size * width_col * height_col;
const scalar_t *data_im_ptr = data_im + (b * deformable_group + deformable_group_index) * channel_per_deformable_group / kernel_h / kernel_w * height * width;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w;
for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step)
{
const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w;
const int bp_dir = offset_c % 2;
int j = (col_pos / width_col / height_col / batch_size) % kernel_w;
int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h;
int w_out = col_pos % width_col;
int h_out = (col_pos / width_col) % height_col;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out);
const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out);
const int data_mask_hw_ptr = (((i * kernel_w + j) * height_col + h_out) * width_col + w_out);
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
scalar_t inv_h = h_in + i * dilation_h + offset_h;
scalar_t inv_w = w_in + j * dilation_w + offset_w;
if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width)
{
inv_h = inv_w = -2;
}
else
{
mval += data_col_ptr[col_pos] * dmcn_im2col_bilinear(data_im_ptr + cnt * height * width, width, height, width, inv_h, inv_w);
}
const scalar_t weight = dmcn_get_coordinate_weight(
inv_h, inv_w,
height, width, data_im_ptr + cnt * height * width, width, bp_dir);
val += weight * data_col_ptr[col_pos] * mask;
cnt += 1;
}
// KERNEL_ASSIGN(grad_offset[index], offset_req, val);
grad_offset[index] = val;
if (offset_c % 2 == 0)
// KERNEL_ASSIGN(grad_mask[(((b * deformable_group + deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * height_col + h) * width_col + w], mask_req, mval);
grad_mask[(((b * deformable_group + deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * height_col + h) * width_col + w] = mval;
}
}
void modulated_deformable_im2col_cuda(
const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kenerl_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group, at::Tensor data_col)
{
// num_axes should be smaller than block size
const int channel_per_deformable_group = channels / deformable_group;
const int num_kernels = channels * batch_size * height_col * width_col;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_im.type(), "modulated_deformable_im2col_gpu", ([&] {
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *data_col_ = data_col.data<scalar_t>();
hipLaunchKernelGGL(( modulated_deformable_im2col_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_im_, data_offset_, data_mask_, height_im, width_im, kernel_h, kenerl_w,
pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group,
batch_size, channels, deformable_group, height_col, width_col, data_col_);
}));
hipError_t err = hipGetLastError();
if (err != hipSuccess)
{
printf("error in modulated_deformable_im2col_cuda: %s\n", hipGetErrorString(err));
}
}
void modulated_deformable_col2im_cuda(
const at::Tensor data_col, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group, at::Tensor grad_im)
{
const int channel_per_deformable_group = channels / deformable_group;
const int num_kernels = channels * kernel_h * kernel_w * batch_size * height_col * width_col;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "modulated_deformable_col2im_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *grad_im_ = grad_im.data<scalar_t>();
hipLaunchKernelGGL(( modulated_deformable_col2im_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_col_, data_offset_, data_mask_, channels, height_im, width_im,
kernel_h, kernel_w, pad_h, pad_h, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
batch_size, deformable_group, height_col, width_col, grad_im_);
}));
hipError_t err = hipGetLastError();
if (err != hipSuccess)
{
printf("error in modulated_deformable_col2im_cuda: %s\n", hipGetErrorString(err));
}
}
void modulated_deformable_col2im_coord_cuda(
const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group,
at::Tensor grad_offset, at::Tensor grad_mask)
{
const int num_kernels = batch_size * height_col * width_col * 2 * kernel_h * kernel_w * deformable_group;
const int channel_per_deformable_group = channels * kernel_h * kernel_w / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "modulated_deformable_col2im_coord_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *grad_offset_ = grad_offset.data<scalar_t>();
scalar_t *grad_mask_ = grad_mask.data<scalar_t>();
hipLaunchKernelGGL(( modulated_deformable_col2im_coord_gpu_kernel), dim3(GET_BLOCKS(num_kernels)), dim3(CUDA_NUM_THREADS), 0, 0,
num_kernels, data_col_, data_im_, data_offset_, data_mask_, channels, height_im, width_im,
kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
batch_size, 2 * kernel_h * kernel_w * deformable_group, deformable_group, height_col, width_col,
grad_offset_, grad_mask_);
}));
hipError_t err = hipGetLastError();
if (err != hipSuccess)
{
printf("error in modulated_deformable_col2im_coord_cuda: %s\n", hipGetErrorString(err));
}
}
| 57961ddee393e3b417301ccbba05c9e0948baf64.cu | #include <ATen/ATen.h>
#include <THC/THCAtomics.cuh>
#include <stdio.h>
#include <math.h>
#include <float.h>
using namespace at;
#define CUDA_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); \
i += blockDim.x * gridDim.x)
const int CUDA_NUM_THREADS = 1024;
const int kMaxGridNum = 65535;
inline int GET_BLOCKS(const int N)
{
return std::min(kMaxGridNum, (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS);
}
template <typename scalar_t>
__device__ scalar_t deformable_im2col_bilinear(const scalar_t *bottom_data, const int data_width,
const int height, const int width, scalar_t h, scalar_t w)
{
int h_low = floor(h);
int w_low = floor(w);
int h_high = h_low + 1;
int w_high = w_low + 1;
scalar_t lh = h - h_low;
scalar_t lw = w - w_low;
scalar_t hh = 1 - lh, hw = 1 - lw;
scalar_t v1 = 0;
if (h_low >= 0 && w_low >= 0)
v1 = bottom_data[h_low * data_width + w_low];
scalar_t v2 = 0;
if (h_low >= 0 && w_high <= width - 1)
v2 = bottom_data[h_low * data_width + w_high];
scalar_t v3 = 0;
if (h_high <= height - 1 && w_low >= 0)
v3 = bottom_data[h_high * data_width + w_low];
scalar_t v4 = 0;
if (h_high <= height - 1 && w_high <= width - 1)
v4 = bottom_data[h_high * data_width + w_high];
scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw;
scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
return val;
}
template <typename scalar_t>
__device__ scalar_t get_gradient_weight(scalar_t argmax_h, scalar_t argmax_w,
const int h, const int w, const int height, const int width)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (h == argmax_h_low && w == argmax_w_low)
weight = (h + 1 - argmax_h) * (w + 1 - argmax_w);
if (h == argmax_h_low && w == argmax_w_high)
weight = (h + 1 - argmax_h) * (argmax_w + 1 - w);
if (h == argmax_h_high && w == argmax_w_low)
weight = (argmax_h + 1 - h) * (w + 1 - argmax_w);
if (h == argmax_h_high && w == argmax_w_high)
weight = (argmax_h + 1 - h) * (argmax_w + 1 - w);
return weight;
}
template <typename scalar_t>
__device__ scalar_t get_coordinate_weight(scalar_t argmax_h, scalar_t argmax_w,
const int height, const int width, const scalar_t *im_data,
const int data_width, const int bp_dir)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (bp_dir == 0)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
else if (bp_dir == 1)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
return weight;
}
template <typename scalar_t>
__global__ void deformable_im2col_gpu_kernel(const int n, const scalar_t *data_im, const scalar_t *data_offset,
const int height, const int width, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w, const int channel_per_deformable_group,
const int batch_size, const int num_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *data_col)
{
CUDA_KERNEL_LOOP(index, n)
{
// index index of output matrix
const int w_col = index % width_col;
const int h_col = (index / width_col) % height_col;
const int b_col = (index / width_col / height_col) % batch_size;
const int c_im = (index / width_col / height_col) / batch_size;
const int c_col = c_im * kernel_h * kernel_w;
// compute deformable group index
const int deformable_group_index = c_im / channel_per_deformable_group;
const int h_in = h_col * stride_h - pad_h;
const int w_in = w_col * stride_w - pad_w;
scalar_t *data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col;
//const scalar_t* data_im_ptr = data_im + ((b_col * num_channels + c_im) * height + h_in) * width + w_in;
const scalar_t *data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width;
const scalar_t *data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
for (int i = 0; i < kernel_h; ++i)
{
for (int j = 0; j < kernel_w; ++j)
{
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
scalar_t val = static_cast<scalar_t>(0);
const scalar_t h_im = h_in + i * dilation_h + offset_h;
const scalar_t w_im = w_in + j * dilation_w + offset_w;
if (h_im > -1 && w_im > -1 && h_im < height && w_im < width)
{
//const scalar_t map_h = i * dilation_h + offset_h;
//const scalar_t map_w = j * dilation_w + offset_w;
//const int cur_height = height - h_in;
//const int cur_width = width - w_in;
//val = deformable_im2col_bilinear(data_im_ptr, width, cur_height, cur_width, map_h, map_w);
val = deformable_im2col_bilinear(data_im_ptr, width, height, width, h_im, w_im);
}
*data_col_ptr = val;
data_col_ptr += batch_size * height_col * width_col;
}
}
}
}
void deformable_im2col(
const at::Tensor data_im, const at::Tensor data_offset, const int channels,
const int height, const int width, const int ksize_h, const int ksize_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w, const int parallel_imgs,
const int deformable_group, at::Tensor data_col)
{
// num_axes should be smaller than block size
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = channels * height_col * width_col * parallel_imgs;
int channel_per_deformable_group = channels / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_im.type(), "deformable_im2col_gpu", ([&] {
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *data_col_ = data_col.data<scalar_t>();
deformable_im2col_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_im_, data_offset_, height, width, ksize_h, ksize_w,
pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w,
channel_per_deformable_group, parallel_imgs, channels, deformable_group,
height_col, width_col, data_col_);
}));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess)
{
printf("error in deformable_im2col: %s\n", cudaGetErrorString(err));
}
}
template <typename scalar_t>
__global__ void deformable_col2im_gpu_kernel(
const int n, const scalar_t *data_col, const scalar_t *data_offset,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_im)
{
CUDA_KERNEL_LOOP(index, n)
{
const int j = (index / width_col / height_col / batch_size) % kernel_w;
const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h;
const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h;
// compute the start and end of the output
const int deformable_group_index = c / channel_per_deformable_group;
int w_out = index % width_col;
int h_out = (index / width_col) % height_col;
int b = (index / width_col / height_col) % batch_size;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) *
2 * kernel_h * kernel_w * height_col * width_col;
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h;
const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w;
const scalar_t cur_top_grad = data_col[index];
const int cur_h = (int)cur_inv_h_data;
const int cur_w = (int)cur_inv_w_data;
for (int dy = -2; dy <= 2; dy++)
{
for (int dx = -2; dx <= 2; dx++)
{
if (cur_h + dy >= 0 && cur_h + dy < height &&
cur_w + dx >= 0 && cur_w + dx < width &&
abs(cur_inv_h_data - (cur_h + dy)) < 1 &&
abs(cur_inv_w_data - (cur_w + dx)) < 1)
{
int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx;
scalar_t weight = get_gradient_weight(cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width);
atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad);
}
}
}
}
}
void deformable_col2im(
const at::Tensor data_col, const at::Tensor data_offset, const int channels,
const int height, const int width, const int ksize_h,
const int ksize_w, const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int parallel_imgs, const int deformable_group,
at::Tensor grad_im)
{
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = channels * ksize_h * ksize_w * height_col * width_col * parallel_imgs;
int channel_per_deformable_group = channels / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "deformable_col2im_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *grad_im_ = grad_im.data<scalar_t>();
deformable_col2im_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_col_, data_offset_, channels, height, width, ksize_h,
ksize_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
parallel_imgs, deformable_group, height_col, width_col, grad_im_);
}));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess)
{
printf("error in deformable_col2im: %s\n", cudaGetErrorString(err));
}
}
template <typename scalar_t>
__global__ void deformable_col2im_coord_gpu_kernel(const int n, const scalar_t *data_col,
const scalar_t *data_im, const scalar_t *data_offset,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int offset_channels, const int deformable_group,
const int height_col, const int width_col, scalar_t *grad_offset)
{
CUDA_KERNEL_LOOP(index, n)
{
scalar_t val = 0;
int w = index % width_col;
int h = (index / width_col) % height_col;
int c = (index / width_col / height_col) % offset_channels;
int b = (index / width_col / height_col) / offset_channels;
// compute the start and end of the output
const int deformable_group_index = c / (2 * kernel_h * kernel_w);
const int col_step = kernel_h * kernel_w;
int cnt = 0;
const scalar_t *data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group *
batch_size * width_col * height_col;
const scalar_t *data_im_ptr = data_im + (b * deformable_group + deformable_group_index) *
channel_per_deformable_group / kernel_h / kernel_w * height * width;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 *
kernel_h * kernel_w * height_col * width_col;
const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w;
for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step)
{
const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w;
const int bp_dir = offset_c % 2;
int j = (col_pos / width_col / height_col / batch_size) % kernel_w;
int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h;
int w_out = col_pos % width_col;
int h_out = (col_pos / width_col) % height_col;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out);
const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out);
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
scalar_t inv_h = h_in + i * dilation_h + offset_h;
scalar_t inv_w = w_in + j * dilation_w + offset_w;
if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width)
{
inv_h = inv_w = -2;
}
const scalar_t weight = get_coordinate_weight(
inv_h, inv_w,
height, width, data_im_ptr + cnt * height * width, width, bp_dir);
val += weight * data_col_ptr[col_pos];
cnt += 1;
}
grad_offset[index] = val;
}
}
void deformable_col2im_coord(
const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset,
const int channels, const int height, const int width, const int ksize_h,
const int ksize_w, const int pad_h, const int pad_w, const int stride_h,
const int stride_w, const int dilation_h, const int dilation_w,
const int parallel_imgs, const int deformable_group, at::Tensor grad_offset)
{
int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1;
int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1;
int num_kernels = height_col * width_col * 2 * ksize_h * ksize_w * deformable_group * parallel_imgs;
int channel_per_deformable_group = channels * ksize_h * ksize_w / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "deformable_col2im_coord_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
scalar_t *grad_offset_ = grad_offset.data<scalar_t>();
deformable_col2im_coord_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_col_, data_im_, data_offset_, channels, height, width,
ksize_h, ksize_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
parallel_imgs, 2 * ksize_h * ksize_w * deformable_group, deformable_group,
height_col, width_col, grad_offset_);
}));
}
template <typename scalar_t>
__device__ scalar_t dmcn_im2col_bilinear(const scalar_t *bottom_data, const int data_width,
const int height, const int width, scalar_t h, scalar_t w)
{
int h_low = floor(h);
int w_low = floor(w);
int h_high = h_low + 1;
int w_high = w_low + 1;
scalar_t lh = h - h_low;
scalar_t lw = w - w_low;
scalar_t hh = 1 - lh, hw = 1 - lw;
scalar_t v1 = 0;
if (h_low >= 0 && w_low >= 0)
v1 = bottom_data[h_low * data_width + w_low];
scalar_t v2 = 0;
if (h_low >= 0 && w_high <= width - 1)
v2 = bottom_data[h_low * data_width + w_high];
scalar_t v3 = 0;
if (h_high <= height - 1 && w_low >= 0)
v3 = bottom_data[h_high * data_width + w_low];
scalar_t v4 = 0;
if (h_high <= height - 1 && w_high <= width - 1)
v4 = bottom_data[h_high * data_width + w_high];
scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw;
scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
return val;
}
template <typename scalar_t>
__device__ scalar_t dmcn_get_gradient_weight(scalar_t argmax_h, scalar_t argmax_w,
const int h, const int w, const int height, const int width)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (h == argmax_h_low && w == argmax_w_low)
weight = (h + 1 - argmax_h) * (w + 1 - argmax_w);
if (h == argmax_h_low && w == argmax_w_high)
weight = (h + 1 - argmax_h) * (argmax_w + 1 - w);
if (h == argmax_h_high && w == argmax_w_low)
weight = (argmax_h + 1 - h) * (w + 1 - argmax_w);
if (h == argmax_h_high && w == argmax_w_high)
weight = (argmax_h + 1 - h) * (argmax_w + 1 - w);
return weight;
}
template <typename scalar_t>
__device__ scalar_t dmcn_get_coordinate_weight(scalar_t argmax_h, scalar_t argmax_w,
const int height, const int width, const scalar_t *im_data,
const int data_width, const int bp_dir)
{
if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width)
{
//empty
return 0;
}
int argmax_h_low = floor(argmax_h);
int argmax_w_low = floor(argmax_w);
int argmax_h_high = argmax_h_low + 1;
int argmax_w_high = argmax_w_low + 1;
scalar_t weight = 0;
if (bp_dir == 0)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
else if (bp_dir == 1)
{
if (argmax_h_low >= 0 && argmax_w_low >= 0)
weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low];
if (argmax_h_low >= 0 && argmax_w_high <= width - 1)
weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high];
if (argmax_h_high <= height - 1 && argmax_w_low >= 0)
weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low];
if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1)
weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high];
}
return weight;
}
template <typename scalar_t>
__global__ void modulated_deformable_im2col_gpu_kernel(const int n,
const scalar_t *data_im, const scalar_t *data_offset, const scalar_t *data_mask,
const int height, const int width, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int num_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *data_col)
{
CUDA_KERNEL_LOOP(index, n)
{
// index index of output matrix
// height_out -> height_col , width_out -> width_col
const int w_col = index % width_col; // width index
const int h_col = (index / width_col) % height_col; // height index
const int b_col = (index / width_col / height_col) % batch_size;
const int c_im = (index / width_col / height_col) / batch_size;
const int c_col = c_im * kernel_h * kernel_w;
// compute deformable group index
const int deformable_group_index = c_im / channel_per_deformable_group;
const int h_in = h_col * stride_h - pad_h;
const int w_in = w_col * stride_w - pad_w;
scalar_t *data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col;
//const float* data_im_ptr = data_im + ((b_col * num_channels + c_im) * height + h_in) * width + w_in;
const scalar_t *data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width;
const scalar_t *data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b_col * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
for (int i = 0; i < kernel_h; ++i)
{
for (int j = 0; j < kernel_w; ++j)
{
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col;
const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_col) * width_col + w_col;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
scalar_t val = static_cast<scalar_t>(0);
const scalar_t h_im = h_in + i * dilation_h + offset_h;
const scalar_t w_im = w_in + j * dilation_w + offset_w;
//if (h_im >= 0 && w_im >= 0 && h_im < height && w_im < width) {
if (h_im > -1 && w_im > -1 && h_im < height && w_im < width)
{
//const float map_h = i * dilation_h + offset_h;
//const float map_w = j * dilation_w + offset_w;
//const int cur_height = height - h_in;
//const int cur_width = width - w_in;
//val = dmcn_im2col_bilinear(data_im_ptr, width, cur_height, cur_width, map_h, map_w);
val = dmcn_im2col_bilinear(data_im_ptr, width, height, width, h_im, w_im);
}
*data_col_ptr = val * mask;
data_col_ptr += batch_size * height_col * width_col;
//data_col_ptr += height_col * width_col;
}
}
}
}
template <typename scalar_t>
__global__ void modulated_deformable_col2im_gpu_kernel(const int n,
const scalar_t *data_col, const scalar_t *data_offset, const scalar_t *data_mask,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_im)
{
CUDA_KERNEL_LOOP(index, n)
{
const int j = (index / width_col / height_col / batch_size) % kernel_w;
const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h;
const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h;
// compute the start and end of the output
const int deformable_group_index = c / channel_per_deformable_group;
int w_out = index % width_col;
int h_out = (index / width_col) % height_col;
int b = (index / width_col / height_col) % batch_size;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out;
const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out;
const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_out) * width_col + w_out;
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h;
const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w;
const scalar_t cur_top_grad = data_col[index] * mask;
const int cur_h = (int)cur_inv_h_data;
const int cur_w = (int)cur_inv_w_data;
for (int dy = -2; dy <= 2; dy++)
{
for (int dx = -2; dx <= 2; dx++)
{
if (cur_h + dy >= 0 && cur_h + dy < height &&
cur_w + dx >= 0 && cur_w + dx < width &&
abs(cur_inv_h_data - (cur_h + dy)) < 1 &&
abs(cur_inv_w_data - (cur_w + dx)) < 1)
{
int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx;
scalar_t weight = dmcn_get_gradient_weight(cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width);
atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad);
}
}
}
}
}
template <typename scalar_t>
__global__ void modulated_deformable_col2im_coord_gpu_kernel(const int n,
const scalar_t *data_col, const scalar_t *data_im,
const scalar_t *data_offset, const scalar_t *data_mask,
const int channels, const int height, const int width,
const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int channel_per_deformable_group,
const int batch_size, const int offset_channels, const int deformable_group,
const int height_col, const int width_col,
scalar_t *grad_offset, scalar_t *grad_mask)
{
CUDA_KERNEL_LOOP(index, n)
{
scalar_t val = 0, mval = 0;
int w = index % width_col;
int h = (index / width_col) % height_col;
int c = (index / width_col / height_col) % offset_channels;
int b = (index / width_col / height_col) / offset_channels;
// compute the start and end of the output
const int deformable_group_index = c / (2 * kernel_h * kernel_w);
const int col_step = kernel_h * kernel_w;
int cnt = 0;
const scalar_t *data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group * batch_size * width_col * height_col;
const scalar_t *data_im_ptr = data_im + (b * deformable_group + deformable_group_index) * channel_per_deformable_group / kernel_h / kernel_w * height * width;
const scalar_t *data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col;
const scalar_t *data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col;
const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w;
for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step)
{
const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w;
const int bp_dir = offset_c % 2;
int j = (col_pos / width_col / height_col / batch_size) % kernel_w;
int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h;
int w_out = col_pos % width_col;
int h_out = (col_pos / width_col) % height_col;
int w_in = w_out * stride_w - pad_w;
int h_in = h_out * stride_h - pad_h;
const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out);
const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out);
const int data_mask_hw_ptr = (((i * kernel_w + j) * height_col + h_out) * width_col + w_out);
const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr];
const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr];
const scalar_t mask = data_mask_ptr[data_mask_hw_ptr];
scalar_t inv_h = h_in + i * dilation_h + offset_h;
scalar_t inv_w = w_in + j * dilation_w + offset_w;
if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width)
{
inv_h = inv_w = -2;
}
else
{
mval += data_col_ptr[col_pos] * dmcn_im2col_bilinear(data_im_ptr + cnt * height * width, width, height, width, inv_h, inv_w);
}
const scalar_t weight = dmcn_get_coordinate_weight(
inv_h, inv_w,
height, width, data_im_ptr + cnt * height * width, width, bp_dir);
val += weight * data_col_ptr[col_pos] * mask;
cnt += 1;
}
// KERNEL_ASSIGN(grad_offset[index], offset_req, val);
grad_offset[index] = val;
if (offset_c % 2 == 0)
// KERNEL_ASSIGN(grad_mask[(((b * deformable_group + deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * height_col + h) * width_col + w], mask_req, mval);
grad_mask[(((b * deformable_group + deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * height_col + h) * width_col + w] = mval;
}
}
void modulated_deformable_im2col_cuda(
const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kenerl_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group, at::Tensor data_col)
{
// num_axes should be smaller than block size
const int channel_per_deformable_group = channels / deformable_group;
const int num_kernels = channels * batch_size * height_col * width_col;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_im.type(), "modulated_deformable_im2col_gpu", ([&] {
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *data_col_ = data_col.data<scalar_t>();
modulated_deformable_im2col_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_im_, data_offset_, data_mask_, height_im, width_im, kernel_h, kenerl_w,
pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group,
batch_size, channels, deformable_group, height_col, width_col, data_col_);
}));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess)
{
printf("error in modulated_deformable_im2col_cuda: %s\n", cudaGetErrorString(err));
}
}
void modulated_deformable_col2im_cuda(
const at::Tensor data_col, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group, at::Tensor grad_im)
{
const int channel_per_deformable_group = channels / deformable_group;
const int num_kernels = channels * kernel_h * kernel_w * batch_size * height_col * width_col;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "modulated_deformable_col2im_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *grad_im_ = grad_im.data<scalar_t>();
modulated_deformable_col2im_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_col_, data_offset_, data_mask_, channels, height_im, width_im,
kernel_h, kernel_w, pad_h, pad_h, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
batch_size, deformable_group, height_col, width_col, grad_im_);
}));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess)
{
printf("error in modulated_deformable_col2im_cuda: %s\n", cudaGetErrorString(err));
}
}
void modulated_deformable_col2im_coord_cuda(
const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask,
const int batch_size, const int channels, const int height_im, const int width_im,
const int height_col, const int width_col, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w, const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
const int deformable_group,
at::Tensor grad_offset, at::Tensor grad_mask)
{
const int num_kernels = batch_size * height_col * width_col * 2 * kernel_h * kernel_w * deformable_group;
const int channel_per_deformable_group = channels * kernel_h * kernel_w / deformable_group;
AT_DISPATCH_FLOATING_TYPES_AND_HALF(
data_col.type(), "modulated_deformable_col2im_coord_gpu", ([&] {
const scalar_t *data_col_ = data_col.data<scalar_t>();
const scalar_t *data_im_ = data_im.data<scalar_t>();
const scalar_t *data_offset_ = data_offset.data<scalar_t>();
const scalar_t *data_mask_ = data_mask.data<scalar_t>();
scalar_t *grad_offset_ = grad_offset.data<scalar_t>();
scalar_t *grad_mask_ = grad_mask.data<scalar_t>();
modulated_deformable_col2im_coord_gpu_kernel<<<GET_BLOCKS(num_kernels), CUDA_NUM_THREADS>>>(
num_kernels, data_col_, data_im_, data_offset_, data_mask_, channels, height_im, width_im,
kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w,
dilation_h, dilation_w, channel_per_deformable_group,
batch_size, 2 * kernel_h * kernel_w * deformable_group, deformable_group, height_col, width_col,
grad_offset_, grad_mask_);
}));
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess)
{
printf("error in modulated_deformable_col2im_coord_cuda: %s\n", cudaGetErrorString(err));
}
}
|
a2b6686ca2baec94d4431b6f05a1d81e06d04a0a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@generated from magmablas/zlaswp_sym.cu normal z -> d, Tue Feb 9 16:05:32 2016
@author Stan Tomov
@author Mathieu Faverge
@author Ichitaro Yamazaki
@author Mark Gates
*/
#include "magma_internal.h"
// MAX_PIVOTS is maximum number of pivots to apply in each kernel launch
// NTHREADS is number of threads in a block
// 64 and 256 are better on Kepler;
//#define MAX_PIVOTS 64
//#define NTHREADS 256
#define MAX_PIVOTS 32
#define NTHREADS 64
typedef struct {
double *dA;
int n, lda, j0, npivots;
int ipiv[MAX_PIVOTS];
} dlaswp_sym_params_t;
// Matrix A is stored row or column-wise in dA.
// Divide matrix A into block-columns of NTHREADS columns each.
// Each GPU block processes one block-column of A.
// Each thread goes down a column of A,
// swapping rows according to pivots stored in params.
__global__ void dlaswp_sym_kernel( dlaswp_sym_params_t params )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
if ( tid < params.n ) {
for( int ii = params.j0; ii < params.npivots; ++ii ) {
int i1 = ii;
int i2 = params.ipiv[ii];
// swap: i1 <-> i2
// this thread is responsible for the tid-th element
double *A1 = NULL, *A2 = NULL;
if (tid < i1) {
// row swap: (i1,tid) <-> (i2,tid)
A1 = params.dA + tid*params.lda + i1;
A2 = params.dA + tid*params.lda + i2;
} else if (tid == i1) {
// diagonal swap: (i1,i1) <-> (i2,i2)
A1 = params.dA + i1*params.lda + i1;
A2 = params.dA + i2*params.lda + i2;
} else if (tid < i2) {
// row-col swap: (tid,i1) <-> (i2,tid)
A1 = params.dA + i1*params.lda + tid;
A2 = params.dA + tid*params.lda + i2;
} else if (tid == i2) {
// diagonal swap: done by i1-th thread
} else if (tid > i2) {
// column swap: (tid,i1) <-> (tid,i2)
A1 = params.dA + i1*params.lda + tid;
A2 = params.dA + i2*params.lda + tid;
}
if ( A1 != NULL && A2 != NULL) {
double temp = *A1;
*A1 = *A2;
*A2 = temp;
}
}
}
}
// Launch dlaswpx kernel with ceil( n / NTHREADS ) blocks of NTHREADS threads each.
extern "C" void dlaswp_sym( dlaswp_sym_params_t ¶ms, magma_queue_t queue )
{
int blocks = magma_ceildiv(params.n, NTHREADS);
hipLaunchKernelGGL(( dlaswp_sym_kernel), dim3(blocks), dim3(NTHREADS), 0, queue->cuda_stream() , params );
}
/**
Purpose:
=============
DLASWPX performs a series of row interchanges on the matrix A.
One row interchange is initiated for each of rows K1 through K2 of A.
** Unlike LAPACK, here A is stored either row-wise or column-wise,
depending on ldx and ldy. **
Otherwise, this is identical to LAPACK's interface.
Arguments:
==========
\param[in]
n INTEGER
The number of columns of the matrix A.
\param[in,out]
dA DOUBLE PRECISION array on GPU, dimension (*,*)
On entry, the matrix of column dimension N to which the row
interchanges will be applied.
On exit, the permuted matrix.
\param[in]
lda INTEGER
Stride between elements in same column.
\param[in]
k1 INTEGER
The first element of IPIV for which a row interchange will
be done. (One based index.)
\param[in]
k2 INTEGER
The last element of IPIV for which a row interchange will
be done. (One based index.)
\param[in]
ipiv INTEGER array, on CPU, dimension (K2*abs(INCI))
The vector of pivot indices. Only the elements in positions
K1 through K2 of IPIV are accessed.
IPIV(K) = L implies rows K and L are to be interchanged.
\param[in]
inci INTEGER
The increment between successive values of IPIV.
Currently, IPIV > 0.
TODO: If IPIV is negative, the pivots are applied in reverse order.
@param[in]
queue magma_queue_t
Queue to execute in.
@ingroup magma_daux2
********************************************************************/
extern "C" void
magmablas_dlaswp_sym_q(
magma_int_t n, double *dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
const magma_int_t *ipiv, magma_int_t inci,
magma_queue_t queue )
{
magma_int_t info = 0;
if ( n < 0 )
info = -1;
else if ( k1 < 0 )
info = -4;
else if ( k2 < 0 || k2 < k1 )
info = -5;
else if ( inci <= 0 )
info = -7;
if (info != 0) {
magma_xerbla( __func__, -(info) );
return; //info;
}
for( int k = k1-1; k < k2; k += MAX_PIVOTS ) {
int npivots = min( MAX_PIVOTS, k2-k );
// fields are: dA n lda j0 npivots
dlaswp_sym_params_t params = { dA, int(n), int(lda), int(k), int(k+npivots) };
for( int j = 0; j < npivots; ++j ) {
params.ipiv[j] = ipiv[(k+j)*inci] - 1;
}
dlaswp_sym( params, queue );
}
}
| a2b6686ca2baec94d4431b6f05a1d81e06d04a0a.cu | /*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@generated from magmablas/zlaswp_sym.cu normal z -> d, Tue Feb 9 16:05:32 2016
@author Stan Tomov
@author Mathieu Faverge
@author Ichitaro Yamazaki
@author Mark Gates
*/
#include "magma_internal.h"
// MAX_PIVOTS is maximum number of pivots to apply in each kernel launch
// NTHREADS is number of threads in a block
// 64 and 256 are better on Kepler;
//#define MAX_PIVOTS 64
//#define NTHREADS 256
#define MAX_PIVOTS 32
#define NTHREADS 64
typedef struct {
double *dA;
int n, lda, j0, npivots;
int ipiv[MAX_PIVOTS];
} dlaswp_sym_params_t;
// Matrix A is stored row or column-wise in dA.
// Divide matrix A into block-columns of NTHREADS columns each.
// Each GPU block processes one block-column of A.
// Each thread goes down a column of A,
// swapping rows according to pivots stored in params.
__global__ void dlaswp_sym_kernel( dlaswp_sym_params_t params )
{
unsigned int tid = threadIdx.x + blockDim.x*blockIdx.x;
if ( tid < params.n ) {
for( int ii = params.j0; ii < params.npivots; ++ii ) {
int i1 = ii;
int i2 = params.ipiv[ii];
// swap: i1 <-> i2
// this thread is responsible for the tid-th element
double *A1 = NULL, *A2 = NULL;
if (tid < i1) {
// row swap: (i1,tid) <-> (i2,tid)
A1 = params.dA + tid*params.lda + i1;
A2 = params.dA + tid*params.lda + i2;
} else if (tid == i1) {
// diagonal swap: (i1,i1) <-> (i2,i2)
A1 = params.dA + i1*params.lda + i1;
A2 = params.dA + i2*params.lda + i2;
} else if (tid < i2) {
// row-col swap: (tid,i1) <-> (i2,tid)
A1 = params.dA + i1*params.lda + tid;
A2 = params.dA + tid*params.lda + i2;
} else if (tid == i2) {
// diagonal swap: done by i1-th thread
} else if (tid > i2) {
// column swap: (tid,i1) <-> (tid,i2)
A1 = params.dA + i1*params.lda + tid;
A2 = params.dA + i2*params.lda + tid;
}
if ( A1 != NULL && A2 != NULL) {
double temp = *A1;
*A1 = *A2;
*A2 = temp;
}
}
}
}
// Launch dlaswpx kernel with ceil( n / NTHREADS ) blocks of NTHREADS threads each.
extern "C" void dlaswp_sym( dlaswp_sym_params_t ¶ms, magma_queue_t queue )
{
int blocks = magma_ceildiv(params.n, NTHREADS);
dlaswp_sym_kernel<<< blocks, NTHREADS, 0, queue->cuda_stream() >>>( params );
}
/**
Purpose:
=============
DLASWPX performs a series of row interchanges on the matrix A.
One row interchange is initiated for each of rows K1 through K2 of A.
** Unlike LAPACK, here A is stored either row-wise or column-wise,
depending on ldx and ldy. **
Otherwise, this is identical to LAPACK's interface.
Arguments:
==========
\param[in]
n INTEGER
The number of columns of the matrix A.
\param[in,out]
dA DOUBLE PRECISION array on GPU, dimension (*,*)
On entry, the matrix of column dimension N to which the row
interchanges will be applied.
On exit, the permuted matrix.
\param[in]
lda INTEGER
Stride between elements in same column.
\param[in]
k1 INTEGER
The first element of IPIV for which a row interchange will
be done. (One based index.)
\param[in]
k2 INTEGER
The last element of IPIV for which a row interchange will
be done. (One based index.)
\param[in]
ipiv INTEGER array, on CPU, dimension (K2*abs(INCI))
The vector of pivot indices. Only the elements in positions
K1 through K2 of IPIV are accessed.
IPIV(K) = L implies rows K and L are to be interchanged.
\param[in]
inci INTEGER
The increment between successive values of IPIV.
Currently, IPIV > 0.
TODO: If IPIV is negative, the pivots are applied in reverse order.
@param[in]
queue magma_queue_t
Queue to execute in.
@ingroup magma_daux2
********************************************************************/
extern "C" void
magmablas_dlaswp_sym_q(
magma_int_t n, double *dA, magma_int_t lda,
magma_int_t k1, magma_int_t k2,
const magma_int_t *ipiv, magma_int_t inci,
magma_queue_t queue )
{
magma_int_t info = 0;
if ( n < 0 )
info = -1;
else if ( k1 < 0 )
info = -4;
else if ( k2 < 0 || k2 < k1 )
info = -5;
else if ( inci <= 0 )
info = -7;
if (info != 0) {
magma_xerbla( __func__, -(info) );
return; //info;
}
for( int k = k1-1; k < k2; k += MAX_PIVOTS ) {
int npivots = min( MAX_PIVOTS, k2-k );
// fields are: dA n lda j0 npivots
dlaswp_sym_params_t params = { dA, int(n), int(lda), int(k), int(k+npivots) };
for( int j = 0; j < npivots; ++j ) {
params.ipiv[j] = ipiv[(k+j)*inci] - 1;
}
dlaswp_sym( params, queue );
}
}
|
8a4031d99f2ef04cd5b278b46d783b611ed0d0e7.hip | // !!! This is a file automatically generated by hipify!!!
#include "common.h"
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <iostream>
#include <bitset>
#include "device_launch_parameters.h"
/*
* This example demonstrates a simple vector sum on the GPU and on the host.
* The performance of a variety of CUDA thread configurations is tested using
* the sumMatrixOnGPU2D, sumMatrixOnGPU1D, and sumMatrixOnGPUMix kernels.
* sumArraysOnHost sequentially iterates through vector elements on the host.
*/
void initialData(float *ip, const float ival, int size)
{
for (int i = 0; i < size; i++)
{
ip[i] = (float)(rand() & 0xFF) / 100.0f;
}
return;
}
void sumMatrixOnHost(float *A, float *B, float *C, const int nx, const int ny)
{
float *ia = A;
float *ib = B;
float *ic = C;
for (int iy = 0; iy < ny; iy++)
{
for (int ix = 0; ix < nx; ix++)
{
ic[ix] = ia[ix] + ib[ix];
}
ia += nx;
ib += nx;
ic += nx;
}
return;
}
void printMatrix(float *C, const int nx, const int ny)
{
float *ic = C;
for (int iy = 0; iy < ny; iy++)
{
for (int ix = 0; ix < nx; ix++)
{
printf("%f ", ic[ix]);
}
ic += nx;
printf("\n");
}
return;
}
void checkResult(float *hostRef, float *gpuRef, const int N)
{
double epsilon = 1.0E-8;
bool match = 1;
for (int i = 0; i < N; i++)
{
if (abs(hostRef[i] - gpuRef[i]) > epsilon)
{
match = 0;
printf("host %f gpu %f\n", hostRef[i], gpuRef[i]);
break;
}
}
if (match)
printf("Arrays match.\n\n");
else
printf("Arrays do not match.\n\n");
}
// grid 2D block 2D
__global__ void sumMatrixOnGPU2D(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int iy = threadIdx.y + blockIdx.y * blockDim.y;
unsigned int idx = iy * nx + ix;
if (ix < nx && iy < ny)
MatC[idx] = MatA[idx] + MatB[idx];
}
// grid 1D block 1D
__global__ void sumMatrixOnGPU1D(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
if (ix < nx)
for (int iy = 0; iy < ny; iy++)
{
int idx = iy * nx + ix;
MatC[idx] = MatA[idx] + MatB[idx];
}
}
// grid 2D block 1D
__global__ void sumMatrixOnGPUMix(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int iy = blockIdx.y;
unsigned int idx = iy * nx + ix;
if (ix < nx && iy < ny)
MatC[idx] = MatA[idx] + MatB[idx];
}
int main(int argc, char **argv)
{
printf("%s Starting...\n", argv[0]);
// set up device
int dev = 0;
hipDeviceProp_t deviceProp;
CHECK(hipGetDeviceProperties(&deviceProp, dev));
printf("Using Device %d: %s\n", dev, deviceProp.name);
CHECK(hipSetDevice(dev));
// set up data size of matrix
unsigned int idx = 1;
int nx = 1 << 13;
int ny = 1 << 13;
int nxy = nx * ny;
int nBytes = nxy * sizeof(float);
printf("Matrix size: nx %u\n ny %u\n", nx, ny);
// malloc host memory
float *h_A, *h_B, *hostRef, *gpuRef;
h_A = (float *)malloc(nBytes);
h_B = (float *)malloc(nBytes);
hostRef = (float *)malloc(nBytes);
gpuRef = (float *)malloc(nBytes);
// initialize data at host side
double iStart = seconds();
initialData(h_A, 2.0f, nxy);
initialData(h_B, 0.5f, nxy);
double iElaps = seconds() - iStart;
printf("Matrix initialization elapsed %f sec\n", iElaps);
memset(hostRef, 0, nBytes);
memset(gpuRef, 0, nBytes);
iStart = seconds();
sumMatrixOnHost(h_A, h_B, hostRef, nx, ny);
iElaps = seconds() - iStart;
printf("sumMatrixOnHost elapsed %f sec\n", iElaps);
float *d_MatA, *d_MatB, *d_MatC;
CHECK(hipMalloc((void **)&d_MatA, nBytes));
CHECK(hipMalloc((void **)&d_MatB, nBytes));
CHECK(hipMalloc((void **)&d_MatC, nBytes));
CHECK(hipMemcpy(d_MatA, h_A, nBytes, hipMemcpyHostToDevice));
CHECK(hipMemcpy(d_MatB, h_B, nBytes, hipMemcpyHostToDevice));
int dimx = 32;
int dimy = 32;
dim3 block(dimx, dimy);
dim3 grid((nx + block.x - 1) / block.x, (ny + block.y - 1) / block.y);
iStart = seconds();
hipLaunchKernelGGL(( sumMatrixOnGPU2D) , dim3(grid), dim3(block) , 0, 0, d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// adjust block size
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// adjust block size
block.y = 16;
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 16;
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 16;
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 64;
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
sumMatrixOnGPU1D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
sumMatrixOnGPU1D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 128;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
hipLaunchKernelGGL(( sumMatrixOnGPU1D) , dim3(grid), dim3(block) , 0, 0, d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// grid 2D and block 1D
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 128;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 256;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 512;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(hipDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
CHECK(hipMemcpy(gpuRef, d_MatC, nBytes, hipMemcpyDeviceToHost));
checkResult(hostRef, gpuRef, nxy);
CHECK(hipFree(d_MatA));
CHECK(hipFree(d_MatB));
CHECK(hipFree(d_MatC));
free(h_A);
free(h_B);
free(hostRef);
free(gpuRef);
return (0);
} | 8a4031d99f2ef04cd5b278b46d783b611ed0d0e7.cu | #include "common.h"
#include <cuda_runtime.h>
#include <stdio.h>
#include <iostream>
#include <bitset>
#include "device_launch_parameters.h"
/*
* This example demonstrates a simple vector sum on the GPU and on the host.
* The performance of a variety of CUDA thread configurations is tested using
* the sumMatrixOnGPU2D, sumMatrixOnGPU1D, and sumMatrixOnGPUMix kernels.
* sumArraysOnHost sequentially iterates through vector elements on the host.
*/
void initialData(float *ip, const float ival, int size)
{
for (int i = 0; i < size; i++)
{
ip[i] = (float)(rand() & 0xFF) / 100.0f;
}
return;
}
void sumMatrixOnHost(float *A, float *B, float *C, const int nx, const int ny)
{
float *ia = A;
float *ib = B;
float *ic = C;
for (int iy = 0; iy < ny; iy++)
{
for (int ix = 0; ix < nx; ix++)
{
ic[ix] = ia[ix] + ib[ix];
}
ia += nx;
ib += nx;
ic += nx;
}
return;
}
void printMatrix(float *C, const int nx, const int ny)
{
float *ic = C;
for (int iy = 0; iy < ny; iy++)
{
for (int ix = 0; ix < nx; ix++)
{
printf("%f ", ic[ix]);
}
ic += nx;
printf("\n");
}
return;
}
void checkResult(float *hostRef, float *gpuRef, const int N)
{
double epsilon = 1.0E-8;
bool match = 1;
for (int i = 0; i < N; i++)
{
if (abs(hostRef[i] - gpuRef[i]) > epsilon)
{
match = 0;
printf("host %f gpu %f\n", hostRef[i], gpuRef[i]);
break;
}
}
if (match)
printf("Arrays match.\n\n");
else
printf("Arrays do not match.\n\n");
}
// grid 2D block 2D
__global__ void sumMatrixOnGPU2D(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int iy = threadIdx.y + blockIdx.y * blockDim.y;
unsigned int idx = iy * nx + ix;
if (ix < nx && iy < ny)
MatC[idx] = MatA[idx] + MatB[idx];
}
// grid 1D block 1D
__global__ void sumMatrixOnGPU1D(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
if (ix < nx)
for (int iy = 0; iy < ny; iy++)
{
int idx = iy * nx + ix;
MatC[idx] = MatA[idx] + MatB[idx];
}
}
// grid 2D block 1D
__global__ void sumMatrixOnGPUMix(float *MatA, float *MatB, float *MatC, int nx,
int ny)
{
unsigned int ix = threadIdx.x + blockIdx.x * blockDim.x;
unsigned int iy = blockIdx.y;
unsigned int idx = iy * nx + ix;
if (ix < nx && iy < ny)
MatC[idx] = MatA[idx] + MatB[idx];
}
int main(int argc, char **argv)
{
printf("%s Starting...\n", argv[0]);
// set up device
int dev = 0;
cudaDeviceProp deviceProp;
CHECK(cudaGetDeviceProperties(&deviceProp, dev));
printf("Using Device %d: %s\n", dev, deviceProp.name);
CHECK(cudaSetDevice(dev));
// set up data size of matrix
unsigned int idx = 1;
int nx = 1 << 13;
int ny = 1 << 13;
int nxy = nx * ny;
int nBytes = nxy * sizeof(float);
printf("Matrix size: nx %u\n ny %u\n", nx, ny);
// malloc host memory
float *h_A, *h_B, *hostRef, *gpuRef;
h_A = (float *)malloc(nBytes);
h_B = (float *)malloc(nBytes);
hostRef = (float *)malloc(nBytes);
gpuRef = (float *)malloc(nBytes);
// initialize data at host side
double iStart = seconds();
initialData(h_A, 2.0f, nxy);
initialData(h_B, 0.5f, nxy);
double iElaps = seconds() - iStart;
printf("Matrix initialization elapsed %f sec\n", iElaps);
memset(hostRef, 0, nBytes);
memset(gpuRef, 0, nBytes);
iStart = seconds();
sumMatrixOnHost(h_A, h_B, hostRef, nx, ny);
iElaps = seconds() - iStart;
printf("sumMatrixOnHost elapsed %f sec\n", iElaps);
float *d_MatA, *d_MatB, *d_MatC;
CHECK(cudaMalloc((void **)&d_MatA, nBytes));
CHECK(cudaMalloc((void **)&d_MatB, nBytes));
CHECK(cudaMalloc((void **)&d_MatC, nBytes));
CHECK(cudaMemcpy(d_MatA, h_A, nBytes, cudaMemcpyHostToDevice));
CHECK(cudaMemcpy(d_MatB, h_B, nBytes, cudaMemcpyHostToDevice));
int dimx = 32;
int dimy = 32;
dim3 block(dimx, dimy);
dim3 grid((nx + block.x - 1) / block.x, (ny + block.y - 1) / block.y);
iStart = seconds();
sumMatrixOnGPU2D <<< grid, block >>> (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// adjust block size
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// adjust block size
block.y = 16;
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 16;
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 16;
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.y = 64;
block.x = 16;
grid.x = (nx + block.x - 1) / block.x;
grid.y = (ny + block.y - 1) / block.y;
iStart = seconds();
sumMatrixOnGPU2D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU2D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
sumMatrixOnGPU1D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
sumMatrixOnGPU1D << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 128;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = 1;
iStart = seconds();
sumMatrixOnGPU1D <<< grid, block >>> (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPU1D <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
// grid 2D and block 1D
block.x = 32;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 64;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 128;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 256;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
block.x = 512;
grid.x = (nx + block.x - 1) / block.x;
block.y = 1;
grid.y = ny;
iStart = seconds();
sumMatrixOnGPUMix << <grid, block >> > (d_MatA, d_MatB, d_MatC, nx, ny);
CHECK(cudaDeviceSynchronize());
iElaps = seconds() - iStart;
printf("sumMatrixOnGPUMix <<< (%d,%d), (%d,%d) >>> elapsed %f sec\n",
grid.x, grid.y, block.x, block.y, iElaps);
CHECK(cudaMemcpy(gpuRef, d_MatC, nBytes, cudaMemcpyDeviceToHost));
checkResult(hostRef, gpuRef, nxy);
CHECK(cudaFree(d_MatA));
CHECK(cudaFree(d_MatB));
CHECK(cudaFree(d_MatC));
free(h_A);
free(h_B);
free(hostRef);
free(gpuRef);
return (0);
} |
efd9b313c95c6d730da9957bce608d5b04d76c5c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// auto-generated by op2.py
//
//user function
__device__ void gatherLocations_gpu( const float *values, const float *zmin, float *dest) {
dest[0] = values[0] + (values[3] - values[0] + *zmin);
dest[1] = values[0];
dest[2] = values[1]/values[0];
dest[3] = values[2]/values[0];
dest[4] = values[3];
}
// CUDA kernel function
__global__ void op_cuda_gatherLocations(
const float *__restrict ind_arg0,
const int *__restrict opDat0Map,
const float *arg1,
float *arg2,
int block_offset,
int *blkmap,
int *offset,
int *nelems,
int *ncolors,
int *colors,
int nblocks,
int set_size) {
__shared__ int nelem, offset_b;
extern __shared__ char shared[];
if (blockIdx.x+blockIdx.y*gridDim.x >= nblocks) {
return;
}
if (threadIdx.x==0) {
//get sizes and shift pointers and direct-mapped data
int blockId = blkmap[blockIdx.x + blockIdx.y*gridDim.x + block_offset];
nelem = nelems[blockId];
offset_b = offset[blockId];
}
__syncthreads(); // make sure all of above completed
for ( int n=threadIdx.x; n<nelem; n+=blockDim.x ){
int map0idx;
map0idx = opDat0Map[n + offset_b + set_size * 0];
//user-supplied kernel call
gatherLocations_gpu(ind_arg0+map0idx*4,
arg1,
arg2+(n+offset_b)*5);
}
}
//host stub function
void op_par_loop_gatherLocations(char const *name, op_set set,
op_arg arg0,
op_arg arg1,
op_arg arg2){
float*arg1h = (float *)arg1.data;
int nargs = 3;
op_arg args[3];
args[0] = arg0;
args[1] = arg1;
args[2] = arg2;
// initialise timers
double cpu_t1, cpu_t2, wall_t1, wall_t2;
op_timing_realloc(20);
op_timers_core(&cpu_t1, &wall_t1);
OP_kernels[20].name = name;
OP_kernels[20].count += 1;
int ninds = 1;
int inds[3] = {0,-1,-1};
if (OP_diags>2) {
printf(" kernel routine with indirection: gatherLocations\n");
}
//get plan
#ifdef OP_PART_SIZE_20
int part_size = OP_PART_SIZE_20;
#else
int part_size = OP_part_size;
#endif
int set_size = op_mpi_halo_exchanges_grouped(set, nargs, args, 2);
if (set_size > 0) {
op_plan *Plan = op_plan_get(name,set,part_size,nargs,args,ninds,inds);
//transfer constants to GPU
int consts_bytes = 0;
consts_bytes += ROUND_UP(1*sizeof(float));
reallocConstArrays(consts_bytes);
consts_bytes = 0;
arg1.data = OP_consts_h + consts_bytes;
arg1.data_d = OP_consts_d + consts_bytes;
for ( int d=0; d<1; d++ ){
((float *)arg1.data)[d] = arg1h[d];
}
consts_bytes += ROUND_UP(1*sizeof(float));
mvConstArraysToDevice(consts_bytes);
//execute plan
int block_offset = 0;
for ( int col=0; col<Plan->ncolors; col++ ){
if (col==Plan->ncolors_core) {
op_mpi_wait_all_grouped(nargs, args, 2);
}
#ifdef OP_BLOCK_SIZE_20
int nthread = OP_BLOCK_SIZE_20;
#else
int nthread = OP_block_size;
#endif
dim3 nblocks = dim3(Plan->ncolblk[col] >= (1<<16) ? 65535 : Plan->ncolblk[col],
Plan->ncolblk[col] >= (1<<16) ? (Plan->ncolblk[col]-1)/65535+1: 1, 1);
if (Plan->ncolblk[col] > 0) {
hipLaunchKernelGGL(( op_cuda_gatherLocations), dim3(nblocks),dim3(nthread), 0, 0,
(float *)arg0.data_d,
arg0.map_data_d,
(float*)arg1.data_d,
(float*)arg2.data_d,
block_offset,
Plan->blkmap,
Plan->offset,
Plan->nelems,
Plan->nthrcol,
Plan->thrcol,
Plan->ncolblk[col],
set->size+set->exec_size);
}
block_offset += Plan->ncolblk[col];
}
OP_kernels[20].transfer += Plan->transfer;
OP_kernels[20].transfer2 += Plan->transfer2;
}
op_mpi_set_dirtybit_cuda(nargs, args);
if (OP_diags>1) {
cutilSafeCall(hipDeviceSynchronize());
}
//update kernel record
op_timers_core(&cpu_t2, &wall_t2);
OP_kernels[20].time += wall_t2 - wall_t1;
}
| efd9b313c95c6d730da9957bce608d5b04d76c5c.cu | //
// auto-generated by op2.py
//
//user function
__device__ void gatherLocations_gpu( const float *values, const float *zmin, float *dest) {
dest[0] = values[0] + (values[3] - values[0] + *zmin);
dest[1] = values[0];
dest[2] = values[1]/values[0];
dest[3] = values[2]/values[0];
dest[4] = values[3];
}
// CUDA kernel function
__global__ void op_cuda_gatherLocations(
const float *__restrict ind_arg0,
const int *__restrict opDat0Map,
const float *arg1,
float *arg2,
int block_offset,
int *blkmap,
int *offset,
int *nelems,
int *ncolors,
int *colors,
int nblocks,
int set_size) {
__shared__ int nelem, offset_b;
extern __shared__ char shared[];
if (blockIdx.x+blockIdx.y*gridDim.x >= nblocks) {
return;
}
if (threadIdx.x==0) {
//get sizes and shift pointers and direct-mapped data
int blockId = blkmap[blockIdx.x + blockIdx.y*gridDim.x + block_offset];
nelem = nelems[blockId];
offset_b = offset[blockId];
}
__syncthreads(); // make sure all of above completed
for ( int n=threadIdx.x; n<nelem; n+=blockDim.x ){
int map0idx;
map0idx = opDat0Map[n + offset_b + set_size * 0];
//user-supplied kernel call
gatherLocations_gpu(ind_arg0+map0idx*4,
arg1,
arg2+(n+offset_b)*5);
}
}
//host stub function
void op_par_loop_gatherLocations(char const *name, op_set set,
op_arg arg0,
op_arg arg1,
op_arg arg2){
float*arg1h = (float *)arg1.data;
int nargs = 3;
op_arg args[3];
args[0] = arg0;
args[1] = arg1;
args[2] = arg2;
// initialise timers
double cpu_t1, cpu_t2, wall_t1, wall_t2;
op_timing_realloc(20);
op_timers_core(&cpu_t1, &wall_t1);
OP_kernels[20].name = name;
OP_kernels[20].count += 1;
int ninds = 1;
int inds[3] = {0,-1,-1};
if (OP_diags>2) {
printf(" kernel routine with indirection: gatherLocations\n");
}
//get plan
#ifdef OP_PART_SIZE_20
int part_size = OP_PART_SIZE_20;
#else
int part_size = OP_part_size;
#endif
int set_size = op_mpi_halo_exchanges_grouped(set, nargs, args, 2);
if (set_size > 0) {
op_plan *Plan = op_plan_get(name,set,part_size,nargs,args,ninds,inds);
//transfer constants to GPU
int consts_bytes = 0;
consts_bytes += ROUND_UP(1*sizeof(float));
reallocConstArrays(consts_bytes);
consts_bytes = 0;
arg1.data = OP_consts_h + consts_bytes;
arg1.data_d = OP_consts_d + consts_bytes;
for ( int d=0; d<1; d++ ){
((float *)arg1.data)[d] = arg1h[d];
}
consts_bytes += ROUND_UP(1*sizeof(float));
mvConstArraysToDevice(consts_bytes);
//execute plan
int block_offset = 0;
for ( int col=0; col<Plan->ncolors; col++ ){
if (col==Plan->ncolors_core) {
op_mpi_wait_all_grouped(nargs, args, 2);
}
#ifdef OP_BLOCK_SIZE_20
int nthread = OP_BLOCK_SIZE_20;
#else
int nthread = OP_block_size;
#endif
dim3 nblocks = dim3(Plan->ncolblk[col] >= (1<<16) ? 65535 : Plan->ncolblk[col],
Plan->ncolblk[col] >= (1<<16) ? (Plan->ncolblk[col]-1)/65535+1: 1, 1);
if (Plan->ncolblk[col] > 0) {
op_cuda_gatherLocations<<<nblocks,nthread>>>(
(float *)arg0.data_d,
arg0.map_data_d,
(float*)arg1.data_d,
(float*)arg2.data_d,
block_offset,
Plan->blkmap,
Plan->offset,
Plan->nelems,
Plan->nthrcol,
Plan->thrcol,
Plan->ncolblk[col],
set->size+set->exec_size);
}
block_offset += Plan->ncolblk[col];
}
OP_kernels[20].transfer += Plan->transfer;
OP_kernels[20].transfer2 += Plan->transfer2;
}
op_mpi_set_dirtybit_cuda(nargs, args);
if (OP_diags>1) {
cutilSafeCall(cudaDeviceSynchronize());
}
//update kernel record
op_timers_core(&cpu_t2, &wall_t2);
OP_kernels[20].time += wall_t2 - wall_t1;
}
|
a0a7506d9219e4025ff0bbaaa0a100890ac26870.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include "file_helper.h"
__global__ void radix_sort(int N, int* x, int* out, int* buck0, int* buck1, int* prefix1, int* prefix2);
int main(int argc, char* argv[]) {
//Set default file name
const char* inputFile = "inp.txt";
const char* outputFile = "out.txt";
//Overwrite file names
if(argc >= 2)
inputFile = argv[1];
if(argc >= 3)
outputFile = argv[2];
//Read in input array
int* A;
int size = getArray(inputFile, &A);
if(size < 0){
printf("Error getting array from %s\n", inputFile);
return -1;
}
//YOUR CODE HERE
int* x;
int* buck0;
int* buck1;
int* out;
int* prefix1;
int* prefix2;
hipMallocManaged(&x, size*sizeof(int));
hipMallocManaged(&out, size*sizeof(int));
hipMallocManaged(&buck0, size*sizeof(int));
hipMallocManaged(&buck1, size*sizeof(int));
hipMallocManaged(&prefix1, size*sizeof(int));
hipMallocManaged(&prefix2, size*sizeof(int));
hipMemcpy(x,A,size*sizeof(int), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( radix_sort), dim3(1),dim3(256), 0, 0, size, x, out, buck0, buck1, prefix1, prefix2);
hipDeviceSynchronize();
hipMemcpy(A,x,size*sizeof(int),hipMemcpyDeviceToHost);
hipFree(x);
hipFree(buck0);
hipFree(buck1);
hipFree(prefix1);
hipFree(prefix2);
hipFree(out);
//Output array to file
if(saveArray(outputFile, A, size) < 0) {
printf("Error writing sorted array to %s\n", outputFile);
}
free(A);
return 0;
}
__global__
void radix_sort(int N, int* x, int* out, int* buck0, int* buck1, int* prefix1, int* prefix2){
int index = threadIdx.x;
int stride = blockDim.x;
int mask = 1;
int even = 1;
int* temp;
int* p1;
int* p2;
p1 = prefix1;
p2 = prefix2;
__shared__ int buck0count;
__shared__ int buck1count;
buck0count = 0;
buck1count = 0;
for(int count = 0; count < 32; count++){
for(int i = index; i < N; i += stride){
if(x[i] & mask){
p1[i] = 1;
}else{
p1[i] = 0;
}
}
__syncthreads();
for (int offset = 1; offset < N; offset *= 2){
for(int i = index; i < N; i += stride){
if(i>=offset){
p2[i] = p1[i] + p1[i-offset];
}else{
p2[i] = p1[i];
}
}
temp = p1;
p1 = p2;
p2 = temp;
__syncthreads();
}
buck0count = 0;
buck1count = 0;
__syncthreads();
for(int i = index; i < N; i += stride){
if(x[i] & mask){
buck1[p1[i]-1] = x[i];
atomicAdd(&buck1count,1);
}else{
buck0[i-p1[i]] = x[i];
atomicAdd(&buck0count,1);
}
}
__syncthreads();
int i = 0;
for(i = index; i < buck0count; i+= stride){
x[i] = buck0[i];
}
__syncthreads();
for(int j = index; j < buck1count; j+= stride){
x[j+buck0count] = buck1[j];
}
////////////
mask <<= 1;
__syncthreads();
}
}
| a0a7506d9219e4025ff0bbaaa0a100890ac26870.cu | #include <stdio.h>
#include <stdlib.h>
#include "file_helper.h"
__global__ void radix_sort(int N, int* x, int* out, int* buck0, int* buck1, int* prefix1, int* prefix2);
int main(int argc, char* argv[]) {
//Set default file name
const char* inputFile = "inp.txt";
const char* outputFile = "out.txt";
//Overwrite file names
if(argc >= 2)
inputFile = argv[1];
if(argc >= 3)
outputFile = argv[2];
//Read in input array
int* A;
int size = getArray(inputFile, &A);
if(size < 0){
printf("Error getting array from %s\n", inputFile);
return -1;
}
//YOUR CODE HERE
int* x;
int* buck0;
int* buck1;
int* out;
int* prefix1;
int* prefix2;
cudaMallocManaged(&x, size*sizeof(int));
cudaMallocManaged(&out, size*sizeof(int));
cudaMallocManaged(&buck0, size*sizeof(int));
cudaMallocManaged(&buck1, size*sizeof(int));
cudaMallocManaged(&prefix1, size*sizeof(int));
cudaMallocManaged(&prefix2, size*sizeof(int));
cudaMemcpy(x,A,size*sizeof(int), cudaMemcpyHostToDevice);
radix_sort<<<1,256>>>(size, x, out, buck0, buck1, prefix1, prefix2);
cudaDeviceSynchronize();
cudaMemcpy(A,x,size*sizeof(int),cudaMemcpyDeviceToHost);
cudaFree(x);
cudaFree(buck0);
cudaFree(buck1);
cudaFree(prefix1);
cudaFree(prefix2);
cudaFree(out);
//Output array to file
if(saveArray(outputFile, A, size) < 0) {
printf("Error writing sorted array to %s\n", outputFile);
}
free(A);
return 0;
}
__global__
void radix_sort(int N, int* x, int* out, int* buck0, int* buck1, int* prefix1, int* prefix2){
int index = threadIdx.x;
int stride = blockDim.x;
int mask = 1;
int even = 1;
int* temp;
int* p1;
int* p2;
p1 = prefix1;
p2 = prefix2;
__shared__ int buck0count;
__shared__ int buck1count;
buck0count = 0;
buck1count = 0;
for(int count = 0; count < 32; count++){
for(int i = index; i < N; i += stride){
if(x[i] & mask){
p1[i] = 1;
}else{
p1[i] = 0;
}
}
__syncthreads();
for (int offset = 1; offset < N; offset *= 2){
for(int i = index; i < N; i += stride){
if(i>=offset){
p2[i] = p1[i] + p1[i-offset];
}else{
p2[i] = p1[i];
}
}
temp = p1;
p1 = p2;
p2 = temp;
__syncthreads();
}
buck0count = 0;
buck1count = 0;
__syncthreads();
for(int i = index; i < N; i += stride){
if(x[i] & mask){
buck1[p1[i]-1] = x[i];
atomicAdd(&buck1count,1);
}else{
buck0[i-p1[i]] = x[i];
atomicAdd(&buck0count,1);
}
}
__syncthreads();
int i = 0;
for(i = index; i < buck0count; i+= stride){
x[i] = buck0[i];
}
__syncthreads();
for(int j = index; j < buck1count; j+= stride){
x[j+buck0count] = buck1[j];
}
////////////
mask <<= 1;
__syncthreads();
}
}
|
3d2c375ecd2c941bd3c04d363bacf5f8fa223a17.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "caffe2/operators/softsign_op.h"
#include <algorithm>
#include <functional>
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
namespace {
template <typename T>
inline __host__ __device__ T SquareCUDA(const T x) {
return x * x;
}
template <typename T>
__global__ void SoftsignCUDAKernel(const int N, const T* X, T* Y) {
CUDA_1D_KERNEL_LOOP(i, N) {
#if __CUDA_ARCH__ >= 350
Y[i] = __ldg(X + i) / (T(1) + abs(__ldg(X + i)));
#else
Y[i] = X[i] / (T(1) + abs(X[i]));
#endif
}
}
template <typename T>
__global__ void
SoftsignGradientCUDAKernel(const int N, const T* dY, const T* X, T* dX) {
CUDA_1D_KERNEL_LOOP(i, N) {
#if __CUDA_ARCH__ >= 350
dX[i] = __ldg(dY + i) / SquareCUDA(T(1) + abs(__ldg(X + i)));
#else
dX[i] = dY[i] / SquareCUDA(T(1) + abs(X[i]));
#endif
}
}
} // namespace
template <>
template <typename T>
bool SoftsignFunctor<CUDAContext>::
operator()(const int N, const T* X, T* Y, CUDAContext* context) const {
hipLaunchKernelGGL(( SoftsignCUDAKernel<T>)
, dim3(CAFFE_GET_BLOCKS(N)),
dim3(CAFFE_CUDA_NUM_THREADS),
0,
context->cuda_stream(), N, X, Y);
return true;
}
template <>
template <typename T>
bool SoftsignGradientFunctor<CUDAContext>::Forward(
const std::vector<int>& X_dims,
const std::vector<int>& /* dY_dims */,
const T* X,
const T* dY,
T* dX,
CUDAContext* context) const {
const int size = std::accumulate(
X_dims.cbegin(), X_dims.cend(), 1, std::multiplies<int>());
hipLaunchKernelGGL(( SoftsignGradientCUDAKernel<T>)
, dim3(CAFFE_GET_BLOCKS(size)),
dim3(CAFFE_CUDA_NUM_THREADS),
0,
context->cuda_stream(), size, dY, X, dX);
return true;
}
REGISTER_CUDA_OPERATOR(
Softsign,
UnaryElementwiseOp<
TensorTypes<float>,
CUDAContext,
SoftsignFunctor<CUDAContext>>);
REGISTER_CUDA_OPERATOR(
SoftsignGradient,
BinaryElementwiseOp<
TensorTypes<float>,
CUDAContext,
SoftsignGradientFunctor<CUDAContext>>);
} // namespace caffe2
| 3d2c375ecd2c941bd3c04d363bacf5f8fa223a17.cu | #include "caffe2/operators/softsign_op.h"
#include <algorithm>
#include <functional>
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
namespace {
template <typename T>
inline __host__ __device__ T SquareCUDA(const T x) {
return x * x;
}
template <typename T>
__global__ void SoftsignCUDAKernel(const int N, const T* X, T* Y) {
CUDA_1D_KERNEL_LOOP(i, N) {
#if __CUDA_ARCH__ >= 350
Y[i] = __ldg(X + i) / (T(1) + abs(__ldg(X + i)));
#else
Y[i] = X[i] / (T(1) + abs(X[i]));
#endif
}
}
template <typename T>
__global__ void
SoftsignGradientCUDAKernel(const int N, const T* dY, const T* X, T* dX) {
CUDA_1D_KERNEL_LOOP(i, N) {
#if __CUDA_ARCH__ >= 350
dX[i] = __ldg(dY + i) / SquareCUDA(T(1) + abs(__ldg(X + i)));
#else
dX[i] = dY[i] / SquareCUDA(T(1) + abs(X[i]));
#endif
}
}
} // namespace
template <>
template <typename T>
bool SoftsignFunctor<CUDAContext>::
operator()(const int N, const T* X, T* Y, CUDAContext* context) const {
SoftsignCUDAKernel<T>
<<<CAFFE_GET_BLOCKS(N),
CAFFE_CUDA_NUM_THREADS,
0,
context->cuda_stream()>>>(N, X, Y);
return true;
}
template <>
template <typename T>
bool SoftsignGradientFunctor<CUDAContext>::Forward(
const std::vector<int>& X_dims,
const std::vector<int>& /* dY_dims */,
const T* X,
const T* dY,
T* dX,
CUDAContext* context) const {
const int size = std::accumulate(
X_dims.cbegin(), X_dims.cend(), 1, std::multiplies<int>());
SoftsignGradientCUDAKernel<T>
<<<CAFFE_GET_BLOCKS(size),
CAFFE_CUDA_NUM_THREADS,
0,
context->cuda_stream()>>>(size, dY, X, dX);
return true;
}
REGISTER_CUDA_OPERATOR(
Softsign,
UnaryElementwiseOp<
TensorTypes<float>,
CUDAContext,
SoftsignFunctor<CUDAContext>>);
REGISTER_CUDA_OPERATOR(
SoftsignGradient,
BinaryElementwiseOp<
TensorTypes<float>,
CUDAContext,
SoftsignGradientFunctor<CUDAContext>>);
} // namespace caffe2
|
d476d2985c84bc29395469c780276dfaf959e817.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
# 1 "vecmultKernel00.cu"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h" 1
# 119 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h"
# 1 "/usr/include/features.h" 1 3 4
# 361 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 365 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 366 "/usr/include/sys/cdefs.h" 2 3 4
# 362 "/usr/include/features.h" 2 3 4
# 385 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4
# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
# 10 "/usr/include/gnu/stubs.h" 2 3 4
# 386 "/usr/include/features.h" 2 3 4
# 120 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h" 2
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 56 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h" 1
# 53 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_defines.h" 1
# 54 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h" 2
enum __attribute__((device_builtin)) cudaRoundMode
{
cudaRoundNearest,
cudaRoundZero,
cudaRoundPosInf,
cudaRoundMinInf
};
# 57 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h" 1
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/syslimits.h" 1 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 145 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 157 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 39 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 40 "/usr/include/bits/local_lim.h" 2 3 4
# 158 "/usr/include/bits/posix1_lim.h" 2 3 4
# 146 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 150 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
# 34 "/usr/include/bits/xopen_lim.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
# 154 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 2 3 4
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 149 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 211 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 72 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h" 2
# 128 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
enum __attribute__((device_builtin)) hipError_t
{
hipSuccess = 0,
hipErrorMissingConfiguration = 1,
hipErrorMemoryAllocation = 2,
hipErrorInitializationError = 3,
# 163 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorLaunchFailure = 4,
# 172 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorPriorLaunchFailure = 5,
# 182 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorLaunchTimeOut = 6,
# 191 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorLaunchOutOfResources = 7,
hipErrorInvalidDeviceFunction = 8,
# 206 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorInvalidConfiguration = 9,
hipErrorInvalidDevice = 10,
hipErrorInvalidValue = 11,
hipErrorInvalidPitchValue = 12,
hipErrorInvalidSymbol = 13,
hipErrorMapFailed = 14,
hipErrorUnmapFailed = 15,
hipErrorInvalidHostPointer = 16,
hipErrorInvalidDevicePointer = 17,
hipErrorInvalidTexture = 18,
hipErrorInvalidTextureBinding = 19,
hipErrorInvalidChannelDescriptor = 20,
hipErrorInvalidMemcpyDirection = 21,
# 287 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorAddressOfConstant = 22,
# 296 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorTextureFetchFailed = 23,
# 305 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorTextureNotBound = 24,
# 314 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorSynchronizationError = 25,
hipErrorInvalidFilterSetting = 26,
hipErrorInvalidNormSetting = 27,
hipErrorMixedDeviceExecution = 28,
hipErrorDeinitialized = 29,
hipErrorUnknown = 30,
hipErrorNotYetImplemented = 31,
# 363 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorMemoryValueTooLarge = 32,
hipErrorInvalidResourceHandle = 33,
hipErrorNotReady = 34,
hipErrorInsufficientDriver = 35,
# 398 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorSetOnActiveProcess = 36,
hipErrorInvalidSurface = 37,
hipErrorNoDevice = 38,
hipErrorECCNotCorrectable = 39,
hipErrorSharedObjectSymbolNotFound = 40,
hipErrorSharedObjectInitFailed = 41,
hipErrorUnsupportedLimit = 42,
hipErrorDuplicateVariableName = 43,
hipErrorDuplicateTextureName = 44,
hipErrorDuplicateSurfaceName = 45,
# 460 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorDevicesUnavailable = 46,
hipErrorInvalidImage = 47,
hipErrorNoBinaryForGpu = 48,
# 486 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorIncompatibleDriverContext = 49,
hipErrorPeerAccessAlreadyEnabled = 50,
hipErrorPeerAccessNotEnabled = 51,
hipErrorDeviceAlreadyInUse = 54,
hipErrorProfilerDisabled = 55,
hipErrorProfilerNotInitialized = 56,
hipErrorProfilerAlreadyStarted = 57,
hipErrorProfilerAlreadyStopped = 58,
hipErrorAssert = 59,
hipErrorTooManyPeers = 60,
hipErrorHostMemoryAlreadyRegistered = 61,
hipErrorHostMemoryNotRegistered = 62,
hipErrorOperatingSystem = 63,
hipErrorPeerAccessUnsupported = 64,
hipErrorLaunchMaxDepthExceeded = 65,
hipErrorLaunchFileScopedTex = 66,
hipErrorLaunchFileScopedSurf = 67,
# 611 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorSyncDepthExceeded = 68,
# 623 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorLaunchPendingCountExceeded = 69,
hipErrorNotPermitted = 70,
hipErrorNotSupported = 71,
# 643 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorHardwareStackError = 72,
hipErrorIllegalInstruction = 73,
# 660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorMisalignedAddress = 74,
# 671 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
hipErrorInvalidAddressSpace = 75,
hipErrorInvalidPc = 76,
hipErrorIllegalAddress = 77,
hipErrorStartupFailure = 0x7f,
hipErrorApiFailureBase = 10000
};
enum __attribute__((device_builtin)) hipChannelFormatKind
{
hipChannelFormatKindSigned = 0,
hipChannelFormatKindUnsigned = 1,
hipChannelFormatKindFloat = 2,
hipChannelFormatKindNone = 3
};
struct __attribute__((device_builtin)) hipChannelFormatDesc
{
int x;
int y;
int z;
int w;
enum hipChannelFormatKind f;
};
typedef struct hipArray *hipArray_t;
typedef const struct hipArray *hipArray_const_t;
struct hipArray;
typedef struct cudaMipmappedArray *hipMipmappedArray_t;
typedef const struct cudaMipmappedArray *hipMipmappedArray_const_t;
struct cudaMipmappedArray;
enum __attribute__((device_builtin)) hipMemoryType
{
hipMemoryTypeHost = 1,
hipMemoryTypeDevice = 2
};
enum __attribute__((device_builtin)) hipMemcpyKind
{
hipMemcpyHostToHost = 0,
hipMemcpyHostToDevice = 1,
hipMemcpyDeviceToHost = 2,
hipMemcpyDeviceToDevice = 3,
hipMemcpyDefault = 4
};
struct __attribute__((device_builtin)) hipPitchedPtr
{
void *ptr;
size_t pitch;
size_t xsize;
size_t ysize;
};
struct __attribute__((device_builtin)) hipExtent
{
size_t width;
size_t height;
size_t depth;
};
struct __attribute__((device_builtin)) hipPos
{
size_t x;
size_t y;
size_t z;
};
struct __attribute__((device_builtin)) hipMemcpy3DParms
{
hipArray_t srcArray;
struct hipPos srcPos;
struct hipPitchedPtr srcPtr;
hipArray_t dstArray;
struct hipPos dstPos;
struct hipPitchedPtr dstPtr;
struct hipExtent extent;
enum hipMemcpyKind kind;
};
struct __attribute__((device_builtin)) hipMemcpy3DPeerParms
{
hipArray_t srcArray;
struct hipPos srcPos;
struct hipPitchedPtr srcPtr;
int srcDevice;
hipArray_t dstArray;
struct hipPos dstPos;
struct hipPitchedPtr dstPtr;
int dstDevice;
struct hipExtent extent;
};
struct cudaGraphicsResource;
enum __attribute__((device_builtin)) hipGraphicsRegisterFlags
{
hipGraphicsRegisterFlagsNone = 0,
hipGraphicsRegisterFlagsReadOnly = 1,
hipGraphicsRegisterFlagsWriteDiscard = 2,
hipGraphicsRegisterFlagsSurfaceLoadStore = 4,
hipGraphicsRegisterFlagsTextureGather = 8
};
enum __attribute__((device_builtin)) hipGraphicsMapFlags
{
hipGraphicsMapFlagsNone = 0,
hipGraphicsMapFlagsReadOnly = 1,
hipGraphicsMapFlagsWriteDiscard = 2
};
enum __attribute__((device_builtin)) hipGraphicsCubeFace
{
hipGraphicsCubeFacePositiveX = 0x00,
hipGraphicsCubeFaceNegativeX = 0x01,
hipGraphicsCubeFacePositiveY = 0x02,
hipGraphicsCubeFaceNegativeY = 0x03,
hipGraphicsCubeFacePositiveZ = 0x04,
hipGraphicsCubeFaceNegativeZ = 0x05
};
enum __attribute__((device_builtin)) hipResourceType
{
hipResourceTypeArray = 0x00,
hipResourceTypeMipmappedArray = 0x01,
hipResourceTypeLinear = 0x02,
hipResourceTypePitch2D = 0x03
};
enum __attribute__((device_builtin)) hipResourceViewFormat
{
hipResViewFormatNone = 0x00,
hipResViewFormatUnsignedChar1 = 0x01,
hipResViewFormatUnsignedChar2 = 0x02,
hipResViewFormatUnsignedChar4 = 0x03,
hipResViewFormatSignedChar1 = 0x04,
hipResViewFormatSignedChar2 = 0x05,
hipResViewFormatSignedChar4 = 0x06,
hipResViewFormatUnsignedShort1 = 0x07,
hipResViewFormatUnsignedShort2 = 0x08,
hipResViewFormatUnsignedShort4 = 0x09,
hipResViewFormatSignedShort1 = 0x0a,
hipResViewFormatSignedShort2 = 0x0b,
hipResViewFormatSignedShort4 = 0x0c,
hipResViewFormatUnsignedInt1 = 0x0d,
hipResViewFormatUnsignedInt2 = 0x0e,
hipResViewFormatUnsignedInt4 = 0x0f,
hipResViewFormatSignedInt1 = 0x10,
hipResViewFormatSignedInt2 = 0x11,
hipResViewFormatSignedInt4 = 0x12,
hipResViewFormatHalf1 = 0x13,
hipResViewFormatHalf2 = 0x14,
hipResViewFormatHalf4 = 0x15,
hipResViewFormatFloat1 = 0x16,
hipResViewFormatFloat2 = 0x17,
hipResViewFormatFloat4 = 0x18,
hipResViewFormatUnsignedBlockCompressed1 = 0x19,
hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
hipResViewFormatSignedBlockCompressed4 = 0x1d,
hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
hipResViewFormatSignedBlockCompressed5 = 0x1f,
hipResViewFormatUnsignedBlockCompressed6H = 0x20,
hipResViewFormatSignedBlockCompressed6H = 0x21,
hipResViewFormatUnsignedBlockCompressed7 = 0x22
};
struct __attribute__((device_builtin)) hipResourceDesc {
enum hipResourceType resType;
union {
struct {
hipArray_t array;
} array;
struct {
hipMipmappedArray_t mipmap;
} mipmap;
struct {
void *devPtr;
struct hipChannelFormatDesc desc;
size_t sizeInBytes;
} linear;
struct {
void *devPtr;
struct hipChannelFormatDesc desc;
size_t width;
size_t height;
size_t pitchInBytes;
} pitch2D;
} res;
};
struct __attribute__((device_builtin)) hipResourceViewDesc
{
enum hipResourceViewFormat format;
size_t width;
size_t height;
size_t depth;
unsigned int firstMipmapLevel;
unsigned int lastMipmapLevel;
unsigned int firstLayer;
unsigned int lastLayer;
};
struct __attribute__((device_builtin)) hipPointerAttribute_t
{
enum hipMemoryType memoryType;
# 997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
int device;
void *devicePointer;
void *hostPointer;
int isManaged;
};
struct __attribute__((device_builtin)) hipFuncAttributes
{
size_t sharedSizeBytes;
size_t constSizeBytes;
size_t localSizeBytes;
int maxThreadsPerBlock;
int numRegs;
int ptxVersion;
int binaryVersion;
int cacheModeCA;
};
enum __attribute__((device_builtin)) hipFuncCache_t
{
hipFuncCachePreferNone = 0,
hipFuncCachePreferShared = 1,
hipFuncCachePreferL1 = 2,
hipFuncCachePreferEqual = 3
};
enum __attribute__((device_builtin)) hipSharedMemConfig
{
hipSharedMemBankSizeDefault = 0,
hipSharedMemBankSizeFourByte = 1,
hipSharedMemBankSizeEightByte = 2
};
enum __attribute__((device_builtin)) hipComputeMode
{
hipComputeModeDefault = 0,
hipComputeModeExclusive = 1,
hipComputeModeProhibited = 2,
hipComputeModeExclusiveProcess = 3
};
enum __attribute__((device_builtin)) hipLimit_t
{
hipLimitStackSize = 0x00,
hipLimitPrintfFifoSize = 0x01,
hipLimitMallocHeapSize = 0x02,
hipLimitDevRuntimeSyncDepth = 0x03,
hipLimitDevRuntimePendingLaunchCount = 0x04
};
enum __attribute__((device_builtin)) hipOutputMode
{
hipKeyValuePair = 0x00,
hipCSV = 0x01
};
enum __attribute__((device_builtin)) hipDeviceAttribute_t
{
hipDeviceAttributeMaxThreadsPerBlock = 1,
hipDeviceAttributeMaxBlockDimX = 2,
hipDeviceAttributeMaxBlockDimY = 3,
hipDeviceAttributeMaxBlockDimZ = 4,
hipDeviceAttributeMaxGridDimX = 5,
hipDeviceAttributeMaxGridDimY = 6,
hipDeviceAttributeMaxGridDimZ = 7,
hipDeviceAttributeMaxSharedMemoryPerBlock = 8,
hipDeviceAttributeTotalConstantMemory = 9,
hipDeviceAttributeWarpSize = 10,
hipDeviceAttributeMaxPitch = 11,
hipDeviceAttributeMaxRegistersPerBlock = 12,
hipDeviceAttributeClockRate = 13,
hipDeviceAttributeTextureAlignment = 14,
hipDeviceAttributeGpuOverlap = 15,
hipDeviceAttributeMultiprocessorCount = 16,
hipDeviceAttributeKernelExecTimeout = 17,
hipDeviceAttributeIntegrated = 18,
hipDeviceAttributeCanMapHostMemory = 19,
hipDeviceAttributeComputeMode = 20,
hipDeviceAttributeMaxTexture1DWidth = 21,
hipDeviceAttributeMaxTexture2DWidth = 22,
hipDeviceAttributeMaxTexture2DHeight = 23,
hipDeviceAttributeMaxTexture3DWidth = 24,
hipDeviceAttributeMaxTexture3DHeight = 25,
hipDeviceAttributeMaxTexture3DDepth = 26,
hipDeviceAttributeMaxTexture2DLayeredWidth = 27,
hipDeviceAttributeMaxTexture2DLayeredHeight = 28,
hipDeviceAttributeMaxTexture2DLayeredLayers = 29,
hipDeviceAttributeSurfaceAlignment = 30,
hipDeviceAttributeConcurrentKernels = 31,
hipDeviceAttributeEccEnabled = 32,
hipDeviceAttributePciBusId = 33,
hipDeviceAttributePciDeviceId = 34,
hipDeviceAttributeTccDriver = 35,
hipDeviceAttributeMemoryClockRate = 36,
hipDeviceAttributeMemoryBusWidth = 37,
hipDeviceAttributeL2CacheSize = 38,
hipDeviceAttributeMaxThreadsPerMultiProcessor = 39,
hipDeviceAttributeAsyncEngineCount = 40,
hipDeviceAttributeUnifiedAddressing = 41,
hipDeviceAttributeMaxTexture1DLayeredWidth = 42,
hipDeviceAttributeMaxTexture1DLayeredLayers = 43,
hipDeviceAttributeMaxTexture2DGatherWidth = 45,
hipDeviceAttributeMaxTexture2DGatherHeight = 46,
hipDeviceAttributeMaxTexture3DWidthAlternate = 47,
hipDeviceAttributeMaxTexture3DHeightAlternate = 48,
hipDeviceAttributeMaxTexture3DDepthAlternate = 49,
hipDeviceAttributePciDomainId = 50,
hipDeviceAttributeTexturePitchAlignment = 51,
hipDeviceAttributeMaxTextureCubemapWidth = 52,
hipDeviceAttributeMaxTextureCubemapLayeredWidth = 53,
hipDeviceAttributeMaxTextureCubemapLayeredLayers = 54,
hipDeviceAttributeMaxSurface1DWidth = 55,
hipDeviceAttributeMaxSurface2DWidth = 56,
hipDeviceAttributeMaxSurface2DHeight = 57,
hipDeviceAttributeMaxSurface3DWidth = 58,
hipDeviceAttributeMaxSurface3DHeight = 59,
hipDeviceAttributeMaxSurface3DDepth = 60,
hipDeviceAttributeMaxSurface1DLayeredWidth = 61,
hipDeviceAttributeMaxSurface1DLayeredLayers = 62,
hipDeviceAttributeMaxSurface2DLayeredWidth = 63,
hipDeviceAttributeMaxSurface2DLayeredHeight = 64,
hipDeviceAttributeMaxSurface2DLayeredLayers = 65,
hipDeviceAttributeMaxSurfaceCubemapWidth = 66,
hipDeviceAttributeMaxSurfaceCubemapLayeredWidth = 67,
hipDeviceAttributeMaxSurfaceCubemapLayeredLayers = 68,
hipDeviceAttributeMaxTexture1DLinearWidth = 69,
hipDeviceAttributeMaxTexture2DLinearWidth = 70,
hipDeviceAttributeMaxTexture2DLinearHeight = 71,
hipDeviceAttributeMaxTexture2DLinearPitch = 72,
hipDeviceAttributeMaxTexture2DMipmappedWidth = 73,
hipDeviceAttributeMaxTexture2DMipmappedHeight = 74,
hipDeviceAttributeComputeCapabilityMajor = 75,
hipDeviceAttributeComputeCapabilityMinor = 76,
hipDeviceAttributeMaxTexture1DMipmappedWidth = 77,
hipDeviceAttributeStreamPrioritiesSupported = 78,
hipDeviceAttributeGlobalL1CacheSupported = 79,
hipDeviceAttributeLocalL1CacheSupported = 80,
hipDeviceAttributeMaxSharedMemoryPerMultiprocessor = 81,
hipDeviceAttributeMaxRegistersPerMultiprocessor = 82,
hipDeviceAttributeManagedMemory = 83,
hipDeviceAttributeIsMultiGpuBoard = 84,
hipDeviceAttributeMultiGpuBoardGroupID = 85
};
struct __attribute__((device_builtin)) hipDeviceProp_t
{
char name[256];
size_t totalGlobalMem;
size_t sharedMemPerBlock;
int regsPerBlock;
int warpSize;
size_t memPitch;
int maxThreadsPerBlock;
int maxThreadsDim[3];
int maxGridSize[3];
int clockRate;
size_t totalConstMem;
int major;
int minor;
size_t textureAlignment;
size_t texturePitchAlignment;
int deviceOverlap;
int multiProcessorCount;
int kernelExecTimeoutEnabled;
int integrated;
int canMapHostMemory;
int computeMode;
int maxTexture1D;
int maxTexture1DMipmap;
int maxTexture1DLinear;
int maxTexture2D[2];
int maxTexture2DMipmap[2];
int maxTexture2DLinear[3];
int maxTexture2DGather[2];
int maxTexture3D[3];
int maxTexture3DAlt[3];
int maxTextureCubemap;
int maxTexture1DLayered[2];
int maxTexture2DLayered[3];
int maxTextureCubemapLayered[2];
int maxSurface1D;
int maxSurface2D[2];
int maxSurface3D[3];
int maxSurface1DLayered[2];
int maxSurface2DLayered[3];
int maxSurfaceCubemap;
int maxSurfaceCubemapLayered[2];
size_t surfaceAlignment;
int concurrentKernels;
int ECCEnabled;
int pciBusID;
int pciDeviceID;
int pciDomainID;
int tccDriver;
int asyncEngineCount;
int unifiedAddressing;
int memoryClockRate;
int memoryBusWidth;
int l2CacheSize;
int maxThreadsPerMultiProcessor;
int streamPrioritiesSupported;
int globalL1CacheSupported;
int localL1CacheSupported;
size_t sharedMemPerMultiprocessor;
int regsPerMultiprocessor;
int managedMemory;
int isMultiGpuBoard;
int multiGpuBoardGroupID;
};
# 1361 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
typedef __attribute__((device_builtin)) struct __attribute__((device_builtin)) hipIpcEventHandle_t
{
char reserved[64];
}hipIpcEventHandle_t;
typedef __attribute__((device_builtin)) struct __attribute__((device_builtin)) hipIpcMemHandle_t
{
char reserved[64];
}hipIpcMemHandle_t;
# 1383 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/driver_types.h"
typedef __attribute__((device_builtin)) enum hipError_t hipError_t;
typedef __attribute__((device_builtin)) struct ihipStream_t *hipStream_t;
typedef __attribute__((device_builtin)) struct ihipEvent_t *hipEvent_t;
typedef __attribute__((device_builtin)) struct cudaGraphicsResource *cudaGraphicsResource_t;
typedef __attribute__((device_builtin)) struct CUuuid_st hipUUID;
typedef __attribute__((device_builtin)) enum hipOutputMode cudaOutputMode_t;
# 58 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_types.h"
enum __attribute__((device_builtin)) hipSurfaceBoundaryMode
{
hipBoundaryModeZero = 0,
hipBoundaryModeClamp = 1,
hipBoundaryModeTrap = 2
};
enum __attribute__((device_builtin)) hipSurfaceFormatMode
{
hipFormatModeForced = 0,
hipFormatModeAuto = 1
};
struct __attribute__((device_builtin)) hipSurfaceReference
{
struct hipChannelFormatDesc channelDesc;
};
typedef __attribute__((device_builtin)) unsigned long long hipSurfaceObject_t;
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_types.h"
enum __attribute__((device_builtin)) hipTextureAddressMode
{
hipAddressModeWrap = 0,
hipAddressModeClamp = 1,
hipAddressModeMirror = 2,
hipAddressModeBorder = 3
};
enum __attribute__((device_builtin)) hipTextureFilterMode
{
hipFilterModePoint = 0,
hipFilterModeLinear = 1
};
enum __attribute__((device_builtin)) hipTextureReadMode
{
hipReadModeElementType = 0,
hipReadModeNormalizedFloat = 1
};
struct __attribute__((device_builtin)) textureReference
{
int normalized;
enum hipTextureFilterMode filterMode;
enum hipTextureAddressMode addressMode[3];
struct hipChannelFormatDesc channelDesc;
int sRGB;
unsigned int maxAnisotropy;
enum hipTextureFilterMode mipmapFilterMode;
float mipmapLevelBias;
float minMipmapLevelClamp;
float maxMipmapLevelClamp;
int __cudaReserved[15];
};
struct __attribute__((device_builtin)) hipTextureDesc
{
enum hipTextureAddressMode addressMode[3];
enum hipTextureFilterMode filterMode;
enum hipTextureReadMode readMode;
int sRGB;
int normalizedCoords;
unsigned int maxAnisotropy;
enum hipTextureFilterMode mipmapFilterMode;
float mipmapLevelBias;
float minMipmapLevelClamp;
float maxMipmapLevelClamp;
};
typedef __attribute__((device_builtin)) unsigned long long hipTextureObject_t;
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h" 2
# 96 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h"
struct __attribute__((device_builtin)) char1
{
signed char x;
};
struct __attribute__((device_builtin)) uchar1
{
unsigned char x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2))) char2
{
signed char x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2))) uchar2
{
unsigned char x, y;
};
struct __attribute__((device_builtin)) char3
{
signed char x, y, z;
};
struct __attribute__((device_builtin)) uchar3
{
unsigned char x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) char4
{
signed char x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) uchar4
{
unsigned char x, y, z, w;
};
struct __attribute__((device_builtin)) short1
{
short x;
};
struct __attribute__((device_builtin)) ushort1
{
unsigned short x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) short2
{
short x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) ushort2
{
unsigned short x, y;
};
struct __attribute__((device_builtin)) short3
{
short x, y, z;
};
struct __attribute__((device_builtin)) ushort3
{
unsigned short x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(8))) short4 { short x; short y; short z; short w; };
struct __attribute__((device_builtin)) __attribute__((aligned(8))) ushort4 { unsigned short x; unsigned short y; unsigned short z; unsigned short w; };
struct __attribute__((device_builtin)) int1
{
int x;
};
struct __attribute__((device_builtin)) uint1
{
unsigned int x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(8))) int2 { int x; int y; };
struct __attribute__((device_builtin)) __attribute__((aligned(8))) uint2 { unsigned int x; unsigned int y; };
struct __attribute__((device_builtin)) int3
{
int x, y, z;
};
struct __attribute__((device_builtin)) uint3
{
unsigned int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) int4
{
int x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) uint4
{
unsigned int x, y, z, w;
};
struct __attribute__((device_builtin)) long1
{
long int x;
};
struct __attribute__((device_builtin)) ulong1
{
unsigned long x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2*sizeof(long int)))) long2
{
long int x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2*sizeof(unsigned long int)))) ulong2
{
unsigned long int x, y;
};
struct __attribute__((device_builtin)) long3
{
long int x, y, z;
};
struct __attribute__((device_builtin)) ulong3
{
unsigned long int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) long4
{
long int x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulong4
{
unsigned long int x, y, z, w;
};
struct __attribute__((device_builtin)) float1
{
float x;
};
# 272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h"
struct __attribute__((device_builtin)) __attribute__((aligned(8))) float2 { float x; float y; };
struct __attribute__((device_builtin)) float3
{
float x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) float4
{
float x, y, z, w;
};
struct __attribute__((device_builtin)) longlong1
{
long long int x;
};
struct __attribute__((device_builtin)) ulonglong1
{
unsigned long long int x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) longlong2
{
long long int x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulonglong2
{
unsigned long long int x, y;
};
struct __attribute__((device_builtin)) longlong3
{
long long int x, y, z;
};
struct __attribute__((device_builtin)) ulonglong3
{
unsigned long long int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) longlong4
{
long long int x, y, z ,w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulonglong4
{
unsigned long long int x, y, z, w;
};
struct __attribute__((device_builtin)) double1
{
double x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) double2
{
double x, y;
};
struct __attribute__((device_builtin)) double3
{
double x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) double4
{
double x, y, z, w;
};
# 360 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_vector_types.h"
typedef __attribute__((device_builtin)) struct char1 char1;
typedef __attribute__((device_builtin)) struct uchar1 uchar1;
typedef __attribute__((device_builtin)) struct char2 char2;
typedef __attribute__((device_builtin)) struct uchar2 uchar2;
typedef __attribute__((device_builtin)) struct char3 char3;
typedef __attribute__((device_builtin)) struct uchar3 uchar3;
typedef __attribute__((device_builtin)) struct char4 char4;
typedef __attribute__((device_builtin)) struct uchar4 uchar4;
typedef __attribute__((device_builtin)) struct short1 short1;
typedef __attribute__((device_builtin)) struct ushort1 ushort1;
typedef __attribute__((device_builtin)) struct short2 short2;
typedef __attribute__((device_builtin)) struct ushort2 ushort2;
typedef __attribute__((device_builtin)) struct short3 short3;
typedef __attribute__((device_builtin)) struct ushort3 ushort3;
typedef __attribute__((device_builtin)) struct short4 short4;
typedef __attribute__((device_builtin)) struct ushort4 ushort4;
typedef __attribute__((device_builtin)) struct int1 int1;
typedef __attribute__((device_builtin)) struct uint1 uint1;
typedef __attribute__((device_builtin)) struct int2 int2;
typedef __attribute__((device_builtin)) struct uint2 uint2;
typedef __attribute__((device_builtin)) struct int3 int3;
typedef __attribute__((device_builtin)) struct uint3 uint3;
typedef __attribute__((device_builtin)) struct int4 int4;
typedef __attribute__((device_builtin)) struct uint4 uint4;
typedef __attribute__((device_builtin)) struct long1 long1;
typedef __attribute__((device_builtin)) struct ulong1 ulong1;
typedef __attribute__((device_builtin)) struct long2 long2;
typedef __attribute__((device_builtin)) struct ulong2 ulong2;
typedef __attribute__((device_builtin)) struct long3 long3;
typedef __attribute__((device_builtin)) struct ulong3 ulong3;
typedef __attribute__((device_builtin)) struct long4 long4;
typedef __attribute__((device_builtin)) struct ulong4 ulong4;
typedef __attribute__((device_builtin)) struct float1 float1;
typedef __attribute__((device_builtin)) struct float2 float2;
typedef __attribute__((device_builtin)) struct float3 float3;
typedef __attribute__((device_builtin)) struct float4 float4;
typedef __attribute__((device_builtin)) struct longlong1 longlong1;
typedef __attribute__((device_builtin)) struct ulonglong1 ulonglong1;
typedef __attribute__((device_builtin)) struct longlong2 longlong2;
typedef __attribute__((device_builtin)) struct ulonglong2 ulonglong2;
typedef __attribute__((device_builtin)) struct longlong3 longlong3;
typedef __attribute__((device_builtin)) struct ulonglong3 ulonglong3;
typedef __attribute__((device_builtin)) struct longlong4 longlong4;
typedef __attribute__((device_builtin)) struct ulonglong4 ulonglong4;
typedef __attribute__((device_builtin)) struct double1 double1;
typedef __attribute__((device_builtin)) struct double2 double2;
typedef __attribute__((device_builtin)) struct double3 double3;
typedef __attribute__((device_builtin)) struct double4 double4;
struct __attribute__((device_builtin)) dim3
{
unsigned int x, y, z;
__attribute__((host)) __attribute__((device)) dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
__attribute__((host)) __attribute__((device)) dim3(uint3 v) : x(v.x), y(v.y), z(v.z) {}
__attribute__((host)) __attribute__((device)) operator uint3(void) { uint3 t; t.x = x; t.y = y; t.z = z; return t; }
};
typedef __attribute__((device_builtin)) struct dim3 dim3;
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 68 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/channel_descriptor.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/channel_descriptor.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h" 1
# 143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 144 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_device_runtime_api.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_device_runtime_api.h"
extern "C"
{
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetAttribute(int *value, enum hipDeviceAttribute_t attr, int device);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetLimit(size_t *pValue, enum hipLimit_t limit);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetCacheConfig(enum hipFuncCache_t *pCacheConfig);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetSharedMemConfig(enum hipSharedMemConfig *pConfig);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipDeviceSynchronize(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipGetLastError(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipPeekAtLastError(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) const char* hipGetErrorString(hipError_t error);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipGetDeviceCount(int *count);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipGetDevice(int *device);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipStreamCreateWithFlags(hipStream_t *pStream, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipStreamDestroy(hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipEventDestroy(hipEvent_t event);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipFuncGetAttributes(struct hipFuncAttributes *attr, const void *func);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipFree(void *devPtr);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMalloc(void **devPtr, size_t size);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemcpyAsync(void *dst, const void *src, size_t count, enum hipMemcpyKind kind, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum hipMemcpyKind kind, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms *p, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemsetAsync(void *devPtr, int value, size_t count, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMemset3DAsync(struct hipPitchedPtr pitchedDevPtr, int value, struct hipExtent extent, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipRuntimeGetVersion(int *runtimeVersion);
extern __attribute__((device)) __attribute__((cudart_builtin)) void * hipGetParameterBuffer(size_t alignment, size_t size);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, hipStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) void * cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
extern __attribute__((device)) __attribute__((cudart_builtin)) hipError_t cudaLaunchDeviceV2(void *parameterBuffer, hipStream_t stream);
}
namespace {
template <typename T> __inline__ __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipMalloc(T **devPtr, size_t size);
template <typename T> __inline__ __attribute__((device)) __attribute__((cudart_builtin)) hipError_t hipFuncGetAttributes(struct hipFuncAttributes *attr, T *entry);
}
# 145 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h" 2
# 174 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern "C" {
# 207 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceReset(void);
# 224 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceSynchronize(void);
# 309 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value);
# 338 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetLimit(size_t *pValue, enum hipLimit_t limit);
# 369 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetCacheConfig(enum hipFuncCache_t *pCacheConfig);
# 404 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetStreamPriorityRange(int *leastPriority, int *greatestPriority);
# 446 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceSetCacheConfig(enum hipFuncCache_t cacheConfig);
# 475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetSharedMemConfig(enum hipSharedMemConfig *pConfig);
# 517 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceSetSharedMemConfig(enum hipSharedMemConfig config);
# 540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceGetByPCIBusId(int *device, const char *pciBusId);
# 567 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceGetPCIBusId(char *pciBusId, int len, int device);
# 609 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t *handle, hipEvent_t event);
# 644 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipIpcOpenEventHandle(hipEvent_t *event, hipIpcEventHandle_t handle);
# 682 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t *handle, void *devPtr);
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipIpcOpenMemHandle(void **devPtr, hipIpcMemHandle_t handle, unsigned int flags);
# 762 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipIpcCloseMemHandle(void *devPtr);
# 802 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceReset(void);
# 826 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceSynchronize(void);
# 885 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipThreadSetLimit(enum hipLimit_t limit, size_t value);
# 916 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipThreadGetLimit(size_t *pValue, enum hipLimit_t limit);
# 951 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceGetCacheConfig(enum hipFuncCache_t *pCacheConfig);
# 997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceSetCacheConfig(enum hipFuncCache_t cacheConfig);
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipGetLastError(void);
# 1092 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipPeekAtLastError(void);
# 1106 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) const char* hipGetErrorString(hipError_t error);
# 1136 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipGetDeviceCount(int *count);
# 1372 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipGetDeviceProperties(struct hipDeviceProp_t *prop, int device);
# 1532 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipDeviceGetAttribute(int *value, enum hipDeviceAttribute_t attr, int device);
# 1551 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipChooseDevice(int *device, const struct hipDeviceProp_t *prop);
# 1585 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetDevice(int device);
# 1602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipGetDevice(int *device);
# 1631 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetValidDevices(int *device_arr, int len);
# 1691 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetDeviceFlags( unsigned int flags );
# 1729 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipStreamCreate(hipStream_t *pStream);
# 1758 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamCreateWithFlags(hipStream_t *pStream, unsigned int flags);
# 1801 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamCreateWithPriority(hipStream_t *pStream, unsigned int flags, int priority);
# 1825 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamGetPriority(hipStream_t hStream, int *priority);
# 1846 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamGetFlags(hipStream_t hStream, unsigned int *flags);
# 1867 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamDestroy(hipStream_t stream);
# 1899 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags);
# 1913 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
typedef void ( *hipStreamCallback_t)(hipStream_t stream, hipError_t status, void *userData);
# 1975 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipStreamAddCallback(hipStream_t stream,
hipStreamCallback_t callback, void *userData, unsigned int flags);
# 1995 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipStreamSynchronize(hipStream_t stream);
# 2016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipStreamQuery(hipStream_t stream);
# 2082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipStreamAttachMemAsync(hipStream_t stream, void *devPtr, size_t length, unsigned int flags);
# 2118 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipEventCreate(hipEvent_t *event);
# 2152 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned int flags);
# 2183 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream = 0);
# 2215 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipEventQuery(hipEvent_t event);
# 2247 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipEventSynchronize(hipEvent_t event);
# 2272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipEventDestroy(hipEvent_t event);
# 2313 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t end);
# 2360 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem = 0, hipStream_t stream = 0);
# 2387 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetupArgument(const void *arg, size_t size, size_t offset);
# 2433 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipFuncSetCacheConfig(const void *func, enum hipFuncCache_t cacheConfig);
# 2484 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipFuncSetSharedMemConfig(const void *func, enum hipSharedMemConfig config);
# 2519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipLaunch(const void *func);
# 2552 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipFuncGetAttributes(struct hipFuncAttributes *attr, const void *func);
# 2574 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetDoubleForDevice(double *d);
# 2596 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipSetDoubleForHost(double *d);
# 2683 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMallocManaged(void **devPtr, size_t size, unsigned int flags);
# 2706 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMalloc(void **devPtr, size_t size);
# 2735 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostMalloc(void **ptr, size_t size);
# 2774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMallocPitch(void **devPtr, size_t *pitch, size_t width, size_t height);
# 2816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMallocArray(hipArray_t *array, const struct hipChannelFormatDesc *desc, size_t width, size_t height = 0, unsigned int flags = 0);
# 2840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipFree(void *devPtr);
# 2860 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostFree(void *ptr);
# 2882 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipFreeArray(hipArray_t array);
# 2904 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray);
# 2963 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostMalloc(void **pHost, size_t size, unsigned int flags);
# 3016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostRegister(void *ptr, size_t size, unsigned int flags);
# 3035 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostUnregister(void *ptr);
# 3062 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags);
# 3081 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipHostGetFlags(unsigned int *pFlags, void *pHost);
# 3116 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMalloc3D(struct hipPitchedPtr* pitchedDevPtr, struct hipExtent extent);
# 3251 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMalloc3DArray(hipArray_t *array, const struct hipChannelFormatDesc* desc, struct hipExtent extent, unsigned int flags = 0);
# 3372 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMallocMipmappedArray(hipMipmappedArray_t *mipmappedArray, const struct hipChannelFormatDesc* desc, struct hipExtent extent, unsigned int numLevels, unsigned int flags = 0);
# 3398 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetMipmappedArrayLevel(hipArray_t *levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level);
# 3495 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy3D(const struct hipMemcpy3DParms *p);
# 3523 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy3DPeer(const struct hipMemcpy3DPeerParms *p);
# 3628 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms *p, hipStream_t stream = 0);
# 3651 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy3DPeerAsync(const struct hipMemcpy3DPeerParms *p, hipStream_t stream = 0);
# 3670 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemGetInfo(size_t *free, size_t *total);
# 3691 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipArrayGetInfo(struct hipChannelFormatDesc *desc, struct hipExtent *extent, unsigned int *flags, hipArray_t array);
# 3726 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy(void *dst, const void *src, size_t count, enum hipMemcpyKind kind);
# 3758 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyPeer(void *dst, int dstDevice, const void *src, int srcDevice, size_t count);
# 3792 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum hipMemcpyKind kind);
# 3826 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t cudaMemcpyFromArray(void *dst, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum hipMemcpyKind kind);
# 3861 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyArrayToArray(hipArray_t dst, size_t wOffsetDst, size_t hOffsetDst, hipArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, enum hipMemcpyKind kind = hipMemcpyDeviceToDevice);
# 3903 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2D(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum hipMemcpyKind kind);
# 3945 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2DToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum hipMemcpyKind kind);
# 3987 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2DFromArray(void *dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum hipMemcpyKind kind);
# 4027 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2DArrayToArray(hipArray_t dst, size_t wOffsetDst, size_t hOffsetDst, hipArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, enum hipMemcpyKind kind = hipMemcpyDeviceToDevice);
# 4062 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyToSymbol(const void *symbol, const void *src, size_t count, size_t offset = 0, enum hipMemcpyKind kind = hipMemcpyHostToDevice);
# 4097 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t offset = 0, enum hipMemcpyKind kind = hipMemcpyDeviceToHost);
# 4140 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemcpyAsync(void *dst, const void *src, size_t count, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4172 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyPeerAsync(void *dst, int dstDevice, const void *src, int srcDevice, size_t count, hipStream_t stream = 0);
# 4214 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t cudaMemcpyToArrayAsync(hipArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4256 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyFromArrayAsync(void *dst, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4308 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2DToArrayAsync(hipArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpy2DFromArrayAsync(void *dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4452 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyToSymbolAsync(const void *symbol, const void *src, size_t count, size_t offset, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4495 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemcpyFromSymbolAsync(void *dst, const void *symbol, size_t count, size_t offset, enum hipMemcpyKind kind, hipStream_t stream = 0);
# 4521 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemset(void *devPtr, int value, size_t count);
# 4551 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemset2D(void *devPtr, size_t pitch, int value, size_t width, size_t height);
# 4594 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipMemset3D(struct hipPitchedPtr pitchedDevPtr, int value, struct hipExtent extent);
# 4623 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemsetAsync(void *devPtr, int value, size_t count, hipStream_t stream = 0);
# 4657 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, hipStream_t stream = 0);
# 4704 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipMemset3DAsync(struct hipPitchedPtr pitchedDevPtr, int value, struct hipExtent extent, hipStream_t stream = 0);
# 4727 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetSymbolAddress(void **devPtr, const void *symbol);
# 4749 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetSymbolSize(size_t *size, const void *symbol);
# 4903 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipPointerGetAttributes(struct hipPointerAttribute_t *attributes, const void *ptr);
# 4941 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceCanAccessPeer(int *canAccessPeer, int device, int peerDevice);
# 4978 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceEnablePeerAccess(int peerDevice, unsigned int flags);
# 4997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDeviceDisablePeerAccess(int peerDevice);
# 5055 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsUnregisterResource(cudaGraphicsResource_t resource);
# 5087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags);
# 5123 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsMapResources(int count, cudaGraphicsResource_t *resources, hipStream_t stream = 0);
# 5155 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsUnmapResources(int count, cudaGraphicsResource_t *resources, hipStream_t stream = 0);
# 5184 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsResourceGetMappedPointer(void **devPtr, size_t *size, cudaGraphicsResource_t resource);
# 5218 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t *array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel);
# 5243 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGraphicsResourceGetMappedMipmappedArray(hipMipmappedArray_t *mipmappedArray, cudaGraphicsResource_t resource);
# 5283 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetChannelDesc(struct hipChannelFormatDesc *desc, hipArray_const_t array);
# 5318 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) struct hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, enum hipChannelFormatKind f);
# 5365 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipBindTexture(size_t *offset, const struct textureReference *texref, const void *devPtr, const struct hipChannelFormatDesc *desc, size_t size = (2147483647 * 2U + 1U));
# 5416 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipBindTexture2D(size_t *offset, const struct textureReference *texref, const void *devPtr, const struct hipChannelFormatDesc *desc, size_t width, size_t height, size_t pitch);
# 5444 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipBindTextureToArray(const struct textureReference *texref, hipArray_const_t array, const struct hipChannelFormatDesc *desc);
# 5472 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipBindTextureToMipmappedArray(const struct textureReference *texref, hipMipmappedArray_const_t mipmappedArray, const struct hipChannelFormatDesc *desc);
# 5493 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipUnbindTexture(const struct textureReference *texref);
# 5518 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetTextureAlignmentOffset(size_t *offset, const struct textureReference *texref);
# 5543 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetTextureReference(const struct textureReference **texref, const void *symbol);
# 5583 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipBindSurfaceToArray(const struct hipSurfaceReference *surfref, hipArray_const_t array, const struct hipChannelFormatDesc *desc);
# 5602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetSurfaceReference(const struct hipSurfaceReference **surfref, const void *symbol);
# 5817 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipCreateTextureObject(hipTextureObject_t *pTexObject, const struct hipResourceDesc *pResDesc, const struct hipTextureDesc *pTexDesc, const struct hipResourceViewDesc *pResViewDesc);
# 5832 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDestroyTextureObject(hipTextureObject_t texObject);
# 5848 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetTextureObjectResourceDesc(struct hipResourceDesc *pResDesc, hipTextureObject_t texObject);
# 5864 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetTextureObjectTextureDesc(struct hipTextureDesc *pTexDesc, hipTextureObject_t texObject);
# 5881 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetTextureObjectResourceViewDesc(struct hipResourceViewDesc *pResViewDesc, hipTextureObject_t texObject);
# 5918 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipCreateSurfaceObject(hipSurfaceObject_t *pSurfObject, const struct hipResourceDesc *pResDesc);
# 5933 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfObject);
# 5948 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipGetSurfaceObjectResourceDesc(struct hipResourceDesc *pResDesc, hipSurfaceObject_t surfObject);
# 5975 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) hipError_t hipDriverGetVersion(int *driverVersion);
# 5992 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) hipError_t hipRuntimeGetVersion(int *runtimeVersion);
extern __attribute__((host)) hipError_t cudaGetExportTable(const void **ppExportTable, const hipUUID *pExportTableId);
# 6133 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_runtime_api.h"
}
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/channel_descriptor.h" 2
# 107 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/channel_descriptor.h"
template<class T> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc(void)
{
return hipCreateChannelDesc(0, 0, 0, 0, hipChannelFormatKindNone);
}
static __inline__ __attribute__((host)) hipChannelFormatDesc cudaCreateChannelDescHalf(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) hipChannelFormatDesc cudaCreateChannelDescHalf1(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) hipChannelFormatDesc cudaCreateChannelDescHalf2(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) hipChannelFormatDesc cudaCreateChannelDescHalf4(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<char>(void)
{
int e = (int)sizeof(char) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<signed char>(void)
{
int e = (int)sizeof(signed char) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<unsigned char>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<char1>(void)
{
int e = (int)sizeof(signed char) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uchar1>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<char2>(void)
{
int e = (int)sizeof(signed char) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uchar2>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<char4>(void)
{
int e = (int)sizeof(signed char) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uchar4>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<short>(void)
{
int e = (int)sizeof(short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<unsigned short>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<short1>(void)
{
int e = (int)sizeof(short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<ushort1>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<short2>(void)
{
int e = (int)sizeof(short) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<ushort2>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<short4>(void)
{
int e = (int)sizeof(short) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<ushort4>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<int>(void)
{
int e = (int)sizeof(int) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<unsigned int>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<int1>(void)
{
int e = (int)sizeof(int) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uint1>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<int2>(void)
{
int e = (int)sizeof(int) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uint2>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<int4>(void)
{
int e = (int)sizeof(int) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<uint4>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindUnsigned);
}
# 379 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/channel_descriptor.h"
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<float>(void)
{
int e = (int)sizeof(float) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<float1>(void)
{
int e = (int)sizeof(float) * 8;
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<float2>(void)
{
int e = (int)sizeof(float) * 8;
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) hipChannelFormatDesc hipCreateChannelDesc<float4>(void)
{
int e = (int)sizeof(float) * 8;
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat);
}
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h" 1
# 53 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 54 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h" 2
# 79 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct hipPitchedPtr make_hipPitchedPtr(void *d, size_t p, size_t xsz, size_t ysz)
{
struct hipPitchedPtr s;
s.ptr = d;
s.pitch = p;
s.xsize = xsz;
s.ysize = ysz;
return s;
}
# 106 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct hipPos make_hipPos(size_t x, size_t y, size_t z)
{
struct hipPos p;
p.x = x;
p.y = y;
p.z = z;
return p;
}
# 132 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct hipExtent make_hipExtent(size_t w, size_t h, size_t d)
{
struct hipExtent e;
e.width = w;
e.height = h;
e.depth = d;
return e;
}
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h" 2
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h"
static __inline__ __attribute__((host)) __attribute__((device)) char1 make_char1(signed char x)
{
char1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar1 make_uchar1(unsigned char x)
{
uchar1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char2 make_char2(signed char x, signed char y)
{
char2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar2 make_uchar2(unsigned char x, unsigned char y)
{
uchar2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char3 make_char3(signed char x, signed char y, signed char z)
{
char3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z)
{
uchar3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char4 make_char4(signed char x, signed char y, signed char z, signed char w)
{
char4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w)
{
uchar4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short1 make_short1(short x)
{
short1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort1 make_ushort1(unsigned short x)
{
ushort1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short2 make_short2(short x, short y)
{
short2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort2 make_ushort2(unsigned short x, unsigned short y)
{
ushort2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short3 make_short3(short x,short y, short z)
{
short3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z)
{
ushort3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short4 make_short4(short x, short y, short z, short w)
{
short4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w)
{
ushort4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int1 make_int1(int x)
{
int1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint1 make_uint1(unsigned int x)
{
uint1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int2 make_int2(int x, int y)
{
int2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint2 make_uint2(unsigned int x, unsigned int y)
{
uint2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int3 make_int3(int x, int y, int z)
{
int3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z)
{
uint3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int4 make_int4(int x, int y, int z, int w)
{
int4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w)
{
uint4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long1 make_long1(long int x)
{
long1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong1 make_ulong1(unsigned long int x)
{
ulong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long2 make_long2(long int x, long int y)
{
long2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong2 make_ulong2(unsigned long int x, unsigned long int y)
{
ulong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long3 make_long3(long int x, long int y, long int z)
{
long3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong3 make_ulong3(unsigned long int x, unsigned long int y, unsigned long int z)
{
ulong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long4 make_long4(long int x, long int y, long int z, long int w)
{
long4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong4 make_ulong4(unsigned long int x, unsigned long int y, unsigned long int z, unsigned long int w)
{
ulong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float1 make_float1(float x)
{
float1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float2 make_float2(float x, float y)
{
float2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float3 make_float3(float x, float y, float z)
{
float3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float4 make_float4(float x, float y, float z, float w)
{
float4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong1 make_longlong1(long long int x)
{
longlong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong1 make_ulonglong1(unsigned long long int x)
{
ulonglong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong2 make_longlong2(long long int x, long long int y)
{
longlong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong2 make_ulonglong2(unsigned long long int x, unsigned long long int y)
{
ulonglong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong3 make_longlong3(long long int x, long long int y, long long int z)
{
longlong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong3 make_ulonglong3(unsigned long long int x, unsigned long long int y, unsigned long long int z)
{
ulonglong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong4 make_longlong4(long long int x, long long int y, long long int z, long long int w)
{
longlong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong4 make_ulonglong4(unsigned long long int x, unsigned long long int y, unsigned long long int z, unsigned long long int w)
{
ulonglong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double1 make_double1(double x)
{
double1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double2 make_double2(double x, double y)
{
double2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double3 make_double3(double x, double y, double z)
{
double3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double4 make_double4(double x, double y, double z, double w)
{
double4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/string.h" 1 3 4
# 29 "/usr/include/string.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 35 "/usr/include/string.h" 2 3 4
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memmove (void *__dest, __const void *__src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern void *memchr (void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const void *memchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
memchr (void *__s, int __c, size_t __n) throw ()
{
return __builtin_memchr (__s, __c, __n);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void *
memchr (__const void *__s, int __c, size_t __n) throw ()
{
return __builtin_memchr (__s, __c, __n);
}
}
extern "C++" void *rawmemchr (void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *rawmemchr (__const void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" void *memrchr (void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strcmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcoll (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strxfrm (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (2)));
# 1 "/usr/include/xlocale.h" 1 3 4
# 28 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{
struct __locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
const char *__names[13];
} *__locale_t;
typedef __locale_t locale_t;
# 163 "/usr/include/string.h" 2 3 4
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
extern char *strdup (__const char *__s)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
extern char *strndup (__const char *__string, size_t __n)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 210 "/usr/include/string.h" 3 4
extern "C++"
{
extern char *strchr (char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strchr (__const char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strchr (char *__s, int __c) throw ()
{
return __builtin_strchr (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strchr (__const char *__s, int __c) throw ()
{
return __builtin_strchr (__s, __c);
}
}
extern "C++"
{
extern char *strrchr (char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strrchr (__const char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strrchr (char *__s, int __c) throw ()
{
return __builtin_strrchr (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strrchr (__const char *__s, int __c) throw ()
{
return __builtin_strrchr (__s, __c);
}
}
extern "C++" char *strchrnul (char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *strchrnul (__const char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strcspn (__const char *__s, __const char *__reject)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strspn (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *strpbrk (char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strpbrk (__const char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strpbrk (char *__s, __const char *__accept) throw ()
{
return __builtin_strpbrk (__s, __accept);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strpbrk (__const char *__s, __const char *__accept) throw ()
{
return __builtin_strpbrk (__s, __accept);
}
}
extern "C++"
{
extern char *strstr (char *__haystack, __const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strstr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strstr (char *__haystack, __const char *__needle) throw ()
{
return __builtin_strstr (__haystack, __needle);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strstr (__const char *__haystack, __const char *__needle) throw ()
{
return __builtin_strstr (__haystack, __needle);
}
}
extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (2)));
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern "C++" char *strcasestr (char *__haystack, __const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++" __const char *strcasestr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 382 "/usr/include/string.h" 3 4
extern void *memmem (__const void *__haystack, size_t __haystacklen,
__const void *__needle, size_t __needlelen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
extern void *__mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern size_t strlen (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strnlen (__const char *__string, size_t __maxlen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strerror (int __errnum) throw ();
# 438 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern char *strerror_l (int __errnum, __locale_t __l) throw ();
extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern void bcopy (__const void *__src, void *__dest, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *index (char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *index (__const char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
index (char *__s, int __c) throw ()
{
return __builtin_index (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
index (__const char *__s, int __c) throw ()
{
return __builtin_index (__s, __c);
}
}
extern "C++"
{
extern char *rindex (char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *rindex (__const char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
rindex (char *__s, int __c) throw ()
{
return __builtin_rindex (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
rindex (__const char *__s, int __c) throw ()
{
return __builtin_rindex (__s, __c);
}
}
extern int ffs (int __i) throw () __attribute__ ((__const__));
extern int ffsl (long int __l) throw () __attribute__ ((__const__));
__extension__ extern int ffsll (long long int __ll)
throw () __attribute__ ((__const__));
extern int strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcasecmp_l (__const char *__s1, __const char *__s2,
__locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern int strncasecmp_l (__const char *__s1, __const char *__s2,
size_t __n, __locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
extern char *strsep (char **__restrict __stringp,
__const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strsignal (int __sig) throw ();
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *__stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strverscmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" char *basename (char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *basename (__const char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
# 646 "/usr/include/string.h" 3 4
}
# 65 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/time.h" 1 3 4
# 30 "/usr/include/time.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 39 "/usr/include/time.h" 2 3 4
# 1 "/usr/include/bits/time.h" 1 3 4
# 43 "/usr/include/time.h" 2 3 4
# 56 "/usr/include/time.h" 3 4
# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 131 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 132 "/usr/include/bits/types.h" 2 3 4
typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef int __daddr_t;
typedef long int __swblk_t;
typedef int __key_t;
typedef int __clockid_t;
typedef void * __timer_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;
typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;
typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;
typedef long int __ssize_t;
typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
typedef long int __intptr_t;
typedef unsigned int __socklen_t;
# 57 "/usr/include/time.h" 2 3 4
typedef __clock_t clock_t;
# 74 "/usr/include/time.h" 3 4
typedef __time_t time_t;
# 92 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 104 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 120 "/usr/include/time.h" 3 4
struct timespec
{
__time_t tv_sec;
long int tv_nsec;
};
struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
long int tm_gmtoff;
__const char *tm_zone;
};
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
struct sigevent;
typedef __pid_t pid_t;
extern clock_t clock (void) throw ();
extern time_t time (time_t *__timer) throw ();
extern double difftime (time_t __time1, time_t __time0)
throw () __attribute__ ((__const__));
extern time_t mktime (struct tm *__tp) throw ();
extern size_t strftime (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp) throw ();
extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
throw ();
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp,
__locale_t __loc) throw ();
extern char *strptime_l (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) throw ();
extern struct tm *gmtime (__const time_t *__timer) throw ();
extern struct tm *localtime (__const time_t *__timer) throw ();
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern struct tm *localtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern char *asctime (__const struct tm *__tp) throw ();
extern char *ctime (__const time_t *__timer) throw ();
extern char *asctime_r (__const struct tm *__restrict __tp,
char *__restrict __buf) throw ();
extern char *ctime_r (__const time_t *__restrict __timer,
char *__restrict __buf) throw ();
extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;
extern char *tzname[2];
extern void tzset (void) throw ();
extern int daylight;
extern long int timezone;
extern int stime (__const time_t *__when) throw ();
# 313 "/usr/include/time.h" 3 4
extern time_t timegm (struct tm *__tp) throw ();
extern time_t timelocal (struct tm *__tp) throw ();
extern int dysize (int __year) throw () __attribute__ ((__const__));
# 328 "/usr/include/time.h" 3 4
extern int nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining);
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
throw ();
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
struct timespec *__rem);
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) throw ();
extern int timer_delete (timer_t __timerid) throw ();
extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) throw ();
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
throw ();
extern int timer_getoverrun (timer_t __timerid) throw ();
# 390 "/usr/include/time.h" 3 4
extern int getdate_err;
# 399 "/usr/include/time.h" 3 4
extern struct tm *getdate (__const char *__string);
# 413 "/usr/include/time.h" 3 4
extern int getdate_r (__const char *__restrict __string,
struct tm *__restrict __resbufp);
}
# 66 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) clock_t clock(void) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void* memset(void*, int, size_t) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void* memcpy(void*, const void*, size_t) throw ();
}
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 1 3
# 39 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 1 3
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 4 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 1687 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/os_defines.h" 1 3
# 1688 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/cpu_defines.h" 1 3
# 1691 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 44 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::ptrdiff_t;
using ::size_t;
}
# 40 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 1 3
# 35 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
# 59 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
virtual const char* what() const throw();
};
class bad_exception : public exception
{
public:
bad_exception() throw() { }
virtual ~bad_exception() throw();
virtual const char* what() const throw();
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) throw();
void terminate() __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) throw();
void unexpected() __attribute__ ((__noreturn__));
# 115 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
bool uncaught_exception() throw();
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
# 138 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
void __verbose_terminate_handler();
}
}
#pragma GCC visibility pop
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 2 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
virtual ~bad_alloc() throw();
virtual const char* what() const throw();
};
struct nothrow_t { };
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler) throw();
}
# 91 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 3
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void*, const std::nothrow_t&) throw();
void operator delete[](void*, const std::nothrow_t&) throw();
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
inline void operator delete (void*, void*) throw() { }
inline void operator delete[](void*, void*) throw() { }
}
#pragma GCC visibility pop
# 78 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 91 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new(std:: size_t, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new[](std:: size_t, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete(void*, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete[](void*, void*) throw();
# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 35 "/usr/include/stdio.h" 2 3 4
# 45 "/usr/include/stdio.h" 3 4
struct _IO_FILE;
typedef struct _IO_FILE FILE;
# 65 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 75 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 15 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 16 "/usr/include/_G_config.h" 2 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 83 "/usr/include/wchar.h" 3 4
typedef struct
{
int __count;
union
{
unsigned int __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 21 "/usr/include/_G_config.h" 2 3 4
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 53 "/usr/include/_G_config.h" 3 4
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h" 1 3 4
# 40 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 170 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 180 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 203 "/usr/include/libio.h" 3 4
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
# 271 "/usr/include/libio.h" 3 4
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _flags2;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 319 "/usr/include/libio.h" 3 4
__off64_t _offset;
# 328 "/usr/include/libio.h" 3 4
void *__pad1;
void *__pad2;
void *__pad3;
void *__pad4;
size_t __pad5;
int _mode;
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 364 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file;
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
extern "C" {
extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);
# 460 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp);
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 490 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 552 "/usr/include/libio.h" 3 4
}
# 76 "/usr/include/stdio.h" 2 3 4
typedef __gnuc_va_list va_list;
# 91 "/usr/include/stdio.h" 3 4
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __ssize_t ssize_t;
typedef _G_fpos_t fpos_t;
typedef _G_fpos64_t fpos64_t;
# 161 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 162 "/usr/include/stdio.h" 2 3 4
extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern int renameat (int __oldfd, __const char *__old, int __newfd,
__const char *__new) throw ();
extern FILE *tmpfile (void) ;
# 204 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile64 (void) ;
extern char *tmpnam (char *__s) throw () ;
extern char *tmpnam_r (char *__s) throw () ;
# 226 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
throw () __attribute__ ((__malloc__)) ;
extern int fclose (FILE *__stream);
extern int fflush (FILE *__stream);
# 251 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 261 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
# 294 "/usr/include/stdio.h" 3 4
extern FILE *fopen64 (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen64 (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
extern FILE *fopencookie (void *__restrict __magic_cookie,
__const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) throw () ;
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
throw () ;
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...);
extern int printf (__const char *__restrict __format, ...);
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg);
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
# 416 "/usr/include/stdio.h" 3 4
extern int vdprintf (int __fd, __const char *__restrict __fmt,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) ;
extern int scanf (__const char *__restrict __format, ...) ;
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) throw ();
# 467 "/usr/include/stdio.h" 3 4
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 2, 0))) ;
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 1, 0))) ;
extern int vsscanf (__const char *__restrict __s,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
# 526 "/usr/include/stdio.h" 3 4
extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);
extern int getchar (void);
# 554 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 565 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);
extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);
extern int putchar (int __c);
# 598 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);
extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);
extern int getw (FILE *__stream);
extern int putw (int __w, FILE *__stream);
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
;
extern char *gets (char *__s) ;
# 644 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) ;
# 660 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) ;
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
extern int puts (__const char *__s);
extern int ungetc (int __c, FILE *__stream);
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) ;
# 721 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (__const char *__restrict __s,
FILE *__restrict __stream);
# 732 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern int fseek (FILE *__stream, long int __off, int __whence);
extern long int ftell (FILE *__stream) ;
extern void rewind (FILE *__stream);
# 768 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);
extern __off_t ftello (FILE *__stream) ;
# 787 "/usr/include/stdio.h" 3 4
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 810 "/usr/include/stdio.h" 3 4
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw () ;
extern int ferror (FILE *__stream) throw () ;
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw () ;
extern int ferror_unlocked (FILE *__stream) throw () ;
extern void perror (__const char *__s);
# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 849 "/usr/include/stdio.h" 2 3 4
extern int fileno (FILE *__stream) throw () ;
extern int fileno_unlocked (FILE *__stream) throw () ;
# 868 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;
extern int pclose (FILE *__stream);
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s);
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
__const char *__restrict __format,
__gnuc_va_list __args)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw () ;
extern void funlockfile (FILE *__stream) throw ();
# 929 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio.h" 1 3 4
# 36 "/usr/include/bits/stdio.h" 3 4
extern __inline __attribute__ ((__gnu_inline__)) int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getchar (void)
{
return _IO_getc (stdin);
}
extern __inline __attribute__ ((__gnu_inline__)) int
fgetc_unlocked (FILE *__fp)
{
return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getc_unlocked (FILE *__fp)
{
return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getchar_unlocked (void)
{
return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
extern __inline __attribute__ ((__gnu_inline__)) int
fputc_unlocked (int __c, FILE *__stream)
{
return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) int
putc_unlocked (int __c, FILE *__stream)
{
return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) int
putchar_unlocked (int __c)
{
return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
extern __inline __attribute__ ((__gnu_inline__)) int
feof_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x10) != 0);
}
extern __inline __attribute__ ((__gnu_inline__)) int
ferror_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x20) != 0);
}
# 930 "/usr/include/stdio.h" 2 3 4
# 938 "/usr/include/stdio.h" 3 4
}
# 99 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4
extern "C" {
# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 43 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 65 "/usr/include/bits/waitstatus.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 61 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/byteswap.h" 1 3 4
# 28 "/usr/include/bits/byteswap.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/byteswap.h" 2 3 4
# 62 "/usr/include/endian.h" 2 3 4
# 66 "/usr/include/bits/waitstatus.h" 2 3 4
union wait
{
int w_status;
struct
{
unsigned int __w_termsig:7;
unsigned int __w_coredump:1;
unsigned int __w_retcode:8;
unsigned int:16;
} __wait_terminated;
struct
{
unsigned int __w_stopval:8;
unsigned int __w_stopsig:8;
unsigned int:16;
} __wait_stopped;
};
# 44 "/usr/include/stdlib.h" 2 3 4
# 96 "/usr/include/stdlib.h" 3 4
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) throw () ;
extern double atof (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern float strtof (__const char *__restrict __nptr,
char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
extern long double strtold (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern long int strtol (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
# 240 "/usr/include/stdlib.h" 3 4
extern long int strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern unsigned long int strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern double strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern float strtof_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern long double strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern __inline __attribute__ ((__gnu_inline__)) double
atof (__const char *__nptr) throw ()
{
return strtod (__nptr, (char **) __null);
}
extern __inline __attribute__ ((__gnu_inline__)) int
atoi (__const char *__nptr) throw ()
{
return (int) strtol (__nptr, (char **) __null, 10);
}
extern __inline __attribute__ ((__gnu_inline__)) long int
atol (__const char *__nptr) throw ()
{
return strtol (__nptr, (char **) __null, 10);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
atoll (__const char *__nptr) throw ()
{
return strtoll (__nptr, (char **) __null, 10);
}
# 311 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) throw () ;
extern long int a64l (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 1 "/usr/include/sys/types.h" 1 3 4
# 28 "/usr/include/sys/types.h" 3 4
extern "C" {
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
# 105 "/usr/include/sys/types.h" 3 4
typedef __id_t id_t;
# 116 "/usr/include/sys/types.h" 3 4
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 137 "/usr/include/sys/types.h" 3 4
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 220 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 23 "/usr/include/bits/select.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/select.h" 2 3 4
# 32 "/usr/include/sys/select.h" 2 3 4
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 24 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4
typedef __sigset_t sigset_t;
# 1 "/usr/include/bits/time.h" 1 3 4
# 75 "/usr/include/bits/time.h" 3 4
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 47 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
{
__fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4
extern "C" {
# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
}
# 221 "/usr/include/sys/types.h" 2 3 4
# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 30 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
throw ();
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
throw ();
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
throw ();
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
gnu_dev_major (unsigned long long int __dev) throw ()
{
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
gnu_dev_minor (unsigned long long int __dev) throw ()
{
return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int
gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
{
return ((__minor & 0xff) | ((__major & 0xfff) << 8)
| (((unsigned long long int) (__minor & ~0xff)) << 12)
| (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 263 "/usr/include/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 23 "/usr/include/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
# 50 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;
typedef union
{
char __size[56];
long int __align;
} pthread_attr_t;
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
# 76 "/usr/include/bits/pthreadtypes.h" 3 4
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
unsigned int __nusers;
int __kind;
int __spins;
__pthread_list_t __list;
# 101 "/usr/include/bits/pthreadtypes.h" 3 4
} __data;
char __size[40];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[4];
int __align;
} pthread_mutexattr_t;
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[48];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[4];
int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
typedef union
{
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
} __data;
# 187 "/usr/include/bits/pthreadtypes.h" 3 4
char __size[56];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[8];
long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
char __size[32];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[4];
int __align;
} pthread_barrierattr_t;
# 272 "/usr/include/sys/types.h" 2 3 4
}
# 321 "/usr/include/stdlib.h" 2 3 4
extern long int random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
throw () __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern void *calloc (size_t __nmemb, size_t __size)
throw () __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size)
throw () __attribute__ ((__warn_unused_result__));
extern void free (void *__ptr) throw ();
extern void cfree (void *__ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4
extern "C" {
extern void *alloca (size_t __size) throw ();
}
# 498 "/usr/include/stdlib.h" 2 3 4
extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
throw () __attribute__ ((__nonnull__ (1))) ;
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" int at_quick_exit (void (*__func) (void))
throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1)));
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
throw () __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *__secure_getenv (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern int setenv (__const char *__name, __const char *__value, int __replace)
throw () __attribute__ ((__nonnull__ (2)));
extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) throw ();
# 606 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 620 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 630 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 642 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 652 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
__attribute__ ((__nonnull__ (1))) ;
# 663 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 674 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 684 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 694 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 706 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
extern int system (__const char *__command) ;
extern char *canonicalize_file_name (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
# 734 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) throw () ;
typedef int (*__compar_fn_t) (__const void *, __const void *);
typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
extern void *bsearch (__const void *__key, __const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
__attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) throw () __attribute__ ((__const__)) ;
extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
throw () __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
throw () __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
throw () __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
throw () __attribute__ ((__const__)) ;
# 808 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (__const char *__s, size_t __n) throw () ;
extern int mbtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n) throw () ;
extern int wctomb (char *__s, wchar_t __wchar) throw () ;
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
__const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s,
__const wchar_t *__restrict __pwcs, size_t __n)
throw ();
extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
# 896 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
char **__restrict __valuep)
throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
extern int posix_openpt (int __oflag) ;
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw () ;
extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern int getpt (void);
extern int getloadavg (double __loadavg[], int __nelem)
throw () __attribute__ ((__nonnull__ (1)));
# 964 "/usr/include/stdlib.h" 3 4
}
# 100 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int printf(const char*, ...);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int fprintf(FILE*, const char*, ...);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* malloc(size_t) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void free(void*) throw ();
}
# 1 "/usr/include/assert.h" 1 3 4
# 66 "/usr/include/assert.h" 3 4
extern "C" {
extern void __assert_fail (__const char *__assertion, __const char *__file,
unsigned int __line, __const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert_perror_fail (int __errnum, __const char *__file,
unsigned int __line,
__const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert (const char *__assertion, const char *__file, int __line)
throw () __attribute__ ((__noreturn__));
}
# 111 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
# 122 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void __assert_fail(
const char *, const char *, unsigned int, const char *)
throw ();
}
# 143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new(std:: size_t) throw(std:: bad_alloc);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new[](std:: size_t) throw(std:: bad_alloc);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete(void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete[](void*) throw();
# 167 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 1
# 83 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern "C"
{
# 149 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int abs(int) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) long int labs(long int) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) long long int llabs(long long int) throw ();
# 194 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fabs(double x) throw ();
# 235 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fabsf(float x) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int min(int, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned int umin(unsigned int, unsigned int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llmin(long long int, long long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned long long int ullmin(unsigned long long int, unsigned long long int);
# 255 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fminf(float x, float y) throw ();
# 271 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmin(double x, double y) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int max(int, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned int umax(unsigned int, unsigned int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llmax(long long int, long long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned long long int ullmax(unsigned long long int, unsigned long long int);
# 291 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmaxf(float x, float y) throw ();
# 307 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmax(double, double) throw ();
# 348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sin(double x) throw ();
# 381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cos(double x) throw ();
# 396 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincos(double x, double *sptr, double *cptr) throw ();
# 412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincosf(float x, float *sptr, float *cptr) throw ();
# 453 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tan(double x) throw ();
# 522 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sqrt(double x) throw ();
# 591 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rsqrt(double x);
# 660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rsqrtf(float x);
# 711 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log2(double x) throw ();
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp2(double x) throw ();
# 753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float exp2f(float x) throw ();
# 774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp10(double x) throw ();
# 796 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float exp10f(float x) throw ();
# 837 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double expm1(double x) throw ();
# 878 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float expm1f(float x) throw ();
# 929 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log2f(float x) throw ();
# 980 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log10(double x) throw ();
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log(double x) throw ();
# 1144 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log1p(double x) throw ();
# 1237 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log1pf(float x) throw ();
# 1309 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double floor(double x) throw ();
# 1348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp(double x) throw ();
# 1379 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cosh(double x) throw ();
# 1409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sinh(double x) throw ();
# 1439 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tanh(double x) throw ();
# 1473 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double acosh(double x) throw ();
# 1507 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float acoshf(float x) throw ();
# 1519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double asinh(double x) throw ();
# 1531 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float asinhf(float x) throw ();
# 1581 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atanh(double x) throw ();
# 1631 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atanhf(float x) throw ();
# 1687 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double ldexp(double x, int exp) throw ();
# 1743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ldexpf(float x, int exp) throw ();
# 1794 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double logb(double x) throw ();
# 1845 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float logbf(float x) throw ();
# 1871 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int ilogb(double x) throw ();
# 1897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int ilogbf(float x) throw ();
# 1969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double scalbn(double x, int n) throw ();
# 2041 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float scalbnf(float x, int n) throw ();
# 2113 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double scalbln(double x, long int n) throw ();
# 2185 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float scalblnf(float x, long int n) throw ();
# 2260 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double frexp(double x, int *nptr) throw ();
# 2335 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float frexpf(float x, int *nptr) throw ();
# 2348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double round(double x) throw ();
# 2361 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float roundf(float x) throw ();
# 2375 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lround(double x) throw ();
# 2389 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lroundf(float x) throw ();
# 2403 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llround(double x) throw ();
# 2417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llroundf(float x) throw ();
# 2428 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rint(double x) throw ();
# 2439 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rintf(float x) throw ();
# 2451 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lrint(double x) throw ();
# 2463 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lrintf(float x) throw ();
# 2475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llrint(double x) throw ();
# 2487 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llrintf(float x) throw ();
# 2536 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nearbyint(double x) throw ();
# 2585 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nearbyintf(float x) throw ();
# 2644 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double ceil(double x) throw ();
# 2655 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double trunc(double x) throw ();
# 2666 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float truncf(float x) throw ();
# 2688 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fdim(double x, double y) throw ();
# 2710 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fdimf(float x, float y) throw ();
# 2743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atan2(double y, double x) throw ();
# 2774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atan(double x) throw ();
# 2797 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double acos(double x) throw ();
# 2829 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double asin(double x) throw ();
# 2869 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double hypot(double x, double y) throw ();
# 2919 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rhypot(double x, double y) throw ();
# 2960 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float hypotf(float x, float y) throw ();
# 3010 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rhypotf(float x, float y) throw ();
# 3093 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cbrt(double x) throw ();
# 3175 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cbrtf(float x) throw ();
# 3224 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rcbrt(double x);
# 3273 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rcbrtf(float x);
# 3333 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sinpi(double x);
# 3393 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinpif(float x);
# 3445 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cospi(double x);
# 3497 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cospif(float x);
# 3527 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincospi(double x, double *sptr, double *cptr);
# 3557 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincospif(float x, float *sptr, float *cptr);
# 3865 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double pow(double x, double y) throw ();
# 3921 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double modf(double x, double *iptr) throw ();
# 3980 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmod(double x, double y) throw ();
# 4065 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double remainder(double x, double y) throw ();
# 4151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float remainderf(float x, float y) throw ();
# 4201 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double remquo(double x, double y, int *quo) throw ();
# 4251 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float remquof(float x, float y, int *quo) throw ();
# 4289 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double j0(double x) throw ();
# 4327 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float j0f(float x) throw ();
# 4384 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double j1(double x) throw ();
# 4441 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float j1f(float x) throw ();
# 4480 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double jn(int n, double x) throw ();
# 4519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float jnf(int n, float x) throw ();
# 4567 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double y0(double x) throw ();
# 4615 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float y0f(float x) throw ();
# 4663 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double y1(double x) throw ();
# 4711 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float y1f(float x) throw ();
# 4760 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double yn(int n, double x) throw ();
# 4809 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ynf(int n, float x) throw ();
# 4836 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cyl_bessel_i0(double x) throw ();
# 4862 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cyl_bessel_i0f(float x) throw ();
# 4889 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cyl_bessel_i1(double x) throw ();
# 4915 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cyl_bessel_i1f(float x) throw ();
# 4994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erf(double x) throw ();
# 5072 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erff(float x) throw ();
# 5129 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfinv(double y);
# 5186 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfinvf(float y);
# 5220 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfc(double x) throw ();
# 5254 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcf(float x) throw ();
# 5378 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double lgamma(double x) throw ();
# 5434 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfcinv(double y);
# 5490 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcinvf(float y);
# 5548 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double normcdfinv(double y);
# 5606 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float normcdfinvf(float y);
# 5649 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double normcdf(double y);
# 5692 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float normcdff(float y);
# 5767 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfcx(double x);
# 5842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcxf(float x);
# 5971 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float lgammaf(float x) throw ();
# 6076 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tgamma(double x) throw ();
# 6181 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tgammaf(float x) throw ();
# 6190 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double copysign(double x, double y) throw ();
# 6199 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float copysignf(float x, float y) throw ();
# 6232 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nextafter(double x, double y) throw ();
# 6265 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nextafterf(float x, float y) throw ();
# 6277 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nan(const char *tagp) throw ();
# 6289 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nanf(const char *tagp) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinff(float) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnanf(float) throw ();
# 6300 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finite(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finitef(float) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbit(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnan(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinf(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbitf(float) throw ();
# 6461 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fma(double x, double y, double z) throw ();
# 6615 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmaf(float x, float y, float z) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbitl(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finitel(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinfl(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnanl(long double) throw ();
# 6675 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float acosf(float x) throw ();
# 6715 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float asinf(float x) throw ();
# 6755 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atanf(float x) throw ();
# 6788 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atan2f(float y, float x) throw ();
# 6812 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cosf(float x) throw ();
# 6854 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinf(float x) throw ();
# 6896 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tanf(float x) throw ();
# 6920 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float coshf(float x) throw ();
# 6961 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinhf(float x) throw ();
# 6991 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tanhf(float x) throw ();
# 7042 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float logf(float x) throw ();
# 7092 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float expf(float x) throw ();
# 7143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log10f(float x) throw ();
# 7198 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float modff(float x, float *iptr) throw ();
# 7506 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float powf(float x, float y) throw ();
# 7575 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sqrtf(float x) throw ();
# 7634 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ceilf(float x) throw ();
# 7706 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float floorf(float x) throw ();
# 7765 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmodf(float x, float y) throw ();
}
# 1 "/usr/include/math.h" 1 3 4
# 30 "/usr/include/math.h" 3 4
extern "C" {
# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 35 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_valf.h" 1 3 4
# 37 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_vall.h" 1 3 4
# 38 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/inf.h" 1 3 4
# 41 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/nan.h" 1 3 4
# 44 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 26 "/usr/include/bits/mathdef.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/mathdef.h" 2 3 4
typedef float float_t;
typedef double double_t;
# 48 "/usr/include/math.h" 2 3 4
# 71 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ()
;
extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
extern double log (double __x) throw (); extern double __log (double __x) throw ();
extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
extern int __isinf (double __value) throw () __attribute__ ((__const__));
extern int __finite (double __value) throw () __attribute__ ((__const__));
extern int isinf (double __value) throw () __attribute__ ((__const__));
extern int finite (double __value) throw () __attribute__ ((__const__));
extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnan (double __value) throw () __attribute__ ((__const__));
extern int isnan (double __value) throw () __attribute__ ((__const__));
extern double j0 (double) throw (); extern double __j0 (double) throw ();
extern double j1 (double) throw (); extern double __j1 (double) throw ();
extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
extern double y0 (double) throw (); extern double __y0 (double) throw ();
extern double y1 (double) throw (); extern double __y1 (double) throw ();
extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
extern double erf (double) throw (); extern double __erf (double) throw ();
extern double erfc (double) throw (); extern double __erfc (double) throw ();
extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
extern double gamma (double) throw (); extern double __gamma (double) throw ();
extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
extern int __fpclassify (double __value) throw ()
__attribute__ ((__const__));
extern int __signbit (double __value) throw ()
__attribute__ ((__const__));
extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
# 72 "/usr/include/math.h" 2 3 4
# 94 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
extern void
sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw (); extern void
__sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw ()
;
extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
extern int __isinff (float __value) throw () __attribute__ ((__const__));
extern int __finitef (float __value) throw () __attribute__ ((__const__));
extern int isinff (float __value) throw () __attribute__ ((__const__));
extern int finitef (float __value) throw () __attribute__ ((__const__));
extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanf (float __value) throw () __attribute__ ((__const__));
extern int isnanf (float __value) throw () __attribute__ ((__const__));
extern float j0f (float) throw (); extern float __j0f (float) throw ();
extern float j1f (float) throw (); extern float __j1f (float) throw ();
extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
extern float y0f (float) throw (); extern float __y0f (float) throw ();
extern float y1f (float) throw (); extern float __y1f (float) throw ();
extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
extern float erff (float) throw (); extern float __erff (float) throw ();
extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
extern int __fpclassifyf (float __value) throw ()
__attribute__ ((__const__));
extern int __signbitf (float __value) throw ()
__attribute__ ((__const__));
extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
# 95 "/usr/include/math.h" 2 3 4
# 141 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
extern void
sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw (); extern void
__sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw ()
;
extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
extern int __finitel (long double __value) throw () __attribute__ ((__const__));
extern int isinfl (long double __value) throw () __attribute__ ((__const__));
extern int finitel (long double __value) throw () __attribute__ ((__const__));
extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
extern int isnanl (long double __value) throw () __attribute__ ((__const__));
extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();
extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
extern int __fpclassifyl (long double __value) throw ()
__attribute__ ((__const__));
extern int __signbitl (long double __value) throw ()
__attribute__ ((__const__));
extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
# 142 "/usr/include/math.h" 2 3 4
# 157 "/usr/include/math.h" 3 4
extern int signgam;
# 198 "/usr/include/math.h" 3 4
enum
{
FP_NAN,
FP_INFINITE,
FP_ZERO,
FP_SUBNORMAL,
FP_NORMAL
};
# 291 "/usr/include/math.h" 3 4
typedef enum
{
_IEEE_ = -1,
_SVID_,
_XOPEN_,
_POSIX_,
_ISOC_
} _LIB_VERSION_TYPE;
extern _LIB_VERSION_TYPE _LIB_VERSION;
# 314 "/usr/include/math.h" 3 4
struct __exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int matherr (struct __exception *__exc) throw ();
# 416 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathinline.h" 1 3 4
# 25 "/usr/include/bits/mathinline.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/mathinline.h" 2 3 4
# 37 "/usr/include/bits/mathinline.h" 3 4
extern __inline __attribute__ ((__gnu_inline__)) int
__signbitf (float __x) throw ()
{
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x8;
}
extern __inline __attribute__ ((__gnu_inline__)) int
__signbit (double __x) throw ()
{
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x80;
}
extern __inline __attribute__ ((__gnu_inline__)) int
__signbitl (long double __x) throw ()
{
__extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
return (__u.__i[2] & 0x8000) != 0;
}
# 417 "/usr/include/math.h" 2 3 4
# 472 "/usr/include/math.h" 3 4
}
# 7771 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 1 3
# 36 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
# 37 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
# 69 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<typename _Iterator, typename _Container>
class __normal_iterator;
}
namespace std __attribute__ ((__visibility__ ("default"))) {
struct __true_type { };
struct __false_type { };
template<bool>
struct __truth_type
{ typedef __false_type __type; };
template<>
struct __truth_type<true>
{ typedef __true_type __type; };
template<class _Sp, class _Tp>
struct __traitor
{
enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
typedef typename __truth_type<__value>::__type __type;
};
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_void
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_void<void>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_integer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_integer<bool>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
# 194 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
template<>
struct __is_integer<short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_floating
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_floating<float>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<long double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_pointer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __is_pointer<_Tp*>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_normal_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Iterator, typename _Container>
struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
_Container> >
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_arithmetic
: public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
{ };
template<typename _Tp>
struct __is_fundamental
: public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
{ };
template<typename _Tp>
struct __is_scalar
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
{ };
template<typename _Tp>
struct __is_char
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_char<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_char<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_byte
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_byte<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_move_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
# 417 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
}
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 1 3
# 32 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 3
# 33 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<bool, typename>
struct __enable_if
{ };
template<typename _Tp>
struct __enable_if<true, _Tp>
{ typedef _Tp __type; };
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct __conditional_type
{ typedef _Iftrue __type; };
template<typename _Iftrue, typename _Iffalse>
struct __conditional_type<false, _Iftrue, _Iffalse>
{ typedef _Iffalse __type; };
template<typename _Tp>
struct __add_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __add_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __add_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __add_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __add_unsigned<long long>
{ typedef unsigned long long __type; };
template<>
struct __add_unsigned<bool>;
template<>
struct __add_unsigned<wchar_t>;
template<typename _Tp>
struct __remove_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __remove_unsigned<char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned short>
{ typedef short __type; };
template<>
struct __remove_unsigned<unsigned int>
{ typedef int __type; };
template<>
struct __remove_unsigned<unsigned long>
{ typedef long __type; };
template<>
struct __remove_unsigned<unsigned long long>
{ typedef long long __type; };
template<>
struct __remove_unsigned<bool>;
template<>
struct __remove_unsigned<wchar_t>;
template<typename _Type>
inline bool
__is_null_pointer(_Type* __ptr)
{ return __ptr == 0; }
template<typename _Type>
inline bool
__is_null_pointer(_Type)
{ return false; }
template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
struct __promote
{ typedef double __type; };
template<typename _Tp>
struct __promote<_Tp, false>
{ typedef _Tp __type; };
template<typename _Tp, typename _Up>
struct __promote_2
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
public:
typedef __typeof__(__type1() + __type2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp>
struct __promote_3
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
public:
typedef __typeof__(__type1() + __type2() + __type3()) __type;
};
template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
struct __promote_4
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
typedef typename __promote<_Wp>::__type __type4;
public:
typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
};
}
# 46 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 77 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
_Tp __cmath_power(_Tp, unsigned int);
template<typename _Tp>
inline _Tp
__pow_helper(_Tp __x, int __n)
{
return __n < 0
? _Tp(1)/__cmath_power(__x, -__n)
: __cmath_power(__x, __n);
}
inline double
abs(double __x)
{ return __builtin_fabs(__x); }
inline float
abs(float __x)
{ return __builtin_fabsf(__x); }
inline long double
abs(long double __x)
{ return __builtin_fabsl(__x); }
using ::acos;
inline float
acos(float __x)
{ return __builtin_acosf(__x); }
inline long double
acos(long double __x)
{ return __builtin_acosl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
acos(_Tp __x)
{ return __builtin_acos(__x); }
using ::asin;
inline float
asin(float __x)
{ return __builtin_asinf(__x); }
inline long double
asin(long double __x)
{ return __builtin_asinl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
asin(_Tp __x)
{ return __builtin_asin(__x); }
using ::atan;
inline float
atan(float __x)
{ return __builtin_atanf(__x); }
inline long double
atan(long double __x)
{ return __builtin_atanl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
atan(_Tp __x)
{ return __builtin_atan(__x); }
using ::atan2;
inline float
atan2(float __y, float __x)
{ return __builtin_atan2f(__y, __x); }
inline long double
atan2(long double __y, long double __x)
{ return __builtin_atan2l(__y, __x); }
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
atan2(_Tp __y, _Up __x)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return atan2(__type(__y), __type(__x));
}
using ::ceil;
inline float
ceil(float __x)
{ return __builtin_ceilf(__x); }
inline long double
ceil(long double __x)
{ return __builtin_ceill(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ceil(_Tp __x)
{ return __builtin_ceil(__x); }
using ::cos;
inline float
cos(float __x)
{ return __builtin_cosf(__x); }
inline long double
cos(long double __x)
{ return __builtin_cosl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cos(_Tp __x)
{ return __builtin_cos(__x); }
using ::cosh;
inline float
cosh(float __x)
{ return __builtin_coshf(__x); }
inline long double
cosh(long double __x)
{ return __builtin_coshl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cosh(_Tp __x)
{ return __builtin_cosh(__x); }
using ::exp;
inline float
exp(float __x)
{ return __builtin_expf(__x); }
inline long double
exp(long double __x)
{ return __builtin_expl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
exp(_Tp __x)
{ return __builtin_exp(__x); }
using ::fabs;
inline float
fabs(float __x)
{ return __builtin_fabsf(__x); }
inline long double
fabs(long double __x)
{ return __builtin_fabsl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
fabs(_Tp __x)
{ return __builtin_fabs(__x); }
using ::floor;
inline float
floor(float __x)
{ return __builtin_floorf(__x); }
inline long double
floor(long double __x)
{ return __builtin_floorl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
floor(_Tp __x)
{ return __builtin_floor(__x); }
using ::fmod;
inline float
fmod(float __x, float __y)
{ return __builtin_fmodf(__x, __y); }
inline long double
fmod(long double __x, long double __y)
{ return __builtin_fmodl(__x, __y); }
using ::frexp;
inline float
frexp(float __x, int* __exp)
{ return __builtin_frexpf(__x, __exp); }
inline long double
frexp(long double __x, int* __exp)
{ return __builtin_frexpl(__x, __exp); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
frexp(_Tp __x, int* __exp)
{ return __builtin_frexp(__x, __exp); }
using ::ldexp;
inline float
ldexp(float __x, int __exp)
{ return __builtin_ldexpf(__x, __exp); }
inline long double
ldexp(long double __x, int __exp)
{ return __builtin_ldexpl(__x, __exp); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ldexp(_Tp __x, int __exp)
{ return __builtin_ldexp(__x, __exp); }
using ::log;
inline float
log(float __x)
{ return __builtin_logf(__x); }
inline long double
log(long double __x)
{ return __builtin_logl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log(_Tp __x)
{ return __builtin_log(__x); }
using ::log10;
inline float
log10(float __x)
{ return __builtin_log10f(__x); }
inline long double
log10(long double __x)
{ return __builtin_log10l(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log10(_Tp __x)
{ return __builtin_log10(__x); }
using ::modf;
inline float
modf(float __x, float* __iptr)
{ return __builtin_modff(__x, __iptr); }
inline long double
modf(long double __x, long double* __iptr)
{ return __builtin_modfl(__x, __iptr); }
using ::pow;
inline float
pow(float __x, float __y)
{ return __builtin_powf(__x, __y); }
inline long double
pow(long double __x, long double __y)
{ return __builtin_powl(__x, __y); }
inline double
pow(double __x, int __i)
{ return __builtin_powi(__x, __i); }
inline float
pow(float __x, int __n)
{ return __builtin_powif(__x, __n); }
inline long double
pow(long double __x, int __n)
{ return __builtin_powil(__x, __n); }
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
pow(_Tp __x, _Up __y)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return pow(__type(__x), __type(__y));
}
using ::sin;
inline float
sin(float __x)
{ return __builtin_sinf(__x); }
inline long double
sin(long double __x)
{ return __builtin_sinl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sin(_Tp __x)
{ return __builtin_sin(__x); }
using ::sinh;
inline float
sinh(float __x)
{ return __builtin_sinhf(__x); }
inline long double
sinh(long double __x)
{ return __builtin_sinhl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sinh(_Tp __x)
{ return __builtin_sinh(__x); }
using ::sqrt;
inline float
sqrt(float __x)
{ return __builtin_sqrtf(__x); }
inline long double
sqrt(long double __x)
{ return __builtin_sqrtl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sqrt(_Tp __x)
{ return __builtin_sqrt(__x); }
using ::tan;
inline float
tan(float __x)
{ return __builtin_tanf(__x); }
inline long double
tan(long double __x)
{ return __builtin_tanl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tan(_Tp __x)
{ return __builtin_tan(__x); }
using ::tanh;
inline float
tanh(float __x)
{ return __builtin_tanhf(__x); }
inline long double
tanh(long double __x)
{ return __builtin_tanhl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tanh(_Tp __x)
{ return __builtin_tanh(__x); }
}
# 492 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
fpclassify(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
FP_SUBNORMAL, FP_ZERO, __type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isfinite(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isfinite(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isinf(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isinf(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnan(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnan(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnormal(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnormal(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
signbit(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_signbit(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreater(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreaterequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreaterequal(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isless(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isless(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessequal(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessgreater(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isunordered(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isunordered(__type(__f1), __type(__f2));
}
}
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cmath.tcc" 1 3
# 35 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cmath.tcc" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
inline _Tp
__cmath_power(_Tp __x, unsigned int __n)
{
_Tp __y = __n % 2 ? __x : _Tp(1);
while (__n >>= 1)
{
__x = __x * __x;
if (__n % 2)
__y = __y * __x;
}
return __y;
}
}
# 610 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 7775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 2 3
# 100 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
}
# 157 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
using ::lldiv_t;
using ::_Exit;
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
using ::llabs;
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::lldiv;
# 190 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
using ::atoll;
using ::strtoll;
using ::strtoull;
using ::strtof;
using ::strtold;
}
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::__gnu_cxx::lldiv_t;
using ::__gnu_cxx::_Exit;
using ::__gnu_cxx::abs;
using ::__gnu_cxx::llabs;
using ::__gnu_cxx::div;
using ::__gnu_cxx::lldiv;
using ::__gnu_cxx::atoll;
using ::__gnu_cxx::strtof;
using ::__gnu_cxx::strtoll;
using ::__gnu_cxx::strtoull;
using ::__gnu_cxx::strtold;
}
# 7776 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 7827 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
namespace __gnu_cxx
{
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) long long int abs(long long int a);
}
namespace std
{
template<typename T> extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) T __pow_helper(T, int);
template<typename T> extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) T __cmath_power(T, unsigned int);
}
using std::abs;
using std::fabs;
using std::ceil;
using std::floor;
using std::sqrt;
using std::pow;
using std::log;
using std::log10;
using std::fmod;
using std::modf;
using std::exp;
using std::frexp;
using std::ldexp;
using std::asin;
using std::sin;
using std::sinh;
using std::acos;
using std::cos;
using std::cosh;
using std::atan;
using std::atan2;
using std::tan;
using std::tanh;
# 8037 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
namespace std {
# 8048 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) long int abs(long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float abs(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) double abs(double);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float fabs(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float ceil(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float floor(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sqrt(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float pow(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float pow(float, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) double pow(double, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float log(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float log10(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float fmod(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float modf(float, float*);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float exp(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float frexp(float, int*);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float ldexp(float, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float asin(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sin(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sinh(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float acos(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float cos(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float cosh(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float atan(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float atan2(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float tan(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float tanh(float);
}
static __inline__ __attribute__((host)) __attribute__((device)) float logb(float a)
{
return logbf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) int ilogb(float a)
{
return ilogbf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float scalbn(float a, int b)
{
return scalbnf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float scalbln(float a, long int b)
{
return scalblnf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float exp2(float a)
{
return exp2f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float exp10(float a)
{
return exp10f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float expm1(float a)
{
return expm1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float log2(float a)
{
return log2f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float log1p(float a)
{
return log1pf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rsqrt(float a)
{
return rsqrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float acosh(float a)
{
return acoshf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float asinh(float a)
{
return asinhf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float atanh(float a)
{
return atanhf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float hypot(float a, float b)
{
return hypotf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cbrt(float a)
{
return cbrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rcbrt(float a)
{
return rcbrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float sinpi(float a)
{
return sinpif(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cospi(float a)
{
return cospif(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) void sincospi(float a, float *sptr, float *cptr)
{
sincospif(a, sptr, cptr);
}
static __inline__ __attribute__((host)) __attribute__((device)) void sincos(float a, float *sptr, float *cptr)
{
sincosf(a, sptr, cptr);
}
static __inline__ __attribute__((host)) __attribute__((device)) float j0(float a)
{
return j0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float j1(float a)
{
return j1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float jn(int n, float a)
{
return jnf(n, a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float y0(float a)
{
return y0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float y1(float a)
{
return y1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float yn(int n, float a)
{
return ynf(n, a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cyl_bessel_i0(float a)
{
return cyl_bessel_i0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cyl_bessel_i1(float a)
{
return cyl_bessel_i1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erf(float a)
{
return erff(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfinv(float a)
{
return erfinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfc(float a)
{
return erfcf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfcinv(float a)
{
return erfcinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float normcdfinv(float a)
{
return normcdfinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float normcdf(float a)
{
return normcdff(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfcx(float a)
{
return erfcxf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float lgamma(float a)
{
return lgammaf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float tgamma(float a)
{
return tgammaf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float copysign(float a, float b)
{
return copysignf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double copysign(double a, float b)
{
return copysign(a, (double)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float copysign(float a, double b)
{
return copysignf(a, (float)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float nextafter(float a, float b)
{
return nextafterf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float remainder(float a, float b)
{
return remainderf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float remquo(float a, float b, int *quo)
{
return remquof(a, b, quo);
}
static __inline__ __attribute__((host)) __attribute__((device)) float round(float a)
{
return roundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long int lround(float a)
{
return lroundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int llround(float a)
{
return llroundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float trunc(float a)
{
return truncf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rint(float a)
{
return rintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long int lrint(float a)
{
return lrintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int llrint(float a)
{
return llrintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float nearbyint(float a)
{
return nearbyintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fdim(float a, float b)
{
return fdimf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fma(float a, float b, float c)
{
return fmaf(a, b, c);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fmax(float a, float b)
{
return fmaxf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fmin(float a, float b)
{
return fminf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(unsigned int a, unsigned int b)
{
return umin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(int a, unsigned int b)
{
return umin((unsigned int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(unsigned int a, int b)
{
return umin(a, (unsigned int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int min(long long int a, long long int b)
{
return llmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(unsigned long long int a, unsigned long long int b)
{
return ullmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(long long int a, unsigned long long int b)
{
return ullmin((unsigned long long int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(unsigned long long int a, long long int b)
{
return ullmin(a, (unsigned long long int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float min(float a, float b)
{
return fminf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(double a, double b)
{
return fmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(float a, double b)
{
return fmin((double)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(double a, float b)
{
return fmin(a, (double)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(unsigned int a, unsigned int b)
{
return umax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(int a, unsigned int b)
{
return umax((unsigned int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(unsigned int a, int b)
{
return umax(a, (unsigned int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int max(long long int a, long long int b)
{
return llmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(unsigned long long int a, unsigned long long int b)
{
return ullmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(long long int a, unsigned long long int b)
{
return ullmax((unsigned long long int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(unsigned long long int a, long long int b)
{
return ullmax(a, (unsigned long long int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float max(float a, float b)
{
return fmaxf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(double a, double b)
{
return fmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(float a, double b)
{
return fmax((double)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(double a, float b)
{
return fmax(a, (double)b);
}
# 14070 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions_dbl_ptx3.h" 1
# 14071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 168 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 77 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h"
template<class T, int dim = 1>
struct __attribute__((device_builtin_surface_type)) surface : public hipSurfaceReference
{
__attribute__((host)) surface(void)
{
channelDesc = hipCreateChannelDesc<T>();
}
__attribute__((host)) surface(struct hipChannelFormatDesc desc)
{
channelDesc = desc;
}
};
template<int dim>
struct __attribute__((device_builtin_surface_type)) surface<void, dim> : public hipSurfaceReference
{
__attribute__((host)) surface(void)
{
channelDesc = hipCreateChannelDesc<void>();
}
};
# 78 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_texture_types.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_texture_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_texture_types.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/hip_texture_types.h"
template<class T, int texType = 0x01, enum hipTextureReadMode mode = hipReadModeElementType>
struct __attribute__((device_builtin_texture_type)) texture : public textureReference
{
__attribute__((host)) texture(int norm = 0,
enum hipTextureFilterMode fMode = hipFilterModePoint,
enum hipTextureAddressMode aMode = hipAddressModeClamp)
{
normalized = norm;
filterMode = fMode;
addressMode[0] = aMode;
addressMode[1] = aMode;
addressMode[2] = aMode;
channelDesc = hipCreateChannelDesc<T>();
sRGB = 0;
}
__attribute__((host)) texture(int norm,
enum hipTextureFilterMode fMode,
enum hipTextureAddressMode aMode,
struct hipChannelFormatDesc desc)
{
normalized = norm;
filterMode = fMode;
addressMode[0] = aMode;
addressMode[1] = aMode;
addressMode[2] = aMode;
channelDesc = desc;
sRGB = 0;
}
};
# 79 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern "C"
{
# 82 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __mulhi(int x, int y);
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __umulhi(unsigned int x, unsigned int y);
# 102 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __mul64hi(long long int x, long long int y);
# 112 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __umul64hi(unsigned long long int x, unsigned long long int y);
# 121 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int_as_float(int x);
# 130 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float_as_int(float x);
extern __attribute__((device)) __attribute__((device_builtin)) void __syncthreads(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __prof_trigger(int);
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence_block(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __trap(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __brkpt(int c = 0);
# 159 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __saturatef(float x);
# 228 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __sad(int x, int y, unsigned int z);
# 296 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __usad(unsigned int x, unsigned int y, unsigned int z);
# 306 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __mul24(int x, int y);
# 316 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __umul24(unsigned int x, unsigned int y);
# 329 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float fdividef(float x, float y);
# 404 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdividef(float x, float y);
extern __attribute__((device)) __attribute__((device_builtin)) double fdivide(double x, double y);
# 417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __sinf(float x) throw ();
# 429 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __cosf(float x) throw ();
# 443 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __tanf(float x) throw ();
# 458 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void __sincosf(float x, float *sptr, float *cptr) throw ();
# 508 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __expf(float x) throw ();
# 540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __exp10f(float x) throw ();
# 566 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __log2f(float x) throw ();
# 594 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __log10f(float x) throw ();
# 638 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __logf(float x) throw ();
# 681 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __powf(float x, float y) throw ();
# 690 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rn(float x);
# 699 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rz(float x);
# 708 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_ru(float);
# 717 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rd(float x);
# 726 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rn(float x);
# 735 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rz(float x);
# 744 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_ru(float x);
# 753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rd(float x);
# 762 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rn(int x);
# 771 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rz(int x);
# 780 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_ru(int x);
# 789 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rd(int x);
# 798 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rn(unsigned int x);
# 807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rz(unsigned int x);
# 816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_ru(unsigned int x);
# 825 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rd(unsigned int x);
# 834 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rn(float x);
# 843 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rz(float x);
# 852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_ru(float x);
# 861 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rd(float x);
# 870 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rn(float x);
# 879 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rz(float x);
# 888 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_ru(float x);
# 897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rd(float x);
# 906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rn(long long int x);
# 915 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rz(long long int x);
# 924 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_ru(long long int x);
# 933 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rd(long long int x);
# 942 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rn(unsigned long long int x);
# 951 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rz(unsigned long long int x);
# 960 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_ru(unsigned long long int x);
# 969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rd(unsigned long long int x);
# 978 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned short __float2half_rn(float x);
# 987 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __half2float(unsigned short x);
# 999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rn(float x, float y);
# 1011 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rz(float x, float y);
# 1023 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_ru(float x, float y);
# 1035 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rd(float x, float y);
# 1047 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rn(float x, float y);
# 1059 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rz(float x, float y);
# 1071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_ru(float x, float y);
# 1083 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rd(float x, float y);
# 1095 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rn(float x, float y);
# 1107 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rz(float x, float y);
# 1119 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_ru(float x, float y);
# 1131 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rd(float x, float y);
# 1284 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rn(float x, float y, float z);
# 1437 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rz(float x, float y, float z);
# 1590 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ru(float x, float y, float z);
# 1743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rd(float x, float y, float z);
# 1776 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rn(float x);
# 1809 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rz(float x);
# 1842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_ru(float x);
# 1875 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rd(float x);
# 1906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rn(float x);
# 1937 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rz(float x);
# 1968 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_ru(float x);
# 1999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rd(float x);
# 2038 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frsqrt_rn(float x);
# 2049 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rn(float x, float y);
# 2060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rz(float x, float y);
# 2071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_ru(float x, float y);
# 2082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rd(float x, float y);
# 2091 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __clz(int x);
# 2102 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __ffs(int x);
# 2111 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __popc(unsigned int x);
# 2120 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __brev(unsigned int x);
# 2129 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __clzll(long long int x);
# 2140 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __ffsll(long long int x);
# 2151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __popcll(unsigned long long int x);
# 2160 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __brevll(unsigned long long int x);
# 2184 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __byte_perm(unsigned int x, unsigned int y, unsigned int s);
# 2196 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __hadd(int, int);
# 2209 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __rhadd(int, int);
# 2221 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uhadd(unsigned int, unsigned int);
# 2234 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __urhadd(unsigned int, unsigned int);
# 2245 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rz(double);
# 2254 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rz(double);
# 2263 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rz(double);
# 2272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rz(double);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm0(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm1(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm2(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm3(void);
# 2294 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabs2(unsigned int a);
# 2305 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsss2(unsigned int a);
# 2316 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vadd2(unsigned int a, unsigned int b);
# 2327 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddss2 (unsigned int a, unsigned int b);
# 2337 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddus2 (unsigned int a, unsigned int b);
# 2348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgs2(unsigned int a, unsigned int b);
# 2359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgu2(unsigned int a, unsigned int b);
# 2370 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vhaddu2(unsigned int a, unsigned int b);
# 2381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpeq2(unsigned int a, unsigned int b);
# 2392 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpges2(unsigned int a, unsigned int b);
# 2403 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgeu2(unsigned int a, unsigned int b);
# 2414 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgts2(unsigned int a, unsigned int b);
# 2425 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgtu2(unsigned int a, unsigned int b);
# 2436 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmples2(unsigned int a, unsigned int b);
# 2448 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpleu2(unsigned int a, unsigned int b);
# 2459 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmplts2(unsigned int a, unsigned int b);
# 2470 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpltu2(unsigned int a, unsigned int b);
# 2481 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpne2(unsigned int a, unsigned int b);
# 2492 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffu2(unsigned int a, unsigned int b);
# 2503 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxs2(unsigned int a, unsigned int b);
# 2514 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxu2(unsigned int a, unsigned int b);
# 2525 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmins2(unsigned int a, unsigned int b);
# 2536 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vminu2(unsigned int a, unsigned int b);
# 2547 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vseteq2(unsigned int a, unsigned int b);
# 2558 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetges2(unsigned int a, unsigned int b);
# 2569 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgeu2(unsigned int a, unsigned int b);
# 2580 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgts2(unsigned int a, unsigned int b);
# 2591 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgtu2(unsigned int a, unsigned int b);
# 2602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetles2(unsigned int a, unsigned int b);
# 2613 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetleu2(unsigned int a, unsigned int b);
# 2624 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetlts2(unsigned int a, unsigned int b);
# 2635 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetltu2(unsigned int a, unsigned int b);
# 2646 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetne2(unsigned int a, unsigned int b);
# 2657 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsadu2(unsigned int a, unsigned int b);
# 2668 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsub2(unsigned int a, unsigned int b);
# 2679 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubss2 (unsigned int a, unsigned int b);
# 2690 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubus2 (unsigned int a, unsigned int b);
# 2700 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vneg2(unsigned int a);
# 2710 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vnegss2(unsigned int a);
# 2721 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffs2(unsigned int a, unsigned int b);
# 2732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsads2(unsigned int a, unsigned int b);
# 2742 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabs4(unsigned int a);
# 2753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsss4(unsigned int a);
# 2764 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vadd4(unsigned int a, unsigned int b);
# 2775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddss4 (unsigned int a, unsigned int b);
# 2785 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddus4 (unsigned int a, unsigned int b);
# 2796 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgs4(unsigned int a, unsigned int b);
# 2807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgu4(unsigned int a, unsigned int b);
# 2818 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vhaddu4(unsigned int a, unsigned int b);
# 2829 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpeq4(unsigned int a, unsigned int b);
# 2840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpges4(unsigned int a, unsigned int b);
# 2851 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgeu4(unsigned int a, unsigned int b);
# 2862 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgts4(unsigned int a, unsigned int b);
# 2873 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgtu4(unsigned int a, unsigned int b);
# 2884 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmples4(unsigned int a, unsigned int b);
# 2895 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpleu4(unsigned int a, unsigned int b);
# 2906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmplts4(unsigned int a, unsigned int b);
# 2917 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpltu4(unsigned int a, unsigned int b);
# 2928 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpne4(unsigned int a, unsigned int b);
# 2939 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffu4(unsigned int a, unsigned int b);
# 2950 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxs4(unsigned int a, unsigned int b);
# 2961 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxu4(unsigned int a, unsigned int b);
# 2972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmins4(unsigned int a, unsigned int b);
# 2983 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vminu4(unsigned int a, unsigned int b);
# 2994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vseteq4(unsigned int a, unsigned int b);
# 3005 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetles4(unsigned int a, unsigned int b);
# 3016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetleu4(unsigned int a, unsigned int b);
# 3027 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetlts4(unsigned int a, unsigned int b);
# 3038 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetltu4(unsigned int a, unsigned int b);
# 3049 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetges4(unsigned int a, unsigned int b);
# 3060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgeu4(unsigned int a, unsigned int b);
# 3071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgts4(unsigned int a, unsigned int b);
# 3082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgtu4(unsigned int a, unsigned int b);
# 3093 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetne4(unsigned int a, unsigned int b);
# 3104 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsadu4(unsigned int a, unsigned int b);
# 3115 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsub4(unsigned int a, unsigned int b);
# 3126 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubss4(unsigned int a, unsigned int b);
# 3137 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubus4(unsigned int a, unsigned int b);
# 3147 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vneg4(unsigned int a);
# 3157 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vnegss4(unsigned int a);
# 3168 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffs4(unsigned int a, unsigned int b);
# 3179 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsads4(unsigned int a, unsigned int b);
}
static __inline__ __attribute__((device)) int mulhi(int a, int b)
{
return __mulhi(a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(unsigned int a, unsigned int b)
{
return __umulhi(a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(int a, unsigned int b)
{
return __umulhi((unsigned int)a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(unsigned int a, int b)
{
return __umulhi(a, (unsigned int)b);
}
static __inline__ __attribute__((device)) long long int mul64hi(long long int a, long long int b)
{
return __mul64hi(a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(unsigned long long int a, unsigned long long int b)
{
return __umul64hi(a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(long long int a, unsigned long long int b)
{
return __umul64hi((unsigned long long int)a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(unsigned long long int a, long long int b)
{
return __umul64hi(a, (unsigned long long int)b);
}
static __inline__ __attribute__((device)) int float_as_int(float a)
{
return __float_as_int(a);
}
static __inline__ __attribute__((device)) float int_as_float(int a)
{
return __int_as_float(a);
}
static __inline__ __attribute__((device)) float saturate(float a)
{
return __saturatef(a);
}
static __inline__ __attribute__((device)) int mul24(int a, int b)
{
return __mul24(a, b);
}
static __inline__ __attribute__((device)) unsigned int umul24(unsigned int a, unsigned int b)
{
return __umul24(a, b);
}
static __inline__ __attribute__((device)) void trap(void)
{
__trap();
}
static __inline__ __attribute__((device)) void brkpt(int c = 0)
{
__brkpt(c);
}
static __inline__ __attribute__((device)) void syncthreads(void)
{
__syncthreads();
}
static __inline__ __attribute__((device)) void prof_trigger(int e)
{
if (e == 0) __prof_trigger( 0);
else if (e == 1) __prof_trigger( 1);
else if (e == 2) __prof_trigger( 2);
else if (e == 3) __prof_trigger( 3);
else if (e == 4) __prof_trigger( 4);
else if (e == 5) __prof_trigger( 5);
else if (e == 6) __prof_trigger( 6);
else if (e == 7) __prof_trigger( 7);
else if (e == 8) __prof_trigger( 8);
else if (e == 9) __prof_trigger( 9);
else if (e == 10) __prof_trigger(10);
else if (e == 11) __prof_trigger(11);
else if (e == 12) __prof_trigger(12);
else if (e == 13) __prof_trigger(13);
else if (e == 14) __prof_trigger(14);
else if (e == 15) __prof_trigger(15);
}
static __inline__ __attribute__((device)) void threadfence(bool global = true)
{
global ? __threadfence() : __threadfence_block();
}
static __inline__ __attribute__((device)) int float2int(float a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __float2int_rn(a) :
mode == cudaRoundPosInf ? __float2int_ru(a) :
mode == cudaRoundMinInf ? __float2int_rd(a) :
__float2int_rz(a);
}
static __inline__ __attribute__((device)) unsigned int float2uint(float a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __float2uint_rn(a) :
mode == cudaRoundPosInf ? __float2uint_ru(a) :
mode == cudaRoundMinInf ? __float2uint_rd(a) :
__float2uint_rz(a);
}
static __inline__ __attribute__((device)) float int2float(int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __int2float_rz(a) :
mode == cudaRoundPosInf ? __int2float_ru(a) :
mode == cudaRoundMinInf ? __int2float_rd(a) :
__int2float_rn(a);
}
static __inline__ __attribute__((device)) float uint2float(unsigned int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __uint2float_rz(a) :
mode == cudaRoundPosInf ? __uint2float_ru(a) :
mode == cudaRoundMinInf ? __uint2float_rd(a) :
__uint2float_rn(a);
}
# 9405 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicAdd(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicAdd(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicExch(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicExch(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) float __fAtomicExch(float *address, float val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicMin(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicMin(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicMax(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicMax(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicInc(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicDec(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicAnd(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicAnd(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicOr(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicOr(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicXor(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicXor(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicCAS(int *address, int compare, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicCAS(unsigned int *address, unsigned int compare, unsigned int val);
}
static __inline__ __attribute__((device)) int atomicAdd(int *address, int val)
{
return __iAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicAdd(unsigned int *address, unsigned int val)
{
return __uAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) int atomicSub(int *address, int val)
{
return __iAtomicAdd(address, (unsigned int)-(int)val);
}
static __inline__ __attribute__((device)) unsigned int atomicSub(unsigned int *address, unsigned int val)
{
return __uAtomicAdd(address, (unsigned int)-(int)val);
}
static __inline__ __attribute__((device)) int atomicExch(int *address, int val)
{
return __iAtomicExch(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicExch(unsigned int *address, unsigned int val)
{
return __uAtomicExch(address, val);
}
static __inline__ __attribute__((device)) float atomicExch(float *address, float val)
{
return __fAtomicExch(address, val);
}
static __inline__ __attribute__((device)) int atomicMin(int *address, int val)
{
return __iAtomicMin(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicMin(unsigned int *address, unsigned int val)
{
return __uAtomicMin(address, val);
}
static __inline__ __attribute__((device)) int atomicMax(int *address, int val)
{
return __iAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicMax(unsigned int *address, unsigned int val)
{
return __uAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicInc(unsigned int *address, unsigned int val)
{
return __uAtomicInc(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicDec(unsigned int *address, unsigned int val)
{
return __uAtomicDec(address, val);
}
static __inline__ __attribute__((device)) int atomicAnd(int *address, int val)
{
return __iAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicAnd(unsigned int *address, unsigned int val)
{
return __uAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) int atomicOr(int *address, int val)
{
return __iAtomicOr(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicOr(unsigned int *address, unsigned int val)
{
return __uAtomicOr(address, val);
}
static __inline__ __attribute__((device)) int atomicXor(int *address, int val)
{
return __iAtomicXor(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicXor(unsigned int *address, unsigned int val)
{
return __uAtomicXor(address, val);
}
static __inline__ __attribute__((device)) int atomicCAS(int *address, int compare, int val)
{
return __iAtomicCAS(address, compare, val);
}
static __inline__ __attribute__((device)) unsigned int atomicCAS(unsigned int *address, unsigned int compare, unsigned int val)
{
return __uAtomicCAS(address, compare, val);
}
# 9406 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicAdd(unsigned long long int *address, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicExch(unsigned long long int *address, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicCAS(unsigned long long int *address, unsigned long long int compare, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __any(int cond);
extern __attribute__((device)) __attribute__((device_builtin)) int __all(int cond);
}
static __inline__ __attribute__((device)) unsigned long long int atomicAdd(unsigned long long int *address, unsigned long long int val)
{
return __ullAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) unsigned long long int atomicExch(unsigned long long int *address, unsigned long long int val)
{
return __ullAtomicExch(address, val);
}
static __inline__ __attribute__((device)) unsigned long long int atomicCAS(unsigned long long int *address, unsigned long long int compare, unsigned long long int val)
{
return __ullAtomicCAS(address, compare, val);
}
static __inline__ __attribute__((device)) bool any(bool cond)
{
return (bool)__any((int)cond);
}
static __inline__ __attribute__((device)) bool all(bool cond)
{
return (bool)__all((int)cond);
}
# 9407 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h" 1
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h" 2
extern "C"
{
# 83 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double_as_longlong(double x);
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __longlong_as_double(long long int x);
# 249 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rn(double x, double y, double z);
# 406 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rz(double x, double y, double z);
# 563 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_ru(double x, double y, double z);
# 720 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rd(double x, double y, double z);
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rn(double x, double y);
# 744 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rz(double x, double y);
# 756 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_ru(double x, double y);
# 768 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rd(double x, double y);
# 780 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rn(double x, double y);
# 792 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rz(double x, double y);
# 804 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_ru(double x, double y);
# 816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rd(double x, double y);
# 828 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rn(double x, double y);
# 840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rz(double x, double y);
# 852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_ru(double x, double y);
# 864 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rd(double x, double y);
# 873 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rn(double x);
# 882 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rz(double x);
# 891 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_ru(double x);
# 900 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rd(double x);
# 909 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rn(double x);
# 918 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_ru(double x);
# 927 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rd(double x);
# 936 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rn(double x);
# 945 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_ru(double x);
# 954 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rd(double x);
# 963 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rn(double x);
# 972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_ru(double x);
# 981 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rd(double x);
# 990 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rn(double x);
# 999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_ru(double x);
# 1008 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rd(double x);
extern __attribute__((device)) __attribute__((device_builtin)) double __int2double_rn(int x);
extern __attribute__((device)) __attribute__((device_builtin)) double __uint2double_rn(unsigned int x);
# 1033 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rn(long long int x);
# 1042 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rz(long long int x);
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_ru(long long int x);
# 1060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rd(long long int x);
# 1069 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rn(unsigned long long int x);
# 1078 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rz(unsigned long long int x);
# 1087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_ru(unsigned long long int x);
# 1096 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rd(unsigned long long int x);
# 1105 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2hiint(double x);
# 1114 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2loint(double x);
# 1124 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __hiloint2double(int hi, int lo);
}
static __inline__ __attribute__((device)) double fma(double a, double b, double c, enum cudaRoundMode mode)
{
return mode == cudaRoundZero ? __fma_rz(a, b, c) :
mode == cudaRoundPosInf ? __fma_ru(a, b, c) :
mode == cudaRoundMinInf ? __fma_rd(a, b, c) :
__fma_rn(a, b, c);
}
static __inline__ __attribute__((device)) double dmul(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dmul_rz(a, b) :
mode == cudaRoundPosInf ? __dmul_ru(a, b) :
mode == cudaRoundMinInf ? __dmul_rd(a, b) :
__dmul_rn(a, b);
}
static __inline__ __attribute__((device)) double dadd(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dadd_rz(a, b) :
mode == cudaRoundPosInf ? __dadd_ru(a, b) :
mode == cudaRoundMinInf ? __dadd_rd(a, b) :
__dadd_rn(a, b);
}
static __inline__ __attribute__((device)) double dsub(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dsub_rz(a, b) :
mode == cudaRoundPosInf ? __dsub_ru(a, b) :
mode == cudaRoundMinInf ? __dsub_rd(a, b) :
__dsub_rn(a, b);
}
static __inline__ __attribute__((device)) int double2int(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2int_rn(a) :
mode == cudaRoundPosInf ? __double2int_ru(a) :
mode == cudaRoundMinInf ? __double2int_rd(a) :
__double2int_rz(a);
}
static __inline__ __attribute__((device)) unsigned int double2uint(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2uint_rn(a) :
mode == cudaRoundPosInf ? __double2uint_ru(a) :
mode == cudaRoundMinInf ? __double2uint_rd(a) :
__double2uint_rz(a);
}
static __inline__ __attribute__((device)) long long int double2ll(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2ll_rn(a) :
mode == cudaRoundPosInf ? __double2ll_ru(a) :
mode == cudaRoundMinInf ? __double2ll_rd(a) :
__double2ll_rz(a);
}
static __inline__ __attribute__((device)) unsigned long long int double2ull(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2ull_rn(a) :
mode == cudaRoundPosInf ? __double2ull_ru(a) :
mode == cudaRoundMinInf ? __double2ull_rd(a) :
__double2ull_rz(a);
}
static __inline__ __attribute__((device)) double ll2double(long long int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __ll2double_rz(a) :
mode == cudaRoundPosInf ? __ll2double_ru(a) :
mode == cudaRoundMinInf ? __ll2double_rd(a) :
__ll2double_rn(a);
}
static __inline__ __attribute__((device)) double ull2double(unsigned long long int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __ull2double_rz(a) :
mode == cudaRoundPosInf ? __ull2double_ru(a) :
mode == cudaRoundMinInf ? __ull2double_rd(a) :
__ull2double_rn(a);
}
static __inline__ __attribute__((device)) double int2double(int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
static __inline__ __attribute__((device)) double uint2double(unsigned int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
static __inline__ __attribute__((device)) double float2double(float a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
# 9408 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) float __fAtomicAdd(float *address, float val);
}
static __inline__ __attribute__((device)) float atomicAdd(float *address, float val)
{
return __fAtomicAdd(address, val);
}
# 9409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) long long __illAtomicMin(long long *address, long long val);
extern __attribute__((device)) __attribute__((device_builtin)) long long __illAtomicMax(long long *address, long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicMin(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicMax(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicAnd(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicOr (unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicXor(unsigned long long *address, unsigned long long val);
}
static __inline__ __attribute__((device)) long long atomicMin(long long *address, long long val)
{
return __illAtomicMin(address, val);
}
static __inline__ __attribute__((device)) long long atomicMax(long long *address, long long val)
{
return __illAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicMin(unsigned long long *address, unsigned long long val)
{
return __ullAtomicMin(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicMax(unsigned long long *address, unsigned long long val)
{
return __ullAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicAnd(unsigned long long *address, unsigned long long val)
{
return __ullAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicOr(unsigned long long *address, unsigned long long val)
{
return __ullAtomicOr(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicXor(unsigned long long *address, unsigned long long val)
{
return __ullAtomicXor(address, val);
}
# 9410 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_35_atomic_functions.h" 1
# 9411 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence_system(void);
# 81 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rn(double x, double y);
# 93 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rz(double x, double y);
# 105 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_ru(double x, double y);
# 117 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rd(double x, double y);
# 151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rn(double x);
# 185 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rz(double x);
# 219 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_ru(double x);
# 253 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rd(double x);
# 285 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rn(double x);
# 317 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rz(double x);
# 349 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_ru(double x);
# 381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rd(double x);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __ballot(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_count(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_and(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_or(int);
extern __attribute__((device)) __attribute__((device_builtin)) long long int clock64(void);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rn(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rz(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_ru(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rd(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) double __rcp64h(double);
}
static __inline__ __attribute__((device)) unsigned int ballot(bool pred)
{
return __ballot((int)pred);
}
static __inline__ __attribute__((device)) int syncthreads_count(bool pred)
{
return __syncthreads_count((int)pred);
}
static __inline__ __attribute__((device)) bool syncthreads_and(bool pred)
{
return (bool)__syncthreads_and((int)pred);
}
static __inline__ __attribute__((device)) bool syncthreads_or(bool pred)
{
return (bool)__syncthreads_or((int)pred);
}
static __inline__ __attribute__((device)) unsigned int __isGlobal(const void *ptr)
{
unsigned int ret;
asm volatile ("{ \n\t"
" .reg .pred p; \n\t"
" isspacep.global p, %1; \n\t"
" selp.u32 %0, 1, 0, p; \n\t"
"} \n\t" : "=r"(ret) : "l"(ptr));
return ret;
}
# 9412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h" 2
extern "C"
{
}
# 93 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h"
static __attribute__((device)) __inline__ int __shfl(int var, int srcLane, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.idx.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(srcLane), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_up(int var, unsigned int delta, int width=32) {
int ret, c;
c = (32 -width) << 8;
asm volatile ("shfl.up.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_down(int var, unsigned int delta, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.down.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_xor(int var, int laneMask, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.bfly.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(laneMask), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl(float var, int srcLane, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.idx.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(srcLane), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_up(float var, unsigned int delta, int width=32) {
float ret;
int c;
c = (32 -width) << 8;
asm volatile ("shfl.up.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_down(float var, unsigned int delta, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.down.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_xor(float var, int laneMask, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.bfly.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(laneMask), "r"(c));
return ret;
}
# 9413 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h" 2
extern "C"
{
}
# 91 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
static __attribute__((device)) __inline__ char __ldg(const char *ptr) { unsigned int ret; asm volatile ("ld.global.nc.s8 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (char)ret; }
static __attribute__((device)) __inline__ short __ldg(const short *ptr) { unsigned short ret; asm volatile ("ld.global.nc.s16 %0, [%1];" : "=h"(ret) : "l" (ptr)); return (short)ret; }
static __attribute__((device)) __inline__ int __ldg(const int *ptr) { unsigned int ret; asm volatile ("ld.global.nc.s32 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (int)ret; }
static __attribute__((device)) __inline__ long long __ldg(const long long *ptr) { unsigned long long ret; asm volatile ("ld.global.nc.s64 %0, [%1];" : "=l"(ret) : "l" (ptr)); return (long long)ret; }
static __attribute__((device)) __inline__ char2 __ldg(const char2 *ptr) { char2 ret; int2 tmp; asm volatile ("ld.global.nc.v2.s8 {%0,%1}, [%2];" : "=r"(tmp.x), "=r"(tmp.y) : "l" (ptr)); ret.x = (char)tmp.x; ret.y = (char)tmp.y; return ret; }
static __attribute__((device)) __inline__ char4 __ldg(const char4 *ptr) { char4 ret; int4 tmp; asm volatile ("ld.global.nc.v4.s8 {%0,%1,%2,%3}, [%4];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l" (ptr)); ret.x = (char)tmp.x; ret.y = (char)tmp.y; ret.z = (char)tmp.z; ret.w = (char)tmp.w; return ret; }
static __attribute__((device)) __inline__ short2 __ldg(const short2 *ptr) { short2 ret; asm volatile ("ld.global.nc.v2.s16 {%0,%1}, [%2];" : "=h"(ret.x), "=h"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ short4 __ldg(const short4 *ptr) { short4 ret; asm volatile ("ld.global.nc.v4.s16 {%0,%1,%2,%3}, [%4];" : "=h"(ret.x), "=h"(ret.y), "=h"(ret.z), "=h"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ int2 __ldg(const int2 *ptr) { int2 ret; asm volatile ("ld.global.nc.v2.s32 {%0,%1}, [%2];" : "=r"(ret.x), "=r"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ int4 __ldg(const int4 *ptr) { int4 ret; asm volatile ("ld.global.nc.v4.s32 {%0,%1,%2,%3}, [%4];" : "=r"(ret.x), "=r"(ret.y), "=r"(ret.z), "=r"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ longlong2 __ldg(const longlong2 *ptr) { longlong2 ret; asm volatile ("ld.global.nc.v2.s64 %0, [%1];" : "=l"(ret.x), "=l"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned char __ldg(const unsigned char *ptr) { unsigned int ret; asm volatile ("ld.global.nc.u8 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (unsigned char)ret; }
static __attribute__((device)) __inline__ unsigned short __ldg(const unsigned short *ptr) { unsigned short ret; asm volatile ("ld.global.nc.u16 %0, [%1];" : "=h"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned int __ldg(const unsigned int *ptr) { unsigned int ret; asm volatile ("ld.global.nc.u32 %0, [%1];" : "=r"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned long long __ldg(const unsigned long long *ptr) { unsigned long long ret; asm volatile ("ld.global.nc.u64 %0, [%1];" : "=l"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uchar2 __ldg(const uchar2 *ptr) { uchar2 ret; uint2 tmp; asm volatile ("ld.global.nc.v2.u8 {%0,%1}, [%2];" : "=r"(tmp.x), "=r"(tmp.y) : "l" (ptr)); ret.x = (unsigned char)tmp.x; ret.y = (unsigned char)tmp.y; return ret; }
static __attribute__((device)) __inline__ uchar4 __ldg(const uchar4 *ptr) { uchar4 ret; uint4 tmp; asm volatile ("ld.global.nc.v4.u8 {%0,%1,%2,%3}, [%4];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l" (ptr)); ret.x = (unsigned char)tmp.x; ret.y = (unsigned char)tmp.y; ret.z = (unsigned char)tmp.z; ret.w = (unsigned char)tmp.w; return ret; }
static __attribute__((device)) __inline__ ushort2 __ldg(const ushort2 *ptr) { ushort2 ret; asm volatile ("ld.global.nc.v2.u16 {%0,%1}, [%2];" : "=h"(ret.x), "=h"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ ushort4 __ldg(const ushort4 *ptr) { ushort4 ret; asm volatile ("ld.global.nc.v4.u16 {%0,%1,%2,%3}, [%4];" : "=h"(ret.x), "=h"(ret.y), "=h"(ret.z), "=h"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uint2 __ldg(const uint2 *ptr) { uint2 ret; asm volatile ("ld.global.nc.v2.u32 {%0,%1}, [%2];" : "=r"(ret.x), "=r"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uint4 __ldg(const uint4 *ptr) { uint4 ret; asm volatile ("ld.global.nc.v4.u32 {%0,%1,%2,%3}, [%4];" : "=r"(ret.x), "=r"(ret.y), "=r"(ret.z), "=r"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ ulonglong2 __ldg(const ulonglong2 *ptr) { ulonglong2 ret; asm volatile ("ld.global.nc.v2.u64 %0, [%1];" : "=l"(ret.x), "=l"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float __ldg(const float *ptr) { float ret; asm volatile ("ld.global.nc.f32 %0, [%1];" : "=f"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ double __ldg(const double *ptr) { double ret; asm volatile ("ld.global.nc.f64 %0, [%1];" : "=d"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float2 __ldg(const float2 *ptr) { float2 ret; asm volatile ("ld.global.nc.v2.f32 {%0,%1}, [%2];" : "=f"(ret.x), "=f"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float4 __ldg(const float4 *ptr) { float4 ret; asm volatile ("ld.global.nc.v4.f32 {%0,%1,%2,%3}, [%4];" : "=f"(ret.x), "=f"(ret.y), "=f"(ret.z), "=f"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ double2 __ldg(const double2 *ptr) { double2 ret; asm volatile ("ld.global.nc.v2.f64 {%0,%1}, [%2];" : "=d"(ret.x), "=d"(ret.y) : "l" (ptr)); return ret; }
# 130 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
static __attribute__((device)) inline unsigned int __funnelshift_l(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_lc(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.l.clamp.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_r(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_rc(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.r.clamp.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
# 9414 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_35_intrinsics.h" 1
# 9415 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf1Dreadc1(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf1Dreadc2(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf1Dreadc4(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf1Dreads1(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf1Dreads2(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf1Dreads4(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf1Dreadu1(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf1Dreadu2(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf1Dreadu4(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf1Dreadl1(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf1Dreadl2(surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
# 99 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(T *res, surface<void, 0x01> surf, int x, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surf1Dreads1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads1(surf, x, hipBoundaryModeClamp) : __surf1Dreads1(surf, x, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surf1Dreadu2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu2(surf, x, hipBoundaryModeClamp) : __surf1Dreadu2(surf, x, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surf1Dreadu4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu4(surf, x, hipBoundaryModeClamp) : __surf1Dreadu4(surf, x, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surf1Dread(&tmp, surf, x, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(T *res, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surf1Dread<T>(surf, x, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadc1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc1(surf, x, hipBoundaryModeClamp) : __surf1Dreadc1(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadc2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc2(surf, x, hipBoundaryModeClamp) : __surf1Dreadc2(surf, x, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadc2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc2(surf, x, hipBoundaryModeClamp) : __surf1Dreadc2(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadc4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc4(surf, x, hipBoundaryModeClamp) : __surf1Dreadc4(surf, x, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadc4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadc4(surf, x, hipBoundaryModeClamp) : __surf1Dreadc4(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surf1Dreads1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads1(surf, x, hipBoundaryModeClamp) : __surf1Dreads1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreads1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads1(surf, x, hipBoundaryModeClamp) : __surf1Dreads1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surf1Dreads1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads1(surf, x, hipBoundaryModeClamp) : __surf1Dreads1(surf, x, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreads1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads1(surf, x, hipBoundaryModeClamp) : __surf1Dreads1(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreads2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads2(surf, x, hipBoundaryModeClamp) : __surf1Dreads2(surf, x, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreads2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads2(surf, x, hipBoundaryModeClamp) : __surf1Dreads2(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreads4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads4(surf, x, hipBoundaryModeClamp) : __surf1Dreads4(surf, x, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreads4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreads4(surf, x, hipBoundaryModeClamp) : __surf1Dreads4(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadu2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu2(surf, x, hipBoundaryModeClamp) : __surf1Dreadu2(surf, x, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadu2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu2(surf, x, hipBoundaryModeClamp) : __surf1Dreadu2(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadu4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu4(surf, x, hipBoundaryModeClamp) : __surf1Dreadu4(surf, x, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadu4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu4(surf, x, hipBoundaryModeClamp) : __surf1Dreadu4(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surf1Dreadl1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl1(surf, x, hipBoundaryModeClamp) : __surf1Dreadl1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadl1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl1(surf, x, hipBoundaryModeClamp) : __surf1Dreadl1(surf, x, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surf1Dreadl1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl1(surf, x, hipBoundaryModeClamp) : __surf1Dreadl1(surf, x, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadl1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl1(surf, x, hipBoundaryModeClamp) : __surf1Dreadl1(surf, x, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadl2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl2(surf, x, hipBoundaryModeClamp) : __surf1Dreadl2(surf, x, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1Dreadl2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadl2(surf, x, hipBoundaryModeClamp) : __surf1Dreadl2(surf, x, hipBoundaryModeTrap ));
}
# 386 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surf1Dreadu1(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu1(surf, x, hipBoundaryModeClamp) : __surf1Dreadu1(surf, x, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadu2(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu2(surf, x, hipBoundaryModeClamp) : __surf1Dreadu2(surf, x, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf1Dread(surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf1Dreadu4(surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dreadu4(surf, x, hipBoundaryModeClamp) : __surf1Dreadu4(surf, x, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 421 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf2Dreadc1(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf2Dreadc2(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf2Dreadc4(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf2Dreads1(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf2Dreads2(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf2Dreads4(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf2Dreadu1(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf2Dreadu2(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf2Dreadu4(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf2Dreadl1(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf2Dreadl2(surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
# 447 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(T *res, surface<void, 0x02> surf, int x, int y, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surf2Dreads1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads1(surf, x, y, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surf2Dread(&tmp, surf, x, y, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(T *res, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surf2Dread<T>(surf, x, y, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadc2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc2(surf, x, y, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadc2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc2(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadc4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc4(surf, x, y, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadc4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadc4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadc4(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surf2Dreads1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreads1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surf2Dreads1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads1(surf, x, y, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreads1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads1(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreads2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads2(surf, x, y, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreads2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads2(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreads4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads4(surf, x, y, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreads4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreads4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreads4(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadl2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl2(surf, x, y, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2Dreadl2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadl2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadl2(surf, x, y, hipBoundaryModeTrap ));
}
# 734 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, hipBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 769 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf3Dreadc1(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf3Dreadc2(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf3Dreadc4(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf3Dreads1(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf3Dreads2(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf3Dreads4(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf3Dreadu1(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf3Dreadu2(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf3Dreadu4(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf3Dreadl1(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf3Dreadl2(surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
# 795 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(T *res, surface<void, 0x03> surf, int x, int y, int z, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surf3Dread(&tmp, surf, x, y, z, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(T *res, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surf3Dread<T>(surf, x, y, z, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadc2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc2(surf, x, y, z, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadc2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc2(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadc4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc4(surf, x, y, z, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadc4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadc4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadc4(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreads2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads2(surf, x, y, z, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreads2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads2(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreads4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads4(surf, x, y, z, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreads4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreads4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreads4(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadl2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl2(surf, x, y, z, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf3Dreadl2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadl2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadl2(surf, x, y, z, hipBoundaryModeTrap ));
}
# 1082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, hipBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1117 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf1DLayeredreadc1(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf1DLayeredreadc2(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf1DLayeredreadc4(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf1DLayeredreads1(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf1DLayeredreads2(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf1DLayeredreads4(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf1DLayeredreadu1(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf1DLayeredreadu2(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf1DLayeredreadu4(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf1DLayeredreadl1(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf1DLayeredreadl2(surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
# 1143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(T *res, surface<void, 0xF1> surf, int x, int layer, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surf1DLayeredread(&tmp, surf, x, layer, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(T *res, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surf1DLayeredread<T>(surf, x, layer, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc2(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadc4(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads2(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreads4(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadl2(surf, x, layer, hipBoundaryModeTrap ));
}
# 1430 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1465 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf2DLayeredreadc1(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf2DLayeredreadc2(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf2DLayeredreadc4(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf2DLayeredreads1(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf2DLayeredreads2(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf2DLayeredreads4(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf2DLayeredreadu1(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf2DLayeredreadu2(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf2DLayeredreadu4(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf2DLayeredreadl1(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf2DLayeredreadl2(surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
# 1491 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(T *res, surface<void, 0xF2> surf, int x, int y, int layer, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surf2DLayeredread(&tmp, surf, x, y, layer, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(T *res, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surf2DLayeredread<T>(surf, x, y, layer, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc2(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadc4(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads2(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreads4(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadl2(surf, x, y, layer, hipBoundaryModeTrap ));
}
# 1778 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1813 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surfCubemapreadc1(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surfCubemapreadc2(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surfCubemapreadc4(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surfCubemapreads1(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surfCubemapreads2(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surfCubemapreads4(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surfCubemapreadu1(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surfCubemapreadu2(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surfCubemapreadu4(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surfCubemapreadl1(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surfCubemapreadl2(surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
# 1839 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(T *res, surface<void, 0x0C> surf, int x, int y, int face, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surfCubemapread(&tmp, surf, x, y, face, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(T *res, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surfCubemapread<T>(surf, x, y, face, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc2(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadc4(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreads2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads2(surf, x, y, face, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreads2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads2(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreads4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads4(surf, x, y, face, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreads4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreads4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreads4(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadl2(surf, x, y, face, hipBoundaryModeTrap ));
}
# 2126 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 2161 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surfCubemapLayeredreadc1(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surfCubemapLayeredreadc2(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surfCubemapLayeredreadc4(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surfCubemapLayeredreads1(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surfCubemapLayeredreads2(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surfCubemapLayeredreads4(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surfCubemapLayeredreadu1(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surfCubemapLayeredreadu2(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surfCubemapLayeredreadu4(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surfCubemapLayeredreadl1(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surfCubemapLayeredreadl2(surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
# 2188 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(T *res, surface<void, 0xFC> surf, int x, int y, int layerFace, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
T tmp;
surfCubemapLayeredread(&tmp, surf, x, y, layerFace, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(T *res, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
*res = surfCubemapLayeredread<T>(surf, x, y, layerFace, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return (char)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return (signed char)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc2(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadc4(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return (short)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads2(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreads4(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return (int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return (long long int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadl2(surf, x, y, layerFace, hipBoundaryModeTrap ));
}
# 2475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, hipBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == hipBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, hipBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 2511 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec1( uchar1 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec2( uchar2 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec4( uchar4 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites1( ushort1 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites2( ushort2 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites4( ushort4 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu1( uint1 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu2( uint2 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu4( uint4 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritel1(ulonglong1 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritel2(ulonglong2 val, surface<void, 0x01> t, int x, enum hipSurfaceBoundaryMode mode);
# 2537 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(T val, surface<void, 0x01> surf, int x, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surf1Dwritec1(tmp.c1, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(tmp.c1, surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(tmp.c1, surf, x, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surf1Dwrites1(tmp.s1, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites1(tmp.s1, surf, x, hipBoundaryModeClamp) : __surf1Dwrites1(tmp.s1, surf, x, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(tmp.u1, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(tmp.u1, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(tmp.u1, surf, x, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surf1Dwriteu2(tmp.u2, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu2(tmp.u2, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu2(tmp.u2, surf, x, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surf1Dwriteu4(tmp.u4, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu4(tmp.u4, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu4(tmp.u4, surf, x, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(T val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surf1Dwrite(val, surf, x, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(signed char val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned char val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec1(make_uchar1(val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1(val), surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(make_uchar1(val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec1(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec1(val, surf, x, hipBoundaryModeClamp) : __surf1Dwritec1(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, hipBoundaryModeClamp) : __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec2(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec2(val, surf, x, hipBoundaryModeClamp) : __surf1Dwritec2(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, hipBoundaryModeClamp) : __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritec4(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritec4(val, surf, x, hipBoundaryModeClamp) : __surf1Dwritec4(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, hipBoundaryModeClamp) : __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned short val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites1(make_ushort1(val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1(val), surf, x, hipBoundaryModeClamp) : __surf1Dwrites1(make_ushort1(val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, hipBoundaryModeClamp) : __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites1(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites1(val, surf, x, hipBoundaryModeClamp) : __surf1Dwrites1(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, hipBoundaryModeClamp) : __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites2(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites2(val, surf, x, hipBoundaryModeClamp) : __surf1Dwrites2(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, hipBoundaryModeClamp) : __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwrites4(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwrites4(val, surf, x, hipBoundaryModeClamp) : __surf1Dwrites4(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned int val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(make_uint1(val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1(val), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(make_uint1(val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(val, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu2(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu2(val, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu2(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu4(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu4(val, surf, x, hipBoundaryModeClamp) : __surf1Dwriteu4(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(long long int val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, hipBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned long long int val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1(val), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1(val), surf, x, hipBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1(val), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, hipBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel1(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel1(val, surf, x, hipBoundaryModeClamp) : __surf1Dwritel1(val, surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, hipBoundaryModeClamp) : __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwritel2(val, surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwritel2(val, surf, x, hipBoundaryModeClamp) : __surf1Dwritel2(val, surf, x, hipBoundaryModeTrap ));
}
# 2765 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float1 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float2 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float4 val, surface<void, 0x01> surf, int x, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, hipBoundaryModeClamp) : __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, hipBoundaryModeTrap ));
}
# 2793 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec1( uchar1 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec2( uchar2 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec4( uchar4 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites1( ushort1 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites2( ushort2 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites4( ushort4 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu1( uint1 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu2( uint2 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu4( uint4 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritel1(ulonglong1 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritel2(ulonglong2 val, surface<void, 0x02> t, int x, int y, enum hipSurfaceBoundaryMode mode);
# 2819 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(T val, surface<void, 0x02> surf, int x, int y, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surf2Dwritec1(tmp.c1, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(tmp.c1, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(tmp.c1, surf, x, y, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surf2Dwrites1(tmp.s1, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites1(tmp.s1, surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites1(tmp.s1, surf, x, y, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(tmp.u1, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(tmp.u1, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(tmp.u1, surf, x, y, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surf2Dwriteu2(tmp.u2, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu2(tmp.u2, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu2(tmp.u2, surf, x, y, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surf2Dwriteu4(tmp.u4, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu4(tmp.u4, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu4(tmp.u4, surf, x, y, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(T val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surf2Dwrite(val, surf, x, y, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(signed char val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned char val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec1(make_uchar1(val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1(val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(make_uchar1(val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec1(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec1(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec1(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec2(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec2(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec2(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritec4(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritec4(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritec4(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned short val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites1(make_ushort1(val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1(val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites1(make_ushort1(val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites1(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites1(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites1(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites2(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites2(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites2(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwrites4(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwrites4(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwrites4(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned int val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(make_uint1(val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1(val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(make_uint1(val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu2(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu2(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu2(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu4(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu4(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu4(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(long long int val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned long long int val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1(val), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1(val), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1(val), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel1(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel1(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel1(val, surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwritel2(val, surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwritel2(val, surf, x, y, hipBoundaryModeClamp) : __surf2Dwritel2(val, surf, x, y, hipBoundaryModeTrap ));
}
# 3047 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float1 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float2 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float4 val, surface<void, 0x02> surf, int x, int y, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, hipBoundaryModeClamp) : __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, hipBoundaryModeTrap ));
}
# 3075 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec1( uchar1 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec2( uchar2 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec4( uchar4 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites1( ushort1 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites2( ushort2 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites4( ushort4 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu1( uint1 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu2( uint2 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu4( uint4 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritel1(ulonglong1 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritel2(ulonglong2 val, surface<void, 0x03> t, int x, int y, int z, enum hipSurfaceBoundaryMode mode);
# 3101 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(T val, surface<void, 0x03> surf, int x, int y, int z, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surf3Dwritec1(tmp.c1, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(tmp.c1, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(tmp.c1, surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surf3Dwrites1(tmp.s1, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites1(tmp.s1, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites1(tmp.s1, surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(tmp.u1, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(tmp.u1, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(tmp.u1, surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surf3Dwriteu2(tmp.u2, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu2(tmp.u2, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu2(tmp.u2, surf, x, y, z, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surf3Dwriteu4(tmp.u4, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu4(tmp.u4, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu4(tmp.u4, surf, x, y, z, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(T val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surf3Dwrite(val, surf, x, y, z, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(signed char val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned char val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec1(make_uchar1(val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1(val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(make_uchar1(val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec1(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec1(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec1(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec2(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec2(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec2(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritec4(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritec4(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritec4(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned short val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites1(make_ushort1(val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1(val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites1(make_ushort1(val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites1(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites1(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites1(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites2(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites2(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites2(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwrites4(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwrites4(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwrites4(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned int val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(make_uint1(val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1(val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(make_uint1(val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu2(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu2(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu2(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu4(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu4(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu4(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(long long int val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned long long int val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel1(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel1(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel1(val, surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwritel2(val, surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwritel2(val, surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwritel2(val, surf, x, y, z, hipBoundaryModeTrap ));
}
# 3329 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float1 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float2 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float4 val, surface<void, 0x03> surf, int x, int y, int z, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, hipBoundaryModeClamp) : __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, hipBoundaryModeTrap ));
}
# 3357 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec1( uchar1 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec2( uchar2 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec4( uchar4 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites1( ushort1 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites2( ushort2 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites4( ushort4 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu1( uint1 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu2( uint2 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu4( uint4 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritel1(ulonglong1 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritel2(ulonglong2 val, surface<void, 0xF1> t, int x, int layer, enum hipSurfaceBoundaryMode mode);
# 3383 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(T val, surface<void, 0xF1> surf, int x, int layer, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(tmp.c1, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(tmp.c1, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(tmp.c1, surf, x, layer, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites1(tmp.s1, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites1(tmp.s1, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites1(tmp.s1, surf, x, layer, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(T val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surf1DLayeredwrite(val, surf, x, layer, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(signed char val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned char val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec1(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec1(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec1(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec2(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec2(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec2(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritec4(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritec4(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritec4(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned short val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites1(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites1(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites1(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites2(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites2(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites2(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwrites4(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwrites4(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwrites4(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned int val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu2(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu2(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu2(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu4(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu4(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu4(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(long long int val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned long long int val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel1(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel1(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel1(val, surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwritel2(val, surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwritel2(val, surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwritel2(val, surf, x, layer, hipBoundaryModeTrap ));
}
# 3611 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float1 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float2 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float4 val, surface<void, 0xF1> surf, int x, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, hipBoundaryModeClamp) : __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, hipBoundaryModeTrap ));
}
# 3639 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec1( uchar1 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec2( uchar2 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec4( uchar4 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites1( ushort1 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites2( ushort2 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites4( ushort4 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu1( uint1 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu2( uint2 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu4( uint4 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritel1(ulonglong1 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritel2(ulonglong2 val, surface<void, 0xF2> t, int x, int y, int layer, enum hipSurfaceBoundaryMode mode);
# 3665 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(T val, surface<void, 0xF2> surf, int x, int y, int layer, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(T val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surf2DLayeredwrite(val, surf, x, y, layer, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(signed char val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned char val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec1(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec1(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec1(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec2(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec2(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec2(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritec4(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritec4(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritec4(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned short val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites1(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites1(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites1(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites2(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites2(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites2(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwrites4(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwrites4(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwrites4(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned int val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu2(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu2(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu2(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu4(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu4(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu4(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(long long int val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned long long int val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel1(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel1(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel1(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwritel2(val, surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwritel2(val, surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwritel2(val, surf, x, y, layer, hipBoundaryModeTrap ));
}
# 3893 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, hipBoundaryModeClamp) : __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, hipBoundaryModeTrap ));
}
# 3920 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec1( uchar1 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec2( uchar2 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec4( uchar4 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites1( ushort1 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites2( ushort2 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites4( ushort4 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu1( uint1 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu2( uint2 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu4( uint4 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritel1(ulonglong1 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritel2(ulonglong2 val, surface<void, 0x0C> t, int x, int y, int face, enum hipSurfaceBoundaryMode mode);
# 3947 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(T val, surface<void, 0x0C> surf, int x, int y, int face, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(tmp.c1, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(tmp.c1, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(tmp.c1, surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapwrites1(tmp.s1, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites1(tmp.s1, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites1(tmp.s1, surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(tmp.u1, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(tmp.u1, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(tmp.u1, surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapwriteu2(tmp.u2, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu2(tmp.u2, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu2(tmp.u2, surf, x, y, face, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapwriteu4(tmp.u4, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu4(tmp.u4, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu4(tmp.u4, surf, x, y, face, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(T val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surfCubemapwrite(val, surf, x, y, face, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(signed char val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned char val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec1(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec1(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec1(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec2(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec2(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec2(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritec4(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritec4(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritec4(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned short val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites1(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites1(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites1(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites2(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites2(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites2(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwrites4(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwrites4(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwrites4(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned int val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu2(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu2(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu2(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu4(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu4(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu4(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(long long int val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned long long int val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel1(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel1(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel1(val, surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwritel2(val, surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwritel2(val, surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwritel2(val, surf, x, y, face, hipBoundaryModeTrap ));
}
# 4175 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float1 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float2 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float4 val, surface<void, 0x0C> surf, int x, int y, int face, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, hipBoundaryModeClamp) : __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, hipBoundaryModeTrap ));
}
# 4202 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec1( uchar1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec2( uchar2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec4( uchar4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites1( ushort1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites2( ushort2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites4( ushort4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu1( uint1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu2( uint2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu4( uint4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritel1(ulonglong1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritel2(ulonglong2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode);
# 4229 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(T val, surface<void, 0xFC> surf, int x, int y, int layerFace, int s, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, hipBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(T val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{;
surfCubemapLayeredwrite(val, surf, x, y, layerFace, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(signed char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned short val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(long long int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned long long int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, hipBoundaryModeTrap ));
}
# 4457 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum hipSurfaceBoundaryMode mode = hipBoundaryModeTrap)
{
((mode == hipBoundaryModeZero) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, hipBoundaryModeZero ) : (mode == hipBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, hipBoundaryModeClamp) : __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, hipBoundaryModeTrap ));
}
# 9416 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h" 2
# 74 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
template<class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1Dfetch(texture<char, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1Dfetch(texture<signed char, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1Dfetch(texture<unsigned char, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1Dfetch(texture<char1, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1Dfetch(texture<uchar1, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1Dfetch(texture<char2, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1Dfetch(texture<uchar2, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1Dfetch(texture<char4, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1Dfetch(texture<uchar4, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1Dfetch(texture<short, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1Dfetch(texture<unsigned short, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1Dfetch(texture<short1, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1Dfetch(texture<ushort1, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1Dfetch(texture<short2, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1Dfetch(texture<ushort2, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1Dfetch(texture<short4, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1Dfetch(texture<ushort4, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1Dfetch(texture<int, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1Dfetch(texture<unsigned int, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1Dfetch(texture<int1, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1Dfetch(texture<uint1, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1Dfetch(texture<int2, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1Dfetch(texture<uint2, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1Dfetch(texture<int4, 0x01, hipReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1Dfetch(texture<uint4, 0x01, hipReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<float, 0x01, hipReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<float1, 0x01, hipReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<float2, 0x01, hipReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<float4, 0x01, hipReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<char, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<signed char, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<unsigned char, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<char1, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<uchar1, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<char2, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<uchar2, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<char4, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<uchar4, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<short, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<unsigned short, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<short1, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<ushort1, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<short2, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<ushort2, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<short4, 0x01, hipReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<ushort4, 0x01, hipReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1D(texture<char, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1D(texture<signed char, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1D(texture<unsigned char, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1D(texture<char1, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1D(texture<uchar1, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1D(texture<char2, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1D(texture<uchar2, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1D(texture<char4, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1D(texture<uchar4, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1D(texture<short, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1D(texture<unsigned short, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1D(texture<short1, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1D(texture<ushort1, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1D(texture<short2, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1D(texture<ushort2, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1D(texture<short4, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1D(texture<ushort4, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1D(texture<int, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1D(texture<unsigned int, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1D(texture<int1, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1D(texture<uint1, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1D(texture<int2, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1D(texture<uint2, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1D(texture<int4, 0x01, hipReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1D(texture<uint4, 0x01, hipReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 814 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<float, 0x01, hipReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<float1, 0x01, hipReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<float2, 0x01, hipReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<float4, 0x01, hipReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<char, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<signed char, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<unsigned char, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<char1, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<uchar1, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<char2, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<uchar2, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<char4, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<uchar4, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<short, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<unsigned short, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<short1, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<ushort1, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<short2, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<ushort2, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<short4, 0x01, hipReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<ushort4, 0x01, hipReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2D(texture<char, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2D(texture<signed char, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2D(texture<unsigned char, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2D(texture<char1, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2D(texture<uchar1, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2D(texture<char2, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2D(texture<uchar2, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2D(texture<char4, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2D(texture<uchar4, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2D(texture<short, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2D(texture<unsigned short, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2D(texture<short1, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2D(texture<ushort1, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2D(texture<short2, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2D(texture<ushort2, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2D(texture<short4, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2D(texture<ushort4, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2D(texture<int, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2D(texture<unsigned int, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2D(texture<int1, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2D(texture<uint1, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2D(texture<int2, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2D(texture<uint2, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2D(texture<int4, 0x02, hipReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2D(texture<uint4, 0x02, hipReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 1263 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<float, 0x02, hipReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<float1, 0x02, hipReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<float2, 0x02, hipReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<float4, 0x02, hipReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<char, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<signed char, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<unsigned char, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<char1, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<uchar1, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<char2, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<uchar2, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<char4, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<uchar4, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<short, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<unsigned short, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<short1, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<ushort1, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<short2, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<ushort2, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<short4, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<ushort4, 0x02, hipReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayered(texture<char, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayered(texture<signed char, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayered(texture<unsigned char, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayered(texture<char1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayered(texture<uchar1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayered(texture<char2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayered(texture<uchar2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayered(texture<char4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayered(texture<uchar4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayered(texture<short, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayered(texture<unsigned short, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayered(texture<short1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayered(texture<ushort1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayered(texture<short2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayered(texture<ushort2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayered(texture<short4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayered(texture<ushort4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayered(texture<int, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayered(texture<unsigned int, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayered(texture<int1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayered(texture<uint1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayered(texture<int2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayered(texture<uint2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayered(texture<int4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayered(texture<uint4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 1712 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<float, 0xF1, hipReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<float1, 0xF1, hipReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<float2, 0xF1, hipReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<float4, 0xF1, hipReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<signed char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<unsigned char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<char1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<uchar1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<char2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<uchar2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<char4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<uchar4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<unsigned short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<short1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<ushort1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<short2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<ushort2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<short4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<ushort4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayered(texture<char, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayered(texture<signed char, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayered(texture<unsigned char, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayered(texture<char1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayered(texture<uchar1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayered(texture<char2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayered(texture<uchar2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayered(texture<char4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayered(texture<uchar4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayered(texture<short, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayered(texture<unsigned short, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayered(texture<short1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayered(texture<ushort1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayered(texture<short2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayered(texture<ushort2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayered(texture<short4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayered(texture<ushort4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayered(texture<int, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayered(texture<unsigned int, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayered(texture<int1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayered(texture<uint1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayered(texture<int2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayered(texture<uint2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayered(texture<int4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayered(texture<uint4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 2161 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<float, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<float1, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<float2, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<float4, 0xF2, hipReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<signed char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<unsigned char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<char1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<uchar1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<char2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<uchar2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<char4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<uchar4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<unsigned short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<short1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<ushort1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<short2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<ushort2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<short4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<ushort4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3D(texture<char, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3D(texture<signed char, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3D(texture<unsigned char, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3D(texture<char1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3D(texture<uchar1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3D(texture<char2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3D(texture<uchar2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3D(texture<char4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3D(texture<uchar4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3D(texture<short, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3D(texture<unsigned short, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3D(texture<short1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3D(texture<ushort1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3D(texture<short2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3D(texture<ushort2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3D(texture<short4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3D(texture<ushort4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3D(texture<int, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3D(texture<unsigned int, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3D(texture<int1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3D(texture<uint1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3D(texture<int2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3D(texture<uint2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3D(texture<int4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3D(texture<uint4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 2610 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<float, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<float1, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<float2, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<float4, 0x03, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<signed char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<unsigned char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<char1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<uchar1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<char2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<uchar2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<char4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<uchar4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<unsigned short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<short1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<ushort1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<short2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<ushort2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<short4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<ushort4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemap(texture<char, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemap(texture<signed char, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemap(texture<unsigned char, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemap(texture<char1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemap(texture<uchar1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemap(texture<char2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemap(texture<uchar2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemap(texture<char4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemap(texture<uchar4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemap(texture<short, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemap(texture<unsigned short, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemap(texture<short1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemap(texture<ushort1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemap(texture<short2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemap(texture<ushort2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemap(texture<short4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemap(texture<ushort4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemap(texture<int, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemap(texture<unsigned int, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemap(texture<int1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemap(texture<uint1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemap(texture<int2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemap(texture<uint2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemap(texture<int4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemap(texture<uint4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 3059 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<float, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<float1, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<float2, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<float4, 0x0C, hipReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<signed char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<unsigned char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<char1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<uchar1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<char2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<uchar2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<char4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<uchar4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<short, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<unsigned short, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<short1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<ushort1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<short2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<ushort2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<short4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<ushort4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLayered(texture<char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLayered(texture<signed char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLayered(texture<unsigned char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLayered(texture<char1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLayered(texture<uchar1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLayered(texture<char2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLayered(texture<uchar2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLayered(texture<char4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLayered(texture<uchar4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLayered(texture<short, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLayered(texture<unsigned short, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLayered(texture<short1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLayered(texture<ushort1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLayered(texture<short2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLayered(texture<ushort2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLayered(texture<short4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLayered(texture<ushort4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLayered(texture<int, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLayered(texture<unsigned int, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLayered(texture<int1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLayered(texture<uint1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLayered(texture<int2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLayered(texture<uint2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLayered(texture<int4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLayered(texture<uint4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 3508 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<float, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<float1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<float2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<float4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<signed char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<unsigned char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<char1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<uchar1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<char2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<uchar2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<char4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<uchar4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<short, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<unsigned short, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<short1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<ushort1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<short2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<ushort2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<short4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<ushort4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
# 3785 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
template<int comp, class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
template<int comp, class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
template<int comp, class T, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
# 3807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<signed char, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<unsigned char, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<signed short, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<unsigned short, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<signed int, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<unsigned int, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float1, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
{ float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float2, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float3, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { float4 v = __ftex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float4, 0x02, hipReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { float4 v = __ftex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { float4 v = __ftex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
# 3994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<signed char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<unsigned char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char3, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar3, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<signed short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<unsigned short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short3, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort3, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLod(texture<char, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLod(texture<signed char, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLod(texture<unsigned char, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLod(texture<char1, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLod(texture<uchar1, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLod(texture<char2, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLod(texture<uchar2, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLod(texture<char4, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLod(texture<uchar4, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLod(texture<short, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLod(texture<unsigned short, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLod(texture<short1, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLod(texture<ushort1, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLod(texture<short2, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLod(texture<ushort2, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLod(texture<short4, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLod(texture<ushort4, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLod(texture<int, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLod(texture<unsigned int, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLod(texture<int1, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLod(texture<uint1, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLod(texture<int2, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLod(texture<uint2, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLod(texture<int4, 0x01, hipReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLod(texture<uint4, 0x01, hipReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 4393 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<float, 0x01, hipReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<float1, 0x01, hipReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<float2, 0x01, hipReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<float4, 0x01, hipReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<char, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<signed char, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<unsigned char, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<char1, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<uchar1, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<char2, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<uchar2, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<char4, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<uchar4, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<short, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<unsigned short, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<short1, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<ushort1, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<short2, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<ushort2, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<short4, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<ushort4, 0x01, hipReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLod(texture<char, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLod(texture<signed char, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLod(texture<unsigned char, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLod(texture<char1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLod(texture<uchar1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLod(texture<char2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLod(texture<uchar2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLod(texture<char4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLod(texture<uchar4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLod(texture<short, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLod(texture<unsigned short, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLod(texture<short1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLod(texture<ushort1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLod(texture<short2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLod(texture<ushort2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLod(texture<short4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLod(texture<ushort4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLod(texture<int, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLod(texture<unsigned int, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLod(texture<int1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLod(texture<uint1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLod(texture<int2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLod(texture<uint2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLod(texture<int4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLod(texture<uint4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 4842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<float, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<float1, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<float2, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<float4, 0x02, hipReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<signed char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<unsigned char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<char1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<uchar1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<char2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<uchar2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<char4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<uchar4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<unsigned short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<short1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<ushort1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<short2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<ushort2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<short4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<ushort4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayeredLod(texture<char, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayeredLod(texture<signed char, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayeredLod(texture<unsigned char, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayeredLod(texture<char1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayeredLod(texture<uchar1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayeredLod(texture<char2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayeredLod(texture<uchar2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayeredLod(texture<char4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayeredLod(texture<uchar4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayeredLod(texture<short, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayeredLod(texture<unsigned short, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayeredLod(texture<short1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayeredLod(texture<ushort1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayeredLod(texture<short2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayeredLod(texture<ushort2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayeredLod(texture<short4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayeredLod(texture<ushort4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayeredLod(texture<int, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayeredLod(texture<unsigned int, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayeredLod(texture<int1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayeredLod(texture<uint1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayeredLod(texture<int2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayeredLod(texture<uint2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayeredLod(texture<int4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayeredLod(texture<uint4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 5291 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<float, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<float1, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<float2, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<float4, 0xF1, hipReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<signed char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<unsigned char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<char1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<uchar1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<char2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<uchar2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<char4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<uchar4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<unsigned short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<short1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<ushort1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<short2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<ushort2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<short4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<ushort4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayeredLod(texture<char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayeredLod(texture<signed char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayeredLod(texture<unsigned char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayeredLod(texture<char1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayeredLod(texture<uchar1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayeredLod(texture<char2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayeredLod(texture<uchar2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayeredLod(texture<char4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayeredLod(texture<uchar4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayeredLod(texture<short, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayeredLod(texture<unsigned short, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayeredLod(texture<short1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayeredLod(texture<ushort1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayeredLod(texture<short2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayeredLod(texture<ushort2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayeredLod(texture<short4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayeredLod(texture<ushort4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayeredLod(texture<int, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayeredLod(texture<unsigned int, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayeredLod(texture<int1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayeredLod(texture<uint1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayeredLod(texture<int2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayeredLod(texture<uint2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayeredLod(texture<int4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayeredLod(texture<uint4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 5740 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<float, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<float1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<float2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<float4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<signed char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<unsigned char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<char1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<uchar1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<char2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<uchar2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<char4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<uchar4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<unsigned short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<short1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<ushort1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<short2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<ushort2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<short4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<ushort4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3DLod(texture<char, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3DLod(texture<signed char, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3DLod(texture<unsigned char, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3DLod(texture<char1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3DLod(texture<uchar1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3DLod(texture<char2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3DLod(texture<uchar2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3DLod(texture<char4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3DLod(texture<uchar4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3DLod(texture<short, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3DLod(texture<unsigned short, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3DLod(texture<short1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3DLod(texture<ushort1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3DLod(texture<short2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3DLod(texture<ushort2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3DLod(texture<short4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3DLod(texture<ushort4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3DLod(texture<int, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3DLod(texture<unsigned int, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3DLod(texture<int1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3DLod(texture<uint1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3DLod(texture<int2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3DLod(texture<uint2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3DLod(texture<int4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3DLod(texture<uint4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 6189 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<float, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<float1, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<float2, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<float4, 0x03, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<signed char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<unsigned char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<char1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<uchar1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<char2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<uchar2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<char4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<uchar4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<unsigned short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<short1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<ushort1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<short2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<ushort2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<short4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<ushort4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLod(texture<char, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLod(texture<signed char, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLod(texture<unsigned char, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLod(texture<char1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLod(texture<uchar1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLod(texture<char2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLod(texture<uchar2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLod(texture<char4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLod(texture<uchar4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLod(texture<short, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLod(texture<unsigned short, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLod(texture<short1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLod(texture<ushort1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLod(texture<short2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLod(texture<ushort2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLod(texture<short4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLod(texture<ushort4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLod(texture<int, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLod(texture<unsigned int, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLod(texture<int1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLod(texture<uint1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLod(texture<int2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLod(texture<uint2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLod(texture<int4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLod(texture<uint4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 6638 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<float, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<float1, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<float2, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<float4, 0x0C, hipReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<signed char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<unsigned char, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<char1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<uchar1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<char2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<uchar2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<char4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<uchar4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<short, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<unsigned short, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<short1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<ushort1, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<short2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<ushort2, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<short4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<ushort4, 0x0C, hipReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLayeredLod(texture<char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLayeredLod(texture<signed char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLayeredLod(texture<unsigned char, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLayeredLod(texture<char1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLayeredLod(texture<uchar1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLayeredLod(texture<char2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLayeredLod(texture<uchar2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLayeredLod(texture<char4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLayeredLod(texture<uchar4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLayeredLod(texture<short, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLayeredLod(texture<unsigned short, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLayeredLod(texture<short1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLayeredLod(texture<ushort1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLayeredLod(texture<short2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLayeredLod(texture<ushort2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLayeredLod(texture<short4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLayeredLod(texture<ushort4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLayeredLod(texture<int, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLayeredLod(texture<unsigned int, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLayeredLod(texture<int1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLayeredLod(texture<uint1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLayeredLod(texture<int2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLayeredLod(texture<uint2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLayeredLod(texture<int4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLayeredLod(texture<uint4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<float, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<float1, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<float2, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<float4, 0xFC, hipReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<signed char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<unsigned char, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<char1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<uchar1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<char2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<uchar2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<char4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<uchar4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<short, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<unsigned short, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<short1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<ushort1, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<short2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<ushort2, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<short4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<ushort4, 0xFC, hipReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
template<class T, int texType, enum hipTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DGrad(texture<char, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DGrad(texture<signed char, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DGrad(texture<unsigned char, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DGrad(texture<char1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DGrad(texture<uchar1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DGrad(texture<char2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DGrad(texture<uchar2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DGrad(texture<char4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DGrad(texture<uchar4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DGrad(texture<short, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DGrad(texture<unsigned short, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DGrad(texture<short1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DGrad(texture<ushort1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DGrad(texture<short2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DGrad(texture<ushort2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DGrad(texture<short4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DGrad(texture<ushort4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DGrad(texture<int, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DGrad(texture<unsigned int, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DGrad(texture<int1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DGrad(texture<uint1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DGrad(texture<int2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DGrad(texture<uint2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DGrad(texture<int4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DGrad(texture<uint4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7550 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<float, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<float1, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<float2, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<float4, 0x01, hipReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<char, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<signed char, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<unsigned char, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<char1, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<uchar1, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<char2, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<uchar2, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<char4, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<uchar4, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<short, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<unsigned short, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<short1, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<ushort1, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<short2, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<ushort2, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<short4, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<ushort4, 0x01, hipReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DGrad(texture<char, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DGrad(texture<signed char, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DGrad(texture<unsigned char, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DGrad(texture<char1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DGrad(texture<uchar1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DGrad(texture<char2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DGrad(texture<uchar2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DGrad(texture<char4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DGrad(texture<uchar4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DGrad(texture<short, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DGrad(texture<unsigned short, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DGrad(texture<short1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DGrad(texture<ushort1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DGrad(texture<short2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DGrad(texture<ushort2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DGrad(texture<short4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DGrad(texture<ushort4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DGrad(texture<int, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DGrad(texture<unsigned int, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DGrad(texture<int1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DGrad(texture<uint1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DGrad(texture<int2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DGrad(texture<uint2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DGrad(texture<int4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DGrad(texture<uint4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<float, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<float1, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<float2, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<float4, 0x02, hipReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<signed char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<unsigned char, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<char1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<uchar1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<char2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<uchar2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<char4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<uchar4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<unsigned short, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<short1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<ushort1, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<short2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<ushort2, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<short4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<ushort4, 0x02, hipReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayeredGrad(texture<char, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayeredGrad(texture<signed char, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayeredGrad(texture<unsigned char, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayeredGrad(texture<char1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayeredGrad(texture<uchar1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayeredGrad(texture<char2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayeredGrad(texture<uchar2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayeredGrad(texture<char4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayeredGrad(texture<uchar4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayeredGrad(texture<short, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayeredGrad(texture<unsigned short, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayeredGrad(texture<short1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayeredGrad(texture<ushort1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayeredGrad(texture<short2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayeredGrad(texture<ushort2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayeredGrad(texture<short4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayeredGrad(texture<ushort4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayeredGrad(texture<int, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayeredGrad(texture<unsigned int, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayeredGrad(texture<int1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayeredGrad(texture<uint1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayeredGrad(texture<int2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayeredGrad(texture<uint2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayeredGrad(texture<int4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayeredGrad(texture<uint4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 8448 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<float, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<float1, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<float2, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<float4, 0xF1, hipReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<signed char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<unsigned char, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<char1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<uchar1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<char2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<uchar2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<char4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<uchar4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<unsigned short, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<short1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<ushort1, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<short2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<ushort2, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<short4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<ushort4, 0xF1, hipReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayeredGrad(texture<char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayeredGrad(texture<signed char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayeredGrad(texture<unsigned char, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayeredGrad(texture<char1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayeredGrad(texture<uchar1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayeredGrad(texture<char2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayeredGrad(texture<uchar2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayeredGrad(texture<char4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayeredGrad(texture<uchar4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayeredGrad(texture<short, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayeredGrad(texture<unsigned short, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayeredGrad(texture<short1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayeredGrad(texture<ushort1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayeredGrad(texture<short2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayeredGrad(texture<ushort2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayeredGrad(texture<short4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayeredGrad(texture<ushort4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayeredGrad(texture<int, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayeredGrad(texture<unsigned int, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayeredGrad(texture<int1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayeredGrad(texture<uint1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayeredGrad(texture<int2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayeredGrad(texture<uint2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayeredGrad(texture<int4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayeredGrad(texture<uint4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 8897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<float, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<float1, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<float2, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<float4, 0xF2, hipReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<signed char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<unsigned char, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<char1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<uchar1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<char2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<uchar2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<char4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<uchar4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<unsigned short, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<short1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<ushort1, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<short2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<ushort2, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<short4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<ushort4, 0xF2, hipReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3DGrad(texture<char, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3DGrad(texture<signed char, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3DGrad(texture<unsigned char, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3DGrad(texture<char1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3DGrad(texture<uchar1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3DGrad(texture<char2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3DGrad(texture<uchar2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3DGrad(texture<char4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3DGrad(texture<uchar4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3DGrad(texture<short, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3DGrad(texture<unsigned short, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3DGrad(texture<short1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3DGrad(texture<ushort1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3DGrad(texture<short2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3DGrad(texture<ushort2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3DGrad(texture<short4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3DGrad(texture<ushort4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3DGrad(texture<int, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3DGrad(texture<unsigned int, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3DGrad(texture<int1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3DGrad(texture<uint1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3DGrad(texture<int2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3DGrad(texture<uint2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3DGrad(texture<int4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3DGrad(texture<uint4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 9346 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<float, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<float1, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<float2, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<float4, 0x03, hipReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<signed char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<unsigned char, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<char1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<uchar1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<char2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<uchar2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<char4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<uchar4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<unsigned short, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<short1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<ushort1, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<short2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<ushort2, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<short4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<ushort4, 0x03, hipReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
# 9417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h" 2
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(signed char *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char1 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char2 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char4 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned char *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar1 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar2 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar4 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short1 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short2 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short4 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned short *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort1 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort2 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort4 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int1 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int2 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int4 *retVal, hipTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned int *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint1 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint2 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint4 *retVal, hipTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 334 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float *retVal, hipTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float1 *retVal, hipTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float2 *retVal, hipTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float4 *retVal, hipTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1Dfetch(hipTextureObject_t texObject, int x)
{
T ret;
tex1Dfetch(&ret, texObject, x);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(signed char *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char1 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char2 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char4 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned char *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar1 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar2 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar4 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short1 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short2 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short4 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned short *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort1 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort2 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort4 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int1 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int2 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int4 *retVal, hipTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned int *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint1 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint2 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint4 *retVal, hipTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 646 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float *retVal, hipTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float1 *retVal, hipTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float2 *retVal, hipTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float4 *retVal, hipTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1D(hipTextureObject_t texObject, float x)
{
T ret;
tex1D(&ret, texObject, x);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(signed char *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char1 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char2 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char4 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned char *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar1 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar2 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar4 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short1 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short2 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short4 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned short *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort1 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort2 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort4 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int1 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int2 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int4 *retVal, hipTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned int *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint1 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint2 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint4 *retVal, hipTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 958 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float *retVal, hipTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float1 *retVal, hipTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float2 *retVal, hipTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float4 *retVal, hipTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2D(hipTextureObject_t texObject, float x, float y)
{
T ret;
tex2D(&ret, texObject, x, y);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1270 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3D(hipTextureObject_t texObject, float x, float y, float z)
{
T ret;
tex3D(&ret, texObject, x, y, z);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(signed char *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned char *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned short *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned int *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1582 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float *retVal, hipTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float1 *retVal, hipTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float2 *retVal, hipTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float4 *retVal, hipTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayered(hipTextureObject_t texObject, float x, int layer)
{
T ret;
tex1DLayered(&ret, texObject, x, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(signed char *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1894 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float1 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float2 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float4 *retVal, hipTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayered(hipTextureObject_t texObject, float x, float y, int layer)
{
T ret;
tex2DLayered(&ret, texObject, x, y, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 2206 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemap(hipTextureObject_t texObject, float x, float y, float z)
{
T ret;
texCubemap(&ret, texObject, x, y, z);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 2518 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLayered(hipTextureObject_t texObject, float x, float y, float z, int layer)
{
T ret;
texCubemapLayered(&ret, texObject, x, y, z, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(signed char *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (long)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned long *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned long)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float1 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float2 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float4 *retVal, hipTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2Dgather(hipTextureObject_t to, float x, float y, int comp = 0)
{
T ret;
tex2Dgather(&ret, to, x, y, comp);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(signed char *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char1 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char2 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char4 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short1 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short2 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short4 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int1 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int2 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int4 *retVal, hipTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint1 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint2 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint4 *retVal, hipTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 3540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float *retVal, hipTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float1 *retVal, hipTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float2 *retVal, hipTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float4 *retVal, hipTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLod(hipTextureObject_t texObject, float x, float level)
{
T ret;
tex1DLod(&ret, texObject, x, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(signed char *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 3852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float1 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float2 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float4 *retVal, hipTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLod(hipTextureObject_t texObject, float x, float y, float level)
{
T ret;
tex2DLod(&ret, texObject, x, y, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4164 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3DLod(hipTextureObject_t texObject, float x, float y, float z, float level)
{
T ret;
tex3DLod(&ret, texObject, x, y, z, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(signed char *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned char *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned short *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned int *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4476 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float1 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float2 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float4 *retVal, hipTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayeredLod(hipTextureObject_t texObject, float x, int layer, float level)
{
T ret;
tex1DLayeredLod(&ret, texObject, x, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(signed char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4788 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayeredLod(hipTextureObject_t texObject, float x, float y, int layer, float level)
{
T ret;
tex2DLayeredLod(&ret, texObject, x, y, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5100 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLod(hipTextureObject_t texObject, float x, float y, float z, float level)
{
T ret;
texCubemapLod(&ret, texObject, x, y, z, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLayeredLod(hipTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
T ret;
texCubemapLayeredLod(&ret, texObject, x, y, z, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(signed char *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned char *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned short *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned int *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5724 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float1 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float2 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float4 *retVal, hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DGrad(hipTextureObject_t texObject, float x, float dPdx, float dPdy)
{
T ret;
tex1DGrad(&ret, texObject, x, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(signed char *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6036 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float1 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float2 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float4 *retVal, hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DGrad(hipTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
T ret;
tex2DGrad(&ret, texObject, x, y, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(signed char *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float1 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float2 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float4 *retVal, hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3DGrad(hipTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
T ret;
tex3DGrad(&ret, texObject, x, y, z, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(signed char *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned char *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned short *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned int *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float1 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float2 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float4 *retVal, hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayeredGrad(hipTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
T ret;
tex1DLayeredGrad(&ret, texObject, x, layer, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(signed char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned char *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned short *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned int *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float1 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float2 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float4 *retVal, hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayeredGrad(hipTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
T ret;
tex2DLayeredGrad(&ret, texObject, x, y, layer, dPdx, dPdy);
return ret;
}
# 9418 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h" 2
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(signed char *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(long long *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float1 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b8.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b8.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b8.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b8.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b8.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b8.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b16.trap {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b16.clamp {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b16.zero {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b16.trap {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b16.clamp {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b16.zero {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b64.trap {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b64.clamp {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b64.zero {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b64.trap {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b64.clamp {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b64.zero {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float2 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float4 *retVal, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1Dread(hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surf1Dread(&ret, surfObject, x, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(long long *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2Dread(hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surf2Dread(&ret, surfObject, x, y, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf3Dread(hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surf3Dread(&ret, surfObject, x, y, z, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(long long *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1DLayeredread(hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surf1DLayeredread(&ret, surfObject, x, layer, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2DLayeredread(hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surf2DLayeredread(&ret, surfObject, x, y, layer, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapread(hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surfCubemapread(&ret, surfObject, face, x, y, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(signed char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned char *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned short *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned int *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(longlong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned long long *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ulonglong1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float1 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(longlong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ulonglong2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float2 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float4 *retVal, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapLayeredread(hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
T ret;
surfCubemapLayeredread(&ret, surfObject, x, y, z, layerface, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(signed char data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(long long data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float1 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b8.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b8.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b8.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b8.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b8.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b8.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b16.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b16.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b16.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b16.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b16.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b16.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b64.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b64.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b64.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b64.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b64.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b64.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float2 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b8.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b8.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b8.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b8.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b8.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b8.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b16.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b16.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b16.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b16.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b16.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b16.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float4 data, hipSurfaceObject_t surfObject, int x, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(signed char data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(long long data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float1 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float2 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float4 data, hipSurfaceObject_t surfObject, int x, int y, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(signed char data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(long long data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float1 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float2 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float4 data, hipSurfaceObject_t surfObject, int x, int y, int z, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(signed char data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(long long data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float1 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float2 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float4 data, hipSurfaceObject_t surfObject, int x, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(signed char data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(long long data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float1 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float2 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float4 data, hipSurfaceObject_t surfObject, int x, int y, int layer, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(signed char data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(long long data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float1 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float2 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float4 data, hipSurfaceObject_t surfObject, int x, int y, int face, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(signed char data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned char data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned short data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned int data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(long long data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned long long data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float1 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float2 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float4 data, hipSurfaceObject_t surfObject, int x, int y, int z, int layerface, hipSurfaceBoundaryMode boundaryMode = hipBoundaryModeTrap)
{
if (boundaryMode == hipBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == hipBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
# 9419 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/hip/device_functions.h" 2
# 80 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_launch_parameters.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_launch_parameters.h"
extern "C" {
uint3 __attribute__((device_builtin)) extern const threadIdx;
uint3 __attribute__((device_builtin)) extern const blockIdx;
dim3 __attribute__((device_builtin)) extern const blockDim;
dim3 __attribute__((device_builtin)) extern const gridDim;
int __attribute__((device_builtin)) extern const warpSize;
}
# 81 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
namespace
{
# 123 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipSetupArgument(
T arg,
size_t offset
)
{
return ::hipSetupArgument((const void*)&arg, sizeof(T), offset);
}
# 162 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
static __inline__ __attribute__((host)) hipError_t hipEventCreate(
hipEvent_t *event,
unsigned int flags
)
{
return ::hipEventCreateWithFlags(event, flags);
}
# 225 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
__inline__ __attribute__((host)) hipError_t hipHostMalloc(
void **ptr,
size_t size,
unsigned int flags
)
{
return ::hipHostMalloc(ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipHostMalloc(
T **ptr,
size_t size,
unsigned int flags
)
{
return ::hipHostMalloc((void**)(void*)ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipHostGetDevicePointer(
T **pDevice,
void *pHost,
unsigned int flags
)
{
return ::hipHostGetDevicePointer((void**)(void*)pDevice, pHost, flags);
}
# 323 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipMallocManaged(
T **devPtr,
size_t size,
unsigned int flags = 0x01
)
{
return ::hipMallocManaged((void**)(void*)devPtr, size, flags);
}
# 399 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipStreamAttachMemAsync(
hipStream_t stream,
T *devPtr,
size_t length = 0,
unsigned int flags = 0x04
)
{
return ::hipStreamAttachMemAsync(stream, (void*)devPtr, length, flags);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipMalloc(
T **devPtr,
size_t size
)
{
return ::hipMalloc((void**)(void*)devPtr, size);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipHostMalloc(
T **ptr,
size_t size,
unsigned int flags = 0
)
{
return hipHostMalloc((void**)(void*)ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipMallocPitch(
T **devPtr,
size_t *pitch,
size_t width,
size_t height
)
{
return ::hipMallocPitch((void**)(void*)devPtr, pitch, width, height);
}
# 475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipMemcpyToSymbol(
const T &symbol,
const void *src,
size_t count,
size_t offset = 0,
enum hipMemcpyKind kind = hipMemcpyHostToDevice
)
{
return ::hipMemcpyToSymbol((const void*)&symbol, src, count, offset, kind);
}
# 527 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipMemcpyToSymbolAsync(
const T &symbol,
const void *src,
size_t count,
size_t offset = 0,
enum hipMemcpyKind kind = hipMemcpyHostToDevice,
hipStream_t stream = 0
)
{
return ::hipMemcpyToSymbolAsync((const void*)&symbol, src, count, offset, kind, stream);
}
# 573 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipMemcpyFromSymbol(
void *dst,
const T &symbol,
size_t count,
size_t offset = 0,
enum hipMemcpyKind kind = hipMemcpyDeviceToHost
)
{
return ::hipMemcpyFromSymbol(dst, (const void*)&symbol, count, offset, kind);
}
# 625 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipMemcpyFromSymbolAsync(
void *dst,
const T &symbol,
size_t count,
size_t offset = 0,
enum hipMemcpyKind kind = hipMemcpyDeviceToHost,
hipStream_t stream = 0
)
{
return ::hipMemcpyFromSymbolAsync(dst, (const void*)&symbol, count, offset, kind, stream);
}
# 658 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipGetSymbolAddress(
void **devPtr,
const T &symbol
)
{
return ::hipGetSymbolAddress(devPtr, (const void*)&symbol);
}
# 687 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipGetSymbolSize(
size_t *size,
const T &symbol
)
{
return ::hipGetSymbolSize(size, (const void*)&symbol);
}
# 730 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTexture(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
const struct hipChannelFormatDesc &desc,
size_t size = (2147483647 * 2U + 1U)
)
{
return ::hipBindTexture(offset, &tex, devPtr, &desc, size);
}
# 775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTexture(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
size_t size = (2147483647 * 2U + 1U)
)
{
return hipBindTexture(offset, tex, devPtr, tex.channelDesc, size);
}
# 831 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTexture2D(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
const struct hipChannelFormatDesc &desc,
size_t width,
size_t height,
size_t pitch
)
{
return ::hipBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch);
}
# 889 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTexture2D(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
size_t width,
size_t height,
size_t pitch
)
{
return ::hipBindTexture2D(offset, &tex, devPtr, &tex.channelDesc, width, height, pitch);
}
# 931 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTextureToArray(
const struct texture<T, dim, readMode> &tex,
hipArray_const_t array,
const struct hipChannelFormatDesc &desc
)
{
return ::hipBindTextureToArray(&tex, array, &desc);
}
# 969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTextureToArray(
const struct texture<T, dim, readMode> &tex,
hipArray_const_t array
)
{
struct hipChannelFormatDesc desc;
hipError_t err = ::hipGetChannelDesc(&desc, array);
return err == hipSuccess ? hipBindTextureToArray(tex, array, desc) : err;
}
# 1010 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTextureToMipmappedArray(
const struct texture<T, dim, readMode> &tex,
hipMipmappedArray_const_t mipmappedArray,
const struct hipChannelFormatDesc &desc
)
{
return ::hipBindTextureToMipmappedArray(&tex, mipmappedArray, &desc);
}
# 1048 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipBindTextureToMipmappedArray(
const struct texture<T, dim, readMode> &tex,
hipMipmappedArray_const_t mipmappedArray
)
{
struct hipChannelFormatDesc desc;
hipArray_t levelArray;
hipError_t err = ::hipGetMipmappedArrayLevel(&levelArray, mipmappedArray, 0);
if (err != hipSuccess) {
return err;
}
err = ::hipGetChannelDesc(&desc, levelArray);
return err == hipSuccess ? hipBindTextureToMipmappedArray(tex, mipmappedArray, desc) : err;
}
# 1087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipUnbindTexture(
const struct texture<T, dim, readMode> &tex
)
{
return ::hipUnbindTexture(&tex);
}
# 1121 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum hipTextureReadMode readMode>
__inline__ __attribute__((host)) hipError_t hipGetTextureAlignmentOffset(
size_t *offset,
const struct texture<T, dim, readMode> &tex
)
{
return ::hipGetTextureAlignmentOffset(offset, &tex);
}
# 1174 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipFuncSetCacheConfig(
T *func,
enum hipFuncCache_t cacheConfig
)
{
return ::hipFuncSetCacheConfig((const void*)func, cacheConfig);
}
template<class T>
__inline__ __attribute__((host)) hipError_t hipFuncSetSharedMemConfig(
T *func,
enum hipSharedMemConfig config
)
{
return ::hipFuncSetSharedMemConfig((const void*)func, config);
}
# 1226 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipLaunch(
T *func
)
{
return ::hipLaunch((const void*)func);
}
# 1264 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) hipError_t hipFuncGetAttributes(
struct hipFuncAttributes *attr,
T *entry
)
{
return ::hipFuncGetAttributes(attr, (const void*)entry);
}
# 1293 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim>
__inline__ __attribute__((host)) hipError_t hipBindSurfaceToArray(
const struct surface<T, dim> &surf,
hipArray_const_t array,
const struct hipChannelFormatDesc &desc
)
{
return ::hipBindSurfaceToArray(&surf, array, &desc);
}
# 1322 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim>
__inline__ __attribute__((host)) hipError_t hipBindSurfaceToArray(
const struct surface<T, dim> &surf,
hipArray_const_t array
)
{
struct hipChannelFormatDesc desc;
hipError_t err = ::hipGetChannelDesc(&desc, array);
return err == hipSuccess ? hipBindSurfaceToArray(surf, array, desc) : err;
}
}
# 1 "<command-line>" 2
# 1 "vecmultKernel00.cu"
# 1 "vecmultKernel.h" 1
# 9 "vecmultKernel.h"
__attribute__((global)) void MultiplyVectors(const float* A, const float* B, float* C);
# 6 "vecmultKernel00.cu" 2
__attribute__((global)) void MultiplyVectors(const float* A, const float* B, float* C)
{
int B_start_index = blockIdx.x*11;
int A_start_index = threadIdx.x*11;
int C_width = gridDim.x*11;
int t;
float c_0_0, c_0_1, c_0_2, c_0_3, c_0_4, c_0_5, c_0_6, c_0_7, c_0_8, c_0_9, c_0_10, c_1_0, c_1_1, c_1_2, c_1_3, c_1_4, c_1_5, c_1_6, c_1_7, c_1_8, c_1_9, c_1_10, c_2_0, c_2_1, c_2_2, c_2_3, c_2_4, c_2_5, c_2_6, c_2_7, c_2_8, c_2_9, c_2_10, c_3_0, c_3_1, c_3_2, c_3_3, c_3_4, c_3_5, c_3_6, c_3_7, c_3_8, c_3_9, c_3_10, c_4_0, c_4_1, c_4_2, c_4_3, c_4_4, c_4_5, c_4_6, c_4_7, c_4_8, c_4_9, c_4_10, c_5_0, c_5_1, c_5_2, c_5_3, c_5_4, c_5_5, c_5_6, c_5_7, c_5_8, c_5_9, c_5_10, c_6_0, c_6_1, c_6_2, c_6_3, c_6_4, c_6_5, c_6_6, c_6_7, c_6_8, c_6_9, c_6_10, c_7_0, c_7_1, c_7_2, c_7_3, c_7_4, c_7_5, c_7_6, c_7_7, c_7_8, c_7_9, c_7_10, c_8_0, c_8_1, c_8_2, c_8_3, c_8_4, c_8_5, c_8_6, c_8_7, c_8_8, c_8_9, c_8_10, c_9_0, c_9_1, c_9_2, c_9_3, c_9_4, c_9_5, c_9_6, c_9_7, c_9_8, c_9_9, c_9_10, c_10_0, c_10_1, c_10_2, c_10_3, c_10_4, c_10_5, c_10_6, c_10_7, c_10_8, c_10_9, c_10_10;
float a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, a_10;
float b_0, b_1, b_2, b_3, b_4, b_5, b_6, b_7, b_8, b_9, b_10;
a_0 = A[A_start_index+0];
a_1 = A[A_start_index+1];
a_2 = A[A_start_index+2];
a_3 = A[A_start_index+3];
a_4 = A[A_start_index+4];
a_5 = A[A_start_index+5];
a_6 = A[A_start_index+6];
a_7 = A[A_start_index+7];
a_8 = A[A_start_index+8];
a_9 = A[A_start_index+9];
a_10 = A[A_start_index+10];
b_0 = B[B_start_index+0];
b_1 = B[B_start_index+1];
b_2 = B[B_start_index+2];
b_3 = B[B_start_index+3];
b_4 = B[B_start_index+4];
b_5 = B[B_start_index+5];
b_6 = B[B_start_index+6];
b_7 = B[B_start_index+7];
b_8 = B[B_start_index+8];
b_9 = B[B_start_index+9];
b_10 = B[B_start_index+10];
c_0_0 = 0;
c_0_1 = 0;
c_0_2 = 0;
c_0_3 = 0;
c_0_4 = 0;
c_0_5 = 0;
c_0_6 = 0;
c_0_7 = 0;
c_0_8 = 0;
c_0_9 = 0;
c_0_10 = 0;
c_1_0 = 0;
c_1_1 = 0;
c_1_2 = 0;
c_1_3 = 0;
c_1_4 = 0;
c_1_5 = 0;
c_1_6 = 0;
c_1_7 = 0;
c_1_8 = 0;
c_1_9 = 0;
c_1_10 = 0;
c_2_0 = 0;
c_2_1 = 0;
c_2_2 = 0;
c_2_3 = 0;
c_2_4 = 0;
c_2_5 = 0;
c_2_6 = 0;
c_2_7 = 0;
c_2_8 = 0;
c_2_9 = 0;
c_2_10 = 0;
c_3_0 = 0;
c_3_1 = 0;
c_3_2 = 0;
c_3_3 = 0;
c_3_4 = 0;
c_3_5 = 0;
c_3_6 = 0;
c_3_7 = 0;
c_3_8 = 0;
c_3_9 = 0;
c_3_10 = 0;
c_4_0 = 0;
c_4_1 = 0;
c_4_2 = 0;
c_4_3 = 0;
c_4_4 = 0;
c_4_5 = 0;
c_4_6 = 0;
c_4_7 = 0;
c_4_8 = 0;
c_4_9 = 0;
c_4_10 = 0;
c_5_0 = 0;
c_5_1 = 0;
c_5_2 = 0;
c_5_3 = 0;
c_5_4 = 0;
c_5_5 = 0;
c_5_6 = 0;
c_5_7 = 0;
c_5_8 = 0;
c_5_9 = 0;
c_5_10 = 0;
c_6_0 = 0;
c_6_1 = 0;
c_6_2 = 0;
c_6_3 = 0;
c_6_4 = 0;
c_6_5 = 0;
c_6_6 = 0;
c_6_7 = 0;
c_6_8 = 0;
c_6_9 = 0;
c_6_10 = 0;
c_7_0 = 0;
c_7_1 = 0;
c_7_2 = 0;
c_7_3 = 0;
c_7_4 = 0;
c_7_5 = 0;
c_7_6 = 0;
c_7_7 = 0;
c_7_8 = 0;
c_7_9 = 0;
c_7_10 = 0;
c_8_0 = 0;
c_8_1 = 0;
c_8_2 = 0;
c_8_3 = 0;
c_8_4 = 0;
c_8_5 = 0;
c_8_6 = 0;
c_8_7 = 0;
c_8_8 = 0;
c_8_9 = 0;
c_8_10 = 0;
c_9_0 = 0;
c_9_1 = 0;
c_9_2 = 0;
c_9_3 = 0;
c_9_4 = 0;
c_9_5 = 0;
c_9_6 = 0;
c_9_7 = 0;
c_9_8 = 0;
c_9_9 = 0;
c_9_10 = 0;
c_10_0 = 0;
c_10_1 = 0;
c_10_2 = 0;
c_10_3 = 0;
c_10_4 = 0;
c_10_5 = 0;
c_10_6 = 0;
c_10_7 = 0;
c_10_8 = 0;
c_10_9 = 0;
c_10_10 = 0;
for (t = 0; t < 10000; t++) {
c_0_0 += a_0*b_0;
c_0_1 += a_0*b_1;
c_0_2 += a_0*b_2;
c_0_3 += a_0*b_3;
c_0_4 += a_0*b_4;
c_0_5 += a_0*b_5;
c_0_6 += a_0*b_6;
c_0_7 += a_0*b_7;
c_0_8 += a_0*b_8;
c_0_9 += a_0*b_9;
c_0_10 += a_0*b_10;
c_1_0 += a_1*b_0;
c_1_1 += a_1*b_1;
c_1_2 += a_1*b_2;
c_1_3 += a_1*b_3;
c_1_4 += a_1*b_4;
c_1_5 += a_1*b_5;
c_1_6 += a_1*b_6;
c_1_7 += a_1*b_7;
c_1_8 += a_1*b_8;
c_1_9 += a_1*b_9;
c_1_10 += a_1*b_10;
c_2_0 += a_2*b_0;
c_2_1 += a_2*b_1;
c_2_2 += a_2*b_2;
c_2_3 += a_2*b_3;
c_2_4 += a_2*b_4;
c_2_5 += a_2*b_5;
c_2_6 += a_2*b_6;
c_2_7 += a_2*b_7;
c_2_8 += a_2*b_8;
c_2_9 += a_2*b_9;
c_2_10 += a_2*b_10;
c_3_0 += a_3*b_0;
c_3_1 += a_3*b_1;
c_3_2 += a_3*b_2;
c_3_3 += a_3*b_3;
c_3_4 += a_3*b_4;
c_3_5 += a_3*b_5;
c_3_6 += a_3*b_6;
c_3_7 += a_3*b_7;
c_3_8 += a_3*b_8;
c_3_9 += a_3*b_9;
c_3_10 += a_3*b_10;
c_4_0 += a_4*b_0;
c_4_1 += a_4*b_1;
c_4_2 += a_4*b_2;
c_4_3 += a_4*b_3;
c_4_4 += a_4*b_4;
c_4_5 += a_4*b_5;
c_4_6 += a_4*b_6;
c_4_7 += a_4*b_7;
c_4_8 += a_4*b_8;
c_4_9 += a_4*b_9;
c_4_10 += a_4*b_10;
c_5_0 += a_5*b_0;
c_5_1 += a_5*b_1;
c_5_2 += a_5*b_2;
c_5_3 += a_5*b_3;
c_5_4 += a_5*b_4;
c_5_5 += a_5*b_5;
c_5_6 += a_5*b_6;
c_5_7 += a_5*b_7;
c_5_8 += a_5*b_8;
c_5_9 += a_5*b_9;
c_5_10 += a_5*b_10;
c_6_0 += a_6*b_0;
c_6_1 += a_6*b_1;
c_6_2 += a_6*b_2;
c_6_3 += a_6*b_3;
c_6_4 += a_6*b_4;
c_6_5 += a_6*b_5;
c_6_6 += a_6*b_6;
c_6_7 += a_6*b_7;
c_6_8 += a_6*b_8;
c_6_9 += a_6*b_9;
c_6_10 += a_6*b_10;
c_7_0 += a_7*b_0;
c_7_1 += a_7*b_1;
c_7_2 += a_7*b_2;
c_7_3 += a_7*b_3;
c_7_4 += a_7*b_4;
c_7_5 += a_7*b_5;
c_7_6 += a_7*b_6;
c_7_7 += a_7*b_7;
c_7_8 += a_7*b_8;
c_7_9 += a_7*b_9;
c_7_10 += a_7*b_10;
c_8_0 += a_8*b_0;
c_8_1 += a_8*b_1;
c_8_2 += a_8*b_2;
c_8_3 += a_8*b_3;
c_8_4 += a_8*b_4;
c_8_5 += a_8*b_5;
c_8_6 += a_8*b_6;
c_8_7 += a_8*b_7;
c_8_8 += a_8*b_8;
c_8_9 += a_8*b_9;
c_8_10 += a_8*b_10;
c_9_0 += a_9*b_0;
c_9_1 += a_9*b_1;
c_9_2 += a_9*b_2;
c_9_3 += a_9*b_3;
c_9_4 += a_9*b_4;
c_9_5 += a_9*b_5;
c_9_6 += a_9*b_6;
c_9_7 += a_9*b_7;
c_9_8 += a_9*b_8;
c_9_9 += a_9*b_9;
c_9_10 += a_9*b_10;
c_10_0 += a_10*b_0;
c_10_1 += a_10*b_1;
c_10_2 += a_10*b_2;
c_10_3 += a_10*b_3;
c_10_4 += a_10*b_4;
c_10_5 += a_10*b_5;
c_10_6 += a_10*b_6;
c_10_7 += a_10*b_7;
c_10_8 += a_10*b_8;
c_10_9 += a_10*b_9;
c_10_10 += a_10*b_10;
a_0 = a_0*1.1f+1.7f;
a_1 = a_1*1.1f+1.7f;
a_2 = a_2*1.1f+1.7f;
a_3 = a_3*1.1f+1.7f;
a_4 = a_4*1.1f+1.7f;
a_5 = a_5*1.1f+1.7f;
a_6 = a_6*1.1f+1.7f;
a_7 = a_7*1.1f+1.7f;
a_8 = a_8*1.1f+1.7f;
a_9 = a_9*1.1f+1.7f;
a_10 = a_10*1.1f+1.7f;
b_0 = b_0*1.1f+1.7f;
b_1 = b_1*1.1f+1.7f;
b_2 = b_2*1.1f+1.7f;
b_3 = b_3*1.1f+1.7f;
b_4 = b_4*1.1f+1.7f;
b_5 = b_5*1.1f+1.7f;
b_6 = b_6*1.1f+1.7f;
b_7 = b_7*1.1f+1.7f;
b_8 = b_8*1.1f+1.7f;
b_9 = b_9*1.1f+1.7f;
b_10 = b_10*1.1f+1.7f;
}
C[(A_start_index+0)*C_width + B_start_index+0] = c_0_0;
C[(A_start_index+0)*C_width + B_start_index+1] = c_0_1;
C[(A_start_index+0)*C_width + B_start_index+2] = c_0_2;
C[(A_start_index+0)*C_width + B_start_index+3] = c_0_3;
C[(A_start_index+0)*C_width + B_start_index+4] = c_0_4;
C[(A_start_index+0)*C_width + B_start_index+5] = c_0_5;
C[(A_start_index+0)*C_width + B_start_index+6] = c_0_6;
C[(A_start_index+0)*C_width + B_start_index+7] = c_0_7;
C[(A_start_index+0)*C_width + B_start_index+8] = c_0_8;
C[(A_start_index+0)*C_width + B_start_index+9] = c_0_9;
C[(A_start_index+0)*C_width + B_start_index+10] = c_0_10;
C[(A_start_index+1)*C_width + B_start_index+0] = c_1_0;
C[(A_start_index+1)*C_width + B_start_index+1] = c_1_1;
C[(A_start_index+1)*C_width + B_start_index+2] = c_1_2;
C[(A_start_index+1)*C_width + B_start_index+3] = c_1_3;
C[(A_start_index+1)*C_width + B_start_index+4] = c_1_4;
C[(A_start_index+1)*C_width + B_start_index+5] = c_1_5;
C[(A_start_index+1)*C_width + B_start_index+6] = c_1_6;
C[(A_start_index+1)*C_width + B_start_index+7] = c_1_7;
C[(A_start_index+1)*C_width + B_start_index+8] = c_1_8;
C[(A_start_index+1)*C_width + B_start_index+9] = c_1_9;
C[(A_start_index+1)*C_width + B_start_index+10] = c_1_10;
C[(A_start_index+2)*C_width + B_start_index+0] = c_2_0;
C[(A_start_index+2)*C_width + B_start_index+1] = c_2_1;
C[(A_start_index+2)*C_width + B_start_index+2] = c_2_2;
C[(A_start_index+2)*C_width + B_start_index+3] = c_2_3;
C[(A_start_index+2)*C_width + B_start_index+4] = c_2_4;
C[(A_start_index+2)*C_width + B_start_index+5] = c_2_5;
C[(A_start_index+2)*C_width + B_start_index+6] = c_2_6;
C[(A_start_index+2)*C_width + B_start_index+7] = c_2_7;
C[(A_start_index+2)*C_width + B_start_index+8] = c_2_8;
C[(A_start_index+2)*C_width + B_start_index+9] = c_2_9;
C[(A_start_index+2)*C_width + B_start_index+10] = c_2_10;
C[(A_start_index+3)*C_width + B_start_index+0] = c_3_0;
C[(A_start_index+3)*C_width + B_start_index+1] = c_3_1;
C[(A_start_index+3)*C_width + B_start_index+2] = c_3_2;
C[(A_start_index+3)*C_width + B_start_index+3] = c_3_3;
C[(A_start_index+3)*C_width + B_start_index+4] = c_3_4;
C[(A_start_index+3)*C_width + B_start_index+5] = c_3_5;
C[(A_start_index+3)*C_width + B_start_index+6] = c_3_6;
C[(A_start_index+3)*C_width + B_start_index+7] = c_3_7;
C[(A_start_index+3)*C_width + B_start_index+8] = c_3_8;
C[(A_start_index+3)*C_width + B_start_index+9] = c_3_9;
C[(A_start_index+3)*C_width + B_start_index+10] = c_3_10;
C[(A_start_index+4)*C_width + B_start_index+0] = c_4_0;
C[(A_start_index+4)*C_width + B_start_index+1] = c_4_1;
C[(A_start_index+4)*C_width + B_start_index+2] = c_4_2;
C[(A_start_index+4)*C_width + B_start_index+3] = c_4_3;
C[(A_start_index+4)*C_width + B_start_index+4] = c_4_4;
C[(A_start_index+4)*C_width + B_start_index+5] = c_4_5;
C[(A_start_index+4)*C_width + B_start_index+6] = c_4_6;
C[(A_start_index+4)*C_width + B_start_index+7] = c_4_7;
C[(A_start_index+4)*C_width + B_start_index+8] = c_4_8;
C[(A_start_index+4)*C_width + B_start_index+9] = c_4_9;
C[(A_start_index+4)*C_width + B_start_index+10] = c_4_10;
C[(A_start_index+5)*C_width + B_start_index+0] = c_5_0;
C[(A_start_index+5)*C_width + B_start_index+1] = c_5_1;
C[(A_start_index+5)*C_width + B_start_index+2] = c_5_2;
C[(A_start_index+5)*C_width + B_start_index+3] = c_5_3;
C[(A_start_index+5)*C_width + B_start_index+4] = c_5_4;
C[(A_start_index+5)*C_width + B_start_index+5] = c_5_5;
C[(A_start_index+5)*C_width + B_start_index+6] = c_5_6;
C[(A_start_index+5)*C_width + B_start_index+7] = c_5_7;
C[(A_start_index+5)*C_width + B_start_index+8] = c_5_8;
C[(A_start_index+5)*C_width + B_start_index+9] = c_5_9;
C[(A_start_index+5)*C_width + B_start_index+10] = c_5_10;
C[(A_start_index+6)*C_width + B_start_index+0] = c_6_0;
C[(A_start_index+6)*C_width + B_start_index+1] = c_6_1;
C[(A_start_index+6)*C_width + B_start_index+2] = c_6_2;
C[(A_start_index+6)*C_width + B_start_index+3] = c_6_3;
C[(A_start_index+6)*C_width + B_start_index+4] = c_6_4;
C[(A_start_index+6)*C_width + B_start_index+5] = c_6_5;
C[(A_start_index+6)*C_width + B_start_index+6] = c_6_6;
C[(A_start_index+6)*C_width + B_start_index+7] = c_6_7;
C[(A_start_index+6)*C_width + B_start_index+8] = c_6_8;
C[(A_start_index+6)*C_width + B_start_index+9] = c_6_9;
C[(A_start_index+6)*C_width + B_start_index+10] = c_6_10;
C[(A_start_index+7)*C_width + B_start_index+0] = c_7_0;
C[(A_start_index+7)*C_width + B_start_index+1] = c_7_1;
C[(A_start_index+7)*C_width + B_start_index+2] = c_7_2;
C[(A_start_index+7)*C_width + B_start_index+3] = c_7_3;
C[(A_start_index+7)*C_width + B_start_index+4] = c_7_4;
C[(A_start_index+7)*C_width + B_start_index+5] = c_7_5;
C[(A_start_index+7)*C_width + B_start_index+6] = c_7_6;
C[(A_start_index+7)*C_width + B_start_index+7] = c_7_7;
C[(A_start_index+7)*C_width + B_start_index+8] = c_7_8;
C[(A_start_index+7)*C_width + B_start_index+9] = c_7_9;
C[(A_start_index+7)*C_width + B_start_index+10] = c_7_10;
C[(A_start_index+8)*C_width + B_start_index+0] = c_8_0;
C[(A_start_index+8)*C_width + B_start_index+1] = c_8_1;
C[(A_start_index+8)*C_width + B_start_index+2] = c_8_2;
C[(A_start_index+8)*C_width + B_start_index+3] = c_8_3;
C[(A_start_index+8)*C_width + B_start_index+4] = c_8_4;
C[(A_start_index+8)*C_width + B_start_index+5] = c_8_5;
C[(A_start_index+8)*C_width + B_start_index+6] = c_8_6;
C[(A_start_index+8)*C_width + B_start_index+7] = c_8_7;
C[(A_start_index+8)*C_width + B_start_index+8] = c_8_8;
C[(A_start_index+8)*C_width + B_start_index+9] = c_8_9;
C[(A_start_index+8)*C_width + B_start_index+10] = c_8_10;
C[(A_start_index+9)*C_width + B_start_index+0] = c_9_0;
C[(A_start_index+9)*C_width + B_start_index+1] = c_9_1;
C[(A_start_index+9)*C_width + B_start_index+2] = c_9_2;
C[(A_start_index+9)*C_width + B_start_index+3] = c_9_3;
C[(A_start_index+9)*C_width + B_start_index+4] = c_9_4;
C[(A_start_index+9)*C_width + B_start_index+5] = c_9_5;
C[(A_start_index+9)*C_width + B_start_index+6] = c_9_6;
C[(A_start_index+9)*C_width + B_start_index+7] = c_9_7;
C[(A_start_index+9)*C_width + B_start_index+8] = c_9_8;
C[(A_start_index+9)*C_width + B_start_index+9] = c_9_9;
C[(A_start_index+9)*C_width + B_start_index+10] = c_9_10;
C[(A_start_index+10)*C_width + B_start_index+0] = c_10_0;
C[(A_start_index+10)*C_width + B_start_index+1] = c_10_1;
C[(A_start_index+10)*C_width + B_start_index+2] = c_10_2;
C[(A_start_index+10)*C_width + B_start_index+3] = c_10_3;
C[(A_start_index+10)*C_width + B_start_index+4] = c_10_4;
C[(A_start_index+10)*C_width + B_start_index+5] = c_10_5;
C[(A_start_index+10)*C_width + B_start_index+6] = c_10_6;
C[(A_start_index+10)*C_width + B_start_index+7] = c_10_7;
C[(A_start_index+10)*C_width + B_start_index+8] = c_10_8;
C[(A_start_index+10)*C_width + B_start_index+9] = c_10_9;
C[(A_start_index+10)*C_width + B_start_index+10] = c_10_10;
}
| d476d2985c84bc29395469c780276dfaf959e817.cu | # 1 "vecmultKernel00.cu"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h" 1
# 119 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h"
# 1 "/usr/include/features.h" 1 3 4
# 361 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 365 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 366 "/usr/include/sys/cdefs.h" 2 3 4
# 362 "/usr/include/features.h" 2 3 4
# 385 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4
# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
# 10 "/usr/include/gnu/stubs.h" 2 3 4
# 386 "/usr/include/features.h" 2 3 4
# 120 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_config.h" 2
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 56 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h" 1
# 53 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/host_defines.h" 1
# 54 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_types.h" 2
enum __attribute__((device_builtin)) cudaRoundMode
{
cudaRoundNearest,
cudaRoundZero,
cudaRoundPosInf,
cudaRoundMinInf
};
# 57 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h" 1
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/syslimits.h" 1 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 145 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 157 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 39 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 40 "/usr/include/bits/local_lim.h" 2 3 4
# 158 "/usr/include/bits/posix1_lim.h" 2 3 4
# 146 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 150 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
# 34 "/usr/include/bits/xopen_lim.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
# 154 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h" 2 3 4
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 149 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 211 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 72 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h" 2
# 128 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
enum __attribute__((device_builtin)) cudaError
{
cudaSuccess = 0,
cudaErrorMissingConfiguration = 1,
cudaErrorMemoryAllocation = 2,
cudaErrorInitializationError = 3,
# 163 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorLaunchFailure = 4,
# 172 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorPriorLaunchFailure = 5,
# 182 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorLaunchTimeout = 6,
# 191 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorLaunchOutOfResources = 7,
cudaErrorInvalidDeviceFunction = 8,
# 206 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorInvalidConfiguration = 9,
cudaErrorInvalidDevice = 10,
cudaErrorInvalidValue = 11,
cudaErrorInvalidPitchValue = 12,
cudaErrorInvalidSymbol = 13,
cudaErrorMapBufferObjectFailed = 14,
cudaErrorUnmapBufferObjectFailed = 15,
cudaErrorInvalidHostPointer = 16,
cudaErrorInvalidDevicePointer = 17,
cudaErrorInvalidTexture = 18,
cudaErrorInvalidTextureBinding = 19,
cudaErrorInvalidChannelDescriptor = 20,
cudaErrorInvalidMemcpyDirection = 21,
# 287 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorAddressOfConstant = 22,
# 296 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorTextureFetchFailed = 23,
# 305 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorTextureNotBound = 24,
# 314 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorSynchronizationError = 25,
cudaErrorInvalidFilterSetting = 26,
cudaErrorInvalidNormSetting = 27,
cudaErrorMixedDeviceExecution = 28,
cudaErrorCudartUnloading = 29,
cudaErrorUnknown = 30,
cudaErrorNotYetImplemented = 31,
# 363 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorMemoryValueTooLarge = 32,
cudaErrorInvalidResourceHandle = 33,
cudaErrorNotReady = 34,
cudaErrorInsufficientDriver = 35,
# 398 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorSetOnActiveProcess = 36,
cudaErrorInvalidSurface = 37,
cudaErrorNoDevice = 38,
cudaErrorECCUncorrectable = 39,
cudaErrorSharedObjectSymbolNotFound = 40,
cudaErrorSharedObjectInitFailed = 41,
cudaErrorUnsupportedLimit = 42,
cudaErrorDuplicateVariableName = 43,
cudaErrorDuplicateTextureName = 44,
cudaErrorDuplicateSurfaceName = 45,
# 460 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorDevicesUnavailable = 46,
cudaErrorInvalidKernelImage = 47,
cudaErrorNoKernelImageForDevice = 48,
# 486 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorIncompatibleDriverContext = 49,
cudaErrorPeerAccessAlreadyEnabled = 50,
cudaErrorPeerAccessNotEnabled = 51,
cudaErrorDeviceAlreadyInUse = 54,
cudaErrorProfilerDisabled = 55,
cudaErrorProfilerNotInitialized = 56,
cudaErrorProfilerAlreadyStarted = 57,
cudaErrorProfilerAlreadyStopped = 58,
cudaErrorAssert = 59,
cudaErrorTooManyPeers = 60,
cudaErrorHostMemoryAlreadyRegistered = 61,
cudaErrorHostMemoryNotRegistered = 62,
cudaErrorOperatingSystem = 63,
cudaErrorPeerAccessUnsupported = 64,
cudaErrorLaunchMaxDepthExceeded = 65,
cudaErrorLaunchFileScopedTex = 66,
cudaErrorLaunchFileScopedSurf = 67,
# 611 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorSyncDepthExceeded = 68,
# 623 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorLaunchPendingCountExceeded = 69,
cudaErrorNotPermitted = 70,
cudaErrorNotSupported = 71,
# 643 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorHardwareStackError = 72,
cudaErrorIllegalInstruction = 73,
# 660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorMisalignedAddress = 74,
# 671 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
cudaErrorInvalidAddressSpace = 75,
cudaErrorInvalidPc = 76,
cudaErrorIllegalAddress = 77,
cudaErrorStartupFailure = 0x7f,
cudaErrorApiFailureBase = 10000
};
enum __attribute__((device_builtin)) cudaChannelFormatKind
{
cudaChannelFormatKindSigned = 0,
cudaChannelFormatKindUnsigned = 1,
cudaChannelFormatKindFloat = 2,
cudaChannelFormatKindNone = 3
};
struct __attribute__((device_builtin)) cudaChannelFormatDesc
{
int x;
int y;
int z;
int w;
enum cudaChannelFormatKind f;
};
typedef struct cudaArray *cudaArray_t;
typedef const struct cudaArray *cudaArray_const_t;
struct cudaArray;
typedef struct cudaMipmappedArray *cudaMipmappedArray_t;
typedef const struct cudaMipmappedArray *cudaMipmappedArray_const_t;
struct cudaMipmappedArray;
enum __attribute__((device_builtin)) cudaMemoryType
{
cudaMemoryTypeHost = 1,
cudaMemoryTypeDevice = 2
};
enum __attribute__((device_builtin)) cudaMemcpyKind
{
cudaMemcpyHostToHost = 0,
cudaMemcpyHostToDevice = 1,
cudaMemcpyDeviceToHost = 2,
cudaMemcpyDeviceToDevice = 3,
cudaMemcpyDefault = 4
};
struct __attribute__((device_builtin)) cudaPitchedPtr
{
void *ptr;
size_t pitch;
size_t xsize;
size_t ysize;
};
struct __attribute__((device_builtin)) cudaExtent
{
size_t width;
size_t height;
size_t depth;
};
struct __attribute__((device_builtin)) cudaPos
{
size_t x;
size_t y;
size_t z;
};
struct __attribute__((device_builtin)) cudaMemcpy3DParms
{
cudaArray_t srcArray;
struct cudaPos srcPos;
struct cudaPitchedPtr srcPtr;
cudaArray_t dstArray;
struct cudaPos dstPos;
struct cudaPitchedPtr dstPtr;
struct cudaExtent extent;
enum cudaMemcpyKind kind;
};
struct __attribute__((device_builtin)) cudaMemcpy3DPeerParms
{
cudaArray_t srcArray;
struct cudaPos srcPos;
struct cudaPitchedPtr srcPtr;
int srcDevice;
cudaArray_t dstArray;
struct cudaPos dstPos;
struct cudaPitchedPtr dstPtr;
int dstDevice;
struct cudaExtent extent;
};
struct cudaGraphicsResource;
enum __attribute__((device_builtin)) cudaGraphicsRegisterFlags
{
cudaGraphicsRegisterFlagsNone = 0,
cudaGraphicsRegisterFlagsReadOnly = 1,
cudaGraphicsRegisterFlagsWriteDiscard = 2,
cudaGraphicsRegisterFlagsSurfaceLoadStore = 4,
cudaGraphicsRegisterFlagsTextureGather = 8
};
enum __attribute__((device_builtin)) cudaGraphicsMapFlags
{
cudaGraphicsMapFlagsNone = 0,
cudaGraphicsMapFlagsReadOnly = 1,
cudaGraphicsMapFlagsWriteDiscard = 2
};
enum __attribute__((device_builtin)) cudaGraphicsCubeFace
{
cudaGraphicsCubeFacePositiveX = 0x00,
cudaGraphicsCubeFaceNegativeX = 0x01,
cudaGraphicsCubeFacePositiveY = 0x02,
cudaGraphicsCubeFaceNegativeY = 0x03,
cudaGraphicsCubeFacePositiveZ = 0x04,
cudaGraphicsCubeFaceNegativeZ = 0x05
};
enum __attribute__((device_builtin)) cudaResourceType
{
cudaResourceTypeArray = 0x00,
cudaResourceTypeMipmappedArray = 0x01,
cudaResourceTypeLinear = 0x02,
cudaResourceTypePitch2D = 0x03
};
enum __attribute__((device_builtin)) cudaResourceViewFormat
{
cudaResViewFormatNone = 0x00,
cudaResViewFormatUnsignedChar1 = 0x01,
cudaResViewFormatUnsignedChar2 = 0x02,
cudaResViewFormatUnsignedChar4 = 0x03,
cudaResViewFormatSignedChar1 = 0x04,
cudaResViewFormatSignedChar2 = 0x05,
cudaResViewFormatSignedChar4 = 0x06,
cudaResViewFormatUnsignedShort1 = 0x07,
cudaResViewFormatUnsignedShort2 = 0x08,
cudaResViewFormatUnsignedShort4 = 0x09,
cudaResViewFormatSignedShort1 = 0x0a,
cudaResViewFormatSignedShort2 = 0x0b,
cudaResViewFormatSignedShort4 = 0x0c,
cudaResViewFormatUnsignedInt1 = 0x0d,
cudaResViewFormatUnsignedInt2 = 0x0e,
cudaResViewFormatUnsignedInt4 = 0x0f,
cudaResViewFormatSignedInt1 = 0x10,
cudaResViewFormatSignedInt2 = 0x11,
cudaResViewFormatSignedInt4 = 0x12,
cudaResViewFormatHalf1 = 0x13,
cudaResViewFormatHalf2 = 0x14,
cudaResViewFormatHalf4 = 0x15,
cudaResViewFormatFloat1 = 0x16,
cudaResViewFormatFloat2 = 0x17,
cudaResViewFormatFloat4 = 0x18,
cudaResViewFormatUnsignedBlockCompressed1 = 0x19,
cudaResViewFormatUnsignedBlockCompressed2 = 0x1a,
cudaResViewFormatUnsignedBlockCompressed3 = 0x1b,
cudaResViewFormatUnsignedBlockCompressed4 = 0x1c,
cudaResViewFormatSignedBlockCompressed4 = 0x1d,
cudaResViewFormatUnsignedBlockCompressed5 = 0x1e,
cudaResViewFormatSignedBlockCompressed5 = 0x1f,
cudaResViewFormatUnsignedBlockCompressed6H = 0x20,
cudaResViewFormatSignedBlockCompressed6H = 0x21,
cudaResViewFormatUnsignedBlockCompressed7 = 0x22
};
struct __attribute__((device_builtin)) cudaResourceDesc {
enum cudaResourceType resType;
union {
struct {
cudaArray_t array;
} array;
struct {
cudaMipmappedArray_t mipmap;
} mipmap;
struct {
void *devPtr;
struct cudaChannelFormatDesc desc;
size_t sizeInBytes;
} linear;
struct {
void *devPtr;
struct cudaChannelFormatDesc desc;
size_t width;
size_t height;
size_t pitchInBytes;
} pitch2D;
} res;
};
struct __attribute__((device_builtin)) cudaResourceViewDesc
{
enum cudaResourceViewFormat format;
size_t width;
size_t height;
size_t depth;
unsigned int firstMipmapLevel;
unsigned int lastMipmapLevel;
unsigned int firstLayer;
unsigned int lastLayer;
};
struct __attribute__((device_builtin)) cudaPointerAttributes
{
enum cudaMemoryType memoryType;
# 997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
int device;
void *devicePointer;
void *hostPointer;
int isManaged;
};
struct __attribute__((device_builtin)) cudaFuncAttributes
{
size_t sharedSizeBytes;
size_t constSizeBytes;
size_t localSizeBytes;
int maxThreadsPerBlock;
int numRegs;
int ptxVersion;
int binaryVersion;
int cacheModeCA;
};
enum __attribute__((device_builtin)) cudaFuncCache
{
cudaFuncCachePreferNone = 0,
cudaFuncCachePreferShared = 1,
cudaFuncCachePreferL1 = 2,
cudaFuncCachePreferEqual = 3
};
enum __attribute__((device_builtin)) cudaSharedMemConfig
{
cudaSharedMemBankSizeDefault = 0,
cudaSharedMemBankSizeFourByte = 1,
cudaSharedMemBankSizeEightByte = 2
};
enum __attribute__((device_builtin)) cudaComputeMode
{
cudaComputeModeDefault = 0,
cudaComputeModeExclusive = 1,
cudaComputeModeProhibited = 2,
cudaComputeModeExclusiveProcess = 3
};
enum __attribute__((device_builtin)) cudaLimit
{
cudaLimitStackSize = 0x00,
cudaLimitPrintfFifoSize = 0x01,
cudaLimitMallocHeapSize = 0x02,
cudaLimitDevRuntimeSyncDepth = 0x03,
cudaLimitDevRuntimePendingLaunchCount = 0x04
};
enum __attribute__((device_builtin)) cudaOutputMode
{
cudaKeyValuePair = 0x00,
cudaCSV = 0x01
};
enum __attribute__((device_builtin)) cudaDeviceAttr
{
cudaDevAttrMaxThreadsPerBlock = 1,
cudaDevAttrMaxBlockDimX = 2,
cudaDevAttrMaxBlockDimY = 3,
cudaDevAttrMaxBlockDimZ = 4,
cudaDevAttrMaxGridDimX = 5,
cudaDevAttrMaxGridDimY = 6,
cudaDevAttrMaxGridDimZ = 7,
cudaDevAttrMaxSharedMemoryPerBlock = 8,
cudaDevAttrTotalConstantMemory = 9,
cudaDevAttrWarpSize = 10,
cudaDevAttrMaxPitch = 11,
cudaDevAttrMaxRegistersPerBlock = 12,
cudaDevAttrClockRate = 13,
cudaDevAttrTextureAlignment = 14,
cudaDevAttrGpuOverlap = 15,
cudaDevAttrMultiProcessorCount = 16,
cudaDevAttrKernelExecTimeout = 17,
cudaDevAttrIntegrated = 18,
cudaDevAttrCanMapHostMemory = 19,
cudaDevAttrComputeMode = 20,
cudaDevAttrMaxTexture1DWidth = 21,
cudaDevAttrMaxTexture2DWidth = 22,
cudaDevAttrMaxTexture2DHeight = 23,
cudaDevAttrMaxTexture3DWidth = 24,
cudaDevAttrMaxTexture3DHeight = 25,
cudaDevAttrMaxTexture3DDepth = 26,
cudaDevAttrMaxTexture2DLayeredWidth = 27,
cudaDevAttrMaxTexture2DLayeredHeight = 28,
cudaDevAttrMaxTexture2DLayeredLayers = 29,
cudaDevAttrSurfaceAlignment = 30,
cudaDevAttrConcurrentKernels = 31,
cudaDevAttrEccEnabled = 32,
cudaDevAttrPciBusId = 33,
cudaDevAttrPciDeviceId = 34,
cudaDevAttrTccDriver = 35,
cudaDevAttrMemoryClockRate = 36,
cudaDevAttrGlobalMemoryBusWidth = 37,
cudaDevAttrL2CacheSize = 38,
cudaDevAttrMaxThreadsPerMultiProcessor = 39,
cudaDevAttrAsyncEngineCount = 40,
cudaDevAttrUnifiedAddressing = 41,
cudaDevAttrMaxTexture1DLayeredWidth = 42,
cudaDevAttrMaxTexture1DLayeredLayers = 43,
cudaDevAttrMaxTexture2DGatherWidth = 45,
cudaDevAttrMaxTexture2DGatherHeight = 46,
cudaDevAttrMaxTexture3DWidthAlt = 47,
cudaDevAttrMaxTexture3DHeightAlt = 48,
cudaDevAttrMaxTexture3DDepthAlt = 49,
cudaDevAttrPciDomainId = 50,
cudaDevAttrTexturePitchAlignment = 51,
cudaDevAttrMaxTextureCubemapWidth = 52,
cudaDevAttrMaxTextureCubemapLayeredWidth = 53,
cudaDevAttrMaxTextureCubemapLayeredLayers = 54,
cudaDevAttrMaxSurface1DWidth = 55,
cudaDevAttrMaxSurface2DWidth = 56,
cudaDevAttrMaxSurface2DHeight = 57,
cudaDevAttrMaxSurface3DWidth = 58,
cudaDevAttrMaxSurface3DHeight = 59,
cudaDevAttrMaxSurface3DDepth = 60,
cudaDevAttrMaxSurface1DLayeredWidth = 61,
cudaDevAttrMaxSurface1DLayeredLayers = 62,
cudaDevAttrMaxSurface2DLayeredWidth = 63,
cudaDevAttrMaxSurface2DLayeredHeight = 64,
cudaDevAttrMaxSurface2DLayeredLayers = 65,
cudaDevAttrMaxSurfaceCubemapWidth = 66,
cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67,
cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68,
cudaDevAttrMaxTexture1DLinearWidth = 69,
cudaDevAttrMaxTexture2DLinearWidth = 70,
cudaDevAttrMaxTexture2DLinearHeight = 71,
cudaDevAttrMaxTexture2DLinearPitch = 72,
cudaDevAttrMaxTexture2DMipmappedWidth = 73,
cudaDevAttrMaxTexture2DMipmappedHeight = 74,
cudaDevAttrComputeCapabilityMajor = 75,
cudaDevAttrComputeCapabilityMinor = 76,
cudaDevAttrMaxTexture1DMipmappedWidth = 77,
cudaDevAttrStreamPrioritiesSupported = 78,
cudaDevAttrGlobalL1CacheSupported = 79,
cudaDevAttrLocalL1CacheSupported = 80,
cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81,
cudaDevAttrMaxRegistersPerMultiprocessor = 82,
cudaDevAttrManagedMemory = 83,
cudaDevAttrIsMultiGpuBoard = 84,
cudaDevAttrMultiGpuBoardGroupID = 85
};
struct __attribute__((device_builtin)) cudaDeviceProp
{
char name[256];
size_t totalGlobalMem;
size_t sharedMemPerBlock;
int regsPerBlock;
int warpSize;
size_t memPitch;
int maxThreadsPerBlock;
int maxThreadsDim[3];
int maxGridSize[3];
int clockRate;
size_t totalConstMem;
int major;
int minor;
size_t textureAlignment;
size_t texturePitchAlignment;
int deviceOverlap;
int multiProcessorCount;
int kernelExecTimeoutEnabled;
int integrated;
int canMapHostMemory;
int computeMode;
int maxTexture1D;
int maxTexture1DMipmap;
int maxTexture1DLinear;
int maxTexture2D[2];
int maxTexture2DMipmap[2];
int maxTexture2DLinear[3];
int maxTexture2DGather[2];
int maxTexture3D[3];
int maxTexture3DAlt[3];
int maxTextureCubemap;
int maxTexture1DLayered[2];
int maxTexture2DLayered[3];
int maxTextureCubemapLayered[2];
int maxSurface1D;
int maxSurface2D[2];
int maxSurface3D[3];
int maxSurface1DLayered[2];
int maxSurface2DLayered[3];
int maxSurfaceCubemap;
int maxSurfaceCubemapLayered[2];
size_t surfaceAlignment;
int concurrentKernels;
int ECCEnabled;
int pciBusID;
int pciDeviceID;
int pciDomainID;
int tccDriver;
int asyncEngineCount;
int unifiedAddressing;
int memoryClockRate;
int memoryBusWidth;
int l2CacheSize;
int maxThreadsPerMultiProcessor;
int streamPrioritiesSupported;
int globalL1CacheSupported;
int localL1CacheSupported;
size_t sharedMemPerMultiprocessor;
int regsPerMultiprocessor;
int managedMemory;
int isMultiGpuBoard;
int multiGpuBoardGroupID;
};
# 1361 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
typedef __attribute__((device_builtin)) struct __attribute__((device_builtin)) cudaIpcEventHandle_st
{
char reserved[64];
}cudaIpcEventHandle_t;
typedef __attribute__((device_builtin)) struct __attribute__((device_builtin)) cudaIpcMemHandle_st
{
char reserved[64];
}cudaIpcMemHandle_t;
# 1383 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_types.h"
typedef __attribute__((device_builtin)) enum cudaError cudaError_t;
typedef __attribute__((device_builtin)) struct CUstream_st *cudaStream_t;
typedef __attribute__((device_builtin)) struct CUevent_st *cudaEvent_t;
typedef __attribute__((device_builtin)) struct cudaGraphicsResource *cudaGraphicsResource_t;
typedef __attribute__((device_builtin)) struct CUuuid_st cudaUUID_t;
typedef __attribute__((device_builtin)) enum cudaOutputMode cudaOutputMode_t;
# 58 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_types.h"
enum __attribute__((device_builtin)) cudaSurfaceBoundaryMode
{
cudaBoundaryModeZero = 0,
cudaBoundaryModeClamp = 1,
cudaBoundaryModeTrap = 2
};
enum __attribute__((device_builtin)) cudaSurfaceFormatMode
{
cudaFormatModeForced = 0,
cudaFormatModeAuto = 1
};
struct __attribute__((device_builtin)) surfaceReference
{
struct cudaChannelFormatDesc channelDesc;
};
typedef __attribute__((device_builtin)) unsigned long long cudaSurfaceObject_t;
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_types.h"
enum __attribute__((device_builtin)) cudaTextureAddressMode
{
cudaAddressModeWrap = 0,
cudaAddressModeClamp = 1,
cudaAddressModeMirror = 2,
cudaAddressModeBorder = 3
};
enum __attribute__((device_builtin)) cudaTextureFilterMode
{
cudaFilterModePoint = 0,
cudaFilterModeLinear = 1
};
enum __attribute__((device_builtin)) cudaTextureReadMode
{
cudaReadModeElementType = 0,
cudaReadModeNormalizedFloat = 1
};
struct __attribute__((device_builtin)) textureReference
{
int normalized;
enum cudaTextureFilterMode filterMode;
enum cudaTextureAddressMode addressMode[3];
struct cudaChannelFormatDesc channelDesc;
int sRGB;
unsigned int maxAnisotropy;
enum cudaTextureFilterMode mipmapFilterMode;
float mipmapLevelBias;
float minMipmapLevelClamp;
float maxMipmapLevelClamp;
int __cudaReserved[15];
};
struct __attribute__((device_builtin)) cudaTextureDesc
{
enum cudaTextureAddressMode addressMode[3];
enum cudaTextureFilterMode filterMode;
enum cudaTextureReadMode readMode;
int sRGB;
int normalizedCoords;
unsigned int maxAnisotropy;
enum cudaTextureFilterMode mipmapFilterMode;
float mipmapLevelBias;
float minMipmapLevelClamp;
float maxMipmapLevelClamp;
};
typedef __attribute__((device_builtin)) unsigned long long cudaTextureObject_t;
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h" 2
# 96 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h"
struct __attribute__((device_builtin)) char1
{
signed char x;
};
struct __attribute__((device_builtin)) uchar1
{
unsigned char x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2))) char2
{
signed char x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2))) uchar2
{
unsigned char x, y;
};
struct __attribute__((device_builtin)) char3
{
signed char x, y, z;
};
struct __attribute__((device_builtin)) uchar3
{
unsigned char x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) char4
{
signed char x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) uchar4
{
unsigned char x, y, z, w;
};
struct __attribute__((device_builtin)) short1
{
short x;
};
struct __attribute__((device_builtin)) ushort1
{
unsigned short x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) short2
{
short x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(4))) ushort2
{
unsigned short x, y;
};
struct __attribute__((device_builtin)) short3
{
short x, y, z;
};
struct __attribute__((device_builtin)) ushort3
{
unsigned short x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(8))) short4 { short x; short y; short z; short w; };
struct __attribute__((device_builtin)) __attribute__((aligned(8))) ushort4 { unsigned short x; unsigned short y; unsigned short z; unsigned short w; };
struct __attribute__((device_builtin)) int1
{
int x;
};
struct __attribute__((device_builtin)) uint1
{
unsigned int x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(8))) int2 { int x; int y; };
struct __attribute__((device_builtin)) __attribute__((aligned(8))) uint2 { unsigned int x; unsigned int y; };
struct __attribute__((device_builtin)) int3
{
int x, y, z;
};
struct __attribute__((device_builtin)) uint3
{
unsigned int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) int4
{
int x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) uint4
{
unsigned int x, y, z, w;
};
struct __attribute__((device_builtin)) long1
{
long int x;
};
struct __attribute__((device_builtin)) ulong1
{
unsigned long x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2*sizeof(long int)))) long2
{
long int x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(2*sizeof(unsigned long int)))) ulong2
{
unsigned long int x, y;
};
struct __attribute__((device_builtin)) long3
{
long int x, y, z;
};
struct __attribute__((device_builtin)) ulong3
{
unsigned long int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) long4
{
long int x, y, z, w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulong4
{
unsigned long int x, y, z, w;
};
struct __attribute__((device_builtin)) float1
{
float x;
};
# 272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h"
struct __attribute__((device_builtin)) __attribute__((aligned(8))) float2 { float x; float y; };
struct __attribute__((device_builtin)) float3
{
float x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) float4
{
float x, y, z, w;
};
struct __attribute__((device_builtin)) longlong1
{
long long int x;
};
struct __attribute__((device_builtin)) ulonglong1
{
unsigned long long int x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) longlong2
{
long long int x, y;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulonglong2
{
unsigned long long int x, y;
};
struct __attribute__((device_builtin)) longlong3
{
long long int x, y, z;
};
struct __attribute__((device_builtin)) ulonglong3
{
unsigned long long int x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) longlong4
{
long long int x, y, z ,w;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) ulonglong4
{
unsigned long long int x, y, z, w;
};
struct __attribute__((device_builtin)) double1
{
double x;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) double2
{
double x, y;
};
struct __attribute__((device_builtin)) double3
{
double x, y, z;
};
struct __attribute__((device_builtin)) __attribute__((aligned(16))) double4
{
double x, y, z, w;
};
# 360 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_types.h"
typedef __attribute__((device_builtin)) struct char1 char1;
typedef __attribute__((device_builtin)) struct uchar1 uchar1;
typedef __attribute__((device_builtin)) struct char2 char2;
typedef __attribute__((device_builtin)) struct uchar2 uchar2;
typedef __attribute__((device_builtin)) struct char3 char3;
typedef __attribute__((device_builtin)) struct uchar3 uchar3;
typedef __attribute__((device_builtin)) struct char4 char4;
typedef __attribute__((device_builtin)) struct uchar4 uchar4;
typedef __attribute__((device_builtin)) struct short1 short1;
typedef __attribute__((device_builtin)) struct ushort1 ushort1;
typedef __attribute__((device_builtin)) struct short2 short2;
typedef __attribute__((device_builtin)) struct ushort2 ushort2;
typedef __attribute__((device_builtin)) struct short3 short3;
typedef __attribute__((device_builtin)) struct ushort3 ushort3;
typedef __attribute__((device_builtin)) struct short4 short4;
typedef __attribute__((device_builtin)) struct ushort4 ushort4;
typedef __attribute__((device_builtin)) struct int1 int1;
typedef __attribute__((device_builtin)) struct uint1 uint1;
typedef __attribute__((device_builtin)) struct int2 int2;
typedef __attribute__((device_builtin)) struct uint2 uint2;
typedef __attribute__((device_builtin)) struct int3 int3;
typedef __attribute__((device_builtin)) struct uint3 uint3;
typedef __attribute__((device_builtin)) struct int4 int4;
typedef __attribute__((device_builtin)) struct uint4 uint4;
typedef __attribute__((device_builtin)) struct long1 long1;
typedef __attribute__((device_builtin)) struct ulong1 ulong1;
typedef __attribute__((device_builtin)) struct long2 long2;
typedef __attribute__((device_builtin)) struct ulong2 ulong2;
typedef __attribute__((device_builtin)) struct long3 long3;
typedef __attribute__((device_builtin)) struct ulong3 ulong3;
typedef __attribute__((device_builtin)) struct long4 long4;
typedef __attribute__((device_builtin)) struct ulong4 ulong4;
typedef __attribute__((device_builtin)) struct float1 float1;
typedef __attribute__((device_builtin)) struct float2 float2;
typedef __attribute__((device_builtin)) struct float3 float3;
typedef __attribute__((device_builtin)) struct float4 float4;
typedef __attribute__((device_builtin)) struct longlong1 longlong1;
typedef __attribute__((device_builtin)) struct ulonglong1 ulonglong1;
typedef __attribute__((device_builtin)) struct longlong2 longlong2;
typedef __attribute__((device_builtin)) struct ulonglong2 ulonglong2;
typedef __attribute__((device_builtin)) struct longlong3 longlong3;
typedef __attribute__((device_builtin)) struct ulonglong3 ulonglong3;
typedef __attribute__((device_builtin)) struct longlong4 longlong4;
typedef __attribute__((device_builtin)) struct ulonglong4 ulonglong4;
typedef __attribute__((device_builtin)) struct double1 double1;
typedef __attribute__((device_builtin)) struct double2 double2;
typedef __attribute__((device_builtin)) struct double3 double3;
typedef __attribute__((device_builtin)) struct double4 double4;
struct __attribute__((device_builtin)) dim3
{
unsigned int x, y, z;
__attribute__((host)) __attribute__((device)) dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
__attribute__((host)) __attribute__((device)) dim3(uint3 v) : x(v.x), y(v.y), z(v.z) {}
__attribute__((host)) __attribute__((device)) operator uint3(void) { uint3 t; t.x = x; t.y = y; t.z = z; return t; }
};
typedef __attribute__((device_builtin)) struct dim3 dim3;
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 2
# 68 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/channel_descriptor.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/channel_descriptor.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h" 1
# 143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 144 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_device_runtime_api.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_device_runtime_api.h"
extern "C"
{
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceSynchronize(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaGetLastError(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaPeekAtLastError(void);
extern __attribute__((device)) __attribute__((cudart_builtin)) const char* cudaGetErrorString(cudaError_t error);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaGetDeviceCount(int *count);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaGetDevice(int *device);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaStreamDestroy(cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaEventDestroy(cudaEvent_t event);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaFree(void *devPtr);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMalloc(void **devPtr, size_t size);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaRuntimeGetVersion(int *runtimeVersion);
extern __attribute__((device)) __attribute__((cudart_builtin)) void * cudaGetParameterBuffer(size_t alignment, size_t size);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaLaunchDevice(void *func, void *parameterBuffer, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize, cudaStream_t stream);
extern __attribute__((device)) __attribute__((cudart_builtin)) void * cudaGetParameterBufferV2(void *func, dim3 gridDimension, dim3 blockDimension, unsigned int sharedMemSize);
extern __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaLaunchDeviceV2(void *parameterBuffer, cudaStream_t stream);
}
namespace {
template <typename T> __inline__ __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaMalloc(T **devPtr, size_t size);
template <typename T> __inline__ __attribute__((device)) __attribute__((cudart_builtin)) cudaError_t cudaFuncGetAttributes(struct cudaFuncAttributes *attr, T *entry);
}
# 145 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h" 2
# 174 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern "C" {
# 207 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceReset(void);
# 224 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceSynchronize(void);
# 309 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceSetLimit(enum cudaLimit limit, size_t value);
# 338 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit);
# 369 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig);
# 404 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetStreamPriorityRange(int *leastPriority, int *greatestPriority);
# 446 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceSetCacheConfig(enum cudaFuncCache cacheConfig);
# 475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig);
# 517 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceSetSharedMemConfig(enum cudaSharedMemConfig config);
# 540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceGetByPCIBusId(int *device, const char *pciBusId);
# 567 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceGetPCIBusId(char *pciBusId, int len, int device);
# 609 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t *handle, cudaEvent_t event);
# 644 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaIpcOpenEventHandle(cudaEvent_t *event, cudaIpcEventHandle_t handle);
# 682 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t *handle, void *devPtr);
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaIpcOpenMemHandle(void **devPtr, cudaIpcMemHandle_t handle, unsigned int flags);
# 762 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaIpcCloseMemHandle(void *devPtr);
# 802 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadExit(void);
# 826 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadSynchronize(void);
# 885 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadSetLimit(enum cudaLimit limit, size_t value);
# 916 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadGetLimit(size_t *pValue, enum cudaLimit limit);
# 951 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadGetCacheConfig(enum cudaFuncCache *pCacheConfig);
# 997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaThreadSetCacheConfig(enum cudaFuncCache cacheConfig);
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaGetLastError(void);
# 1092 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaPeekAtLastError(void);
# 1106 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) const char* cudaGetErrorString(cudaError_t error);
# 1136 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaGetDeviceCount(int *count);
# 1372 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaGetDeviceProperties(struct cudaDeviceProp *prop, int device);
# 1532 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device);
# 1551 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaChooseDevice(int *device, const struct cudaDeviceProp *prop);
# 1585 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetDevice(int device);
# 1602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaGetDevice(int *device);
# 1631 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetValidDevices(int *device_arr, int len);
# 1691 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetDeviceFlags( unsigned int flags );
# 1729 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaStreamCreate(cudaStream_t *pStream);
# 1758 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags);
# 1801 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamCreateWithPriority(cudaStream_t *pStream, unsigned int flags, int priority);
# 1825 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int *priority);
# 1846 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int *flags);
# 1867 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamDestroy(cudaStream_t stream);
# 1899 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
# 1913 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
typedef void ( *cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void *userData);
# 1975 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaStreamAddCallback(cudaStream_t stream,
cudaStreamCallback_t callback, void *userData, unsigned int flags);
# 1995 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaStreamSynchronize(cudaStream_t stream);
# 2016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaStreamQuery(cudaStream_t stream);
# 2082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void *devPtr, size_t length, unsigned int flags);
# 2118 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaEventCreate(cudaEvent_t *event);
# 2152 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags);
# 2183 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream = 0);
# 2215 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaEventQuery(cudaEvent_t event);
# 2247 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaEventSynchronize(cudaEvent_t event);
# 2272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaEventDestroy(cudaEvent_t event);
# 2313 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaEventElapsedTime(float *ms, cudaEvent_t start, cudaEvent_t end);
# 2360 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem = 0, cudaStream_t stream = 0);
# 2387 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetupArgument(const void *arg, size_t size, size_t offset);
# 2433 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaFuncSetCacheConfig(const void *func, enum cudaFuncCache cacheConfig);
# 2484 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaFuncSetSharedMemConfig(const void *func, enum cudaSharedMemConfig config);
# 2519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaLaunch(const void *func);
# 2552 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func);
# 2574 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetDoubleForDevice(double *d);
# 2596 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaSetDoubleForHost(double *d);
# 2683 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMallocManaged(void **devPtr, size_t size, unsigned int flags);
# 2706 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMalloc(void **devPtr, size_t size);
# 2735 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMallocHost(void **ptr, size_t size);
# 2774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMallocPitch(void **devPtr, size_t *pitch, size_t width, size_t height);
# 2816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMallocArray(cudaArray_t *array, const struct cudaChannelFormatDesc *desc, size_t width, size_t height = 0, unsigned int flags = 0);
# 2840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaFree(void *devPtr);
# 2860 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaFreeHost(void *ptr);
# 2882 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaFreeArray(cudaArray_t array);
# 2904 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray);
# 2963 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaHostAlloc(void **pHost, size_t size, unsigned int flags);
# 3016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaHostRegister(void *ptr, size_t size, unsigned int flags);
# 3035 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaHostUnregister(void *ptr);
# 3062 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags);
# 3081 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaHostGetFlags(unsigned int *pFlags, void *pHost);
# 3116 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMalloc3D(struct cudaPitchedPtr* pitchedDevPtr, struct cudaExtent extent);
# 3251 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMalloc3DArray(cudaArray_t *array, const struct cudaChannelFormatDesc* desc, struct cudaExtent extent, unsigned int flags = 0);
# 3372 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const struct cudaChannelFormatDesc* desc, struct cudaExtent extent, unsigned int numLevels, unsigned int flags = 0);
# 3398 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t *levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level);
# 3495 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy3D(const struct cudaMemcpy3DParms *p);
# 3523 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy3DPeer(const struct cudaMemcpy3DPeerParms *p);
# 3628 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream = 0);
# 3651 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy3DPeerAsync(const struct cudaMemcpy3DPeerParms *p, cudaStream_t stream = 0);
# 3670 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemGetInfo(size_t *free, size_t *total);
# 3691 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaArrayGetInfo(struct cudaChannelFormatDesc *desc, struct cudaExtent *extent, unsigned int *flags, cudaArray_t array);
# 3726 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind);
# 3758 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyPeer(void *dst, int dstDevice, const void *src, int srcDevice, size_t count);
# 3792 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind);
# 3826 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyFromArray(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind);
# 3861 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, enum cudaMemcpyKind kind = cudaMemcpyDeviceToDevice);
# 3903 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2D(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind);
# 3945 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind);
# 3987 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2DFromArray(void *dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind);
# 4027 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, enum cudaMemcpyKind kind = cudaMemcpyDeviceToDevice);
# 4062 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyToSymbol(const void *symbol, const void *src, size_t count, size_t offset = 0, enum cudaMemcpyKind kind = cudaMemcpyHostToDevice);
# 4097 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t offset = 0, enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost);
# 4140 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4172 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyPeerAsync(void *dst, int dstDevice, const void *src, int srcDevice, size_t count, cudaStream_t stream = 0);
# 4214 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4256 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyFromArrayAsync(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4308 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpy2DFromArrayAsync(void *dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4452 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyToSymbolAsync(const void *symbol, const void *src, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4495 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemcpyFromSymbolAsync(void *dst, const void *symbol, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream = 0);
# 4521 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemset(void *devPtr, int value, size_t count);
# 4551 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemset2D(void *devPtr, size_t pitch, int value, size_t width, size_t height);
# 4594 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaMemset3D(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent);
# 4623 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream = 0);
# 4657 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream = 0);
# 4704 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream = 0);
# 4727 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetSymbolAddress(void **devPtr, const void *symbol);
# 4749 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetSymbolSize(size_t *size, const void *symbol);
# 4903 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaPointerGetAttributes(struct cudaPointerAttributes *attributes, const void *ptr);
# 4941 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceCanAccessPeer(int *canAccessPeer, int device, int peerDevice);
# 4978 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags);
# 4997 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDeviceDisablePeerAccess(int peerDevice);
# 5055 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource);
# 5087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags);
# 5123 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t *resources, cudaStream_t stream = 0);
# 5155 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t *resources, cudaStream_t stream = 0);
# 5184 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsResourceGetMappedPointer(void **devPtr, size_t *size, cudaGraphicsResource_t resource);
# 5218 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t *array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel);
# 5243 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t *mipmappedArray, cudaGraphicsResource_t resource);
# 5283 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetChannelDesc(struct cudaChannelFormatDesc *desc, cudaArray_const_t array);
# 5318 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) struct cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, enum cudaChannelFormatKind f);
# 5365 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaBindTexture(size_t *offset, const struct textureReference *texref, const void *devPtr, const struct cudaChannelFormatDesc *desc, size_t size = (2147483647 * 2U + 1U));
# 5416 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaBindTexture2D(size_t *offset, const struct textureReference *texref, const void *devPtr, const struct cudaChannelFormatDesc *desc, size_t width, size_t height, size_t pitch);
# 5444 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaBindTextureToArray(const struct textureReference *texref, cudaArray_const_t array, const struct cudaChannelFormatDesc *desc);
# 5472 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaBindTextureToMipmappedArray(const struct textureReference *texref, cudaMipmappedArray_const_t mipmappedArray, const struct cudaChannelFormatDesc *desc);
# 5493 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaUnbindTexture(const struct textureReference *texref);
# 5518 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetTextureAlignmentOffset(size_t *offset, const struct textureReference *texref);
# 5543 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetTextureReference(const struct textureReference **texref, const void *symbol);
# 5583 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaBindSurfaceToArray(const struct surfaceReference *surfref, cudaArray_const_t array, const struct cudaChannelFormatDesc *desc);
# 5602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetSurfaceReference(const struct surfaceReference **surfref, const void *symbol);
# 5817 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaCreateTextureObject(cudaTextureObject_t *pTexObject, const struct cudaResourceDesc *pResDesc, const struct cudaTextureDesc *pTexDesc, const struct cudaResourceViewDesc *pResViewDesc);
# 5832 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject);
# 5848 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetTextureObjectResourceDesc(struct cudaResourceDesc *pResDesc, cudaTextureObject_t texObject);
# 5864 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetTextureObjectTextureDesc(struct cudaTextureDesc *pTexDesc, cudaTextureObject_t texObject);
# 5881 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetTextureObjectResourceViewDesc(struct cudaResourceViewDesc *pResViewDesc, cudaTextureObject_t texObject);
# 5918 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t *pSurfObject, const struct cudaResourceDesc *pResDesc);
# 5933 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject);
# 5948 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaGetSurfaceObjectResourceDesc(struct cudaResourceDesc *pResDesc, cudaSurfaceObject_t surfObject);
# 5975 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) cudaError_t cudaDriverGetVersion(int *driverVersion);
# 5992 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
extern __attribute__((host)) __attribute__((cudart_builtin)) cudaError_t cudaRuntimeGetVersion(int *runtimeVersion);
extern __attribute__((host)) cudaError_t cudaGetExportTable(const void **ppExportTable, const cudaUUID_t *pExportTableId);
# 6133 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime_api.h"
}
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/channel_descriptor.h" 2
# 107 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/channel_descriptor.h"
template<class T> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc(void)
{
return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone);
}
static __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDescHalf(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDescHalf1(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDescHalf2(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
}
static __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDescHalf4(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<char>(void)
{
int e = (int)sizeof(char) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<signed char>(void)
{
int e = (int)sizeof(signed char) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<unsigned char>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<char1>(void)
{
int e = (int)sizeof(signed char) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uchar1>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<char2>(void)
{
int e = (int)sizeof(signed char) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uchar2>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<char4>(void)
{
int e = (int)sizeof(signed char) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uchar4>(void)
{
int e = (int)sizeof(unsigned char) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<short>(void)
{
int e = (int)sizeof(short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<unsigned short>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<short1>(void)
{
int e = (int)sizeof(short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<ushort1>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<short2>(void)
{
int e = (int)sizeof(short) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<ushort2>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<short4>(void)
{
int e = (int)sizeof(short) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<ushort4>(void)
{
int e = (int)sizeof(unsigned short) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<int>(void)
{
int e = (int)sizeof(int) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<unsigned int>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<int1>(void)
{
int e = (int)sizeof(int) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uint1>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<int2>(void)
{
int e = (int)sizeof(int) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uint2>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<int4>(void)
{
int e = (int)sizeof(int) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<uint4>(void)
{
int e = (int)sizeof(unsigned int) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
}
# 379 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/channel_descriptor.h"
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<float>(void)
{
int e = (int)sizeof(float) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<float1>(void)
{
int e = (int)sizeof(float) * 8;
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<float2>(void)
{
int e = (int)sizeof(float) * 8;
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
}
template<> __inline__ __attribute__((host)) cudaChannelFormatDesc cudaCreateChannelDesc<float4>(void)
{
int e = (int)sizeof(float) * 8;
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
}
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h" 1
# 53 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 54 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h" 2
# 79 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct cudaPitchedPtr make_cudaPitchedPtr(void *d, size_t p, size_t xsz, size_t ysz)
{
struct cudaPitchedPtr s;
s.ptr = d;
s.pitch = p;
s.xsize = xsz;
s.ysize = ysz;
return s;
}
# 106 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct cudaPos make_cudaPos(size_t x, size_t y, size_t z)
{
struct cudaPos p;
p.x = x;
p.y = y;
p.z = z;
return p;
}
# 132 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/driver_functions.h"
static __inline__ __attribute__((host)) struct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d)
{
struct cudaExtent e;
e.width = w;
e.height = h;
e.depth = d;
return e;
}
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h" 2
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/vector_functions.h"
static __inline__ __attribute__((host)) __attribute__((device)) char1 make_char1(signed char x)
{
char1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar1 make_uchar1(unsigned char x)
{
uchar1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char2 make_char2(signed char x, signed char y)
{
char2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar2 make_uchar2(unsigned char x, unsigned char y)
{
uchar2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char3 make_char3(signed char x, signed char y, signed char z)
{
char3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z)
{
uchar3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) char4 make_char4(signed char x, signed char y, signed char z, signed char w)
{
char4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w)
{
uchar4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short1 make_short1(short x)
{
short1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort1 make_ushort1(unsigned short x)
{
ushort1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short2 make_short2(short x, short y)
{
short2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort2 make_ushort2(unsigned short x, unsigned short y)
{
ushort2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short3 make_short3(short x,short y, short z)
{
short3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z)
{
ushort3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) short4 make_short4(short x, short y, short z, short w)
{
short4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w)
{
ushort4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int1 make_int1(int x)
{
int1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint1 make_uint1(unsigned int x)
{
uint1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int2 make_int2(int x, int y)
{
int2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint2 make_uint2(unsigned int x, unsigned int y)
{
uint2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int3 make_int3(int x, int y, int z)
{
int3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z)
{
uint3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) int4 make_int4(int x, int y, int z, int w)
{
int4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w)
{
uint4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long1 make_long1(long int x)
{
long1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong1 make_ulong1(unsigned long int x)
{
ulong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long2 make_long2(long int x, long int y)
{
long2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong2 make_ulong2(unsigned long int x, unsigned long int y)
{
ulong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long3 make_long3(long int x, long int y, long int z)
{
long3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong3 make_ulong3(unsigned long int x, unsigned long int y, unsigned long int z)
{
ulong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) long4 make_long4(long int x, long int y, long int z, long int w)
{
long4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulong4 make_ulong4(unsigned long int x, unsigned long int y, unsigned long int z, unsigned long int w)
{
ulong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float1 make_float1(float x)
{
float1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float2 make_float2(float x, float y)
{
float2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float3 make_float3(float x, float y, float z)
{
float3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) float4 make_float4(float x, float y, float z, float w)
{
float4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong1 make_longlong1(long long int x)
{
longlong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong1 make_ulonglong1(unsigned long long int x)
{
ulonglong1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong2 make_longlong2(long long int x, long long int y)
{
longlong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong2 make_ulonglong2(unsigned long long int x, unsigned long long int y)
{
ulonglong2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong3 make_longlong3(long long int x, long long int y, long long int z)
{
longlong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong3 make_ulonglong3(unsigned long long int x, unsigned long long int y, unsigned long long int z)
{
ulonglong3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) longlong4 make_longlong4(long long int x, long long int y, long long int z, long long int w)
{
longlong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) ulonglong4 make_ulonglong4(unsigned long long int x, unsigned long long int y, unsigned long long int z, unsigned long long int w)
{
ulonglong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double1 make_double1(double x)
{
double1 t; t.x = x; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double2 make_double2(double x, double y)
{
double2 t; t.x = x; t.y = y; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double3 make_double3(double x, double y, double z)
{
double3 t; t.x = x; t.y = y; t.z = z; return t;
}
static __inline__ __attribute__((host)) __attribute__((device)) double4 make_double4(double x, double y, double z, double w)
{
double4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t;
}
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/string.h" 1 3 4
# 29 "/usr/include/string.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 35 "/usr/include/string.h" 2 3 4
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memmove (void *__dest, __const void *__src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern void *memchr (void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const void *memchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
memchr (void *__s, int __c, size_t __n) throw ()
{
return __builtin_memchr (__s, __c, __n);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void *
memchr (__const void *__s, int __c, size_t __n) throw ()
{
return __builtin_memchr (__s, __c, __n);
}
}
extern "C++" void *rawmemchr (void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *rawmemchr (__const void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" void *memrchr (void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strcmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcoll (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strxfrm (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (2)));
# 1 "/usr/include/xlocale.h" 1 3 4
# 28 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{
struct __locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
const char *__names[13];
} *__locale_t;
typedef __locale_t locale_t;
# 163 "/usr/include/string.h" 2 3 4
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
extern char *strdup (__const char *__s)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
extern char *strndup (__const char *__string, size_t __n)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 210 "/usr/include/string.h" 3 4
extern "C++"
{
extern char *strchr (char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strchr (__const char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strchr (char *__s, int __c) throw ()
{
return __builtin_strchr (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strchr (__const char *__s, int __c) throw ()
{
return __builtin_strchr (__s, __c);
}
}
extern "C++"
{
extern char *strrchr (char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strrchr (__const char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strrchr (char *__s, int __c) throw ()
{
return __builtin_strrchr (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strrchr (__const char *__s, int __c) throw ()
{
return __builtin_strrchr (__s, __c);
}
}
extern "C++" char *strchrnul (char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *strchrnul (__const char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strcspn (__const char *__s, __const char *__reject)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strspn (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *strpbrk (char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strpbrk (__const char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strpbrk (char *__s, __const char *__accept) throw ()
{
return __builtin_strpbrk (__s, __accept);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strpbrk (__const char *__s, __const char *__accept) throw ()
{
return __builtin_strpbrk (__s, __accept);
}
}
extern "C++"
{
extern char *strstr (char *__haystack, __const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strstr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
strstr (char *__haystack, __const char *__needle) throw ()
{
return __builtin_strstr (__haystack, __needle);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
strstr (__const char *__haystack, __const char *__needle) throw ()
{
return __builtin_strstr (__haystack, __needle);
}
}
extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (2)));
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern "C++" char *strcasestr (char *__haystack, __const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++" __const char *strcasestr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 382 "/usr/include/string.h" 3 4
extern void *memmem (__const void *__haystack, size_t __haystacklen,
__const void *__needle, size_t __needlelen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
extern void *__mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern size_t strlen (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strnlen (__const char *__string, size_t __maxlen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strerror (int __errnum) throw ();
# 438 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern char *strerror_l (int __errnum, __locale_t __l) throw ();
extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern void bcopy (__const void *__src, void *__dest, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *index (char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *index (__const char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
index (char *__s, int __c) throw ()
{
return __builtin_index (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
index (__const char *__s, int __c) throw ()
{
return __builtin_index (__s, __c);
}
}
extern "C++"
{
extern char *rindex (char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *rindex (__const char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
rindex (char *__s, int __c) throw ()
{
return __builtin_rindex (__s, __c);
}
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char *
rindex (__const char *__s, int __c) throw ()
{
return __builtin_rindex (__s, __c);
}
}
extern int ffs (int __i) throw () __attribute__ ((__const__));
extern int ffsl (long int __l) throw () __attribute__ ((__const__));
__extension__ extern int ffsll (long long int __ll)
throw () __attribute__ ((__const__));
extern int strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcasecmp_l (__const char *__s1, __const char *__s2,
__locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern int strncasecmp_l (__const char *__s1, __const char *__s2,
size_t __n, __locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
extern char *strsep (char **__restrict __stringp,
__const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strsignal (int __sig) throw ();
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *__stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strverscmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" char *basename (char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *basename (__const char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
# 646 "/usr/include/string.h" 3 4
}
# 65 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/time.h" 1 3 4
# 30 "/usr/include/time.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 39 "/usr/include/time.h" 2 3 4
# 1 "/usr/include/bits/time.h" 1 3 4
# 43 "/usr/include/time.h" 2 3 4
# 56 "/usr/include/time.h" 3 4
# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 131 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 132 "/usr/include/bits/types.h" 2 3 4
typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef int __daddr_t;
typedef long int __swblk_t;
typedef int __key_t;
typedef int __clockid_t;
typedef void * __timer_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;
typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;
typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;
typedef long int __ssize_t;
typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
typedef long int __intptr_t;
typedef unsigned int __socklen_t;
# 57 "/usr/include/time.h" 2 3 4
typedef __clock_t clock_t;
# 74 "/usr/include/time.h" 3 4
typedef __time_t time_t;
# 92 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 104 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 120 "/usr/include/time.h" 3 4
struct timespec
{
__time_t tv_sec;
long int tv_nsec;
};
struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
long int tm_gmtoff;
__const char *tm_zone;
};
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
struct sigevent;
typedef __pid_t pid_t;
extern clock_t clock (void) throw ();
extern time_t time (time_t *__timer) throw ();
extern double difftime (time_t __time1, time_t __time0)
throw () __attribute__ ((__const__));
extern time_t mktime (struct tm *__tp) throw ();
extern size_t strftime (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp) throw ();
extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
throw ();
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp,
__locale_t __loc) throw ();
extern char *strptime_l (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) throw ();
extern struct tm *gmtime (__const time_t *__timer) throw ();
extern struct tm *localtime (__const time_t *__timer) throw ();
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern struct tm *localtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern char *asctime (__const struct tm *__tp) throw ();
extern char *ctime (__const time_t *__timer) throw ();
extern char *asctime_r (__const struct tm *__restrict __tp,
char *__restrict __buf) throw ();
extern char *ctime_r (__const time_t *__restrict __timer,
char *__restrict __buf) throw ();
extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;
extern char *tzname[2];
extern void tzset (void) throw ();
extern int daylight;
extern long int timezone;
extern int stime (__const time_t *__when) throw ();
# 313 "/usr/include/time.h" 3 4
extern time_t timegm (struct tm *__tp) throw ();
extern time_t timelocal (struct tm *__tp) throw ();
extern int dysize (int __year) throw () __attribute__ ((__const__));
# 328 "/usr/include/time.h" 3 4
extern int nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining);
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
throw ();
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
struct timespec *__rem);
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) throw ();
extern int timer_delete (timer_t __timerid) throw ();
extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) throw ();
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
throw ();
extern int timer_getoverrun (timer_t __timerid) throw ();
# 390 "/usr/include/time.h" 3 4
extern int getdate_err;
# 399 "/usr/include/time.h" 3 4
extern struct tm *getdate (__const char *__string);
# 413 "/usr/include/time.h" 3 4
extern int getdate_r (__const char *__restrict __string,
struct tm *__restrict __resbufp);
}
# 66 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) clock_t clock(void) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void* memset(void*, int, size_t) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void* memcpy(void*, const void*, size_t) throw ();
}
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 1 3
# 39 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 1 3
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 4 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 1687 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/os_defines.h" 1 3
# 1688 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/cpu_defines.h" 1 3
# 1691 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/x86_64-redhat-linux/bits/c++config.h" 2 3
# 44 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::ptrdiff_t;
using ::size_t;
}
# 40 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 1 3
# 35 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
# 59 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
virtual const char* what() const throw();
};
class bad_exception : public exception
{
public:
bad_exception() throw() { }
virtual ~bad_exception() throw();
virtual const char* what() const throw();
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) throw();
void terminate() __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) throw();
void unexpected() __attribute__ ((__noreturn__));
# 115 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
bool uncaught_exception() throw();
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
# 138 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception" 3
void __verbose_terminate_handler();
}
}
#pragma GCC visibility pop
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 2 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
virtual ~bad_alloc() throw();
virtual const char* what() const throw();
};
struct nothrow_t { };
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler) throw();
}
# 91 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new" 3
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void*, const std::nothrow_t&) throw();
void operator delete[](void*, const std::nothrow_t&) throw();
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
inline void operator delete (void*, void*) throw() { }
inline void operator delete[](void*, void*) throw() { }
}
#pragma GCC visibility pop
# 78 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 91 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new(std:: size_t, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new[](std:: size_t, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete(void*, void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete[](void*, void*) throw();
# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 35 "/usr/include/stdio.h" 2 3 4
# 45 "/usr/include/stdio.h" 3 4
struct _IO_FILE;
typedef struct _IO_FILE FILE;
# 65 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 75 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 15 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 16 "/usr/include/_G_config.h" 2 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 83 "/usr/include/wchar.h" 3 4
typedef struct
{
int __count;
union
{
unsigned int __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 21 "/usr/include/_G_config.h" 2 3 4
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 53 "/usr/include/_G_config.h" 3 4
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h" 1 3 4
# 40 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 170 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 180 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 203 "/usr/include/libio.h" 3 4
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
# 271 "/usr/include/libio.h" 3 4
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _flags2;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 319 "/usr/include/libio.h" 3 4
__off64_t _offset;
# 328 "/usr/include/libio.h" 3 4
void *__pad1;
void *__pad2;
void *__pad3;
void *__pad4;
size_t __pad5;
int _mode;
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 364 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file;
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
extern "C" {
extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);
# 460 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp);
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 490 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 552 "/usr/include/libio.h" 3 4
}
# 76 "/usr/include/stdio.h" 2 3 4
typedef __gnuc_va_list va_list;
# 91 "/usr/include/stdio.h" 3 4
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __ssize_t ssize_t;
typedef _G_fpos_t fpos_t;
typedef _G_fpos64_t fpos64_t;
# 161 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 162 "/usr/include/stdio.h" 2 3 4
extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern int renameat (int __oldfd, __const char *__old, int __newfd,
__const char *__new) throw ();
extern FILE *tmpfile (void) ;
# 204 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile64 (void) ;
extern char *tmpnam (char *__s) throw () ;
extern char *tmpnam_r (char *__s) throw () ;
# 226 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
throw () __attribute__ ((__malloc__)) ;
extern int fclose (FILE *__stream);
extern int fflush (FILE *__stream);
# 251 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 261 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
# 294 "/usr/include/stdio.h" 3 4
extern FILE *fopen64 (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen64 (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
extern FILE *fopencookie (void *__restrict __magic_cookie,
__const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) throw () ;
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
throw () ;
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...);
extern int printf (__const char *__restrict __format, ...);
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg);
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
# 416 "/usr/include/stdio.h" 3 4
extern int vdprintf (int __fd, __const char *__restrict __fmt,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) ;
extern int scanf (__const char *__restrict __format, ...) ;
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) throw ();
# 467 "/usr/include/stdio.h" 3 4
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 2, 0))) ;
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 1, 0))) ;
extern int vsscanf (__const char *__restrict __s,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
# 526 "/usr/include/stdio.h" 3 4
extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);
extern int getchar (void);
# 554 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 565 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);
extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);
extern int putchar (int __c);
# 598 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);
extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);
extern int getw (FILE *__stream);
extern int putw (int __w, FILE *__stream);
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
;
extern char *gets (char *__s) ;
# 644 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) ;
# 660 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) ;
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
extern int puts (__const char *__s);
extern int ungetc (int __c, FILE *__stream);
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) ;
# 721 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (__const char *__restrict __s,
FILE *__restrict __stream);
# 732 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern int fseek (FILE *__stream, long int __off, int __whence);
extern long int ftell (FILE *__stream) ;
extern void rewind (FILE *__stream);
# 768 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);
extern __off_t ftello (FILE *__stream) ;
# 787 "/usr/include/stdio.h" 3 4
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 810 "/usr/include/stdio.h" 3 4
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw () ;
extern int ferror (FILE *__stream) throw () ;
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw () ;
extern int ferror_unlocked (FILE *__stream) throw () ;
extern void perror (__const char *__s);
# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 849 "/usr/include/stdio.h" 2 3 4
extern int fileno (FILE *__stream) throw () ;
extern int fileno_unlocked (FILE *__stream) throw () ;
# 868 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;
extern int pclose (FILE *__stream);
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s);
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
__const char *__restrict __format,
__gnuc_va_list __args)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw () ;
extern void funlockfile (FILE *__stream) throw ();
# 929 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio.h" 1 3 4
# 36 "/usr/include/bits/stdio.h" 3 4
extern __inline __attribute__ ((__gnu_inline__)) int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getchar (void)
{
return _IO_getc (stdin);
}
extern __inline __attribute__ ((__gnu_inline__)) int
fgetc_unlocked (FILE *__fp)
{
return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getc_unlocked (FILE *__fp)
{
return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
getchar_unlocked (void)
{
return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}
extern __inline __attribute__ ((__gnu_inline__)) int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
extern __inline __attribute__ ((__gnu_inline__)) int
fputc_unlocked (int __c, FILE *__stream)
{
return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) int
putc_unlocked (int __c, FILE *__stream)
{
return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) int
putchar_unlocked (int __c)
{
return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}
extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
extern __inline __attribute__ ((__gnu_inline__)) int
feof_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x10) != 0);
}
extern __inline __attribute__ ((__gnu_inline__)) int
ferror_unlocked (FILE *__stream) throw ()
{
return (((__stream)->_flags & 0x20) != 0);
}
# 930 "/usr/include/stdio.h" 2 3 4
# 938 "/usr/include/stdio.h" 3 4
}
# 99 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4
extern "C" {
# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 43 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 65 "/usr/include/bits/waitstatus.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 61 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/byteswap.h" 1 3 4
# 28 "/usr/include/bits/byteswap.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/byteswap.h" 2 3 4
# 62 "/usr/include/endian.h" 2 3 4
# 66 "/usr/include/bits/waitstatus.h" 2 3 4
union wait
{
int w_status;
struct
{
unsigned int __w_termsig:7;
unsigned int __w_coredump:1;
unsigned int __w_retcode:8;
unsigned int:16;
} __wait_terminated;
struct
{
unsigned int __w_stopval:8;
unsigned int __w_stopsig:8;
unsigned int:16;
} __wait_stopped;
};
# 44 "/usr/include/stdlib.h" 2 3 4
# 96 "/usr/include/stdlib.h" 3 4
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) throw () ;
extern double atof (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern float strtof (__const char *__restrict __nptr,
char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
extern long double strtold (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern long int strtol (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
# 240 "/usr/include/stdlib.h" 3 4
extern long int strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern unsigned long int strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern double strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern float strtof_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern long double strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern __inline __attribute__ ((__gnu_inline__)) double
atof (__const char *__nptr) throw ()
{
return strtod (__nptr, (char **) __null);
}
extern __inline __attribute__ ((__gnu_inline__)) int
atoi (__const char *__nptr) throw ()
{
return (int) strtol (__nptr, (char **) __null, 10);
}
extern __inline __attribute__ ((__gnu_inline__)) long int
atol (__const char *__nptr) throw ()
{
return strtol (__nptr, (char **) __null, 10);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
atoll (__const char *__nptr) throw ()
{
return strtoll (__nptr, (char **) __null, 10);
}
# 311 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) throw () ;
extern long int a64l (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 1 "/usr/include/sys/types.h" 1 3 4
# 28 "/usr/include/sys/types.h" 3 4
extern "C" {
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
# 105 "/usr/include/sys/types.h" 3 4
typedef __id_t id_t;
# 116 "/usr/include/sys/types.h" 3 4
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 137 "/usr/include/sys/types.h" 3 4
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 220 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 23 "/usr/include/bits/select.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/select.h" 2 3 4
# 32 "/usr/include/sys/select.h" 2 3 4
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 24 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4
typedef __sigset_t sigset_t;
# 1 "/usr/include/bits/time.h" 1 3 4
# 75 "/usr/include/bits/time.h" 3 4
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 47 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
{
__fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4
extern "C" {
# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
}
# 221 "/usr/include/sys/types.h" 2 3 4
# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 30 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
throw ();
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
throw ();
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
throw ();
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
gnu_dev_major (unsigned long long int __dev) throw ()
{
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
gnu_dev_minor (unsigned long long int __dev) throw ()
{
return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int
gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
{
return ((__minor & 0xff) | ((__major & 0xfff) << 8)
| (((unsigned long long int) (__minor & ~0xff)) << 12)
| (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 263 "/usr/include/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 23 "/usr/include/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
# 50 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;
typedef union
{
char __size[56];
long int __align;
} pthread_attr_t;
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
# 76 "/usr/include/bits/pthreadtypes.h" 3 4
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
unsigned int __nusers;
int __kind;
int __spins;
__pthread_list_t __list;
# 101 "/usr/include/bits/pthreadtypes.h" 3 4
} __data;
char __size[40];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[4];
int __align;
} pthread_mutexattr_t;
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[48];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[4];
int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
typedef union
{
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
} __data;
# 187 "/usr/include/bits/pthreadtypes.h" 3 4
char __size[56];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[8];
long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
char __size[32];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[4];
int __align;
} pthread_barrierattr_t;
# 272 "/usr/include/sys/types.h" 2 3 4
}
# 321 "/usr/include/stdlib.h" 2 3 4
extern long int random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
throw () __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern void *calloc (size_t __nmemb, size_t __size)
throw () __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size)
throw () __attribute__ ((__warn_unused_result__));
extern void free (void *__ptr) throw ();
extern void cfree (void *__ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4
extern "C" {
extern void *alloca (size_t __size) throw ();
}
# 498 "/usr/include/stdlib.h" 2 3 4
extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
throw () __attribute__ ((__nonnull__ (1))) ;
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" int at_quick_exit (void (*__func) (void))
throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1)));
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
throw () __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *__secure_getenv (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern int setenv (__const char *__name, __const char *__value, int __replace)
throw () __attribute__ ((__nonnull__ (2)));
extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) throw ();
# 606 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 620 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 630 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 642 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 652 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
__attribute__ ((__nonnull__ (1))) ;
# 663 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 674 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 684 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 694 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 706 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
extern int system (__const char *__command) ;
extern char *canonicalize_file_name (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
# 734 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) throw () ;
typedef int (*__compar_fn_t) (__const void *, __const void *);
typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
extern void *bsearch (__const void *__key, __const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
__attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) throw () __attribute__ ((__const__)) ;
extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
throw () __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
throw () __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
throw () __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
throw () __attribute__ ((__const__)) ;
# 808 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (__const char *__s, size_t __n) throw () ;
extern int mbtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n) throw () ;
extern int wctomb (char *__s, wchar_t __wchar) throw () ;
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
__const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s,
__const wchar_t *__restrict __pwcs, size_t __n)
throw ();
extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
# 896 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
char **__restrict __valuep)
throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
extern int posix_openpt (int __oflag) ;
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw () ;
extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern int getpt (void);
extern int getloadavg (double __loadavg[], int __nelem)
throw () __attribute__ ((__nonnull__ (1)));
# 964 "/usr/include/stdlib.h" 3 4
}
# 100 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int printf(const char*, ...);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int fprintf(FILE*, const char*, ...);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* malloc(size_t) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void free(void*) throw ();
}
# 1 "/usr/include/assert.h" 1 3 4
# 66 "/usr/include/assert.h" 3 4
extern "C" {
extern void __assert_fail (__const char *__assertion, __const char *__file,
unsigned int __line, __const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert_perror_fail (int __errnum, __const char *__file,
unsigned int __line,
__const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert (const char *__assertion, const char *__file, int __line)
throw () __attribute__ ((__noreturn__));
}
# 111 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
extern "C"
{
# 122 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void __assert_fail(
const char *, const char *, unsigned int, const char *)
throw ();
}
# 143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new(std:: size_t) throw(std:: bad_alloc);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void* operator new[](std:: size_t) throw(std:: bad_alloc);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete(void*) throw();
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) void operator delete[](void*) throw();
# 167 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 1
# 83 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 84 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern "C"
{
# 149 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) int abs(int) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) long int labs(long int) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) long long int llabs(long long int) throw ();
# 194 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fabs(double x) throw ();
# 235 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fabsf(float x) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int min(int, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned int umin(unsigned int, unsigned int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llmin(long long int, long long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned long long int ullmin(unsigned long long int, unsigned long long int);
# 255 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fminf(float x, float y) throw ();
# 271 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmin(double x, double y) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int max(int, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned int umax(unsigned int, unsigned int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llmax(long long int, long long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) unsigned long long int ullmax(unsigned long long int, unsigned long long int);
# 291 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmaxf(float x, float y) throw ();
# 307 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmax(double, double) throw ();
# 348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sin(double x) throw ();
# 381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cos(double x) throw ();
# 396 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincos(double x, double *sptr, double *cptr) throw ();
# 412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincosf(float x, float *sptr, float *cptr) throw ();
# 453 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tan(double x) throw ();
# 522 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sqrt(double x) throw ();
# 591 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rsqrt(double x);
# 660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rsqrtf(float x);
# 711 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log2(double x) throw ();
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp2(double x) throw ();
# 753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float exp2f(float x) throw ();
# 774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp10(double x) throw ();
# 796 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float exp10f(float x) throw ();
# 837 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double expm1(double x) throw ();
# 878 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float expm1f(float x) throw ();
# 929 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log2f(float x) throw ();
# 980 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log10(double x) throw ();
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log(double x) throw ();
# 1144 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double log1p(double x) throw ();
# 1237 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log1pf(float x) throw ();
# 1309 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double floor(double x) throw ();
# 1348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double exp(double x) throw ();
# 1379 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cosh(double x) throw ();
# 1409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sinh(double x) throw ();
# 1439 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tanh(double x) throw ();
# 1473 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double acosh(double x) throw ();
# 1507 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float acoshf(float x) throw ();
# 1519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double asinh(double x) throw ();
# 1531 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float asinhf(float x) throw ();
# 1581 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atanh(double x) throw ();
# 1631 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atanhf(float x) throw ();
# 1687 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double ldexp(double x, int exp) throw ();
# 1743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ldexpf(float x, int exp) throw ();
# 1794 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double logb(double x) throw ();
# 1845 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float logbf(float x) throw ();
# 1871 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int ilogb(double x) throw ();
# 1897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int ilogbf(float x) throw ();
# 1969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double scalbn(double x, int n) throw ();
# 2041 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float scalbnf(float x, int n) throw ();
# 2113 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double scalbln(double x, long int n) throw ();
# 2185 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float scalblnf(float x, long int n) throw ();
# 2260 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double frexp(double x, int *nptr) throw ();
# 2335 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float frexpf(float x, int *nptr) throw ();
# 2348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double round(double x) throw ();
# 2361 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float roundf(float x) throw ();
# 2375 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lround(double x) throw ();
# 2389 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lroundf(float x) throw ();
# 2403 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llround(double x) throw ();
# 2417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llroundf(float x) throw ();
# 2428 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rint(double x) throw ();
# 2439 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rintf(float x) throw ();
# 2451 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lrint(double x) throw ();
# 2463 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long int lrintf(float x) throw ();
# 2475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llrint(double x) throw ();
# 2487 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) long long int llrintf(float x) throw ();
# 2536 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nearbyint(double x) throw ();
# 2585 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nearbyintf(float x) throw ();
# 2644 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double ceil(double x) throw ();
# 2655 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double trunc(double x) throw ();
# 2666 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float truncf(float x) throw ();
# 2688 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fdim(double x, double y) throw ();
# 2710 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fdimf(float x, float y) throw ();
# 2743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atan2(double y, double x) throw ();
# 2774 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double atan(double x) throw ();
# 2797 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double acos(double x) throw ();
# 2829 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double asin(double x) throw ();
# 2869 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double hypot(double x, double y) throw ();
# 2919 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rhypot(double x, double y) throw ();
# 2960 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float hypotf(float x, float y) throw ();
# 3010 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rhypotf(float x, float y) throw ();
# 3093 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cbrt(double x) throw ();
# 3175 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cbrtf(float x) throw ();
# 3224 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double rcbrt(double x);
# 3273 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float rcbrtf(float x);
# 3333 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double sinpi(double x);
# 3393 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinpif(float x);
# 3445 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cospi(double x);
# 3497 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cospif(float x);
# 3527 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincospi(double x, double *sptr, double *cptr);
# 3557 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) void sincospif(float x, float *sptr, float *cptr);
# 3865 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double pow(double x, double y) throw ();
# 3921 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double modf(double x, double *iptr) throw ();
# 3980 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fmod(double x, double y) throw ();
# 4065 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double remainder(double x, double y) throw ();
# 4151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float remainderf(float x, float y) throw ();
# 4201 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double remquo(double x, double y, int *quo) throw ();
# 4251 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float remquof(float x, float y, int *quo) throw ();
# 4289 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double j0(double x) throw ();
# 4327 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float j0f(float x) throw ();
# 4384 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double j1(double x) throw ();
# 4441 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float j1f(float x) throw ();
# 4480 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double jn(int n, double x) throw ();
# 4519 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float jnf(int n, float x) throw ();
# 4567 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double y0(double x) throw ();
# 4615 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float y0f(float x) throw ();
# 4663 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double y1(double x) throw ();
# 4711 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float y1f(float x) throw ();
# 4760 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double yn(int n, double x) throw ();
# 4809 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ynf(int n, float x) throw ();
# 4836 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cyl_bessel_i0(double x) throw ();
# 4862 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cyl_bessel_i0f(float x) throw ();
# 4889 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double cyl_bessel_i1(double x) throw ();
# 4915 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cyl_bessel_i1f(float x) throw ();
# 4994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erf(double x) throw ();
# 5072 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erff(float x) throw ();
# 5129 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfinv(double y);
# 5186 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfinvf(float y);
# 5220 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfc(double x) throw ();
# 5254 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcf(float x) throw ();
# 5378 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double lgamma(double x) throw ();
# 5434 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfcinv(double y);
# 5490 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcinvf(float y);
# 5548 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double normcdfinv(double y);
# 5606 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float normcdfinvf(float y);
# 5649 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double normcdf(double y);
# 5692 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float normcdff(float y);
# 5767 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double erfcx(double x);
# 5842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float erfcxf(float x);
# 5971 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float lgammaf(float x) throw ();
# 6076 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double tgamma(double x) throw ();
# 6181 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tgammaf(float x) throw ();
# 6190 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double copysign(double x, double y) throw ();
# 6199 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float copysignf(float x, float y) throw ();
# 6232 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nextafter(double x, double y) throw ();
# 6265 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nextafterf(float x, float y) throw ();
# 6277 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double nan(const char *tagp) throw ();
# 6289 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float nanf(const char *tagp) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinff(float) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnanf(float) throw ();
# 6300 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finite(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finitef(float) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbit(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnan(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinf(double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbitf(float) throw ();
# 6461 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) double fma(double x, double y, double z) throw ();
# 6615 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmaf(float x, float y, float z) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __signbitl(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __finitel(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isinfl(long double) throw ();
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) int __isnanl(long double) throw ();
# 6675 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float acosf(float x) throw ();
# 6715 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float asinf(float x) throw ();
# 6755 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atanf(float x) throw ();
# 6788 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float atan2f(float y, float x) throw ();
# 6812 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float cosf(float x) throw ();
# 6854 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinf(float x) throw ();
# 6896 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tanf(float x) throw ();
# 6920 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float coshf(float x) throw ();
# 6961 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sinhf(float x) throw ();
# 6991 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float tanhf(float x) throw ();
# 7042 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float logf(float x) throw ();
# 7092 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float expf(float x) throw ();
# 7143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float log10f(float x) throw ();
# 7198 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float modff(float x, float *iptr) throw ();
# 7506 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float powf(float x, float y) throw ();
# 7575 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float sqrtf(float x) throw ();
# 7634 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float ceilf(float x) throw ();
# 7706 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float floorf(float x) throw ();
# 7765 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((device_builtin)) float fmodf(float x, float y) throw ();
}
# 1 "/usr/include/math.h" 1 3 4
# 30 "/usr/include/math.h" 3 4
extern "C" {
# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 35 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_valf.h" 1 3 4
# 37 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_vall.h" 1 3 4
# 38 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/inf.h" 1 3 4
# 41 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/nan.h" 1 3 4
# 44 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 26 "/usr/include/bits/mathdef.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/mathdef.h" 2 3 4
typedef float float_t;
typedef double double_t;
# 48 "/usr/include/math.h" 2 3 4
# 71 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ()
;
extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
extern double log (double __x) throw (); extern double __log (double __x) throw ();
extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
extern int __isinf (double __value) throw () __attribute__ ((__const__));
extern int __finite (double __value) throw () __attribute__ ((__const__));
extern int isinf (double __value) throw () __attribute__ ((__const__));
extern int finite (double __value) throw () __attribute__ ((__const__));
extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnan (double __value) throw () __attribute__ ((__const__));
extern int isnan (double __value) throw () __attribute__ ((__const__));
extern double j0 (double) throw (); extern double __j0 (double) throw ();
extern double j1 (double) throw (); extern double __j1 (double) throw ();
extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
extern double y0 (double) throw (); extern double __y0 (double) throw ();
extern double y1 (double) throw (); extern double __y1 (double) throw ();
extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
extern double erf (double) throw (); extern double __erf (double) throw ();
extern double erfc (double) throw (); extern double __erfc (double) throw ();
extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
extern double gamma (double) throw (); extern double __gamma (double) throw ();
extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
extern int __fpclassify (double __value) throw ()
__attribute__ ((__const__));
extern int __signbit (double __value) throw ()
__attribute__ ((__const__));
extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
# 72 "/usr/include/math.h" 2 3 4
# 94 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
extern void
sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw (); extern void
__sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw ()
;
extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
extern int __isinff (float __value) throw () __attribute__ ((__const__));
extern int __finitef (float __value) throw () __attribute__ ((__const__));
extern int isinff (float __value) throw () __attribute__ ((__const__));
extern int finitef (float __value) throw () __attribute__ ((__const__));
extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanf (float __value) throw () __attribute__ ((__const__));
extern int isnanf (float __value) throw () __attribute__ ((__const__));
extern float j0f (float) throw (); extern float __j0f (float) throw ();
extern float j1f (float) throw (); extern float __j1f (float) throw ();
extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
extern float y0f (float) throw (); extern float __y0f (float) throw ();
extern float y1f (float) throw (); extern float __y1f (float) throw ();
extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
extern float erff (float) throw (); extern float __erff (float) throw ();
extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
extern int __fpclassifyf (float __value) throw ()
__attribute__ ((__const__));
extern int __signbitf (float __value) throw ()
__attribute__ ((__const__));
extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
# 95 "/usr/include/math.h" 2 3 4
# 141 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
extern void
sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw (); extern void
__sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw ()
;
extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
extern int __finitel (long double __value) throw () __attribute__ ((__const__));
extern int isinfl (long double __value) throw () __attribute__ ((__const__));
extern int finitel (long double __value) throw () __attribute__ ((__const__));
extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
extern int isnanl (long double __value) throw () __attribute__ ((__const__));
extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();
extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
extern int __fpclassifyl (long double __value) throw ()
__attribute__ ((__const__));
extern int __signbitl (long double __value) throw ()
__attribute__ ((__const__));
extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
# 142 "/usr/include/math.h" 2 3 4
# 157 "/usr/include/math.h" 3 4
extern int signgam;
# 198 "/usr/include/math.h" 3 4
enum
{
FP_NAN,
FP_INFINITE,
FP_ZERO,
FP_SUBNORMAL,
FP_NORMAL
};
# 291 "/usr/include/math.h" 3 4
typedef enum
{
_IEEE_ = -1,
_SVID_,
_XOPEN_,
_POSIX_,
_ISOC_
} _LIB_VERSION_TYPE;
extern _LIB_VERSION_TYPE _LIB_VERSION;
# 314 "/usr/include/math.h" 3 4
struct __exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int matherr (struct __exception *__exc) throw ();
# 416 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathinline.h" 1 3 4
# 25 "/usr/include/bits/mathinline.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/mathinline.h" 2 3 4
# 37 "/usr/include/bits/mathinline.h" 3 4
extern __inline __attribute__ ((__gnu_inline__)) int
__signbitf (float __x) throw ()
{
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x8;
}
extern __inline __attribute__ ((__gnu_inline__)) int
__signbit (double __x) throw ()
{
int __m;
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
return __m & 0x80;
}
extern __inline __attribute__ ((__gnu_inline__)) int
__signbitl (long double __x) throw ()
{
__extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
return (__u.__i[2] & 0x8000) != 0;
}
# 417 "/usr/include/math.h" 2 3 4
# 472 "/usr/include/math.h" 3 4
}
# 7771 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 1 3
# 36 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
# 37 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
# 69 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<typename _Iterator, typename _Container>
class __normal_iterator;
}
namespace std __attribute__ ((__visibility__ ("default"))) {
struct __true_type { };
struct __false_type { };
template<bool>
struct __truth_type
{ typedef __false_type __type; };
template<>
struct __truth_type<true>
{ typedef __true_type __type; };
template<class _Sp, class _Tp>
struct __traitor
{
enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
typedef typename __truth_type<__value>::__type __type;
};
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_void
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_void<void>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_integer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_integer<bool>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
# 194 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
template<>
struct __is_integer<short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_floating
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_floating<float>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<long double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_pointer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __is_pointer<_Tp*>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_normal_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Iterator, typename _Container>
struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
_Container> >
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_arithmetic
: public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
{ };
template<typename _Tp>
struct __is_fundamental
: public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
{ };
template<typename _Tp>
struct __is_scalar
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
{ };
template<typename _Tp>
struct __is_char
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_char<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_char<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_byte
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_byte<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<typename _Tp>
struct __is_move_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
# 417 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cpp_type_traits.h" 3
}
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 1 3
# 32 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 3
# 33 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ext/type_traits.h" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
template<bool, typename>
struct __enable_if
{ };
template<typename _Tp>
struct __enable_if<true, _Tp>
{ typedef _Tp __type; };
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct __conditional_type
{ typedef _Iftrue __type; };
template<typename _Iftrue, typename _Iffalse>
struct __conditional_type<false, _Iftrue, _Iffalse>
{ typedef _Iffalse __type; };
template<typename _Tp>
struct __add_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __add_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __add_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __add_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __add_unsigned<long long>
{ typedef unsigned long long __type; };
template<>
struct __add_unsigned<bool>;
template<>
struct __add_unsigned<wchar_t>;
template<typename _Tp>
struct __remove_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __remove_unsigned<char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned short>
{ typedef short __type; };
template<>
struct __remove_unsigned<unsigned int>
{ typedef int __type; };
template<>
struct __remove_unsigned<unsigned long>
{ typedef long __type; };
template<>
struct __remove_unsigned<unsigned long long>
{ typedef long long __type; };
template<>
struct __remove_unsigned<bool>;
template<>
struct __remove_unsigned<wchar_t>;
template<typename _Type>
inline bool
__is_null_pointer(_Type* __ptr)
{ return __ptr == 0; }
template<typename _Type>
inline bool
__is_null_pointer(_Type)
{ return false; }
template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
struct __promote
{ typedef double __type; };
template<typename _Tp>
struct __promote<_Tp, false>
{ typedef _Tp __type; };
template<typename _Tp, typename _Up>
struct __promote_2
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
public:
typedef __typeof__(__type1() + __type2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp>
struct __promote_3
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
public:
typedef __typeof__(__type1() + __type2() + __type3()) __type;
};
template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
struct __promote_4
{
private:
typedef typename __promote<_Tp>::__type __type1;
typedef typename __promote<_Up>::__type __type2;
typedef typename __promote<_Vp>::__type __type3;
typedef typename __promote<_Wp>::__type __type4;
public:
typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
};
}
# 46 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 77 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
_Tp __cmath_power(_Tp, unsigned int);
template<typename _Tp>
inline _Tp
__pow_helper(_Tp __x, int __n)
{
return __n < 0
? _Tp(1)/__cmath_power(__x, -__n)
: __cmath_power(__x, __n);
}
inline double
abs(double __x)
{ return __builtin_fabs(__x); }
inline float
abs(float __x)
{ return __builtin_fabsf(__x); }
inline long double
abs(long double __x)
{ return __builtin_fabsl(__x); }
using ::acos;
inline float
acos(float __x)
{ return __builtin_acosf(__x); }
inline long double
acos(long double __x)
{ return __builtin_acosl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
acos(_Tp __x)
{ return __builtin_acos(__x); }
using ::asin;
inline float
asin(float __x)
{ return __builtin_asinf(__x); }
inline long double
asin(long double __x)
{ return __builtin_asinl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
asin(_Tp __x)
{ return __builtin_asin(__x); }
using ::atan;
inline float
atan(float __x)
{ return __builtin_atanf(__x); }
inline long double
atan(long double __x)
{ return __builtin_atanl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
atan(_Tp __x)
{ return __builtin_atan(__x); }
using ::atan2;
inline float
atan2(float __y, float __x)
{ return __builtin_atan2f(__y, __x); }
inline long double
atan2(long double __y, long double __x)
{ return __builtin_atan2l(__y, __x); }
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
atan2(_Tp __y, _Up __x)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return atan2(__type(__y), __type(__x));
}
using ::ceil;
inline float
ceil(float __x)
{ return __builtin_ceilf(__x); }
inline long double
ceil(long double __x)
{ return __builtin_ceill(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ceil(_Tp __x)
{ return __builtin_ceil(__x); }
using ::cos;
inline float
cos(float __x)
{ return __builtin_cosf(__x); }
inline long double
cos(long double __x)
{ return __builtin_cosl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cos(_Tp __x)
{ return __builtin_cos(__x); }
using ::cosh;
inline float
cosh(float __x)
{ return __builtin_coshf(__x); }
inline long double
cosh(long double __x)
{ return __builtin_coshl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
cosh(_Tp __x)
{ return __builtin_cosh(__x); }
using ::exp;
inline float
exp(float __x)
{ return __builtin_expf(__x); }
inline long double
exp(long double __x)
{ return __builtin_expl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
exp(_Tp __x)
{ return __builtin_exp(__x); }
using ::fabs;
inline float
fabs(float __x)
{ return __builtin_fabsf(__x); }
inline long double
fabs(long double __x)
{ return __builtin_fabsl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
fabs(_Tp __x)
{ return __builtin_fabs(__x); }
using ::floor;
inline float
floor(float __x)
{ return __builtin_floorf(__x); }
inline long double
floor(long double __x)
{ return __builtin_floorl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
floor(_Tp __x)
{ return __builtin_floor(__x); }
using ::fmod;
inline float
fmod(float __x, float __y)
{ return __builtin_fmodf(__x, __y); }
inline long double
fmod(long double __x, long double __y)
{ return __builtin_fmodl(__x, __y); }
using ::frexp;
inline float
frexp(float __x, int* __exp)
{ return __builtin_frexpf(__x, __exp); }
inline long double
frexp(long double __x, int* __exp)
{ return __builtin_frexpl(__x, __exp); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
frexp(_Tp __x, int* __exp)
{ return __builtin_frexp(__x, __exp); }
using ::ldexp;
inline float
ldexp(float __x, int __exp)
{ return __builtin_ldexpf(__x, __exp); }
inline long double
ldexp(long double __x, int __exp)
{ return __builtin_ldexpl(__x, __exp); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
ldexp(_Tp __x, int __exp)
{ return __builtin_ldexp(__x, __exp); }
using ::log;
inline float
log(float __x)
{ return __builtin_logf(__x); }
inline long double
log(long double __x)
{ return __builtin_logl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log(_Tp __x)
{ return __builtin_log(__x); }
using ::log10;
inline float
log10(float __x)
{ return __builtin_log10f(__x); }
inline long double
log10(long double __x)
{ return __builtin_log10l(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
log10(_Tp __x)
{ return __builtin_log10(__x); }
using ::modf;
inline float
modf(float __x, float* __iptr)
{ return __builtin_modff(__x, __iptr); }
inline long double
modf(long double __x, long double* __iptr)
{ return __builtin_modfl(__x, __iptr); }
using ::pow;
inline float
pow(float __x, float __y)
{ return __builtin_powf(__x, __y); }
inline long double
pow(long double __x, long double __y)
{ return __builtin_powl(__x, __y); }
inline double
pow(double __x, int __i)
{ return __builtin_powi(__x, __i); }
inline float
pow(float __x, int __n)
{ return __builtin_powif(__x, __n); }
inline long double
pow(long double __x, int __n)
{ return __builtin_powil(__x, __n); }
template<typename _Tp, typename _Up>
inline
typename __gnu_cxx::__promote_2<
typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
&& __is_arithmetic<_Up>::__value,
_Tp>::__type, _Up>::__type
pow(_Tp __x, _Up __y)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
return pow(__type(__x), __type(__y));
}
using ::sin;
inline float
sin(float __x)
{ return __builtin_sinf(__x); }
inline long double
sin(long double __x)
{ return __builtin_sinl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sin(_Tp __x)
{ return __builtin_sin(__x); }
using ::sinh;
inline float
sinh(float __x)
{ return __builtin_sinhf(__x); }
inline long double
sinh(long double __x)
{ return __builtin_sinhl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sinh(_Tp __x)
{ return __builtin_sinh(__x); }
using ::sqrt;
inline float
sqrt(float __x)
{ return __builtin_sqrtf(__x); }
inline long double
sqrt(long double __x)
{ return __builtin_sqrtl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
sqrt(_Tp __x)
{ return __builtin_sqrt(__x); }
using ::tan;
inline float
tan(float __x)
{ return __builtin_tanf(__x); }
inline long double
tan(long double __x)
{ return __builtin_tanl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tan(_Tp __x)
{ return __builtin_tan(__x); }
using ::tanh;
inline float
tanh(float __x)
{ return __builtin_tanhf(__x); }
inline long double
tanh(long double __x)
{ return __builtin_tanhl(__x); }
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
double>::__type
tanh(_Tp __x)
{ return __builtin_tanh(__x); }
}
# 492 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
fpclassify(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
FP_SUBNORMAL, FP_ZERO, __type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isfinite(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isfinite(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isinf(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isinf(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnan(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnan(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isnormal(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isnormal(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
signbit(_Tp __f)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_signbit(__type(__f));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreater(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isgreaterequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isgreaterequal(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isless(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isless(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessequal(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessequal(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
islessgreater(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_islessgreater(__type(__f1), __type(__f2));
}
template<typename _Tp>
inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
int>::__type
isunordered(_Tp __f1, _Tp __f2)
{
typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
return __builtin_isunordered(__type(__f1), __type(__f2));
}
}
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cmath.tcc" 1 3
# 35 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/cmath.tcc" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _Tp>
inline _Tp
__cmath_power(_Tp __x, unsigned int __n)
{
_Tp __y = __n % 2 ? __x : _Tp(1);
while (__n >>= 1)
{
__x = __x * __x;
if (__n % 2)
__y = __y * __x;
}
return __y;
}
}
# 610 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cmath" 2 3
# 7775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 1 3
# 41 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 42 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 3
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h" 1 3 4
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstddef" 2 3
# 45 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 2 3
# 100 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
}
# 157 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
using ::lldiv_t;
using ::_Exit;
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
using ::llabs;
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::lldiv;
# 190 "/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/cstdlib" 3
using ::atoll;
using ::strtoll;
using ::strtoull;
using ::strtof;
using ::strtold;
}
namespace std __attribute__ ((__visibility__ ("default"))) {
using ::__gnu_cxx::lldiv_t;
using ::__gnu_cxx::_Exit;
using ::__gnu_cxx::abs;
using ::__gnu_cxx::llabs;
using ::__gnu_cxx::div;
using ::__gnu_cxx::lldiv;
using ::__gnu_cxx::atoll;
using ::__gnu_cxx::strtof;
using ::__gnu_cxx::strtoll;
using ::__gnu_cxx::strtoull;
using ::__gnu_cxx::strtold;
}
# 7776 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 7827 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
namespace __gnu_cxx
{
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) long long int abs(long long int a);
}
namespace std
{
template<typename T> extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) T __pow_helper(T, int);
template<typename T> extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) T __cmath_power(T, unsigned int);
}
using std::abs;
using std::fabs;
using std::ceil;
using std::floor;
using std::sqrt;
using std::pow;
using std::log;
using std::log10;
using std::fmod;
using std::modf;
using std::exp;
using std::frexp;
using std::ldexp;
using std::asin;
using std::sin;
using std::sinh;
using std::acos;
using std::cos;
using std::cosh;
using std::atan;
using std::atan2;
using std::tan;
using std::tanh;
# 8037 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
namespace std {
# 8048 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) long int abs(long int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float abs(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) double abs(double);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float fabs(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float ceil(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float floor(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sqrt(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float pow(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float pow(float, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) double pow(double, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float log(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float log10(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float fmod(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float modf(float, float*);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float exp(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float frexp(float, int*);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float ldexp(float, int);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float asin(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sin(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float sinh(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float acos(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float cos(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float cosh(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float atan(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float atan2(float, float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float tan(float);
extern __attribute__((host)) __attribute__((device)) __attribute__((cudart_builtin)) float tanh(float);
}
static __inline__ __attribute__((host)) __attribute__((device)) float logb(float a)
{
return logbf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) int ilogb(float a)
{
return ilogbf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float scalbn(float a, int b)
{
return scalbnf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float scalbln(float a, long int b)
{
return scalblnf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float exp2(float a)
{
return exp2f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float exp10(float a)
{
return exp10f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float expm1(float a)
{
return expm1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float log2(float a)
{
return log2f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float log1p(float a)
{
return log1pf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rsqrt(float a)
{
return rsqrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float acosh(float a)
{
return acoshf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float asinh(float a)
{
return asinhf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float atanh(float a)
{
return atanhf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float hypot(float a, float b)
{
return hypotf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cbrt(float a)
{
return cbrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rcbrt(float a)
{
return rcbrtf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float sinpi(float a)
{
return sinpif(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cospi(float a)
{
return cospif(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) void sincospi(float a, float *sptr, float *cptr)
{
sincospif(a, sptr, cptr);
}
static __inline__ __attribute__((host)) __attribute__((device)) void sincos(float a, float *sptr, float *cptr)
{
sincosf(a, sptr, cptr);
}
static __inline__ __attribute__((host)) __attribute__((device)) float j0(float a)
{
return j0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float j1(float a)
{
return j1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float jn(int n, float a)
{
return jnf(n, a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float y0(float a)
{
return y0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float y1(float a)
{
return y1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float yn(int n, float a)
{
return ynf(n, a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cyl_bessel_i0(float a)
{
return cyl_bessel_i0f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float cyl_bessel_i1(float a)
{
return cyl_bessel_i1f(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erf(float a)
{
return erff(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfinv(float a)
{
return erfinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfc(float a)
{
return erfcf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfcinv(float a)
{
return erfcinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float normcdfinv(float a)
{
return normcdfinvf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float normcdf(float a)
{
return normcdff(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float erfcx(float a)
{
return erfcxf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float lgamma(float a)
{
return lgammaf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float tgamma(float a)
{
return tgammaf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float copysign(float a, float b)
{
return copysignf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double copysign(double a, float b)
{
return copysign(a, (double)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float copysign(float a, double b)
{
return copysignf(a, (float)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float nextafter(float a, float b)
{
return nextafterf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float remainder(float a, float b)
{
return remainderf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float remquo(float a, float b, int *quo)
{
return remquof(a, b, quo);
}
static __inline__ __attribute__((host)) __attribute__((device)) float round(float a)
{
return roundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long int lround(float a)
{
return lroundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int llround(float a)
{
return llroundf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float trunc(float a)
{
return truncf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float rint(float a)
{
return rintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long int lrint(float a)
{
return lrintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int llrint(float a)
{
return llrintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float nearbyint(float a)
{
return nearbyintf(a);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fdim(float a, float b)
{
return fdimf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fma(float a, float b, float c)
{
return fmaf(a, b, c);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fmax(float a, float b)
{
return fmaxf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float fmin(float a, float b)
{
return fminf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(unsigned int a, unsigned int b)
{
return umin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(int a, unsigned int b)
{
return umin((unsigned int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int min(unsigned int a, int b)
{
return umin(a, (unsigned int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int min(long long int a, long long int b)
{
return llmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(unsigned long long int a, unsigned long long int b)
{
return ullmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(long long int a, unsigned long long int b)
{
return ullmin((unsigned long long int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int min(unsigned long long int a, long long int b)
{
return ullmin(a, (unsigned long long int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float min(float a, float b)
{
return fminf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(double a, double b)
{
return fmin(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(float a, double b)
{
return fmin((double)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double min(double a, float b)
{
return fmin(a, (double)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(unsigned int a, unsigned int b)
{
return umax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(int a, unsigned int b)
{
return umax((unsigned int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned int max(unsigned int a, int b)
{
return umax(a, (unsigned int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) long long int max(long long int a, long long int b)
{
return llmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(unsigned long long int a, unsigned long long int b)
{
return ullmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(long long int a, unsigned long long int b)
{
return ullmax((unsigned long long int)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) unsigned long long int max(unsigned long long int a, long long int b)
{
return ullmax(a, (unsigned long long int)b);
}
static __inline__ __attribute__((host)) __attribute__((device)) float max(float a, float b)
{
return fmaxf(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(double a, double b)
{
return fmax(a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(float a, double b)
{
return fmax((double)a, b);
}
static __inline__ __attribute__((host)) __attribute__((device)) double max(double a, float b)
{
return fmax(a, (double)b);
}
# 14070 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions_dbl_ptx3.h" 1
# 14071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/math_functions.h" 2
# 168 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/common_functions.h" 2
# 77 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_surface_types.h"
template<class T, int dim = 1>
struct __attribute__((device_builtin_surface_type)) surface : public surfaceReference
{
__attribute__((host)) surface(void)
{
channelDesc = cudaCreateChannelDesc<T>();
}
__attribute__((host)) surface(struct cudaChannelFormatDesc desc)
{
channelDesc = desc;
}
};
template<int dim>
struct __attribute__((device_builtin_surface_type)) surface<void, dim> : public surfaceReference
{
__attribute__((host)) surface(void)
{
channelDesc = cudaCreateChannelDesc<void>();
}
};
# 78 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_texture_types.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_texture_types.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_texture_types.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_texture_types.h"
template<class T, int texType = 0x01, enum cudaTextureReadMode mode = cudaReadModeElementType>
struct __attribute__((device_builtin_texture_type)) texture : public textureReference
{
__attribute__((host)) texture(int norm = 0,
enum cudaTextureFilterMode fMode = cudaFilterModePoint,
enum cudaTextureAddressMode aMode = cudaAddressModeClamp)
{
normalized = norm;
filterMode = fMode;
addressMode[0] = aMode;
addressMode[1] = aMode;
addressMode[2] = aMode;
channelDesc = cudaCreateChannelDesc<T>();
sRGB = 0;
}
__attribute__((host)) texture(int norm,
enum cudaTextureFilterMode fMode,
enum cudaTextureAddressMode aMode,
struct cudaChannelFormatDesc desc)
{
normalized = norm;
filterMode = fMode;
addressMode[0] = aMode;
addressMode[1] = aMode;
addressMode[2] = aMode;
channelDesc = desc;
sRGB = 0;
}
};
# 79 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 71 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern "C"
{
# 82 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __mulhi(int x, int y);
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __umulhi(unsigned int x, unsigned int y);
# 102 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __mul64hi(long long int x, long long int y);
# 112 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __umul64hi(unsigned long long int x, unsigned long long int y);
# 121 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int_as_float(int x);
# 130 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float_as_int(float x);
extern __attribute__((device)) __attribute__((device_builtin)) void __syncthreads(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __prof_trigger(int);
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence_block(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __trap(void);
extern __attribute__((device)) __attribute__((device_builtin)) void __brkpt(int c = 0);
# 159 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __saturatef(float x);
# 228 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __sad(int x, int y, unsigned int z);
# 296 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __usad(unsigned int x, unsigned int y, unsigned int z);
# 306 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __mul24(int x, int y);
# 316 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __umul24(unsigned int x, unsigned int y);
# 329 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float fdividef(float x, float y);
# 404 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdividef(float x, float y);
extern __attribute__((device)) __attribute__((device_builtin)) double fdivide(double x, double y);
# 417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __sinf(float x) throw ();
# 429 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __cosf(float x) throw ();
# 443 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __tanf(float x) throw ();
# 458 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) void __sincosf(float x, float *sptr, float *cptr) throw ();
# 508 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __expf(float x) throw ();
# 540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __exp10f(float x) throw ();
# 566 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __log2f(float x) throw ();
# 594 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __log10f(float x) throw ();
# 638 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __logf(float x) throw ();
# 681 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) __attribute__((cudart_builtin)) float __powf(float x, float y) throw ();
# 690 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rn(float x);
# 699 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rz(float x);
# 708 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_ru(float);
# 717 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __float2int_rd(float x);
# 726 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rn(float x);
# 735 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rz(float x);
# 744 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_ru(float x);
# 753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __float2uint_rd(float x);
# 762 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rn(int x);
# 771 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rz(int x);
# 780 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_ru(int x);
# 789 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __int2float_rd(int x);
# 798 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rn(unsigned int x);
# 807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rz(unsigned int x);
# 816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_ru(unsigned int x);
# 825 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __uint2float_rd(unsigned int x);
# 834 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rn(float x);
# 843 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rz(float x);
# 852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_ru(float x);
# 861 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __float2ll_rd(float x);
# 870 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rn(float x);
# 879 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rz(float x);
# 888 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_ru(float x);
# 897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __float2ull_rd(float x);
# 906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rn(long long int x);
# 915 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rz(long long int x);
# 924 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_ru(long long int x);
# 933 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ll2float_rd(long long int x);
# 942 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rn(unsigned long long int x);
# 951 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rz(unsigned long long int x);
# 960 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_ru(unsigned long long int x);
# 969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __ull2float_rd(unsigned long long int x);
# 978 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned short __float2half_rn(float x);
# 987 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __half2float(unsigned short x);
# 999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rn(float x, float y);
# 1011 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rz(float x, float y);
# 1023 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_ru(float x, float y);
# 1035 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fadd_rd(float x, float y);
# 1047 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rn(float x, float y);
# 1059 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rz(float x, float y);
# 1071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_ru(float x, float y);
# 1083 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsub_rd(float x, float y);
# 1095 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rn(float x, float y);
# 1107 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rz(float x, float y);
# 1119 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_ru(float x, float y);
# 1131 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmul_rd(float x, float y);
# 1284 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rn(float x, float y, float z);
# 1437 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rz(float x, float y, float z);
# 1590 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ru(float x, float y, float z);
# 1743 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_rd(float x, float y, float z);
# 1776 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rn(float x);
# 1809 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rz(float x);
# 1842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_ru(float x);
# 1875 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frcp_rd(float x);
# 1906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rn(float x);
# 1937 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rz(float x);
# 1968 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_ru(float x);
# 1999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fsqrt_rd(float x);
# 2038 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __frsqrt_rn(float x);
# 2049 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rn(float x, float y);
# 2060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rz(float x, float y);
# 2071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_ru(float x, float y);
# 2082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __fdiv_rd(float x, float y);
# 2091 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __clz(int x);
# 2102 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __ffs(int x);
# 2111 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __popc(unsigned int x);
# 2120 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __brev(unsigned int x);
# 2129 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __clzll(long long int x);
# 2140 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __ffsll(long long int x);
# 2151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __popcll(unsigned long long int x);
# 2160 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __brevll(unsigned long long int x);
# 2184 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __byte_perm(unsigned int x, unsigned int y, unsigned int s);
# 2196 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __hadd(int, int);
# 2209 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __rhadd(int, int);
# 2221 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uhadd(unsigned int, unsigned int);
# 2234 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __urhadd(unsigned int, unsigned int);
# 2245 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rz(double);
# 2254 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rz(double);
# 2263 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rz(double);
# 2272 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rz(double);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm0(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm1(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm2(void);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __pm3(void);
# 2294 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabs2(unsigned int a);
# 2305 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsss2(unsigned int a);
# 2316 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vadd2(unsigned int a, unsigned int b);
# 2327 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddss2 (unsigned int a, unsigned int b);
# 2337 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddus2 (unsigned int a, unsigned int b);
# 2348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgs2(unsigned int a, unsigned int b);
# 2359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgu2(unsigned int a, unsigned int b);
# 2370 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vhaddu2(unsigned int a, unsigned int b);
# 2381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpeq2(unsigned int a, unsigned int b);
# 2392 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpges2(unsigned int a, unsigned int b);
# 2403 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgeu2(unsigned int a, unsigned int b);
# 2414 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgts2(unsigned int a, unsigned int b);
# 2425 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgtu2(unsigned int a, unsigned int b);
# 2436 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmples2(unsigned int a, unsigned int b);
# 2448 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpleu2(unsigned int a, unsigned int b);
# 2459 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmplts2(unsigned int a, unsigned int b);
# 2470 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpltu2(unsigned int a, unsigned int b);
# 2481 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpne2(unsigned int a, unsigned int b);
# 2492 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffu2(unsigned int a, unsigned int b);
# 2503 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxs2(unsigned int a, unsigned int b);
# 2514 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxu2(unsigned int a, unsigned int b);
# 2525 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmins2(unsigned int a, unsigned int b);
# 2536 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vminu2(unsigned int a, unsigned int b);
# 2547 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vseteq2(unsigned int a, unsigned int b);
# 2558 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetges2(unsigned int a, unsigned int b);
# 2569 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgeu2(unsigned int a, unsigned int b);
# 2580 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgts2(unsigned int a, unsigned int b);
# 2591 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgtu2(unsigned int a, unsigned int b);
# 2602 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetles2(unsigned int a, unsigned int b);
# 2613 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetleu2(unsigned int a, unsigned int b);
# 2624 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetlts2(unsigned int a, unsigned int b);
# 2635 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetltu2(unsigned int a, unsigned int b);
# 2646 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetne2(unsigned int a, unsigned int b);
# 2657 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsadu2(unsigned int a, unsigned int b);
# 2668 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsub2(unsigned int a, unsigned int b);
# 2679 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubss2 (unsigned int a, unsigned int b);
# 2690 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubus2 (unsigned int a, unsigned int b);
# 2700 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vneg2(unsigned int a);
# 2710 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vnegss2(unsigned int a);
# 2721 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffs2(unsigned int a, unsigned int b);
# 2732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsads2(unsigned int a, unsigned int b);
# 2742 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabs4(unsigned int a);
# 2753 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsss4(unsigned int a);
# 2764 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vadd4(unsigned int a, unsigned int b);
# 2775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddss4 (unsigned int a, unsigned int b);
# 2785 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vaddus4 (unsigned int a, unsigned int b);
# 2796 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgs4(unsigned int a, unsigned int b);
# 2807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vavgu4(unsigned int a, unsigned int b);
# 2818 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vhaddu4(unsigned int a, unsigned int b);
# 2829 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpeq4(unsigned int a, unsigned int b);
# 2840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpges4(unsigned int a, unsigned int b);
# 2851 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgeu4(unsigned int a, unsigned int b);
# 2862 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgts4(unsigned int a, unsigned int b);
# 2873 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpgtu4(unsigned int a, unsigned int b);
# 2884 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmples4(unsigned int a, unsigned int b);
# 2895 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpleu4(unsigned int a, unsigned int b);
# 2906 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmplts4(unsigned int a, unsigned int b);
# 2917 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpltu4(unsigned int a, unsigned int b);
# 2928 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vcmpne4(unsigned int a, unsigned int b);
# 2939 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffu4(unsigned int a, unsigned int b);
# 2950 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxs4(unsigned int a, unsigned int b);
# 2961 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmaxu4(unsigned int a, unsigned int b);
# 2972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vmins4(unsigned int a, unsigned int b);
# 2983 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vminu4(unsigned int a, unsigned int b);
# 2994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vseteq4(unsigned int a, unsigned int b);
# 3005 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetles4(unsigned int a, unsigned int b);
# 3016 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetleu4(unsigned int a, unsigned int b);
# 3027 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetlts4(unsigned int a, unsigned int b);
# 3038 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetltu4(unsigned int a, unsigned int b);
# 3049 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetges4(unsigned int a, unsigned int b);
# 3060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgeu4(unsigned int a, unsigned int b);
# 3071 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgts4(unsigned int a, unsigned int b);
# 3082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetgtu4(unsigned int a, unsigned int b);
# 3093 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsetne4(unsigned int a, unsigned int b);
# 3104 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsadu4(unsigned int a, unsigned int b);
# 3115 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsub4(unsigned int a, unsigned int b);
# 3126 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubss4(unsigned int a, unsigned int b);
# 3137 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsubus4(unsigned int a, unsigned int b);
# 3147 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vneg4(unsigned int a);
# 3157 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vnegss4(unsigned int a);
# 3168 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vabsdiffs4(unsigned int a, unsigned int b);
# 3179 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __vsads4(unsigned int a, unsigned int b);
}
static __inline__ __attribute__((device)) int mulhi(int a, int b)
{
return __mulhi(a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(unsigned int a, unsigned int b)
{
return __umulhi(a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(int a, unsigned int b)
{
return __umulhi((unsigned int)a, b);
}
static __inline__ __attribute__((device)) unsigned int mulhi(unsigned int a, int b)
{
return __umulhi(a, (unsigned int)b);
}
static __inline__ __attribute__((device)) long long int mul64hi(long long int a, long long int b)
{
return __mul64hi(a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(unsigned long long int a, unsigned long long int b)
{
return __umul64hi(a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(long long int a, unsigned long long int b)
{
return __umul64hi((unsigned long long int)a, b);
}
static __inline__ __attribute__((device)) unsigned long long int mul64hi(unsigned long long int a, long long int b)
{
return __umul64hi(a, (unsigned long long int)b);
}
static __inline__ __attribute__((device)) int float_as_int(float a)
{
return __float_as_int(a);
}
static __inline__ __attribute__((device)) float int_as_float(int a)
{
return __int_as_float(a);
}
static __inline__ __attribute__((device)) float saturate(float a)
{
return __saturatef(a);
}
static __inline__ __attribute__((device)) int mul24(int a, int b)
{
return __mul24(a, b);
}
static __inline__ __attribute__((device)) unsigned int umul24(unsigned int a, unsigned int b)
{
return __umul24(a, b);
}
static __inline__ __attribute__((device)) void trap(void)
{
__trap();
}
static __inline__ __attribute__((device)) void brkpt(int c = 0)
{
__brkpt(c);
}
static __inline__ __attribute__((device)) void syncthreads(void)
{
__syncthreads();
}
static __inline__ __attribute__((device)) void prof_trigger(int e)
{
if (e == 0) __prof_trigger( 0);
else if (e == 1) __prof_trigger( 1);
else if (e == 2) __prof_trigger( 2);
else if (e == 3) __prof_trigger( 3);
else if (e == 4) __prof_trigger( 4);
else if (e == 5) __prof_trigger( 5);
else if (e == 6) __prof_trigger( 6);
else if (e == 7) __prof_trigger( 7);
else if (e == 8) __prof_trigger( 8);
else if (e == 9) __prof_trigger( 9);
else if (e == 10) __prof_trigger(10);
else if (e == 11) __prof_trigger(11);
else if (e == 12) __prof_trigger(12);
else if (e == 13) __prof_trigger(13);
else if (e == 14) __prof_trigger(14);
else if (e == 15) __prof_trigger(15);
}
static __inline__ __attribute__((device)) void threadfence(bool global = true)
{
global ? __threadfence() : __threadfence_block();
}
static __inline__ __attribute__((device)) int float2int(float a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __float2int_rn(a) :
mode == cudaRoundPosInf ? __float2int_ru(a) :
mode == cudaRoundMinInf ? __float2int_rd(a) :
__float2int_rz(a);
}
static __inline__ __attribute__((device)) unsigned int float2uint(float a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __float2uint_rn(a) :
mode == cudaRoundPosInf ? __float2uint_ru(a) :
mode == cudaRoundMinInf ? __float2uint_rd(a) :
__float2uint_rz(a);
}
static __inline__ __attribute__((device)) float int2float(int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __int2float_rz(a) :
mode == cudaRoundPosInf ? __int2float_ru(a) :
mode == cudaRoundMinInf ? __int2float_rd(a) :
__int2float_rn(a);
}
static __inline__ __attribute__((device)) float uint2float(unsigned int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __uint2float_rz(a) :
mode == cudaRoundPosInf ? __uint2float_ru(a) :
mode == cudaRoundMinInf ? __uint2float_rd(a) :
__uint2float_rn(a);
}
# 9405 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_11_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicAdd(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicAdd(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicExch(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicExch(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) float __fAtomicExch(float *address, float val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicMin(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicMin(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicMax(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicMax(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicInc(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicDec(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicAnd(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicAnd(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicOr(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicOr(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicXor(int *address, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicXor(unsigned int *address, unsigned int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __iAtomicCAS(int *address, int compare, int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __uAtomicCAS(unsigned int *address, unsigned int compare, unsigned int val);
}
static __inline__ __attribute__((device)) int atomicAdd(int *address, int val)
{
return __iAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicAdd(unsigned int *address, unsigned int val)
{
return __uAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) int atomicSub(int *address, int val)
{
return __iAtomicAdd(address, (unsigned int)-(int)val);
}
static __inline__ __attribute__((device)) unsigned int atomicSub(unsigned int *address, unsigned int val)
{
return __uAtomicAdd(address, (unsigned int)-(int)val);
}
static __inline__ __attribute__((device)) int atomicExch(int *address, int val)
{
return __iAtomicExch(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicExch(unsigned int *address, unsigned int val)
{
return __uAtomicExch(address, val);
}
static __inline__ __attribute__((device)) float atomicExch(float *address, float val)
{
return __fAtomicExch(address, val);
}
static __inline__ __attribute__((device)) int atomicMin(int *address, int val)
{
return __iAtomicMin(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicMin(unsigned int *address, unsigned int val)
{
return __uAtomicMin(address, val);
}
static __inline__ __attribute__((device)) int atomicMax(int *address, int val)
{
return __iAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicMax(unsigned int *address, unsigned int val)
{
return __uAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicInc(unsigned int *address, unsigned int val)
{
return __uAtomicInc(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicDec(unsigned int *address, unsigned int val)
{
return __uAtomicDec(address, val);
}
static __inline__ __attribute__((device)) int atomicAnd(int *address, int val)
{
return __iAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicAnd(unsigned int *address, unsigned int val)
{
return __uAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) int atomicOr(int *address, int val)
{
return __iAtomicOr(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicOr(unsigned int *address, unsigned int val)
{
return __uAtomicOr(address, val);
}
static __inline__ __attribute__((device)) int atomicXor(int *address, int val)
{
return __iAtomicXor(address, val);
}
static __inline__ __attribute__((device)) unsigned int atomicXor(unsigned int *address, unsigned int val)
{
return __uAtomicXor(address, val);
}
static __inline__ __attribute__((device)) int atomicCAS(int *address, int compare, int val)
{
return __iAtomicCAS(address, compare, val);
}
static __inline__ __attribute__((device)) unsigned int atomicCAS(unsigned int *address, unsigned int compare, unsigned int val)
{
return __uAtomicCAS(address, compare, val);
}
# 9406 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_12_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicAdd(unsigned long long int *address, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicExch(unsigned long long int *address, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __ullAtomicCAS(unsigned long long int *address, unsigned long long int compare, unsigned long long int val);
extern __attribute__((device)) __attribute__((device_builtin)) int __any(int cond);
extern __attribute__((device)) __attribute__((device_builtin)) int __all(int cond);
}
static __inline__ __attribute__((device)) unsigned long long int atomicAdd(unsigned long long int *address, unsigned long long int val)
{
return __ullAtomicAdd(address, val);
}
static __inline__ __attribute__((device)) unsigned long long int atomicExch(unsigned long long int *address, unsigned long long int val)
{
return __ullAtomicExch(address, val);
}
static __inline__ __attribute__((device)) unsigned long long int atomicCAS(unsigned long long int *address, unsigned long long int compare, unsigned long long int val)
{
return __ullAtomicCAS(address, compare, val);
}
static __inline__ __attribute__((device)) bool any(bool cond)
{
return (bool)__any((int)cond);
}
static __inline__ __attribute__((device)) bool all(bool cond)
{
return (bool)__all((int)cond);
}
# 9407 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h" 1
# 69 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h" 2
extern "C"
{
# 83 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double_as_longlong(double x);
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __longlong_as_double(long long int x);
# 249 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rn(double x, double y, double z);
# 406 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rz(double x, double y, double z);
# 563 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_ru(double x, double y, double z);
# 720 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __fma_rd(double x, double y, double z);
# 732 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rn(double x, double y);
# 744 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rz(double x, double y);
# 756 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_ru(double x, double y);
# 768 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dadd_rd(double x, double y);
# 780 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rn(double x, double y);
# 792 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rz(double x, double y);
# 804 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_ru(double x, double y);
# 816 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsub_rd(double x, double y);
# 828 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rn(double x, double y);
# 840 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rz(double x, double y);
# 852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_ru(double x, double y);
# 864 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dmul_rd(double x, double y);
# 873 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rn(double x);
# 882 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rz(double x);
# 891 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_ru(double x);
# 900 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) float __double2float_rd(double x);
# 909 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rn(double x);
# 918 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_ru(double x);
# 927 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2int_rd(double x);
# 936 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rn(double x);
# 945 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_ru(double x);
# 954 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __double2uint_rd(double x);
# 963 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rn(double x);
# 972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_ru(double x);
# 981 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) long long int __double2ll_rd(double x);
# 990 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rn(double x);
# 999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_ru(double x);
# 1008 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long int __double2ull_rd(double x);
extern __attribute__((device)) __attribute__((device_builtin)) double __int2double_rn(int x);
extern __attribute__((device)) __attribute__((device_builtin)) double __uint2double_rn(unsigned int x);
# 1033 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rn(long long int x);
# 1042 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rz(long long int x);
# 1051 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_ru(long long int x);
# 1060 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ll2double_rd(long long int x);
# 1069 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rn(unsigned long long int x);
# 1078 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rz(unsigned long long int x);
# 1087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_ru(unsigned long long int x);
# 1096 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ull2double_rd(unsigned long long int x);
# 1105 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2hiint(double x);
# 1114 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) int __double2loint(double x);
# 1124 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_13_double_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __hiloint2double(int hi, int lo);
}
static __inline__ __attribute__((device)) double fma(double a, double b, double c, enum cudaRoundMode mode)
{
return mode == cudaRoundZero ? __fma_rz(a, b, c) :
mode == cudaRoundPosInf ? __fma_ru(a, b, c) :
mode == cudaRoundMinInf ? __fma_rd(a, b, c) :
__fma_rn(a, b, c);
}
static __inline__ __attribute__((device)) double dmul(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dmul_rz(a, b) :
mode == cudaRoundPosInf ? __dmul_ru(a, b) :
mode == cudaRoundMinInf ? __dmul_rd(a, b) :
__dmul_rn(a, b);
}
static __inline__ __attribute__((device)) double dadd(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dadd_rz(a, b) :
mode == cudaRoundPosInf ? __dadd_ru(a, b) :
mode == cudaRoundMinInf ? __dadd_rd(a, b) :
__dadd_rn(a, b);
}
static __inline__ __attribute__((device)) double dsub(double a, double b, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __dsub_rz(a, b) :
mode == cudaRoundPosInf ? __dsub_ru(a, b) :
mode == cudaRoundMinInf ? __dsub_rd(a, b) :
__dsub_rn(a, b);
}
static __inline__ __attribute__((device)) int double2int(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2int_rn(a) :
mode == cudaRoundPosInf ? __double2int_ru(a) :
mode == cudaRoundMinInf ? __double2int_rd(a) :
__double2int_rz(a);
}
static __inline__ __attribute__((device)) unsigned int double2uint(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2uint_rn(a) :
mode == cudaRoundPosInf ? __double2uint_ru(a) :
mode == cudaRoundMinInf ? __double2uint_rd(a) :
__double2uint_rz(a);
}
static __inline__ __attribute__((device)) long long int double2ll(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2ll_rn(a) :
mode == cudaRoundPosInf ? __double2ll_ru(a) :
mode == cudaRoundMinInf ? __double2ll_rd(a) :
__double2ll_rz(a);
}
static __inline__ __attribute__((device)) unsigned long long int double2ull(double a, enum cudaRoundMode mode = cudaRoundZero)
{
return mode == cudaRoundNearest ? __double2ull_rn(a) :
mode == cudaRoundPosInf ? __double2ull_ru(a) :
mode == cudaRoundMinInf ? __double2ull_rd(a) :
__double2ull_rz(a);
}
static __inline__ __attribute__((device)) double ll2double(long long int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __ll2double_rz(a) :
mode == cudaRoundPosInf ? __ll2double_ru(a) :
mode == cudaRoundMinInf ? __ll2double_rd(a) :
__ll2double_rn(a);
}
static __inline__ __attribute__((device)) double ull2double(unsigned long long int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return mode == cudaRoundZero ? __ull2double_rz(a) :
mode == cudaRoundPosInf ? __ull2double_ru(a) :
mode == cudaRoundMinInf ? __ull2double_rd(a) :
__ull2double_rn(a);
}
static __inline__ __attribute__((device)) double int2double(int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
static __inline__ __attribute__((device)) double uint2double(unsigned int a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
static __inline__ __attribute__((device)) double float2double(float a, enum cudaRoundMode mode = cudaRoundNearest)
{
return (double)a;
}
# 9408 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) float __fAtomicAdd(float *address, float val);
}
static __inline__ __attribute__((device)) float atomicAdd(float *address, float val)
{
return __fAtomicAdd(address, val);
}
# 9409 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_atomic_functions.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) long long __illAtomicMin(long long *address, long long val);
extern __attribute__((device)) __attribute__((device_builtin)) long long __illAtomicMax(long long *address, long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicMin(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicMax(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicAnd(unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicOr (unsigned long long *address, unsigned long long val);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned long long __ullAtomicXor(unsigned long long *address, unsigned long long val);
}
static __inline__ __attribute__((device)) long long atomicMin(long long *address, long long val)
{
return __illAtomicMin(address, val);
}
static __inline__ __attribute__((device)) long long atomicMax(long long *address, long long val)
{
return __illAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicMin(unsigned long long *address, unsigned long long val)
{
return __ullAtomicMin(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicMax(unsigned long long *address, unsigned long long val)
{
return __ullAtomicMax(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicAnd(unsigned long long *address, unsigned long long val)
{
return __ullAtomicAnd(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicOr(unsigned long long *address, unsigned long long val)
{
return __ullAtomicOr(address, val);
}
static __inline__ __attribute__((device)) unsigned long long atomicXor(unsigned long long *address, unsigned long long val)
{
return __ullAtomicXor(address, val);
}
# 9410 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_35_atomic_functions.h" 1
# 9411 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h" 2
extern "C"
{
extern __attribute__((device)) __attribute__((device_builtin)) void __threadfence_system(void);
# 81 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rn(double x, double y);
# 93 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rz(double x, double y);
# 105 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_ru(double x, double y);
# 117 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __ddiv_rd(double x, double y);
# 151 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rn(double x);
# 185 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rz(double x);
# 219 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_ru(double x);
# 253 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __drcp_rd(double x);
# 285 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rn(double x);
# 317 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rz(double x);
# 349 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_ru(double x);
# 381 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_20_intrinsics.h"
extern __attribute__((device)) __attribute__((device_builtin)) double __dsqrt_rd(double x);
extern __attribute__((device)) __attribute__((device_builtin)) unsigned int __ballot(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_count(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_and(int);
extern __attribute__((device)) __attribute__((device_builtin)) int __syncthreads_or(int);
extern __attribute__((device)) __attribute__((device_builtin)) long long int clock64(void);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rn(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rz(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_ru(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) float __fmaf_ieee_rd(float, float, float);
extern __attribute__((device)) __attribute__((device_builtin)) double __rcp64h(double);
}
static __inline__ __attribute__((device)) unsigned int ballot(bool pred)
{
return __ballot((int)pred);
}
static __inline__ __attribute__((device)) int syncthreads_count(bool pred)
{
return __syncthreads_count((int)pred);
}
static __inline__ __attribute__((device)) bool syncthreads_and(bool pred)
{
return (bool)__syncthreads_and((int)pred);
}
static __inline__ __attribute__((device)) bool syncthreads_or(bool pred)
{
return (bool)__syncthreads_or((int)pred);
}
static __inline__ __attribute__((device)) unsigned int __isGlobal(const void *ptr)
{
unsigned int ret;
asm volatile ("{ \n\t"
" .reg .pred p; \n\t"
" isspacep.global p, %1; \n\t"
" selp.u32 %0, 1, 0, p; \n\t"
"} \n\t" : "=r"(ret) : "l"(ptr));
return ret;
}
# 9412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h" 2
extern "C"
{
}
# 93 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_30_intrinsics.h"
static __attribute__((device)) __inline__ int __shfl(int var, int srcLane, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.idx.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(srcLane), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_up(int var, unsigned int delta, int width=32) {
int ret, c;
c = (32 -width) << 8;
asm volatile ("shfl.up.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_down(int var, unsigned int delta, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.down.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ int __shfl_xor(int var, int laneMask, int width=32) {
int ret, c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.bfly.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(var), "r"(laneMask), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl(float var, int srcLane, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.idx.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(srcLane), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_up(float var, unsigned int delta, int width=32) {
float ret;
int c;
c = (32 -width) << 8;
asm volatile ("shfl.up.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_down(float var, unsigned int delta, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.down.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(delta), "r"(c));
return ret;
}
static __attribute__((device)) __inline__ float __shfl_xor(float var, int laneMask, int width=32) {
float ret;
int c;
c = ((32 -width) << 8) | 0x1f;
asm volatile ("shfl.bfly.b32 %0, %1, %2, %3;" : "=f"(ret) : "f"(var), "r"(laneMask), "r"(c));
return ret;
}
# 9413 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 64 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h" 2
extern "C"
{
}
# 91 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
static __attribute__((device)) __inline__ char __ldg(const char *ptr) { unsigned int ret; asm volatile ("ld.global.nc.s8 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (char)ret; }
static __attribute__((device)) __inline__ short __ldg(const short *ptr) { unsigned short ret; asm volatile ("ld.global.nc.s16 %0, [%1];" : "=h"(ret) : "l" (ptr)); return (short)ret; }
static __attribute__((device)) __inline__ int __ldg(const int *ptr) { unsigned int ret; asm volatile ("ld.global.nc.s32 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (int)ret; }
static __attribute__((device)) __inline__ long long __ldg(const long long *ptr) { unsigned long long ret; asm volatile ("ld.global.nc.s64 %0, [%1];" : "=l"(ret) : "l" (ptr)); return (long long)ret; }
static __attribute__((device)) __inline__ char2 __ldg(const char2 *ptr) { char2 ret; int2 tmp; asm volatile ("ld.global.nc.v2.s8 {%0,%1}, [%2];" : "=r"(tmp.x), "=r"(tmp.y) : "l" (ptr)); ret.x = (char)tmp.x; ret.y = (char)tmp.y; return ret; }
static __attribute__((device)) __inline__ char4 __ldg(const char4 *ptr) { char4 ret; int4 tmp; asm volatile ("ld.global.nc.v4.s8 {%0,%1,%2,%3}, [%4];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l" (ptr)); ret.x = (char)tmp.x; ret.y = (char)tmp.y; ret.z = (char)tmp.z; ret.w = (char)tmp.w; return ret; }
static __attribute__((device)) __inline__ short2 __ldg(const short2 *ptr) { short2 ret; asm volatile ("ld.global.nc.v2.s16 {%0,%1}, [%2];" : "=h"(ret.x), "=h"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ short4 __ldg(const short4 *ptr) { short4 ret; asm volatile ("ld.global.nc.v4.s16 {%0,%1,%2,%3}, [%4];" : "=h"(ret.x), "=h"(ret.y), "=h"(ret.z), "=h"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ int2 __ldg(const int2 *ptr) { int2 ret; asm volatile ("ld.global.nc.v2.s32 {%0,%1}, [%2];" : "=r"(ret.x), "=r"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ int4 __ldg(const int4 *ptr) { int4 ret; asm volatile ("ld.global.nc.v4.s32 {%0,%1,%2,%3}, [%4];" : "=r"(ret.x), "=r"(ret.y), "=r"(ret.z), "=r"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ longlong2 __ldg(const longlong2 *ptr) { longlong2 ret; asm volatile ("ld.global.nc.v2.s64 %0, [%1];" : "=l"(ret.x), "=l"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned char __ldg(const unsigned char *ptr) { unsigned int ret; asm volatile ("ld.global.nc.u8 %0, [%1];" : "=r"(ret) : "l" (ptr)); return (unsigned char)ret; }
static __attribute__((device)) __inline__ unsigned short __ldg(const unsigned short *ptr) { unsigned short ret; asm volatile ("ld.global.nc.u16 %0, [%1];" : "=h"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned int __ldg(const unsigned int *ptr) { unsigned int ret; asm volatile ("ld.global.nc.u32 %0, [%1];" : "=r"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ unsigned long long __ldg(const unsigned long long *ptr) { unsigned long long ret; asm volatile ("ld.global.nc.u64 %0, [%1];" : "=l"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uchar2 __ldg(const uchar2 *ptr) { uchar2 ret; uint2 tmp; asm volatile ("ld.global.nc.v2.u8 {%0,%1}, [%2];" : "=r"(tmp.x), "=r"(tmp.y) : "l" (ptr)); ret.x = (unsigned char)tmp.x; ret.y = (unsigned char)tmp.y; return ret; }
static __attribute__((device)) __inline__ uchar4 __ldg(const uchar4 *ptr) { uchar4 ret; uint4 tmp; asm volatile ("ld.global.nc.v4.u8 {%0,%1,%2,%3}, [%4];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l" (ptr)); ret.x = (unsigned char)tmp.x; ret.y = (unsigned char)tmp.y; ret.z = (unsigned char)tmp.z; ret.w = (unsigned char)tmp.w; return ret; }
static __attribute__((device)) __inline__ ushort2 __ldg(const ushort2 *ptr) { ushort2 ret; asm volatile ("ld.global.nc.v2.u16 {%0,%1}, [%2];" : "=h"(ret.x), "=h"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ ushort4 __ldg(const ushort4 *ptr) { ushort4 ret; asm volatile ("ld.global.nc.v4.u16 {%0,%1,%2,%3}, [%4];" : "=h"(ret.x), "=h"(ret.y), "=h"(ret.z), "=h"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uint2 __ldg(const uint2 *ptr) { uint2 ret; asm volatile ("ld.global.nc.v2.u32 {%0,%1}, [%2];" : "=r"(ret.x), "=r"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ uint4 __ldg(const uint4 *ptr) { uint4 ret; asm volatile ("ld.global.nc.v4.u32 {%0,%1,%2,%3}, [%4];" : "=r"(ret.x), "=r"(ret.y), "=r"(ret.z), "=r"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ ulonglong2 __ldg(const ulonglong2 *ptr) { ulonglong2 ret; asm volatile ("ld.global.nc.v2.u64 %0, [%1];" : "=l"(ret.x), "=l"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float __ldg(const float *ptr) { float ret; asm volatile ("ld.global.nc.f32 %0, [%1];" : "=f"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ double __ldg(const double *ptr) { double ret; asm volatile ("ld.global.nc.f64 %0, [%1];" : "=d"(ret) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float2 __ldg(const float2 *ptr) { float2 ret; asm volatile ("ld.global.nc.v2.f32 {%0,%1}, [%2];" : "=f"(ret.x), "=f"(ret.y) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ float4 __ldg(const float4 *ptr) { float4 ret; asm volatile ("ld.global.nc.v4.f32 {%0,%1,%2,%3}, [%4];" : "=f"(ret.x), "=f"(ret.y), "=f"(ret.z), "=f"(ret.w) : "l" (ptr)); return ret; }
static __attribute__((device)) __inline__ double2 __ldg(const double2 *ptr) { double2 ret; asm volatile ("ld.global.nc.v2.f64 {%0,%1}, [%2];" : "=d"(ret.x), "=d"(ret.y) : "l" (ptr)); return ret; }
# 130 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_32_intrinsics.h"
static __attribute__((device)) inline unsigned int __funnelshift_l(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.l.wrap.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_lc(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.l.clamp.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_r(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
static __attribute__((device)) inline unsigned int __funnelshift_rc(unsigned int lo, unsigned int hi, unsigned int shift)
{
unsigned int ret;
asm volatile ("shf.r.clamp.b32 %0, %1, %2, %3;" : "=r"(ret) : "r"(lo), "r"(hi), "r"(shift));
return ret;
}
# 9414 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/sm_35_intrinsics.h" 1
# 9415 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h" 2
# 73 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf1Dreadc1(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf1Dreadc2(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf1Dreadc4(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf1Dreads1(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf1Dreads2(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf1Dreads4(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf1Dreadu1(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf1Dreadu2(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf1Dreadu4(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf1Dreadl1(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf1Dreadl2(surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
# 99 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(T *res, surface<void, 0x01> surf, int x, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surf1Dreads1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads1(surf, x, cudaBoundaryModeClamp) : __surf1Dreads1(surf, x, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu2(surf, x, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu4(surf, x, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surf1Dread(&tmp, surf, x, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(T *res, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surf1Dread<T>(surf, x, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadc1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc1(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadc2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc2(surf, x, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadc2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc2(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadc4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc4(surf, x, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadc4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadc4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadc4(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surf1Dreads1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads1(surf, x, cudaBoundaryModeClamp) : __surf1Dreads1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreads1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads1(surf, x, cudaBoundaryModeClamp) : __surf1Dreads1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surf1Dreads1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads1(surf, x, cudaBoundaryModeClamp) : __surf1Dreads1(surf, x, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreads1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads1(surf, x, cudaBoundaryModeClamp) : __surf1Dreads1(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreads2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads2(surf, x, cudaBoundaryModeClamp) : __surf1Dreads2(surf, x, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreads2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads2(surf, x, cudaBoundaryModeClamp) : __surf1Dreads2(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreads4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads4(surf, x, cudaBoundaryModeClamp) : __surf1Dreads4(surf, x, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreads4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreads4(surf, x, cudaBoundaryModeClamp) : __surf1Dreads4(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu2(surf, x, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadu2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu2(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu4(surf, x, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadu4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu4(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surf1Dreadl1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadl1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl1(surf, x, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surf1Dreadl1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl1(surf, x, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadl1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl1(surf, x, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadl2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl2(surf, x, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1Dreadl2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadl2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadl2(surf, x, cudaBoundaryModeTrap ));
}
# 386 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf1Dreadu1(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu1(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu1(surf, x, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu2(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu2(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu2(surf, x, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf1Dread(surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1Dreadu4(surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dreadu4(surf, x, cudaBoundaryModeClamp) : __surf1Dreadu4(surf, x, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 421 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf2Dreadc1(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf2Dreadc2(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf2Dreadc4(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf2Dreads1(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf2Dreads2(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf2Dreads4(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf2Dreadu1(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf2Dreadu2(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf2Dreadu4(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf2Dreadl1(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf2Dreadl2(surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
# 447 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(T *res, surface<void, 0x02> surf, int x, int y, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads1(surf, x, y, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surf2Dread(&tmp, surf, x, y, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(T *res, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surf2Dread<T>(surf, x, y, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc1(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadc2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc2(surf, x, y, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadc2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc2(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadc4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc4(surf, x, y, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadc4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadc4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadc4(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads1(surf, x, y, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads1(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreads2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads2(surf, x, y, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreads2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads2(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreads4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads4(surf, x, y, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreads4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreads4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreads4(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl1(surf, x, y, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadl2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl2(surf, x, y, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2Dreadl2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadl2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadl2(surf, x, y, cudaBoundaryModeTrap ));
}
# 734 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu1(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu1(surf, x, y, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu2(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu2(surf, x, y, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf2Dread(surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dreadu4(surf, x, y, cudaBoundaryModeClamp) : __surf2Dreadu4(surf, x, y, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 769 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf3Dreadc1(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf3Dreadc2(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf3Dreadc4(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf3Dreads1(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf3Dreads2(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf3Dreads4(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf3Dreadu1(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf3Dreadu2(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf3Dreadu4(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf3Dreadl1(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf3Dreadl2(surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
# 795 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(T *res, surface<void, 0x03> surf, int x, int y, int z, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surf3Dread(&tmp, surf, x, y, z, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(T *res, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surf3Dread<T>(surf, x, y, z, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc1(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc2(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadc4(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads1(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreads2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads2(surf, x, y, z, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreads2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads2(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreads4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads4(surf, x, y, z, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreads4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreads4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreads4(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl1(surf, x, y, z, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadl2(surf, x, y, z, cudaBoundaryModeTrap ));
}
# 1082 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu1(surf, x, y, z, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu2(surf, x, y, z, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf3Dread(surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dreadu4(surf, x, y, z, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1117 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf1DLayeredreadc1(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf1DLayeredreadc2(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf1DLayeredreadc4(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf1DLayeredreads1(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf1DLayeredreads2(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf1DLayeredreads4(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf1DLayeredreadu1(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf1DLayeredreadu2(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf1DLayeredreadu4(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf1DLayeredreadl1(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf1DLayeredreadl2(surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
# 1143 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(T *res, surface<void, 0xF1> surf, int x, int layer, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surf1DLayeredread(&tmp, surf, x, layer, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(T *res, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surf1DLayeredread<T>(surf, x, layer, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc1(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc2(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadc4(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads1(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads2(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreads4(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl1(surf, x, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadl2(surf, x, layer, cudaBoundaryModeTrap ));
}
# 1430 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu1(surf, x, layer, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu2(surf, x, layer, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf1DLayeredread(surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredreadu4(surf, x, layer, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1465 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surf2DLayeredreadc1(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surf2DLayeredreadc2(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surf2DLayeredreadc4(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surf2DLayeredreads1(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surf2DLayeredreads2(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surf2DLayeredreads4(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surf2DLayeredreadu1(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surf2DLayeredreadu2(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surf2DLayeredreadu4(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surf2DLayeredreadl1(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surf2DLayeredreadl2(surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
# 1491 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(T *res, surface<void, 0xF2> surf, int x, int y, int layer, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surf2DLayeredread(&tmp, surf, x, y, layer, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(T *res, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surf2DLayeredread<T>(surf, x, y, layer, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc1(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc2(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadc4(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads1(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads2(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreads4(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl1(surf, x, y, layer, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadl2(surf, x, y, layer, cudaBoundaryModeTrap ));
}
# 1778 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu1(surf, x, y, layer, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu2(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surf2DLayeredread(surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredreadu4(surf, x, y, layer, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 1813 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surfCubemapreadc1(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surfCubemapreadc2(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surfCubemapreadc4(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surfCubemapreads1(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surfCubemapreads2(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surfCubemapreads4(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surfCubemapreadu1(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surfCubemapreadu2(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surfCubemapreadu4(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surfCubemapreadl1(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surfCubemapreadl2(surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
# 1839 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(T *res, surface<void, 0x0C> surf, int x, int y, int face, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surfCubemapread(&tmp, surf, x, y, face, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(T *res, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surfCubemapread<T>(surf, x, y, face, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc1(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc2(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadc4(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads1(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads2(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreads4(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl1(surf, x, y, face, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadl2(surf, x, y, face, cudaBoundaryModeTrap ));
}
# 2126 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu1(surf, x, y, face, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu2(surf, x, y, face, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surfCubemapread(surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapreadu4(surf, x, y, face, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 2161 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) uchar1 __surfCubemapLayeredreadc1(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar2 __surfCubemapLayeredreadc2(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uchar4 __surfCubemapLayeredreadc4(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort1 __surfCubemapLayeredreads1(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort2 __surfCubemapLayeredreads2(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ushort4 __surfCubemapLayeredreads4(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint1 __surfCubemapLayeredreadu1(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint2 __surfCubemapLayeredreadu2(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) uint4 __surfCubemapLayeredreadu4(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong1 __surfCubemapLayeredreadl1(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) ulonglong2 __surfCubemapLayeredreadl2(surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
# 2188 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(T *res, surface<void, 0xFC> surf, int x, int y, int layerFace, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
(s == 1) ? (void)(*(uchar1 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(*(ushort1*)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(*(uint1 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(*(uint2 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(*(uint4 *)res = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
T tmp;
surfCubemapLayeredread(&tmp, surf, x, y, layerFace, (int)sizeof(T), mode);
return tmp;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(T *res, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
*res = surfCubemapLayeredread<T>(surf, x, y, layerFace, mode);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return (char)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) signed char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return (signed char)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return make_char1((signed char)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc1(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uchar2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_char2((signed char)tmp.x, (signed char)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) char4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uchar4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_char4((signed char)tmp.x, (signed char)tmp.y, (signed char)tmp.z, (signed char)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadc4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return (short)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return make_short1((signed short)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads1(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
ushort2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_short2((signed short)tmp.x, (signed short)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) short4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
ushort4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_short4((signed short)tmp.x, (signed short)tmp.y, (signed short)tmp.z, (signed short)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreads4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return (int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return make_int1((signed int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_int2((int)tmp.x, (int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) int4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_int4((int)tmp.x, (int)tmp.y, (int)tmp.z, (int)tmp.w);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) uint4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) long long int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return (long long int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) unsigned long long int surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x;
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return make_longlong1((long long int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl1(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) longlong2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
ulonglong2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_longlong2((long long int)tmp.x, (long long int)tmp.y);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) ulonglong2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadl2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
# 2475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return __int_as_float((int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x);
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float1 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
return make_float1(__int_as_float((int)((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu1(surf, x, y, layerFace, cudaBoundaryModeTrap )).x));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float2 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uint2 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu2(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_float2(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y));
}
template<>
__inline__ __attribute__((always_inline)) __attribute__((device)) float4 surfCubemapLayeredread(surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode)
{
uint4 tmp = ((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredreadu4(surf, x, y, layerFace, cudaBoundaryModeTrap ));
return make_float4(__int_as_float((int)tmp.x), __int_as_float((int)tmp.y), __int_as_float((int)tmp.z), __int_as_float((int)tmp.w));
}
# 2511 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec1( uchar1 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec2( uchar2 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritec4( uchar4 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites1( ushort1 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites2( ushort2 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwrites4( ushort4 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu1( uint1 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu2( uint2 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwriteu4( uint4 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritel1(ulonglong1 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1Dwritel2(ulonglong2 val, surface<void, 0x01> t, int x, enum cudaSurfaceBoundaryMode mode);
# 2537 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(T val, surface<void, 0x01> surf, int x, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(tmp.c1, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(tmp.c1, surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(tmp.c1, surf, x, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1Dwrites1(tmp.s1, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites1(tmp.s1, surf, x, cudaBoundaryModeClamp) : __surf1Dwrites1(tmp.s1, surf, x, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(tmp.u1, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(tmp.u1, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(tmp.u1, surf, x, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1Dwriteu2(tmp.u2, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu2(tmp.u2, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu2(tmp.u2, surf, x, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1Dwriteu4(tmp.u4, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu4(tmp.u4, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu4(tmp.u4, surf, x, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(T val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surf1Dwrite(val, surf, x, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(signed char val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned char val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(make_uchar1(val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1(val), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(make_uchar1(val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(make_uchar1((unsigned char)val.x), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec1(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec1(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwritec1(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec2(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec2(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwritec2(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, cudaBoundaryModeClamp) : __surf1Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritec4(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritec4(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwritec4(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, cudaBoundaryModeClamp) : __surf1Dwrites1(make_ushort1((unsigned short)val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned short val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites1(make_ushort1(val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1(val), surf, x, cudaBoundaryModeClamp) : __surf1Dwrites1(make_ushort1(val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, cudaBoundaryModeClamp) : __surf1Dwrites1(make_ushort1((unsigned short)val.x), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites1(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites1(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwrites1(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, cudaBoundaryModeClamp) : __surf1Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites2(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites2(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwrites2(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, cudaBoundaryModeClamp) : __surf1Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwrites4(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwrites4(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwrites4(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned int val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(make_uint1(val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1(val), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(make_uint1(val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)val.x), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu2(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu2(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu2(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu4(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu4(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu4(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(long long int val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, cudaBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned long long int val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1(val), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1(val), surf, x, cudaBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1(val), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, cudaBoundaryModeClamp) : __surf1Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel1(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel1(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwritel1(val, surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, cudaBoundaryModeClamp) : __surf1Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwritel2(val, surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwritel2(val, surf, x, cudaBoundaryModeClamp) : __surf1Dwritel2(val, surf, x, cudaBoundaryModeTrap ));
}
# 2765 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float1 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float2 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float4 val, surface<void, 0x01> surf, int x, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, cudaBoundaryModeClamp) : __surf1Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, cudaBoundaryModeTrap ));
}
# 2793 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec1( uchar1 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec2( uchar2 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritec4( uchar4 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites1( ushort1 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites2( ushort2 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwrites4( ushort4 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu1( uint1 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu2( uint2 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwriteu4( uint4 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritel1(ulonglong1 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2Dwritel2(ulonglong2 val, surface<void, 0x02> t, int x, int y, enum cudaSurfaceBoundaryMode mode);
# 2819 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(T val, surface<void, 0x02> surf, int x, int y, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(tmp.c1, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(tmp.c1, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(tmp.c1, surf, x, y, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2Dwrites1(tmp.s1, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites1(tmp.s1, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites1(tmp.s1, surf, x, y, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(tmp.u1, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(tmp.u1, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(tmp.u1, surf, x, y, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2Dwriteu2(tmp.u2, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu2(tmp.u2, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu2(tmp.u2, surf, x, y, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2Dwriteu4(tmp.u4, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu4(tmp.u4, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu4(tmp.u4, surf, x, y, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(T val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surf2Dwrite(val, surf, x, y, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(signed char val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned char val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(make_uchar1(val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1(val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(make_uchar1(val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec1(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec1(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec1(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec2(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec2(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec2(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritec4(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritec4(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritec4(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites1(make_ushort1((unsigned short)val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned short val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites1(make_ushort1(val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1(val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites1(make_ushort1(val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites1(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites1(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites1(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites2(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites2(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites2(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwrites4(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwrites4(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwrites4(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned int val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(make_uint1(val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1(val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(make_uint1(val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu2(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu2(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu2(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu4(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu4(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu4(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(long long int val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned long long int val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1(val), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1(val), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1(val), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel1(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel1(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel1(val, surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwritel2(val, surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwritel2(val, surf, x, y, cudaBoundaryModeClamp) : __surf2Dwritel2(val, surf, x, y, cudaBoundaryModeTrap ));
}
# 3047 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float1 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float2 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float4 val, surface<void, 0x02> surf, int x, int y, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, cudaBoundaryModeClamp) : __surf2Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, cudaBoundaryModeTrap ));
}
# 3075 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec1( uchar1 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec2( uchar2 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritec4( uchar4 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites1( ushort1 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites2( ushort2 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwrites4( ushort4 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu1( uint1 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu2( uint2 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwriteu4( uint4 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritel1(ulonglong1 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf3Dwritel2(ulonglong2 val, surface<void, 0x03> t, int x, int y, int z, enum cudaSurfaceBoundaryMode mode);
# 3101 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(T val, surface<void, 0x03> surf, int x, int y, int z, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(tmp.c1, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(tmp.c1, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(tmp.c1, surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surf3Dwrites1(tmp.s1, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites1(tmp.s1, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites1(tmp.s1, surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(tmp.u1, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(tmp.u1, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(tmp.u1, surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surf3Dwriteu2(tmp.u2, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu2(tmp.u2, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu2(tmp.u2, surf, x, y, z, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surf3Dwriteu4(tmp.u4, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu4(tmp.u4, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu4(tmp.u4, surf, x, y, z, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(T val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surf3Dwrite(val, surf, x, y, z, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(signed char val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned char val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(make_uchar1(val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1(val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(make_uchar1(val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(make_uchar1((unsigned char)val.x), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec1(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec1(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec1(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec2(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec2(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec2(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritec4(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritec4(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritec4(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites1(make_ushort1((unsigned short)val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned short val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites1(make_ushort1(val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1(val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites1(make_ushort1(val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites1(make_ushort1((unsigned short)val.x), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites1(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites1(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites1(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites2(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites2(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites2(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwrites4(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwrites4(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwrites4(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned int val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(make_uint1(val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1(val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(make_uint1(val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)val.x), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu2(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu2(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu2(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu4(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu4(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu4(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(long long int val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned long long int val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1(val), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel1(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel1(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel1(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwritel2(val, surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwritel2(val, surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwritel2(val, surf, x, y, z, cudaBoundaryModeTrap ));
}
# 3329 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float1 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float2 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, z, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float4 val, surface<void, 0x03> surf, int x, int y, int z, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, cudaBoundaryModeClamp) : __surf3Dwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, z, cudaBoundaryModeTrap ));
}
# 3357 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec1( uchar1 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec2( uchar2 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritec4( uchar4 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites1( ushort1 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites2( ushort2 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwrites4( ushort4 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu1( uint1 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu2( uint2 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwriteu4( uint4 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritel1(ulonglong1 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf1DLayeredwritel2(ulonglong2 val, surface<void, 0xF1> t, int x, int layer, enum cudaSurfaceBoundaryMode mode);
# 3383 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(T val, surface<void, 0xF1> surf, int x, int layer, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(tmp.c1, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(tmp.c1, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(tmp.c1, surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites1(tmp.s1, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites1(tmp.s1, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites1(tmp.s1, surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(tmp.u1, surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu2(tmp.u2, surf, x, layer, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu4(tmp.u4, surf, x, layer, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(T val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surf1DLayeredwrite(val, surf, x, layer, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(signed char val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned char val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1(val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec1(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec1(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec1(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec2(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec2(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec2(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritec4(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritec4(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritec4(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned short val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1(val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites1(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites1(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites1(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites2(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites2(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites2(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwrites4(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwrites4(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwrites4(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned int val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1(val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu2(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu2(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu2(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu4(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu4(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu4(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(long long int val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned long long int val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1(val), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel1(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel1(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel1(val, surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwritel2(val, surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwritel2(val, surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwritel2(val, surf, x, layer, cudaBoundaryModeTrap ));
}
# 3611 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float1 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float2 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float4 val, surface<void, 0xF1> surf, int x, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, cudaBoundaryModeClamp) : __surf1DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, layer, cudaBoundaryModeTrap ));
}
# 3639 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec1( uchar1 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec2( uchar2 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritec4( uchar4 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites1( ushort1 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites2( ushort2 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwrites4( ushort4 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu1( uint1 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu2( uint2 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwriteu4( uint4 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritel1(ulonglong1 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surf2DLayeredwritel2(ulonglong2 val, surface<void, 0xF2> t, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode);
# 3665 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(T val, surface<void, 0xF2> surf, int x, int y, int layer, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(tmp.c1, surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites1(tmp.s1, surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(tmp.u1, surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu2(tmp.u2, surf, x, y, layer, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu4(tmp.u4, surf, x, y, layer, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(T val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surf2DLayeredwrite(val, surf, x, y, layer, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(signed char val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned char val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1(val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec1(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec1(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec1(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec2(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec2(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec2(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritec4(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritec4(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritec4(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned short val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1(val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites1(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites1(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites1(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites2(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites2(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites2(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwrites4(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwrites4(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwrites4(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned int val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1(val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu2(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu2(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu2(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu4(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu4(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu4(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(long long int val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned long long int val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1(val), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel1(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel1(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel1(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwritel2(val, surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwritel2(val, surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwritel2(val, surf, x, y, layer, cudaBoundaryModeTrap ));
}
# 3893 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float1 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float2 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layer, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float4 val, surface<void, 0xF2> surf, int x, int y, int layer, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, cudaBoundaryModeClamp) : __surf2DLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layer, cudaBoundaryModeTrap ));
}
# 3920 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec1( uchar1 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec2( uchar2 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritec4( uchar4 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites1( ushort1 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites2( ushort2 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwrites4( ushort4 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu1( uint1 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu2( uint2 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwriteu4( uint4 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritel1(ulonglong1 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapwritel2(ulonglong2 val, surface<void, 0x0C> t, int x, int y, int face, enum cudaSurfaceBoundaryMode mode);
# 3947 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(T val, surface<void, 0x0C> surf, int x, int y, int face, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(tmp.c1, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(tmp.c1, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(tmp.c1, surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapwrites1(tmp.s1, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites1(tmp.s1, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites1(tmp.s1, surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(tmp.u1, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(tmp.u1, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(tmp.u1, surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu2(tmp.u2, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu2(tmp.u2, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu2(tmp.u2, surf, x, y, face, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu4(tmp.u4, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu4(tmp.u4, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu4(tmp.u4, surf, x, y, face, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(T val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surfCubemapwrite(val, surf, x, y, face, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(signed char val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned char val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1(val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(make_uchar1((unsigned char)val.x), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec1(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec1(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec1(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec2(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec2(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec2(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritec4(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritec4(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritec4(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1((unsigned short)val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned short val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1(val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites1(make_ushort1((unsigned short)val.x), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites1(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites1(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites1(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites2(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites2(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites2(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwrites4(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwrites4(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwrites4(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned int val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1(val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)val.x), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu2(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu2(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu2(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu4(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu4(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu4(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(long long int val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned long long int val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1(val), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel1(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel1(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel1(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwritel2(val, surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwritel2(val, surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwritel2(val, surf, x, y, face, cudaBoundaryModeTrap ));
}
# 4175 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float1 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float2 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, face, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float4 val, surface<void, 0x0C> surf, int x, int y, int face, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, cudaBoundaryModeClamp) : __surfCubemapwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, face, cudaBoundaryModeTrap ));
}
# 4202 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec1( uchar1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec2( uchar2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritec4( uchar4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites1( ushort1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites2( ushort2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwrites4( ushort4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu1( uint1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu2( uint2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwriteu4( uint4 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritel1(ulonglong1 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
extern __attribute__((device)) __attribute__((device_builtin)) void __surfCubemapLayeredwritel2(ulonglong2 val, surface<void, 0xFC> t, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode);
# 4229 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(T val, surface<void, 0xFC> surf, int x, int y, int layerFace, int s, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
union {
T val;
uchar1 c1;
ushort1 s1;
uint1 u1;
uint2 u2;
uint4 u4;
} tmp;
tmp.val = val;
(s == 1) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(tmp.c1, surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 2) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites1(tmp.s1, surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 4) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(tmp.u1, surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 8) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu2(tmp.u2, surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(s == 16) ? (void)(((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu4(tmp.u4, surf, x, y, layerFace, cudaBoundaryModeTrap ))) :
(void)0;
}
template<class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(T val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{;
surfCubemapLayeredwrite(val, surf, x, y, layerFace, (int)sizeof(T), mode);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(signed char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned char val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1(val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(make_uchar1((unsigned char)val.x), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec1(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec2(make_uchar2((unsigned char)val.x, (unsigned char)val.y), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec2(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec4(make_uchar4((unsigned char)val.x, (unsigned char)val.y, (unsigned char)val.z, (unsigned char)val.w), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritec4(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned short val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1(val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites1(make_ushort1((unsigned short)val.x), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites1(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites2(make_ushort2((unsigned short)val.x, (unsigned short)val.y), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites2(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites4(make_ushort4((unsigned short)val.x, (unsigned short)val.y, (unsigned short)val.z, (unsigned short)val.w), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwrites4(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1(val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)val.x), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu2(make_uint2((unsigned int)val.x, (unsigned int)val.y), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu2(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu4(make_uint4((unsigned int)val.x, (unsigned int)val.y, (unsigned int)val.z, (unsigned int)val.w), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu4(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(long long int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned long long int val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1(val), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel1(make_ulonglong1((unsigned long long int)val.x), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel1(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel2(make_ulonglong2((unsigned long long int)val.x, (unsigned long long int)val.y), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwritel2(val, surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
# 4457 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val)), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float1 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu1(make_uint1((unsigned int)__float_as_int(val.x)), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float2 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu2(make_uint2((unsigned int)__float_as_int(val.x), __float_as_int((unsigned int)val.y)), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float4 val, surface<void, 0xFC> surf, int x, int y, int layerFace, enum cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap)
{
((mode == cudaBoundaryModeZero) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, cudaBoundaryModeZero ) : (mode == cudaBoundaryModeClamp) ? __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, cudaBoundaryModeClamp) : __surfCubemapLayeredwriteu4(make_uint4((unsigned int)__float_as_int(val.x), (unsigned int)__float_as_int(val.y), (unsigned int)__float_as_int(val.z), (unsigned int)__float_as_int(val.w)), surf, x, y, layerFace, cudaBoundaryModeTrap ));
}
# 9416 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h" 1
# 61 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 62 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h" 2
# 74 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
template<class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchi(texture<T, 0x01, readMode> t, int4 i);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetch(texture<T, texType, readMode> t, float4 i, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchc(texture<T, texType, readMode> t, float4 i);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchl(texture<T, texType, readMode> t, float4 i, int l, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlc(texture<T, texType, readMode> t, float4 i, int l);
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1Dfetch(texture<char, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1Dfetch(texture<signed char, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1Dfetch(texture<unsigned char, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1Dfetch(texture<char1, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1Dfetch(texture<uchar1, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1Dfetch(texture<char2, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1Dfetch(texture<uchar2, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1Dfetch(texture<char4, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1Dfetch(texture<uchar4, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1Dfetch(texture<short, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1Dfetch(texture<unsigned short, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1Dfetch(texture<short1, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1Dfetch(texture<ushort1, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1Dfetch(texture<short2, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1Dfetch(texture<ushort2, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1Dfetch(texture<short4, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1Dfetch(texture<ushort4, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1Dfetch(texture<int, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1Dfetch(texture<unsigned int, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1Dfetch(texture<int1, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1Dfetch(texture<uint1, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1Dfetch(texture<int2, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1Dfetch(texture<uint2, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1Dfetch(texture<int4, 0x01, cudaReadModeElementType> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1Dfetch(texture<uint4, 0x01, cudaReadModeElementType> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 359 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<float, 0x01, cudaReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<float1, 0x01, cudaReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<float2, 0x01, cudaReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<float4, 0x01, cudaReadModeElementType> t, int x)
{
float4 v = __ftexfetchi(t, make_int4(x, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<char, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<signed char, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<unsigned char, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<char1, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<uchar1, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<char2, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<uchar2, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<char4, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<uchar4, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<short, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1Dfetch(texture<unsigned short, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<short1, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1Dfetch(texture<ushort1, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<short2, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1Dfetch(texture<ushort2, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<short4, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
int4 v = __itexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1Dfetch(texture<ushort4, 0x01, cudaReadModeNormalizedFloat> t, int x)
{
uint4 v = __utexfetchi(t, make_int4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1D(texture<char, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1D(texture<signed char, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1D(texture<unsigned char, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1D(texture<char1, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1D(texture<uchar1, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1D(texture<char2, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1D(texture<uchar2, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1D(texture<char4, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1D(texture<uchar4, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1D(texture<short, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1D(texture<unsigned short, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1D(texture<short1, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1D(texture<ushort1, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1D(texture<short2, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1D(texture<ushort2, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1D(texture<short4, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1D(texture<ushort4, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1D(texture<int, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1D(texture<unsigned int, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1D(texture<int1, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1D(texture<uint1, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1D(texture<int2, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1D(texture<uint2, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1D(texture<int4, 0x01, cudaReadModeElementType> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1D(texture<uint4, 0x01, cudaReadModeElementType> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 814 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<float, 0x01, cudaReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<float1, 0x01, cudaReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<float2, 0x01, cudaReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<float4, 0x01, cudaReadModeElementType> t, float x)
{
float4 v = __ftexfetch(t, make_float4(x, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<char, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<signed char, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<unsigned char, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<char1, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<uchar1, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<char2, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<uchar2, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<char4, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<uchar4, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<short, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1D(texture<unsigned short, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<short1, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1D(texture<ushort1, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<short2, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1D(texture<ushort2, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<short4, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
int4 v = __itexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1D(texture<ushort4, 0x01, cudaReadModeNormalizedFloat> t, float x)
{
uint4 v = __utexfetch(t, make_float4(x, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2D(texture<char, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2D(texture<signed char, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2D(texture<unsigned char, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2D(texture<char1, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2D(texture<uchar1, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2D(texture<char2, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2D(texture<uchar2, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2D(texture<char4, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2D(texture<uchar4, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2D(texture<short, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2D(texture<unsigned short, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2D(texture<short1, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2D(texture<ushort1, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2D(texture<short2, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2D(texture<ushort2, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2D(texture<short4, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2D(texture<ushort4, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2D(texture<int, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2D(texture<unsigned int, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2D(texture<int1, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2D(texture<uint1, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2D(texture<int2, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2D(texture<uint2, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2D(texture<int4, 0x02, cudaReadModeElementType> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2D(texture<uint4, 0x02, cudaReadModeElementType> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 1263 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<float, 0x02, cudaReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<float1, 0x02, cudaReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<float2, 0x02, cudaReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<float4, 0x02, cudaReadModeElementType> t, float x, float y)
{
float4 v = __ftexfetch(t, make_float4(x, y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<signed char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<unsigned char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<char1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<uchar1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<char2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<uchar2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<char4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<uchar4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2D(texture<unsigned short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<short1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2D(texture<ushort1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<short2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2D(texture<ushort2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<short4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
int4 v = __itexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2D(texture<ushort4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y)
{
uint4 v = __utexfetch(t, make_float4(x, y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayered(texture<char, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayered(texture<signed char, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayered(texture<unsigned char, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayered(texture<char1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayered(texture<uchar1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayered(texture<char2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayered(texture<uchar2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayered(texture<char4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayered(texture<uchar4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayered(texture<short, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayered(texture<unsigned short, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayered(texture<short1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayered(texture<ushort1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayered(texture<short2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayered(texture<ushort2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayered(texture<short4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayered(texture<ushort4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayered(texture<int, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayered(texture<unsigned int, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayered(texture<int1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayered(texture<uint1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayered(texture<int2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayered(texture<uint2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayered(texture<int4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayered(texture<uint4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 1712 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<float, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<float1, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<float2, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<float4, 0xF1, cudaReadModeElementType> t, float x, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, 0, 0, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<signed char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<unsigned char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<char1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<uchar1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<char2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<uchar2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<char4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<uchar4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayered(texture<unsigned short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<short1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayered(texture<ushort1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<short2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayered(texture<ushort2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<short4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayered(texture<ushort4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, 0, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayered(texture<char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayered(texture<signed char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayered(texture<unsigned char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayered(texture<char1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayered(texture<uchar1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayered(texture<char2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayered(texture<uchar2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayered(texture<char4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayered(texture<uchar4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayered(texture<short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayered(texture<unsigned short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayered(texture<short1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayered(texture<ushort1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayered(texture<short2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayered(texture<ushort2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayered(texture<short4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayered(texture<ushort4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayered(texture<int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayered(texture<unsigned int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayered(texture<int1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayered(texture<uint1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayered(texture<int2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayered(texture<uint2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayered(texture<int4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayered(texture<uint4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 2161 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<float, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<float1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<float2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<float4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer)
{
float4 v = __ftexfetchl(t, make_float4(x, y, 0, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<signed char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<unsigned char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<char1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<uchar1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<char2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<uchar2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<char4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<uchar4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayered(texture<unsigned short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<short1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayered(texture<ushort1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<short2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayered(texture<ushort2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<short4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
int4 v = __itexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayered(texture<ushort4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer)
{
uint4 v = __utexfetchl(t, make_float4(x, y, 0, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3D(texture<char, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3D(texture<signed char, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3D(texture<unsigned char, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3D(texture<char1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3D(texture<uchar1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3D(texture<char2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3D(texture<uchar2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3D(texture<char4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3D(texture<uchar4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3D(texture<short, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3D(texture<unsigned short, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3D(texture<short1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3D(texture<ushort1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3D(texture<short2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3D(texture<ushort2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3D(texture<short4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3D(texture<ushort4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3D(texture<int, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3D(texture<unsigned int, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3D(texture<int1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3D(texture<uint1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3D(texture<int2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3D(texture<uint2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3D(texture<int4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3D(texture<uint4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 2610 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<float, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<float1, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<float2, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<float4, 0x03, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetch(t, make_float4(x, y, z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<signed char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<unsigned char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<char1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<uchar1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<char2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<uchar2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<char4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<uchar4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3D(texture<unsigned short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<short1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3D(texture<ushort1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<short2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3D(texture<ushort2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<short4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3D(texture<ushort4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetch(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemap(texture<char, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemap(texture<signed char, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemap(texture<unsigned char, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemap(texture<char1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemap(texture<uchar1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemap(texture<char2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemap(texture<uchar2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemap(texture<char4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemap(texture<uchar4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemap(texture<short, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemap(texture<unsigned short, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemap(texture<short1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemap(texture<ushort1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemap(texture<short2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemap(texture<ushort2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemap(texture<short4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemap(texture<ushort4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemap(texture<int, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemap(texture<unsigned int, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemap(texture<int1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemap(texture<uint1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemap(texture<int2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemap(texture<uint2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemap(texture<int4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemap(texture<uint4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 3059 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<float, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<float1, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<float2, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<float4, 0x0C, cudaReadModeElementType> t, float x, float y, float z)
{
float4 v = __ftexfetchc(t, make_float4(x, y, z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<signed char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<unsigned char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<char1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<uchar1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<char2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<uchar2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<char4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<uchar4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<short, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemap(texture<unsigned short, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<short1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemap(texture<ushort1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<short2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemap(texture<ushort2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<short4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
int4 v = __itexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemap(texture<ushort4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z)
{
uint4 v = __utexfetchc(t, make_float4(x, y, z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLayered(texture<char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLayered(texture<signed char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLayered(texture<unsigned char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLayered(texture<char1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLayered(texture<uchar1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLayered(texture<char2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLayered(texture<uchar2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLayered(texture<char4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLayered(texture<uchar4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLayered(texture<short, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLayered(texture<unsigned short, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLayered(texture<short1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLayered(texture<ushort1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLayered(texture<short2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLayered(texture<ushort2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLayered(texture<short4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLayered(texture<ushort4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLayered(texture<int, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLayered(texture<unsigned int, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLayered(texture<int1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLayered(texture<uint1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLayered(texture<int2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLayered(texture<uint2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLayered(texture<int4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLayered(texture<uint4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 3508 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<float, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<float1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<float2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<float4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer)
{
float4 v = __ftexfetchlc(t, make_float4(x, y, z, 0), layer);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<signed char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<unsigned char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<char1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<uchar1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<char2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<uchar2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<char4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<uchar4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<short, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayered(texture<unsigned short, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<short1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayered(texture<ushort1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<short2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayered(texture<ushort2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<short4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
int4 v = __itexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayered(texture<ushort4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer)
{
uint4 v = __utexfetchlc(t, make_float4(x, y, z, 0), layer);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
# 3785 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
template<int comp, class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
template<int comp, class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
template<int comp, class T, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftex2Dgather(texture<T, 0x02, readMode> t, float2 i, int c = comp);
# 3807 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<signed char, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<unsigned char, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2Dgather(texture<char4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_char4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2Dgather(texture<uchar4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_uchar4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<signed short, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<unsigned short, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2Dgather(texture<short4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_short4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2Dgather(texture<ushort4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_ushort4(v.x, v.y, v.z, v.w); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<signed int, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<unsigned int, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2Dgather(texture<int4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return v; } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2Dgather(texture<uint4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return v; } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float1, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
{ float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float2, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float3, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 2) { float4 v = __ftex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<float4, 0x02, cudaReadModeElementType> t, float x, float y, int comp = 0)
{
if (comp == 3) { float4 v = __ftex2Dgather<3>(t, make_float2(x, y)); return v; } else if (comp == 2) { float4 v = __ftex2Dgather<2>(t, make_float2(x, y)); return v; } else if (comp == 1) { float4 v = __ftex2Dgather<1>(t, make_float2(x, y)); return v; } else { float4 v = __ftex2Dgather<0>(t, make_float2(x, y)); return v; };
}
# 3994 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<signed char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<unsigned char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char3, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar3, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<char4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<uchar4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<signed short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<unsigned short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
{ uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short3, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort3, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<short4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { int4 v = __itex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { int4 v = __itex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { int4 v = __itex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { int4 v = __itex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2Dgather(texture<ushort4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, int comp = 0)
{
if (comp == 3) { uint4 v = __utex2Dgather<3>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 2) { uint4 v = __utex2Dgather<2>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else if (comp == 1) { uint4 v = __utex2Dgather<1>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); } else { uint4 v = __utex2Dgather<0>(t, make_float2(x, y)); return make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w)); };
}
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlod(texture<T, texType, readMode> t, float4 i, float level, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodc(texture<T, texType, readMode> t, float4 i, float level);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodl(texture<T, texType, readMode> t, float4 i, int l, float level, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchlodlc(texture<T, texType, readMode> t, float4 i, int l, float level);
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLod(texture<char, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLod(texture<signed char, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLod(texture<unsigned char, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLod(texture<char1, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLod(texture<uchar1, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLod(texture<char2, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLod(texture<uchar2, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLod(texture<char4, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLod(texture<uchar4, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLod(texture<short, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLod(texture<unsigned short, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLod(texture<short1, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLod(texture<ushort1, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLod(texture<short2, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLod(texture<ushort2, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLod(texture<short4, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLod(texture<ushort4, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLod(texture<int, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLod(texture<unsigned int, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLod(texture<int1, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLod(texture<uint1, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLod(texture<int2, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLod(texture<uint2, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLod(texture<int4, 0x01, cudaReadModeElementType> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLod(texture<uint4, 0x01, cudaReadModeElementType> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 4393 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<float, 0x01, cudaReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<float1, 0x01, cudaReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<float2, 0x01, cudaReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<float4, 0x01, cudaReadModeElementType> t, float x, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, 0, 0, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<char, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<signed char, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<unsigned char, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<char1, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<uchar1, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<char2, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<uchar2, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<char4, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<uchar4, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<short, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLod(texture<unsigned short, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<short1, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLod(texture<ushort1, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<short2, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLod(texture<ushort2, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<short4, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLod(texture<ushort4, 0x01, cudaReadModeNormalizedFloat> t, float x, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, 0, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLod(texture<char, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLod(texture<signed char, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLod(texture<unsigned char, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLod(texture<char1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLod(texture<uchar1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLod(texture<char2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLod(texture<uchar2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLod(texture<char4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLod(texture<uchar4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLod(texture<short, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLod(texture<unsigned short, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLod(texture<short1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLod(texture<ushort1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLod(texture<short2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLod(texture<ushort2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLod(texture<short4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLod(texture<ushort4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLod(texture<int, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLod(texture<unsigned int, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLod(texture<int1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLod(texture<uint1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLod(texture<int2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLod(texture<uint2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLod(texture<int4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLod(texture<uint4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 4842 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<float, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<float1, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<float2, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<float4, 0x02, cudaReadModeElementType> t, float x, float y, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, 0, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<signed char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<unsigned char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<char1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<uchar1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<char2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<uchar2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<char4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<uchar4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLod(texture<unsigned short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<short1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLod(texture<ushort1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<short2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLod(texture<ushort2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<short4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLod(texture<ushort4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, 0, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayeredLod(texture<char, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayeredLod(texture<signed char, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayeredLod(texture<unsigned char, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayeredLod(texture<char1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayeredLod(texture<uchar1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayeredLod(texture<char2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayeredLod(texture<uchar2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayeredLod(texture<char4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayeredLod(texture<uchar4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayeredLod(texture<short, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayeredLod(texture<unsigned short, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayeredLod(texture<short1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayeredLod(texture<ushort1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayeredLod(texture<short2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayeredLod(texture<ushort2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayeredLod(texture<short4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayeredLod(texture<ushort4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayeredLod(texture<int, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayeredLod(texture<unsigned int, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayeredLod(texture<int1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayeredLod(texture<uint1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayeredLod(texture<int2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayeredLod(texture<uint2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayeredLod(texture<int4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayeredLod(texture<uint4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 5291 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<float, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<float1, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<float2, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<float4, 0xF1, cudaReadModeElementType> t, float x, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<signed char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<unsigned char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<char1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<uchar1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<char2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<uchar2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<char4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<uchar4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredLod(texture<unsigned short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<short1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredLod(texture<ushort1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<short2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredLod(texture<ushort2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<short4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredLod(texture<ushort4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, 0, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayeredLod(texture<char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayeredLod(texture<signed char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayeredLod(texture<unsigned char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayeredLod(texture<char1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayeredLod(texture<uchar1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayeredLod(texture<char2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayeredLod(texture<uchar2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayeredLod(texture<char4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayeredLod(texture<uchar4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayeredLod(texture<short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayeredLod(texture<unsigned short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayeredLod(texture<short1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayeredLod(texture<ushort1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayeredLod(texture<short2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayeredLod(texture<ushort2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayeredLod(texture<short4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayeredLod(texture<ushort4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayeredLod(texture<int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayeredLod(texture<unsigned int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayeredLod(texture<int1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayeredLod(texture<uint1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayeredLod(texture<int2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayeredLod(texture<uint2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayeredLod(texture<int4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayeredLod(texture<uint4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 5740 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<float, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<float1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<float2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<float4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float level)
{
float4 v = __ftexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<signed char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<unsigned char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<char1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<uchar1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<char2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<uchar2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<char4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<uchar4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredLod(texture<unsigned short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<short1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredLod(texture<ushort1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<short2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredLod(texture<ushort2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<short4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
int4 v = __itexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredLod(texture<ushort4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float level)
{
uint4 v = __utexfetchlodl(t, make_float4(x, y, 0, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3DLod(texture<char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3DLod(texture<signed char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3DLod(texture<unsigned char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3DLod(texture<char1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3DLod(texture<uchar1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3DLod(texture<char2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3DLod(texture<uchar2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3DLod(texture<char4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3DLod(texture<uchar4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3DLod(texture<short, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3DLod(texture<unsigned short, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3DLod(texture<short1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3DLod(texture<ushort1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3DLod(texture<short2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3DLod(texture<ushort2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3DLod(texture<short4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3DLod(texture<ushort4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3DLod(texture<int, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3DLod(texture<unsigned int, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3DLod(texture<int1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3DLod(texture<uint1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3DLod(texture<int2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3DLod(texture<uint2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3DLod(texture<int4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3DLod(texture<uint4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 6189 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<float, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<float1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<float2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<float4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlod(t, make_float4(x, y, z, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<signed char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<unsigned char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<char1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<uchar1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<char2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<uchar2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<char4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<uchar4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DLod(texture<unsigned short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<short1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DLod(texture<ushort1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<short2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DLod(texture<ushort2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<short4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DLod(texture<ushort4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlod(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLod(texture<char, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLod(texture<signed char, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLod(texture<unsigned char, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLod(texture<char1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLod(texture<uchar1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLod(texture<char2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLod(texture<uchar2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLod(texture<char4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLod(texture<uchar4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLod(texture<short, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLod(texture<unsigned short, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLod(texture<short1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLod(texture<ushort1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLod(texture<short2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLod(texture<ushort2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLod(texture<short4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLod(texture<ushort4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLod(texture<int, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLod(texture<unsigned int, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLod(texture<int1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLod(texture<uint1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLod(texture<int2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLod(texture<uint2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLod(texture<int4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLod(texture<uint4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 6638 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<float, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<float1, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<float2, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<float4, 0x0C, cudaReadModeElementType> t, float x, float y, float z, float level)
{
float4 v = __ftexfetchlodc(t, make_float4(x, y, z, 0), level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<signed char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<unsigned char, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<char1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<uchar1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<char2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<uchar2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<char4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<uchar4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<short, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLod(texture<unsigned short, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<short1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLod(texture<ushort1, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<short2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLod(texture<ushort2, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<short4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
int4 v = __itexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLod(texture<ushort4, 0x0C, cudaReadModeNormalizedFloat> t, float x, float y, float z, float level)
{
uint4 v = __utexfetchlodc(t, make_float4(x, y, z, 0), level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char texCubemapLayeredLod(texture<char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char texCubemapLayeredLod(texture<signed char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char texCubemapLayeredLod(texture<unsigned char, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 texCubemapLayeredLod(texture<char1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 texCubemapLayeredLod(texture<uchar1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 texCubemapLayeredLod(texture<char2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 texCubemapLayeredLod(texture<uchar2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 texCubemapLayeredLod(texture<char4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 texCubemapLayeredLod(texture<uchar4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short texCubemapLayeredLod(texture<short, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short texCubemapLayeredLod(texture<unsigned short, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 texCubemapLayeredLod(texture<short1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 texCubemapLayeredLod(texture<ushort1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 texCubemapLayeredLod(texture<short2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 texCubemapLayeredLod(texture<ushort2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 texCubemapLayeredLod(texture<short4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 texCubemapLayeredLod(texture<ushort4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int texCubemapLayeredLod(texture<int, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int texCubemapLayeredLod(texture<unsigned int, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 texCubemapLayeredLod(texture<int1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 texCubemapLayeredLod(texture<uint1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 texCubemapLayeredLod(texture<int2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 texCubemapLayeredLod(texture<uint2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 texCubemapLayeredLod(texture<int4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 texCubemapLayeredLod(texture<uint4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<float, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<float1, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<float2, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<float4, 0xFC, cudaReadModeElementType> t, float x, float y, float z, int layer, float level)
{
float4 v = __ftexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<signed char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<unsigned char, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<char1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<uchar1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<char2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<uchar2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<char4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<uchar4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<short, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float texCubemapLayeredLod(texture<unsigned short, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<short1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 texCubemapLayeredLod(texture<ushort1, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<short2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 texCubemapLayeredLod(texture<ushort2, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<short4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
int4 v = __itexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 texCubemapLayeredLod(texture<ushort4, 0xFC, cudaReadModeNormalizedFloat> t, float x, float y, float z, int layer, float level)
{
uint4 v = __utexfetchlodlc(t, make_float4(x, y, z, 0), layer, level);
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchgrad(texture<T, texType, readMode> t, float4 i, float4 dPdx, float4 dPdy, int d = texType);
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) uint4 __utexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) int4 __itexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
template<class T, int texType, enum cudaTextureReadMode readMode> extern __attribute__((device)) __attribute__((device_builtin)) float4 __ftexfetchgradl(texture<T, texType, readMode> t, float4 i, int l, float4 dPdx, float4 dPdy, int d = (texType & 0xF));
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DGrad(texture<char, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DGrad(texture<signed char, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DGrad(texture<unsigned char, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DGrad(texture<char1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DGrad(texture<uchar1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DGrad(texture<char2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DGrad(texture<uchar2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DGrad(texture<char4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DGrad(texture<uchar4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DGrad(texture<short, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DGrad(texture<unsigned short, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DGrad(texture<short1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DGrad(texture<ushort1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DGrad(texture<short2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DGrad(texture<ushort2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DGrad(texture<short4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DGrad(texture<ushort4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DGrad(texture<int, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DGrad(texture<unsigned int, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DGrad(texture<int1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DGrad(texture<uint1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DGrad(texture<int2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DGrad(texture<uint2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DGrad(texture<int4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DGrad(texture<uint4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7550 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<float, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<float1, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<float2, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<float4, 0x01, cudaReadModeElementType> t, float x, float dPdx, float dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<char, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<signed char, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<unsigned char, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<char1, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<uchar1, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<char2, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<uchar2, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<char4, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<uchar4, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<short, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DGrad(texture<unsigned short, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<short1, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DGrad(texture<ushort1, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<short2, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DGrad(texture<ushort2, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<short4, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DGrad(texture<ushort4, 0x01, cudaReadModeNormalizedFloat> t, float x, float dPdx, float dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, 0, 0, 0), make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DGrad(texture<char, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DGrad(texture<signed char, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DGrad(texture<unsigned char, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DGrad(texture<char1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DGrad(texture<uchar1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DGrad(texture<char2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DGrad(texture<uchar2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DGrad(texture<char4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DGrad(texture<uchar4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DGrad(texture<short, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DGrad(texture<unsigned short, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DGrad(texture<short1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DGrad(texture<ushort1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DGrad(texture<short2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DGrad(texture<ushort2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DGrad(texture<short4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DGrad(texture<ushort4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DGrad(texture<int, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DGrad(texture<unsigned int, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DGrad(texture<int1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DGrad(texture<uint1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DGrad(texture<int2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DGrad(texture<uint2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DGrad(texture<int4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DGrad(texture<uint4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 7999 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<float, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<float1, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<float2, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<float4, 0x02, cudaReadModeElementType> t, float x, float y, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<signed char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<unsigned char, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<char1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<uchar1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<char2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<uchar2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<char4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<uchar4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DGrad(texture<unsigned short, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<short1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DGrad(texture<ushort1, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<short2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DGrad(texture<ushort2, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<short4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DGrad(texture<ushort4, 0x02, cudaReadModeNormalizedFloat> t, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, 0, 0), make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex1DLayeredGrad(texture<char, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex1DLayeredGrad(texture<signed char, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex1DLayeredGrad(texture<unsigned char, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex1DLayeredGrad(texture<char1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex1DLayeredGrad(texture<uchar1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex1DLayeredGrad(texture<char2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex1DLayeredGrad(texture<uchar2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex1DLayeredGrad(texture<char4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex1DLayeredGrad(texture<uchar4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex1DLayeredGrad(texture<short, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex1DLayeredGrad(texture<unsigned short, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex1DLayeredGrad(texture<short1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex1DLayeredGrad(texture<ushort1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex1DLayeredGrad(texture<short2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex1DLayeredGrad(texture<ushort2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex1DLayeredGrad(texture<short4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex1DLayeredGrad(texture<ushort4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex1DLayeredGrad(texture<int, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex1DLayeredGrad(texture<unsigned int, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex1DLayeredGrad(texture<int1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex1DLayeredGrad(texture<uint1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex1DLayeredGrad(texture<int2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex1DLayeredGrad(texture<uint2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex1DLayeredGrad(texture<int4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex1DLayeredGrad(texture<uint4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 8448 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<float, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<float1, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<float2, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<float4, 0xF1, cudaReadModeElementType> t, float x, int layer, float dPdx, float dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<signed char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<unsigned char, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<char1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<uchar1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<char2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<uchar2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<char4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<uchar4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex1DLayeredGrad(texture<unsigned short, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<short1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex1DLayeredGrad(texture<ushort1, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<short2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex1DLayeredGrad(texture<ushort2, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<short4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex1DLayeredGrad(texture<ushort4, 0xF1, cudaReadModeNormalizedFloat> t, float x, int layer, float dPdx, float dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, 0, 0, 0), layer, make_float4(dPdx, 0, 0, 0), make_float4(dPdy, 0, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex2DLayeredGrad(texture<char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex2DLayeredGrad(texture<signed char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex2DLayeredGrad(texture<unsigned char, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex2DLayeredGrad(texture<char1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex2DLayeredGrad(texture<uchar1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex2DLayeredGrad(texture<char2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex2DLayeredGrad(texture<uchar2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex2DLayeredGrad(texture<char4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex2DLayeredGrad(texture<uchar4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex2DLayeredGrad(texture<short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex2DLayeredGrad(texture<unsigned short, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex2DLayeredGrad(texture<short1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex2DLayeredGrad(texture<ushort1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex2DLayeredGrad(texture<short2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex2DLayeredGrad(texture<ushort2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex2DLayeredGrad(texture<short4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex2DLayeredGrad(texture<ushort4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex2DLayeredGrad(texture<int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex2DLayeredGrad(texture<unsigned int, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex2DLayeredGrad(texture<int1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex2DLayeredGrad(texture<uint1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex2DLayeredGrad(texture<int2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex2DLayeredGrad(texture<uint2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex2DLayeredGrad(texture<int4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex2DLayeredGrad(texture<uint4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 8897 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<float, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<float1, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<float2, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<float4, 0xF2, cudaReadModeElementType> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 v = __ftexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<signed char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<unsigned char, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<char1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<uchar1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<char2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<uchar2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<char4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<uchar4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex2DLayeredGrad(texture<unsigned short, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<short1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex2DLayeredGrad(texture<ushort1, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<short2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex2DLayeredGrad(texture<ushort2, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<short4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 v = __itexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex2DLayeredGrad(texture<ushort4, 0xF2, cudaReadModeNormalizedFloat> t, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 v = __utexfetchgradl(t, make_float4(x, y, 0, 0), layer, make_float4(dPdx.x, dPdx.y, 0, 0), make_float4(dPdy.x, dPdy.y, 0, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char tex3DGrad(texture<char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) signed char tex3DGrad(texture<signed char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (signed char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned char tex3DGrad(texture<unsigned char, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned char)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char1 tex3DGrad(texture<char1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar1 tex3DGrad(texture<uchar1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char2 tex3DGrad(texture<char2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar2 tex3DGrad(texture<uchar2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) char4 tex3DGrad(texture<char4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_char4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uchar4 tex3DGrad(texture<uchar4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uchar4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short tex3DGrad(texture<short, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned short tex3DGrad(texture<unsigned short, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned short)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short1 tex3DGrad(texture<short1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort1 tex3DGrad(texture<ushort1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short2 tex3DGrad(texture<short2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort2 tex3DGrad(texture<ushort2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) short4 tex3DGrad(texture<short4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_short4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) ushort4 tex3DGrad(texture<ushort4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_ushort4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int tex3DGrad(texture<int, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) unsigned int tex3DGrad(texture<unsigned int, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return (unsigned int)v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int1 tex3DGrad(texture<int1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint1 tex3DGrad(texture<uint1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int2 tex3DGrad(texture<int2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint2 tex3DGrad(texture<uint2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) int4 tex3DGrad(texture<int4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_int4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) uint4 tex3DGrad(texture<uint4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_uint4(v.x, v.y, v.z, v.w);
}
# 9346 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_fetch_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<float, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return v.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<float1, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float1(v.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<float2, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float2(v.x, v.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<float4, 0x03, cudaReadModeElementType> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 v = __ftexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
return make_float4(v.x, v.y, v.z, v.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<signed char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<unsigned char, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<char1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<uchar1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<char2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<uchar2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<char4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<uchar4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float tex3DGrad(texture<unsigned short, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return w.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<short1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float1 tex3DGrad(texture<ushort1, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float1(w.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<short2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float2 tex3DGrad(texture<ushort2, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float2(w.x, w.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<short4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 v = __itexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) float4 tex3DGrad(texture<ushort4, 0x03, cudaReadModeNormalizedFloat> t, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 v = __utexfetchgrad(t, make_float4(x, y, z, 0), make_float4(dPdx.x, dPdx.y, dPdx.z, 0), make_float4(dPdy.x, dPdy.y, dPdy.z, 0));
float4 w = make_float4(__int_as_float(v.x), __int_as_float(v.y), __int_as_float(v.z), __int_as_float(v.w));
return make_float4(w.x, w.y, w.z, w.w);
}
# 9417 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h" 2
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(signed char *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char1 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char2 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(char4 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned char *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar1 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar2 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uchar4 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short1 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short2 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(short4 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned short *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort1 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort2 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(ushort4 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int1 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int2 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(int4 *retVal, cudaTextureObject_t texObject, int x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(unsigned int *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint1 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint2 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(uint4 *retVal, cudaTextureObject_t texObject, int x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 334 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float *retVal, cudaTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float1 *retVal, cudaTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float2 *retVal, cudaTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1Dfetch(float4 *retVal, cudaTextureObject_t texObject, int x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.s32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1Dfetch(cudaTextureObject_t texObject, int x)
{
T ret;
tex1Dfetch(&ret, texObject, x);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(signed char *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char1 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char2 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(char4 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned char *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar1 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar2 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uchar4 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short1 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short2 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(short4 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned short *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort1 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort2 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(ushort4 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int1 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int2 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(int4 *retVal, cudaTextureObject_t texObject, float x)
{
int4 tmp;
asm volatile ("tex.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(unsigned int *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint1 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint2 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(uint4 *retVal, cudaTextureObject_t texObject, float x)
{
uint4 tmp;
asm volatile ("tex.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 646 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float *retVal, cudaTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float1 *retVal, cudaTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float2 *retVal, cudaTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1D(float4 *retVal, cudaTextureObject_t texObject, float x)
{
float4 tmp;
asm volatile ("tex.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1D(cudaTextureObject_t texObject, float x)
{
T ret;
tex1D(&ret, texObject, x);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(signed char *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(char4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(short4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(int4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
int4 tmp;
asm volatile ("tex.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(uint4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
uint4 tmp;
asm volatile ("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 958 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float *retVal, cudaTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float1 *retVal, cudaTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float2 *retVal, cudaTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2D(float4 *retVal, cudaTextureObject_t texObject, float x, float y)
{
float4 tmp;
asm volatile ("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2D(cudaTextureObject_t texObject, float x, float y)
{
T ret;
tex2D(&ret, texObject, x, y);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1270 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3D(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3D(cudaTextureObject_t texObject, float x, float y, float z)
{
T ret;
tex3D(&ret, texObject, x, y, z);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(signed char *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(char4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned char *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uchar4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(short4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned short *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(ushort4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(int4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
int4 tmp;
asm volatile ("tex.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(unsigned int *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(uint4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
uint4 tmp;
asm volatile ("tex.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1582 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float *retVal, cudaTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float1 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float2 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayered(float4 *retVal, cudaTextureObject_t texObject, float x, int layer)
{
float4 tmp;
asm volatile ("tex.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayered(cudaTextureObject_t texObject, float x, int layer)
{
T ret;
tex1DLayered(&ret, texObject, x, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(signed char *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(char4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(short4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(int4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
int4 tmp;
asm volatile ("tex.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
uint4 tmp;
asm volatile ("tex.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 1894 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayered(float4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer)
{
float4 tmp;
asm volatile ("tex.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayered(cudaTextureObject_t texObject, float x, float y, int layer)
{
T ret;
tex2DLayered(&ret, texObject, x, y, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
int4 tmp;
asm volatile ("tex.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
uint4 tmp;
asm volatile ("tex.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 2206 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemap(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z)
{
float4 tmp;
asm volatile ("tex.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemap(cudaTextureObject_t texObject, float x, float y, float z)
{
T ret;
texCubemap(&ret, texObject, x, y, z);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
int4 tmp;
asm volatile ("tex.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
uint4 tmp;
asm volatile ("tex.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 2518 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayered(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
float4 tmp;
asm volatile ("tex.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLayered(cudaTextureObject_t texObject, float x, float y, float z, int layer)
{
T ret;
texCubemapLayered(&ret, texObject, x, y, z, layer);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(signed char *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(char4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(short4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(int4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (long)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(long4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
int4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_long4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(unsigned long *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (unsigned long)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(ulong4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
uint4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_ulong4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float1 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float2 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2Dgather(float4 *retVal, cudaTextureObject_t texObject, float x, float y, int comp = 0)
{
float4 tmp;
if (comp == 0) {
asm volatile ("tld4.r.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 1) {
asm volatile ("tld4.g.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 2) {
asm volatile ("tld4.b.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
else if (comp == 3) {
asm volatile ("tld4.a.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2Dgather(cudaTextureObject_t to, float x, float y, int comp = 0)
{
T ret;
tex2Dgather(&ret, to, x, y, comp);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(signed char *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(char4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(short4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(int4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
int4 tmp;
asm volatile ("tex.level.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
uint4 tmp;
asm volatile ("tex.level.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 3540 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float *retVal, cudaTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float1 *retVal, cudaTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float2 *retVal, cudaTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLod(float4 *retVal, cudaTextureObject_t texObject, float x, float level)
{
float4 tmp;
asm volatile ("tex.level.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], %6;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLod(cudaTextureObject_t texObject, float x, float level)
{
T ret;
tex1DLod(&ret, texObject, x, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
int4 tmp;
asm volatile ("tex.level.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
uint4 tmp;
asm volatile ("tex.level.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 3852 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLod(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float level)
{
float4 tmp;
asm volatile ("tex.level.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLod(cudaTextureObject_t texObject, float x, float y, float level)
{
T ret;
tex2DLod(&ret, texObject, x, y, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4164 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DLod(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3DLod(cudaTextureObject_t texObject, float x, float y, float z, float level)
{
T ret;
tex3DLod(&ret, texObject, x, y, z, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(signed char *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(char4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(short4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(int4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(uint4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4476 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float1 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float2 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredLod(float4 *retVal, cudaTextureObject_t texObject, float x, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], %7;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayeredLod(cudaTextureObject_t texObject, float x, int layer, float level)
{
T ret;
tex1DLayeredLod(&ret, texObject, x, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(signed char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(char4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(short4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(int4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 4788 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredLod(float4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayeredLod(cudaTextureObject_t texObject, float x, float y, int layer, float level)
{
T ret;
tex2DLayeredLod(&ret, texObject, x, y, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
int4 tmp;
asm volatile ("tex.level.cube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
uint4 tmp;
asm volatile ("tex.level.cube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5100 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLod(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float level)
{
float4 tmp;
asm volatile ("tex.level.cube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLod(cudaTextureObject_t texObject, float x, float y, float z, float level)
{
T ret;
texCubemapLod(&ret, texObject, x, y, z, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
int4 tmp;
asm volatile ("tex.level.acube.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
uint4 tmp;
asm volatile ("tex.level.acube.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5412 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void texCubemapLayeredLod(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
float4 tmp;
asm volatile ("tex.level.acube.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(z), "f"(level));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T texCubemapLayeredLod(cudaTextureObject_t texObject, float x, float y, float z, int layer, float level)
{
T ret;
texCubemapLayeredLod(&ret, texObject, x, y, z, layer, level);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(signed char *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(char4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned char *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uchar4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(short4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned short *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(ushort4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(int4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(unsigned int *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(uint4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 5724 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float1 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float2 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DGrad(float4 *retVal, cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DGrad(cudaTextureObject_t texObject, float x, float dPdx, float dPdy)
{
T ret;
tex1DGrad(&ret, texObject, x, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6036 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DGrad(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DGrad(cudaTextureObject_t texObject, float x, float y, float2 dPdx, float2 dPdy)
{
T ret;
tex2DGrad(&ret, texObject, x, y, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(signed char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(char4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(short4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(int4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.3d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.3d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6348 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float1 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float2 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex3DGrad(float4 *retVal, cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.3d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9, %10, %10}, {%11, %12, %13, %13};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "f"(x), "f"(y), "f"(z), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdx.z), "f"(dPdy.x), "f"(dPdy.y), "f"(dPdy.z));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex3DGrad(cudaTextureObject_t texObject, float x, float y, float z, float4 dPdx, float4 dPdy)
{
T ret;
tex3DGrad(&ret, texObject, x, y, z, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(signed char *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(char4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned char *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uchar4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(short4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned short *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(ushort4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(int4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a1d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(unsigned int *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(uint4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a1d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6660 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float1 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float2 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex1DLayeredGrad(float4 *retVal, cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a1d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(dPdx), "f"(dPdy));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex1DLayeredGrad(cudaTextureObject_t texObject, float x, int layer, float dPdx, float dPdy)
{
T ret;
tex1DLayeredGrad(&ret, texObject, x, layer, dPdx, dPdy);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (char)tmp.x;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(signed char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (signed char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(char4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned char *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned char)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uchar4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(short4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned short *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned short)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(ushort4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(int4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
int4 tmp;
asm volatile ("tex.grad.a2d.v4.s32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(unsigned int *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (unsigned int)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(uint4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
uint4 tmp;
asm volatile ("tex.grad.a2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
# 6972 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/texture_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = (float)(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float1 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float2 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void tex2DLayeredGrad(float4 *retVal, cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
float4 tmp;
asm volatile ("tex.grad.a2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(texObject), "r"(layer), "f"(x), "f"(y), "f"(dPdx.x), "f"(dPdx.y), "f"(dPdy.x), "f"(dPdy.y));
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T tex2DLayeredGrad(cudaTextureObject_t texObject, float x, float y, int layer, float2 dPdx, float2 dPdy)
{
T ret;
tex2DLayeredGrad(&ret, texObject, x, y, layer, dPdx, dPdy);
return ret;
}
# 9418 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h" 1
# 59 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h"
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/builtin_types.h" 1
# 60 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h" 2
# 70 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/surface_indirect_functions.h"
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b8.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b8.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b8.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b16.trap {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b16.clamp {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b16.zero {%0}, [%1, {%2}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(long long *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b64.trap {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b64.clamp {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b64.zero {%0}, [%1, {%2}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=f"(tmp) : "l"(surfObject), "r"(x));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.b32.trap {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.b32.clamp {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.b32.zero {%0}, [%1, {%2}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b8.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b8.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b8.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b8.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b8.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b8.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b16.trap {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b16.clamp {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b16.zero {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b16.trap {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b16.clamp {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b16.zero {%0, %1}, [%2, {%3}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b64.trap {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b64.clamp {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b64.zero {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b64.trap {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b64.clamp {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b64.zero {%0, %1}, [%2, {%3}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v2.b32.trap {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v2.b32.clamp {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v2.b32.zero {%0, %1}, [%2, {%3}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1Dread(cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surf1Dread(&ret, surfObject, x, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2Dread(cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surf2Dread(&ret, surfObject, x, y, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.3d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.3d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.3d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(x), "r"(y), "r"(z));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf3Dread(cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surf3Dread(&ret, surfObject, x, y, z, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b8.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b8.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b8.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b16.trap {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b16.clamp {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b16.zero {%0}, [%1, {%2, %3}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b64.trap {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b64.clamp {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b64.zero {%0}, [%1, {%2, %3}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.b32.trap {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.b32.clamp {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.b32.zero {%0}, [%1, {%2, %3}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b8.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b8.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b8.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b16.trap {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b16.clamp {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b16.zero {%0, %1}, [%2, {%3, %4}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b64.trap {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b64.clamp {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b64.zero {%0, %1}, [%2, {%3, %4}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v2.b32.trap {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v2.b32.clamp {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v2.b32.zero {%0, %1}, [%2, {%3, %4}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a1d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a1d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a1d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf1DLayeredread(cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surf1DLayeredread(&ret, surfObject, x, layer, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layer), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surf2DLayeredread(cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surf2DLayeredread(&ret, surfObject, x, y, layer, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(face), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapread(cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surfCubemapread(&ret, surfObject, face, x, y, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(signed char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (signed char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned char *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned char)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b8.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b8.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b8.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned short *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned short tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned short)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b16.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b16.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b16.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=h"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned int *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned int tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned int)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=r"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(longlong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_longlong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(unsigned long long *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
unsigned long long tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (unsigned long long)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ulonglong1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b64.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b64.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b64.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=l"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ulonglong1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = (float)(tmp);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float1 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float1 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.b32.trap {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.b32.clamp {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.b32.zero {%0}, [%1, {%2, %3, %4, %4}];" : "=f"(tmp.x) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float1(tmp.x);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b8.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b8.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b8.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b16.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b16.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b16.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=h"(tmp.x), "=h"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=r"(tmp.x), "=r"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(longlong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
longlong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_longlong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ulonglong2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ulonglong2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b64.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b64.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b64.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=l"(tmp.x), "=l"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ulonglong2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float2 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float2 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v2.b32.trap {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v2.b32.clamp {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v2.b32.zero {%0, %1}, [%2, {%3, %4, %5, %5}];" : "=f"(tmp.x), "=f"(tmp.y) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float2(tmp.x, tmp.y);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(char4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_char4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uchar4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b8.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b8.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b8.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uchar4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(short4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
short4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_short4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(ushort4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
ushort4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b16.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b16.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b16.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=h"(tmp.x), "=h"(tmp.y), "=h"(tmp.z), "=h"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_ushort4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(int4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
int4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_int4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(uint4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
uint4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=r"(tmp.x), "=r"(tmp.y), "=r"(tmp.z), "=r"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_uint4(tmp.x, tmp.y, tmp.z, tmp.w);
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredread(float4 *retVal, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
float4 tmp;
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("suld.b.a2d.v4.b32.trap {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("suld.b.a2d.v4.b32.clamp {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("suld.b.a2d.v4.b32.zero {%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];" : "=f"(tmp.x), "=f"(tmp.y), "=f"(tmp.z), "=f"(tmp.w) : "l"(surfObject), "r"(layerface), "r"(x), "r"(y));
}
*retVal = make_float4(tmp.x, tmp.y, tmp.z, tmp.w);
}
template <class T>
static __inline__ __attribute__((always_inline)) __attribute__((device)) T surfCubemapLayeredread(cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
T ret;
surfCubemapLayeredread(&ret, surfObject, x, y, z, layerface, boundaryMode);
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(signed char data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b8.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b8.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b8.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b16.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b16.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b16.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(long long data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b64.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b64.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b64.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float1 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.b32.trap [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.b32.clamp [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.b32.zero [%0, {%1}], {%2};" : : "l"(surfObject), "r"(x), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b8.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b8.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b8.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b8.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b8.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b8.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b16.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b16.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b16.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b16.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b16.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b16.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b64.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b64.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b64.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b64.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b64.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b64.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float2 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v2.b32.trap [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v2.b32.clamp [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v2.b32.zero [%0, {%1}], {%2, %3};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(char4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b8.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b8.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b8.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b8.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b8.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b8.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(short4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b16.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b16.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b16.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b16.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b16.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b16.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(int4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1Dwrite(float4 data, cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.1d.v4.b32.trap [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.1d.v4.b32.clamp [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.1d.v4.b32.zero [%0, {%1}], {%2, %3, %4, %5};" : : "l"(surfObject), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(long long data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2Dwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.2d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.2d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.2d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(long long data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf3Dwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.3d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.3d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.3d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(x), "r"(y), "r"(z), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b8.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b8.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b8.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b16.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b16.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b16.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(long long data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b64.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b64.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b64.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.b32.trap [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.b32.clamp [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.b32.zero [%0, {%1, %2}], {%3};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b8.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b8.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b8.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b16.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b16.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b16.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b64.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b64.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b64.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v2.b32.trap [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v2.b32.clamp [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v2.b32.zero [%0, {%1, %2}], {%3, %4};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b8.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b8.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b8.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b16.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b16.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b16.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf1DLayeredwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a1d.v4.b32.trap [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a1d.v4.b32.clamp [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a1d.v4.b32.zero [%0, {%1, %2}], {%3, %4, %5, %6};" : : "l"(surfObject), "r"(layer), "r"(x), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(long long data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surf2DLayeredwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layer), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(long long data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(face), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(signed char data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned char data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b8.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b8.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b8.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned short data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b16.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b16.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b16.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned int data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(long long data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(unsigned long long data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b64.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b64.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b64.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float1 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.b32.trap [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.b32.clamp [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.b32.zero [%0, {%1, %2, %3, %3}], {%4};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(longlong2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ulonglong2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b64.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b64.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b64.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "l"(data.x), "l"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float2 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v2.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v2.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v2.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(char4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((int)data.x), "r"((int)data.y), "r"((int)data.z), "r"((int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uchar4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b8.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b8.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b8.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"((unsigned int)data.x), "r"((unsigned int)data.y), "r"((unsigned int)data.z), "r"((unsigned int)data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(short4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(ushort4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b16.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b16.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b16.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "h"(data.x), "h"(data.y), "h"(data.z), "h"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(int4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(uint4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "r"(data.x), "r"(data.y), "r"(data.z), "r"(data.w));
}
}
static __inline__ __attribute__((always_inline)) __attribute__((device)) void surfCubemapLayeredwrite(float4 data, cudaSurfaceObject_t surfObject, int x, int y, int z, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap)
{
if (boundaryMode == cudaBoundaryModeTrap) {
asm volatile ("sust.b.a2d.v4.b32.trap [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeClamp) {
asm volatile ("sust.b.a2d.v4.b32.clamp [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
else if (boundaryMode == cudaBoundaryModeZero) {
asm volatile ("sust.b.a2d.v4.b32.zero [%0, {%1, %2, %3, %3}], {%4, %5, %6, %7};" : : "l"(surfObject), "r"(layerface), "r"(x), "r"(y), "f"(data.x), "f"(data.y), "f"(data.z), "f"(data.w));
}
}
# 9419 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_functions.h" 2
# 80 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 1 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_launch_parameters.h" 1
# 63 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/device_launch_parameters.h"
extern "C" {
uint3 __attribute__((device_builtin)) extern const threadIdx;
uint3 __attribute__((device_builtin)) extern const blockIdx;
dim3 __attribute__((device_builtin)) extern const blockDim;
dim3 __attribute__((device_builtin)) extern const gridDim;
int __attribute__((device_builtin)) extern const warpSize;
}
# 81 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h" 2
# 92 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
namespace
{
# 123 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaSetupArgument(
T arg,
size_t offset
)
{
return ::cudaSetupArgument((const void*)&arg, sizeof(T), offset);
}
# 162 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
static __inline__ __attribute__((host)) cudaError_t cudaEventCreate(
cudaEvent_t *event,
unsigned int flags
)
{
return ::cudaEventCreateWithFlags(event, flags);
}
# 225 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
__inline__ __attribute__((host)) cudaError_t cudaMallocHost(
void **ptr,
size_t size,
unsigned int flags
)
{
return ::cudaHostAlloc(ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaHostAlloc(
T **ptr,
size_t size,
unsigned int flags
)
{
return ::cudaHostAlloc((void**)(void*)ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaHostGetDevicePointer(
T **pDevice,
void *pHost,
unsigned int flags
)
{
return ::cudaHostGetDevicePointer((void**)(void*)pDevice, pHost, flags);
}
# 323 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMallocManaged(
T **devPtr,
size_t size,
unsigned int flags = 0x01
)
{
return ::cudaMallocManaged((void**)(void*)devPtr, size, flags);
}
# 399 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaStreamAttachMemAsync(
cudaStream_t stream,
T *devPtr,
size_t length = 0,
unsigned int flags = 0x04
)
{
return ::cudaStreamAttachMemAsync(stream, (void*)devPtr, length, flags);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMalloc(
T **devPtr,
size_t size
)
{
return ::cudaMalloc((void**)(void*)devPtr, size);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMallocHost(
T **ptr,
size_t size,
unsigned int flags = 0
)
{
return cudaMallocHost((void**)(void*)ptr, size, flags);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMallocPitch(
T **devPtr,
size_t *pitch,
size_t width,
size_t height
)
{
return ::cudaMallocPitch((void**)(void*)devPtr, pitch, width, height);
}
# 475 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMemcpyToSymbol(
const T &symbol,
const void *src,
size_t count,
size_t offset = 0,
enum cudaMemcpyKind kind = cudaMemcpyHostToDevice
)
{
return ::cudaMemcpyToSymbol((const void*)&symbol, src, count, offset, kind);
}
# 527 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMemcpyToSymbolAsync(
const T &symbol,
const void *src,
size_t count,
size_t offset = 0,
enum cudaMemcpyKind kind = cudaMemcpyHostToDevice,
cudaStream_t stream = 0
)
{
return ::cudaMemcpyToSymbolAsync((const void*)&symbol, src, count, offset, kind, stream);
}
# 573 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMemcpyFromSymbol(
void *dst,
const T &symbol,
size_t count,
size_t offset = 0,
enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost
)
{
return ::cudaMemcpyFromSymbol(dst, (const void*)&symbol, count, offset, kind);
}
# 625 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaMemcpyFromSymbolAsync(
void *dst,
const T &symbol,
size_t count,
size_t offset = 0,
enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost,
cudaStream_t stream = 0
)
{
return ::cudaMemcpyFromSymbolAsync(dst, (const void*)&symbol, count, offset, kind, stream);
}
# 658 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaGetSymbolAddress(
void **devPtr,
const T &symbol
)
{
return ::cudaGetSymbolAddress(devPtr, (const void*)&symbol);
}
# 687 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaGetSymbolSize(
size_t *size,
const T &symbol
)
{
return ::cudaGetSymbolSize(size, (const void*)&symbol);
}
# 730 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTexture(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
const struct cudaChannelFormatDesc &desc,
size_t size = (2147483647 * 2U + 1U)
)
{
return ::cudaBindTexture(offset, &tex, devPtr, &desc, size);
}
# 775 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTexture(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
size_t size = (2147483647 * 2U + 1U)
)
{
return cudaBindTexture(offset, tex, devPtr, tex.channelDesc, size);
}
# 831 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTexture2D(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
const struct cudaChannelFormatDesc &desc,
size_t width,
size_t height,
size_t pitch
)
{
return ::cudaBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch);
}
# 889 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTexture2D(
size_t *offset,
const struct texture<T, dim, readMode> &tex,
const void *devPtr,
size_t width,
size_t height,
size_t pitch
)
{
return ::cudaBindTexture2D(offset, &tex, devPtr, &tex.channelDesc, width, height, pitch);
}
# 931 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTextureToArray(
const struct texture<T, dim, readMode> &tex,
cudaArray_const_t array,
const struct cudaChannelFormatDesc &desc
)
{
return ::cudaBindTextureToArray(&tex, array, &desc);
}
# 969 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTextureToArray(
const struct texture<T, dim, readMode> &tex,
cudaArray_const_t array
)
{
struct cudaChannelFormatDesc desc;
cudaError_t err = ::cudaGetChannelDesc(&desc, array);
return err == cudaSuccess ? cudaBindTextureToArray(tex, array, desc) : err;
}
# 1010 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTextureToMipmappedArray(
const struct texture<T, dim, readMode> &tex,
cudaMipmappedArray_const_t mipmappedArray,
const struct cudaChannelFormatDesc &desc
)
{
return ::cudaBindTextureToMipmappedArray(&tex, mipmappedArray, &desc);
}
# 1048 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaBindTextureToMipmappedArray(
const struct texture<T, dim, readMode> &tex,
cudaMipmappedArray_const_t mipmappedArray
)
{
struct cudaChannelFormatDesc desc;
cudaArray_t levelArray;
cudaError_t err = ::cudaGetMipmappedArrayLevel(&levelArray, mipmappedArray, 0);
if (err != cudaSuccess) {
return err;
}
err = ::cudaGetChannelDesc(&desc, levelArray);
return err == cudaSuccess ? cudaBindTextureToMipmappedArray(tex, mipmappedArray, desc) : err;
}
# 1087 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaUnbindTexture(
const struct texture<T, dim, readMode> &tex
)
{
return ::cudaUnbindTexture(&tex);
}
# 1121 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim, enum cudaTextureReadMode readMode>
__inline__ __attribute__((host)) cudaError_t cudaGetTextureAlignmentOffset(
size_t *offset,
const struct texture<T, dim, readMode> &tex
)
{
return ::cudaGetTextureAlignmentOffset(offset, &tex);
}
# 1174 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaFuncSetCacheConfig(
T *func,
enum cudaFuncCache cacheConfig
)
{
return ::cudaFuncSetCacheConfig((const void*)func, cacheConfig);
}
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaFuncSetSharedMemConfig(
T *func,
enum cudaSharedMemConfig config
)
{
return ::cudaFuncSetSharedMemConfig((const void*)func, config);
}
# 1226 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaLaunch(
T *func
)
{
return ::cudaLaunch((const void*)func);
}
# 1264 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T>
__inline__ __attribute__((host)) cudaError_t cudaFuncGetAttributes(
struct cudaFuncAttributes *attr,
T *entry
)
{
return ::cudaFuncGetAttributes(attr, (const void*)entry);
}
# 1293 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim>
__inline__ __attribute__((host)) cudaError_t cudaBindSurfaceToArray(
const struct surface<T, dim> &surf,
cudaArray_const_t array,
const struct cudaChannelFormatDesc &desc
)
{
return ::cudaBindSurfaceToArray(&surf, array, &desc);
}
# 1322 "/s/chopin/e/proj/AlphaZ/waruna/cuda-6.0/installation/bin/..//include/cuda_runtime.h"
template<class T, int dim>
__inline__ __attribute__((host)) cudaError_t cudaBindSurfaceToArray(
const struct surface<T, dim> &surf,
cudaArray_const_t array
)
{
struct cudaChannelFormatDesc desc;
cudaError_t err = ::cudaGetChannelDesc(&desc, array);
return err == cudaSuccess ? cudaBindSurfaceToArray(surf, array, desc) : err;
}
}
# 1 "<command-line>" 2
# 1 "vecmultKernel00.cu"
# 1 "vecmultKernel.h" 1
# 9 "vecmultKernel.h"
__attribute__((global)) void MultiplyVectors(const float* A, const float* B, float* C);
# 6 "vecmultKernel00.cu" 2
__attribute__((global)) void MultiplyVectors(const float* A, const float* B, float* C)
{
int B_start_index = blockIdx.x*11;
int A_start_index = threadIdx.x*11;
int C_width = gridDim.x*11;
int t;
float c_0_0, c_0_1, c_0_2, c_0_3, c_0_4, c_0_5, c_0_6, c_0_7, c_0_8, c_0_9, c_0_10, c_1_0, c_1_1, c_1_2, c_1_3, c_1_4, c_1_5, c_1_6, c_1_7, c_1_8, c_1_9, c_1_10, c_2_0, c_2_1, c_2_2, c_2_3, c_2_4, c_2_5, c_2_6, c_2_7, c_2_8, c_2_9, c_2_10, c_3_0, c_3_1, c_3_2, c_3_3, c_3_4, c_3_5, c_3_6, c_3_7, c_3_8, c_3_9, c_3_10, c_4_0, c_4_1, c_4_2, c_4_3, c_4_4, c_4_5, c_4_6, c_4_7, c_4_8, c_4_9, c_4_10, c_5_0, c_5_1, c_5_2, c_5_3, c_5_4, c_5_5, c_5_6, c_5_7, c_5_8, c_5_9, c_5_10, c_6_0, c_6_1, c_6_2, c_6_3, c_6_4, c_6_5, c_6_6, c_6_7, c_6_8, c_6_9, c_6_10, c_7_0, c_7_1, c_7_2, c_7_3, c_7_4, c_7_5, c_7_6, c_7_7, c_7_8, c_7_9, c_7_10, c_8_0, c_8_1, c_8_2, c_8_3, c_8_4, c_8_5, c_8_6, c_8_7, c_8_8, c_8_9, c_8_10, c_9_0, c_9_1, c_9_2, c_9_3, c_9_4, c_9_5, c_9_6, c_9_7, c_9_8, c_9_9, c_9_10, c_10_0, c_10_1, c_10_2, c_10_3, c_10_4, c_10_5, c_10_6, c_10_7, c_10_8, c_10_9, c_10_10;
float a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8, a_9, a_10;
float b_0, b_1, b_2, b_3, b_4, b_5, b_6, b_7, b_8, b_9, b_10;
a_0 = A[A_start_index+0];
a_1 = A[A_start_index+1];
a_2 = A[A_start_index+2];
a_3 = A[A_start_index+3];
a_4 = A[A_start_index+4];
a_5 = A[A_start_index+5];
a_6 = A[A_start_index+6];
a_7 = A[A_start_index+7];
a_8 = A[A_start_index+8];
a_9 = A[A_start_index+9];
a_10 = A[A_start_index+10];
b_0 = B[B_start_index+0];
b_1 = B[B_start_index+1];
b_2 = B[B_start_index+2];
b_3 = B[B_start_index+3];
b_4 = B[B_start_index+4];
b_5 = B[B_start_index+5];
b_6 = B[B_start_index+6];
b_7 = B[B_start_index+7];
b_8 = B[B_start_index+8];
b_9 = B[B_start_index+9];
b_10 = B[B_start_index+10];
c_0_0 = 0;
c_0_1 = 0;
c_0_2 = 0;
c_0_3 = 0;
c_0_4 = 0;
c_0_5 = 0;
c_0_6 = 0;
c_0_7 = 0;
c_0_8 = 0;
c_0_9 = 0;
c_0_10 = 0;
c_1_0 = 0;
c_1_1 = 0;
c_1_2 = 0;
c_1_3 = 0;
c_1_4 = 0;
c_1_5 = 0;
c_1_6 = 0;
c_1_7 = 0;
c_1_8 = 0;
c_1_9 = 0;
c_1_10 = 0;
c_2_0 = 0;
c_2_1 = 0;
c_2_2 = 0;
c_2_3 = 0;
c_2_4 = 0;
c_2_5 = 0;
c_2_6 = 0;
c_2_7 = 0;
c_2_8 = 0;
c_2_9 = 0;
c_2_10 = 0;
c_3_0 = 0;
c_3_1 = 0;
c_3_2 = 0;
c_3_3 = 0;
c_3_4 = 0;
c_3_5 = 0;
c_3_6 = 0;
c_3_7 = 0;
c_3_8 = 0;
c_3_9 = 0;
c_3_10 = 0;
c_4_0 = 0;
c_4_1 = 0;
c_4_2 = 0;
c_4_3 = 0;
c_4_4 = 0;
c_4_5 = 0;
c_4_6 = 0;
c_4_7 = 0;
c_4_8 = 0;
c_4_9 = 0;
c_4_10 = 0;
c_5_0 = 0;
c_5_1 = 0;
c_5_2 = 0;
c_5_3 = 0;
c_5_4 = 0;
c_5_5 = 0;
c_5_6 = 0;
c_5_7 = 0;
c_5_8 = 0;
c_5_9 = 0;
c_5_10 = 0;
c_6_0 = 0;
c_6_1 = 0;
c_6_2 = 0;
c_6_3 = 0;
c_6_4 = 0;
c_6_5 = 0;
c_6_6 = 0;
c_6_7 = 0;
c_6_8 = 0;
c_6_9 = 0;
c_6_10 = 0;
c_7_0 = 0;
c_7_1 = 0;
c_7_2 = 0;
c_7_3 = 0;
c_7_4 = 0;
c_7_5 = 0;
c_7_6 = 0;
c_7_7 = 0;
c_7_8 = 0;
c_7_9 = 0;
c_7_10 = 0;
c_8_0 = 0;
c_8_1 = 0;
c_8_2 = 0;
c_8_3 = 0;
c_8_4 = 0;
c_8_5 = 0;
c_8_6 = 0;
c_8_7 = 0;
c_8_8 = 0;
c_8_9 = 0;
c_8_10 = 0;
c_9_0 = 0;
c_9_1 = 0;
c_9_2 = 0;
c_9_3 = 0;
c_9_4 = 0;
c_9_5 = 0;
c_9_6 = 0;
c_9_7 = 0;
c_9_8 = 0;
c_9_9 = 0;
c_9_10 = 0;
c_10_0 = 0;
c_10_1 = 0;
c_10_2 = 0;
c_10_3 = 0;
c_10_4 = 0;
c_10_5 = 0;
c_10_6 = 0;
c_10_7 = 0;
c_10_8 = 0;
c_10_9 = 0;
c_10_10 = 0;
for (t = 0; t < 10000; t++) {
c_0_0 += a_0*b_0;
c_0_1 += a_0*b_1;
c_0_2 += a_0*b_2;
c_0_3 += a_0*b_3;
c_0_4 += a_0*b_4;
c_0_5 += a_0*b_5;
c_0_6 += a_0*b_6;
c_0_7 += a_0*b_7;
c_0_8 += a_0*b_8;
c_0_9 += a_0*b_9;
c_0_10 += a_0*b_10;
c_1_0 += a_1*b_0;
c_1_1 += a_1*b_1;
c_1_2 += a_1*b_2;
c_1_3 += a_1*b_3;
c_1_4 += a_1*b_4;
c_1_5 += a_1*b_5;
c_1_6 += a_1*b_6;
c_1_7 += a_1*b_7;
c_1_8 += a_1*b_8;
c_1_9 += a_1*b_9;
c_1_10 += a_1*b_10;
c_2_0 += a_2*b_0;
c_2_1 += a_2*b_1;
c_2_2 += a_2*b_2;
c_2_3 += a_2*b_3;
c_2_4 += a_2*b_4;
c_2_5 += a_2*b_5;
c_2_6 += a_2*b_6;
c_2_7 += a_2*b_7;
c_2_8 += a_2*b_8;
c_2_9 += a_2*b_9;
c_2_10 += a_2*b_10;
c_3_0 += a_3*b_0;
c_3_1 += a_3*b_1;
c_3_2 += a_3*b_2;
c_3_3 += a_3*b_3;
c_3_4 += a_3*b_4;
c_3_5 += a_3*b_5;
c_3_6 += a_3*b_6;
c_3_7 += a_3*b_7;
c_3_8 += a_3*b_8;
c_3_9 += a_3*b_9;
c_3_10 += a_3*b_10;
c_4_0 += a_4*b_0;
c_4_1 += a_4*b_1;
c_4_2 += a_4*b_2;
c_4_3 += a_4*b_3;
c_4_4 += a_4*b_4;
c_4_5 += a_4*b_5;
c_4_6 += a_4*b_6;
c_4_7 += a_4*b_7;
c_4_8 += a_4*b_8;
c_4_9 += a_4*b_9;
c_4_10 += a_4*b_10;
c_5_0 += a_5*b_0;
c_5_1 += a_5*b_1;
c_5_2 += a_5*b_2;
c_5_3 += a_5*b_3;
c_5_4 += a_5*b_4;
c_5_5 += a_5*b_5;
c_5_6 += a_5*b_6;
c_5_7 += a_5*b_7;
c_5_8 += a_5*b_8;
c_5_9 += a_5*b_9;
c_5_10 += a_5*b_10;
c_6_0 += a_6*b_0;
c_6_1 += a_6*b_1;
c_6_2 += a_6*b_2;
c_6_3 += a_6*b_3;
c_6_4 += a_6*b_4;
c_6_5 += a_6*b_5;
c_6_6 += a_6*b_6;
c_6_7 += a_6*b_7;
c_6_8 += a_6*b_8;
c_6_9 += a_6*b_9;
c_6_10 += a_6*b_10;
c_7_0 += a_7*b_0;
c_7_1 += a_7*b_1;
c_7_2 += a_7*b_2;
c_7_3 += a_7*b_3;
c_7_4 += a_7*b_4;
c_7_5 += a_7*b_5;
c_7_6 += a_7*b_6;
c_7_7 += a_7*b_7;
c_7_8 += a_7*b_8;
c_7_9 += a_7*b_9;
c_7_10 += a_7*b_10;
c_8_0 += a_8*b_0;
c_8_1 += a_8*b_1;
c_8_2 += a_8*b_2;
c_8_3 += a_8*b_3;
c_8_4 += a_8*b_4;
c_8_5 += a_8*b_5;
c_8_6 += a_8*b_6;
c_8_7 += a_8*b_7;
c_8_8 += a_8*b_8;
c_8_9 += a_8*b_9;
c_8_10 += a_8*b_10;
c_9_0 += a_9*b_0;
c_9_1 += a_9*b_1;
c_9_2 += a_9*b_2;
c_9_3 += a_9*b_3;
c_9_4 += a_9*b_4;
c_9_5 += a_9*b_5;
c_9_6 += a_9*b_6;
c_9_7 += a_9*b_7;
c_9_8 += a_9*b_8;
c_9_9 += a_9*b_9;
c_9_10 += a_9*b_10;
c_10_0 += a_10*b_0;
c_10_1 += a_10*b_1;
c_10_2 += a_10*b_2;
c_10_3 += a_10*b_3;
c_10_4 += a_10*b_4;
c_10_5 += a_10*b_5;
c_10_6 += a_10*b_6;
c_10_7 += a_10*b_7;
c_10_8 += a_10*b_8;
c_10_9 += a_10*b_9;
c_10_10 += a_10*b_10;
a_0 = a_0*1.1f+1.7f;
a_1 = a_1*1.1f+1.7f;
a_2 = a_2*1.1f+1.7f;
a_3 = a_3*1.1f+1.7f;
a_4 = a_4*1.1f+1.7f;
a_5 = a_5*1.1f+1.7f;
a_6 = a_6*1.1f+1.7f;
a_7 = a_7*1.1f+1.7f;
a_8 = a_8*1.1f+1.7f;
a_9 = a_9*1.1f+1.7f;
a_10 = a_10*1.1f+1.7f;
b_0 = b_0*1.1f+1.7f;
b_1 = b_1*1.1f+1.7f;
b_2 = b_2*1.1f+1.7f;
b_3 = b_3*1.1f+1.7f;
b_4 = b_4*1.1f+1.7f;
b_5 = b_5*1.1f+1.7f;
b_6 = b_6*1.1f+1.7f;
b_7 = b_7*1.1f+1.7f;
b_8 = b_8*1.1f+1.7f;
b_9 = b_9*1.1f+1.7f;
b_10 = b_10*1.1f+1.7f;
}
C[(A_start_index+0)*C_width + B_start_index+0] = c_0_0;
C[(A_start_index+0)*C_width + B_start_index+1] = c_0_1;
C[(A_start_index+0)*C_width + B_start_index+2] = c_0_2;
C[(A_start_index+0)*C_width + B_start_index+3] = c_0_3;
C[(A_start_index+0)*C_width + B_start_index+4] = c_0_4;
C[(A_start_index+0)*C_width + B_start_index+5] = c_0_5;
C[(A_start_index+0)*C_width + B_start_index+6] = c_0_6;
C[(A_start_index+0)*C_width + B_start_index+7] = c_0_7;
C[(A_start_index+0)*C_width + B_start_index+8] = c_0_8;
C[(A_start_index+0)*C_width + B_start_index+9] = c_0_9;
C[(A_start_index+0)*C_width + B_start_index+10] = c_0_10;
C[(A_start_index+1)*C_width + B_start_index+0] = c_1_0;
C[(A_start_index+1)*C_width + B_start_index+1] = c_1_1;
C[(A_start_index+1)*C_width + B_start_index+2] = c_1_2;
C[(A_start_index+1)*C_width + B_start_index+3] = c_1_3;
C[(A_start_index+1)*C_width + B_start_index+4] = c_1_4;
C[(A_start_index+1)*C_width + B_start_index+5] = c_1_5;
C[(A_start_index+1)*C_width + B_start_index+6] = c_1_6;
C[(A_start_index+1)*C_width + B_start_index+7] = c_1_7;
C[(A_start_index+1)*C_width + B_start_index+8] = c_1_8;
C[(A_start_index+1)*C_width + B_start_index+9] = c_1_9;
C[(A_start_index+1)*C_width + B_start_index+10] = c_1_10;
C[(A_start_index+2)*C_width + B_start_index+0] = c_2_0;
C[(A_start_index+2)*C_width + B_start_index+1] = c_2_1;
C[(A_start_index+2)*C_width + B_start_index+2] = c_2_2;
C[(A_start_index+2)*C_width + B_start_index+3] = c_2_3;
C[(A_start_index+2)*C_width + B_start_index+4] = c_2_4;
C[(A_start_index+2)*C_width + B_start_index+5] = c_2_5;
C[(A_start_index+2)*C_width + B_start_index+6] = c_2_6;
C[(A_start_index+2)*C_width + B_start_index+7] = c_2_7;
C[(A_start_index+2)*C_width + B_start_index+8] = c_2_8;
C[(A_start_index+2)*C_width + B_start_index+9] = c_2_9;
C[(A_start_index+2)*C_width + B_start_index+10] = c_2_10;
C[(A_start_index+3)*C_width + B_start_index+0] = c_3_0;
C[(A_start_index+3)*C_width + B_start_index+1] = c_3_1;
C[(A_start_index+3)*C_width + B_start_index+2] = c_3_2;
C[(A_start_index+3)*C_width + B_start_index+3] = c_3_3;
C[(A_start_index+3)*C_width + B_start_index+4] = c_3_4;
C[(A_start_index+3)*C_width + B_start_index+5] = c_3_5;
C[(A_start_index+3)*C_width + B_start_index+6] = c_3_6;
C[(A_start_index+3)*C_width + B_start_index+7] = c_3_7;
C[(A_start_index+3)*C_width + B_start_index+8] = c_3_8;
C[(A_start_index+3)*C_width + B_start_index+9] = c_3_9;
C[(A_start_index+3)*C_width + B_start_index+10] = c_3_10;
C[(A_start_index+4)*C_width + B_start_index+0] = c_4_0;
C[(A_start_index+4)*C_width + B_start_index+1] = c_4_1;
C[(A_start_index+4)*C_width + B_start_index+2] = c_4_2;
C[(A_start_index+4)*C_width + B_start_index+3] = c_4_3;
C[(A_start_index+4)*C_width + B_start_index+4] = c_4_4;
C[(A_start_index+4)*C_width + B_start_index+5] = c_4_5;
C[(A_start_index+4)*C_width + B_start_index+6] = c_4_6;
C[(A_start_index+4)*C_width + B_start_index+7] = c_4_7;
C[(A_start_index+4)*C_width + B_start_index+8] = c_4_8;
C[(A_start_index+4)*C_width + B_start_index+9] = c_4_9;
C[(A_start_index+4)*C_width + B_start_index+10] = c_4_10;
C[(A_start_index+5)*C_width + B_start_index+0] = c_5_0;
C[(A_start_index+5)*C_width + B_start_index+1] = c_5_1;
C[(A_start_index+5)*C_width + B_start_index+2] = c_5_2;
C[(A_start_index+5)*C_width + B_start_index+3] = c_5_3;
C[(A_start_index+5)*C_width + B_start_index+4] = c_5_4;
C[(A_start_index+5)*C_width + B_start_index+5] = c_5_5;
C[(A_start_index+5)*C_width + B_start_index+6] = c_5_6;
C[(A_start_index+5)*C_width + B_start_index+7] = c_5_7;
C[(A_start_index+5)*C_width + B_start_index+8] = c_5_8;
C[(A_start_index+5)*C_width + B_start_index+9] = c_5_9;
C[(A_start_index+5)*C_width + B_start_index+10] = c_5_10;
C[(A_start_index+6)*C_width + B_start_index+0] = c_6_0;
C[(A_start_index+6)*C_width + B_start_index+1] = c_6_1;
C[(A_start_index+6)*C_width + B_start_index+2] = c_6_2;
C[(A_start_index+6)*C_width + B_start_index+3] = c_6_3;
C[(A_start_index+6)*C_width + B_start_index+4] = c_6_4;
C[(A_start_index+6)*C_width + B_start_index+5] = c_6_5;
C[(A_start_index+6)*C_width + B_start_index+6] = c_6_6;
C[(A_start_index+6)*C_width + B_start_index+7] = c_6_7;
C[(A_start_index+6)*C_width + B_start_index+8] = c_6_8;
C[(A_start_index+6)*C_width + B_start_index+9] = c_6_9;
C[(A_start_index+6)*C_width + B_start_index+10] = c_6_10;
C[(A_start_index+7)*C_width + B_start_index+0] = c_7_0;
C[(A_start_index+7)*C_width + B_start_index+1] = c_7_1;
C[(A_start_index+7)*C_width + B_start_index+2] = c_7_2;
C[(A_start_index+7)*C_width + B_start_index+3] = c_7_3;
C[(A_start_index+7)*C_width + B_start_index+4] = c_7_4;
C[(A_start_index+7)*C_width + B_start_index+5] = c_7_5;
C[(A_start_index+7)*C_width + B_start_index+6] = c_7_6;
C[(A_start_index+7)*C_width + B_start_index+7] = c_7_7;
C[(A_start_index+7)*C_width + B_start_index+8] = c_7_8;
C[(A_start_index+7)*C_width + B_start_index+9] = c_7_9;
C[(A_start_index+7)*C_width + B_start_index+10] = c_7_10;
C[(A_start_index+8)*C_width + B_start_index+0] = c_8_0;
C[(A_start_index+8)*C_width + B_start_index+1] = c_8_1;
C[(A_start_index+8)*C_width + B_start_index+2] = c_8_2;
C[(A_start_index+8)*C_width + B_start_index+3] = c_8_3;
C[(A_start_index+8)*C_width + B_start_index+4] = c_8_4;
C[(A_start_index+8)*C_width + B_start_index+5] = c_8_5;
C[(A_start_index+8)*C_width + B_start_index+6] = c_8_6;
C[(A_start_index+8)*C_width + B_start_index+7] = c_8_7;
C[(A_start_index+8)*C_width + B_start_index+8] = c_8_8;
C[(A_start_index+8)*C_width + B_start_index+9] = c_8_9;
C[(A_start_index+8)*C_width + B_start_index+10] = c_8_10;
C[(A_start_index+9)*C_width + B_start_index+0] = c_9_0;
C[(A_start_index+9)*C_width + B_start_index+1] = c_9_1;
C[(A_start_index+9)*C_width + B_start_index+2] = c_9_2;
C[(A_start_index+9)*C_width + B_start_index+3] = c_9_3;
C[(A_start_index+9)*C_width + B_start_index+4] = c_9_4;
C[(A_start_index+9)*C_width + B_start_index+5] = c_9_5;
C[(A_start_index+9)*C_width + B_start_index+6] = c_9_6;
C[(A_start_index+9)*C_width + B_start_index+7] = c_9_7;
C[(A_start_index+9)*C_width + B_start_index+8] = c_9_8;
C[(A_start_index+9)*C_width + B_start_index+9] = c_9_9;
C[(A_start_index+9)*C_width + B_start_index+10] = c_9_10;
C[(A_start_index+10)*C_width + B_start_index+0] = c_10_0;
C[(A_start_index+10)*C_width + B_start_index+1] = c_10_1;
C[(A_start_index+10)*C_width + B_start_index+2] = c_10_2;
C[(A_start_index+10)*C_width + B_start_index+3] = c_10_3;
C[(A_start_index+10)*C_width + B_start_index+4] = c_10_4;
C[(A_start_index+10)*C_width + B_start_index+5] = c_10_5;
C[(A_start_index+10)*C_width + B_start_index+6] = c_10_6;
C[(A_start_index+10)*C_width + B_start_index+7] = c_10_7;
C[(A_start_index+10)*C_width + B_start_index+8] = c_10_8;
C[(A_start_index+10)*C_width + B_start_index+9] = c_10_9;
C[(A_start_index+10)*C_width + B_start_index+10] = c_10_10;
}
|
b1af02ea6be5dd3494e39c09e5cb0774cdd9e1f6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
extern "C"
__global__ void add_scalar_float(int n, int idx,float dx,float *dy,int incy,float *result) {
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) {
if(i>= idx && i % incy == 0)
result[i] = dy[i] + dx;
}
} | b1af02ea6be5dd3494e39c09e5cb0774cdd9e1f6.cu | #include "includes.h"
extern "C"
__global__ void add_scalar_float(int n, int idx,float dx,float *dy,int incy,float *result) {
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) {
if(i>= idx && i % incy == 0)
result[i] = dy[i] + dx;
}
} |
2aafea62a1e77a9255df71110a2147ef694dc71a.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright (C) 2019-2021 Megvii Inc. All rights reserved. */
#include <math.h>
#include <thread>
#include <vector>
#include <deque>
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <hip/hip_runtime.h>
#include <ATen/ATen.h>
#include <ATen/hip/HIPContext.h>
#include <THH/THH.h>
#include <THH/THHAtomics.cuh>
#include <THH/THHDeviceUtils.cuh>
#define CUDA_NUM_THREADS 64
#define GET_CUDA_BLOCKS(N) ceil((float)N / CUDA_NUM_THREADS)
__global__ void adj_vec_kernel(
int batch_size,
int * edge_index,
int vertex_count,
int * adj_vec,
int * adj_vec_len,
int max_adj_per_node){
const int edge_count = vertex_count - 1;
const int batch_idx = blockIdx.x;
const int thread_idx = threadIdx.x;
const int thread_count = blockDim.x;
edge_index += batch_idx * edge_count * 2;
adj_vec += batch_idx * vertex_count * max_adj_per_node;
adj_vec_len += batch_idx * vertex_count;
for (int i = thread_idx; i < edge_count; i += thread_count){
int source = edge_index[2 * i];
int target = edge_index[2 * i + 1];
int source_len = atomicAdd(&(adj_vec_len[source]), 1);
adj_vec[source * max_adj_per_node + source_len] = target;
int target_len = atomicAdd(&(adj_vec_len[target]), 1);
adj_vec[target * max_adj_per_node + target_len] = source;
}
}
__global__ void breadth_first_sort_kernel(
int * sorted_index,
int * sorted_parent_index,
int * sorted_child_index,
int * adj_vec,
int * adj_vec_len,
int * parent_index,
int batch_size,
int vertex_count,
int max_adj_per_node){
const int batch_idx = blockIdx.x;
const int thread_idx = threadIdx.x;
const int thread_count = blockDim.x;
adj_vec += batch_idx * vertex_count * max_adj_per_node;
adj_vec_len += batch_idx * vertex_count;
parent_index += batch_idx * vertex_count;
sorted_index += batch_idx * vertex_count;
sorted_parent_index += batch_idx * vertex_count;
sorted_child_index += batch_idx * vertex_count * max_adj_per_node;
__shared__ int sorted_len;
if (thread_idx == 0) {
sorted_len = 1;
parent_index[0] = 0;
sorted_index[0] = 0;
sorted_parent_index[0] = 0;
}
__syncthreads();
int i = thread_idx;
while (i < vertex_count){
if ((sorted_index[i] > 0) || (i == 0)){
int child_index = 0;
int par = parent_index[i];
int cur = sorted_index[i];
for (int j = 0; j < adj_vec_len[cur]; j++){
int child = adj_vec[cur * max_adj_per_node + j];
if (child != par){
int pos = atomicAdd(&(sorted_len), 1);
sorted_index[pos] = child;
parent_index[pos] = cur;
sorted_parent_index[pos] = i;
sorted_child_index[i * max_adj_per_node + child_index] = pos;
child_index++;
}
}
i += thread_count;
}
__syncthreads();
}
}
std::tuple<at::Tensor, at::Tensor, at::Tensor>
bfs_forward(
const at::Tensor & edge_index_tensor,
int max_adj_per_node){
int batch_size = edge_index_tensor.size(0);
int vertex_count = edge_index_tensor.size(1) + 1;
auto options = edge_index_tensor.options();
auto sorted_index_tensor = at::zeros({batch_size, vertex_count}, options);
auto sorted_parent_tensor = at::zeros({batch_size, vertex_count}, options);
auto sorted_child_tensor = at::zeros({batch_size, vertex_count, max_adj_per_node}, options);
auto adj_vec_tensor = at::zeros({batch_size, vertex_count, max_adj_per_node}, options);
auto adj_vec_len_tensor = at::zeros({batch_size, vertex_count}, options);
auto parent_index_tensor = at::zeros({batch_size, vertex_count}, options);
int * edge_index = edge_index_tensor.contiguous().data_ptr<int>();
int * sorted_index = sorted_index_tensor.contiguous().data_ptr<int>();
int * sorted_parent = sorted_parent_tensor.contiguous().data_ptr<int>();
int * sorted_child = sorted_child_tensor.contiguous().data_ptr<int>();
int * adj_vec = adj_vec_tensor.contiguous().data_ptr<int>();
int * adj_vec_len = adj_vec_len_tensor.contiguous().data_ptr<int>();
int * parent_index = parent_index_tensor.contiguous().data_ptr<int>();
hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
dim3 block_dims(CUDA_NUM_THREADS, 1, 1), grid_dims(batch_size, 1, 1);
hipLaunchKernelGGL(( adj_vec_kernel) , dim3(grid_dims), dim3(block_dims), 0, stream ,
batch_size, edge_index, vertex_count, adj_vec, adj_vec_len, max_adj_per_node);
hipLaunchKernelGGL(( breadth_first_sort_kernel) , dim3(grid_dims), dim3(block_dims), 1, stream ,
sorted_index, sorted_parent, sorted_child, adj_vec, adj_vec_len, parent_index,
batch_size, vertex_count, max_adj_per_node);
return std::make_tuple(sorted_index_tensor, sorted_parent_tensor, sorted_child_tensor);
}
| 2aafea62a1e77a9255df71110a2147ef694dc71a.cu | /* Copyright (C) 2019-2021 Megvii Inc. All rights reserved. */
#include <math.h>
#include <thread>
#include <vector>
#include <deque>
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <cuda_runtime.h>
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <THC/THC.h>
#include <THC/THCAtomics.cuh>
#include <THC/THCDeviceUtils.cuh>
#define CUDA_NUM_THREADS 64
#define GET_CUDA_BLOCKS(N) ceil((float)N / CUDA_NUM_THREADS)
__global__ void adj_vec_kernel(
int batch_size,
int * edge_index,
int vertex_count,
int * adj_vec,
int * adj_vec_len,
int max_adj_per_node){
const int edge_count = vertex_count - 1;
const int batch_idx = blockIdx.x;
const int thread_idx = threadIdx.x;
const int thread_count = blockDim.x;
edge_index += batch_idx * edge_count * 2;
adj_vec += batch_idx * vertex_count * max_adj_per_node;
adj_vec_len += batch_idx * vertex_count;
for (int i = thread_idx; i < edge_count; i += thread_count){
int source = edge_index[2 * i];
int target = edge_index[2 * i + 1];
int source_len = atomicAdd(&(adj_vec_len[source]), 1);
adj_vec[source * max_adj_per_node + source_len] = target;
int target_len = atomicAdd(&(adj_vec_len[target]), 1);
adj_vec[target * max_adj_per_node + target_len] = source;
}
}
__global__ void breadth_first_sort_kernel(
int * sorted_index,
int * sorted_parent_index,
int * sorted_child_index,
int * adj_vec,
int * adj_vec_len,
int * parent_index,
int batch_size,
int vertex_count,
int max_adj_per_node){
const int batch_idx = blockIdx.x;
const int thread_idx = threadIdx.x;
const int thread_count = blockDim.x;
adj_vec += batch_idx * vertex_count * max_adj_per_node;
adj_vec_len += batch_idx * vertex_count;
parent_index += batch_idx * vertex_count;
sorted_index += batch_idx * vertex_count;
sorted_parent_index += batch_idx * vertex_count;
sorted_child_index += batch_idx * vertex_count * max_adj_per_node;
__shared__ int sorted_len;
if (thread_idx == 0) {
sorted_len = 1;
parent_index[0] = 0;
sorted_index[0] = 0;
sorted_parent_index[0] = 0;
}
__syncthreads();
int i = thread_idx;
while (i < vertex_count){
if ((sorted_index[i] > 0) || (i == 0)){
int child_index = 0;
int par = parent_index[i];
int cur = sorted_index[i];
for (int j = 0; j < adj_vec_len[cur]; j++){
int child = adj_vec[cur * max_adj_per_node + j];
if (child != par){
int pos = atomicAdd(&(sorted_len), 1);
sorted_index[pos] = child;
parent_index[pos] = cur;
sorted_parent_index[pos] = i;
sorted_child_index[i * max_adj_per_node + child_index] = pos;
child_index++;
}
}
i += thread_count;
}
__syncthreads();
}
}
std::tuple<at::Tensor, at::Tensor, at::Tensor>
bfs_forward(
const at::Tensor & edge_index_tensor,
int max_adj_per_node){
int batch_size = edge_index_tensor.size(0);
int vertex_count = edge_index_tensor.size(1) + 1;
auto options = edge_index_tensor.options();
auto sorted_index_tensor = at::zeros({batch_size, vertex_count}, options);
auto sorted_parent_tensor = at::zeros({batch_size, vertex_count}, options);
auto sorted_child_tensor = at::zeros({batch_size, vertex_count, max_adj_per_node}, options);
auto adj_vec_tensor = at::zeros({batch_size, vertex_count, max_adj_per_node}, options);
auto adj_vec_len_tensor = at::zeros({batch_size, vertex_count}, options);
auto parent_index_tensor = at::zeros({batch_size, vertex_count}, options);
int * edge_index = edge_index_tensor.contiguous().data_ptr<int>();
int * sorted_index = sorted_index_tensor.contiguous().data_ptr<int>();
int * sorted_parent = sorted_parent_tensor.contiguous().data_ptr<int>();
int * sorted_child = sorted_child_tensor.contiguous().data_ptr<int>();
int * adj_vec = adj_vec_tensor.contiguous().data_ptr<int>();
int * adj_vec_len = adj_vec_len_tensor.contiguous().data_ptr<int>();
int * parent_index = parent_index_tensor.contiguous().data_ptr<int>();
cudaStream_t stream = at::cuda::getCurrentCUDAStream();
dim3 block_dims(CUDA_NUM_THREADS, 1, 1), grid_dims(batch_size, 1, 1);
adj_vec_kernel <<< grid_dims, block_dims, 0, stream >>>(
batch_size, edge_index, vertex_count, adj_vec, adj_vec_len, max_adj_per_node);
breadth_first_sort_kernel <<< grid_dims, block_dims, 1, stream >>>(
sorted_index, sorted_parent, sorted_child, adj_vec, adj_vec_len, parent_index,
batch_size, vertex_count, max_adj_per_node);
return std::make_tuple(sorted_index_tensor, sorted_parent_tensor, sorted_child_tensor);
}
|
d171b9699822bb94e5288e536491114f5930db01.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "BC_GPU.cuh"
// changeable for performance
#define VIRTUAL_WARP 16
__global__ void betweenness_node_succ_kernel(float *BC, int * r, int * edge_begin, int *edge_end, int * dist, float * sigma, float * delta, int * S, int * S_end, int numVertices, int numEdges, int offset_source)
{
int offset_vertices = blockIdx.x * numVertices;
int offset_edge = blockIdx.x * numEdges;
for (int i = threadIdx.x; i < numVertices; i += blockDim.x)
{
dist[offset_vertices + i] = -1;
sigma[offset_vertices + i] = 0;
delta[offset_vertices + i] = 0;
S_end[offset_vertices + i] = r[i];
}
for (int i = threadIdx.x; i < numEdges; i += blockDim.x)
{
S[offset_edge + i] = 0;
}
int source = blockIdx.x + offset_source;
if (source >= numVertices)
return;
__shared__ bool done;
done = false;
int level = 0;
dist[offset_vertices + source] = level++;
sigma[offset_vertices + source ] = 1;
while (!done)
{
__syncthreads(); // attention: this sync is neccessary
done = true;
for (int edge = threadIdx.x; edge < numEdges; edge += blockDim.x)
{
int current = edge_begin[edge];
if (dist[offset_vertices + current] != level - 1)
continue;
int next = edge_end[edge];
int read_dist = dist[offset_vertices + next];
if (read_dist == -1)
{
dist[offset_vertices + next] = level;
done = false;
}
if (read_dist < level && read_dist >= 0)
continue;
atomicAdd(sigma + offset_vertices + next, sigma[offset_vertices + current]); //atomic!
int p = atomicAdd(S_end + offset_vertices + current, 1);
S[offset_edge + p] = next;
}
level ++;
__syncthreads();
}
for (int i = level - 2; i >= 0; i--)
{
for (int current = threadIdx.x; current < numVertices; current += blockDim.x)
{
if (dist[offset_vertices + current] != i)
continue;
for (int j = r[current]; j < S_end[offset_vertices + current]; j += 1)
{
int next = S[offset_edge + j];
delta[offset_vertices + current]+=(double) sigma[offset_vertices + current] / sigma[offset_vertices + next]*(1 + delta[offset_vertices + next]);
}
}
__syncthreads();
}
for (int current = threadIdx.x; current < numVertices; current += blockDim.x)
{
if(current != source)
atomicAdd(BC + current, delta[offset_vertices + current]);
}
}
void Betweenness_GPU_edge_succ(int *r, int *r_full, int *c, int numVertices, int numEdges, float *BC, int grid, int thread)
{
int devID;
hipDeviceProp_t deviceProps;
devID = findCudaDevice();
// get number of SMs on this GPU
checkCudaErrors(hipGetDeviceProperties(&deviceProps, devID));
printf("CUDA device [%s] has %d Multi-Processors\n", deviceProps.name, deviceProps.multiProcessorCount);
//int thread = 256;
//int grid = 100;
// allocate device memory
int* d_r;
int* d_c;
int* d_r_full;
int* dist;
float* sigma;
float* delta;
int* P;
int* P_end;
checkCudaErrors( hipMalloc( (void**) &d_r, sizeof(int) * (numVertices + 1)));
checkCudaErrors( hipMalloc( (void**) &d_r_full, sizeof(int) * numEdges));
checkCudaErrors( hipMalloc( (void**) &d_c, sizeof(int) * numEdges));
checkCudaErrors( hipMalloc( (void**) &dist, sizeof(int) * numVertices * grid));
checkCudaErrors( hipMalloc( (void**) &sigma, sizeof(int) * numVertices * grid));
checkCudaErrors( hipMalloc( (void**) &delta, sizeof(int) * numVertices * grid));
checkCudaErrors( hipMalloc( (void**) &P, sizeof(int) * numEdges * grid));
checkCudaErrors( hipMalloc( (void**) &P_end, sizeof(int) * numVertices * grid));
// copy host memory to device
checkCudaErrors( hipMemcpy( d_r, r, sizeof(int) * (numVertices + 1), hipMemcpyHostToDevice) );
checkCudaErrors( hipMemcpy( d_c, c, sizeof(int) * numEdges, hipMemcpyHostToDevice) );
checkCudaErrors( hipMemcpy( d_r_full, r_full, sizeof(int) * numEdges, hipMemcpyHostToDevice) );
// allocate device memory for result
float* d_BC;
checkCudaErrors( hipMalloc( (void**) &d_BC, sizeof(float) * numVertices));
checkCudaErrors( hipMemset( d_BC, 0, sizeof(float) * numVertices));
// execute the kernel
clock_t kernel_time = 0;
for (int offset_source = 0; offset_source < numVertices; offset_source += grid)
{
clock_t time = clock();
hipLaunchKernelGGL(( betweenness_node_succ_kernel), dim3(grid), dim3(thread), 0, 0, d_BC, d_r, d_r_full, d_c, dist, sigma, delta, P, P_end, numVertices, numEdges, offset_source);
// check if kernel execution generated and error
getLastCudaError("Kernel execution failed");
hipDeviceSynchronize();
time = clock() - time;
kernel_time += time;
cout<<offset_source<<" done. Time = "<<time<<"ms."<<endl;
}
cout<<"total kernel time: "<<kernel_time<<"ms."<<endl;
// copy result from device to host
checkCudaErrors(hipMemcpy(BC, d_BC, sizeof(float) * numVertices, hipMemcpyDeviceToHost));
// cleanup memory
checkCudaErrors(hipFree(d_r));
checkCudaErrors(hipFree(d_r_full));
checkCudaErrors(hipFree(d_c));
checkCudaErrors(hipFree(d_BC));
checkCudaErrors(hipFree(dist));
checkCudaErrors(hipFree(sigma));
checkCudaErrors(hipFree(delta));
checkCudaErrors(hipFree(P));
checkCudaErrors(hipFree(P_end));
hipDeviceReset();
}
| d171b9699822bb94e5288e536491114f5930db01.cu | #include "BC_GPU.cuh"
// changeable for performance
#define VIRTUAL_WARP 16
__global__ void betweenness_node_succ_kernel(float *BC, int * r, int * edge_begin, int *edge_end, int * dist, float * sigma, float * delta, int * S, int * S_end, int numVertices, int numEdges, int offset_source)
{
int offset_vertices = blockIdx.x * numVertices;
int offset_edge = blockIdx.x * numEdges;
for (int i = threadIdx.x; i < numVertices; i += blockDim.x)
{
dist[offset_vertices + i] = -1;
sigma[offset_vertices + i] = 0;
delta[offset_vertices + i] = 0;
S_end[offset_vertices + i] = r[i];
}
for (int i = threadIdx.x; i < numEdges; i += blockDim.x)
{
S[offset_edge + i] = 0;
}
int source = blockIdx.x + offset_source;
if (source >= numVertices)
return;
__shared__ bool done;
done = false;
int level = 0;
dist[offset_vertices + source] = level++;
sigma[offset_vertices + source ] = 1;
while (!done)
{
__syncthreads(); // attention: this sync is neccessary
done = true;
for (int edge = threadIdx.x; edge < numEdges; edge += blockDim.x)
{
int current = edge_begin[edge];
if (dist[offset_vertices + current] != level - 1)
continue;
int next = edge_end[edge];
int read_dist = dist[offset_vertices + next];
if (read_dist == -1)
{
dist[offset_vertices + next] = level;
done = false;
}
if (read_dist < level && read_dist >= 0)
continue;
atomicAdd(sigma + offset_vertices + next, sigma[offset_vertices + current]); //atomic!
int p = atomicAdd(S_end + offset_vertices + current, 1);
S[offset_edge + p] = next;
}
level ++;
__syncthreads();
}
for (int i = level - 2; i >= 0; i--)
{
for (int current = threadIdx.x; current < numVertices; current += blockDim.x)
{
if (dist[offset_vertices + current] != i)
continue;
for (int j = r[current]; j < S_end[offset_vertices + current]; j += 1)
{
int next = S[offset_edge + j];
delta[offset_vertices + current]+=(double) sigma[offset_vertices + current] / sigma[offset_vertices + next]*(1 + delta[offset_vertices + next]);
}
}
__syncthreads();
}
for (int current = threadIdx.x; current < numVertices; current += blockDim.x)
{
if(current != source)
atomicAdd(BC + current, delta[offset_vertices + current]);
}
}
void Betweenness_GPU_edge_succ(int *r, int *r_full, int *c, int numVertices, int numEdges, float *BC, int grid, int thread)
{
int devID;
cudaDeviceProp deviceProps;
devID = findCudaDevice();
// get number of SMs on this GPU
checkCudaErrors(cudaGetDeviceProperties(&deviceProps, devID));
printf("CUDA device [%s] has %d Multi-Processors\n", deviceProps.name, deviceProps.multiProcessorCount);
//int thread = 256;
//int grid = 100;
// allocate device memory
int* d_r;
int* d_c;
int* d_r_full;
int* dist;
float* sigma;
float* delta;
int* P;
int* P_end;
checkCudaErrors( cudaMalloc( (void**) &d_r, sizeof(int) * (numVertices + 1)));
checkCudaErrors( cudaMalloc( (void**) &d_r_full, sizeof(int) * numEdges));
checkCudaErrors( cudaMalloc( (void**) &d_c, sizeof(int) * numEdges));
checkCudaErrors( cudaMalloc( (void**) &dist, sizeof(int) * numVertices * grid));
checkCudaErrors( cudaMalloc( (void**) &sigma, sizeof(int) * numVertices * grid));
checkCudaErrors( cudaMalloc( (void**) &delta, sizeof(int) * numVertices * grid));
checkCudaErrors( cudaMalloc( (void**) &P, sizeof(int) * numEdges * grid));
checkCudaErrors( cudaMalloc( (void**) &P_end, sizeof(int) * numVertices * grid));
// copy host memory to device
checkCudaErrors( cudaMemcpy( d_r, r, sizeof(int) * (numVertices + 1), cudaMemcpyHostToDevice) );
checkCudaErrors( cudaMemcpy( d_c, c, sizeof(int) * numEdges, cudaMemcpyHostToDevice) );
checkCudaErrors( cudaMemcpy( d_r_full, r_full, sizeof(int) * numEdges, cudaMemcpyHostToDevice) );
// allocate device memory for result
float* d_BC;
checkCudaErrors( cudaMalloc( (void**) &d_BC, sizeof(float) * numVertices));
checkCudaErrors( cudaMemset( d_BC, 0, sizeof(float) * numVertices));
// execute the kernel
clock_t kernel_time = 0;
for (int offset_source = 0; offset_source < numVertices; offset_source += grid)
{
clock_t time = clock();
betweenness_node_succ_kernel<<<grid, thread>>>(d_BC, d_r, d_r_full, d_c, dist, sigma, delta, P, P_end, numVertices, numEdges, offset_source);
// check if kernel execution generated and error
getLastCudaError("Kernel execution failed");
cudaThreadSynchronize();
time = clock() - time;
kernel_time += time;
cout<<offset_source<<" done. Time = "<<time<<"ms."<<endl;
}
cout<<"total kernel time: "<<kernel_time<<"ms."<<endl;
// copy result from device to host
checkCudaErrors(cudaMemcpy(BC, d_BC, sizeof(float) * numVertices, cudaMemcpyDeviceToHost));
// cleanup memory
checkCudaErrors(cudaFree(d_r));
checkCudaErrors(cudaFree(d_r_full));
checkCudaErrors(cudaFree(d_c));
checkCudaErrors(cudaFree(d_BC));
checkCudaErrors(cudaFree(dist));
checkCudaErrors(cudaFree(sigma));
checkCudaErrors(cudaFree(delta));
checkCudaErrors(cudaFree(P));
checkCudaErrors(cudaFree(P_end));
cudaDeviceReset();
}
|
77ef63eb8e6b93594273182b15b4b09b0b2ac49a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0
// DeepSpeed Team
#include "conversion_utils.h"
#include "inference_cuda_layers.h"
#define MAX_QUANTIZE_GROUPING 1024
#define loop_unroll 1
#define loop_unroll_bits 1
template <typename T>
__global__ void dequantize_kernel(T* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count)
{
unsigned merge_hidden = hidden_dim >> merge_count;
unsigned quantization_stride = (merge_hidden * output_size) / groups;
unsigned bid = blockIdx.x;
unsigned tid = threadIdx.x;
while (tid < output_size) {
unsigned w_index = bid / merge_hidden;
unsigned q_index = tid + bid * output_size;
auto q = input[q_index];
unsigned merge_hidden_total = w_index * merge_hidden;
unsigned scale_index =
((((bid - merge_hidden_total) + tid * merge_hidden) / quantization_stride)
<< merge_count) +
w_index;
float scale_data = qscale[scale_index];
output[q_index] = conversion::to<T>(scale_data * (float)q);
tid += blockDim.x;
}
}
template <typename T>
void launch_dequantize(T* output,
const int8_t* input,
const float* qscale,
unsigned output_size,
unsigned hidden_dim,
unsigned groups,
unsigned merge_count,
hipStream_t stream)
{
unsigned threads = 1024;
dim3 block_dims(threads);
dim3 grid_dims(hidden_dim);
hipLaunchKernelGGL(( dequantize_kernel), dim3(grid_dims), dim3(block_dims), 0, stream,
output, input, qscale, output_size, hidden_dim, groups, merge_count);
}
template void launch_dequantize<float>(float*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
hipStream_t);
#ifdef BF16_AVAILABLE
template void launch_dequantize<__nv_bfloat16>(__nv_bfloat16*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
hipStream_t);
#endif
template void launch_dequantize<__half>(__half*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
hipStream_t);
__global__ void dequantize_kernel(float* output,
const int8_t* input,
const float* qscale,
int hidden_dim,
unsigned merge_hidden,
int cnt)
{
}
template <typename T>
__global__ void dequantize_kernel(T* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt)
{
unsigned bid = blockIdx.x * gridDim.y + blockIdx.y;
unsigned tid = threadIdx.x;
float local_scale = qscale[blockIdx.x];
const float* input_cast = reinterpret_cast<const float*>(input);
float2* output_cast = reinterpret_cast<float2*>(output);
input_cast += bid * merge_hidden;
output_cast += bid * merge_hidden;
for (int c = 0; c < cnt; c++) {
if (tid < merge_hidden) {
float q = input_cast[tid];
int8_t* q_int8 = (int8_t*)&q;
float2 q_f;
T* q_h = (T*)&q_f;
q_h[0] = conversion::to<T>(local_scale * (float)q_int8[0]);
q_h[1] = conversion::to<T>(local_scale * (float)q_int8[1]);
q_h[2] = conversion::to<T>(local_scale * (float)q_int8[2]);
q_h[3] = conversion::to<T>(local_scale * (float)q_int8[3]);
output_cast[tid] = q_f;
tid += blockDim.x;
}
}
}
template <typename T>
void launch_dequantize(T* output,
const int8_t* input,
const float* qscale,
unsigned output_size,
unsigned hidden_dim,
unsigned groups,
hipStream_t stream)
{
unsigned threads = 1024;
hidden_dim /= 4;
unsigned hid_cnt = threads / hidden_dim;
unsigned thd_cnt = (hidden_dim - 1) / threads + 1;
hid_cnt = hid_cnt > 0 ? hid_cnt : 1;
unsigned blocks = (output_size + hid_cnt * groups - 1) / (hid_cnt * groups);
dim3 block_dims(threads);
dim3 grid_dims(groups, blocks);
hipLaunchKernelGGL(( dequantize_kernel), dim3(grid_dims), dim3(block_dims), 0, stream,
output, input, qscale, hidden_dim, hid_cnt * hidden_dim, thd_cnt);
}
template void launch_dequantize<float>(float*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
hipStream_t);
#ifdef BF16_AVAILABLE
template void launch_dequantize<__nv_bfloat16>(__nv_bfloat16*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
hipStream_t);
#endif
template void launch_dequantize<__half>(__half*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
hipStream_t);
template __global__ void dequantize_kernel(float* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#ifdef BF16_AVAILABLE
template __global__ void dequantize_kernel(__nv_bfloat16* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#endif
template __global__ void dequantize_kernel(__half* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#ifdef BF16_AVAILABLE
template __global__ void dequantize_kernel(__nv_bfloat16* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt);
#endif
template __global__ void dequantize_kernel(__half* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt);
| 77ef63eb8e6b93594273182b15b4b09b0b2ac49a.cu | // Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0
// DeepSpeed Team
#include "conversion_utils.h"
#include "inference_cuda_layers.h"
#define MAX_QUANTIZE_GROUPING 1024
#define loop_unroll 1
#define loop_unroll_bits 1
template <typename T>
__global__ void dequantize_kernel(T* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count)
{
unsigned merge_hidden = hidden_dim >> merge_count;
unsigned quantization_stride = (merge_hidden * output_size) / groups;
unsigned bid = blockIdx.x;
unsigned tid = threadIdx.x;
while (tid < output_size) {
unsigned w_index = bid / merge_hidden;
unsigned q_index = tid + bid * output_size;
auto q = input[q_index];
unsigned merge_hidden_total = w_index * merge_hidden;
unsigned scale_index =
((((bid - merge_hidden_total) + tid * merge_hidden) / quantization_stride)
<< merge_count) +
w_index;
float scale_data = qscale[scale_index];
output[q_index] = conversion::to<T>(scale_data * (float)q);
tid += blockDim.x;
}
}
template <typename T>
void launch_dequantize(T* output,
const int8_t* input,
const float* qscale,
unsigned output_size,
unsigned hidden_dim,
unsigned groups,
unsigned merge_count,
cudaStream_t stream)
{
unsigned threads = 1024;
dim3 block_dims(threads);
dim3 grid_dims(hidden_dim);
dequantize_kernel<<<grid_dims, block_dims, 0, stream>>>(
output, input, qscale, output_size, hidden_dim, groups, merge_count);
}
template void launch_dequantize<float>(float*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
cudaStream_t);
#ifdef BF16_AVAILABLE
template void launch_dequantize<__nv_bfloat16>(__nv_bfloat16*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
cudaStream_t);
#endif
template void launch_dequantize<__half>(__half*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
unsigned,
cudaStream_t);
__global__ void dequantize_kernel(float* output,
const int8_t* input,
const float* qscale,
int hidden_dim,
unsigned merge_hidden,
int cnt)
{
}
template <typename T>
__global__ void dequantize_kernel(T* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt)
{
unsigned bid = blockIdx.x * gridDim.y + blockIdx.y;
unsigned tid = threadIdx.x;
float local_scale = qscale[blockIdx.x];
const float* input_cast = reinterpret_cast<const float*>(input);
float2* output_cast = reinterpret_cast<float2*>(output);
input_cast += bid * merge_hidden;
output_cast += bid * merge_hidden;
for (int c = 0; c < cnt; c++) {
if (tid < merge_hidden) {
float q = input_cast[tid];
int8_t* q_int8 = (int8_t*)&q;
float2 q_f;
T* q_h = (T*)&q_f;
q_h[0] = conversion::to<T>(local_scale * (float)q_int8[0]);
q_h[1] = conversion::to<T>(local_scale * (float)q_int8[1]);
q_h[2] = conversion::to<T>(local_scale * (float)q_int8[2]);
q_h[3] = conversion::to<T>(local_scale * (float)q_int8[3]);
output_cast[tid] = q_f;
tid += blockDim.x;
}
}
}
template <typename T>
void launch_dequantize(T* output,
const int8_t* input,
const float* qscale,
unsigned output_size,
unsigned hidden_dim,
unsigned groups,
cudaStream_t stream)
{
unsigned threads = 1024;
hidden_dim /= 4;
unsigned hid_cnt = threads / hidden_dim;
unsigned thd_cnt = (hidden_dim - 1) / threads + 1;
hid_cnt = hid_cnt > 0 ? hid_cnt : 1;
unsigned blocks = (output_size + hid_cnt * groups - 1) / (hid_cnt * groups);
dim3 block_dims(threads);
dim3 grid_dims(groups, blocks);
dequantize_kernel<<<grid_dims, block_dims, 0, stream>>>(
output, input, qscale, hidden_dim, hid_cnt * hidden_dim, thd_cnt);
}
template void launch_dequantize<float>(float*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
cudaStream_t);
#ifdef BF16_AVAILABLE
template void launch_dequantize<__nv_bfloat16>(__nv_bfloat16*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
cudaStream_t);
#endif
template void launch_dequantize<__half>(__half*,
const int8_t*,
const float*,
unsigned,
unsigned,
unsigned,
cudaStream_t);
template __global__ void dequantize_kernel(float* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#ifdef BF16_AVAILABLE
template __global__ void dequantize_kernel(__nv_bfloat16* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#endif
template __global__ void dequantize_kernel(__half* output,
const int8_t* input,
const float* qscale,
int output_size,
int hidden_dim,
int groups,
int merge_count);
#ifdef BF16_AVAILABLE
template __global__ void dequantize_kernel(__nv_bfloat16* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt);
#endif
template __global__ void dequantize_kernel(__half* output,
const int8_t* input,
const float* qscale,
unsigned hidden_dim,
unsigned merge_hidden,
int cnt);
|
3329bf8c35b15a275173fcafdcaf43c0191d2ea7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "Macro.h"
#include "CUFLU.h"
#if ( defined GPU && MODEL == HYDRO && ( FLU_SCHEME == MHM || FLU_SCHEME == MHM_RP ) )
#include "CUFLU_Shared_FluUtility.cu"
#include "CUFLU_Shared_DataReconstruction.cu"
#include "CUFLU_Shared_ComputeFlux.cu"
#include "CUFLU_Shared_FullStepUpdate.cu"
#if ( RSOLVER == EXACT )
#include "CUFLU_Shared_RiemannSolver_Exact.cu"
#elif ( RSOLVER == ROE )
#include "CUFLU_Shared_RiemannSolver_Roe.cu"
#elif ( RSOLVER == HLLE )
#include "CUFLU_Shared_RiemannSolver_HLLE.cu"
#elif ( RSOLVER == HLLC )
#include "CUFLU_Shared_RiemannSolver_HLLC.cu"
#endif
#if ( FLU_SCHEME == MHM_RP )
static __device__ void CUFLU_RiemannPredict_Flux( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real Gamma );
static __device__ void CUFLU_RiemannPredict( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Var [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real dt, const real _dh, const real Gamma );
#endif
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_FluidSolver_MHM
// Description : GPU fluid solver based on the MUSCL-Hancock scheme
//
// Note : 1. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 2. The three-dimensional evolution is achieved by using the unsplit method
// 3. Two half-step prediction schemes are supported, including "MHM" and "MHM_RP"
// MHM : use interpolated face-centered values to calculate the half-step fluxes
// MHM_RP : use Riemann solver to calculate the half-step fluxes
// 4. Ref :
// MHM : "Riemann Solvers and Numerical Methods for Fluid Dynamics
// - A Practical Introduction ~ by Eleuterio F. Toro"
// MHM_RP : Stone & Gardiner, NewA, 14, 139 (2009)
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Fluid_Out : Global memory array to store the output fluid variables
// g_Flux : Global memory array to store the output fluxes
// g_PriVar : Global memory array to store the primitive variables
// g_Slope_PPM_x : Global memory array to store the x-slope for the PPM reconstruction
// g_Slope_PPM_y : Global memory array to store the y-slope for the PPM reconstruction
// g_Slope_PPM_z : Global memory array to store the z-slope for the PPM reconstruction
// g_FC_Var_xL : Global memory array to store the half-step variables on the -x surface
// g_FC_Var_xR : Global memory array to store the half-step variables on the +x surface
// g_FC_Var_yL : Global memory array to store the half-step variables on the -y surface
// g_FC_Var_yR : Global memory array to store the half-step variables on the +y surface
// g_FC_Var_zL : Global memory array to store the half-step variables on the -z surface
// g_FC_Var_zR : Global memory array to store the half-step variables on the +z surface
// g_FC_Flux_x : Global memory array to store the face-centered fluxes in the x direction
// g_FC_Flux_y : Global memory array to store the face-centered fluxes in the y direction
// g_FC_Flux_z : Global memory array to store the face-centered fluxes in the z direction
// dt : Time interval to advance solution
// _dh : 1 / grid size
// Gamma : Ratio of specific heats
// StoreFlux : true --> store the coarse-fine fluxes
// LR_Limiter : Slope limiter for the data reconstruction in the MHM/MHM_RP/CTU schemes
// (0/1/2/3/4) = (vanLeer/generalized MinMod/vanAlbada/
// vanLeer + generalized MinMod/extrema-preserving) limiter
// MinMod_Coeff : Coefficient of the generalized MinMod limiter
// EP_Coeff : Coefficient of the extrema-preserving limiter
//-------------------------------------------------------------------------------------------------------
__global__ void CUFLU_FluidSolver_MHM( const real g_Fluid_In[][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Fluid_Out [][5][ PS2*PS2*PS2 ],
real g_Flux [][9][5][ PS2*PS2 ],
real g_PriVar [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Slope_PPM_x[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_Slope_PPM_y[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_Slope_PPM_z[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_FC_Var_xL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_xR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_yL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_yR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_zL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_zR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Flux_x [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_FC_Flux_y [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_FC_Flux_z [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real dt, const real _dh, const real Gamma, const bool StoreFlux,
const LR_Limiter_t LR_Limiter, const real MinMod_Coeff,
const real EP_Coeff )
{
// 1. half-step prediction
# if ( FLU_SCHEME == MHM_RP ) // a. use Riemann solver to calculate the half-step fluxes
// use pointers to avoid redundant memory consumption
real (*const g_Half_Var) [5][ FLU_NXT*FLU_NXT*FLU_NXT ] = g_PriVar;
real (*const g_Half_Flux_x)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_x;
real (*const g_Half_Flux_y)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_y;
real (*const g_Half_Flux_z)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_z;
// (1.a-1) evaluate the face-centered half-step fluxes with the piecewise constant data reconstruction
CUFLU_RiemannPredict_Flux( g_Fluid_In, g_Half_Flux_x, g_Half_Flux_y, g_Half_Flux_z, Gamma );
__syncthreads();
// (1.a-2) evaluate the half-step cell-centered solution
CUFLU_RiemannPredict( g_Fluid_In, g_Half_Flux_x, g_Half_Flux_y, g_Half_Flux_z, g_Half_Var, dt, _dh, Gamma );
__syncthreads();
// (1.a-3) evaluate the half-step face-centered solution by data reconstruction
CUFLU_DataReconstruction( g_Half_Var, g_Slope_PPM_x, g_Slope_PPM_y, g_Slope_PPM_z, g_FC_Var_xL, g_FC_Var_xR,
g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR, N_HF_VAR, FLU_GHOST_SIZE-2,
Gamma, LR_Limiter, MinMod_Coeff, EP_Coeff, dt, _dh );
__syncthreads();
# elif ( FLU_SCHEME == MHM ) // b. use interpolated face-centered values to calculate the half-step fluxes
// (1.b-1) conserved variables --> primitive variables
CUFLU_Con2Pri_AllGrids( g_Fluid_In, g_PriVar, Gamma );
__syncthreads();
// (1.b-2) evaluate the half-step face-centered solution by data reconstruction
CUFLU_DataReconstruction( g_PriVar, g_Slope_PPM_x, g_Slope_PPM_y, g_Slope_PPM_z, g_FC_Var_xL, g_FC_Var_xR,
g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR, FLU_NXT, FLU_GHOST_SIZE-1,
Gamma, LR_Limiter, MinMod_Coeff, EP_Coeff, dt, _dh );
__syncthreads();
# endif // #if ( FLU_SCHEME == MHM_RP ) ... else ...
// 2. evaluate the face-centered full-step fluxes by solving the Riemann problem
CUFLU_ComputeFlux( g_FC_Var_xL, g_FC_Var_xR, g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR,
g_FC_Flux_x, g_FC_Flux_y, g_FC_Flux_z, g_Flux, StoreFlux, 1, Gamma );
__syncthreads();
// 3. evaluate the full-step solution
CUFLU_FullStepUpdate( g_Fluid_In, g_Fluid_Out, g_FC_Flux_x, g_FC_Flux_y, g_FC_Flux_z, dt, _dh, Gamma );
} // FUNCTION : CUFLU_FluidSolver_MHM
#if ( FLU_SCHEME == MHM_RP )
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_RiemannPredict_Flux
// Description : Evaluate the half-step face-centered fluxes by Riemann solver
//
// Note : 1. Work for the MUSCL-Hancock method + Riemann-prediction (MHM_RP)
// 2. Currently support the exact, Roe, HLLE, and HLLC solvers
// 3. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 4. The function is asynchronous
// --> "__syncthreads" must be called before using the output data
// 5. The size of the g_Half_Flux_x/y/z arrays are assumed to be "N_HF_FLUX"
// --> The fluxes at the left surface of the cell (i+1,j+1,k+1) in "g_Fluid_In" will
// be stored at "(k*N_HF_FLUX+j)*N_HF_FLUX+i" in g_Half_Flux_x/y/z
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Half_Flux_x : Global memory array to store the face-centered fluxes in the x direction
// g_Half_Flux_y : Global memory array to store the face-centered fluxes in the y direction
// g_Half_Flux_z : Global memory array to store the face-centered fluxes in the z direction
// Gamma : Ratio of specific heats
//-------------------------------------------------------------------------------------------------------
__device__ void CUFLU_RiemannPredict_Flux( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real Gamma )
{
const uint bx = blockIdx.x;
const uint tx = threadIdx.x;
const uint dID = blockDim.x;
const uint3 dID_In = make_uint3( 1, FLU_NXT, FLU_NXT*FLU_NXT );
# if ( RSOLVER == EXACT )
const real Gamma_m1 = Gamma - (real)1.0;
# endif
uint ID, ID_In, ID_Out, Nxy;
uint3 ID3d;
FluVar VarL, VarR, FC_Flux;
# if ( RSOLVER == EXACT )
FluVar *Useless = NULL;
# endif
# define Load( Input, Output, ID ) \
{ \
Output.Rho = Input[bx][0][ID]; \
Output.Px = Input[bx][1][ID]; \
Output.Py = Input[bx][2][ID]; \
Output.Pz = Input[bx][3][ID]; \
Output.Egy = Input[bx][4][ID]; \
} // Load
# define Dump( Input, Output, ID ) \
{ \
Output[bx][0][ID] = Input.Rho; \
Output[bx][1][ID] = Input.Px; \
Output[bx][2][ID] = Input.Py; \
Output[bx][3][ID] = Input.Pz; \
Output[bx][4][ID] = Input.Egy; \
} // Dump
# if ( RSOLVER == EXACT )
/* exact solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
VarL = CUFLU_Con2Pri( VarL, Gamma_m1 ); \
VarR = CUFLU_Con2Pri( VarR, Gamma_m1 ); \
\
FC_Flux = CUFLU_RiemannSolver_Exact( Dir, *Useless, *Useless, *Useless, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == ROE )
/* Roe solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_Roe( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == HLLE )
/* HLLE solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_HLLE( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == HLLC )
/* HLLC solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_HLLC( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# else
# error : ERROR : unsupported Riemann solver (EXACT/ROE/HLLE/HLLC) !!
# endif
# define GetFlux( Dir, Nx, Ny, Gap_x, Gap_y, Gap_z, dID_In, g_Half_Flux ) \
{ \
ID = tx; \
Nxy = (Nx)*(Ny); \
\
/* loop over all cells */ \
while ( ID < N_HF_FLUX*(N_HF_FLUX-1)*(N_HF_FLUX-1) ) \
{ \
ID3d.x = ID%(Nx); \
ID3d.y = ID%Nxy/(Nx); \
ID3d.z = ID/Nxy; \
ID_In = __umul24( __umul24( ID3d.z+Gap_z, FLU_NXT ) + ID3d.y+Gap_y, FLU_NXT ) + ID3d.x+Gap_x; \
ID_Out = __umul24( __umul24( ID3d.z, N_HF_FLUX ) + ID3d.y, N_HF_FLUX ) + ID3d.x; \
\
Load( g_Fluid_In, VarL, ID_In ); \
Load( g_Fluid_In, VarR, ID_In+dID_In ); \
\
RiemannSolver( Dir, VarL, VarR ); \
\
Dump( FC_Flux, g_Half_Flux, ID_Out ); \
\
ID += dID; \
\
} /* while ( ID < N_HF_FLUX*(N_HF_FLUX-1)*(N_HF_FLUX-1) ) */ \
} // GetFlux
GetFlux( 0, N_HF_FLUX, N_HF_FLUX-1, 0, 1, 1, dID_In.x, g_Half_Flux_x );
GetFlux( 1, N_HF_FLUX-1, N_HF_FLUX, 1, 0, 1, dID_In.y, g_Half_Flux_y );
GetFlux( 2, N_HF_FLUX-1, N_HF_FLUX-1, 1, 1, 0, dID_In.z, g_Half_Flux_z );
# undef Load
# undef Dump
# undef RiemannSolver
# undef GetFlux
} // FUNCTION : CUFLU_RiemannPredict_Flux
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_RiemannPredict
// Description : Evolve the cell-centered variables by half time-step by using the Riemann solvers
//
// Note : 1. Work for the MUSCL-Hancock method + Riemann-prediction (MHM_RP)
// 2. The input array "g_Fluid_In" should be conserved variables
// 3. For the performance consideration, the output data will be primitive variables
// 4. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 5. The function is asynchronous
// --> "__syncthreads" must be called before using the output data
// 6. The size of the g_Half_Var array are assumed to be "N_HF_VAR"
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Half_Flux_x : Global memory array storing the face-centered fluxes in the x direction
// g_Half_Flux_y : Global memory array storing the face-centered fluxes in the y direction
// g_Half_Flux_z : Global memory array storing the face-centered fluxes in the z direction
// g_Half_Var : Global memory array to store the half-step solution
// dt : Time interval to advance solution
// _dh : 1 / grid size
// Gamma : Ratio of specific heats
//-------------------------------------------------------------------------------------------------------
__device__ void CUFLU_RiemannPredict( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Var [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real dt, const real _dh, const real Gamma )
{
const uint bx = blockIdx.x;
const uint tx = threadIdx.x;
const real dt_dh2 = (real)0.5*dt*_dh;
const uint dID_Out = blockDim.x;
const uint3 dID_Flux = make_uint3( 1, N_HF_FLUX, N_HF_FLUX*N_HF_FLUX );
const real Gamma_m1 = Gamma - (real)1.0;
uint ID_Out = tx;
uint ID_In, ID_Flux;
uint3 ID3d;
FluVar Var;
real FluxDiff;
# ifdef ENFORCE_POSITIVE
const real _Gamma_m1 = (real)1.0 / Gamma_m1;
real Ek, TempPres;
# endif
// loop over all cells
while ( ID_Out < N_HF_VAR*N_HF_VAR*N_HF_VAR )
{
ID3d.x = ID_Out%N_HF_VAR;
ID3d.y = ID_Out%(N_HF_VAR*N_HF_VAR)/N_HF_VAR;
ID3d.z = ID_Out/(N_HF_VAR*N_HF_VAR);
ID_In = __umul24( __umul24( ID3d.z+1, FLU_NXT ) + ID3d.y+1, FLU_NXT ) + ID3d.x+1;
ID_Flux = __umul24( __umul24( ID3d.z, N_HF_FLUX ) + ID3d.y, N_HF_FLUX ) + ID3d.x;
// half-step update
Var.Rho = g_Fluid_In[bx][0][ID_In];
Var.Px = g_Fluid_In[bx][1][ID_In];
Var.Py = g_Fluid_In[bx][2][ID_In];
Var.Pz = g_Fluid_In[bx][3][ID_In];
Var.Egy = g_Fluid_In[bx][4][ID_In];
# define Update( comp, v ) \
{ \
FluxDiff = dt_dh2 * ( g_Half_Flux_x[bx][v][ID_Flux+dID_Flux.x] - g_Half_Flux_x[bx][v][ID_Flux] + \
g_Half_Flux_y[bx][v][ID_Flux+dID_Flux.y] - g_Half_Flux_y[bx][v][ID_Flux] + \
g_Half_Flux_z[bx][v][ID_Flux+dID_Flux.z] - g_Half_Flux_z[bx][v][ID_Flux] ); \
Var.comp -= FluxDiff; \
} // Update
Update( Rho, 0 );
Update( Px, 1 );
Update( Py, 2 );
Update( Pz, 3 );
Update( Egy, 4 );
# undef Update
// enforce the pressure to be positive
# ifdef ENFORCE_POSITIVE
Ek = (real)0.5*( Var.Px*Var.Px + Var.Py*Var.Py + Var.Pz*Var.Pz )/Var.Rho;
TempPres = Gamma_m1*( Var.Egy - Ek );
TempPres = FMAX( TempPres, MIN_VALUE );
Var.Egy = Ek + _Gamma_m1*TempPres;
# endif
// conserved variables --> primitive variables
Var = CUFLU_Con2Pri( Var, Gamma_m1 );
// save the updated data back to the output global array
g_Half_Var[bx][0][ID_Out] = Var.Rho;
g_Half_Var[bx][1][ID_Out] = Var.Px;
g_Half_Var[bx][2][ID_Out] = Var.Py;
g_Half_Var[bx][3][ID_Out] = Var.Pz;
g_Half_Var[bx][4][ID_Out] = Var.Egy;
ID_Out += dID_Out;
} // while ( ID_Out < N_HF_VAR*N_HF_VAR*N_HF_VAR )
} // FUNCTION : CUFLU_RiemannPredict
#endif // #if ( FLU_SCHEME == MHM_RP )
#endif // #if ( defined GPU && MODEL == HYDRO && ( FLU_SCHEME == MHM || FLU_SCHEME == MHM_RP ) )
| 3329bf8c35b15a275173fcafdcaf43c0191d2ea7.cu |
#include "Macro.h"
#include "CUFLU.h"
#if ( defined GPU && MODEL == HYDRO && ( FLU_SCHEME == MHM || FLU_SCHEME == MHM_RP ) )
#include "CUFLU_Shared_FluUtility.cu"
#include "CUFLU_Shared_DataReconstruction.cu"
#include "CUFLU_Shared_ComputeFlux.cu"
#include "CUFLU_Shared_FullStepUpdate.cu"
#if ( RSOLVER == EXACT )
#include "CUFLU_Shared_RiemannSolver_Exact.cu"
#elif ( RSOLVER == ROE )
#include "CUFLU_Shared_RiemannSolver_Roe.cu"
#elif ( RSOLVER == HLLE )
#include "CUFLU_Shared_RiemannSolver_HLLE.cu"
#elif ( RSOLVER == HLLC )
#include "CUFLU_Shared_RiemannSolver_HLLC.cu"
#endif
#if ( FLU_SCHEME == MHM_RP )
static __device__ void CUFLU_RiemannPredict_Flux( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real Gamma );
static __device__ void CUFLU_RiemannPredict( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Var [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real dt, const real _dh, const real Gamma );
#endif
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_FluidSolver_MHM
// Description : GPU fluid solver based on the MUSCL-Hancock scheme
//
// Note : 1. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 2. The three-dimensional evolution is achieved by using the unsplit method
// 3. Two half-step prediction schemes are supported, including "MHM" and "MHM_RP"
// MHM : use interpolated face-centered values to calculate the half-step fluxes
// MHM_RP : use Riemann solver to calculate the half-step fluxes
// 4. Ref :
// MHM : "Riemann Solvers and Numerical Methods for Fluid Dynamics
// - A Practical Introduction ~ by Eleuterio F. Toro"
// MHM_RP : Stone & Gardiner, NewA, 14, 139 (2009)
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Fluid_Out : Global memory array to store the output fluid variables
// g_Flux : Global memory array to store the output fluxes
// g_PriVar : Global memory array to store the primitive variables
// g_Slope_PPM_x : Global memory array to store the x-slope for the PPM reconstruction
// g_Slope_PPM_y : Global memory array to store the y-slope for the PPM reconstruction
// g_Slope_PPM_z : Global memory array to store the z-slope for the PPM reconstruction
// g_FC_Var_xL : Global memory array to store the half-step variables on the -x surface
// g_FC_Var_xR : Global memory array to store the half-step variables on the +x surface
// g_FC_Var_yL : Global memory array to store the half-step variables on the -y surface
// g_FC_Var_yR : Global memory array to store the half-step variables on the +y surface
// g_FC_Var_zL : Global memory array to store the half-step variables on the -z surface
// g_FC_Var_zR : Global memory array to store the half-step variables on the +z surface
// g_FC_Flux_x : Global memory array to store the face-centered fluxes in the x direction
// g_FC_Flux_y : Global memory array to store the face-centered fluxes in the y direction
// g_FC_Flux_z : Global memory array to store the face-centered fluxes in the z direction
// dt : Time interval to advance solution
// _dh : 1 / grid size
// Gamma : Ratio of specific heats
// StoreFlux : true --> store the coarse-fine fluxes
// LR_Limiter : Slope limiter for the data reconstruction in the MHM/MHM_RP/CTU schemes
// (0/1/2/3/4) = (vanLeer/generalized MinMod/vanAlbada/
// vanLeer + generalized MinMod/extrema-preserving) limiter
// MinMod_Coeff : Coefficient of the generalized MinMod limiter
// EP_Coeff : Coefficient of the extrema-preserving limiter
//-------------------------------------------------------------------------------------------------------
__global__ void CUFLU_FluidSolver_MHM( const real g_Fluid_In[][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Fluid_Out [][5][ PS2*PS2*PS2 ],
real g_Flux [][9][5][ PS2*PS2 ],
real g_PriVar [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Slope_PPM_x[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_Slope_PPM_y[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_Slope_PPM_z[][5][ N_SLOPE_PPM*N_SLOPE_PPM*N_SLOPE_PPM],
real g_FC_Var_xL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_xR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_yL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_yR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_zL [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Var_zR [][5][ N_FC_VAR*N_FC_VAR*N_FC_VAR ],
real g_FC_Flux_x [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_FC_Flux_y [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_FC_Flux_z [][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real dt, const real _dh, const real Gamma, const bool StoreFlux,
const LR_Limiter_t LR_Limiter, const real MinMod_Coeff,
const real EP_Coeff )
{
// 1. half-step prediction
# if ( FLU_SCHEME == MHM_RP ) // a. use Riemann solver to calculate the half-step fluxes
// use pointers to avoid redundant memory consumption
real (*const g_Half_Var) [5][ FLU_NXT*FLU_NXT*FLU_NXT ] = g_PriVar;
real (*const g_Half_Flux_x)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_x;
real (*const g_Half_Flux_y)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_y;
real (*const g_Half_Flux_z)[5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ] = g_FC_Flux_z;
// (1.a-1) evaluate the face-centered half-step fluxes with the piecewise constant data reconstruction
CUFLU_RiemannPredict_Flux( g_Fluid_In, g_Half_Flux_x, g_Half_Flux_y, g_Half_Flux_z, Gamma );
__syncthreads();
// (1.a-2) evaluate the half-step cell-centered solution
CUFLU_RiemannPredict( g_Fluid_In, g_Half_Flux_x, g_Half_Flux_y, g_Half_Flux_z, g_Half_Var, dt, _dh, Gamma );
__syncthreads();
// (1.a-3) evaluate the half-step face-centered solution by data reconstruction
CUFLU_DataReconstruction( g_Half_Var, g_Slope_PPM_x, g_Slope_PPM_y, g_Slope_PPM_z, g_FC_Var_xL, g_FC_Var_xR,
g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR, N_HF_VAR, FLU_GHOST_SIZE-2,
Gamma, LR_Limiter, MinMod_Coeff, EP_Coeff, dt, _dh );
__syncthreads();
# elif ( FLU_SCHEME == MHM ) // b. use interpolated face-centered values to calculate the half-step fluxes
// (1.b-1) conserved variables --> primitive variables
CUFLU_Con2Pri_AllGrids( g_Fluid_In, g_PriVar, Gamma );
__syncthreads();
// (1.b-2) evaluate the half-step face-centered solution by data reconstruction
CUFLU_DataReconstruction( g_PriVar, g_Slope_PPM_x, g_Slope_PPM_y, g_Slope_PPM_z, g_FC_Var_xL, g_FC_Var_xR,
g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR, FLU_NXT, FLU_GHOST_SIZE-1,
Gamma, LR_Limiter, MinMod_Coeff, EP_Coeff, dt, _dh );
__syncthreads();
# endif // #if ( FLU_SCHEME == MHM_RP ) ... else ...
// 2. evaluate the face-centered full-step fluxes by solving the Riemann problem
CUFLU_ComputeFlux( g_FC_Var_xL, g_FC_Var_xR, g_FC_Var_yL, g_FC_Var_yR, g_FC_Var_zL, g_FC_Var_zR,
g_FC_Flux_x, g_FC_Flux_y, g_FC_Flux_z, g_Flux, StoreFlux, 1, Gamma );
__syncthreads();
// 3. evaluate the full-step solution
CUFLU_FullStepUpdate( g_Fluid_In, g_Fluid_Out, g_FC_Flux_x, g_FC_Flux_y, g_FC_Flux_z, dt, _dh, Gamma );
} // FUNCTION : CUFLU_FluidSolver_MHM
#if ( FLU_SCHEME == MHM_RP )
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_RiemannPredict_Flux
// Description : Evaluate the half-step face-centered fluxes by Riemann solver
//
// Note : 1. Work for the MUSCL-Hancock method + Riemann-prediction (MHM_RP)
// 2. Currently support the exact, Roe, HLLE, and HLLC solvers
// 3. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 4. The function is asynchronous
// --> "__syncthreads" must be called before using the output data
// 5. The size of the g_Half_Flux_x/y/z arrays are assumed to be "N_HF_FLUX"
// --> The fluxes at the left surface of the cell (i+1,j+1,k+1) in "g_Fluid_In" will
// be stored at "(k*N_HF_FLUX+j)*N_HF_FLUX+i" in g_Half_Flux_x/y/z
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Half_Flux_x : Global memory array to store the face-centered fluxes in the x direction
// g_Half_Flux_y : Global memory array to store the face-centered fluxes in the y direction
// g_Half_Flux_z : Global memory array to store the face-centered fluxes in the z direction
// Gamma : Ratio of specific heats
//-------------------------------------------------------------------------------------------------------
__device__ void CUFLU_RiemannPredict_Flux( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real Gamma )
{
const uint bx = blockIdx.x;
const uint tx = threadIdx.x;
const uint dID = blockDim.x;
const uint3 dID_In = make_uint3( 1, FLU_NXT, FLU_NXT*FLU_NXT );
# if ( RSOLVER == EXACT )
const real Gamma_m1 = Gamma - (real)1.0;
# endif
uint ID, ID_In, ID_Out, Nxy;
uint3 ID3d;
FluVar VarL, VarR, FC_Flux;
# if ( RSOLVER == EXACT )
FluVar *Useless = NULL;
# endif
# define Load( Input, Output, ID ) \
{ \
Output.Rho = Input[bx][0][ID]; \
Output.Px = Input[bx][1][ID]; \
Output.Py = Input[bx][2][ID]; \
Output.Pz = Input[bx][3][ID]; \
Output.Egy = Input[bx][4][ID]; \
} // Load
# define Dump( Input, Output, ID ) \
{ \
Output[bx][0][ID] = Input.Rho; \
Output[bx][1][ID] = Input.Px; \
Output[bx][2][ID] = Input.Py; \
Output[bx][3][ID] = Input.Pz; \
Output[bx][4][ID] = Input.Egy; \
} // Dump
# if ( RSOLVER == EXACT )
/* exact solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
VarL = CUFLU_Con2Pri( VarL, Gamma_m1 ); \
VarR = CUFLU_Con2Pri( VarR, Gamma_m1 ); \
\
FC_Flux = CUFLU_RiemannSolver_Exact( Dir, *Useless, *Useless, *Useless, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == ROE )
/* Roe solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_Roe( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == HLLE )
/* HLLE solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_HLLE( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# elif ( RSOLVER == HLLC )
/* HLLC solver */
#define RiemannSolver( Dir, VarL, VarR ) \
{ \
FC_Flux = CUFLU_RiemannSolver_HLLC( Dir, VarL, VarR, Gamma ); \
} // RiemannSolver
# else
# error : ERROR : unsupported Riemann solver (EXACT/ROE/HLLE/HLLC) !!
# endif
# define GetFlux( Dir, Nx, Ny, Gap_x, Gap_y, Gap_z, dID_In, g_Half_Flux ) \
{ \
ID = tx; \
Nxy = (Nx)*(Ny); \
\
/* loop over all cells */ \
while ( ID < N_HF_FLUX*(N_HF_FLUX-1)*(N_HF_FLUX-1) ) \
{ \
ID3d.x = ID%(Nx); \
ID3d.y = ID%Nxy/(Nx); \
ID3d.z = ID/Nxy; \
ID_In = __umul24( __umul24( ID3d.z+Gap_z, FLU_NXT ) + ID3d.y+Gap_y, FLU_NXT ) + ID3d.x+Gap_x; \
ID_Out = __umul24( __umul24( ID3d.z, N_HF_FLUX ) + ID3d.y, N_HF_FLUX ) + ID3d.x; \
\
Load( g_Fluid_In, VarL, ID_In ); \
Load( g_Fluid_In, VarR, ID_In+dID_In ); \
\
RiemannSolver( Dir, VarL, VarR ); \
\
Dump( FC_Flux, g_Half_Flux, ID_Out ); \
\
ID += dID; \
\
} /* while ( ID < N_HF_FLUX*(N_HF_FLUX-1)*(N_HF_FLUX-1) ) */ \
} // GetFlux
GetFlux( 0, N_HF_FLUX, N_HF_FLUX-1, 0, 1, 1, dID_In.x, g_Half_Flux_x );
GetFlux( 1, N_HF_FLUX-1, N_HF_FLUX, 1, 0, 1, dID_In.y, g_Half_Flux_y );
GetFlux( 2, N_HF_FLUX-1, N_HF_FLUX-1, 1, 1, 0, dID_In.z, g_Half_Flux_z );
# undef Load
# undef Dump
# undef RiemannSolver
# undef GetFlux
} // FUNCTION : CUFLU_RiemannPredict_Flux
//-------------------------------------------------------------------------------------------------------
// Function : CUFLU_RiemannPredict
// Description : Evolve the cell-centered variables by half time-step by using the Riemann solvers
//
// Note : 1. Work for the MUSCL-Hancock method + Riemann-prediction (MHM_RP)
// 2. The input array "g_Fluid_In" should be conserved variables
// 3. For the performance consideration, the output data will be primitive variables
// 4. Prefix "g" for pointers pointing to the "Global" memory space
// Prefix "s" for pointers pointing to the "Shared" memory space
// 5. The function is asynchronous
// --> "__syncthreads" must be called before using the output data
// 6. The size of the g_Half_Var array are assumed to be "N_HF_VAR"
//
// Parameter : g_Fluid_In : Global memory array storing the input fluid variables
// g_Half_Flux_x : Global memory array storing the face-centered fluxes in the x direction
// g_Half_Flux_y : Global memory array storing the face-centered fluxes in the y direction
// g_Half_Flux_z : Global memory array storing the face-centered fluxes in the z direction
// g_Half_Var : Global memory array to store the half-step solution
// dt : Time interval to advance solution
// _dh : 1 / grid size
// Gamma : Ratio of specific heats
//-------------------------------------------------------------------------------------------------------
__device__ void CUFLU_RiemannPredict( const real g_Fluid_In [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real g_Half_Flux_x[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_y[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
const real g_Half_Flux_z[][5][ N_FC_FLUX*N_FC_FLUX*N_FC_FLUX ],
real g_Half_Var [][5][ FLU_NXT*FLU_NXT*FLU_NXT ],
const real dt, const real _dh, const real Gamma )
{
const uint bx = blockIdx.x;
const uint tx = threadIdx.x;
const real dt_dh2 = (real)0.5*dt*_dh;
const uint dID_Out = blockDim.x;
const uint3 dID_Flux = make_uint3( 1, N_HF_FLUX, N_HF_FLUX*N_HF_FLUX );
const real Gamma_m1 = Gamma - (real)1.0;
uint ID_Out = tx;
uint ID_In, ID_Flux;
uint3 ID3d;
FluVar Var;
real FluxDiff;
# ifdef ENFORCE_POSITIVE
const real _Gamma_m1 = (real)1.0 / Gamma_m1;
real Ek, TempPres;
# endif
// loop over all cells
while ( ID_Out < N_HF_VAR*N_HF_VAR*N_HF_VAR )
{
ID3d.x = ID_Out%N_HF_VAR;
ID3d.y = ID_Out%(N_HF_VAR*N_HF_VAR)/N_HF_VAR;
ID3d.z = ID_Out/(N_HF_VAR*N_HF_VAR);
ID_In = __umul24( __umul24( ID3d.z+1, FLU_NXT ) + ID3d.y+1, FLU_NXT ) + ID3d.x+1;
ID_Flux = __umul24( __umul24( ID3d.z, N_HF_FLUX ) + ID3d.y, N_HF_FLUX ) + ID3d.x;
// half-step update
Var.Rho = g_Fluid_In[bx][0][ID_In];
Var.Px = g_Fluid_In[bx][1][ID_In];
Var.Py = g_Fluid_In[bx][2][ID_In];
Var.Pz = g_Fluid_In[bx][3][ID_In];
Var.Egy = g_Fluid_In[bx][4][ID_In];
# define Update( comp, v ) \
{ \
FluxDiff = dt_dh2 * ( g_Half_Flux_x[bx][v][ID_Flux+dID_Flux.x] - g_Half_Flux_x[bx][v][ID_Flux] + \
g_Half_Flux_y[bx][v][ID_Flux+dID_Flux.y] - g_Half_Flux_y[bx][v][ID_Flux] + \
g_Half_Flux_z[bx][v][ID_Flux+dID_Flux.z] - g_Half_Flux_z[bx][v][ID_Flux] ); \
Var.comp -= FluxDiff; \
} // Update
Update( Rho, 0 );
Update( Px, 1 );
Update( Py, 2 );
Update( Pz, 3 );
Update( Egy, 4 );
# undef Update
// enforce the pressure to be positive
# ifdef ENFORCE_POSITIVE
Ek = (real)0.5*( Var.Px*Var.Px + Var.Py*Var.Py + Var.Pz*Var.Pz )/Var.Rho;
TempPres = Gamma_m1*( Var.Egy - Ek );
TempPres = FMAX( TempPres, MIN_VALUE );
Var.Egy = Ek + _Gamma_m1*TempPres;
# endif
// conserved variables --> primitive variables
Var = CUFLU_Con2Pri( Var, Gamma_m1 );
// save the updated data back to the output global array
g_Half_Var[bx][0][ID_Out] = Var.Rho;
g_Half_Var[bx][1][ID_Out] = Var.Px;
g_Half_Var[bx][2][ID_Out] = Var.Py;
g_Half_Var[bx][3][ID_Out] = Var.Pz;
g_Half_Var[bx][4][ID_Out] = Var.Egy;
ID_Out += dID_Out;
} // while ( ID_Out < N_HF_VAR*N_HF_VAR*N_HF_VAR )
} // FUNCTION : CUFLU_RiemannPredict
#endif // #if ( FLU_SCHEME == MHM_RP )
#endif // #if ( defined GPU && MODEL == HYDRO && ( FLU_SCHEME == MHM || FLU_SCHEME == MHM_RP ) )
|
027b99921786277e2930fa5c665a25f542ebd6e7.hip | // !!! This is a file automatically generated by hipify!!!
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/hip/HIPApplyUtils.cuh>
#include <ATen/AccumulateType.h>
#include <ATen/hip/HIPGeneratorImpl.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/hip/DistributionTemplates.h>
#include <hiprand/hiprand.h>
#include <hiprand/hiprand_kernel.h>
#include <hiprand/hiprand_kernel.h>
#include <utility>
#include <functional>
#include <ATen/native/Distributions.h>
#include <ATen/native/hip/Loops.cuh>
#include <ATen/native/TensorIterator.h>
#include <cstdint>
#include <limits>
#include <utility>
#include <type_traits>
namespace at { namespace native {
void bernoulli_tensor_kernel(const TensorBase &self, const TensorBase &p_, c10::optional<Generator> gen_) {
auto generator = get_generator_or_default<CUDAGeneratorImpl>(gen_, cuda::detail::getDefaultCUDAGenerator());
at::native::templates::cuda::bernoulli_kernel(self, p_, generator);
}
void bernoulli_scalar_kernel(const TensorBase &self, double p, c10::optional<Generator> gen) {
auto iter = TensorIterator::borrowing_nullary_op(self);
auto generator = get_generator_or_default<CUDAGeneratorImpl>(gen, cuda::detail::getDefaultCUDAGenerator());
at::native::templates::cuda::bernoulli_kernel(iter, p, generator);
}
REGISTER_DISPATCH(bernoulli_tensor_stub, &bernoulli_tensor_kernel);
REGISTER_DISPATCH(bernoulli_scalar_stub, &bernoulli_scalar_kernel);
}} // namespace at::native
| 027b99921786277e2930fa5c665a25f542ebd6e7.cu | #define TORCH_ASSERT_NO_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#include <ATen/AccumulateType.h>
#include <ATen/cuda/CUDAGeneratorImpl.h>
#include <ATen/native/UnaryOps.h>
#include <ATen/native/cuda/DistributionTemplates.h>
#include <curand.h>
#include <curand_kernel.h>
#include <curand_philox4x32_x.h>
#include <utility>
#include <functional>
#include <ATen/native/Distributions.h>
#include <ATen/native/cuda/Loops.cuh>
#include <ATen/native/TensorIterator.h>
#include <cstdint>
#include <limits>
#include <utility>
#include <type_traits>
namespace at { namespace native {
void bernoulli_tensor_kernel(const TensorBase &self, const TensorBase &p_, c10::optional<Generator> gen_) {
auto generator = get_generator_or_default<CUDAGeneratorImpl>(gen_, cuda::detail::getDefaultCUDAGenerator());
at::native::templates::cuda::bernoulli_kernel(self, p_, generator);
}
void bernoulli_scalar_kernel(const TensorBase &self, double p, c10::optional<Generator> gen) {
auto iter = TensorIterator::borrowing_nullary_op(self);
auto generator = get_generator_or_default<CUDAGeneratorImpl>(gen, cuda::detail::getDefaultCUDAGenerator());
at::native::templates::cuda::bernoulli_kernel(iter, p, generator);
}
REGISTER_DISPATCH(bernoulli_tensor_stub, &bernoulli_tensor_kernel);
REGISTER_DISPATCH(bernoulli_scalar_stub, &bernoulli_scalar_kernel);
}} // namespace at::native
|
26d71a232f42f93a0d679a9702cd80cb2bed9b01.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
#define N 10000000
#define MAX_ERR 1e-6
__global__ void vector_add(float *out, float *a, float *b, int n) {
int index = threadIdx.x;
int stride = blockDim.x;
for(int i = index; i < n; i += stride){
out[i] = a[i] + b[i];
}
} | 26d71a232f42f93a0d679a9702cd80cb2bed9b01.cu | #include "includes.h"
#define N 10000000
#define MAX_ERR 1e-6
__global__ void vector_add(float *out, float *a, float *b, int n) {
int index = threadIdx.x;
int stride = blockDim.x;
for(int i = index; i < n; i += stride){
out[i] = a[i] + b[i];
}
} |
b2f6d8f01b4a760c24ac1bd4eaa81840115d98e1.hip | // !!! This is a file automatically generated by hipify!!!
#include"DifferenceKernel.h"
#include <math.h>
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include "cufftw.h"
#include "Cuda_Help.cuh"
#include <stdio.h>
#include <iostream>
#include <vector>
#include "FourierTransform.h"
using namespace std;
#define BLOCK_DIM 512
__global__ void distanceKernel(hipfftComplex* s1, hipfftComplex* s2, float* result, size_t size)
{
__shared__ float numberx[1024];
__shared__ float numbery[1024];
int index = threadIdx.x + blockIdx.x * blockDim.x;
int tid = threadIdx.x;
//printf("%d\n", result);
//calculate currentnumber
numberx[tid] = 0.0;
numbery[tid] = 0.0;
if (index < size) {
numberx[tid] = abs(s1[index].x - s2[index].x);
numbery[tid] = abs(s1[index].y - s2[index].y);
// atomicAdd(&(result[0]), numberx[tid]);
// atomicAdd(&(result[1]), numbery[tid]);
//printf("%f\n", numbery[tid]);
}
else {
// printf("%d\n", size);
//printf("%f\n", s2[881903].x);
numberx[tid] = 0.0;
numbery[tid] = 0.0;
}
// return;
__syncthreads();
//reduction
for (unsigned int s = blockDim.x / 2; s>0; s >>= 1)
{
if (tid < s) {
numberx[tid] += numberx[tid + s];
numbery[tid] += numbery[tid + s];
}
__syncthreads();
}
/*if (tid < 32)
{
numberx[tid] += numberx[tid + 32];
numbery[tid] += numbery[tid + 32];
numberx[tid] += numberx[tid + 16];
numbery[tid] += numbery[tid + 16];
numberx[tid] += numberx[tid + 8];
numbery[tid] += numbery[tid + 8];
numberx[tid] += numberx[tid + 4];
numbery[tid] += numbery[tid + 4];
numberx[tid] += numberx[tid + 2];
numbery[tid] += numbery[tid + 2];
numberx[tid] += numberx[tid + 1];
numbery[tid] += numbery[tid + 1];
}*/
if (tid == 0) {
atomicAdd(&(result[0]), numberx[0]);
atomicAdd(&(result[1]), numbery[0]);
//printf("%f %f\n",result[0], result[1]);
}
}
__global__ void cosineSimilarity(hipfftComplex* s1, hipfftComplex* s2, float* result, size_t size)
{
__shared__ float t1[BLOCK_DIM];
__shared__ float t2[BLOCK_DIM];
__shared__ float t3[BLOCK_DIM];
int index = threadIdx.x + blockIdx.x * blockDim.x;
int tid = threadIdx.x;
int blockSize = blockDim.x;
//printf("%d\n", result);
//calculate currentnumber
t1[tid] = 0.0;
t2[tid] = 0.0;
t3[tid] = 0.0;
if (index < size) {
//printf("%d\n", result);
float x = sqrtf(s1[index].x * s1[index].x + s1[index].y*s1[index].y);
float y = sqrtf(s2[index].x * s2[index].x + s2[index].y*s2[index].y);
t1[tid] += x*y;
t2[tid] += x*x;
t3[tid] += y*y;
}
else {
t1[tid] = 0.0;
t2[tid] = 0.0;
t3[tid] = 0.0;
}
__syncthreads();
//reduction
if (blockSize >= 1024) {
if (tid < 512) {
t1[tid] += t1[tid + 512];
t2[tid] += t2[tid + 512];
t3[tid] += t3[tid + 512];
} __syncthreads();
}
if (blockSize >= 512) {
if (tid < 256) {
t1[tid] += t1[tid + 256];
t2[tid] += t2[tid + 256];
t3[tid] += t3[tid + 256];
} __syncthreads();
}
if (blockSize >= 256) {
if (tid < 128) {
t1[tid] += t1[tid + 128];
t2[tid] += t2[tid + 128];
t3[tid] += t3[tid + 128];
} __syncthreads();
}
if (blockSize >= 128) {
if (tid < 64) {
t1[tid] += t1[tid + 64];
t2[tid] += t2[tid + 64];
t3[tid] += t3[tid + 64];
} __syncthreads();
}
if (tid < 32)
{
t1[tid] += t1[tid + 32];
t1[tid] += t1[tid + 16];
t1[tid] += t1[tid + 8];
t1[tid] += t1[tid + 4];
t1[tid] += t1[tid + 2];
t1[tid] += t1[tid + 1];
t2[tid] += t2[tid + 32];
t2[tid] += t2[tid + 16];
t2[tid] += t2[tid + 8];
t2[tid] += t2[tid + 4];
t2[tid] += t2[tid + 2];
t2[tid] += t2[tid + 1];
t3[tid] += t3[tid + 32];
t3[tid] += t3[tid + 16];
t3[tid] += t3[tid + 8];
t3[tid] += t3[tid + 4];
t3[tid] += t3[tid + 2];
t3[tid] += t3[tid + 1];
}
/*
for (unsigned int s = blockDim.x / 2; s>0; s >>= 1)
{
if (tid < s) {
t1[tid] += t1[tid + s];
t2[tid] += t2[tid + s];
t3[tid] += t3[tid + s];
}
__syncthreads();
}
// printf("%f\n\n", result[1]);
*/
if (tid == 0) {
atomicAdd(&(result[0]), t1[0]);
atomicAdd(&(result[1]), t2[0]);
atomicAdd(&(result[2]), t3[0]);
}
}
hipError_t dist(hipfftComplex* s1, hipfftComplex* s2, size_t size, float * answer)
{
hipError_t cudaStatus;
hipfftComplex * dev_s1;
hipfftComplex * dev_s2;
float * result;
//cout << s1[0].y << endl;
// Choose which GPU to run on, change this on a multi-GPU system.
cudaStatus = hipSetDevice(0);
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipSetDevice failed! Do you have a CUDA-capable GPU installed?");
goto Error;
}
// Allocate GPU buffers for three vectors (two input, one output) .
cudaStatus = hipMalloc((void**)&dev_s1, size * sizeof(hipfftComplex));
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMalloc failed! 0");
goto Error;
}
cudaStatus = hipMalloc((void**)&dev_s2, size * sizeof(hipfftComplex));
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMalloc failed! 1");
goto Error;
}
cudaStatus = hipMalloc((void**)&result, 3 * sizeof(float));
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMalloc failed! 2");
goto Error;
}
//copy data
cudaStatus = hipMemcpy(dev_s1, s1, size * sizeof(hipfftComplex), hipMemcpyHostToDevice);
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMemcpy failed! 3");
goto Error;
}
cudaStatus = hipMemcpy(dev_s2, s2, size * sizeof(hipfftComplex), hipMemcpyHostToDevice);
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMemcpy failed! 4");
goto Error;
}
// cudaStatus = hipMemcpy(result, answer, 2 * sizeof(float), hipMemcpyHostToDevice);
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMemcpy failed! 5");
goto Error;
}
int blockSize = BLOCK_DIM;
int gridSize = (size - 1) / 1024 + 1;
//cout << gridSize<<" "<<size<<endl;
float* dev_c;
hipMalloc((void**)&dev_c, size * sizeof(int));
//calculate kernel time
hipEvent_t start, stop;
float elapsedTime;
hipEventCreate(&start);
hipEventRecord(start, 0);
//distanceKernel<<<gridSize, blockSize >>>(dev_s1, dev_s2, result, size);
cosineSimilarity << <gridSize, blockSize >> >(dev_s1, dev_s2, result, size);
// Check for any errors launching the kernel
cudaStatus = hipGetLastError();
if (cudaStatus != hipSuccess) {
fprintf(stderr, "addKernel launch failed: %s\n", hipGetErrorString(cudaStatus));
goto Error;
}
// hipDeviceSynchronize waits for the kernel to finish, and returns
// any errors encountered during the launch.
cudaStatus = hipDeviceSynchronize();
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipDeviceSynchronize returned error code %d after launching addKernel!\n", cudaStatus);
goto Error;
}
hipEventCreate(&stop);
hipEventRecord(stop, 0);
hipEventSynchronize(stop);
hipEventElapsedTime(&elapsedTime, start, stop);
// Copy output vector from GPU buffer to host memory.
cudaStatus = hipMemcpy(answer, result, 3 * sizeof(float), hipMemcpyDeviceToHost);
if (cudaStatus != hipSuccess) {
fprintf(stderr, "hipMemcpy last failed!");
goto Error;
}
//printf("serial ans : %f\n", s2[881903].x);
float ansx = 0.0;
float ansy = 0.0;
//serialValidation
for (int i = 0; i < size; i++) {
ansx += abs(s1[i].x - s2[i].x);
ansy += abs(s1[i].y - s2[i].y);
//ans += sqrt(pow(x, 2) + pow(y, 2));
}
/*
//serial cosine distance
float t1=0, t2=0, t3=0;
for (int i = 0; i < size; i++) {
float x = sqrtf(s1[i].x * s1[i].x + s1[i].y*s1[i].y);
float y = sqrtf(s2[i].x * s2[i].x + s2[i].y*s2[i].y);
t1 += x*y;
t2 += x*x;
t3 += y*y;
//ansy += abs(s1[i].y - s2[i].y);
//ans += sqrt(pow(x, 2) + pow(y, 2));
}
//cout << size<<endl;
//printf("GPU answer : %f + %f i\n", answer[0]/1000000,answer[1] / 1000000);
//printf("SERIAL answer : %f + %f i", ansx / 1000000, ansy / 1000000);
//cout << (answer[0]) <<" "<< answer[1]<<" " << answer[2]<<endl;
printf("cosineDistance = %f \n", abs(t1) / (sqrtf(t2)*sqrtf(t3)));
*/
//todo uncomment for enabling log
//printf("cosineDistance GPU = %f \n", abs(answer[0]) / (sqrtf(answer[1])*sqrtf(answer[2])));
//printf("Elapsed time : %f ms\n\n", elapsedTime);
answer[0] = abs(answer[0]) / (sqrtf(answer[1])*sqrtf(answer[2]));
Error:
hipFree(dev_s1);
hipFree(dev_s2);
hipFree(result);
return cudaStatus;
}
float DifferenceKernel::distance(vector<float>* musicVector, vector<float>* sampleVector)
{
int musicSize = musicVector->size();
int sampleSize = sampleVector->size();
int steps = musicSize / sampleSize * 2;
float* ans = (float *)malloc(3 * sizeof(float));
float maxSimilarity = 0.0;
FourierTransform fourierTransform;
float * sample = (float*)malloc(sampleSize * sizeof(float));
float * music = (float*)malloc(sampleSize * sizeof(float));
copy(sampleVector->begin(), sampleVector->end(), sample);
hipfftComplex * smpl = fourierTransform.transform(sample, sampleSize);
hipfftComplex * msc;
for (int i = 0; i < steps; i++) {
if (i*(sampleSize / 2) + sampleSize >= musicSize) {
break;
}
#pragma omp parallel for num_threads(8)
for (int j = i*(sampleSize / 2); j < i * (sampleSize / 2) + sampleSize; j++) {
music[j - i*sampleSize / 2] = musicVector->at(j);
//cout << j << " "<< music[j - i*sampleSize];
}
//cout << ((i + 1)*sampleSize) - i*sampleSize << endl;;
//fourier transform
msc = fourierTransform.transform(music, sampleSize);
//lunch kernell
dist(smpl, msc, sampleSize / 2 + 1, ans);
if (ans[0] > maxSimilarity) {
maxSimilarity = ans[0];
}
free(msc);
//msc = NULL;
}
//very rare case;
if (musicSize - sampleSize == 0) {
return maxSimilarity;
}
#pragma omp parallel for num_threads(8)
for (int j = musicSize - sampleSize; j < musicSize; j++) {
music[j - (musicSize - sampleSize)] = musicVector->at(j);
//cout << j << " " << music[j - i*musicSize];
}
msc = fourierTransform.transform(music, sampleSize);
dist(smpl, msc, sampleSize / 2 + 1, ans);
if (ans[0] > maxSimilarity) {
maxSimilarity = ans[0];
}
free(msc);
free(smpl);
free(music);
free(ans);
hipDeviceReset();
//copy(musicSize-sampleSize, musicSize, music);
//cout << musicSize - sampleSize << " " << musicSize;
cout << "max similarity found :" << maxSimilarity << endl;
return maxSimilarity;
}
| b2f6d8f01b4a760c24ac1bd4eaa81840115d98e1.cu | #include"DifferenceKernel.h"
#include <math.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "cufftw.h"
#include "Cuda_Help.cuh"
#include <stdio.h>
#include <iostream>
#include <vector>
#include "FourierTransform.h"
using namespace std;
#define BLOCK_DIM 512
__global__ void distanceKernel(cufftComplex* s1, cufftComplex* s2, float* result, size_t size)
{
__shared__ float numberx[1024];
__shared__ float numbery[1024];
int index = threadIdx.x + blockIdx.x * blockDim.x;
int tid = threadIdx.x;
//printf("%d\n", result);
//calculate currentnumber
numberx[tid] = 0.0;
numbery[tid] = 0.0;
if (index < size) {
numberx[tid] = abs(s1[index].x - s2[index].x);
numbery[tid] = abs(s1[index].y - s2[index].y);
// atomicAdd(&(result[0]), numberx[tid]);
// atomicAdd(&(result[1]), numbery[tid]);
//printf("%f\n", numbery[tid]);
}
else {
// printf("%d\n", size);
//printf("%f\n", s2[881903].x);
numberx[tid] = 0.0;
numbery[tid] = 0.0;
}
// return;
__syncthreads();
//reduction
for (unsigned int s = blockDim.x / 2; s>0; s >>= 1)
{
if (tid < s) {
numberx[tid] += numberx[tid + s];
numbery[tid] += numbery[tid + s];
}
__syncthreads();
}
/*if (tid < 32)
{
numberx[tid] += numberx[tid + 32];
numbery[tid] += numbery[tid + 32];
numberx[tid] += numberx[tid + 16];
numbery[tid] += numbery[tid + 16];
numberx[tid] += numberx[tid + 8];
numbery[tid] += numbery[tid + 8];
numberx[tid] += numberx[tid + 4];
numbery[tid] += numbery[tid + 4];
numberx[tid] += numberx[tid + 2];
numbery[tid] += numbery[tid + 2];
numberx[tid] += numberx[tid + 1];
numbery[tid] += numbery[tid + 1];
}*/
if (tid == 0) {
atomicAdd(&(result[0]), numberx[0]);
atomicAdd(&(result[1]), numbery[0]);
//printf("%f %f\n",result[0], result[1]);
}
}
__global__ void cosineSimilarity(cufftComplex* s1, cufftComplex* s2, float* result, size_t size)
{
__shared__ float t1[BLOCK_DIM];
__shared__ float t2[BLOCK_DIM];
__shared__ float t3[BLOCK_DIM];
int index = threadIdx.x + blockIdx.x * blockDim.x;
int tid = threadIdx.x;
int blockSize = blockDim.x;
//printf("%d\n", result);
//calculate currentnumber
t1[tid] = 0.0;
t2[tid] = 0.0;
t3[tid] = 0.0;
if (index < size) {
//printf("%d\n", result);
float x = sqrtf(s1[index].x * s1[index].x + s1[index].y*s1[index].y);
float y = sqrtf(s2[index].x * s2[index].x + s2[index].y*s2[index].y);
t1[tid] += x*y;
t2[tid] += x*x;
t3[tid] += y*y;
}
else {
t1[tid] = 0.0;
t2[tid] = 0.0;
t3[tid] = 0.0;
}
__syncthreads();
//reduction
if (blockSize >= 1024) {
if (tid < 512) {
t1[tid] += t1[tid + 512];
t2[tid] += t2[tid + 512];
t3[tid] += t3[tid + 512];
} __syncthreads();
}
if (blockSize >= 512) {
if (tid < 256) {
t1[tid] += t1[tid + 256];
t2[tid] += t2[tid + 256];
t3[tid] += t3[tid + 256];
} __syncthreads();
}
if (blockSize >= 256) {
if (tid < 128) {
t1[tid] += t1[tid + 128];
t2[tid] += t2[tid + 128];
t3[tid] += t3[tid + 128];
} __syncthreads();
}
if (blockSize >= 128) {
if (tid < 64) {
t1[tid] += t1[tid + 64];
t2[tid] += t2[tid + 64];
t3[tid] += t3[tid + 64];
} __syncthreads();
}
if (tid < 32)
{
t1[tid] += t1[tid + 32];
t1[tid] += t1[tid + 16];
t1[tid] += t1[tid + 8];
t1[tid] += t1[tid + 4];
t1[tid] += t1[tid + 2];
t1[tid] += t1[tid + 1];
t2[tid] += t2[tid + 32];
t2[tid] += t2[tid + 16];
t2[tid] += t2[tid + 8];
t2[tid] += t2[tid + 4];
t2[tid] += t2[tid + 2];
t2[tid] += t2[tid + 1];
t3[tid] += t3[tid + 32];
t3[tid] += t3[tid + 16];
t3[tid] += t3[tid + 8];
t3[tid] += t3[tid + 4];
t3[tid] += t3[tid + 2];
t3[tid] += t3[tid + 1];
}
/*
for (unsigned int s = blockDim.x / 2; s>0; s >>= 1)
{
if (tid < s) {
t1[tid] += t1[tid + s];
t2[tid] += t2[tid + s];
t3[tid] += t3[tid + s];
}
__syncthreads();
}
// printf("%f\n\n", result[1]);
*/
if (tid == 0) {
atomicAdd(&(result[0]), t1[0]);
atomicAdd(&(result[1]), t2[0]);
atomicAdd(&(result[2]), t3[0]);
}
}
cudaError_t dist(cufftComplex* s1, cufftComplex* s2, size_t size, float * answer)
{
cudaError_t cudaStatus;
cufftComplex * dev_s1;
cufftComplex * dev_s2;
float * result;
//cout << s1[0].y << endl;
// Choose which GPU to run on, change this on a multi-GPU system.
cudaStatus = cudaSetDevice(0);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaSetDevice failed! Do you have a CUDA-capable GPU installed?");
goto Error;
}
// Allocate GPU buffers for three vectors (two input, one output) .
cudaStatus = cudaMalloc((void**)&dev_s1, size * sizeof(cufftComplex));
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMalloc failed! 0");
goto Error;
}
cudaStatus = cudaMalloc((void**)&dev_s2, size * sizeof(cufftComplex));
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMalloc failed! 1");
goto Error;
}
cudaStatus = cudaMalloc((void**)&result, 3 * sizeof(float));
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMalloc failed! 2");
goto Error;
}
//copy data
cudaStatus = cudaMemcpy(dev_s1, s1, size * sizeof(cufftComplex), cudaMemcpyHostToDevice);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMemcpy failed! 3");
goto Error;
}
cudaStatus = cudaMemcpy(dev_s2, s2, size * sizeof(cufftComplex), cudaMemcpyHostToDevice);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMemcpy failed! 4");
goto Error;
}
// cudaStatus = cudaMemcpy(result, answer, 2 * sizeof(float), cudaMemcpyHostToDevice);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMemcpy failed! 5");
goto Error;
}
int blockSize = BLOCK_DIM;
int gridSize = (size - 1) / 1024 + 1;
//cout << gridSize<<" "<<size<<endl;
float* dev_c;
cudaMalloc((void**)&dev_c, size * sizeof(int));
//calculate kernel time
cudaEvent_t start, stop;
float elapsedTime;
cudaEventCreate(&start);
cudaEventRecord(start, 0);
//distanceKernel<<<gridSize, blockSize >>>(dev_s1, dev_s2, result, size);
cosineSimilarity << <gridSize, blockSize >> >(dev_s1, dev_s2, result, size);
// Check for any errors launching the kernel
cudaStatus = cudaGetLastError();
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "addKernel launch failed: %s\n", cudaGetErrorString(cudaStatus));
goto Error;
}
// cudaDeviceSynchronize waits for the kernel to finish, and returns
// any errors encountered during the launch.
cudaStatus = cudaDeviceSynchronize();
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaDeviceSynchronize returned error code %d after launching addKernel!\n", cudaStatus);
goto Error;
}
cudaEventCreate(&stop);
cudaEventRecord(stop, 0);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&elapsedTime, start, stop);
// Copy output vector from GPU buffer to host memory.
cudaStatus = cudaMemcpy(answer, result, 3 * sizeof(float), cudaMemcpyDeviceToHost);
if (cudaStatus != cudaSuccess) {
fprintf(stderr, "cudaMemcpy last failed!");
goto Error;
}
//printf("serial ans : %f\n", s2[881903].x);
float ansx = 0.0;
float ansy = 0.0;
//serialValidation
for (int i = 0; i < size; i++) {
ansx += abs(s1[i].x - s2[i].x);
ansy += abs(s1[i].y - s2[i].y);
//ans += sqrt(pow(x, 2) + pow(y, 2));
}
/*
//serial cosine distance
float t1=0, t2=0, t3=0;
for (int i = 0; i < size; i++) {
float x = sqrtf(s1[i].x * s1[i].x + s1[i].y*s1[i].y);
float y = sqrtf(s2[i].x * s2[i].x + s2[i].y*s2[i].y);
t1 += x*y;
t2 += x*x;
t3 += y*y;
//ansy += abs(s1[i].y - s2[i].y);
//ans += sqrt(pow(x, 2) + pow(y, 2));
}
//cout << size<<endl;
//printf("GPU answer : %f + %f i\n", answer[0]/1000000,answer[1] / 1000000);
//printf("SERIAL answer : %f + %f i", ansx / 1000000, ansy / 1000000);
//cout << (answer[0]) <<" "<< answer[1]<<" " << answer[2]<<endl;
printf("cosineDistance = %f \n", abs(t1) / (sqrtf(t2)*sqrtf(t3)));
*/
//todo uncomment for enabling log
//printf("cosineDistance GPU = %f \n", abs(answer[0]) / (sqrtf(answer[1])*sqrtf(answer[2])));
//printf("Elapsed time : %f ms\n\n", elapsedTime);
answer[0] = abs(answer[0]) / (sqrtf(answer[1])*sqrtf(answer[2]));
Error:
cudaFree(dev_s1);
cudaFree(dev_s2);
cudaFree(result);
return cudaStatus;
}
float DifferenceKernel::distance(vector<float>* musicVector, vector<float>* sampleVector)
{
int musicSize = musicVector->size();
int sampleSize = sampleVector->size();
int steps = musicSize / sampleSize * 2;
float* ans = (float *)malloc(3 * sizeof(float));
float maxSimilarity = 0.0;
FourierTransform fourierTransform;
float * sample = (float*)malloc(sampleSize * sizeof(float));
float * music = (float*)malloc(sampleSize * sizeof(float));
copy(sampleVector->begin(), sampleVector->end(), sample);
cufftComplex * smpl = fourierTransform.transform(sample, sampleSize);
cufftComplex * msc;
for (int i = 0; i < steps; i++) {
if (i*(sampleSize / 2) + sampleSize >= musicSize) {
break;
}
#pragma omp parallel for num_threads(8)
for (int j = i*(sampleSize / 2); j < i * (sampleSize / 2) + sampleSize; j++) {
music[j - i*sampleSize / 2] = musicVector->at(j);
//cout << j << " "<< music[j - i*sampleSize];
}
//cout << ((i + 1)*sampleSize) - i*sampleSize << endl;;
//fourier transform
msc = fourierTransform.transform(music, sampleSize);
//lunch kernell
dist(smpl, msc, sampleSize / 2 + 1, ans);
if (ans[0] > maxSimilarity) {
maxSimilarity = ans[0];
}
free(msc);
//msc = NULL;
}
//very rare case;
if (musicSize - sampleSize == 0) {
return maxSimilarity;
}
#pragma omp parallel for num_threads(8)
for (int j = musicSize - sampleSize; j < musicSize; j++) {
music[j - (musicSize - sampleSize)] = musicVector->at(j);
//cout << j << " " << music[j - i*musicSize];
}
msc = fourierTransform.transform(music, sampleSize);
dist(smpl, msc, sampleSize / 2 + 1, ans);
if (ans[0] > maxSimilarity) {
maxSimilarity = ans[0];
}
free(msc);
free(smpl);
free(music);
free(ans);
cudaDeviceReset();
//copy(musicSize-sampleSize, musicSize, music);
//cout << musicSize - sampleSize << " " << musicSize;
cout << "max similarity found :" << maxSimilarity << endl;
return maxSimilarity;
}
|
3a06108e235e912951daf81d132afd44e38676bf.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void cudaSRectifier_propagate_kernel(float* x, float* y, unsigned int size, float leakSlope, int shifting, float clipping)
{
const unsigned int index = blockIdx.x * blockDim.x + threadIdx.x;
const unsigned int stride = blockDim.x * gridDim.x;
for (unsigned int i = index; i < size; i += stride) {
float value = x[i];
if (shifting > 0)
value /= (1 << shifting);
else if (shifting < 0)
value *= (1 << (-shifting));
if (clipping > 0.0f)
y[i] = (value > 0.0f) ? min(value, clipping) : leakSlope * value;
else
y[i] = (value > 0.0f) ? value : leakSlope * value;
}
} | 3a06108e235e912951daf81d132afd44e38676bf.cu | #include "includes.h"
__global__ void cudaSRectifier_propagate_kernel(float* x, float* y, unsigned int size, float leakSlope, int shifting, float clipping)
{
const unsigned int index = blockIdx.x * blockDim.x + threadIdx.x;
const unsigned int stride = blockDim.x * gridDim.x;
for (unsigned int i = index; i < size; i += stride) {
float value = x[i];
if (shifting > 0)
value /= (1 << shifting);
else if (shifting < 0)
value *= (1 << (-shifting));
if (clipping > 0.0f)
y[i] = (value > 0.0f) ? min(value, clipping) : leakSlope * value;
else
y[i] = (value > 0.0f) ? value : leakSlope * value;
}
} |
79baf3b5f874a092c876d0f26aaa7947c4777bae.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <float.h>
#include <math.h>
#include <time.h>
#include "../../constants.h"
#define N_RADIUS 4
#define N_THREADS_PER_PLANE_DIM_X 64
#define N_THREADS_PER_PLANE_DIM_Y 16
__global__ void target_inner_3d_kernel(
llint nx, llint ny, llint nz,
llint x3, llint x4, llint y3, llint y4, llint z3, llint z4,
llint lx, llint ly, llint lz,
float hdx_2, float hdy_2, float hdz_2,
float coef0,
float coefx_1, float coefx_2, float coefx_3, float coefx_4,
float coefy_1, float coefy_2, float coefy_3, float coefy_4,
float coefz_1, float coefz_2, float coefz_3, float coefz_4,
const float *__restrict__ u, float *__restrict__ v, const float *__restrict__ vp,
const float *__restrict__ phi, const float *__restrict__ eta
) {
__shared__ float s_u[N_THREADS_PER_PLANE_DIM_Y+2*N_RADIUS][N_THREADS_PER_PLANE_DIM_X+2*N_RADIUS];
const llint j0 = y3 + blockIdx.y * blockDim.y;
const llint k0 = z3 + blockIdx.x * blockDim.x;
const llint je = min(j0 + N_THREADS_PER_PLANE_DIM_Y, y4);
const llint ke = min(k0 + N_THREADS_PER_PLANE_DIM_X, z4);
const llint j = j0 + threadIdx.y;
const llint k = k0 + threadIdx.x;
const llint sje = (j0+N_THREADS_PER_PLANE_DIM_Y<y4) ? N_THREADS_PER_PLANE_DIM_Y : ((y4-y3-1)%N_THREADS_PER_PLANE_DIM_Y+1);
const llint ske = (k0+N_THREADS_PER_PLANE_DIM_X<z4) ? N_THREADS_PER_PLANE_DIM_X : ((z4-z3-1)%N_THREADS_PER_PLANE_DIM_X+1);
const llint suj = threadIdx.y + N_RADIUS;
const llint suk = threadIdx.x + N_RADIUS;
float infront1, infront2, infront3, infront4; // variables for input in front of the current slice
float behind1, behind2, behind3, behind4; // variables for input behind the current slice
float current; // input value in the current slice
behind3 = u[IDX3_l(x3-4,j,k)];
behind2 = u[IDX3_l(x3-3,j,k)];
behind1 = u[IDX3_l(x3-2,j,k)];
current = u[IDX3_l(x3-1,j,k)];
infront1 = u[IDX3_l(x3+0,j,k)];
infront2 = u[IDX3_l(x3+1,j,k)];
infront3 = u[IDX3_l(x3+2,j,k)];
infront4 = u[IDX3_l(x3+3,j,k)];
for (llint i = x3; i < x4; i++) {
// advance the slice (move the thread-front)
behind4 = behind3;
behind3 = behind2;
behind2 = behind1;
behind1 = current;
current = infront1;
infront1 = infront2;
infront2 = infront3;
infront3 = infront4;
infront4 = u[IDX3_l(i+N_RADIUS,j,k)];
__syncthreads();
if (threadIdx.y < N_RADIUS) {
s_u[threadIdx.y][suk] = u[IDX3_l(i, j - N_RADIUS, k)];
s_u[threadIdx.y+sje+N_RADIUS][suk] = u[IDX3_l(i, threadIdx.y+je, k)];
}
if (threadIdx.x < N_RADIUS) {
s_u[suj][threadIdx.x] = u[IDX3_l(i,j,k - N_RADIUS)];
s_u[suj][threadIdx.x+ske+N_RADIUS] = u[IDX3_l(i,j,threadIdx.x+ke)];
}
s_u[suj][suk] = u[IDX3_l(i,j,k)];
__syncthreads();
if (j < y4 && k < z4) {
float lap = __fmaf_rn(coef0, current
, __fmaf_rn(coefx_1, __fadd_rn(infront1,behind1)
, __fmaf_rn(coefy_1, __fadd_rn(s_u[suj+1][suk],s_u[suj-1][suk])
, __fmaf_rn(coefz_1, __fadd_rn(s_u[suj][suk+1],s_u[suj][suk-1])
, __fmaf_rn(coefx_2, __fadd_rn(infront2,behind2)
, __fmaf_rn(coefy_2, __fadd_rn(s_u[suj+2][suk],s_u[suj-2][suk])
, __fmaf_rn(coefz_2, __fadd_rn(s_u[suj][suk+2],s_u[suj][suk-2])
, __fmaf_rn(coefx_3, __fadd_rn(infront3,behind3)
, __fmaf_rn(coefy_3, __fadd_rn(s_u[suj+3][suk],s_u[suj-3][suk])
, __fmaf_rn(coefz_3, __fadd_rn(s_u[suj][suk+3],s_u[suj][suk-3])
, __fmaf_rn(coefx_4, __fadd_rn(infront4,behind4)
, __fmaf_rn(coefy_4, __fadd_rn(s_u[suj+4][suk],s_u[suj-4][suk])
, __fmul_rn(coefz_4, __fadd_rn(s_u[suj][suk+4],s_u[suj][suk-4])
)))))))))))));
v[IDX3_l(i,j,k)] = __fmaf_rn(2.f, current,
__fmaf_rn(vp[IDX3(i,j,k)], lap, -v[IDX3_l(i,j,k)])
);
}
}
}
__global__ void target_pml_3d_kernel(
llint nx, llint ny, llint nz,
llint x3, llint x4, llint y3, llint y4, llint z3, llint z4,
llint lx, llint ly, llint lz,
float hdx_2, float hdy_2, float hdz_2,
float coef0,
float coefx_1, float coefx_2, float coefx_3, float coefx_4,
float coefy_1, float coefy_2, float coefy_3, float coefy_4,
float coefz_1, float coefz_2, float coefz_3, float coefz_4,
const float *__restrict__ u, float *__restrict__ v, const float *__restrict__ vp,
float *__restrict__ phi, const float *__restrict__ eta
) {
__shared__ float s_u[N_THREADS_PER_PLANE_DIM_Y+2*N_RADIUS][N_THREADS_PER_PLANE_DIM_X+2*N_RADIUS];
const llint j0 = y3 + blockIdx.y * blockDim.y;
const llint k0 = z3 + blockIdx.x * blockDim.x;
const llint je = min(j0 + N_THREADS_PER_PLANE_DIM_Y, y4);
const llint ke = min(k0 + N_THREADS_PER_PLANE_DIM_X, z4);
const llint j = j0 + threadIdx.y;
const llint k = k0 + threadIdx.x;
const llint sje = (j0+N_THREADS_PER_PLANE_DIM_Y<y4) ? N_THREADS_PER_PLANE_DIM_Y : ((y4-y3-1)%N_THREADS_PER_PLANE_DIM_Y+1);
const llint ske = (k0+N_THREADS_PER_PLANE_DIM_X<z4) ? N_THREADS_PER_PLANE_DIM_X : ((z4-z3-1)%N_THREADS_PER_PLANE_DIM_X+1);
const llint suj = threadIdx.y + N_RADIUS;
const llint suk = threadIdx.x + N_RADIUS;
float infront1, infront2, infront3, infront4; // variables for input in front of the current slice
float behind1, behind2, behind3, behind4; // variables for input behind the current slice
float current; // input value in the current slice
behind3 = u[IDX3_l(x3-4,j,k)];
behind2 = u[IDX3_l(x3-3,j,k)];
behind1 = u[IDX3_l(x3-2,j,k)];
current = u[IDX3_l(x3-1,j,k)];
infront1 = u[IDX3_l(x3+0,j,k)];
infront2 = u[IDX3_l(x3+1,j,k)];
infront3 = u[IDX3_l(x3+2,j,k)];
infront4 = u[IDX3_l(x3+3,j,k)];
for (llint i = x3; i < x4; i++) {
// advance the slice (move the thread-front)
behind4 = behind3;
behind3 = behind2;
behind2 = behind1;
behind1 = current;
current = infront1;
infront1 = infront2;
infront2 = infront3;
infront3 = infront4;
infront4 = u[IDX3_l(i+N_RADIUS,j,k)];
__syncthreads();
if (threadIdx.y < N_RADIUS) {
s_u[threadIdx.y][suk] = u[IDX3_l(i, j - N_RADIUS, k)];
s_u[threadIdx.y+sje+N_RADIUS][suk] = u[IDX3_l(i, threadIdx.y+je, k)];
}
if (threadIdx.x < N_RADIUS) {
s_u[suj][threadIdx.x] = u[IDX3_l(i,j,k - N_RADIUS)];
s_u[suj][threadIdx.x+ske+N_RADIUS] = u[IDX3_l(i,j,threadIdx.x+ke)];
}
s_u[suj][suk] = u[IDX3_l(i,j,k)];
__syncthreads();
if (j < y4 && k < z4) {
float lap = __fmaf_rn(coef0, current
, __fmaf_rn(coefx_1, __fadd_rn(infront1,behind1)
, __fmaf_rn(coefy_1, __fadd_rn(s_u[suj+1][suk],s_u[suj-1][suk])
, __fmaf_rn(coefz_1, __fadd_rn(s_u[suj][suk+1],s_u[suj][suk-1])
, __fmaf_rn(coefx_2, __fadd_rn(infront2,behind2)
, __fmaf_rn(coefy_2, __fadd_rn(s_u[suj+2][suk],s_u[suj-2][suk])
, __fmaf_rn(coefz_2, __fadd_rn(s_u[suj][suk+2],s_u[suj][suk-2])
, __fmaf_rn(coefx_3, __fadd_rn(infront3,behind3)
, __fmaf_rn(coefy_3, __fadd_rn(s_u[suj+3][suk],s_u[suj-3][suk])
, __fmaf_rn(coefz_3, __fadd_rn(s_u[suj][suk+3],s_u[suj][suk-3])
, __fmaf_rn(coefx_4, __fadd_rn(infront4,behind4)
, __fmaf_rn(coefy_4, __fadd_rn(s_u[suj+4][suk],s_u[suj-4][suk])
, __fmul_rn(coefz_4, __fadd_rn(s_u[suj][suk+4],s_u[suj][suk-4])
)))))))))))));
const float s_eta_c = eta[IDX3_eta1(i,j,k)];
v[IDX3_l(i,j,k)] = __fdiv_rn(
__fmaf_rn(
__fmaf_rn(2.f, s_eta_c,
__fsub_rn(2.f,
__fmul_rn(s_eta_c, s_eta_c)
)
),
current,
__fmaf_rn(
vp[IDX3(i,j,k)],
__fadd_rn(lap, phi[IDX3(i,j,k)]),
-v[IDX3_l(i,j,k)]
)
),
__fmaf_rn(2.f, s_eta_c, 1.f)
);
phi[IDX3(i,j,k)] = __fdiv_rn(
__fsub_rn(
phi[IDX3(i,j,k)],
__fmaf_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i+1,j,k)], eta[IDX3_eta1(i-1,j,k)]),
__fsub_rn(infront1,behind1)
), hdx_2,
__fmaf_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i,j+1,k)], eta[IDX3_eta1(i,j-1,k)]),
__fsub_rn(s_u[suj+1][suk], s_u[suj-1][suk])
), hdy_2,
__fmul_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i,j,k+1)], eta[IDX3_eta1(i,j,k-1)]),
__fsub_rn(s_u[suj][suk+1], s_u[suj][suk-1])
),
hdz_2)
))
)
,
__fadd_rn(1.f, s_eta_c)
);
}
}
}
__global__ void kernel_add_source_kernel(float *g_u, llint idx, float source) {
g_u[idx] += source;
}
extern "C" void target(
uint nsteps, double *time_kernel,
llint nx, llint ny, llint nz,
llint x1, llint x2, llint x3, llint x4, llint x5, llint x6,
llint y1, llint y2, llint y3, llint y4, llint y5, llint y6,
llint z1, llint z2, llint z3, llint z4, llint z5, llint z6,
llint lx, llint ly, llint lz,
llint sx, llint sy, llint sz,
float hdx_2, float hdy_2, float hdz_2,
const float *__restrict__ coefx, const float *__restrict__ coefy, const float *__restrict__ coefz,
float *__restrict__ u, const float *__restrict__ v, const float *__restrict__ vp,
const float *__restrict__ phi, const float *__restrict__ eta, const float *__restrict__ source
) {
struct timespec start, end;
const llint size_u = (nx + 2 * lx) * (ny + 2 * ly) * (nz + 2 * lz);
const llint size_v = size_u;
const llint size_phi = nx*ny*nz;
const llint size_vp = size_phi;
const llint size_eta = (nx+2)*(ny+2)*(nz+2);
const llint size_u_ext = (nx + 2 * lx)
* ((((ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y + 1) * N_THREADS_PER_PLANE_DIM_Y) + 2 * ly)
* ((((nz+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X + 1) * N_THREADS_PER_PLANE_DIM_X) + 2 * lz);
float *d_u, *d_v, *d_vp, *d_phi, *d_eta;
hipMalloc(&d_u, sizeof(float) * size_u_ext);
hipMalloc(&d_v, sizeof(float) * size_u_ext);
hipMalloc(&d_vp, sizeof(float) * size_vp);
hipMalloc(&d_phi, sizeof(float) * size_phi);
hipMalloc(&d_eta, sizeof(float) * size_eta);
hipMemcpy(d_u, u, sizeof(float) * size_u, hipMemcpyHostToDevice);
hipMemcpy(d_v, v, sizeof(float) * size_v, hipMemcpyHostToDevice);
hipMemcpy(d_vp, vp, sizeof(float) * size_vp, hipMemcpyHostToDevice);
hipMemcpy(d_phi, phi, sizeof(float) * size_phi, hipMemcpyHostToDevice);
hipMemcpy(d_eta, eta, sizeof(float) * size_eta, hipMemcpyHostToDevice);
const llint xmin = 0; const llint xmax = nx;
const llint ymin = 0; const llint ymax = ny;
dim3 threadsPerBlock(N_THREADS_PER_PLANE_DIM_X, N_THREADS_PER_PLANE_DIM_Y, 1);
int num_streams = 7;
hipStream_t streams[num_streams];
for (int i = 0; i < num_streams; i++) {
hipStreamCreateWithFlags(&(streams[i]), hipStreamNonBlocking);
}
const uint npo = 100;
for (uint istep = 1; istep <= nsteps; ++istep) {
clock_gettime(CLOCK_REALTIME, &start);
dim3 n_block_front(
(z2-z1+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_front), dim3(threadsPerBlock), 0, streams[1], nx,ny,nz,
xmin,xmax,ymin,ymax,z1,z2,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_top(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y2-y1+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_top), dim3(threadsPerBlock), 0, streams[2], nx,ny,nz,
xmin,xmax,y1,y2,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_left(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_left), dim3(threadsPerBlock), 0, streams[3], nx,ny,nz,
x1,x2,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_center(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
hipLaunchKernelGGL(( target_inner_3d_kernel), dim3(n_block_center), dim3(threadsPerBlock), 0, streams[0], nx,ny,nz,
x3,x4,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_right(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_right), dim3(threadsPerBlock), 0, streams[4], nx,ny,nz,
x5,x6,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_bottom(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y6-y5+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_bottom), dim3(threadsPerBlock), 0, streams[5], nx,ny,nz,
xmin,xmax,y5,y6,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_back(
(z6-z5+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
hipLaunchKernelGGL(( target_pml_3d_kernel), dim3(n_block_back), dim3(threadsPerBlock), 0, streams[6], nx,ny,nz,
xmin,xmax,ymin,ymax,z5,z6,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
for (int i = 0; i < num_streams; i++) {
hipStreamSynchronize(streams[i]);
}
hipLaunchKernelGGL(( kernel_add_source_kernel), dim3(1), dim3(1), 0, 0, d_v, IDX3_l(sx,sy,sz), source[istep]);
clock_gettime(CLOCK_REALTIME, &end);
*time_kernel += (end.tv_sec - start.tv_sec) +
(double)(end.tv_nsec - start.tv_nsec) / 1.0e9;
float *t = d_u;
d_u = d_v;
d_v = t;
// Print out
if (istep % npo == 0) {
printf("time step %u / %u\n", istep, nsteps);
}
}
for (int i = 0; i < num_streams; i++) {
hipStreamDestroy(streams[i]);
}
hipMemcpy(u, d_u, sizeof(float) * size_u, hipMemcpyDeviceToHost);
hipFree(d_u);
hipFree(d_v);
hipFree(d_vp);
hipFree(d_phi);
hipFree(d_eta);
}
| 79baf3b5f874a092c876d0f26aaa7947c4777bae.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
#include <float.h>
#include <math.h>
#include <time.h>
#include "../../constants.h"
#define N_RADIUS 4
#define N_THREADS_PER_PLANE_DIM_X 64
#define N_THREADS_PER_PLANE_DIM_Y 16
__global__ void target_inner_3d_kernel(
llint nx, llint ny, llint nz,
llint x3, llint x4, llint y3, llint y4, llint z3, llint z4,
llint lx, llint ly, llint lz,
float hdx_2, float hdy_2, float hdz_2,
float coef0,
float coefx_1, float coefx_2, float coefx_3, float coefx_4,
float coefy_1, float coefy_2, float coefy_3, float coefy_4,
float coefz_1, float coefz_2, float coefz_3, float coefz_4,
const float *__restrict__ u, float *__restrict__ v, const float *__restrict__ vp,
const float *__restrict__ phi, const float *__restrict__ eta
) {
__shared__ float s_u[N_THREADS_PER_PLANE_DIM_Y+2*N_RADIUS][N_THREADS_PER_PLANE_DIM_X+2*N_RADIUS];
const llint j0 = y3 + blockIdx.y * blockDim.y;
const llint k0 = z3 + blockIdx.x * blockDim.x;
const llint je = min(j0 + N_THREADS_PER_PLANE_DIM_Y, y4);
const llint ke = min(k0 + N_THREADS_PER_PLANE_DIM_X, z4);
const llint j = j0 + threadIdx.y;
const llint k = k0 + threadIdx.x;
const llint sje = (j0+N_THREADS_PER_PLANE_DIM_Y<y4) ? N_THREADS_PER_PLANE_DIM_Y : ((y4-y3-1)%N_THREADS_PER_PLANE_DIM_Y+1);
const llint ske = (k0+N_THREADS_PER_PLANE_DIM_X<z4) ? N_THREADS_PER_PLANE_DIM_X : ((z4-z3-1)%N_THREADS_PER_PLANE_DIM_X+1);
const llint suj = threadIdx.y + N_RADIUS;
const llint suk = threadIdx.x + N_RADIUS;
float infront1, infront2, infront3, infront4; // variables for input “in front of” the current slice
float behind1, behind2, behind3, behind4; // variables for input “behind” the current slice
float current; // input value in the current slice
behind3 = u[IDX3_l(x3-4,j,k)];
behind2 = u[IDX3_l(x3-3,j,k)];
behind1 = u[IDX3_l(x3-2,j,k)];
current = u[IDX3_l(x3-1,j,k)];
infront1 = u[IDX3_l(x3+0,j,k)];
infront2 = u[IDX3_l(x3+1,j,k)];
infront3 = u[IDX3_l(x3+2,j,k)];
infront4 = u[IDX3_l(x3+3,j,k)];
for (llint i = x3; i < x4; i++) {
// advance the slice (move the thread-front)
behind4 = behind3;
behind3 = behind2;
behind2 = behind1;
behind1 = current;
current = infront1;
infront1 = infront2;
infront2 = infront3;
infront3 = infront4;
infront4 = u[IDX3_l(i+N_RADIUS,j,k)];
__syncthreads();
if (threadIdx.y < N_RADIUS) {
s_u[threadIdx.y][suk] = u[IDX3_l(i, j - N_RADIUS, k)];
s_u[threadIdx.y+sje+N_RADIUS][suk] = u[IDX3_l(i, threadIdx.y+je, k)];
}
if (threadIdx.x < N_RADIUS) {
s_u[suj][threadIdx.x] = u[IDX3_l(i,j,k - N_RADIUS)];
s_u[suj][threadIdx.x+ske+N_RADIUS] = u[IDX3_l(i,j,threadIdx.x+ke)];
}
s_u[suj][suk] = u[IDX3_l(i,j,k)];
__syncthreads();
if (j < y4 && k < z4) {
float lap = __fmaf_rn(coef0, current
, __fmaf_rn(coefx_1, __fadd_rn(infront1,behind1)
, __fmaf_rn(coefy_1, __fadd_rn(s_u[suj+1][suk],s_u[suj-1][suk])
, __fmaf_rn(coefz_1, __fadd_rn(s_u[suj][suk+1],s_u[suj][suk-1])
, __fmaf_rn(coefx_2, __fadd_rn(infront2,behind2)
, __fmaf_rn(coefy_2, __fadd_rn(s_u[suj+2][suk],s_u[suj-2][suk])
, __fmaf_rn(coefz_2, __fadd_rn(s_u[suj][suk+2],s_u[suj][suk-2])
, __fmaf_rn(coefx_3, __fadd_rn(infront3,behind3)
, __fmaf_rn(coefy_3, __fadd_rn(s_u[suj+3][suk],s_u[suj-3][suk])
, __fmaf_rn(coefz_3, __fadd_rn(s_u[suj][suk+3],s_u[suj][suk-3])
, __fmaf_rn(coefx_4, __fadd_rn(infront4,behind4)
, __fmaf_rn(coefy_4, __fadd_rn(s_u[suj+4][suk],s_u[suj-4][suk])
, __fmul_rn(coefz_4, __fadd_rn(s_u[suj][suk+4],s_u[suj][suk-4])
)))))))))))));
v[IDX3_l(i,j,k)] = __fmaf_rn(2.f, current,
__fmaf_rn(vp[IDX3(i,j,k)], lap, -v[IDX3_l(i,j,k)])
);
}
}
}
__global__ void target_pml_3d_kernel(
llint nx, llint ny, llint nz,
llint x3, llint x4, llint y3, llint y4, llint z3, llint z4,
llint lx, llint ly, llint lz,
float hdx_2, float hdy_2, float hdz_2,
float coef0,
float coefx_1, float coefx_2, float coefx_3, float coefx_4,
float coefy_1, float coefy_2, float coefy_3, float coefy_4,
float coefz_1, float coefz_2, float coefz_3, float coefz_4,
const float *__restrict__ u, float *__restrict__ v, const float *__restrict__ vp,
float *__restrict__ phi, const float *__restrict__ eta
) {
__shared__ float s_u[N_THREADS_PER_PLANE_DIM_Y+2*N_RADIUS][N_THREADS_PER_PLANE_DIM_X+2*N_RADIUS];
const llint j0 = y3 + blockIdx.y * blockDim.y;
const llint k0 = z3 + blockIdx.x * blockDim.x;
const llint je = min(j0 + N_THREADS_PER_PLANE_DIM_Y, y4);
const llint ke = min(k0 + N_THREADS_PER_PLANE_DIM_X, z4);
const llint j = j0 + threadIdx.y;
const llint k = k0 + threadIdx.x;
const llint sje = (j0+N_THREADS_PER_PLANE_DIM_Y<y4) ? N_THREADS_PER_PLANE_DIM_Y : ((y4-y3-1)%N_THREADS_PER_PLANE_DIM_Y+1);
const llint ske = (k0+N_THREADS_PER_PLANE_DIM_X<z4) ? N_THREADS_PER_PLANE_DIM_X : ((z4-z3-1)%N_THREADS_PER_PLANE_DIM_X+1);
const llint suj = threadIdx.y + N_RADIUS;
const llint suk = threadIdx.x + N_RADIUS;
float infront1, infront2, infront3, infront4; // variables for input “in front of” the current slice
float behind1, behind2, behind3, behind4; // variables for input “behind” the current slice
float current; // input value in the current slice
behind3 = u[IDX3_l(x3-4,j,k)];
behind2 = u[IDX3_l(x3-3,j,k)];
behind1 = u[IDX3_l(x3-2,j,k)];
current = u[IDX3_l(x3-1,j,k)];
infront1 = u[IDX3_l(x3+0,j,k)];
infront2 = u[IDX3_l(x3+1,j,k)];
infront3 = u[IDX3_l(x3+2,j,k)];
infront4 = u[IDX3_l(x3+3,j,k)];
for (llint i = x3; i < x4; i++) {
// advance the slice (move the thread-front)
behind4 = behind3;
behind3 = behind2;
behind2 = behind1;
behind1 = current;
current = infront1;
infront1 = infront2;
infront2 = infront3;
infront3 = infront4;
infront4 = u[IDX3_l(i+N_RADIUS,j,k)];
__syncthreads();
if (threadIdx.y < N_RADIUS) {
s_u[threadIdx.y][suk] = u[IDX3_l(i, j - N_RADIUS, k)];
s_u[threadIdx.y+sje+N_RADIUS][suk] = u[IDX3_l(i, threadIdx.y+je, k)];
}
if (threadIdx.x < N_RADIUS) {
s_u[suj][threadIdx.x] = u[IDX3_l(i,j,k - N_RADIUS)];
s_u[suj][threadIdx.x+ske+N_RADIUS] = u[IDX3_l(i,j,threadIdx.x+ke)];
}
s_u[suj][suk] = u[IDX3_l(i,j,k)];
__syncthreads();
if (j < y4 && k < z4) {
float lap = __fmaf_rn(coef0, current
, __fmaf_rn(coefx_1, __fadd_rn(infront1,behind1)
, __fmaf_rn(coefy_1, __fadd_rn(s_u[suj+1][suk],s_u[suj-1][suk])
, __fmaf_rn(coefz_1, __fadd_rn(s_u[suj][suk+1],s_u[suj][suk-1])
, __fmaf_rn(coefx_2, __fadd_rn(infront2,behind2)
, __fmaf_rn(coefy_2, __fadd_rn(s_u[suj+2][suk],s_u[suj-2][suk])
, __fmaf_rn(coefz_2, __fadd_rn(s_u[suj][suk+2],s_u[suj][suk-2])
, __fmaf_rn(coefx_3, __fadd_rn(infront3,behind3)
, __fmaf_rn(coefy_3, __fadd_rn(s_u[suj+3][suk],s_u[suj-3][suk])
, __fmaf_rn(coefz_3, __fadd_rn(s_u[suj][suk+3],s_u[suj][suk-3])
, __fmaf_rn(coefx_4, __fadd_rn(infront4,behind4)
, __fmaf_rn(coefy_4, __fadd_rn(s_u[suj+4][suk],s_u[suj-4][suk])
, __fmul_rn(coefz_4, __fadd_rn(s_u[suj][suk+4],s_u[suj][suk-4])
)))))))))))));
const float s_eta_c = eta[IDX3_eta1(i,j,k)];
v[IDX3_l(i,j,k)] = __fdiv_rn(
__fmaf_rn(
__fmaf_rn(2.f, s_eta_c,
__fsub_rn(2.f,
__fmul_rn(s_eta_c, s_eta_c)
)
),
current,
__fmaf_rn(
vp[IDX3(i,j,k)],
__fadd_rn(lap, phi[IDX3(i,j,k)]),
-v[IDX3_l(i,j,k)]
)
),
__fmaf_rn(2.f, s_eta_c, 1.f)
);
phi[IDX3(i,j,k)] = __fdiv_rn(
__fsub_rn(
phi[IDX3(i,j,k)],
__fmaf_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i+1,j,k)], eta[IDX3_eta1(i-1,j,k)]),
__fsub_rn(infront1,behind1)
), hdx_2,
__fmaf_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i,j+1,k)], eta[IDX3_eta1(i,j-1,k)]),
__fsub_rn(s_u[suj+1][suk], s_u[suj-1][suk])
), hdy_2,
__fmul_rn(
__fmul_rn(
__fsub_rn(eta[IDX3_eta1(i,j,k+1)], eta[IDX3_eta1(i,j,k-1)]),
__fsub_rn(s_u[suj][suk+1], s_u[suj][suk-1])
),
hdz_2)
))
)
,
__fadd_rn(1.f, s_eta_c)
);
}
}
}
__global__ void kernel_add_source_kernel(float *g_u, llint idx, float source) {
g_u[idx] += source;
}
extern "C" void target(
uint nsteps, double *time_kernel,
llint nx, llint ny, llint nz,
llint x1, llint x2, llint x3, llint x4, llint x5, llint x6,
llint y1, llint y2, llint y3, llint y4, llint y5, llint y6,
llint z1, llint z2, llint z3, llint z4, llint z5, llint z6,
llint lx, llint ly, llint lz,
llint sx, llint sy, llint sz,
float hdx_2, float hdy_2, float hdz_2,
const float *__restrict__ coefx, const float *__restrict__ coefy, const float *__restrict__ coefz,
float *__restrict__ u, const float *__restrict__ v, const float *__restrict__ vp,
const float *__restrict__ phi, const float *__restrict__ eta, const float *__restrict__ source
) {
struct timespec start, end;
const llint size_u = (nx + 2 * lx) * (ny + 2 * ly) * (nz + 2 * lz);
const llint size_v = size_u;
const llint size_phi = nx*ny*nz;
const llint size_vp = size_phi;
const llint size_eta = (nx+2)*(ny+2)*(nz+2);
const llint size_u_ext = (nx + 2 * lx)
* ((((ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y + 1) * N_THREADS_PER_PLANE_DIM_Y) + 2 * ly)
* ((((nz+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X + 1) * N_THREADS_PER_PLANE_DIM_X) + 2 * lz);
float *d_u, *d_v, *d_vp, *d_phi, *d_eta;
cudaMalloc(&d_u, sizeof(float) * size_u_ext);
cudaMalloc(&d_v, sizeof(float) * size_u_ext);
cudaMalloc(&d_vp, sizeof(float) * size_vp);
cudaMalloc(&d_phi, sizeof(float) * size_phi);
cudaMalloc(&d_eta, sizeof(float) * size_eta);
cudaMemcpy(d_u, u, sizeof(float) * size_u, cudaMemcpyHostToDevice);
cudaMemcpy(d_v, v, sizeof(float) * size_v, cudaMemcpyHostToDevice);
cudaMemcpy(d_vp, vp, sizeof(float) * size_vp, cudaMemcpyHostToDevice);
cudaMemcpy(d_phi, phi, sizeof(float) * size_phi, cudaMemcpyHostToDevice);
cudaMemcpy(d_eta, eta, sizeof(float) * size_eta, cudaMemcpyHostToDevice);
const llint xmin = 0; const llint xmax = nx;
const llint ymin = 0; const llint ymax = ny;
dim3 threadsPerBlock(N_THREADS_PER_PLANE_DIM_X, N_THREADS_PER_PLANE_DIM_Y, 1);
int num_streams = 7;
cudaStream_t streams[num_streams];
for (int i = 0; i < num_streams; i++) {
cudaStreamCreateWithFlags(&(streams[i]), cudaStreamNonBlocking);
}
const uint npo = 100;
for (uint istep = 1; istep <= nsteps; ++istep) {
clock_gettime(CLOCK_REALTIME, &start);
dim3 n_block_front(
(z2-z1+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
target_pml_3d_kernel<<<n_block_front, threadsPerBlock, 0, streams[1]>>>(nx,ny,nz,
xmin,xmax,ymin,ymax,z1,z2,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_top(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y2-y1+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
target_pml_3d_kernel<<<n_block_top, threadsPerBlock, 0, streams[2]>>>(nx,ny,nz,
xmin,xmax,y1,y2,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_left(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
target_pml_3d_kernel<<<n_block_left, threadsPerBlock, 0, streams[3]>>>(nx,ny,nz,
x1,x2,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_center(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y);
target_inner_3d_kernel<<<n_block_center, threadsPerBlock, 0, streams[0]>>>(nx,ny,nz,
x3,x4,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_right(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y4-y3+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
target_pml_3d_kernel<<<n_block_right, threadsPerBlock, 0, streams[4]>>>(nx,ny,nz,
x5,x6,y3,y4,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_bottom(
(z4-z3+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(y6-y5+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
target_pml_3d_kernel<<<n_block_bottom, threadsPerBlock, 0, streams[5]>>>(nx,ny,nz,
xmin,xmax,y5,y6,z3,z4,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
dim3 n_block_back(
(z6-z5+N_THREADS_PER_PLANE_DIM_X-1) / N_THREADS_PER_PLANE_DIM_X,
(ny+N_THREADS_PER_PLANE_DIM_Y-1) / N_THREADS_PER_PLANE_DIM_Y,
1);
target_pml_3d_kernel<<<n_block_back, threadsPerBlock, 0, streams[6]>>>(nx,ny,nz,
xmin,xmax,ymin,ymax,z5,z6,
lx,ly,lz,
hdx_2, hdy_2, hdz_2,
coefx[0]+coefy[0]+coefz[0],
coefx[1], coefx[2], coefx[3], coefx[4],
coefy[1], coefy[2], coefy[3], coefy[4],
coefz[1], coefz[2], coefz[3], coefz[4],
d_u, d_v, d_vp,
d_phi, d_eta);
for (int i = 0; i < num_streams; i++) {
cudaStreamSynchronize(streams[i]);
}
kernel_add_source_kernel<<<1, 1>>>(d_v, IDX3_l(sx,sy,sz), source[istep]);
clock_gettime(CLOCK_REALTIME, &end);
*time_kernel += (end.tv_sec - start.tv_sec) +
(double)(end.tv_nsec - start.tv_nsec) / 1.0e9;
float *t = d_u;
d_u = d_v;
d_v = t;
// Print out
if (istep % npo == 0) {
printf("time step %u / %u\n", istep, nsteps);
}
}
for (int i = 0; i < num_streams; i++) {
cudaStreamDestroy(streams[i]);
}
cudaMemcpy(u, d_u, sizeof(float) * size_u, cudaMemcpyDeviceToHost);
cudaFree(d_u);
cudaFree(d_v);
cudaFree(d_vp);
cudaFree(d_phi);
cudaFree(d_eta);
}
|
da1824872df4639c121675518c6d830aa74e3e1e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
* OR PERFORMANCE OF THIS SOURCE CODE.
*
* U.S. Government End Users. This source code is a "commercial item" as
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
* "commercial computer software" and "commercial computer software
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
* and is provided to the U.S. Government only as a commercial end item.
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
* source code with only those rights set forth herein.
*/
// This sample is an implementation of a simple line-of-sight algorithm:
// Given a height map and a ray originating at some observation point,
// it computes all the points along the ray that are visible from the
// observation point.
// It is based on the description made in "Guy E. Blelloch. Vector models
// for data-parallel computing. MIT Press, 1990" and uses the parallel scan
// primitive provided by the CUDPP library (http://www.gpgpu.org/developer/cudpp/).
#ifdef _WIN32
# define NOMINMAX
#endif
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
// includes, library
#include "cudpp/cudpp.h"
// includes, project
#include "cutil_inline.h"
#include "cutil_math.h"
////////////////////////////////////////////////////////////////////////////////
// declaration, types
// Boolean
typedef unsigned char Bool;
enum {
False = 0,
True = 1
};
// 2D height field
struct HeightField {
int width;
float* height;
};
// Ray
struct Ray {
float3 origin;
float2 dir;
int length;
float oneOverLength;
};
////////////////////////////////////////////////////////////////////////////////
// declaration, variables
// Height field texture reference
texture<float, 2, hipReadModeElementType> g_HeightFieldTex;
////////////////////////////////////////////////////////////////////////////////
// declaration, forward
void runTest( int argc, char** argv);
__global__ void computeAngles_kernel(const Ray, float*);
__global__ void computeVisibilities_kernel(const float*, const float*, int, Bool*);
void lineOfSight_gold(const HeightField, const Ray, Bool*);
__device__ __host__ float2 getLocation(const Ray, int);
__device__ __host__ float getAngle(const Ray, float2, float);
////////////////////////////////////////////////////////////////////////////////
// Program main
////////////////////////////////////////////////////////////////////////////////
int
main( int argc, char** argv)
{
runTest( argc, argv);
cutilExit(argc, argv);
}
////////////////////////////////////////////////////////////////////////////////
//! Run a line-of-sight test for CUDA
////////////////////////////////////////////////////////////////////////////////
void runTest(int argc, char** argv)
{
////////////////////////////////////////////////////////////////////////////
// Device initialization
// use command-line specified CUDA device, otherwise use device with highest Gflops/s
if( cutCheckCmdLineFlag(argc, (const char**)argv, "device") )
cutilDeviceInit(argc, argv);
else
hipSetDevice( cutGetMaxGflopsDeviceId() );
////////////////////////////////////////////////////////////////////////////
// Timer
// Create
uint timer;
cutilCheckError(cutCreateTimer(&timer));
// Number of iterations to get accurate timing
#ifdef __DEVICE_EMULATION__
uint numIterations = 1;
#else
uint numIterations = 100;
#endif
////////////////////////////////////////////////////////////////////////////
// Height field
HeightField heightField;
// Allocate in host memory
int2 dim = make_int2(10000, 100);
heightField.width = dim.x;
int heightFieldSize = dim.x * dim.y * sizeof(float);
cutilSafeMalloc(heightField.height = (float*)malloc(heightFieldSize));
// Fill in with an arbitrary sine surface
for (int x = 0; x < dim.x; ++x)
for (int y = 0; y < dim.y; ++y) {
float amp = 0.1f * (x + y);
float period = 2.0f + amp;
*(heightField.height + dim.x * y + x) =
amp * (sinf(sqrtf((float)(x * x + y * y)) * 2.0f * 3.1416f / period) + 1.0f);
}
// Allocate CUDA array in device memory
hipChannelFormatDesc channelDesc =
hipCreateChannelDesc(32, 0, 0, 0, hipChannelFormatKindFloat);
hipArray* heightFieldArray;
cutilSafeCall(hipMallocArray(&heightFieldArray, &channelDesc, dim.x, dim.y));
// Initialize device memory
cutilSafeCall(hipMemcpyToArray(heightFieldArray, 0, 0, heightField.height,
heightFieldSize, hipMemcpyHostToDevice));
// Set texture parameters
g_HeightFieldTex.addressMode[0] = hipAddressModeClamp;
g_HeightFieldTex.addressMode[1] = hipAddressModeClamp;
g_HeightFieldTex.filterMode = hipFilterModePoint;
g_HeightFieldTex.normalized = 0;
// Bind CUDA array to texture reference
cutilSafeCall(hipBindTextureToArray(g_HeightFieldTex, heightFieldArray,
channelDesc));
////////////////////////////////////////////////////////////////////////////
// Ray (starts at origin and traverses the height field diagonally)
Ray ray;
ray.origin = make_float3(0, 0, 2.0f);
int2 dir = make_int2(dim.x - 1, dim.y - 1);
ray.dir = make_float2((float)dir.x, (float)dir.y);
ray.length = max(abs(dir.x), abs(dir.y));
ray.oneOverLength = 1.0f / ray.length;
////////////////////////////////////////////////////////////////////////////
// View angles
// Allocate view angles for each point along the ray
float* d_angles;
int raySize = ray.length * sizeof(float);
cutilSafeCall(hipMalloc((void**)&d_angles, raySize));
// Allocate result of max-scan operation on the array of view angles
float* d_scannedAngles;
cutilSafeCall(hipMalloc((void**)&d_scannedAngles, raySize));
////////////////////////////////////////////////////////////////////////////
// Visibility results
// Allocate visibility results for each point along the ray
Bool* d_visibilities;
cutilSafeCall(hipMalloc((void**)&d_visibilities, raySize));
Bool* h_visibilities;
cutilSafeMalloc(h_visibilities = (Bool*)malloc(raySize));
Bool* h_visibilitiesRef;
cutilSafeMalloc(h_visibilitiesRef = (Bool*)malloc(raySize));
////////////////////////////////////////////////////////////////////////////
// Reference solution
lineOfSight_gold(heightField, ray, h_visibilitiesRef);
////////////////////////////////////////////////////////////////////////////
// Device solution
// Execution configuration
dim3 block(256);
dim3 grid((uint)ceil(ray.length / (double)block.x));
// Scan configuration
CUDPPHandle scanPlan;
CUDPPConfiguration config;
config.algorithm = CUDPP_SCAN;
config.op = CUDPP_MAX;
config.datatype = CUDPP_FLOAT;
config.options = CUDPP_OPTION_FORWARD | CUDPP_OPTION_INCLUSIVE;
cudppPlan(&scanPlan, config, ray.length, 1, 0);
// Compute device solution
printf("Line of sight\n");
cutStartTimer(timer);
for (uint i = 0; i < numIterations; ++i) {
// Compute view angle for each point along the ray
hipLaunchKernelGGL(( computeAngles_kernel), dim3(grid), dim3(block), 0, 0, ray, d_angles);
cutilCheckMsg("Kernel execution failed");
// Perform a max-scan operation on the array of view angles
cudppScan(scanPlan, d_scannedAngles, d_angles, ray.length);
cutilCheckMsg("Kernel execution failed");
// Compute visibility results based on the array of view angles
// and its scanned version
hipLaunchKernelGGL(( computeVisibilities_kernel), dim3(grid), dim3(block), 0, 0, d_angles, d_scannedAngles,
ray.length, d_visibilities);
cutilCheckMsg("Kernel execution failed");
}
hipDeviceSynchronize();
cutStopTimer(timer);
cudppDestroyPlan(scanPlan);
cutilCheckMsg("Kernel execution failed");
// Copy visibility results back to the host
cutilSafeCall(hipMemcpy(h_visibilities, d_visibilities, raySize,
hipMemcpyDeviceToHost));
// Compare device visibility results against reference results
CUTBoolean res = cutCompareub(h_visibilitiesRef, h_visibilities, ray.length);
printf("Test %s \n", (1 == res) ? "PASSED" : "FAILED");
printf("Average time: %f ms\n\n", cutGetTimerValue(timer) / numIterations);
cutResetTimer(timer);
// Cleanup memory
free(heightField.height);
free(h_visibilities);
free(h_visibilitiesRef);
cutilSafeCall(hipFree(d_angles));
cutilSafeCall(hipFree(d_scannedAngles));
cutilSafeCall(hipFree(d_visibilities));
cutilSafeCall(hipFreeArray(heightFieldArray));
hipDeviceReset();
}
////////////////////////////////////////////////////////////////////////////////
//! Compute view angles for each point along the ray
//! @param ray ray
//! @param angles view angles
////////////////////////////////////////////////////////////////////////////////
__global__ void computeAngles_kernel(const Ray ray, float* angles)
{
uint i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < ray.length) {
float2 location = getLocation(ray, i + 1);
float height = tex2D(g_HeightFieldTex, location.x, location.y);
float angle = getAngle(ray, location, height);
angles[i] = angle;
}
}
////////////////////////////////////////////////////////////////////////////////
//! Compute visibility for each point along the ray
//! @param angles view angles
//! @param scannedAngles max-scanned view angles
//! @param numAngles number of view angles
//! @param visibilities boolean array indicating the visibility of each point
//! along the ray
////////////////////////////////////////////////////////////////////////////////
__global__ void computeVisibilities_kernel(const float* angles,
const float* scannedAngles,
int numAngles,
Bool* visibilities)
{
uint i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numAngles)
visibilities[i] = scannedAngles[i] <= angles[i];
}
////////////////////////////////////////////////////////////////////////////////
//! Compute reference data set
//! @param heightField height field
//! @param ray ray
//! @param visibilities boolean array indicating the visibility of each point
//! along the ray
////////////////////////////////////////////////////////////////////////////////
void lineOfSight_gold(const HeightField heightField, const Ray ray,
Bool* visibilities)
{
float angleMax = asinf(-1.0f);
for (int i = 0; i < ray.length; ++i) {
float2 location = getLocation(ray, i + 1);
float height = *(heightField.height
+ heightField.width * (int)floorf(location.y)
+ (int)floorf(location.x));
float angle = getAngle(ray, location, height);
if (angle > angleMax) {
angleMax = angle;
visibilities[i] = True;
}
else
visibilities[i] = False;
}
}
////////////////////////////////////////////////////////////////////////////////
//! Compute the 2D coordinates of the point located at i steps from the origin
//! of the ray
//! @param ray ray
//! @param i integer offset along the ray
////////////////////////////////////////////////////////////////////////////////
__device__ __host__ float2 getLocation(const Ray ray, int i)
{
float step = i * ray.oneOverLength;
return make_float2(ray.origin.x, ray.origin.y) + step * ray.dir;
}
////////////////////////////////////////////////////////////////////////////////
//! Compute the angle of view between a 3D point and the origin of the ray
//! @param ray ray
//! @param location 2D coordinates of the input point
//! @param height height of the input point
////////////////////////////////////////////////////////////////////////////////
__device__ __host__ float getAngle(const Ray ray, float2 location, float height)
{
float2 dir = location - make_float2(ray.origin.x, ray.origin.y);
return atanf((height - ray.origin.z) / length(dir));
}
| da1824872df4639c121675518c6d830aa74e3e1e.cu | /*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
* OR PERFORMANCE OF THIS SOURCE CODE.
*
* U.S. Government End Users. This source code is a "commercial item" as
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
* "commercial computer software" and "commercial computer software
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
* and is provided to the U.S. Government only as a commercial end item.
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
* source code with only those rights set forth herein.
*/
// This sample is an implementation of a simple line-of-sight algorithm:
// Given a height map and a ray originating at some observation point,
// it computes all the points along the ray that are visible from the
// observation point.
// It is based on the description made in "Guy E. Blelloch. Vector models
// for data-parallel computing. MIT Press, 1990" and uses the parallel scan
// primitive provided by the CUDPP library (http://www.gpgpu.org/developer/cudpp/).
#ifdef _WIN32
# define NOMINMAX
#endif
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
// includes, library
#include "cudpp/cudpp.h"
// includes, project
#include "cutil_inline.h"
#include "cutil_math.h"
////////////////////////////////////////////////////////////////////////////////
// declaration, types
// Boolean
typedef unsigned char Bool;
enum {
False = 0,
True = 1
};
// 2D height field
struct HeightField {
int width;
float* height;
};
// Ray
struct Ray {
float3 origin;
float2 dir;
int length;
float oneOverLength;
};
////////////////////////////////////////////////////////////////////////////////
// declaration, variables
// Height field texture reference
texture<float, 2, cudaReadModeElementType> g_HeightFieldTex;
////////////////////////////////////////////////////////////////////////////////
// declaration, forward
void runTest( int argc, char** argv);
__global__ void computeAngles_kernel(const Ray, float*);
__global__ void computeVisibilities_kernel(const float*, const float*, int, Bool*);
void lineOfSight_gold(const HeightField, const Ray, Bool*);
__device__ __host__ float2 getLocation(const Ray, int);
__device__ __host__ float getAngle(const Ray, float2, float);
////////////////////////////////////////////////////////////////////////////////
// Program main
////////////////////////////////////////////////////////////////////////////////
int
main( int argc, char** argv)
{
runTest( argc, argv);
cutilExit(argc, argv);
}
////////////////////////////////////////////////////////////////////////////////
//! Run a line-of-sight test for CUDA
////////////////////////////////////////////////////////////////////////////////
void runTest(int argc, char** argv)
{
////////////////////////////////////////////////////////////////////////////
// Device initialization
// use command-line specified CUDA device, otherwise use device with highest Gflops/s
if( cutCheckCmdLineFlag(argc, (const char**)argv, "device") )
cutilDeviceInit(argc, argv);
else
cudaSetDevice( cutGetMaxGflopsDeviceId() );
////////////////////////////////////////////////////////////////////////////
// Timer
// Create
uint timer;
cutilCheckError(cutCreateTimer(&timer));
// Number of iterations to get accurate timing
#ifdef __DEVICE_EMULATION__
uint numIterations = 1;
#else
uint numIterations = 100;
#endif
////////////////////////////////////////////////////////////////////////////
// Height field
HeightField heightField;
// Allocate in host memory
int2 dim = make_int2(10000, 100);
heightField.width = dim.x;
int heightFieldSize = dim.x * dim.y * sizeof(float);
cutilSafeMalloc(heightField.height = (float*)malloc(heightFieldSize));
// Fill in with an arbitrary sine surface
for (int x = 0; x < dim.x; ++x)
for (int y = 0; y < dim.y; ++y) {
float amp = 0.1f * (x + y);
float period = 2.0f + amp;
*(heightField.height + dim.x * y + x) =
amp * (sinf(sqrtf((float)(x * x + y * y)) * 2.0f * 3.1416f / period) + 1.0f);
}
// Allocate CUDA array in device memory
cudaChannelFormatDesc channelDesc =
cudaCreateChannelDesc(32, 0, 0, 0, cudaChannelFormatKindFloat);
cudaArray* heightFieldArray;
cutilSafeCall(cudaMallocArray(&heightFieldArray, &channelDesc, dim.x, dim.y));
// Initialize device memory
cutilSafeCall(cudaMemcpyToArray(heightFieldArray, 0, 0, heightField.height,
heightFieldSize, cudaMemcpyHostToDevice));
// Set texture parameters
g_HeightFieldTex.addressMode[0] = cudaAddressModeClamp;
g_HeightFieldTex.addressMode[1] = cudaAddressModeClamp;
g_HeightFieldTex.filterMode = cudaFilterModePoint;
g_HeightFieldTex.normalized = 0;
// Bind CUDA array to texture reference
cutilSafeCall(cudaBindTextureToArray(g_HeightFieldTex, heightFieldArray,
channelDesc));
////////////////////////////////////////////////////////////////////////////
// Ray (starts at origin and traverses the height field diagonally)
Ray ray;
ray.origin = make_float3(0, 0, 2.0f);
int2 dir = make_int2(dim.x - 1, dim.y - 1);
ray.dir = make_float2((float)dir.x, (float)dir.y);
ray.length = max(abs(dir.x), abs(dir.y));
ray.oneOverLength = 1.0f / ray.length;
////////////////////////////////////////////////////////////////////////////
// View angles
// Allocate view angles for each point along the ray
float* d_angles;
int raySize = ray.length * sizeof(float);
cutilSafeCall(cudaMalloc((void**)&d_angles, raySize));
// Allocate result of max-scan operation on the array of view angles
float* d_scannedAngles;
cutilSafeCall(cudaMalloc((void**)&d_scannedAngles, raySize));
////////////////////////////////////////////////////////////////////////////
// Visibility results
// Allocate visibility results for each point along the ray
Bool* d_visibilities;
cutilSafeCall(cudaMalloc((void**)&d_visibilities, raySize));
Bool* h_visibilities;
cutilSafeMalloc(h_visibilities = (Bool*)malloc(raySize));
Bool* h_visibilitiesRef;
cutilSafeMalloc(h_visibilitiesRef = (Bool*)malloc(raySize));
////////////////////////////////////////////////////////////////////////////
// Reference solution
lineOfSight_gold(heightField, ray, h_visibilitiesRef);
////////////////////////////////////////////////////////////////////////////
// Device solution
// Execution configuration
dim3 block(256);
dim3 grid((uint)ceil(ray.length / (double)block.x));
// Scan configuration
CUDPPHandle scanPlan;
CUDPPConfiguration config;
config.algorithm = CUDPP_SCAN;
config.op = CUDPP_MAX;
config.datatype = CUDPP_FLOAT;
config.options = CUDPP_OPTION_FORWARD | CUDPP_OPTION_INCLUSIVE;
cudppPlan(&scanPlan, config, ray.length, 1, 0);
// Compute device solution
printf("Line of sight\n");
cutStartTimer(timer);
for (uint i = 0; i < numIterations; ++i) {
// Compute view angle for each point along the ray
computeAngles_kernel<<<grid, block>>>(ray, d_angles);
cutilCheckMsg("Kernel execution failed");
// Perform a max-scan operation on the array of view angles
cudppScan(scanPlan, d_scannedAngles, d_angles, ray.length);
cutilCheckMsg("Kernel execution failed");
// Compute visibility results based on the array of view angles
// and its scanned version
computeVisibilities_kernel<<<grid, block>>>(d_angles, d_scannedAngles,
ray.length, d_visibilities);
cutilCheckMsg("Kernel execution failed");
}
cudaThreadSynchronize();
cutStopTimer(timer);
cudppDestroyPlan(scanPlan);
cutilCheckMsg("Kernel execution failed");
// Copy visibility results back to the host
cutilSafeCall(cudaMemcpy(h_visibilities, d_visibilities, raySize,
cudaMemcpyDeviceToHost));
// Compare device visibility results against reference results
CUTBoolean res = cutCompareub(h_visibilitiesRef, h_visibilities, ray.length);
printf("Test %s \n", (1 == res) ? "PASSED" : "FAILED");
printf("Average time: %f ms\n\n", cutGetTimerValue(timer) / numIterations);
cutResetTimer(timer);
// Cleanup memory
free(heightField.height);
free(h_visibilities);
free(h_visibilitiesRef);
cutilSafeCall(cudaFree(d_angles));
cutilSafeCall(cudaFree(d_scannedAngles));
cutilSafeCall(cudaFree(d_visibilities));
cutilSafeCall(cudaFreeArray(heightFieldArray));
cudaThreadExit();
}
////////////////////////////////////////////////////////////////////////////////
//! Compute view angles for each point along the ray
//! @param ray ray
//! @param angles view angles
////////////////////////////////////////////////////////////////////////////////
__global__ void computeAngles_kernel(const Ray ray, float* angles)
{
uint i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < ray.length) {
float2 location = getLocation(ray, i + 1);
float height = tex2D(g_HeightFieldTex, location.x, location.y);
float angle = getAngle(ray, location, height);
angles[i] = angle;
}
}
////////////////////////////////////////////////////////////////////////////////
//! Compute visibility for each point along the ray
//! @param angles view angles
//! @param scannedAngles max-scanned view angles
//! @param numAngles number of view angles
//! @param visibilities boolean array indicating the visibility of each point
//! along the ray
////////////////////////////////////////////////////////////////////////////////
__global__ void computeVisibilities_kernel(const float* angles,
const float* scannedAngles,
int numAngles,
Bool* visibilities)
{
uint i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < numAngles)
visibilities[i] = scannedAngles[i] <= angles[i];
}
////////////////////////////////////////////////////////////////////////////////
//! Compute reference data set
//! @param heightField height field
//! @param ray ray
//! @param visibilities boolean array indicating the visibility of each point
//! along the ray
////////////////////////////////////////////////////////////////////////////////
void lineOfSight_gold(const HeightField heightField, const Ray ray,
Bool* visibilities)
{
float angleMax = asinf(-1.0f);
for (int i = 0; i < ray.length; ++i) {
float2 location = getLocation(ray, i + 1);
float height = *(heightField.height
+ heightField.width * (int)floorf(location.y)
+ (int)floorf(location.x));
float angle = getAngle(ray, location, height);
if (angle > angleMax) {
angleMax = angle;
visibilities[i] = True;
}
else
visibilities[i] = False;
}
}
////////////////////////////////////////////////////////////////////////////////
//! Compute the 2D coordinates of the point located at i steps from the origin
//! of the ray
//! @param ray ray
//! @param i integer offset along the ray
////////////////////////////////////////////////////////////////////////////////
__device__ __host__ float2 getLocation(const Ray ray, int i)
{
float step = i * ray.oneOverLength;
return make_float2(ray.origin.x, ray.origin.y) + step * ray.dir;
}
////////////////////////////////////////////////////////////////////////////////
//! Compute the angle of view between a 3D point and the origin of the ray
//! @param ray ray
//! @param location 2D coordinates of the input point
//! @param height height of the input point
////////////////////////////////////////////////////////////////////////////////
__device__ __host__ float getAngle(const Ray ray, float2 location, float height)
{
float2 dir = location - make_float2(ray.origin.x, ray.origin.y);
return atanf((height - ray.origin.z) / length(dir));
}
|
adfa1302d217d9269bb8e9e1a87a2b00b8304ba0.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/photo.hpp>
#include <vector>
#include <string>
#define BLUE 0
#define GREEN 1
#define RED 2
using namespace cv;
std::string type2str(int type) {
std::string r;
uchar depth = type & CV_MAT_DEPTH_MASK;
uchar chans = 1 + (type >> CV_CN_SHIFT);
switch ( depth ) {
case CV_8U: r = "8U"; break;
case CV_8S: r = "8S"; break;
case CV_16U: r = "16U"; break;
case CV_16S: r = "16S"; break;
case CV_32S: r = "32S"; break;
case CV_32F: r = "32F"; break;
case CV_64F: r = "64F"; break;
default: r = "User"; break;
}
r += "C";
r += (chans+'0');
return r;
}
void checkError(hipError_t err) {
if(err!=hipSuccess) {
printf("%s in %s at line %d\n", hipGetErrorString(err), __FILE__, __LINE__);
exit(EXIT_FAILURE);
}
}
//Convert a pixel RGB to HSL (Hue Saturation Lightness)
__device__ float4 convert_pixel_to_hsl(float4 pixel) {
float r, g, b, a;
float h, s, l, v;
float bits = powf(2,8)-1;
r = pixel.x / bits;
g = pixel.y / bits;
b = pixel.z / bits;
a = pixel.w;
float max = fmax(r, fmax(g, b));
float min = fmin(r, fmin(g, b));
float diff = max - min;
v = max;
// l = diff/(powf(2,1)-1);
l = 0.299*r + 0.587*g + 0.114*b;
if(v == 0.0f) // black
h = s = 0.0f;
else {
s = diff / v;
if(diff < 0.001f) // grey
h = 0.0f;
else { // color
if(max == r) {
h = 60.0f * (g - b)/diff;
if(h < 0.0f)
h += 360.0f;
} else if(max == g)
h = 60.0f * (2 + (b - r)/diff);
else
h = 60.0f * (4 + (r - g)/diff);
}
}
return (float4) {h, s, l, a};
}
__device__ float4 convert_pixel_to_rgb(float4 pixel) {
float r, g, b;
float h, s, l;
float c, x, hi, m;
h = pixel.x;
s = pixel.y;
l = pixel.z;
hi = h/60.0f;
// c = (1 - fabsf(2*l -1)) * s;
c = (1 - fabsf(l*(powf(2,1)-1) -1)) * s;
x = c * (1 - fabsf(fmodf(hi, 2) - 1));
m = (l - c/2);
if(h >= 0.0f && h < 60.0f) {
r = c;
g = x;
b = 0;
} else if(h >= 60.0f && h < 120.0f) {
r = x;
g = c;
b = 0;
} else if(h >= 120.0f && h < 180.0f) {
r = 0;
g = c;
b = x;
} else if(h >= 180.0f && h < 240.0f) {
r = 0;
g = x;
b = c;
} else if(h >= 240.0f && h < 300.0f) {
r = x;
g = 0;
b = c;
} else if(h >= 300.0f && h < 360.0f) {
r = c;
g = 0;
b = x;
}
r = (r + m)*255.0f;
g = (g + m)*255.0f;
b = (b + m)*255.0f;
return (float4) {r, g, b, pixel.w};
}
__device__ float log_mapping(float world_lum, float max_lum, float q, float k, float lum) {
float a, b, lum_d;
a = 1 + q * lum;
b = 1 + k * max_lum;
lum_d = log10f(a)/log10f(b);
return lum_d;
}
__global__ void tmo(float* imageIn, float* imageOut, int width, int height, float world_lum,
float max_lum, float q, float k)
{
float p_red, p_green, p_blue;
float4 pixel_hsl, pixel_rgb;
int Row = blockDim.y * blockIdx.y + threadIdx.y;
int Col = blockDim.x * blockIdx.x + threadIdx.x;
if(Row < height && Col < width) {
p_red = imageIn[(Row*width+Col)*3+RED];
p_green = imageIn[(Row*width+Col)*3+GREEN];
p_blue = imageIn[(Row*width+Col)*3+BLUE];
pixel_hsl = convert_pixel_to_hsl(make_float4(p_red, p_green, p_blue, 0.0));
pixel_hsl.z = log_mapping(world_lum, max_lum, q, k, pixel_hsl.z);
// pixel_hsl.y = log_mapping(world_lum, max_lum, q, k, pixel_hsl.y);
// pixel_hsl.x = log_mapping(world_lum, max_lum, q, k, pixel_hsl.x);
// pixel_hsl.z += 0.01;
pixel_rgb = convert_pixel_to_rgb(pixel_hsl);
// imageOut[(Row*width+Col)*3+BLUE] = log_mapping(world_lum, max_lum, q, k, p_blue);
// imageOut[(Row*width+Col)*3+GREEN] = log_mapping(world_lum, max_lum, q, k, p_green);
// imageOut[(Row*width+Col)*3+RED] = log_mapping(world_lum, max_lum, q, k, p_red);
imageOut[(Row*width+Col)*3+BLUE] = pixel_rgb.z;
imageOut[(Row*width+Col)*3+GREEN] = pixel_rgb.y;
imageOut[(Row*width+Col)*3+RED] = pixel_rgb.x;
}
}
// Iout(x,y)=(Iin(x,y)2f)(1/g)
__device__ float gamma_correction(float f_stop, float gamma, float val)
{
return powf((val*powf(2,f_stop)),(1.0/gamma));
}
__global__ void tonemap(float* imageIn, float* imageOut, int width, int height, int channels, int depth, float f_stop,
float gamma)
{
int Row = blockDim.y * blockIdx.y + threadIdx.y;
int Col = blockDim.x * blockIdx.x + threadIdx.x;
if(Row < height && Col < width) {
imageOut[(Row*width+Col)*3+BLUE] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+BLUE]);
imageOut[(Row*width+Col)*3+GREEN] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+GREEN]);
imageOut[(Row*width+Col)*3+RED] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+RED]);
}
}
void showImage(Mat &image, const char *window) {
namedWindow(window, CV_WINDOW_NORMAL);
imshow(window, image);
}
int main(int argc, char** argv)
{
char* image_name = argv[1];
char* image_out_name = argv[6];
float *h_ImageData, *d_ImageData, *d_ImageOut, *h_ImageOut;
Mat hdr, ldr;
Size imageSize;
int width, height, channels, sizeImage;
float world_lum=0.0, max_lum=0.0, q=0.0, k=0.0;
int show_flag = 0;
// std::vector<Mat>images;
// printf("%s\n", image_name);
hdr = imread(image_name, -1);
if(argc !=7 || !hdr.data) {
printf("No image Data \n");
printf("Usage: ./test <file_path> <world_lum> <max_lum> <q> <k> <image_out_name>\n");
return -1;
}
world_lum = atof(argv[2]);
max_lum = atof(argv[3]);
q = atof(argv[4]);
k = atof(argv[5]);
if(hdr.empty()) {
printf("Couldn't find or open the image...\n");
return -1;
}
imageSize = hdr.size();
width = imageSize.width;
height = imageSize.height;
channels = hdr.channels();
sizeImage = sizeof(float)*width*height*channels;
//printf("Width: %d\nHeight: %d\n", width, height);
std::string ty = type2str( hdr.type() );
// printf("Image: %s %dx%d \n", ty.c_str(), hdr.cols, hdr.rows );
//printf("Channels: %d\nDepth: %d\n", hdr.channels(), hdr.depth());
h_ImageData = (float *) malloc (sizeImage);
h_ImageData = (float *)hdr.data;
h_ImageOut = (float *) malloc (sizeImage);
hipEvent_t start, stop;
hipEventCreate(&start);
hipEventCreate(&stop);
float milliseconds = 0;
checkError(hipMalloc((void **)&d_ImageData, sizeImage));
checkError(hipMalloc((void **)&d_ImageOut, sizeImage));
checkError(hipMemcpy(d_ImageData, h_ImageData, sizeImage, hipMemcpyHostToDevice));
int blockSize = 32;
dim3 dimBlock(blockSize, blockSize, 1);
dim3 dimGrid(ceil(width/float(blockSize)), ceil(height/float(blockSize)), 1);
hipEventRecord(start);
// tonemap<<<dimGrid, dimBlock>>>(d_ImageData, d_ImageOut, width, height, channels, 32, f_stop, gamma);
hipLaunchKernelGGL(( tmo), dim3(dimGrid), dim3(dimBlock), 0, 0, d_ImageData, d_ImageOut, width, height, world_lum, max_lum, q, k);
hipEventRecord(stop);
hipDeviceSynchronize();
hipEventElapsedTime(&milliseconds, start, stop);
printf("%s|%.10f\n", image_name, milliseconds/1000.0);
checkError(hipMemcpy(h_ImageOut, d_ImageOut, sizeImage, hipMemcpyDeviceToHost));
ldr.create(height, width, CV_32FC3);
ldr.data = (unsigned char *)h_ImageOut;
ldr.convertTo(ldr, CV_8UC3, 255);
imwrite(image_out_name, ldr);
ty = type2str( ldr.type() );
// printf("Image result: %s %dx%d \n", ty.c_str(), ldr.cols, ldr.rows );
if(show_flag) {
showImage(ldr, "Image out LDR");
waitKey(0);
}
free(h_ImageOut); hipFree(d_ImageData); hipFree(d_ImageOut);
return 0;
}
| adfa1302d217d9269bb8e9e1a87a2b00b8304ba0.cu | #include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/photo.hpp>
#include <vector>
#include <string>
#define BLUE 0
#define GREEN 1
#define RED 2
using namespace cv;
std::string type2str(int type) {
std::string r;
uchar depth = type & CV_MAT_DEPTH_MASK;
uchar chans = 1 + (type >> CV_CN_SHIFT);
switch ( depth ) {
case CV_8U: r = "8U"; break;
case CV_8S: r = "8S"; break;
case CV_16U: r = "16U"; break;
case CV_16S: r = "16S"; break;
case CV_32S: r = "32S"; break;
case CV_32F: r = "32F"; break;
case CV_64F: r = "64F"; break;
default: r = "User"; break;
}
r += "C";
r += (chans+'0');
return r;
}
void checkError(cudaError_t err) {
if(err!=cudaSuccess) {
printf("%s in %s at line %d\n", cudaGetErrorString(err), __FILE__, __LINE__);
exit(EXIT_FAILURE);
}
}
//Convert a pixel RGB to HSL (Hue Saturation Lightness)
__device__ float4 convert_pixel_to_hsl(float4 pixel) {
float r, g, b, a;
float h, s, l, v;
float bits = powf(2,8)-1;
r = pixel.x / bits;
g = pixel.y / bits;
b = pixel.z / bits;
a = pixel.w;
float max = fmax(r, fmax(g, b));
float min = fmin(r, fmin(g, b));
float diff = max - min;
v = max;
// l = diff/(powf(2,1)-1);
l = 0.299*r + 0.587*g + 0.114*b;
if(v == 0.0f) // black
h = s = 0.0f;
else {
s = diff / v;
if(diff < 0.001f) // grey
h = 0.0f;
else { // color
if(max == r) {
h = 60.0f * (g - b)/diff;
if(h < 0.0f)
h += 360.0f;
} else if(max == g)
h = 60.0f * (2 + (b - r)/diff);
else
h = 60.0f * (4 + (r - g)/diff);
}
}
return (float4) {h, s, l, a};
}
__device__ float4 convert_pixel_to_rgb(float4 pixel) {
float r, g, b;
float h, s, l;
float c, x, hi, m;
h = pixel.x;
s = pixel.y;
l = pixel.z;
hi = h/60.0f;
// c = (1 - fabsf(2*l -1)) * s;
c = (1 - fabsf(l*(powf(2,1)-1) -1)) * s;
x = c * (1 - fabsf(fmodf(hi, 2) - 1));
m = (l - c/2);
if(h >= 0.0f && h < 60.0f) {
r = c;
g = x;
b = 0;
} else if(h >= 60.0f && h < 120.0f) {
r = x;
g = c;
b = 0;
} else if(h >= 120.0f && h < 180.0f) {
r = 0;
g = c;
b = x;
} else if(h >= 180.0f && h < 240.0f) {
r = 0;
g = x;
b = c;
} else if(h >= 240.0f && h < 300.0f) {
r = x;
g = 0;
b = c;
} else if(h >= 300.0f && h < 360.0f) {
r = c;
g = 0;
b = x;
}
r = (r + m)*255.0f;
g = (g + m)*255.0f;
b = (b + m)*255.0f;
return (float4) {r, g, b, pixel.w};
}
__device__ float log_mapping(float world_lum, float max_lum, float q, float k, float lum) {
float a, b, lum_d;
a = 1 + q * lum;
b = 1 + k * max_lum;
lum_d = log10f(a)/log10f(b);
return lum_d;
}
__global__ void tmo(float* imageIn, float* imageOut, int width, int height, float world_lum,
float max_lum, float q, float k)
{
float p_red, p_green, p_blue;
float4 pixel_hsl, pixel_rgb;
int Row = blockDim.y * blockIdx.y + threadIdx.y;
int Col = blockDim.x * blockIdx.x + threadIdx.x;
if(Row < height && Col < width) {
p_red = imageIn[(Row*width+Col)*3+RED];
p_green = imageIn[(Row*width+Col)*3+GREEN];
p_blue = imageIn[(Row*width+Col)*3+BLUE];
pixel_hsl = convert_pixel_to_hsl(make_float4(p_red, p_green, p_blue, 0.0));
pixel_hsl.z = log_mapping(world_lum, max_lum, q, k, pixel_hsl.z);
// pixel_hsl.y = log_mapping(world_lum, max_lum, q, k, pixel_hsl.y);
// pixel_hsl.x = log_mapping(world_lum, max_lum, q, k, pixel_hsl.x);
// pixel_hsl.z += 0.01;
pixel_rgb = convert_pixel_to_rgb(pixel_hsl);
// imageOut[(Row*width+Col)*3+BLUE] = log_mapping(world_lum, max_lum, q, k, p_blue);
// imageOut[(Row*width+Col)*3+GREEN] = log_mapping(world_lum, max_lum, q, k, p_green);
// imageOut[(Row*width+Col)*3+RED] = log_mapping(world_lum, max_lum, q, k, p_red);
imageOut[(Row*width+Col)*3+BLUE] = pixel_rgb.z;
imageOut[(Row*width+Col)*3+GREEN] = pixel_rgb.y;
imageOut[(Row*width+Col)*3+RED] = pixel_rgb.x;
}
}
// Iout(x,y)=(Iin(x,y)⋅2ᶺf)ᶺ(1/g)
__device__ float gamma_correction(float f_stop, float gamma, float val)
{
return powf((val*powf(2,f_stop)),(1.0/gamma));
}
__global__ void tonemap(float* imageIn, float* imageOut, int width, int height, int channels, int depth, float f_stop,
float gamma)
{
int Row = blockDim.y * blockIdx.y + threadIdx.y;
int Col = blockDim.x * blockIdx.x + threadIdx.x;
if(Row < height && Col < width) {
imageOut[(Row*width+Col)*3+BLUE] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+BLUE]);
imageOut[(Row*width+Col)*3+GREEN] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+GREEN]);
imageOut[(Row*width+Col)*3+RED] = gamma_correction(f_stop, gamma, imageIn[(Row*width+Col)*3+RED]);
}
}
void showImage(Mat &image, const char *window) {
namedWindow(window, CV_WINDOW_NORMAL);
imshow(window, image);
}
int main(int argc, char** argv)
{
char* image_name = argv[1];
char* image_out_name = argv[6];
float *h_ImageData, *d_ImageData, *d_ImageOut, *h_ImageOut;
Mat hdr, ldr;
Size imageSize;
int width, height, channels, sizeImage;
float world_lum=0.0, max_lum=0.0, q=0.0, k=0.0;
int show_flag = 0;
// std::vector<Mat>images;
// printf("%s\n", image_name);
hdr = imread(image_name, -1);
if(argc !=7 || !hdr.data) {
printf("No image Data \n");
printf("Usage: ./test <file_path> <world_lum> <max_lum> <q> <k> <image_out_name>\n");
return -1;
}
world_lum = atof(argv[2]);
max_lum = atof(argv[3]);
q = atof(argv[4]);
k = atof(argv[5]);
if(hdr.empty()) {
printf("Couldn't find or open the image...\n");
return -1;
}
imageSize = hdr.size();
width = imageSize.width;
height = imageSize.height;
channels = hdr.channels();
sizeImage = sizeof(float)*width*height*channels;
//printf("Width: %d\nHeight: %d\n", width, height);
std::string ty = type2str( hdr.type() );
// printf("Image: %s %dx%d \n", ty.c_str(), hdr.cols, hdr.rows );
//printf("Channels: %d\nDepth: %d\n", hdr.channels(), hdr.depth());
h_ImageData = (float *) malloc (sizeImage);
h_ImageData = (float *)hdr.data;
h_ImageOut = (float *) malloc (sizeImage);
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
float milliseconds = 0;
checkError(cudaMalloc((void **)&d_ImageData, sizeImage));
checkError(cudaMalloc((void **)&d_ImageOut, sizeImage));
checkError(cudaMemcpy(d_ImageData, h_ImageData, sizeImage, cudaMemcpyHostToDevice));
int blockSize = 32;
dim3 dimBlock(blockSize, blockSize, 1);
dim3 dimGrid(ceil(width/float(blockSize)), ceil(height/float(blockSize)), 1);
cudaEventRecord(start);
// tonemap<<<dimGrid, dimBlock>>>(d_ImageData, d_ImageOut, width, height, channels, 32, f_stop, gamma);
tmo<<<dimGrid, dimBlock>>>(d_ImageData, d_ImageOut, width, height, world_lum, max_lum, q, k);
cudaEventRecord(stop);
cudaDeviceSynchronize();
cudaEventElapsedTime(&milliseconds, start, stop);
printf("%s|%.10f\n", image_name, milliseconds/1000.0);
checkError(cudaMemcpy(h_ImageOut, d_ImageOut, sizeImage, cudaMemcpyDeviceToHost));
ldr.create(height, width, CV_32FC3);
ldr.data = (unsigned char *)h_ImageOut;
ldr.convertTo(ldr, CV_8UC3, 255);
imwrite(image_out_name, ldr);
ty = type2str( ldr.type() );
// printf("Image result: %s %dx%d \n", ty.c_str(), ldr.cols, ldr.rows );
if(show_flag) {
showImage(ldr, "Image out LDR");
waitKey(0);
}
free(h_ImageOut); cudaFree(d_ImageData); cudaFree(d_ImageOut);
return 0;
}
|
fdfb5793aa35622891ee8de4daf53346ec40ed9c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<time.h>
using namespace std;
__global__ void matrixVectorMultiplication(float *a, float *mat, float *c, int n)
{
int row=threadIdx.x+blockDim.x*blockIdx.x;
float sum=0;
if(row<n){
for(int j=0;j<n;j++)
{
sum=sum+mat[row*n+j]*a[j];
}
}
c[row]=sum;
}
int main()
{
float *a, *b, *c, *d;
float *dev_a, *dev_b, *dev_c;
int n=32*1024;
a=(float*)malloc(sizeof(float)*n);
b=(float*)malloc(sizeof(float)*n*n);
c=(float*)malloc(sizeof(float)*n);
d=(float*)malloc(sizeof(float)*n);
int i, j;
for(i=0; i<n; i++)
a[i] = 1.0;
c[i] = 1.0;
for(i=0; i<n; i++)
for(j=0; j<n; j++)
b[i*n+j] = 2.0;
printf("<<<<<<<<<< initial data:\n");
hipMalloc((void**)&dev_a, sizeof(float)*n);
hipMalloc((void**)&dev_b, sizeof(float)*n*n);
hipMalloc((void**)&dev_c, sizeof(float)*n);
hipMemcpy(dev_a, a, sizeof(float)*n, hipMemcpyHostToDevice);
hipMemcpy(dev_b, b, sizeof(float)*n*n, hipMemcpyHostToDevice);
hipEvent_t start,end;
hipEventCreate(&start);
hipEventCreate(&end);
int threadsPerBlock;
threadsPerBlock = 32;
int blocksPerGrid;
blocksPerGrid = n/threadsPerBlock;
hipEventRecord(start);
hipLaunchKernelGGL(( matrixVectorMultiplication), dim3(blocksPerGrid),dim3(threadsPerBlock), 0, 0, dev_a,dev_b,dev_c,n);
hipEventRecord(end);
hipEventSynchronize(end);
float time=0.0;
hipEventElapsedTime(&time,start,end);
hipMemcpy(c,dev_c,sizeof(float)*n,hipMemcpyDeviceToHost);
cout<<"\nGPU Time Elapsed: "<<time;
int sum=0;
for(int row=0;row<n;row++)
{
sum=0;
for(int col=0;col<n;col++)
{
sum=sum+a[row*n+col]*b[col];
}
d[row]=sum;
}
//t=clock()-t;
//cout<<"\nCPU Time Elapsed: "<<((double)t); //((double)t)/CLOCKS_PER_SEC;
int error=0;
for(int i=0;i<n;i++){
error+=d[i]-c[i];
// cout<<" gpu "<<c[i]<<" CPU "<<d[i]<<endl;
}
cout<<"Error : "<<error;
return 0;
};
void init_array(float *a, const int N) {
int i;
for(i=0; i<N; i++)
a[i] = 1.0;
}
void init_mat(float *a, const int N, const int M) {
int i, j;
for(i=0; i<N; i++)
for(j=0; j<M; j++)
a[i*M+j] = 2.0;
}
| fdfb5793aa35622891ee8de4daf53346ec40ed9c.cu | #include<iostream>
#include<cstdlib>
#include<cmath>
#include<time.h>
using namespace std;
__global__ void matrixVectorMultiplication(float *a, float *mat, float *c, int n)
{
int row=threadIdx.x+blockDim.x*blockIdx.x;
float sum=0;
if(row<n){
for(int j=0;j<n;j++)
{
sum=sum+mat[row*n+j]*a[j];
}
}
c[row]=sum;
}
int main()
{
float *a, *b, *c, *d;
float *dev_a, *dev_b, *dev_c;
int n=32*1024;
a=(float*)malloc(sizeof(float)*n);
b=(float*)malloc(sizeof(float)*n*n);
c=(float*)malloc(sizeof(float)*n);
d=(float*)malloc(sizeof(float)*n);
int i, j;
for(i=0; i<n; i++)
a[i] = 1.0;
c[i] = 1.0;
for(i=0; i<n; i++)
for(j=0; j<n; j++)
b[i*n+j] = 2.0;
printf("<<<<<<<<<< initial data:\n");
cudaMalloc((void**)&dev_a, sizeof(float)*n);
cudaMalloc((void**)&dev_b, sizeof(float)*n*n);
cudaMalloc((void**)&dev_c, sizeof(float)*n);
cudaMemcpy(dev_a, a, sizeof(float)*n, cudaMemcpyHostToDevice);
cudaMemcpy(dev_b, b, sizeof(float)*n*n, cudaMemcpyHostToDevice);
cudaEvent_t start,end;
cudaEventCreate(&start);
cudaEventCreate(&end);
int threadsPerBlock;
threadsPerBlock = 32;
int blocksPerGrid;
blocksPerGrid = n/threadsPerBlock;
cudaEventRecord(start);
matrixVectorMultiplication<<<blocksPerGrid,threadsPerBlock>>>(dev_a,dev_b,dev_c,n);
cudaEventRecord(end);
cudaEventSynchronize(end);
float time=0.0;
cudaEventElapsedTime(&time,start,end);
cudaMemcpy(c,dev_c,sizeof(float)*n,cudaMemcpyDeviceToHost);
cout<<"\nGPU Time Elapsed: "<<time;
int sum=0;
for(int row=0;row<n;row++)
{
sum=0;
for(int col=0;col<n;col++)
{
sum=sum+a[row*n+col]*b[col];
}
d[row]=sum;
}
//t=clock()-t;
//cout<<"\nCPU Time Elapsed: "<<((double)t); //((double)t)/CLOCKS_PER_SEC;
int error=0;
for(int i=0;i<n;i++){
error+=d[i]-c[i];
// cout<<" gpu "<<c[i]<<" CPU "<<d[i]<<endl;
}
cout<<"Error : "<<error;
return 0;
};
void init_array(float *a, const int N) {
int i;
for(i=0; i<N; i++)
a[i] = 1.0;
}
void init_mat(float *a, const int N, const int M) {
int i, j;
for(i=0; i<N; i++)
for(j=0; j<M; j++)
a[i*M+j] = 2.0;
}
|
5062ecf82aff5f8f6da894d6942d1b8f8ddd3c40.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Autores:
* Walter Martnez Santana
* Jos Carlos Castro
*
*Cholesky en Paralelo en CUDA
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
__global__ void multMatriz(float *da, float *db, float *dc, int num){
float sum=0;
int j = threadIdx.x + blockIdx.x * blockDim.x;
int i = threadIdx.y + blockIdx.y * blockDim.y;
while(j<num){
while(i<num){
for (unsigned int k = 0; k<num; k++)
sum += da[i * num + k] * db[k * num + j];
dc[i*num + j] = (float) sum;
i += gridDim.y * blockDim.y;
}
j+=gridDim.x * blockDim.x;
i = threadIdx.y + blockIdx.y * blockDim.y;
}
}
__global__ void choleskyParalelo(float *db, int num){
int id=threadIdx.x + blockIdx.x*blockDim.x;
int x=0;
int inicio=0;
int k=0, N=num;
int id1=id+inicio, ids=id,id2;
int N2 = N;
int NN=0, KK=0;
while(k < N){
id1=id+inicio;
//Checamos si es un elemnto de la diagonal
if(id1 == inicio){
db[id1] = sqrt(db[id1]);
}else //si no es elemento de la diagonal, lo dividimos por el elemento diagonal de su columna
{
x=0;
while(id1 <N2){
while(x<1000)
x++;
__syncthreads();
db[id1] = db[id1]/db[inicio];
id1 += gridDim.x * blockDim.x;
__syncthreads();
}
//__syncthreads();//hacemos que todos los threads esperen a los que faltan
}__syncthreads();
//id=ids;
inicio += (N-k); //Preparo el siguiente salto al siguiente elemento diagonal
NN = N2; //Empiezo actaulizar valores de las columnas restantes a la actualizada
KK = k+1;//cada columna posterior tiene 1 elemento menos a la anterior
while(NN < (int)N*(N+1)/2){
id2=id + NN; // saltamos a la siguiente columna
while(id2 < NN + (N-KK)){
db[id2] = db[id2] -db[id + KK]* db[KK];
id2 += gridDim.x * blockDim.x;
__syncthreads();
}
//__syncthreads();
NN += (N-KK);
KK++;
}
//__syncthreads();
k++; //pasamos a la siguiente columna
N2 += (N-k); //Siguiente elemento diagonal
__syncthreads();
}
}
#define n 5
#define SIZE n*n*sizeof(float)
int main(){
int N=n,i,j;
float *A, *B, *C;
float *da, *db, *dc;
int m, P=1,U=6;
srand(time(NULL));
hipEvent_t start, stop;
hipEventCreate(&start);
hipEventCreate(&stop);
dim3 dimGrid(16, 16);
dim3 dimBlock(16, 16);
A=(float *)malloc(SIZE);
B=(float *)malloc(SIZE);
C=(float *)malloc(SIZE);
for(m=0;m<N*N;m++){
A[m]=(float)P+(int)(((U-P+1.0)*rand())/(RAND_MAX+1.0));
//B[m]=(float)P+(int)(((U-P+1.0)*rand())/(RAND_MAX+1.0));
C[m]=(float)0;
}
//Transpuesta de A
for( i = 0;i<N;i++)
for(j=0;j<N;j++)
B[j + i*N] = A[i + j*N];
hipMalloc((void**)&da, SIZE);
hipMalloc((void**)&db, SIZE);
hipMalloc((void**)&dc, SIZE);
hipMemcpy(da,A, SIZE, hipMemcpyHostToDevice);
hipMemcpy(db,B, SIZE, hipMemcpyHostToDevice);
hipMemcpy(dc,C, SIZE, hipMemcpyHostToDevice);
hipEventRecord(start, 0);
hipLaunchKernelGGL(( multMatriz), dim3(dimGrid) , dim3(dimBlock) , 0, 0, da,db,dc,N);
//hipDeviceSynchronize();
hipEventRecord(stop,0);
hipEventSynchronize(stop);
hipMemcpy(C,dc, SIZE, hipMemcpyDeviceToHost);
hipFree(da);
hipFree(db);
hipFree(dc);
free(B);
//Optimizacion de memoria
//Almacenamos la parte debajo de la diagonal y la diagonal de la matriz
int nuevoSize = N*(N+1)/2;
j=0;
int k;
B=(float *)malloc(nuevoSize*sizeof(float));
for(m=0;m<N;m++){
for(k=m;k<N;k++){
B[j++]=C[m + N*k];
}
}
//Desplegar nuevo almacenamiento en arreglo unidimensional
for(m=0;m<nuevoSize;m++)
printf("%5.0f ",B[m]);
printf("\n\n");
/*
for(m=0;m<N*N;m++){
printf("%08.0f",A[m]);
printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
printf("\n\n");
for(m=0;m<N*N;m++){
printf("%08.0f",B[m]);
printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
printf("\n\n");
*/
int NN;
NN=n;
//for(m=0;m<NN*NN;m++){
//int NN=16;
for(m=0;m<NN;m++){
for(k=0;k<NN;k++){
printf("%05.0f",C[k + m*N]);
printf("%c",( ((m*N+k)%NN)<(NN-1) ) ? ' ':'\n');
//printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
}
printf("\n\n");
float elapsedTime;
hipEventElapsedTime(&elapsedTime,start,stop);
printf("Tiempo %4.6f milseg\n\n",elapsedTime);
hipMalloc((void**)&db, nuevoSize*sizeof(float));
hipMemcpy(db,B, nuevoSize*sizeof(float), hipMemcpyHostToDevice);
hipLaunchKernelGGL(( choleskyParalelo), dim3(1),dim3(512), 0, 0, db,n);
hipMemcpy(B,db, nuevoSize*sizeof(float), hipMemcpyDeviceToHost);
printf("\n\n");
for(m=0;m<nuevoSize;m++)
printf("%4.4f ",B[m]);
printf("\n\n");
hipEventDestroy(start);
hipEventDestroy(stop);
hipFree(db);
free(B);
free(C);
free(A);
return 0;
}
| 5062ecf82aff5f8f6da894d6942d1b8f8ddd3c40.cu |
/* Autores:
* Walter Martínez Santana
* José Carlos Castro
*
*Cholesky en Paralelo en CUDA
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
__global__ void multMatriz(float *da, float *db, float *dc, int num){
float sum=0;
int j = threadIdx.x + blockIdx.x * blockDim.x;
int i = threadIdx.y + blockIdx.y * blockDim.y;
while(j<num){
while(i<num){
for (unsigned int k = 0; k<num; k++)
sum += da[i * num + k] * db[k * num + j];
dc[i*num + j] = (float) sum;
i += gridDim.y * blockDim.y;
}
j+=gridDim.x * blockDim.x;
i = threadIdx.y + blockIdx.y * blockDim.y;
}
}
__global__ void choleskyParalelo(float *db, int num){
int id=threadIdx.x + blockIdx.x*blockDim.x;
int x=0;
int inicio=0;
int k=0, N=num;
int id1=id+inicio, ids=id,id2;
int N2 = N;
int NN=0, KK=0;
while(k < N){
id1=id+inicio;
//Checamos si es un elemnto de la diagonal
if(id1 == inicio){
db[id1] = sqrt(db[id1]);
}else //si no es elemento de la diagonal, lo dividimos por el elemento diagonal de su columna
{
x=0;
while(id1 <N2){
while(x<1000)
x++;
__syncthreads();
db[id1] = db[id1]/db[inicio];
id1 += gridDim.x * blockDim.x;
__syncthreads();
}
//__syncthreads();//hacemos que todos los threads esperen a los que faltan
}__syncthreads();
//id=ids;
inicio += (N-k); //Preparo el siguiente salto al siguiente elemento diagonal
NN = N2; //Empiezo actaulizar valores de las columnas restantes a la actualizada
KK = k+1;//cada columna posterior tiene 1 elemento menos a la anterior
while(NN < (int)N*(N+1)/2){
id2=id + NN; // saltamos a la siguiente columna
while(id2 < NN + (N-KK)){
db[id2] = db[id2] -db[id + KK]* db[KK];
id2 += gridDim.x * blockDim.x;
__syncthreads();
}
//__syncthreads();
NN += (N-KK);
KK++;
}
//__syncthreads();
k++; //pasamos a la siguiente columna
N2 += (N-k); //Siguiente elemento diagonal
__syncthreads();
}
}
#define n 5
#define SIZE n*n*sizeof(float)
int main(){
int N=n,i,j;
float *A, *B, *C;
float *da, *db, *dc;
int m, P=1,U=6;
srand(time(NULL));
cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
dim3 dimGrid(16, 16);
dim3 dimBlock(16, 16);
A=(float *)malloc(SIZE);
B=(float *)malloc(SIZE);
C=(float *)malloc(SIZE);
for(m=0;m<N*N;m++){
A[m]=(float)P+(int)(((U-P+1.0)*rand())/(RAND_MAX+1.0));
//B[m]=(float)P+(int)(((U-P+1.0)*rand())/(RAND_MAX+1.0));
C[m]=(float)0;
}
//Transpuesta de A
for( i = 0;i<N;i++)
for(j=0;j<N;j++)
B[j + i*N] = A[i + j*N];
cudaMalloc((void**)&da, SIZE);
cudaMalloc((void**)&db, SIZE);
cudaMalloc((void**)&dc, SIZE);
cudaMemcpy(da,A, SIZE, cudaMemcpyHostToDevice);
cudaMemcpy(db,B, SIZE, cudaMemcpyHostToDevice);
cudaMemcpy(dc,C, SIZE, cudaMemcpyHostToDevice);
cudaEventRecord(start, 0);
multMatriz<<<dimGrid , dimBlock >>>(da,db,dc,N);
//cudaThreadSynchronize();
cudaEventRecord(stop,0);
cudaEventSynchronize(stop);
cudaMemcpy(C,dc, SIZE, cudaMemcpyDeviceToHost);
cudaFree(da);
cudaFree(db);
cudaFree(dc);
free(B);
//Optimizacion de memoria
//Almacenamos la parte debajo de la diagonal y la diagonal de la matriz
int nuevoSize = N*(N+1)/2;
j=0;
int k;
B=(float *)malloc(nuevoSize*sizeof(float));
for(m=0;m<N;m++){
for(k=m;k<N;k++){
B[j++]=C[m + N*k];
}
}
//Desplegar nuevo almacenamiento en arreglo unidimensional
for(m=0;m<nuevoSize;m++)
printf("%5.0f ",B[m]);
printf("\n\n");
/*
for(m=0;m<N*N;m++){
printf("%08.0f",A[m]);
printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
printf("\n\n");
for(m=0;m<N*N;m++){
printf("%08.0f",B[m]);
printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
printf("\n\n");
*/
int NN;
NN=n;
//for(m=0;m<NN*NN;m++){
//int NN=16;
for(m=0;m<NN;m++){
for(k=0;k<NN;k++){
printf("%05.0f",C[k + m*N]);
printf("%c",( ((m*N+k)%NN)<(NN-1) ) ? ' ':'\n');
//printf("%c",( (m%N)<(N-1) ) ? ' ':'\n');
}
}
printf("\n\n");
float elapsedTime;
cudaEventElapsedTime(&elapsedTime,start,stop);
printf("Tiempo %4.6f milseg\n\n",elapsedTime);
cudaMalloc((void**)&db, nuevoSize*sizeof(float));
cudaMemcpy(db,B, nuevoSize*sizeof(float), cudaMemcpyHostToDevice);
choleskyParalelo<<<1,512>>>(db,n);
cudaMemcpy(B,db, nuevoSize*sizeof(float), cudaMemcpyDeviceToHost);
printf("\n\n");
for(m=0;m<nuevoSize;m++)
printf("%4.4f ",B[m]);
printf("\n\n");
cudaEventDestroy(start);
cudaEventDestroy(stop);
cudaFree(db);
free(B);
free(C);
free(A);
return 0;
}
|
5b1f443d935abf6d90ffa598290b4ce1998dfbdd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define SUBMATRIX_SIZE 10000
#define BLOCK_SIZE 16
float getnum() {
return rand()/((float) RAND_MAX);
}
__global__ void gpu_matrix_multiply(float *a, float *b, float *c, int n)
{
__shared__ float tile_a[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float tile_b[BLOCK_SIZE][BLOCK_SIZE];
int row = blockIdx.y * BLOCK_SIZE + threadIdx.y;
int col = blockIdx.x * BLOCK_SIZE + threadIdx.x;
float tmp = 0.0f;
int idx;
for (int sub = 0; sub < gridDim.x; ++sub) // gridDim.x
{
idx = row * n + sub * BLOCK_SIZE + threadIdx.x;
if(idx >= n*n)
{
// n may not divisible by BLOCK_SIZE
tile_a[threadIdx.y][threadIdx.x] = 0.0f;
}
else
{
tile_a[threadIdx.y][threadIdx.x] = a[idx];
}
idx = (sub * BLOCK_SIZE + threadIdx.y) * n + col;
if(idx >= n*n)
{
tile_b[threadIdx.y][threadIdx.x] = 0.0f;
}
else
{
tile_b[threadIdx.y][threadIdx.x] = b[idx];
}
__syncthreads();
for (int k = 0; k < BLOCK_SIZE; ++k)
{
tmp += tile_a[threadIdx.y][k] * tile_b[k][threadIdx.x];
}
__syncthreads();
}
if(row < n && col < n)
{
c[row * n + col] = tmp;
}
}
void make_identity(float* a, int startx, int starty, int length, int n) {
// fill a with the identity from start to end
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (i-startx==j-starty) ? 1.0f : 0.0f;
}
}
}
void make_negidentity(float* a, int startx, int starty, int length, int n) {
// fill a with the identity from start to end
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (i-startx==j-starty) ? -1.0f : 0.0f;
}
}
}
void make_x(float* x, int length) {
int i, j;
for (i=0; i<length; i++) {
for (j=0; j<length; j++) {
x[i*length+j] = getnum();
}
}
}
void make_zero(float* a, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = 0.0f;
}
}
}
void copy_x(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = x[(i-startx)*length+(j-starty)];
}
}
}
void copy_2x(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = 2*x[(i-startx)*length+(j-starty)];
}
}
}
void copy_negx(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (-1)*x[(i-startx)*length+(j-starty)];
}
}
}
void make_result(float* a, int length) {
int i, j;
int half = length>>1;
for (i=0; i<length; i++) {
for (j=0; j<length; j++) {
if (i == j) {
if (i>=half)
a[i*length+j] = -1.0f;
else
a[i*length+j] = 1.0f;
}
else
a[i*length+j] = 0.0f;
}
}
}
float rothVerf(float* a, float* b, int n) {
float sum = 0;
int i, j;
for (i=0; i<n; i++) {
for (j=0; j<n; j++) {
sum += (float) fabs(a[i*n+j] - b[i*n+j]);
}
}
return sum;
}
void print_mat(float* a, int n) {
int i, j;
for (i=0; i<n; i++) {
for (j=0; j<n; j++) {
printf("%.2f\t", a[i*n+j]);
}
printf("\n");
}
printf("\n");
}
int main() {
srand(100);
int n = 2*SUBMATRIX_SIZE;
int half = n>>1;
size_t totalsize = sizeof(float)*n*n;
size_t halfsize = sizeof(float)*half*half;
float *x, *a, *b, *c, *d;
hipHostMalloc((void**) &a, totalsize);
hipHostMalloc((void**) &b, totalsize);
hipHostMalloc((void**) &c, totalsize);
hipHostMalloc((void**) &d, totalsize);
hipHostMalloc((void**) &x, halfsize);
if ((x==NULL) || (a==NULL) || (b==NULL) || (c==NULL) ||
(d==NULL)) {
printf("Matrix allocation error on host\n");
exit(1);
}
make_x(x, half);
// construct first matrix
make_identity(a, 0, 0, half, n);
copy_x(a, x, 0, half, half, n);
make_zero(a, half, 0, half, n);
make_identity(a, half, half, half, n);
// second matrix
make_identity(b, 0, 0, half, n);
copy_2x(b, x, 0, half, half, n);
make_zero(b, half, 0, half, n);
make_negidentity(b, half, half, half, n);
// third
make_identity(c, 0, 0, half, n);
copy_negx(c, x, 0, half, half, n);
make_zero(c, half, 0, half, n);
make_identity(c, half, half, half, n);
// result
make_result(d, n);
// allocate on device
float *dev_a, *dev_b, *dev_c, *dev_inter;
hipMalloc((void**) &dev_a, totalsize);
hipMalloc((void**) &dev_b, totalsize);
hipMalloc((void**) &dev_c, totalsize);
hipMalloc((void**) &dev_inter, totalsize);
// copy to device
hipMemcpy(dev_a, a, totalsize, hipMemcpyHostToDevice);
hipMemcpy(dev_b, b, totalsize, hipMemcpyHostToDevice);
hipMemcpy(dev_c, c, totalsize, hipMemcpyHostToDevice);
unsigned int grid_rows = n / BLOCK_SIZE;
unsigned int grid_cols = n / BLOCK_SIZE;
dim3 dimGrid(grid_cols, grid_rows);
dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);
// intermediate matrix product
hipLaunchKernelGGL(( gpu_matrix_multiply), dim3(dimGrid), dim3(dimBlock), 0, 0, dev_a, dev_b, dev_inter, n);
hipDeviceSynchronize();
// reuse old matrix
hipLaunchKernelGGL(( gpu_matrix_multiply), dim3(dimGrid), dim3(dimBlock), 0, 0, dev_inter, dev_c, dev_a, n);
// bring product back to cpu
hipMemcpy(a, dev_a, totalsize, hipMemcpyDeviceToHost);
hipDeviceSynchronize();
// check a against the result d
float sum = rothVerf(a, d, n);
printf("Total Error: %f\n", sum);
// cleanup and exit
hipFree(dev_a);
hipFree(dev_b);
hipFree(dev_c);
hipFree(dev_inter);
hipHostFree(a);
hipHostFree(b);
hipHostFree(c);
hipHostFree(d);
hipHostFree(x);
return 0;
}
| 5b1f443d935abf6d90ffa598290b4ce1998dfbdd.cu | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define SUBMATRIX_SIZE 10000
#define BLOCK_SIZE 16
float getnum() {
return rand()/((float) RAND_MAX);
}
__global__ void gpu_matrix_multiply(float *a, float *b, float *c, int n)
{
__shared__ float tile_a[BLOCK_SIZE][BLOCK_SIZE];
__shared__ float tile_b[BLOCK_SIZE][BLOCK_SIZE];
int row = blockIdx.y * BLOCK_SIZE + threadIdx.y;
int col = blockIdx.x * BLOCK_SIZE + threadIdx.x;
float tmp = 0.0f;
int idx;
for (int sub = 0; sub < gridDim.x; ++sub) // gridDim.x
{
idx = row * n + sub * BLOCK_SIZE + threadIdx.x;
if(idx >= n*n)
{
// n may not divisible by BLOCK_SIZE
tile_a[threadIdx.y][threadIdx.x] = 0.0f;
}
else
{
tile_a[threadIdx.y][threadIdx.x] = a[idx];
}
idx = (sub * BLOCK_SIZE + threadIdx.y) * n + col;
if(idx >= n*n)
{
tile_b[threadIdx.y][threadIdx.x] = 0.0f;
}
else
{
tile_b[threadIdx.y][threadIdx.x] = b[idx];
}
__syncthreads();
for (int k = 0; k < BLOCK_SIZE; ++k)
{
tmp += tile_a[threadIdx.y][k] * tile_b[k][threadIdx.x];
}
__syncthreads();
}
if(row < n && col < n)
{
c[row * n + col] = tmp;
}
}
void make_identity(float* a, int startx, int starty, int length, int n) {
// fill a with the identity from start to end
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (i-startx==j-starty) ? 1.0f : 0.0f;
}
}
}
void make_negidentity(float* a, int startx, int starty, int length, int n) {
// fill a with the identity from start to end
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (i-startx==j-starty) ? -1.0f : 0.0f;
}
}
}
void make_x(float* x, int length) {
int i, j;
for (i=0; i<length; i++) {
for (j=0; j<length; j++) {
x[i*length+j] = getnum();
}
}
}
void make_zero(float* a, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = 0.0f;
}
}
}
void copy_x(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = x[(i-startx)*length+(j-starty)];
}
}
}
void copy_2x(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = 2*x[(i-startx)*length+(j-starty)];
}
}
}
void copy_negx(float* a, float* x, int startx, int starty, int length, int n) {
int i, j;
for (i=startx; i<length+startx; i++) {
for (j=starty; j<length+starty; j++) {
a[i*n+j] = (-1)*x[(i-startx)*length+(j-starty)];
}
}
}
void make_result(float* a, int length) {
int i, j;
int half = length>>1;
for (i=0; i<length; i++) {
for (j=0; j<length; j++) {
if (i == j) {
if (i>=half)
a[i*length+j] = -1.0f;
else
a[i*length+j] = 1.0f;
}
else
a[i*length+j] = 0.0f;
}
}
}
float rothVerf(float* a, float* b, int n) {
float sum = 0;
int i, j;
for (i=0; i<n; i++) {
for (j=0; j<n; j++) {
sum += (float) fabs(a[i*n+j] - b[i*n+j]);
}
}
return sum;
}
void print_mat(float* a, int n) {
int i, j;
for (i=0; i<n; i++) {
for (j=0; j<n; j++) {
printf("%.2f\t", a[i*n+j]);
}
printf("\n");
}
printf("\n");
}
int main() {
srand(100);
int n = 2*SUBMATRIX_SIZE;
int half = n>>1;
size_t totalsize = sizeof(float)*n*n;
size_t halfsize = sizeof(float)*half*half;
float *x, *a, *b, *c, *d;
cudaMallocHost((void**) &a, totalsize);
cudaMallocHost((void**) &b, totalsize);
cudaMallocHost((void**) &c, totalsize);
cudaMallocHost((void**) &d, totalsize);
cudaMallocHost((void**) &x, halfsize);
if ((x==NULL) || (a==NULL) || (b==NULL) || (c==NULL) ||
(d==NULL)) {
printf("Matrix allocation error on host\n");
exit(1);
}
make_x(x, half);
// construct first matrix
make_identity(a, 0, 0, half, n);
copy_x(a, x, 0, half, half, n);
make_zero(a, half, 0, half, n);
make_identity(a, half, half, half, n);
// second matrix
make_identity(b, 0, 0, half, n);
copy_2x(b, x, 0, half, half, n);
make_zero(b, half, 0, half, n);
make_negidentity(b, half, half, half, n);
// third
make_identity(c, 0, 0, half, n);
copy_negx(c, x, 0, half, half, n);
make_zero(c, half, 0, half, n);
make_identity(c, half, half, half, n);
// result
make_result(d, n);
// allocate on device
float *dev_a, *dev_b, *dev_c, *dev_inter;
cudaMalloc((void**) &dev_a, totalsize);
cudaMalloc((void**) &dev_b, totalsize);
cudaMalloc((void**) &dev_c, totalsize);
cudaMalloc((void**) &dev_inter, totalsize);
// copy to device
cudaMemcpy(dev_a, a, totalsize, cudaMemcpyHostToDevice);
cudaMemcpy(dev_b, b, totalsize, cudaMemcpyHostToDevice);
cudaMemcpy(dev_c, c, totalsize, cudaMemcpyHostToDevice);
unsigned int grid_rows = n / BLOCK_SIZE;
unsigned int grid_cols = n / BLOCK_SIZE;
dim3 dimGrid(grid_cols, grid_rows);
dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);
// intermediate matrix product
gpu_matrix_multiply<<<dimGrid, dimBlock>>>(dev_a, dev_b, dev_inter, n);
cudaThreadSynchronize();
// reuse old matrix
gpu_matrix_multiply<<<dimGrid, dimBlock>>>(dev_inter, dev_c, dev_a, n);
// bring product back to cpu
cudaMemcpy(a, dev_a, totalsize, cudaMemcpyDeviceToHost);
cudaThreadSynchronize();
// check a against the result d
float sum = rothVerf(a, d, n);
printf("Total Error: %f\n", sum);
// cleanup and exit
cudaFree(dev_a);
cudaFree(dev_b);
cudaFree(dev_c);
cudaFree(dev_inter);
cudaFreeHost(a);
cudaFreeHost(b);
cudaFreeHost(c);
cudaFreeHost(d);
cudaFreeHost(x);
return 0;
}
|
b912b3eea3b31611743c55c15e8e8094bb315ed2.hip | // !!! This is a file automatically generated by hipify!!!
#include "simulation_hip.cuh"
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime.h>
#include "common_hip.cuh"
__global__ void DiffuseKnl(
double *__restrict__ tnow,
double *__restrict__ tnext,
double cx,
double cy,
double cz) {
extern __shared__ double sdata[];
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (i - 1 < IMAX - 2 && j - 1 < JMAX - 2 && k - 1 < KMAX - 2) {
const int jstride = blockDim.x + 2;
const int kstride = (blockDim.x + 2) * (blockDim.y + 2);
const int il = threadIdx.x + 1;
const int jl = threadIdx.y + 1;
const int kl = threadIdx.z + 1;
const int center = kl * kstride + jl * jstride + il;
sdata[center] = tnow[INDEX3D(i, j, k)];
if (threadIdx.x == 0) {
sdata[center-1] = tnow[INDEX3D(i-1, j, k)];
}
if (threadIdx.x == blockDim.x-1 || i == IMAX-2) {
sdata[center+1] = tnow[INDEX3D(i+1, j, k)];
}
if (threadIdx.y == 0) {
sdata[center-jstride] = tnow[INDEX3D(i, j-1, k)];
}
if (threadIdx.y == blockDim.y-1 || j == JMAX-2) {
sdata[center+jstride] = tnow[INDEX3D(i, j+1, k)];
}
if (threadIdx.z == 0) {
sdata[center-kstride] = tnow[INDEX3D(i, j, k-1)];
}
if (threadIdx.z == blockDim.z-1 || k == KMAX-2) {
sdata[center+kstride] = tnow[INDEX3D(i, j, k+1)];
}
__syncthreads();
// Diffuse
tnext[INDEX3D(i, j, k)] = sdata[center] + cx * (sdata[center-1] - 2.0*sdata[center] + sdata[center+1])
+ cy * (sdata[center-jstride] - 2.0*sdata[center] + sdata[center+jstride])
+ cz * (sdata[center-kstride]- 2.0*sdata[center] + sdata[center+kstride]);
}
}
__global__ void ReflectIKnl(double *__restrict__ tnext) {
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (j - 1 < JMAX - 2 && k - 1 < KMAX - 2) {
tnext[INDEX3D(0, j, k)] = tnext[INDEX3D(1, j, k)];
tnext[INDEX3D(IMAX-1, j, k)] = tnext[INDEX3D(IMAX-2, j, k)];
}
}
__global__ void ReflectJKnl(double *__restrict__ tnext) {
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (i - 1 < IMAX - 2 && k - 1 < KMAX - 2) {
tnext[INDEX3D(i, 0, k)] = tnext[INDEX3D(i, 1, k)];
tnext[INDEX3D(i, JMAX-1, k)] = tnext[INDEX3D(i, JMAX-2, k)];
}
}
__global__ void ReflectKKnl(double *__restrict__ tnext) {
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
if (i - 1 < IMAX - 2 && j - 1 < JMAX - 2) {
tnext[INDEX3D(i, j, 0)] = tnext[INDEX3D(i, j, 1)];
tnext[INDEX3D(i, j, KMAX-1)] = tnext[INDEX3D(i, j, KMAX-2)];
}
}
| b912b3eea3b31611743c55c15e8e8094bb315ed2.cu | #include "simulation.cuh"
#include <cuda_runtime_api.h>
#include <cuda.h>
#include "common.cuh"
__global__ void DiffuseKnl(
double *__restrict__ tnow,
double *__restrict__ tnext,
double cx,
double cy,
double cz) {
extern __shared__ double sdata[];
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (i - 1 < IMAX - 2 && j - 1 < JMAX - 2 && k - 1 < KMAX - 2) {
const int jstride = blockDim.x + 2;
const int kstride = (blockDim.x + 2) * (blockDim.y + 2);
const int il = threadIdx.x + 1;
const int jl = threadIdx.y + 1;
const int kl = threadIdx.z + 1;
const int center = kl * kstride + jl * jstride + il;
sdata[center] = tnow[INDEX3D(i, j, k)];
if (threadIdx.x == 0) {
sdata[center-1] = tnow[INDEX3D(i-1, j, k)];
}
if (threadIdx.x == blockDim.x-1 || i == IMAX-2) {
sdata[center+1] = tnow[INDEX3D(i+1, j, k)];
}
if (threadIdx.y == 0) {
sdata[center-jstride] = tnow[INDEX3D(i, j-1, k)];
}
if (threadIdx.y == blockDim.y-1 || j == JMAX-2) {
sdata[center+jstride] = tnow[INDEX3D(i, j+1, k)];
}
if (threadIdx.z == 0) {
sdata[center-kstride] = tnow[INDEX3D(i, j, k-1)];
}
if (threadIdx.z == blockDim.z-1 || k == KMAX-2) {
sdata[center+kstride] = tnow[INDEX3D(i, j, k+1)];
}
__syncthreads();
// Diffuse
tnext[INDEX3D(i, j, k)] = sdata[center] + cx * (sdata[center-1] - 2.0*sdata[center] + sdata[center+1])
+ cy * (sdata[center-jstride] - 2.0*sdata[center] + sdata[center+jstride])
+ cz * (sdata[center-kstride]- 2.0*sdata[center] + sdata[center+kstride]);
}
}
__global__ void ReflectIKnl(double *__restrict__ tnext) {
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (j - 1 < JMAX - 2 && k - 1 < KMAX - 2) {
tnext[INDEX3D(0, j, k)] = tnext[INDEX3D(1, j, k)];
tnext[INDEX3D(IMAX-1, j, k)] = tnext[INDEX3D(IMAX-2, j, k)];
}
}
__global__ void ReflectJKnl(double *__restrict__ tnext) {
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int k = blockIdx.z * blockDim.z + threadIdx.z + 1;
if (i - 1 < IMAX - 2 && k - 1 < KMAX - 2) {
tnext[INDEX3D(i, 0, k)] = tnext[INDEX3D(i, 1, k)];
tnext[INDEX3D(i, JMAX-1, k)] = tnext[INDEX3D(i, JMAX-2, k)];
}
}
__global__ void ReflectKKnl(double *__restrict__ tnext) {
const int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
const int j = blockIdx.y * blockDim.y + threadIdx.y + 1;
if (i - 1 < IMAX - 2 && j - 1 < JMAX - 2) {
tnext[INDEX3D(i, j, 0)] = tnext[INDEX3D(i, j, 1)];
tnext[INDEX3D(i, j, KMAX-1)] = tnext[INDEX3D(i, j, KMAX-2)];
}
}
|
499300d214c7037403df1df60688ecd056d2da48.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <windows.h>
#include <d2d1.h>
#include <d2d1helper.h>
#pragma comment(lib, "d2d1")
//*****double buffering*****
#define SCREEN_WIDTH 1920
#define SCREEN_HEIGHT 1000
D2D1_RECT_U display_area;
ID2D1Bitmap *image_container = NULL;
unsigned int image_data[SCREEN_WIDTH * SCREEN_HEIGHT];
//**************************************
ID2D1Factory* pD2DFactory = NULL;
ID2D1HwndRenderTarget* pRT = NULL;
#define HIBA_00 TEXT("Error:Program initialisation process.")
HINSTANCE hInstGlob;
int SajatiCmdShow;
char szClassName[] = "WindowsApp";
HWND Form1; //Windows handler
LRESULT CALLBACK WndProc0(HWND, UINT, WPARAM, LPARAM);
void D2D_drawing(ID2D1HwndRenderTarget* pRT);
//*****double bufferingz*****
void create_main_buffer(void);
void cleanup_main_buffer(void);
void swap_main_buffer(void);
//**************************************
//*****Drawing algorithms*****
void SetPixel_main_buffer(int x, int y, unsigned int szin);
void DrawLine_main_buffer(int x1, int y1, int x2, int y2, int szin);
void FillTriangle_main_buffer(int x1, int y1, int x2, int y2, int x3, int y3, int szin);
//**************************************
//*********************************
//The main entry point of our program
//*********************************
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("StdWinClassName");
HWND hwnd;
MSG msg;
WNDCLASS wndclass0;
SajatiCmdShow = iCmdShow;
hInstGlob = hInstance;
//*********************************
//Preparing Windows class
//*********************************
wndclass0.style = CS_HREDRAW | CS_VREDRAW;
wndclass0.lpfnWndProc = WndProc0;
wndclass0.cbClsExtra = 0;
wndclass0.cbWndExtra = 0;
wndclass0.hInstance = hInstance;
wndclass0.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass0.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass0.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wndclass0.lpszMenuName = NULL;
wndclass0.lpszClassName = TEXT("WIN0");
//*********************************
//Registering our windows class
//*********************************
if (!RegisterClass(&wndclass0))
{
MessageBox(NULL, HIBA_00, TEXT("Program Start"), MB_ICONERROR);
return 0;
}
//*********************************
//Creating the windows
//*********************************
Form1 = CreateWindow(TEXT("WIN0"),
TEXT("CUDA - DIRECT2D"),
(WS_OVERLAPPED | WS_SYSMENU | WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX),
50,
50,
SCREEN_WIDTH,
SCREEN_HEIGHT,
NULL,
NULL,
hInstance,
NULL);
//*********************************
//Displaying the window
//*********************************
ShowWindow(Form1, SajatiCmdShow);
UpdateWindow(Form1);
//*********************************
//Activating the message processing for our window
//*********************************
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
//*********************************
//The window's callback funtcion: handling events
//*********************************
LRESULT CALLBACK WndProc0(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
switch (message)
{
//*********************************
//When creating the window
//*********************************
case WM_CREATE:
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &pD2DFactory);
pD2DFactory->CreateHwndRenderTarget(
D2D1::RenderTargetProperties(),
D2D1::HwndRenderTargetProperties(
hwnd, D2D1::SizeU(SCREEN_WIDTH, SCREEN_HEIGHT)),
&pRT);
create_main_buffer();
return 0;
//*********************************
//to eliminate color flickering
//*********************************
case WM_ERASEBKGND:
return (LRESULT)1;
//*********************************
//Repainting the client area of the window
//*********************************
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
D2D_drawing(pRT);
return 0;
//*********************************
//Closing the window, freeing resources
//*********************************
case WM_CLOSE:
pRT->Release();
pD2DFactory->Release();
DestroyWindow(hwnd);
return 0;
//*********************************
//Destroying the window
//*********************************
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
void D2D_drawing(ID2D1HwndRenderTarget* pRT)
{
cleanup_main_buffer();
SetPixel_main_buffer(100, 100, RGB(0, 0, 0));
DrawLine_main_buffer(10, 10, 300, 80, RGB(0, 0, 0));
FillTriangle_main_buffer(500, 30, 600, 80, 530, 200, RGB(0, 0, 0));
swap_main_buffer();
}
void create_main_buffer(void)
{
pRT->CreateBitmap(D2D1::SizeU(SCREEN_WIDTH, SCREEN_HEIGHT),
D2D1::BitmapProperties(D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,
D2D1_ALPHA_MODE_IGNORE)), &image_container);
}
void cleanup_main_buffer(void)
{
memset(image_data, 255, SCREEN_HEIGHT*SCREEN_WIDTH * sizeof(unsigned int));
}
void swap_main_buffer(void)
{
display_area.left = 0;
display_area.top = 0;
display_area.right = SCREEN_WIDTH;
display_area.bottom = SCREEN_HEIGHT;
image_container->CopyFromMemory(&display_area, image_data, SCREEN_WIDTH * sizeof(unsigned int));
pRT->BeginDraw();
pRT->DrawBitmap(image_container, D2D1::RectF(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), 1.0f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
pRT->EndDraw();
}
void SetPixel_main_buffer(int x, int y, unsigned int color)
{
image_data[(y * SCREEN_WIDTH) + x] = color;
}
void DrawLine_main_buffer(int x1, int y1, int x2, int y2, int color)
{
int swap, offset;
bool flip = false;
if (y2 < 0 || y1 < 0) return;
if (abs(x2 - x1) < 2 && abs(y2 - y1) < 2) {
image_data[(y2*SCREEN_WIDTH) + x2] = color; return;
}
if (abs(x1 - x2) < abs(y1 - y2))
{
swap = x1;
x1 = y1;
y1 = swap;
swap = x2;
x2 = y2;
y2 = swap;
flip = true;
}
if (x1 > x2)
{
swap = x1;
x1 = x2;
x2 = swap;
swap = y1;
y1 = y2;
y2 = swap;
}
int dx = x2 - x1;
int dy = y2 - y1;
int marker1 = abs(dy) * 2;
int marker2 = 0;
int y = y1, x;
if (flip)
{
for (x = x1; x <= x2; ++x)
{
offset = (x * SCREEN_WIDTH);
image_data[offset + y] = color;
marker2 += marker1;
if (marker2 > dx)
{
y += (y2 > y1 ? 1 : -1);
marker2 -= dx * 2;
}
}
}
else
{
for (x = x1; x <= x2; ++x)
{
offset = (y * SCREEN_WIDTH);
image_data[offset + x] = color;
marker2 += marker1;
if (marker2 > dx)
{
y += (y2 > y1 ? 1 : -1);
marker2 -= dx * 2;
}
}
}
}
void FillTriangle_main_buffer(int x1, int y1, int x2, int y2, int x3, int y3, int color)
{
int Ax, Ay, Bx, By, j;
int swapx, swapy, offset, maxoffset = SCREEN_HEIGHT * SCREEN_WIDTH;
if (y1 == y2 && y1 == y3) return;
if (y1 > y2)
{
swapx = x1;
swapy = y1;
x1 = x2;
y1 = y2;
x2 = swapx;
y2 = swapy;
}
if (y1 > y3)
{
swapx = x1;
swapy = y1;
x1 = x3;
y1 = y3;
x3 = swapx;
y3 = swapy;
}
if (y2 > y3)
{
swapx = x3;
swapy = y3;
x3 = x2;
y3 = y2;
x2 = swapx;
y2 = swapy;
}
int magassag = y3 - y1;
for (int i = 0; i < magassag; ++i)
{
bool alsoresz = i > y2 - y1 || y2 == y1;
int reszmagassag = alsoresz ? y3 - y2 : y2 - y1;
float alpha = (float)i / magassag;
float beta = (float)(i - (alsoresz ? y2 - y1 : 0)) / reszmagassag;
Ax = x1 + (x3 - x1)*alpha;
Ay = y1 + (y3 - y1)*alpha;
Bx = alsoresz ? x2 + (x3 - x2)*beta : x1 + (x2 - x1)*beta;
By = alsoresz ? y2 + (y3 - y2)*beta : y1 + (y2 - y1)*beta;
if (Ax > Bx)
{
swapx = Ax;
swapy = Ay;
Ax = Bx;
Ay = By;
Bx = swapx;
By = swapy;
}
offset = (y1 + i)*SCREEN_WIDTH;
for (j = Ax; j < Bx; ++j)
{
if (offset + j > maxoffset) continue;
image_data[offset + j] = color;
}
}
} | 499300d214c7037403df1df60688ecd056d2da48.cu | #include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <windows.h>
#include <d2d1.h>
#include <d2d1helper.h>
#pragma comment(lib, "d2d1")
//*****double buffering*****
#define SCREEN_WIDTH 1920
#define SCREEN_HEIGHT 1000
D2D1_RECT_U display_area;
ID2D1Bitmap *image_container = NULL;
unsigned int image_data[SCREEN_WIDTH * SCREEN_HEIGHT];
//**************************************
ID2D1Factory* pD2DFactory = NULL;
ID2D1HwndRenderTarget* pRT = NULL;
#define HIBA_00 TEXT("Error:Program initialisation process.")
HINSTANCE hInstGlob;
int SajatiCmdShow;
char szClassName[] = "WindowsApp";
HWND Form1; //Windows handler
LRESULT CALLBACK WndProc0(HWND, UINT, WPARAM, LPARAM);
void D2D_drawing(ID2D1HwndRenderTarget* pRT);
//*****double bufferingz*****
void create_main_buffer(void);
void cleanup_main_buffer(void);
void swap_main_buffer(void);
//**************************************
//*****Drawing algorithms*****
void SetPixel_main_buffer(int x, int y, unsigned int szin);
void DrawLine_main_buffer(int x1, int y1, int x2, int y2, int szin);
void FillTriangle_main_buffer(int x1, int y1, int x2, int y2, int x3, int y3, int szin);
//**************************************
//*********************************
//The main entry point of our program
//*********************************
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("StdWinClassName");
HWND hwnd;
MSG msg;
WNDCLASS wndclass0;
SajatiCmdShow = iCmdShow;
hInstGlob = hInstance;
//*********************************
//Preparing Windows class
//*********************************
wndclass0.style = CS_HREDRAW | CS_VREDRAW;
wndclass0.lpfnWndProc = WndProc0;
wndclass0.cbClsExtra = 0;
wndclass0.cbWndExtra = 0;
wndclass0.hInstance = hInstance;
wndclass0.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wndclass0.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass0.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wndclass0.lpszMenuName = NULL;
wndclass0.lpszClassName = TEXT("WIN0");
//*********************************
//Registering our windows class
//*********************************
if (!RegisterClass(&wndclass0))
{
MessageBox(NULL, HIBA_00, TEXT("Program Start"), MB_ICONERROR);
return 0;
}
//*********************************
//Creating the windows
//*********************************
Form1 = CreateWindow(TEXT("WIN0"),
TEXT("CUDA - DIRECT2D"),
(WS_OVERLAPPED | WS_SYSMENU | WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX),
50,
50,
SCREEN_WIDTH,
SCREEN_HEIGHT,
NULL,
NULL,
hInstance,
NULL);
//*********************************
//Displaying the window
//*********************************
ShowWindow(Form1, SajatiCmdShow);
UpdateWindow(Form1);
//*********************************
//Activating the message processing for our window
//*********************************
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
//*********************************
//The window's callback funtcion: handling events
//*********************************
LRESULT CALLBACK WndProc0(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
switch (message)
{
//*********************************
//When creating the window
//*********************************
case WM_CREATE:
D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &pD2DFactory);
pD2DFactory->CreateHwndRenderTarget(
D2D1::RenderTargetProperties(),
D2D1::HwndRenderTargetProperties(
hwnd, D2D1::SizeU(SCREEN_WIDTH, SCREEN_HEIGHT)),
&pRT);
create_main_buffer();
return 0;
//*********************************
//to eliminate color flickering
//*********************************
case WM_ERASEBKGND:
return (LRESULT)1;
//*********************************
//Repainting the client area of the window
//*********************************
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
D2D_drawing(pRT);
return 0;
//*********************************
//Closing the window, freeing resources
//*********************************
case WM_CLOSE:
pRT->Release();
pD2DFactory->Release();
DestroyWindow(hwnd);
return 0;
//*********************************
//Destroying the window
//*********************************
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
void D2D_drawing(ID2D1HwndRenderTarget* pRT)
{
cleanup_main_buffer();
SetPixel_main_buffer(100, 100, RGB(0, 0, 0));
DrawLine_main_buffer(10, 10, 300, 80, RGB(0, 0, 0));
FillTriangle_main_buffer(500, 30, 600, 80, 530, 200, RGB(0, 0, 0));
swap_main_buffer();
}
void create_main_buffer(void)
{
pRT->CreateBitmap(D2D1::SizeU(SCREEN_WIDTH, SCREEN_HEIGHT),
D2D1::BitmapProperties(D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,
D2D1_ALPHA_MODE_IGNORE)), &image_container);
}
void cleanup_main_buffer(void)
{
memset(image_data, 255, SCREEN_HEIGHT*SCREEN_WIDTH * sizeof(unsigned int));
}
void swap_main_buffer(void)
{
display_area.left = 0;
display_area.top = 0;
display_area.right = SCREEN_WIDTH;
display_area.bottom = SCREEN_HEIGHT;
image_container->CopyFromMemory(&display_area, image_data, SCREEN_WIDTH * sizeof(unsigned int));
pRT->BeginDraw();
pRT->DrawBitmap(image_container, D2D1::RectF(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), 1.0f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
pRT->EndDraw();
}
void SetPixel_main_buffer(int x, int y, unsigned int color)
{
image_data[(y * SCREEN_WIDTH) + x] = color;
}
void DrawLine_main_buffer(int x1, int y1, int x2, int y2, int color)
{
int swap, offset;
bool flip = false;
if (y2 < 0 || y1 < 0) return;
if (abs(x2 - x1) < 2 && abs(y2 - y1) < 2) {
image_data[(y2*SCREEN_WIDTH) + x2] = color; return;
}
if (abs(x1 - x2) < abs(y1 - y2))
{
swap = x1;
x1 = y1;
y1 = swap;
swap = x2;
x2 = y2;
y2 = swap;
flip = true;
}
if (x1 > x2)
{
swap = x1;
x1 = x2;
x2 = swap;
swap = y1;
y1 = y2;
y2 = swap;
}
int dx = x2 - x1;
int dy = y2 - y1;
int marker1 = abs(dy) * 2;
int marker2 = 0;
int y = y1, x;
if (flip)
{
for (x = x1; x <= x2; ++x)
{
offset = (x * SCREEN_WIDTH);
image_data[offset + y] = color;
marker2 += marker1;
if (marker2 > dx)
{
y += (y2 > y1 ? 1 : -1);
marker2 -= dx * 2;
}
}
}
else
{
for (x = x1; x <= x2; ++x)
{
offset = (y * SCREEN_WIDTH);
image_data[offset + x] = color;
marker2 += marker1;
if (marker2 > dx)
{
y += (y2 > y1 ? 1 : -1);
marker2 -= dx * 2;
}
}
}
}
void FillTriangle_main_buffer(int x1, int y1, int x2, int y2, int x3, int y3, int color)
{
int Ax, Ay, Bx, By, j;
int swapx, swapy, offset, maxoffset = SCREEN_HEIGHT * SCREEN_WIDTH;
if (y1 == y2 && y1 == y3) return;
if (y1 > y2)
{
swapx = x1;
swapy = y1;
x1 = x2;
y1 = y2;
x2 = swapx;
y2 = swapy;
}
if (y1 > y3)
{
swapx = x1;
swapy = y1;
x1 = x3;
y1 = y3;
x3 = swapx;
y3 = swapy;
}
if (y2 > y3)
{
swapx = x3;
swapy = y3;
x3 = x2;
y3 = y2;
x2 = swapx;
y2 = swapy;
}
int magassag = y3 - y1;
for (int i = 0; i < magassag; ++i)
{
bool alsoresz = i > y2 - y1 || y2 == y1;
int reszmagassag = alsoresz ? y3 - y2 : y2 - y1;
float alpha = (float)i / magassag;
float beta = (float)(i - (alsoresz ? y2 - y1 : 0)) / reszmagassag;
Ax = x1 + (x3 - x1)*alpha;
Ay = y1 + (y3 - y1)*alpha;
Bx = alsoresz ? x2 + (x3 - x2)*beta : x1 + (x2 - x1)*beta;
By = alsoresz ? y2 + (y3 - y2)*beta : y1 + (y2 - y1)*beta;
if (Ax > Bx)
{
swapx = Ax;
swapy = Ay;
Ax = Bx;
Ay = By;
Bx = swapx;
By = swapy;
}
offset = (y1 + i)*SCREEN_WIDTH;
for (j = Ax; j < Bx; ++j)
{
if (offset + j > maxoffset) continue;
image_data[offset + j] = color;
}
}
} |
bb3aed7ca5f0a7ebd8ee5651e25139c6d3577829.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <hiprand/hiprand_kernel.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
#include "gpu_update_sign.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
hipSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
int *G = NULL;
hipMalloc(&G, XSIZE*YSIZE);
double *w = NULL;
hipMalloc(&w, XSIZE*YSIZE);
int k = 1;
int n = XSIZE*YSIZE;
int *temp = NULL;
hipMalloc(&temp, XSIZE*YSIZE);
int *flag = NULL;
hipMalloc(&flag, XSIZE*YSIZE);
int it_b = 1;
int it_t = 1;
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
hipFree(0);hipLaunchKernelGGL((
gpu_update_sign), dim3(gridBlock),dim3(threadBlock), 0, 0, G,w,k,n,temp,flag,it_b,it_t);
hipDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {hipLaunchKernelGGL((
gpu_update_sign), dim3(gridBlock),dim3(threadBlock), 0, 0, G,w,k,n,temp,flag,it_b,it_t);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {hipLaunchKernelGGL((
gpu_update_sign), dim3(gridBlock),dim3(threadBlock), 0, 0, G,w,k,n,temp,flag,it_b,it_t);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} | bb3aed7ca5f0a7ebd8ee5651e25139c6d3577829.cu | #include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <curand_kernel.h>
#include <stdlib.h>
#include <cuda.h>
#include <sys/time.h>
#include "gpu_update_sign.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{32,32},{1,64},{1,128},{1,192},{1,256},{1,320},{1,384},{1,448},{1,512},{1,576},{1,640},{1,704},{1,768},{1,832},{1,896},{1,960},{1,1024}};
int matrices_[7][2] = {{240,240},{496,496},{784,784},{1016,1016},{1232,1232},{1680,1680},{2024,2024}};
int main(int argc, char **argv) {
cudaSetDevice(0);
char* p;int matrix_len=strtol(argv[1], &p, 10);
for(int matrix_looper=0;matrix_looper<matrix_len;matrix_looper++){
for(int block_looper=0;block_looper<20;block_looper++){
int XSIZE=matrices_[matrix_looper][0],YSIZE=matrices_[matrix_looper][1],BLOCKX=blocks_[block_looper][0],BLOCKY=blocks_[block_looper][1];
int *G = NULL;
cudaMalloc(&G, XSIZE*YSIZE);
double *w = NULL;
cudaMalloc(&w, XSIZE*YSIZE);
int k = 1;
int n = XSIZE*YSIZE;
int *temp = NULL;
cudaMalloc(&temp, XSIZE*YSIZE);
int *flag = NULL;
cudaMalloc(&flag, XSIZE*YSIZE);
int it_b = 1;
int it_t = 1;
int iXSIZE= XSIZE;
int iYSIZE= YSIZE;
while(iXSIZE%BLOCKX!=0)
{
iXSIZE++;
}
while(iYSIZE%BLOCKY!=0)
{
iYSIZE++;
}
dim3 gridBlock(iXSIZE/BLOCKX, iYSIZE/BLOCKY);
dim3 threadBlock(BLOCKX, BLOCKY);
cudaFree(0);
gpu_update_sign<<<gridBlock,threadBlock>>>(G,w,k,n,temp,flag,it_b,it_t);
cudaDeviceSynchronize();
for (int loop_counter = 0; loop_counter < 10; ++loop_counter) {
gpu_update_sign<<<gridBlock,threadBlock>>>(G,w,k,n,temp,flag,it_b,it_t);
}
auto start = steady_clock::now();
for (int loop_counter = 0; loop_counter < 1000; loop_counter++) {
gpu_update_sign<<<gridBlock,threadBlock>>>(G,w,k,n,temp,flag,it_b,it_t);
}
auto end = steady_clock::now();
auto usecs = duration_cast<duration<float, microseconds::period> >(end - start);
cout <<'['<<usecs.count()<<','<<'('<<BLOCKX<<','<<BLOCKY<<')' << ','<<'('<<XSIZE<<','<<YSIZE<<')'<<']' << endl;
}
}} |
d47e153bf1cade270f83b3d6b23986b1019a19c5.hip | // !!! This is a file automatically generated by hipify!!!
//Example 1. Application Using C and CUBLAS: 1-based indexing
//-----------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <hip/hip_runtime.h>
#include <rocblas.h>
#define M 6
#define N 5
#define IDX2F(i,j,ld) ((((j)-1)*(ld))+((i)-1))
static __inline__ void modify (hipblasHandle_t handle, float *m, int ldm, int n, int p, int q, float alpha, float beta){
hipblasSscal (handle, n-p+1, &alpha, &m[IDX2F(p,q,ldm)], ldm);
hipblasSscal (handle, ldm-p+1, &beta, &m[IDX2F(p,q,ldm)], 1);
}
int main (void){
hipError_t cudaStat;
hipblasStatus_t stat;
hipblasHandle_t handle;
int i, j;
float* devPtrA;
float* a = 0;
a = (float *)malloc (M * N * sizeof (*a));
if (!a) {
printf ("host memory allocation failed");
return EXIT_FAILURE;
}
for (j = 1; j <= N; j++) {
for (i = 1; i <= M; i++) {
a[IDX2F(i,j,M)] = (float)((i-1) * M + j);
}
}
cudaStat = hipMalloc ((void**)&devPtrA, M*N*sizeof(*a));
if (cudaStat != hipSuccess) {
printf ("device memory allocation failed");
return EXIT_FAILURE;
}
stat = hipblasCreate(&handle);
if (stat != HIPBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n");
return EXIT_FAILURE;
}
stat = hipblasSetMatrix (M, N, sizeof(*a), a, M, devPtrA, M);
if (stat != HIPBLAS_STATUS_SUCCESS) {
printf ("data download failed");
hipFree (devPtrA);
hipblasDestroy(handle);
return EXIT_FAILURE;
}
modify (handle, devPtrA, M, N, 2, 3, 16.0f, 12.0f);
stat = hipblasGetMatrix (M, N, sizeof(*a), devPtrA, M, a, M);
if (stat != HIPBLAS_STATUS_SUCCESS) {
printf ("data upload failed");
hipFree (devPtrA);
hipblasDestroy(handle);
return EXIT_FAILURE;
}
hipFree (devPtrA);
hipblasDestroy(handle);
for (j = 1; j <= N; j++) {
for (i = 1; i <= M; i++) {
printf ("%7.0f", a[IDX2F(i,j,M)]);
}
printf ("\n");
}
free(a);
return EXIT_SUCCESS;
}
| d47e153bf1cade270f83b3d6b23986b1019a19c5.cu | //Example 1. Application Using C and CUBLAS: 1-based indexing
//-----------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cuda_runtime.h>
#include <cublas_v2.h>
#define M 6
#define N 5
#define IDX2F(i,j,ld) ((((j)-1)*(ld))+((i)-1))
static __inline__ void modify (cublasHandle_t handle, float *m, int ldm, int n, int p, int q, float alpha, float beta){
cublasSscal (handle, n-p+1, &alpha, &m[IDX2F(p,q,ldm)], ldm);
cublasSscal (handle, ldm-p+1, &beta, &m[IDX2F(p,q,ldm)], 1);
}
int main (void){
cudaError_t cudaStat;
cublasStatus_t stat;
cublasHandle_t handle;
int i, j;
float* devPtrA;
float* a = 0;
a = (float *)malloc (M * N * sizeof (*a));
if (!a) {
printf ("host memory allocation failed");
return EXIT_FAILURE;
}
for (j = 1; j <= N; j++) {
for (i = 1; i <= M; i++) {
a[IDX2F(i,j,M)] = (float)((i-1) * M + j);
}
}
cudaStat = cudaMalloc ((void**)&devPtrA, M*N*sizeof(*a));
if (cudaStat != cudaSuccess) {
printf ("device memory allocation failed");
return EXIT_FAILURE;
}
stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n");
return EXIT_FAILURE;
}
stat = cublasSetMatrix (M, N, sizeof(*a), a, M, devPtrA, M);
if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("data download failed");
cudaFree (devPtrA);
cublasDestroy(handle);
return EXIT_FAILURE;
}
modify (handle, devPtrA, M, N, 2, 3, 16.0f, 12.0f);
stat = cublasGetMatrix (M, N, sizeof(*a), devPtrA, M, a, M);
if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("data upload failed");
cudaFree (devPtrA);
cublasDestroy(handle);
return EXIT_FAILURE;
}
cudaFree (devPtrA);
cublasDestroy(handle);
for (j = 1; j <= N; j++) {
for (i = 1; i <= M; i++) {
printf ("%7.0f", a[IDX2F(i,j,M)]);
}
printf ("\n");
}
free(a);
return EXIT_SUCCESS;
}
|
4cbc12afd37bacc29b894cfa4781004d6e0c7afd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <stdlib.h>
#define N 3
#define M 3
#define K 3
#define T 8 // numero de threads por bloco
// codigo device
__global__ void multiplica_matriz(int *a, int *b, int *c){
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
c[N*i+j] = 0;
if (i < M && j < N)
for (int p = 0; p<K; p++){
c[N*i+j] += a[i*K+p] * b[N*p+j];
}
}
// Cdigo host
int main(){
int a[M*K], b[K*N], c[M*N];
int* dev_a;
int* dev_b;
int* dev_c;
// Inicializando as variaveis do host
for (int i = 0; i < M*K; i++){
a[i] = i;
for (int i = 0; i < K*N; i++)
b[i] = i*2;
}
// Alocando espao para as variaveis da GPU
hipMalloc((void**)&dev_a, M*K*sizeof(int));
hipMalloc((void**)&dev_b, K*N*sizeof(int));
hipMalloc((void**)&dev_c, M*N*sizeof(int));
// Copiando as variaveis da CPU para a GPU
hipMemcpy(dev_a, &a, M*K*sizeof(int), hipMemcpyHostToDevice);
hipMemcpy(dev_b, &b, K*N*sizeof(int), hipMemcpyHostToDevice);
// Chamada funo da GPU (kernel)
// Nmero de blocos igual dimenso do vetor dividida pela dimenso do bloco: N/M
// O tipo dim3 permite definir a quantidade de blocos e threads por dimensao.
// A terceira dimensao omitida, ficando implcito o valor 1.
dim3 numBlocos((M+T-1)/T,(N+T-1)/T);
dim3 numThreads(T,T);
hipLaunchKernelGGL(( multiplica_matriz), dim3(numBlocos), dim3(numThreads), 0, 0, dev_a, dev_b, dev_c);
// Copiando o resultado da GPU para CPU
hipMemcpy(&c, dev_c, M*N*sizeof(int), hipMemcpyDeviceToHost);
for (int i = 0; i < M; i++){
for (int j = 0; j < K; j++)
printf("%d ", a[K*i+j]);
printf("\n");
}
print("X");
for (int i = 0; i < K; i++){
for (int j = 0; j < N; j++)
printf("%d ", b[N*i+j]);
printf("\n");
}
// Visualizando o resultado
for (int i = 0; i < M; i++){
for (int j = 0; j < N; j++)
printf("%d ", c[N*i+j]);
printf("\n");
}
// Liberando a memoria na GPU
hipFree(dev_a);
hipFree(dev_b);
hipFree(dev_c);
return 0;
}
// 4 threads/bloco -> indice = 4*IdBloco + IdThread
// numero de blocos = (tamanho vetor / dimenso do bloco) -> funciona se os dois valores sao multiplos
// numero de blocos = ((tamanho vetor + dimensao do bloco -1) / dimensao do bloco) -> funciona sempre!
| 4cbc12afd37bacc29b894cfa4781004d6e0c7afd.cu | #include <stdio.h>
#include <stdlib.h>
#define N 3
#define M 3
#define K 3
#define T 8 // numero de threads por bloco
// codigo device
__global__ void multiplica_matriz(int *a, int *b, int *c){
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
c[N*i+j] = 0;
if (i < M && j < N)
for (int p = 0; p<K; p++){
c[N*i+j] += a[i*K+p] * b[N*p+j];
}
}
// Código host
int main(){
int a[M*K], b[K*N], c[M*N];
int* dev_a;
int* dev_b;
int* dev_c;
// Inicializando as variaveis do host
for (int i = 0; i < M*K; i++){
a[i] = i;
for (int i = 0; i < K*N; i++)
b[i] = i*2;
}
// Alocando espaço para as variaveis da GPU
cudaMalloc((void**)&dev_a, M*K*sizeof(int));
cudaMalloc((void**)&dev_b, K*N*sizeof(int));
cudaMalloc((void**)&dev_c, M*N*sizeof(int));
// Copiando as variaveis da CPU para a GPU
cudaMemcpy(dev_a, &a, M*K*sizeof(int), cudaMemcpyHostToDevice);
cudaMemcpy(dev_b, &b, K*N*sizeof(int), cudaMemcpyHostToDevice);
// Chamada à função da GPU (kernel)
// Número de blocos é igual à dimensão do vetor dividida pela dimensão do bloco: N/M
// O tipo dim3 permite definir a quantidade de blocos e threads por dimensao.
// A terceira dimensao é omitida, ficando implícito o valor 1.
dim3 numBlocos((M+T-1)/T,(N+T-1)/T);
dim3 numThreads(T,T);
multiplica_matriz<<<numBlocos, numThreads>>>(dev_a, dev_b, dev_c);
// Copiando o resultado da GPU para CPU
cudaMemcpy(&c, dev_c, M*N*sizeof(int), cudaMemcpyDeviceToHost);
for (int i = 0; i < M; i++){
for (int j = 0; j < K; j++)
printf("%d ", a[K*i+j]);
printf("\n");
}
print("X");
for (int i = 0; i < K; i++){
for (int j = 0; j < N; j++)
printf("%d ", b[N*i+j]);
printf("\n");
}
// Visualizando o resultado
for (int i = 0; i < M; i++){
for (int j = 0; j < N; j++)
printf("%d ", c[N*i+j]);
printf("\n");
}
// Liberando a memoria na GPU
cudaFree(dev_a);
cudaFree(dev_b);
cudaFree(dev_c);
return 0;
}
// 4 threads/bloco -> indice = 4*IdBloco + IdThread
// numero de blocos = (tamanho vetor / dimensão do bloco) -> funciona se os dois valores sao multiplos
// numero de blocos = ((tamanho vetor + dimensao do bloco -1) / dimensao do bloco) -> funciona sempre!
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.