/* STARTDEF void bones_prekernel__0(cudaStream_t kernel_stream, , ); ENDDEF */ // Start of the kernel __global__ void bones_kernel__0(, ) { const int bones_global_id = blockIdx.x*blockDim.x + threadIdx.x; if (bones_global_id < ()) { // Calculate the global ID(s) based on the thread id // Start the computation } } // Function to start the kernel extern "C" void bones_prekernel__0(cudaStream_t kernel_stream, , ) { int bones_block_size; if ( >= 64*512 ) { bones_block_size = 512; } else if ( >= 64*256 ) { bones_block_size = 256; } else { bones_block_size = 128; } dim3 bones_threads(bones_block_size); dim3 bones_grid(DIV_CEIL(,bones_block_size)); bones_kernel__0<<< bones_grid, bones_threads, 0, kernel_stream >>>(, ); }