// Copyright (c) 2021 NVIDIA Corporation. All rights reserved. #include #include #define N 512 void host_add(int *a, int *b, int *c) { for(int idx=0;idx>>(d_a,d_b,d_c); // Copy result back to host cudaMemcpy(c, d_c, size, cudaMemcpyDeviceToHost); print_output(a,b,c); free(a); free(b); free(c); cudaFree(d_a); cudaFree(d_b); cudaFree(d_c); return 0; }