/*
 *   -- micMAGMA (version 0.3) --
 *      Univ. of Tennessee, Knoxville
 *      Univ. of California, Berkeley
 *      Univ. of Colorado, Denver
 *      April 2012
 *
 * @precisions mixed zc -> ds
 */

#ifndef _MAGMA_ZC_H_
#define _MAGMA_ZC_H_

#ifdef __cplusplus
extern "C" {
#endif

/* Mixed precision */
magma_err_t magma_zcgesv_mic(  char trans, magma_int_t N, magma_int_t NRHS, 
                               magmaDoubleComplex_ptr dA, size_t dA_offset, magma_int_t ldda, 
                               magma_int_t *IPIV, magma_int_t *dIPIV,
                               magmaDoubleComplex_ptr dB, size_t dB_offset, magma_int_t lddb, 
                               magmaDoubleComplex_ptr dX, size_t dX_offset, magma_int_t lddx, 
                               magmaDoubleComplex_ptr dworkd, magmaFloatComplex_ptr dworks,
                               magma_int_t *iter, magma_int_t *info, magma_queue_t queue);

magma_err_t magma_zcgetrs_mic( char trans, magma_int_t n, magma_int_t nrhs, 
                               magmaFloatComplex_ptr dA, size_t dA_offset, magma_int_t ldda,
                               magma_int_t *ipiv, 
                               magmaDoubleComplex_ptr dB, size_t dB_offset, magma_int_t lddb,
                               magmaDoubleComplex_ptr dX, size_t dX_offset, magma_int_t lddx,
                               magmaFloatComplex_ptr dSX, 
                               magma_int_t *info, magma_queue_t queue );

magma_err_t magma_zcposv_mic( char uplo, magma_int_t n, magma_int_t nrhs, 
                              magmaDoubleComplex_ptr dA, size_t dA_offset, magma_int_t ldda, 
                              magmaDoubleComplex_ptr dB, size_t dB_offset, magma_int_t lddb, 
                              magmaDoubleComplex_ptr dX, size_t dX_offset, magma_int_t lddx, 
                              magmaDoubleComplex_ptr dworkd, magmaFloatComplex_ptr dworks,
                              magma_int_t *iter, magma_int_t *info, magma_queue_t queue );

magma_err_t magma_zcgeqrsv_mic(magma_int_t M, magma_int_t N, magma_int_t NRHS, 
                               magmaDoubleComplex_ptr dA, size_t dA_offset, magma_int_t ldda, 
                               magmaDoubleComplex_ptr dB, size_t dB_offset, magma_int_t lddb, 
                               magmaDoubleComplex_ptr dX, size_t dX_offset, magma_int_t lddx,
                               magma_int_t *iter,    magma_int_t *info, magma_queue_t queue);
  
magma_err_t magma_zcgesv(magma_int_t N, magma_int_t NRHS,
                         magmaDoubleComplex_ptr dA, size_t dA_offset, magma_int_t ldda,
                         magma_int_t *dIPIV,
                         magmaDoubleComplex_ptr dB, size_t dB_offset, magma_int_t lddb,
                         magmaDoubleComplex_ptr dX, size_t dX_offset, magma_int_t lddx,
                         magmaDoubleComplex_ptr dworkd, magmaFloatComplex_ptr dworks,
                         magma_queue_t queue );

magma_err_t magma_zcgesv2(char trans, magma_int_t N, magma_int_t NRHS,
                          magmaDoubleComplex *A, magma_int_t lda,
                          magmaFloatComplex_ptr dA, size_t dA_offset, magma_int_t ldda,
                          magma_int_t *IPIV,  magma_int_t *dIPIV,
                          magmaDoubleComplex *B, magma_int_t ldb,
                          magmaDoubleComplex *X, magma_int_t ldx,
                          magmaDoubleComplex *workd, magmaFloatComplex *works,
                          magma_int_t *iter, magma_int_t *info,
                          magma_queue_t queue );


/* Auxiliary routines */
magma_err_t magma_zlag2c( magma_int_t m, magma_int_t n,
                          magmaDoubleComplex_ptr dA, size_t dA_offset, magma_int_t lda,
                          magmaFloatComplex_ptr dAs, size_t dAs_offset, magma_int_t ldas,
                          magma_queue_t queue);

#ifdef __cplusplus
}
#endif

#endif /* _MAGMA_Z_H_ */
