Skip to content

Commit

Permalink
fix missing add
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jan 8, 2022
1 parent eca8d57 commit 1a05aab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numcu/src/elemwise.cu
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void d_mul(float *dst, const float *src_a, const float *src_b, const size_t N) {
/// dst = src_a + src_b
void d_add(float *dst, const float *src_a, const float *src_b, const size_t N) {
#ifdef CUVEC_DISABLE_CUDA
for (size_t i = 0; i < N; ++i) dst[i] = src_a[i] + src_b[i];
#else
dim3 thrds(NUMCU_THREADS, 1, 1);
dim3 blcks((N + NUMCU_THREADS - 1) / NUMCU_THREADS, 1, 1);
Expand Down

0 comments on commit 1a05aab

Please sign in to comment.