Skip to content

Commit 5bcfdac

Browse files
committed
fix previous typo (infos.getPointer instead of infos.getMemory) that doesn't show up with macbook air fission-averse devices
1 parent 49e2ee3 commit 5bcfdac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Core/src/main/velocity/com/nativelibs4java/opencl/CLDevice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ public EnumSet<PartitionType> getPartitionType() {
744744
745745
private EnumSet<PartitionType> getPartitionTypeInfo(int info) {
746746
EnumSet<PartitionType> ret = EnumSet.noneOf(PartitionType.class);
747-
Pointer<?> ptr = infos.getPointer(getEntity(), info);
747+
Pointer<?> ptr = infos.getMemory(getEntity(), info);
748748
if (ptr != null) {
749749
Pointer<SizeT> props = ptr.as(SizeT.class);
750750
for (long i = 0, n = props.getValidElements(); i < n; i++) {
@@ -765,7 +765,7 @@ private EnumSet<PartitionType> getPartitionTypeInfo(int info) {
765765
@InfoName("CL_DEVICE_PARTITION_AFFINITY_DOMAIN")
766766
public EnumSet<AffinityDomain> getPartitionAffinityDomains() {
767767
EnumSet<AffinityDomain> ret = EnumSet.noneOf(AffinityDomain.class);
768-
Pointer<?> ptr = infos.getPointer(getEntity(), CL_DEVICE_PARTITION_AFFINITY_DOMAIN);;
768+
Pointer<?> ptr = infos.getMemory(getEntity(), CL_DEVICE_PARTITION_AFFINITY_DOMAIN);
769769
if (ptr != null) {
770770
Pointer<SizeT> props = ptr.as(SizeT.class);
771771
for (long i = 0, n = props.getValidElements(); i < n; i++) {

Core/src/test/java/com/nativelibs4java/opencl/KernelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public <T> Object testArrayArg(String type, Object array, Class<T> targetType) {
4343
CLBuffer<Byte> out = context.createByteBuffer(Usage.Output, size * length);
4444
StringBuilder b = new StringBuilder(
4545
"#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n" +
46-
"kernel void f(constant " + type + length + " arg, global " + type + "* out, long length) {\n");
46+
"kernel void f(" + type + length + " arg, global " + type + "* out, long length) {\n");
4747
for (long i = 0; i < length; i++) {
4848
b.append("out[" + i + "] = arg.s" + (i < 10 ? i + "" : ((char)((int)'a' + (i - 10))) + "") + ";\n");
4949
}

0 commit comments

Comments
 (0)