File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
Core/src/main/velocity/com/nativelibs4java/opencl Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -764,19 +764,7 @@ private EnumSet<PartitionType> getPartitionTypeInfo(int info) {
764764 */
765765 @InfoName(" CL_DEVICE_PARTITION_AFFINITY_DOMAIN ")
766766 public EnumSet<AffinityDomain> getPartitionAffinityDomains() {
767- EnumSet<AffinityDomain> ret = EnumSet.noneOf(AffinityDomain.class);
768- Pointer<?> ptr = infos.getMemory(getEntity(), CL_DEVICE_PARTITION_AFFINITY_DOMAIN);
769- if (ptr != null) {
770- Pointer<SizeT> props = ptr.as(SizeT.class);
771- for (long i = 0, n = props.getValidElements(); i < n; i++) {
772- long value = props.getSizeTAtIndex(i);
773- if (value == 0) {
774- break;
775- }
776- ret.add(AffinityDomain.getEnum(value));
777- }
778- }
779- return ret;
767+ return AffinityDomain.getEnumSet(infos.getIntOrLong(getEntity(), CL_DEVICE_PARTITION_AFFINITY_DOMAIN));
780768 }
781769
782770 @InfoName(" CL_DEVICE_PARTITION_MAX_SUB_DEVICES ")
@@ -1169,6 +1157,9 @@ public enum AffinityDomain implements com.nativelibs4java.util.ValuedEnum {
11691157 public static AffinityDomain getEnum (long v ) {
11701158 return EnumValues .getEnum (v , AffinityDomain .class );
11711159 }
1160+ public static EnumSet <AffinityDomain > getEnumSet (long v ) {
1161+ return EnumValues .getEnumSet (v , AffinityDomain .class );
1162+ }
11721163 }
11731164
11741165 /**
You can’t perform that action at this time.
0 commit comments