Package org.jocl

Examples of org.jocl.Pointer


     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(ByteBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here


     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(ShortBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(IntBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(LongBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(FloatBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(DoubleBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

        float[] dstArray = new float[N];
        for (int i = 0; i < N; i++) {
            srcArrayA[i] = i;
            srcArrayB[i] = i;
        }
        Pointer srcA = Pointer.to(srcArrayA);
        Pointer srcB = Pointer.to(srcArrayB);
        Pointer dst = Pointer.to(dstArray);

        // The platform, device type and device number
        // that will be used
        final int platformIndex = 0;
        final long deviceType = CL_DEVICE_TYPE_ALL;
View Full Code Here

    clGetPlatformIDs(platform_id.length, platform_id, null);

    // enumerate platforms and devices

    byte[] data = new byte[500];
    Pointer dataPtr = Pointer.to(data);
    long[] dataSize = new long[1];
    long[] cl_long = new long[1];
    int[] cl_uint = new int[1];

    for (int plaf = 0; plaf < platform_id.length; ++plaf) {
View Full Code Here

TOP

Related Classes of org.jocl.Pointer

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.