LongBuffer types = getInfoLongs(CL_DEVICE_AFFINITY_DOMAINS_EXT);
List<AffinityDomain> list = new ArrayList<AffinityDomain>();
while(types.hasRemaining()) {
AffinityDomain type = AffinityDomain.valueOf((int)types.get());
if(type != null) {
list.add(type);
}
}
return EnumSet.copyOf(list);