Package com.jogamp.opencl

Examples of com.jogamp.opencl.CLProgram.build()


        CLContext context = CLContext.create(platform.getMaxFlopsDevice());
       
        try{
            //load and compile program for the chosen device
            CLProgram program = context.createProgram(getStreamFor("Gamma.cl"));
            program.build(CompilerOptions.FAST_RELAXED_MATH);
            assert program.isExecutable();
           
            // load image
            BufferedImage image = readImage("lena.png");
            assert image.getColorModel().getNumComponents() == 3;
View Full Code Here


        CLContext context = CLContext.create(platform.getMaxFlopsDevice());
       
        try{
            //load and compile program for the chosen device
            CLProgram program = context.createProgram(getStreamFor("Gamma.cl"));
            program.build(CompilerOptions.FAST_RELAXED_MATH);
            assert program.isExecutable();
           
            // load image
            BufferedImage image = readImage("lena.png");
            assert image.getColorModel().getNumComponents() == 3;
View Full Code Here

    private void initCL() {

        CLProgram program;
        try {
            program = clContext.createProgram(getClass().getResourceAsStream("JoglInterop.cl"));
            program.build();
            System.out.println(program.getBuildStatus());
            System.out.println(program.isExecutable());
            System.out.println(program.getBuildLog());
        } catch (IOException ex) {
            throw new RuntimeException("can not handle exception", ex);
View Full Code Here

        gGBuffer = cl.createFloatBuffer(width * height * 2, Mem.READ_WRITE);
        bGBuffer = cl.createFloatBuffer(width * height * 2, Mem.READ_WRITE);
        if (false) {
            try {
                CLProgram p = cl.createProgram(new FileInputStream("/home/notzed/cl/fft-512.cl"));
                p.build();
                fft512 = p.createCLKernel("fft0");
            } catch (IOException ex) {
                Logger.getLogger(BlurTest.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.