Changeset 7524


Ignore:
Timestamp:
01/13/11 10:58:34 (9 years ago)
Author:
rlentz
Message:

Tested SobelFilter Sample under OSX with latest CUDA and jogamp libraries. Added the following line to the README to help explain use of native libraries by the ImageJ OpenCL examples:

"To use OpenCL from Java in ImageJ we leverage JOCL.  JOCL uses JNI to make calls into the OpenCL API.  The OpenCL code you write can also leverage JOCL to accelerate execution of ImageJ plugins from Java. Since each OS has different native JOCL native libraries, the runtime environment must be configured such that the Java code can load the needed native libraries. For these samples, three native libraries are needed: gluegen-rt, jocl, and JOCL-'platform'-'arch'. If you look in the lib folder, you will find -natives-xyz.jar files containing the respective libraries. Simply unzip each of the three jar files and copy the dynamic files into the parent directory if they are not already present. Then ensure that the platform specific jar (E.g. JOCL-0.1.4-beta) is exported during the project build."

Location:
branches/maven/projects/opencl-decon
Files:
1 added
6 deleted
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/opencl-decon/.classpath

    r7521 r7524  
    1010        <classpathentry exported="true" kind="lib" path="lib/ij.jar" sourcepath="/home/loci/workspace/imagej/src/ij"/> 
    1111        <classpathentry exported="true" kind="lib" path="lib/hessian-4.0.7.jar" sourcepath="lib/hessian-4.0.7-src.jar"/> 
    12         <classpathentry exported="true" kind="lib" path="lib/jogl.util.jar"/> 
     12        <classpathentry exported="true" kind="lib" path="lib/jocl.jar"> 
     13                <attributes> 
     14                        <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="OpenCLIterative3DDeconvolution/lib/APPLE"/> 
     15                </attributes> 
     16        </classpathentry> 
     17        <classpathentry kind="lib" path="lib/hessian-4.0.7-src.jar"/> 
     18        <classpathentry exported="true" kind="lib" path="lib/APPLE/JOCL-0.1.4-beta1.jar"/> 
     19        <classpathentry exported="true" kind="lib" path="lib/gluegen.jar"/> 
    1320        <classpathentry exported="true" kind="lib" path="lib/gluegen-rt.jar"/> 
    14         <classpathentry exported="true" kind="lib" path="lib/gluegen.jar"/> 
    15         <classpathentry kind="lib" path="lib/jocl.jar"/> 
    16         <classpathentry kind="lib" path="lib/hessian-4.0.7-src.jar"/> 
    17         <classpathentry kind="lib" path="lib/joal.jar"/> 
    18         <classpathentry kind="lib" path="lib/jogl.all.jar"/> 
    19         <classpathentry kind="lib" path="lib/nativewindow-natives-macosx-universal.jar"/> 
    20         <classpathentry kind="lib" path="lib/nativewindow.all-noawt.jar"/> 
    21         <classpathentry kind="lib" path="lib/nativewindow.all.jar"/> 
    2221        <classpathentry kind="output" path="bin"/> 
    2322</classpath> 
  • branches/maven/projects/opencl-decon/README

    r7506 r7524  
    11( Please ensure installation of OpenCL prior to running these programs ) 
     2 
    23The source at http://dev.loci.wisc.edu/svn/software/branches/maven/projects/opencl-decon was developed to demonstrate successful leveraging of OpenCL within ImageJ using JOCL both locally andÊremotely (as a binary web service). 
    34 
     
    910 
    1011Background: 
    11 To use OpenCL from Java in ImageJ we leverage JOCL. ÊJOCL uses JNI to make calls into the OpenCL API. ÊThe OpenCL code you write can also leverage JOCL to accelerate execution ofÊImageJ plugins from Java. 
     12To use OpenCL from Java in ImageJ we leverage JOCL. ÊJOCL uses JNI to make calls into the OpenCL API. ÊThe OpenCL code you write can also leverage JOCL to accelerate execution ofÊImageJ plugins from Java.  Since each OS has different native JOCL native libraries, the runtime environment must be configured such that the Java code can load the needed native libraries.  For these samples, three native libraries are needed: gluegen-rt, jocl, and JOCL-'platform'-'arch'.  If you look in the lib folder, you will find -natives-xyz.jar files containing the respective libraries.  Simply unzip each of the three jar files and copy the dynamic files into the parent directory if they are not already present.  Then ensure that the platform specific jar (E.g. JOCL-0.1.4-beta) is exported during the project build. 
    1213 
    1314Notice the files fht.cl and sobel.cl in the source (src) directory. ÊThe Java code in provided in the examples compile these two files for execution on the OpenCL enabled device that is programmatically chosen at runtime.  It is runtime compilation of OpenCL that allows execution on any potential OpenCL enabled device. 
  • branches/maven/projects/opencl-decon/src/publication/SobelFilterExample.java

    r7515 r7524  
    2020import com.jogamp.opencl.CLMemory.Mem; 
    2121import com.jogamp.opencl.CLProgram; 
     22import com.jogamp.common.os.Platform; 
    2223 
    2324/** 
     
    2829 */ 
    2930public class SobelFilterExample { 
     31        Platform p; 
    3032        static boolean DEBUG = true; 
    3133        static boolean COMPARERESULTS = true; 
Note: See TracChangeset for help on using the changeset viewer.