Hello,
i’m trying to use C standard assert in a device function with device emulation enabled ( --deviceemu option ). This is my code:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
__global__ void MyFunc ( RayOutput* roPtr )
{
const unsigned int rIdx ( blockIdx.x*blockDim.x + threadIdx.x );
#ifdef __DEVICE_EMULATION__
assert ( rIdx<1024 );
#endif
}
but it generates the following error:
error C2664: '_wassert' : cannot convert parameter 1 from 'const unsigned short [10]' to 'const wchar_t *'
I’m compiling with VS2005 SP1 under Windows Vista x64. The project is set to use unicode ()… but I also tried with MBCS and ASCII and got the same error.
Any idea how can I solve it without having to implement my own assert, pls?