JCublasJava/src/main/java/jcuda/jcublas/JCublas.java
public static int cublasSetMatrix (int rows, int cols, cuComplex A[], int offsetA, int lda, Pointer B, int ldb)
    {
        ByteBuffer byteBufferA = ByteBuffer.allocateDirect(A.length * 4 * 2);
        byteBufferA.order(ByteOrder.nativeOrder());
        FloatBuffer floatBufferA = byteBufferA.asFloatBuffer();
        for (int i=0; i<A.length; i++)
        {
            floatBufferA.put(A[i].x);
            floatBufferA.put(A[i].y);
        }
        return checkResult(cublasSetMatrixNative(rows, cols, 8, Pointer.to(floatBufferA).withByteOffset(offsetA * 4 * 2), lda, B, ldb));
    }
public static int cublasSetMatrix (int rows, int cols, cuComplex A[], int offsetA, int lda, Pointer B, int ldb)
    {
        ByteBuffer byteBufferA = ByteBuffer.allocateDirect(A.length * 4 * 2);
        byteBufferA.order(ByteOrder.nativeOrder());
        FloatBuffer floatBufferA = byteBufferA.asFloatBuffer();
        for (int i=0; i<A.length; i++)
        {
            floatBufferA.put(A[i].x);
            floatBufferA.put(A[i].y);
        }
        return checkResult(cublasSetMatrixNative(rows, cols, 8, Pointer.to(floatBufferA).withByteOffset(offsetA * 4 * 2), lda, B, ldb));
    }
public static int cublasSetMatrix ( int rows , int cols , cuComplex A [ ] , int offsetA , int lda , Pointer B , int ldb ) { ByteBuffer byteBufferA = ByteBuffer . allocateDirect ( A . length * 4 * 2 ) ; byteBufferA . order ( ByteOrder . nativeOrder ( ) ) ; FloatBuffer floatBufferA = byteBufferA . asFloatBuffer ( ) ; for ( int i = 0 ; i < A . length ; i ++ ) { floatBufferA . put ( A [ i ] . x ) ; floatBufferA . put ( A [ i ] . y ) ; } return checkResult ( cublasSetMatrixNative ( rows , cols , 8 , Pointer . to ( floatBufferA ) . withByteOffset ( offsetA * 4 * 2 ) , lda , B , ldb ) ) ; }
Extended wrapper for arrays of cuComplex values. Note that this method
only exists for convenience and compatibility with native C code. It
is much more efficient to provide a Pointer to a float array containing
the complex numbers, where each pair of consecutive numbers in the array
describes the real- and imaginary part of one complex number.

@see JCublas#cublasSetMatrix(int, int, int, Pointer, int, Pointer, int)
Extended wrapper for arrays of cuComplex values . Note that this method only exists for convenience and compatibility with native C code . It is much more efficient to provide a Pointer to a float array containing the complex numbers where each pair of consecutive numbers in the array describes the real - and imaginary part of one complex number .