Hello,
The examples in the GPU Computing 4.0 are way too difficult for programmers trying to use the cuda driver api from other languages like Pascal/Delphi.
These examples assume that everything is already working, and this assumption is false.
Getting CUDA working from other languages is already difficult enough, especially with passing in parameters to cuda kernel calls.
There should be some examples which focus on getting cuda working.
For example:
Passing in:
Integers
Pointers
Passing out:
Integers
for example:
Kernel( int ParameterIn, int *ParameterOut )
{
*ParameterOut = ParameterIn;
}
is already difficult enough to get working.
^ This is probably the most basic cuda example that can be made working fully.
Half-full would also be usefull if it weren’t for the compiler scratching useless code away.
Therefore the code above is probably the most minimal… there must be output, otherwise all code is “scratched” away.
Furthermore:
What does “kernel parameters” except on host side ?
Pointers to host values ?
Or pointers to cuda pointers ?
It’s a bit confusing.
So far I am seeing cuda pointers being passed in to my complexer test… it’s strange.
Now I will have to fall back to a really simple test like above to see what’s happening.
I am now unsure what to pass in exactly from the host side… since there are no simple examples from the SDK available.
Just finding the “launch call site” is already difficult enough with all that complex clutter code around it.
I will now try to get this working:
extern "C"
{ // extern c begin
__global__ void Kernel( int ParaIn, int *ParaOut )
{
*ParaOut = ParaIn;
}
} // extern c end