NVIDIA OpenCL SDK Code Samples

This examples
https://developer.nvidia.com/opencl

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:

[url]c++ - How to create NVIDIA OpenCL project - Stack Overflow

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.