view example/Cuda/multiply.cu @ 1918:15e8c50ed570 draft

add cuda sample, not running
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 24 Jan 2014 07:16:26 +0900
parents
children d6e033734c12
line wrap: on
line source

__global__ void multiply(int* A, int* B, int* C) {
    int index = blockIdx.x * blockDim.x + threadIdx.x;
    
    C[index] = A[index] * B[index];
}