view example/multiply/cuda/multiply.cu @ 1941:f19885ea776d draft

add wordcount for cuda. fix CudaScheduler. add makefile
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Tue, 04 Feb 2014 02:18:07 +0900
parents 67e50779feb4
children da22fc4db5b2
line wrap: on
line source

extern "C" {
    __global__ void multi(long* params, float* A, float* B, float* C) {
        //int id = blockIdx.x * blockDim.x + threadIdx.x;
        long length = params[0];
        for (int id = 0; id < length; id++) 
            C[id]=A[id]*B[id];
    }
}