Package com.jogamp.opencl

Examples of com.jogamp.opencl.CLEvent


            vectorAddKernel.setArgs(clBufferA, clBufferB, clBufferC); // C = A+B
            queue.put1DRangeKernel(vectorAddKernel, 0, elements, groupSize, events);

            assertEquals(1, events.size());
            CLEvent probe = events.getEvent(0);
            out.println(probe);

            queue.putWaitForEvents(events, true);
            assertEquals(CLEvent.ExecutionStatus.COMPLETE, probe.getStatus());

            out.println(probe);
            long time = probe.getProfilingInfo(CLEvent.ProfilingCommand.END)
                      - probe.getProfilingInfo(CLEvent.ProfilingCommand.START);
            out.println("time: "+time);
            assertTrue(time > 0);

            events.release();
        }finally{
View Full Code Here


            queue.put1DRangeKernel(vectorAddKernel, 0, elements, groupSize, conditions, events);
            assertEquals(1, events.size());

            Thread.sleep(1000);
            final CLEvent status = events.getEvent(0);

            assertEquals(ExecutionStatus.QUEUED, status.getStatus());
            condition.setComplete();
            assertTrue(condition.isComplete());

            queue.finish();
            assertTrue(status.isComplete());

        }finally{
            context.release();
        }
View Full Code Here

            textRenderer.draw("device/time/precision", 10, height-15);

            for (int i = 0; i < slices; i++) {
                CLDevice device = queues[i].getDevice();
                boolean doubleFP = doublePrecision && isDoubleFPAvailable(device);
                CLEvent event = probes.getEvent(i);
                long start = event.getProfilingInfo(START);
                long end = event.getProfilingInfo(END);
                textRenderer.draw(device.getType().toString()+i +" "
                               + (int)((end-start)/1000000.0f)+"ms @"
                               + (doubleFP?"64bit":"32bit"), 10, height-(20+16*(slices-i)));
            }

View Full Code Here

TOP

Related Classes of com.jogamp.opencl.CLEvent

Copyright © 2018 www.massapicom. 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.