I have created a project in VS2008 and it runs just fine. After creating the kernel and everything, the program executes on the GPU. I then create another project in VS2010, link to the same library file in References, and then the program has a runtime error on program.build. Even when I debug, the only output I get is:
Cloo.BuildProgramFailureComputeException: OpenCL error code detected: BuildProgramFailure.
at Cloo.ComputeException.ThrowOnError(ComputeErrorCode errorCode)
at Cloo.ComputeProgram.Build(ICollection`1 devices, String options, ComputeProgramBuildNotifier notify, IntPtr notify
at ConsoleApplication2.Program.Main(String args) in c:\users\dna\documents\visual studio 2010\Projects\ConsoleAppli
Press any key to continue . . .
Anyone have any idea what may be causing this?
1) Do Clootils work? Can you build and run them/it?
2) What OpenCL implementation are you using (AMD, Intel, Nvidia)?
3) What windows (XP, Vista, 7, 32x64 bits)?
Hi everybody, i'm just new to OpenCL and i have a question: How can i display an image from a specific directory into a bitmap using OpenCL Cloo???
You can use this code:
Bitmap bmp = new Bitmap("filename");
BitmapData bmpData = bmp.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadWrite,
ComputeImage img = new ComputeImage2D(clContext, ComputeMemoryFlags.CopyHostPointer,
new ComputeImageFormat(ComputeImageChannelOrder.Bgra, ComputeImageChannelType.UnsignedInt8),
width, height, 0, bmpData.Scan0);
Modify the parameters to fit your image file.
Please, next time:
1) Do not hijack other threads that don't fit your question, but start a new one, and
2) do not post the same question in several places. It makes a mess of the forums.
Thanx alot, it works well,i appreciate your help, and i'm so sorry for that inconvenience :)
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.