From 1737ee672c05d956a99a91d9894556230f6363bc Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 24 Jul 2009 18:33:42 +0200 Subject: initial import of JOCL the Java Bindings to OpenCL prototype --- resources/example1/OpenCL.cfg | 5 +++++ resources/example1/function.c | 3 +++ resources/example1/function.h | 1 + resources/example1/gen.sh | 17 +++++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 resources/example1/OpenCL.cfg create mode 100644 resources/example1/function.c create mode 100644 resources/example1/function.h create mode 100644 resources/example1/gen.sh (limited to 'resources/example1') diff --git a/resources/example1/OpenCL.cfg b/resources/example1/OpenCL.cfg new file mode 100644 index 00000000..24b7cd54 --- /dev/null +++ b/resources/example1/OpenCL.cfg @@ -0,0 +1,5 @@ +Package com.mbien.opencl +Style AllStatic +JavaClass CL +JavaOutputDir gensrc/java +NativeOutputDir gensrc/native diff --git a/resources/example1/function.c b/resources/example1/function.c new file mode 100644 index 00000000..9a84189b --- /dev/null +++ b/resources/example1/function.c @@ -0,0 +1,3 @@ +int one_plus(int a) { + return 1 + a; +} diff --git a/resources/example1/function.h b/resources/example1/function.h new file mode 100644 index 00000000..58976c1f --- /dev/null +++ b/resources/example1/function.h @@ -0,0 +1 @@ +int one_plus(int a); diff --git a/resources/example1/gen.sh b/resources/example1/gen.sh new file mode 100644 index 00000000..6fb971e2 --- /dev/null +++ b/resources/example1/gen.sh @@ -0,0 +1,17 @@ +#!/bin/ksh + +JAVA=java +GLUEGEN_JAR=../../../build/gluegen.jar +ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar + +NAME=`uname` + +if [ $NAME="Windows*" ] ; then + SEP=\; +elif [ $NAME="CYGWIN*" ] ; then + SEP=\; +else + SEP=: +fi + +java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h -- cgit v1.2.3