C#.NET WPF (VS 2010) & CUDAFy

Oct 4, 2012 at 2:30 AM

The WPF application stops abruptly wihtout any exception when I try to run:

CudafyModes.Target = Cudafy.eGPUType.Cuda;
                        CudafyModule km = CudafyTranslator.Cudafy(eArchitecture.sm_20);

This happens after the second line above. I am able to compile and run samples that I have downloaded from various tutorials. They're all using Windows Form or are Console based. I am not sure what I am doing wrong. I am pretty sure it supports WPF, but am I missing a separate library to run a WPF?

I am using CudaFy v 1.9 and have download Cuda toolkit 4.2. NVCC is configured just fine. I have tested this.

Oct 6, 2012 at 2:16 AM

So it does not work with WPF application?

Coordinator
Oct 6, 2012 at 2:52 PM

We are unable to reproduce the issue.  Did you possibly try to cudafy code that was within a Wpf class, e.g. MainWindow?  If you can provide more information then I’d like to understand what is happening.

 

Oct 7, 2012 at 2:53 AM

I saw what was going on. Non static methods are not supported. That is the exception I am getting. Is there a constructor that supports non-static methods? I am trying to run this with TPL for objects that have their own properties and thus cannot be run from a static context.

Coordinator
Oct 7, 2012 at 8:27 AM

Hi,

The reason for not supporting non-static methods is not entirely watertight but it does reduce the chance that member variables are accessed.  Typically we used classes because we also make use of members. This is not supported, so by cuda.  If members are not used then a static method can usually be used.  Therefore the reason to only support static.

Since all sources are provided there is nothing to stop you as a commercial license user to modify the code, or request a customization from us, to allow support of non-static.  I'd be interested to learn about you are using TPL.

Nick