device selection too restrictive

Bug #913764 reported by Ondřej Hošek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pocl
Fix Released
Undecided
Pekka Jääskeläinen

Bug Description

Greetings,

first off, thanks for starting this project and getting it this far -- I'm glad I can develop and debug OpenCL-enabled applications on Linux-based systems without specialized hardware.

However, I have noticed that pocl is sometimes a bit too restrictive with regard to device selection in the API. For example, in clCreateContextFromType, where device_type is theoretically a bitmask, it checks for equality on each of the devices; and in clGetDeviceIDs, it doesn't store a single value in the devices array (and returns an error instead) if the array isn't large enough. (The expected behavior would be to fill the array as far as possible, i.e. to min(num, num_entries).)

The attached patch fixes the behavior in both cases.

Related branches

Revision history for this message
Ondřej Hošek (ravu-al-hemio) wrote :
Changed in pocl:
assignee: nobody → Pekka Jääskeläinen (pekka-jaaskelainen)
Revision history for this message
Pekka Jääskeläinen (pekka-jaaskelainen) wrote :

Committed as r128. Thanks for patch, keep them coming! :)

Changed in pocl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.