view src/test/multiply.cu @ 358:98c6e13d8ec7

add sort.cbc
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Sat, 24 Jun 2017 20:07:27 +0900
parents 609bf62768b9
children
line wrap: on
line source

extern "C" {
    __global__ void multiply(float* A, float* B, float* C) {
//        printf("%d %d\n",i[0],i[1]);
        int index = blockIdx.x * blockDim.x + threadIdx.x;
        C[index] = A[index] * B[0];
    }

}