Package com.jogamp.opencl

Examples of com.jogamp.opencl.CLContext.release()


            assertNotNull(currentDevice);
            out.println(currentDevice);
             */
        }finally{
            // destroy cl context, gl context still current
            context.release();
           
            deinitGL();
        }

    }
View Full Code Here


        // Run tests
        testBandwidth(context, start, end, increment, mode, COPY.HOST_TO_DEVICE, accMode, memMode);
        testBandwidth(context, start, end, increment, mode, COPY.DEVICE_TO_HOST, accMode, memMode);
        testBandwidth(context, start, end, increment, mode, COPY.DEVICE_TO_DEVICE, accMode, memMode);

        context.release();
    }

    private static void testBandwidth(CLContext context, int start, int end, int increment, TEST_MODE mode, COPY kind, ACCESS accMode, MEMORY memMode) {
        switch (mode) {
            case QUICK:
View Full Code Here

            out.println("computation took: "+(time/1000000)+"ms");
           
        }finally{
            // cleanup all resources associated with this context.
            context.release();
        }

    }

    private static void fillBuffer(FloatBuffer buffer, int seed) {
View Full Code Here

            gamma = 2.0f;
            gammaCorrection(gamma, queue, kernel, buffer, localWorkSize, globalWorkSize);
            show(createImage(image.getWidth(), image.getHeight(), buffer), image.getWidth()/2*3, 50, "gamma="+gamma);
           
        }finally{
            context.release();
        }
       
    }

    private static void gammaCorrection(float gamma, CLCommandQueue queue, CLKernel kernel, CLBuffer<FloatBuffer> buffer, int localWorkSize, int globalWorkSize) {
View Full Code Here

            out.println("\nTEST PASSED");
       
        }finally{
            if(context!=null) {
                context.release();
            }
        }

    }
   
View Full Code Here

                }
            }

        }finally{
            if(context != null) {
                context.release();
            }
        }

    }
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.