摘要:
Ref to "The CUDA Compiler Driver NVCC, Last modified on:<08-23-2010>"Some useful options:-c-ptx-v-keep-clean-arch-code-gencodeUsing this command: nvcc VecAdd.cu -keep -vVerbose#$ _SPACE_= #$ _CUDART_=cudart#$ _HERE_=/usr/local/cuda/bin#$ _THERE_=/usr/local/cuda/bin#$ _TARGET_SIZE_=#$ 阅读全文
摘要:
source code, VecAdd.cuVecAdd.cu#include <iostream>#define MAXN 128__global__ void VecAdd( float* A, float* B, float* C ) { int i = threadIdx.x; for( ; i < MAXN; i += 128 ) { C[i] = A[i] + B[i]; }}int main( int argc, char **argv ) { float h_A[MAXN], h_B[MAXN], h_C[MAXN]; float *d_A, *d_B, *d 阅读全文