I noticed the returned variables in the call to cuDeviceTotalMem are actually integers (32 bits).
This will probably create some problems soon as graphics cards go over 4 GB in ram ?!?
A 64 bit integer version would have been better, but I guess it can still be made and simply added… the sooner the better me thinks
Another solution could be to pass in a value like:
0 for bytes
1 for kilobytes
2 for megabytes
3 for gigabytes
4 for terrabytes
And so forth… the api would then return the requested kwantity.
A little drawback is slight to severe rounding/truncating so a 64 bit version would still be more precise.