Click here to Skip to main content
16,005,697 members

Comments by Rick York (Top 200 by date)

Rick York 13-Aug-24 11:55am View    
Are you trying to use a C# library with native C++?
Rick York 7-Aug-24 21:54pm View    
To add to what Richard wrote, there should be a minimum of code in header files. It is those that you want to be clean because they are the interface to your code and what other users of it will look at the most. Most importantly, a header file should stand on its own which means no other headers should be required to use the code in the header - it should be self-contained. When you put a bunch of code in the header, like you have in this one, it will require additional headers and that is not a good practice. In your case, windows.h, stdlib.h, and the headers for streams are required. Those should be in the implementation file, not the header. For the header you posted, it should contain one thing : static void KAA_Init(); and that is all. The implementation should be in a .cpp file.
Rick York 4-Aug-24 12:58pm View    
Probably. I have written a fair amount of parallel code for both CPUs and GPUs. If you want a minimum value then the usual algorithm is a called a reduction. There have been a lot of reductions written for CUDA that run on GPUs so you should read up on those.

Why are you assuming anything? Assumption is the enemy of functional software.
Rick York 24-Jul-24 10:54am View    
I would not recommend .Net's C++ either. It is a nauseating abomination.
Rick York 23-Jul-24 20:40pm View    
You are not likely to just "find a solution" for your problem here. This site's members are not interested in doing people's homework for them so you have to put a bit of effort into it yourself.