On 05/18/2013 11:36 PM, O. Hartmann wrote:
> There is an opensource project called "ocl-icd" which I'm aware of, but
> it doesn't "configure" on FreeBSD (I guess too many Linuxism) or I'm to
> dull to get it right. The autotools fail with some weird missing macro
> definitions.

If ocl-icd doesn't work for you, you could try the Khronos ICD loader with
a patch from pocl applied. Instructions here:

http://pocl.sourceforge.net/docs/html/development.html#khronos-icd-loader

For your problem: When looking at the code there's only one spot
where clGetPlatformIDs() can return an error:

POname(clGetPlatformIDs)(cl_uint           num_entries,
                  cl_platform_id *  platforms,
                  cl_uint *         num_platforms) CL_API_SUFFIX__VERSION_1_0
{
   int const num = 1;
   int i;

   if (platforms != NULL) {
     if (num_entries < num)
       return CL_INVALID_VALUE;

     for (i=0; i<num; ++i)
       platforms[i] = &_platforms[i];
   }

   if (num_platforms != NULL)
     *num_platforms = num;

   return CL_SUCCESS;
}

That is, if the num_entries is less than 1 and platforms != NULL.

In your case platforms is NULL so it should not be possible
to return an error. Perhaps you could step through the program
with gdb and see where it ends up. Does it even get to the pocl
implementation of the function?

BR,
-- 
--Pekka


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to