No-stress CUDA programming using Go and Cby@cleuton-sampaio
9,321 reads
9,321 reads

No-stress CUDA programming using Go and C

by Cleuton Sampaio3mFebruary 14th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

CUDA is for C, so the best alternative is to use Command cgo and invoke an external function with your Cuda Kernel. The vecmul() function is the kernel and a helper function to be called externally. I created a Simple Kernel that has the kernel function and helper function. Its function is to allocate memory in the GPU, copy the parameters, invoke the kernel, and copy the result. Values ​​are passed by reference. If you want to know more about CUDA programming, read the my article.

Company Mentioned

Mention Thumbnail
featured image - No-stress CUDA programming using Go and C
Cleuton Sampaio HackerNoon profile picture
Cleuton Sampaio

Cleuton Sampaio

@cleuton-sampaio

Founder: "pythondrops.com". Full-stack dev/ AI Engineer/ Professional Writer/ M.Sc. Rio de Janeiro

Learn More
LEARN MORE ABOUT @CLEUTON-SAMPAIO'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Cleuton Sampaio HackerNoon profile picture
Cleuton Sampaio@cleuton-sampaio
Founder: "pythondrops.com". Full-stack dev/ AI Engineer/ Professional Writer/ M.Sc. Rio de Janeiro

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!