Skip to content

Commit

Permalink
add blas funcition 'add'
Browse files Browse the repository at this point in the history
  • Loading branch information
Huanghongru committed May 30, 2018
1 parent 33913e9 commit fee264f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blas.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__global__ void add(int *a, int *b, int *c, int N) {
int tid = blockIdx.x;
if (tid < N)
c[tid] = a[tid] + b[tid];
}

0 comments on commit fee264f

Please sign in to comment.