Open ghost opened 3 years ago
In my opinion, a very strange startup syntax has been chosen.
#if defined(__NVCC__) add<<<blocks, threads>>>(dev_a, dev_b, dev_c, N); #else const int stream_id = 0; vuda::launchKernel("add.spv", "main", stream_id, blocks, threads, dev_a, dev_b, dev_c, N); #endif
I would suggest something like this… (C++ only)
auto add = vuda::makeKernel<int*,int*,int*,int>("add.spv", "main"); // import function add(stream_id, blocks, threads)(dev_a, dev_b, dev_c, N); // use calling operator
I also offer a similar API for the C language. It is not clear just how the launch kernel will look in the C version.
Thank you for your suggestion. I agree, the syntax is not ideal and it has a somewhat legacy look by now. When I come around to revisit it, I will take your suggested syntax into consideration.
In my opinion, a very strange startup syntax has been chosen.
I would suggest something like this… (C++ only)
I also offer a similar API for the C language. It is not clear just how the launch kernel will look in the C version.