Ejemplo n.º 1
0
 public OpenCLSytem(string kernel_source)
 {
     OpenCLEnvironment.SetupSingleDevice("*A*", CL.OpenCLDeviceTyp.Cpu);
     m_pCommandQueue = OpenCLEnvironment.CreateCommandQueue();
     m_pProgram      = OpenCLEnvironment.CreateProgramFromSource(kernel_source, "testProgramm");
     m_pProgram.Build(0, null);
     m_pKernel = m_pProgram.CreateKernel("add");
 }
Ejemplo n.º 2
0
 public Example(string path, Game pGame)
 {
     OpenCLEnvironment.SetupSingleDevice("*A*", OpenCLDeviceTyp.Cpu, pGame);
     m_pCommandQueue = OpenCLEnvironment.CreateCommandQueue();
     m_pProgram      = OpenCLEnvironment.CreateProgramFromSource(System.IO.File.ReadAllText(path), "testProgramm");
     m_pProgram.Build(0, null);
     m_pKernel = m_pProgram.CreateKernel("add");
 }