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) {
764
764
*/
765
765
@InfoName(" CL_DEVICE_PARTITION_AFFINITY_DOMAIN ")
766
766
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));
780
768
}
781
769
782
770
@InfoName(" CL_DEVICE_PARTITION_MAX_SUB_DEVICES ")
@@ -1169,6 +1157,9 @@ public enum AffinityDomain implements com.nativelibs4java.util.ValuedEnum {
1169
1157
public static AffinityDomain getEnum (long v ) {
1170
1158
return EnumValues .getEnum (v , AffinityDomain .class );
1171
1159
}
1160
+ public static EnumSet <AffinityDomain > getEnumSet (long v ) {
1161
+ return EnumValues .getEnumSet (v , AffinityDomain .class );
1162
+ }
1172
1163
}
1173
1164
1174
1165
/**
You can’t perform that action at this time.
0 commit comments