Deep Learning, Machine Learning, Gpu, Cuda, AI.
results are transfered back from the device (GPU) to the host (CPU). So let’s go back to our problem of adding two vectors: #include <stdio.h> void AddTwoVectors(flaot A[], float B[], float C[]) { for (int i = 0; i < N; i++) { C[i] = A[i] + B[i]; } } int main() { ... AddTwoVectors(A, B, C); ... }