NVIDIA OpenCL SDK Code Samples

This examples

how do I build in visual studio 2019?

They aren’t maintained in such a way that you can directly build them in VS2019. You would need to create your own new projects for each one.

The general method to do so is outlined here:

https://stackoverflow.com/questions/56858213/how-to-create-nvidia-opencl-project

if you already have the CUDA toolkit installed, you can skip the OpenCL download steps indicated there. Personally, I would recommend installing the CUDA toolkit anyway; that is how I build OpenCL codes, but there are many ways to set it up.