From 2bcf1ac950d88b993d2c643236dba6f1acf3d7d1 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Mon, 17 Oct 2016 13:24:15 -0400 Subject: [PATCH] Moved life sample out to the functioning part of the project. --- .gitignore | 1 + pom.xml | 8 +++ samples/life/.gitignore | 1 - samples/life/.project | 17 ----- samples/life/build.xml | 69 ------------------- samples/life/life-agent.bat | 13 ---- samples/life/life-agent.sh | 6 -- samples/life/life.bat | 12 ---- samples/life/life.sh | 5 -- .../syncleus/aparapi/examples}/life/Main.java | 12 +++- 10 files changed, 20 insertions(+), 124 deletions(-) delete mode 100644 samples/life/.gitignore delete mode 100644 samples/life/.project delete mode 100644 samples/life/build.xml delete mode 100644 samples/life/life-agent.bat delete mode 100644 samples/life/life-agent.sh delete mode 100644 samples/life/life.bat delete mode 100644 samples/life/life.sh rename {samples/life/src/com/amd/aparapi/sample => src/main/java/com/syncleus/aparapi/examples}/life/Main.java (94%) diff --git a/.gitignore b/.gitignore index 8a8717d5..b44b95d6 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ hs_err_pid* **/dist/ **/include/ **/nbproject/ +target/ diff --git a/pom.xml b/pom.xml index 18e91214..0704589d 100644 --- a/pom.xml +++ b/pom.xml @@ -76,6 +76,14 @@ </snapshots> </repository> </repositories> + + <dependencies> + <dependency> + <groupId>com.syncleus.aparapi</groupId> + <artifactId>aparapi</artifactId> + <version>1.0.0</version> + </dependency> + </dependencies> <build> <defaultGoal>package</defaultGoal> diff --git a/samples/life/.gitignore b/samples/life/.gitignore deleted file mode 100644 index 840e7d31..00000000 --- a/samples/life/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/classes/ diff --git a/samples/life/.project b/samples/life/.project deleted file mode 100644 index 01f51c90..00000000 --- a/samples/life/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>life</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/samples/life/build.xml b/samples/life/build.xml deleted file mode 100644 index f28dbb26..00000000 --- a/samples/life/build.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0"?> - -<project name="life" default="build" basedir="."> - - <!-- Ideally this would be the latest version of Java but not everyone is going to have it installed --> - <!-- Additionally we want to avoid "Class not found: javac1.8" errors from old Ant versions (i.e. Eclipse) --> - <property name="build.compiler" value="javac1.7" /> - <property name="ant.build.javac.source" value="1.7" /> - <property name="ant.build.javac.target" value="1.7" /> - - <path id="compiler.class.path"> - <pathelement path="../../com.syncleus.aparapi/dist/aparapi.jar" /> - </path> - - <path id="runtime.class.path" cache="true"> - <path refid="compiler.class.path" /> - <pathelement path="${ant.project.name}.jar" /> - </path> - - <target name="build" depends="clean"> - <mkdir dir="classes" /> - <javac srcdir="src" destdir="classes" debug="on" includeantruntime="false"> - <classpath> - <pathelement path="../../com.syncleus.aparapi/dist/aparapi.jar" /> - </classpath> - </javac> - <jar jarfile="${ant.project.name}.jar" basedir="classes" /> - </target> - - <target name="clean"> - <delete dir="classes" /> - <delete file="${ant.project.name}.jar" /> - </target> - - <target name="run-life-gpu"> - <java classname="com.syncleus.aparapi.sample.life.Main" fork="true"> - <classpath refid="runtime.class.path" /> - <sysproperty key="java.library.path" path="..\..\com.syncleus.aparapi.jni\dist" /> - <sysproperty key="com.syncleus.aparapi.executionMode" value="GPU" /> - </java> - </target> - - <target name="run-life-jtp"> - <java classname="com.syncleus.aparapi.sample.life.Main" fork="true"> - <classpath refid="runtime.class.path" /> - <sysproperty key="java.library.path" path="..\..\com.syncleus.aparapi.jni\dist" /> - <sysproperty key="com.syncleus.aparapi.executionMode" value="JTP" /> - </java> - </target> - - <target name="run-agent-gpu"> - <java classname="com.syncleus.aparapi.sample.life.Main" fork="true"> - <classpath refid="runtime.class.path" /> - <sysproperty key="java.library.path" path="..\..\com.syncleus.aparapi.jni\dist" /> - <sysproperty key="com.syncleus.aparapi.executionMode" value="GPU" /> - <sysproperty key="com.syncleus.aparapi.useAgent" value="true" /> - </java> - </target> - - <target name="run-agent-jtp"> - <java classname="com.syncleus.aparapi.sample.life.Main" fork="true"> - <classpath refid="runtime.class.path" /> - <sysproperty key="java.library.path" path="..\..\com.syncleus.aparapi.jni\dist" /> - <sysproperty key="com.syncleus.aparapi.executionMode" value="JTP" /> - <sysproperty key="com.syncleus.aparapi.useAgent" value="true" /> - </java> - </target> - -</project> diff --git a/samples/life/life-agent.bat b/samples/life/life-agent.bat deleted file mode 100644 index ec81416a..00000000 --- a/samples/life/life-agent.bat +++ /dev/null @@ -1,13 +0,0 @@ -java ^ - -agentpath:../../com.syncleus.aparapi.jni/dist/aparapi_x86_64.dll^ - -Dcom.syncleus.aparapi.useAgent=true ^ - -Djava.library.path=../../com.syncleus.aparapi.jni/dist ^ - -Dsequential=false^ - -Dcom.syncleus.aparapi.executionMode=%1 ^ - -Dcom.syncleus.aparapi.enableProfiling=false ^ - -Dcom.syncleus.aparapi.enableVerboseJNI=false ^ - -Dcom.syncleus.aparapi.enableShowGeneratedOpenCL=true ^ - -classpath ../../com.syncleus.aparapi/dist/aparapi.jar;life.jar ^ - com.syncleus.aparapi.sample.life.Main - - diff --git a/samples/life/life-agent.sh b/samples/life/life-agent.sh deleted file mode 100644 index 8d9057fd..00000000 --- a/samples/life/life-agent.sh +++ /dev/null @@ -1,6 +0,0 @@ -java\ - -agentpath:../../com.syncleus.aparapi.jni/dist/libaparapi_x86_64.so\ - -Dcom.syncleus.aparapi.executionMode=$1\ - -Dcom.syncleus.aparapi.useAgent=true\ - -classpath ../../com.syncleus.aparapi/dist/aparapi.jar:life.jar\ - com.syncleus.aparapi.sample.life.Main diff --git a/samples/life/life.bat b/samples/life/life.bat deleted file mode 100644 index 5077d526..00000000 --- a/samples/life/life.bat +++ /dev/null @@ -1,12 +0,0 @@ - -java ^ - -Djava.library.path=../../com.syncleus.aparapi.jni/dist ^ - -Dsequential=false^ - -Dcom.syncleus.aparapi.executionMode=GPU ^ - -Dcom.syncleus.aparapi.enableProfiling=false ^ - -Dcom.syncleus.aparapi.enableVerboseJNI=false ^ - -Dcom.syncleus.aparapi.enableShowGeneratedOpenCL=true ^ - -classpath ../../com.syncleus.aparapi/dist/aparapi.jar;life.jar ^ - com.syncleus.aparapi.sample.life.Main - - diff --git a/samples/life/life.sh b/samples/life/life.sh deleted file mode 100644 index 5bd0d8e9..00000000 --- a/samples/life/life.sh +++ /dev/null @@ -1,5 +0,0 @@ -java\ - -Djava.library.path=../../com.syncleus.aparapi.jni/dist\ - -Dcom.syncleus.aparapi.executionMode=$1\ - -classpath ../../com.syncleus.aparapi/dist/aparapi.jar:life.jar\ - com.syncleus.aparapi.sample.life.Main diff --git a/samples/life/src/com/amd/aparapi/sample/life/Main.java b/src/main/java/com/syncleus/aparapi/examples/life/Main.java similarity index 94% rename from samples/life/src/com/amd/aparapi/sample/life/Main.java rename to src/main/java/com/syncleus/aparapi/examples/life/Main.java index a419b623..09f05c4c 100644 --- a/samples/life/src/com/amd/aparapi/sample/life/Main.java +++ b/src/main/java/com/syncleus/aparapi/examples/life/Main.java @@ -1,3 +1,13 @@ +/** + * This product currently only contains code developed by authors + * of specific components, as identified by the source code files. + * + * Since product implements StAX API, it has dependencies to StAX API + * classes. + * + * For additional credits (generally to people who reported problems) + * see CREDITS file. + */ /* Copyright (c) 2010-2011, Advanced Micro Devices, Inc. All rights reserved. @@ -36,7 +46,7 @@ under those regulations, please refer to the U.S. Bureau of Industry and Securit */ -package com.syncleus.aparapi.sample.life; +package com.syncleus.aparapi.examples.life; import com.syncleus.aparapi.Kernel; import com.syncleus.aparapi.*; -- GitLab