<code c> void add)scalar(float s, float * v, int n) {
float * v_gpu; cudaMalloc(&v_gpu, n*sizeof(float)); cudaMemcpy(v_gpu, v, n*sizeof(float), cudaMemcopyHostToDevice); dim3 dimBlock(BLOCKSIZE); dim3 dimGrid(ceil(n / BLOCKSIZE)); add_scalar)gpu