annotate example/multiply/cuda/multiply.cu @ 1935:67e50779feb4 draft

CudaScheduler is runnig.
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Sun, 02 Feb 2014 18:33:54 +0900
parents 4eefec26e3e2
children f19885ea776d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1927
4eefec26e3e2 add file
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 extern "C" {
1935
67e50779feb4 CudaScheduler is runnig.
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1927
diff changeset
2 __global__ void multi(void* params, float* A, float* B, float* C) {
1927
4eefec26e3e2 add file
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 int id = blockIdx.x * blockDim.x + threadIdx.x;
4eefec26e3e2 add file
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 C[id]=A[id]*B[id];
4eefec26e3e2 add file
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 }
4eefec26e3e2 add file
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 }