Skip to content

Instantly share code, notes, and snippets.

View AxoyTO's full-sized avatar
👨‍💻

Tevfik Aksoy AxoyTO

👨‍💻
View GitHub Profile
@AxoyTO
AxoyTO / addVectors.cu
Last active September 26, 2021 17:09
CUDA AddVectors (TASK_01)
#include <cuda.h>
#include <chrono>
#include <cstdlib>
#include <iostream>
__global__ void addVectorsKernel(const double* A, const double* B, double* C, double n) {
int i = blockDim.x * blockIdx.x + threadIdx.x;
if (i < n) {
C[i] = A[i] + B[i];
}