From 3652780c7154c61b7bdf92065811d5e7cba007e7 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Thu, 19 Oct 2017 00:06:18 -0400 Subject: [PATCH] fix: fixed the file path in the convolution example. --- CHANGELOG.md | 1 + .../com/aparapi/examples/convolution/ConvolutionOpenCL.java | 4 ++-- .../aparapi/examples/convolution => resources}/convolution.cl | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename src/main/{java/com/aparapi/examples/convolution => resources}/convolution.cl (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ee2cfe..dc529431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Removed explicit version on nexus-staging-maven-plugin plugin, relies on parent now. * createProgram had the wrong signature producing a unsatisfied link exception that is now fixed. * Fixed several bad references to resource locations. +* Fixed all of the broken examples that werent running. ## 1.4.0 diff --git a/src/main/java/com/aparapi/examples/convolution/ConvolutionOpenCL.java b/src/main/java/com/aparapi/examples/convolution/ConvolutionOpenCL.java index 95d511b7..6f59b364 100644 --- a/src/main/java/com/aparapi/examples/convolution/ConvolutionOpenCL.java +++ b/src/main/java/com/aparapi/examples/convolution/ConvolutionOpenCL.java @@ -74,7 +74,7 @@ import java.net.URISyntaxException; public class ConvolutionOpenCL{ - @Resource("com/aparapi/examples/convolution/convolution.cl") interface Convolution extends OpenCL<Convolution>{ + @Resource("convolution.cl") interface Convolution extends OpenCL<Convolution>{ Convolution applyConvolution(// Range range, // @GlobalReadOnly("_convMatrix3x3") float[] _convMatrix3x3,//// only read from kernel @@ -87,7 +87,7 @@ public class ConvolutionOpenCL{ public static void main(final String[] _args) { final File file; try{ - file = (_args.length >= 1 ? new File(_args[0]) : new File(ConvolutionOpenCL.class.getResource("/testcard.jpg").toURI())); + file = new File(ConvolutionOpenCL.class.getResource("/testcard.jpg").toURI()); } catch (URISyntaxException e) { throw new IllegalStateException("could not get testcard", e); } diff --git a/src/main/java/com/aparapi/examples/convolution/convolution.cl b/src/main/resources/convolution.cl similarity index 100% rename from src/main/java/com/aparapi/examples/convolution/convolution.cl rename to src/main/resources/convolution.cl -- GitLab