Running in emulator mode

Sep 19, 2013 at 6:43 AM
I've never been able to get the emulator working.

I had thought it would be as simple as changing this line
gpu = CudafyHost.GetDevice(CudafyModes.Target,0);
To this:
gpu = CudafyHost.GetDevice(eGPUType.Emulator, 0);
but it gives the error:
"Attempted to access an element as a type incompatible with the array"
Sep 19, 2013 at 12:55 PM
It's not an error that makes sense but there were some issues with the emulator that have now be fixed and committed. Will be in next release or you can download and build.
Sep 20, 2013 at 10:47 PM
I get the same error in v1.26.

If I get a chance I will download the code and debug.
Sep 21, 2013 at 12:08 AM
Edited Sep 21, 2013 at 12:08 AM
found the problem, there was nothing wrong with Cudafy.

my gpu variable was actually an array of 2 (so that I can control 2 gpus).
gpu[0] = CudafyHost.GetDevice(eGPUType.Emulator, 0);
gpu was defined like this:
GPGPU[] gpu;
but dimensioned as:
gpu = new CudaGPU[2];
rather than:
gpu = new Cudafy.Host.GPGPU[2];
Sep 21, 2013 at 9:06 AM
For using the emulator I would still recommend downloading the latest sources.