Thanks Karl,
No you aren't missing anything. Thanks for pointing out the obvious. Not
sure why I didn't think about that (recycling too much code on my end).
Regards,
Charles
On Tue, May 3, 2016 at 3:31 PM, Karl Rupp <r...@iue.tuwien.ac.at> wrote:
> Hi Charles,
>
> > Is there any way to filter device types without initializing a context
>
>> and changing the default device type for example:
>>
>> viennacl::ocl::set_context_device_type(id, viennacl::ocl::gpu_tag());
>> viennacl::ocl::current_context().devices().size();
>>
>> I can access the platform(s) with
>>
>> viennacl::ocl::get_platforms();
>>
>> and iterate through them and get the overall size:
>>
>> platforms[platform_index].devices().size();
>>
>> but that includes all devices (GPU, CPU, etc.). Is there any way to
>> filter on the platform object itself?
>>
>
> Sure, you can just query the type from each device. Use the member
> function .type() an compare against
> CL_DEVICE_TYPE_GPU/CL_DEVICE_TYPE_CPU/CL_DEVICE_TYPE_ACCELERATOR
> Push the devices you want to keep to an std::vector<> to get the desired
> behavior.
>
> Am I missing something?
>
> Best regards,
> Karli
>
>
>
>> Regards,
>> Charles
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>> Manager
>> Applications Manager provides deep performance insights into multiple
>> tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>
>>
>>
>> _______________________________________________
>> ViennaCL-devel mailing list
>> ViennaCL-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/viennacl-devel
>>
>>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel