Created
August 7, 2021 06:35
-
-
Save sachith-1/d87c3cf2769fd9ee7fefb51a88708029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
int *n1, *n2, *sum; | |
int *dN1, *dN2, *dSum; | |
int size = sizeof(int); | |
// allocate device memory | |
cudaMalloc((void **)&dN1, size); | |
cudaMalloc((void **)&dN2, size); | |
cudaMalloc((void **)&dSum, size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment