diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b97031b2e9d789044a573e4feea202d8f04bac..3184c22713b34af9695cd6392001d3764b7d67fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Aparapi Changelog +## 1.4.0 + +* KernelRunner.BINARY_CACHEING_DISABLED is no longer availible, is/setter is to be used instead. + ## 1.3.2 * Added Windows 64bit support. diff --git a/pom.xml b/pom.xml index 4a674fd8a039d32f66723a30725b702369c6946d..0d92774f4dfe678bd2ccde7b16e2636013e934e9 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ <groupId>com.aparapi</groupId> <artifactId>aparapi</artifactId> - <version>1.3.3-SNAPSHOT</version> + <version>1.4.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> diff --git a/src/main/java/com/aparapi/internal/kernel/KernelPreferences.java b/src/main/java/com/aparapi/internal/kernel/KernelPreferences.java index 7b9922cdb369812798c3494a1a6155b4170d67bd..d5e103b77af8b7dd378e25b218e7839d9eeb223e 100644 --- a/src/main/java/com/aparapi/internal/kernel/KernelPreferences.java +++ b/src/main/java/com/aparapi/internal/kernel/KernelPreferences.java @@ -1,12 +1,12 @@ /** * Copyright (c) 2016 - 2017 Syncleus, Inc. - * <p> + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/src/main/java/com/aparapi/internal/kernel/KernelRunner.java b/src/main/java/com/aparapi/internal/kernel/KernelRunner.java index bc35600e515dfda1b148299d53cff9abd187bca8..a91bcdecfab6e77a622ce65c16d9a1577cb96e52 100644 --- a/src/main/java/com/aparapi/internal/kernel/KernelRunner.java +++ b/src/main/java/com/aparapi/internal/kernel/KernelRunner.java @@ -108,7 +108,7 @@ import java.util.logging.Logger; */ public class KernelRunner extends KernelRunnerJNI{ - public static final boolean BINARY_CACHING_DISABLED = false; + private static boolean binaryCacheing = true; private static final int MINIMUM_ARRAY_SIZE = 1; @@ -188,6 +188,14 @@ public class KernelRunner extends KernelRunnerJNI{ KernelManager.instance(); // ensures static initialization of KernelManager } + public static boolean isBinaryCacheing() { + return binaryCacheing; + } + + public static void setBinaryCacheing(boolean binaryCacheing) { + KernelRunner.binaryCacheing = binaryCacheing; + } + /** * @see Kernel#cleanUpArrays(). */ @@ -1370,7 +1378,7 @@ public class KernelRunner extends KernelRunnerJNI{ // Send the string to OpenCL to compile it, or if the compiled binary is already cached on JNI side just empty string to use cached binary long handle; - if (BINARY_CACHING_DISABLED) { + if (!isBinaryCacheing()) { handle = buildProgramJNI(jniContextHandle, openCL, ""); } else { synchronized (seenBinaryKeys) { diff --git a/src/main/java/com/aparapi/internal/opencl/OpenCLLoader.java b/src/main/java/com/aparapi/internal/opencl/OpenCLLoader.java index c417d9055e4bd1a47d721deed79d530db512494d..520c5a12cd56be380fac1afa9d056d7cfea0b959 100644 --- a/src/main/java/com/aparapi/internal/opencl/OpenCLLoader.java +++ b/src/main/java/com/aparapi/internal/opencl/OpenCLLoader.java @@ -1,12 +1,12 @@ /** * Copyright (c) 2016 - 2017 Syncleus, Inc. - * <p> + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.