CUDA wrapper

Seth Shelnutt shelnutt2 at gmail.com
Mon Jul 7 12:09:58 CDT 2008


The compiler chokes on the C++ coding that you pointed out. I'm not sure
exactly how to handle it, maybe just convert it all to c syntax? For now
I'll just commit out those lines and just work on trying to get something to
compile.

Now are you saying the code should be,
retval, WINAPI wine_cudaGetDeviceCount( int* count ){
    return cudaGetDeviceCount( count );
}

or should it be

retval, WINAPI wine_cudaGetDeviceCount( int* count )

or

retval = WINAPI wine_cudaGetDeviceCount( int* count ){
    return cudaGetDeviceCount( retval );
}

I've never used retval and going off of
http://www.systhread.net/texts/200612retval.php , it seems that retval is as
simple as returning the value from a function, so I set the input to equal
retval then I can return the function ( retval) and it will have all the
values right? Maybe I am miss understanding it.


On Mon, Jul 7, 2008 at 12:26 PM, Stefan Dösinger <stefan at codeweavers.com>
wrote:

>  Actually you want something like
>
> retval WINAPI wine_cudaSomething(int a, int etc)
>
> so instead of the void use the return value the function is supposed to
> return
>
>
>
> WINAPI tells the compiler about the calling convention(ie, first parameter
> on the stack, in ecx, or elsewhere, who takes care about cleaning up the
> stack, etc). You'll have to check the calling convention Win32 cuda uses,
> but most likely WINAPI is correct. You don't have to care about the Linux
> cuda calling convention, since the compiler knows about that from the Linux
> cuda headers
>
>
>
> I am also not quite sure about some constructs, like
>
> "wine_cudaBindTexture( size_t* offset, const struct texture < T, dim,
> readMode >& texRef, const void* devPtr, const struct cudaChannelFormatDesc&
> desc, size_t size = UINT_MAX )" As far as I know this contains C++ or
> Microsoft syntax, which is not valid in pure C.
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20080707/00cba64e/attachment.htm 


More information about the wine-devel mailing list