/*
 *   -- micMAGMA (version 0.1) --
 *      Univ. of Tennessee, Knoxville
 *      Univ. of California, Berkeley
 *      Univ. of Colorado, Denver
 *      April 2012
 *
 *   @author Azzam Haidar
 *   @author Khairul Kabir 
 *
 *   @precisions normal z -> s d c
 */

#ifndef MAGMA_Z_BINDINGS
#define MAGMA_Z_BINDINGS
typedef struct {
    magma_int_t n;
    magmaDoubleComplex_const_ptr x;
    magma_int_t incx;
    magmaDoubleComplex_const_ptr y;
    magma_int_t incy;
} magma_mic_zcopy_param;

typedef struct {
    magma_trans_t transa;
    magma_trans_t transb;
    magma_int_t m;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
} magma_mic_zgemm_param;

typedef struct {
    magma_side_t side;
    magma_uplo_t uplo;
    magma_int_t m;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magma_int_t agboff;
} magma_mic_zhemm_param;

typedef struct {
    magma_trans_t transa;
    magma_int_t m;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr x;
    magma_int_t incx;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr y;
    magma_int_t incy;
} magma_mic_zgemv_param;

typedef struct {
    magma_trans_t uplo;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr x;
    magma_int_t incx;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr y;
    magma_int_t incy;
} magma_mic_zhemv_param;

typedef struct {
    magma_trans_t uplo;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr x;
    magma_int_t incx;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr y;
    magma_int_t incy;
} magma_mic_zsymv2_param;



typedef struct {
    magma_uplo_t uplo;
    magma_trans_t trans;
    magma_int_t n;
    magma_int_t k;
    double alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    double beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
} magma_mic_zherk_param;

typedef struct {
    magma_uplo_t uplo;
    magma_trans_t trans;
    magma_int_t n;
    magma_int_t k;
    double alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magma_int_t aoff;
    double beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magma_int_t offset;
    magma_int_t nb;
    magma_int_t nmic;
    magma_int_t my_id;
} magma_mic_zherk_mmic_param;

typedef struct {
    magma_uplo_t uplo;
    magma_trans_t trans;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
    double beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magma_int_t agboff;
} magma_mic_zher2k_param;

typedef struct {
    magma_uplo_t uplo;
    magma_trans_t trans;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magma_int_t aoff;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
    magma_int_t boff;
    double beta;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magma_int_t offset;
    magma_int_t nb;
    magma_int_t nmic;
    magma_int_t my_id;
} magma_mic_zher2k_mmic_param;

typedef struct {
    magma_side_t side;
    magma_uplo_t uplo;
    magma_trans_t transa;
    magma_diag_t diag;
    magma_int_t m;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
} magma_mic_ztrsm_param;

typedef struct {
    magma_mic_ztrsm_param trsm_param;
    magma_mic_zgemm_param gemm_param;
} magma_mic_ztrsmgemm_param;

typedef struct {
  magma_uplo_t uplo;
  magma_trans_t trans;
  magma_diag_t diag;
  magma_int_t n;
  magmaDoubleComplex alpha;
  magmaDoubleComplex_const_ptr a;
  magma_int_t lda;
  magmaDoubleComplex_const_ptr dx;
  magma_int_t incx;
} magma_mic_ztrsv_param;

typedef struct {
  magma_uplo_t uplo;
  magma_trans_t trans;
  magma_diag_t diag;
  magma_int_t n;
  magmaDoubleComplex alpha;
  magmaDoubleComplex_const_ptr a;
  magma_int_t lda;
  magmaDoubleComplex_const_ptr dx;
  magma_int_t incx;
} magma_mic_ztrmv_param;
 
typedef struct {
    int direct;
    int storev;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex_const_ptr v;
    magma_int_t ldv;
    magmaDoubleComplex_const_ptr tau;
    magmaDoubleComplex_const_ptr t;
    magma_int_t ldt;
} magma_mic_zlarft_param;


typedef struct {
    magma_int_t side;
    magma_int_t trans;
    magma_int_t direct;
    magma_int_t storev;
    magma_int_t m;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex_const_ptr v;
    magma_int_t ldv;
    magmaDoubleComplex_const_ptr t;
    magma_int_t ldt;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magmaDoubleComplex_const_ptr work;
    magma_int_t ldwork;
} magma_mic_zlarfb_param;

typedef struct {
    magma_int_t side;
    magma_int_t trans;
    magma_int_t direct;
    magma_int_t storev;
    magma_int_t m;
    magma_int_t n;
    magma_int_t k;
    magmaDoubleComplex_const_ptr v;
    magma_int_t ldv;
    magmaDoubleComplex_const_ptr t;
    magma_int_t ldt;
    magmaDoubleComplex_const_ptr c;
    magma_int_t ldc;
    magmaDoubleComplex_const_ptr work;
    magma_int_t ldwork;
    magmaDoubleComplex_const_ptr workvt;
    magma_int_t ldworkvt;
} magma_mic_zlarfb_gemm_param;

typedef struct {
    magma_uplo_t uplo;
    magma_int_t m;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex beta;
    magmaDoubleComplex_const_ptr dA;
    magma_int_t lda;
} magma_mic_zlaset_param;

typedef struct {
    magma_side_t side;
    magma_uplo_t uplo;
    magma_trans_t transa;
    magma_diag_t diag;
    magma_int_t m;
    magma_int_t n;
    magmaDoubleComplex alpha;
    magmaDoubleComplex_const_ptr a;
    magma_int_t lda;
    magmaDoubleComplex_const_ptr b;
    magma_int_t ldb;
} magma_mic_ztrmm_param;


typedef struct {
    magmaDoubleComplex_const_ptr odata;
    magma_int_t ldo;
    magmaDoubleComplex_const_ptr idata;
    magma_int_t ldi;
    magma_int_t m;
    magma_int_t n;
} magma_mic_ztranspose_param;


/*
typedef struct {
    magmaDoubleComplex_const_ptr d_AT;
    magma_int_t lda;
    magma_int_t *d_ipiv;
    magma_int_t nb;
    magma_int_t ind;
} magma_mic_zlaswp_param;
*/


typedef struct {
    magma_int_t n;
    magmaDoubleComplex_const_ptr d_A;
    magma_int_t lda;
    magma_int_t k1;
    magma_int_t k2;
    magma_int_t *d_ipiv;
    magma_int_t incx;
} magma_mic_zlaswp_param;


typedef struct {
    magma_int_t n;
    magmaDoubleComplex *dA1T;
    magma_int_t lda1;
    magmaDoubleComplex *dA2T;
    magma_int_t lda2;
} magma_mic_zswap_param;

#endif  // MAGMA_Z_BINDINGS
