Questions tagged [cloo]

Cloo is an open source, easy to use, managed library which enables .NET/Mono applications to take full advantage of the OpenCL framework.

Cloo is an object-oriented wrapper for OpenCL host code on the .NET and Mono platforms, written in C#. It is open source, and provides a somewhat higher-level abstraction of the OpenCL host APIs than a plain API wrapper would.

It is available at https://sourceforge.net/projects/cloo/ and licensed under an MIT license.

37 questions
1
vote
1 answer

How do I reduce the overhead of buffer creation for OpenCL/Cloo (C#)?

I'm using OpenCL through the C# Cloo interface and I'm running into some very frustrating issues when trying to get it running well in our product. Without giving too much away, our product is a computer vision product which, thirty times a second,…
user2415010
1
vote
1 answer

"Zero copy" is slower in my OpenCL/Cloo(C#) program than non-zero copy

This may simply be an issue with the memory objects being allocated by the .NET framework not being properly page-aligned, but I cannot see why zero-copy is slower for me than non-zero copy. I'll include code inline in this question, but the…
user2415010
1
vote
1 answer

Am I reusing OpenCL/Cloo(C#) objects correctly?

I'm experimenting with OpenCL (through Cloo's C# interface). To do so, I'm experimenting with the customary matrix-multiplication-on-the-GPU. The problem is, during my speed tests, the application crashes. I'm trying to be efficient regarding the…
user2415010
1
vote
1 answer

How to pass large buffers to OpenCL devices?

I'm writing a program on C# using OpenCL (Cloo.dll) and i need to pass the large buffer to OpenCL ComputeDevice. When I pass this buffer to OpenCL ComputeDevice - program crashes without any exception or error. Code: ComputeBuffer
Roman
  • 11,966
  • 10
  • 38
  • 47
1
vote
1 answer

Can I use OpenCL with Monogame?

I'm looking at Monogame for developing with. The site mentions it has OpenTK "under the hood". Does this mean I could have solid access to OpenCL using Monogame, or has OpenCL been split off into Cloo? My primary objectives are cross-platform,…
Jack
  • 2,229
  • 2
  • 23
  • 37
1
vote
1 answer

OpenCL with Cloo: Profilers not working

I'd like to profile my application which I've written in C# using Cloo as a wrapper for OpenCL. I've tried a few things... gDEBugger, AMD APP SDK, CodeXL, KernelAnalyzer... Copy-Pasting my Kernel Code as it is to KernelAnalyzer will indicate that…
beta vulgaris
  • 433
  • 4
  • 13
1
vote
1 answer

OpenCL host synchronization requirements

I'm experiencing strange bug with my OpenCL kernel. Basically it's bitonic sort upgraded to N != pow of 2. What I do is that I check back on host if the sequence is ordered correctly and what brought me here was the answer NOT. Now the bug is very…
Raven
  • 4,783
  • 8
  • 44
  • 75
0
votes
0 answers

OpenCL slow CPU performance

I have a huge amount of calculations that needs to be done. i am using C#. when using the c# native environment (which is normally slower than opencl) i am able to do about 1.25 million round per second but when using the opencl kernel it drops to…
0
votes
0 answers

Cloo implementing 2DArray

Hello i have this code that copy array into an other but its not exactly what i want. i want my kernel able to output a 2Darray that act like it memorise all the first array change so it increment a column at each update turn. but i have probleme…
Zwan
  • 632
  • 2
  • 6
  • 23
0
votes
1 answer

OpenCL extensions in Cloo

I try to use the double precision extension in my OpenCL kernel but it won't build. (Cloo.BuildProgramFailureComputeException) Here's my code: string kernel = @" #pragma OPENCL EXTENSION cl_khr_fp64 : enable kernel void ImgWarp( global char*…
beta vulgaris
  • 433
  • 4
  • 13
0
votes
0 answers

OpenCL kernel silently fails to run

I have tried this code on two different systems: using System; using System.Collections.Generic; using System.Linq; using Cloo; namespace MinimalExample { class Program { static void Main(string[] args) { var…
Theodoros Chatzigiannakis
  • 28,773
  • 8
  • 68
  • 104
0
votes
1 answer

C#/OpenCL - 2D array as kernel argumment

I'm using the Cloo libary for C#. I can't figure out or find anything about how to add a 2D array as a kernel argument. Here is my code: ComputeBuffer field = new ComputeBuffer(Program.context, ComputeMemoryFlags.ReadWrite |…
Hanno Ottens
  • 51
  • 1
  • 11
0
votes
1 answer

When using Cloo in C#, ComputePlatform.Platforms.Count is zero, even though I have a graphics card installed (obviously)

I need to access my graphics card using Cloo in C#. When I try to access it through ComputePlatform.Platforms, this list is empty. My drivers are up to date, I have tried doing this is Visual Studio 2013 and 2015, but no results. Please help!
0
votes
0 answers

Write image to a specific Device Memory Space defined by an IntPtr

I'd like to write an image from a kernel to a specified place in device memory which I define by an IntPtr. Although it's not directly related to this problem, it's the RenderTexture from Unity which I want to change from inside the kernel in order…
Seneral
  • 327
  • 4
  • 12
0
votes
1 answer

OpenCL compiler white-space problems

I'm trying to get started with OpenCL but came across weird behavior of the OpenCL compiler with respect to white-space and can't seem to find any documentation about that. C-style single-line comments (// foo) immediately cause a meaningless build…
Gigo
  • 3,188
  • 3
  • 29
  • 40