Commit 403748f0 authored by Mathieu Faverge's avatar Mathieu Faverge

Fix compilation in MPI/CUDA

parent 7397efbe
......@@ -256,7 +256,7 @@ CORE_zpamm(int op, cham_side_t side, cham_store_t storev,
/* Columnwise*/
if (storev == ChamColumnwise) {
uplo = CblasUpper;
uplo = ChamUpper;
if (side == ChamLeft) {
trans = op == ChameleonA2 ? ChamNoTrans : ChamConjTrans;
vi2 = trans == ChamNoTrans ? M - L : K - L;
......@@ -270,7 +270,7 @@ CORE_zpamm(int op, cham_side_t side, cham_store_t storev,
/* Rowwise */
else {
uplo = CblasLower;
uplo = ChamLower;
if (side == ChamLeft) {
trans = op == ChameleonW ? ChamNoTrans : ChamConjTrans;
vi2 = trans == ChamNoTrans ? K - L : M - L;
......@@ -322,8 +322,8 @@ CORE_zpamm_w(cham_side_t side, cham_trans_t trans, cham_uplo_t uplo,
if (side == ChamLeft) {
if (((trans == ChamConjTrans) && (uplo == CblasUpper)) ||
((trans == ChamNoTrans) && (uplo == CblasLower))) {
if (((trans == ChamConjTrans) && (uplo == ChamUpper)) ||
((trans == ChamNoTrans) && (uplo == ChamLower))) {
/*
* W = A1 + V' * A2
......@@ -381,8 +381,8 @@ CORE_zpamm_w(cham_side_t side, cham_trans_t trans, cham_uplo_t uplo,
}
else { //side right
if (((trans == ChamConjTrans) && (uplo == CblasUpper)) ||
((trans == ChamNoTrans) && (uplo == CblasLower))) {
if (((trans == ChamConjTrans) && (uplo == ChamUpper)) ||
((trans == ChamNoTrans) && (uplo == ChamLower))) {
printf("Right Upper/ConjTrans & Lower/NoTrans not implemented yet\n");
return CHAMELEON_ERR_NOT_SUPPORTED;
......@@ -463,8 +463,8 @@ CORE_zpamm_a2(cham_side_t side, cham_trans_t trans, cham_uplo_t uplo,
if (side == ChamLeft) {
if (((trans == ChamConjTrans) && (uplo == CblasUpper)) ||
((trans == ChamNoTrans) && (uplo == CblasLower))) {
if (((trans == ChamConjTrans) && (uplo == ChamUpper)) ||
((trans == ChamNoTrans) && (uplo == ChamLower))) {
printf("Left Upper/ConjTrans & Lower/NoTrans not implemented yet\n");
return CHAMELEON_ERR_NOT_SUPPORTED;
......@@ -515,8 +515,8 @@ CORE_zpamm_a2(cham_side_t side, cham_trans_t trans, cham_uplo_t uplo,
}
else { //side right
if (((trans == ChamConjTrans) && (uplo == CblasUpper)) ||
((trans == ChamNoTrans) && (uplo == CblasLower))) {
if (((trans == ChamConjTrans) && (uplo == ChamUpper)) ||
((trans == ChamNoTrans) && (uplo == ChamLower))) {
/*
* A2 = A2 - W * V'
......
......@@ -93,13 +93,13 @@ typedef enum chameleon_side_e {
*/
typedef enum chameleon_normtype_e {
ChamOneNorm = 171, /**< One norm: max_j( sum_i( |a_{ij}| ) ) */
ChamRealOneNorm = 172,
ChamTwoNorm = 173,
/* ChamRealOneNorm = 172, */
/* ChamTwoNorm = 173, */
ChamFrobeniusNorm = 174, /**< Frobenius norm: sqrt( sum_{i,j} (a_{ij}^2) ) */
ChamInfNorm = 175, /**< Inifinite norm: max_i( sum_j( |a_{ij}| ) ) */
ChamRealInfNorm = 176,
/* ChamRealInfNorm = 176, */
ChamMaxNorm = 177, /**< Inifinite norm: max_{i,j}( | a_{ij} | ) */
ChamRealMaxNorm = 178
/* ChamRealMaxNorm = 178 */
} cham_normtype_t;
/**
......
/**
*
* @file runtime_struct.h
*
* @copyright 2009-2014 The University of Tennessee and The University of
* Tennessee Research Foundation. All rights reserved.
* @copyright 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Runtime structures
*
* @version 1.0.0
* @author Cedric Augonnet
* @author Mathieu Faverge
* @author Cedric Castagnede
* @date 2011-06-01
*
*/
#ifndef _chameleon_runtime_struct_h_
#define _chameleon_runtime_struct_h_
BEGIN_C_DECLS
/**
* @brief Ids of the runtime supported by the RUNTIME API
*/
typedef enum runtime_id_e {
RUNTIME_SCHED_QUARK, /**< Quark runtime */
RUNTIME_SCHED_PARSEC, /**< PaRSEC runtime */
RUNTIME_SCHED_STARPU, /**< StarPU runtime */
} RUNTIME_id_t;
/**
* @brief RUNTIME request structure
*
* A request is used to uniquely identifies a set of submitted tasks together,
* as for example each asynchronous function call.
*
*/
typedef struct runtime_request_s {
int status; /**< Return status registered by the tasks for the request */
} RUNTIME_request_t;
/**
* @brief Runtime request initializer
*/
#define RUNTIME_REQUEST_INITIALIZER { 0 }
/**
* @brief RUNTIME sequence structure
*
* A sequence is used to uniquely identifies a set of asynchronous function
* calls sharing common exception handling. If a tasks fails in a request all
* subsequent tasks in the request, and the sequence will be canceled.
*/
typedef struct runtime_sequence_s {
int status; /**< Return status registered by the tasks for the request */
RUNTIME_request_t *request; /**< Pointer to the request that failed if any, NULL otherwise */
void *schedopt; /**< Specific runtime data pointer to handle the sequence */
} RUNTIME_sequence_t;
/**
* @brief RUNTIME options structure
*
* This structure gathers all optionnal fields that can be passed to the runtime
* system.
*/
typedef struct runtime_option_s {
RUNTIME_sequence_t *sequence; /**< Runtime sequence to which attach the submitted tasks */
RUNTIME_request_t *request; /**< Runtime request to which attach the submitted tasks */
int profiling; /**< Enable/Disable the profiling of the submitted tasks */
int parallel; /**< Enable/Disable the parallel version of submitted tasks */
int priority; /**< Define the submitted task priority */
size_t ws_wsize; /**< Define the worker workspace size */
size_t ws_hsize; /**< Define the host workspace size for hybrid CPU/GPU kernel */
void *ws_worker; /**< Pointer to the worker workspace (structure) */
void *ws_host; /**< Pointer to the host workspace (structure) */
void *schedopt; /**< Specific runtime data pointer to handle the sequence */
} RUNTIME_option_t;
/**
* @brief Minimal priority value
*/
#define RUNTIME_PRIORITY_MIN 0
/**
* @brief Maximal priority value
*/
#define RUNTIME_PRIORITY_MAX INT_MAX
END_C_DECLS
#endif /* _chameleon_runtime_struct_h_ */
......@@ -82,53 +82,53 @@ void RUNTIME_zlocality_onerestrict( cham_tasktype_t kernel, uint32_t where )
{
switch( kernel ) {
/* Blas 3 */
case CHAMELEON_GEMM: cl_zgemm_restrict_where( where ); break;
case TASK_GEMM: cl_zgemm_restrict_where( where ); break;
#if defined(PRECISION_z) || defined(PRECISION_c)
case CHAMELEON_HEMM: cl_zhemm_restrict_where( where ); break;
case CHAMELEON_HER2K: cl_zher2k_restrict_where( where ); break;
case CHAMELEON_HERK: cl_zherk_restrict_where( where ); break;
case CHAMELEON_SYTRF_NOPIV: cl_zsytrf_nopiv_restrict_where( where ); break;
case TASK_HEMM: cl_zhemm_restrict_where( where ); break;
case TASK_HER2K: cl_zher2k_restrict_where( where ); break;
case TASK_HERK: cl_zherk_restrict_where( where ); break;
case TASK_SYTRF_NOPIV: cl_zsytrf_nopiv_restrict_where( where ); break;
#endif
case CHAMELEON_SYMM: cl_zhemm_restrict_where( where ); break;
case CHAMELEON_SYR2K: cl_zher2k_restrict_where( where ); break;
case CHAMELEON_SYRK: cl_zherk_restrict_where( where ); break;
case CHAMELEON_TRMM: cl_ztrmm_restrict_where( where ); break;
case CHAMELEON_TRSM: cl_ztrsm_restrict_where( where ); break;
case TASK_SYMM: cl_zhemm_restrict_where( where ); break;
case TASK_SYR2K: cl_zher2k_restrict_where( where ); break;
case TASK_SYRK: cl_zherk_restrict_where( where ); break;
case TASK_TRMM: cl_ztrmm_restrict_where( where ); break;
case TASK_TRSM: cl_ztrsm_restrict_where( where ); break;
/*
* Lapack
*/
/* Cholesky */
case CHAMELEON_POTRF: cl_zpotrf_restrict_where( where ); break;
case CHAMELEON_LAUUM: cl_zlauum_restrict_where( where ); break;
case CHAMELEON_TRTRI: cl_ztrtri_restrict_where( where ); break;
case TASK_POTRF: cl_zpotrf_restrict_where( where ); break;
case TASK_LAUUM: cl_zlauum_restrict_where( where ); break;
case TASK_TRTRI: cl_ztrtri_restrict_where( where ); break;
/* LU */
case CHAMELEON_GETRF_INCPIV: cl_zgetrf_incpiv_restrict_where( where ); break;
case CHAMELEON_GETRF_NOPIV: cl_zgetrf_nopiv_restrict_where( where ); break;
case CHAMELEON_GESSM: cl_zgessm_restrict_where( where ); break;
case CHAMELEON_SSSSM: cl_zssssm_restrict_where( where ); break;
case CHAMELEON_TSTRF: cl_ztstrf_restrict_where( where ); break;
case TASK_GETRF_INCPIV: cl_zgetrf_incpiv_restrict_where( where ); break;
case TASK_GETRF_NOPIV: cl_zgetrf_nopiv_restrict_where( where ); break;
case TASK_GESSM: cl_zgessm_restrict_where( where ); break;
case TASK_SSSSM: cl_zssssm_restrict_where( where ); break;
case TASK_TSTRF: cl_ztstrf_restrict_where( where ); break;
/* QR */
case CHAMELEON_GEQRT: cl_zgeqrt_restrict_where( where ); break;
case CHAMELEON_UNMQR: cl_zunmqr_restrict_where( where ); break;
case CHAMELEON_TSMQR: cl_ztsmqr_restrict_where( where ); break;
case CHAMELEON_TSQRT: cl_ztsqrt_restrict_where( where ); break;
case TASK_GEQRT: cl_zgeqrt_restrict_where( where ); break;
case TASK_UNMQR: cl_zunmqr_restrict_where( where ); break;
case TASK_TSMQR: cl_ztsmqr_restrict_where( where ); break;
case TASK_TSQRT: cl_ztsqrt_restrict_where( where ); break;
/* QR-RH */
/* case CHAMELEON_TTMQR: cl_zttmqr_restrict_where( where ); break; */
/* case CHAMELEON_TTQRT: cl_zttqrt_restrict_where( where ); break; */
/* case TASK_TTMQR: cl_zttmqr_restrict_where( where ); break; */
/* case TASK_TTQRT: cl_zttqrt_restrict_where( where ); break; */
/* LQ */
case CHAMELEON_GELQT: cl_zgelqt_restrict_where( where ); break;
case CHAMELEON_UNMLQ: cl_zunmlq_restrict_where( where ); break;
case CHAMELEON_TSMLQ: cl_ztsmlq_restrict_where( where ); break;
case CHAMELEON_TSLQT: cl_ztslqt_restrict_where( where ); break;
case TASK_GELQT: cl_zgelqt_restrict_where( where ); break;
case TASK_UNMLQ: cl_zunmlq_restrict_where( where ); break;
case TASK_TSMLQ: cl_ztsmlq_restrict_where( where ); break;
case TASK_TSLQT: cl_ztslqt_restrict_where( where ); break;
/* LQ-RH */
/* case CHAMELEON_TTMLQ: cl_zttmlq_restrict_where( where ); break; */
/* case CHAMELEON_TTLQT: cl_zttlqt_restrict_where( where ); break; */
/* case TASK_TTMLQ: cl_zttmlq_restrict_where( where ); break; */
/* case TASK_TTLQT: cl_zttlqt_restrict_where( where ); break; */
default:
return;
......@@ -191,53 +191,53 @@ void RUNTIME_zlocality_onerestore( cham_tasktype_t kernel )
{
switch( kernel ) {
/* Blas 3 */
case CHAMELEON_GEMM: cl_zgemm_restore_where(); break;
case TASK_GEMM: cl_zgemm_restore_where(); break;
#if defined(PRECISION_z) || defined(PRECISION_c)
case CHAMELEON_HEMM: cl_zhemm_restore_where(); break;
case CHAMELEON_HER2K: cl_zher2k_restore_where(); break;
case CHAMELEON_HERK: cl_zherk_restore_where(); break;
case CHAMELEON_SYTRF_NOPIV: cl_zsytrf_nopiv_restore_where(); break;
case TASK_HEMM: cl_zhemm_restore_where(); break;
case TASK_HER2K: cl_zher2k_restore_where(); break;
case TASK_HERK: cl_zherk_restore_where(); break;
case TASK_SYTRF_NOPIV: cl_zsytrf_nopiv_restore_where(); break;
#endif
case CHAMELEON_SYMM: cl_zhemm_restore_where(); break;
case CHAMELEON_SYR2K: cl_zher2k_restore_where(); break;
case CHAMELEON_SYRK: cl_zherk_restore_where(); break;
case CHAMELEON_TRMM: cl_ztrmm_restore_where(); break;
case CHAMELEON_TRSM: cl_ztrsm_restore_where(); break;
case TASK_SYMM: cl_zhemm_restore_where(); break;
case TASK_SYR2K: cl_zher2k_restore_where(); break;
case TASK_SYRK: cl_zherk_restore_where(); break;
case TASK_TRMM: cl_ztrmm_restore_where(); break;
case TASK_TRSM: cl_ztrsm_restore_where(); break;
/*
* Lapack
*/
/* Cholesky */
case CHAMELEON_POTRF: cl_zpotrf_restore_where(); break;
case CHAMELEON_LAUUM: cl_zlauum_restore_where(); break;
case CHAMELEON_TRTRI: cl_ztrtri_restore_where(); break;
case TASK_POTRF: cl_zpotrf_restore_where(); break;
case TASK_LAUUM: cl_zlauum_restore_where(); break;
case TASK_TRTRI: cl_ztrtri_restore_where(); break;
/* LU */
case CHAMELEON_GETRF_INCPIV: cl_zgetrf_incpiv_restore_where(); break;
case CHAMELEON_GETRF_NOPIV: cl_zgetrf_nopiv_restore_where(); break;
case CHAMELEON_GESSM: cl_zgessm_restore_where(); break;
case CHAMELEON_SSSSM: cl_zssssm_restore_where(); break;
case CHAMELEON_TSTRF: cl_ztstrf_restore_where(); break;
case TASK_GETRF_INCPIV: cl_zgetrf_incpiv_restore_where(); break;
case TASK_GETRF_NOPIV: cl_zgetrf_nopiv_restore_where(); break;
case TASK_GESSM: cl_zgessm_restore_where(); break;
case TASK_SSSSM: cl_zssssm_restore_where(); break;
case TASK_TSTRF: cl_ztstrf_restore_where(); break;
/* QR */
case CHAMELEON_GEQRT: cl_zgeqrt_restore_where(); break;
case CHAMELEON_UNMQR: cl_zunmqr_restore_where(); break;
case CHAMELEON_TSMQR: cl_ztsmqr_restore_where(); break;
case CHAMELEON_TSQRT: cl_ztsqrt_restore_where(); break;
case TASK_GEQRT: cl_zgeqrt_restore_where(); break;
case TASK_UNMQR: cl_zunmqr_restore_where(); break;
case TASK_TSMQR: cl_ztsmqr_restore_where(); break;
case TASK_TSQRT: cl_ztsqrt_restore_where(); break;
/* QR-RH */
/* case CHAMELEON_TTMQR: cl_zttmqr_restore_where(); break; */
/* case CHAMELEON_TTQRT: cl_zttqrt_restore_where(); break; */
/* case TASK_TTMQR: cl_zttmqr_restore_where(); break; */
/* case TASK_TTQRT: cl_zttqrt_restore_where(); break; */
/* LQ */
case CHAMELEON_GELQT: cl_zgelqt_restore_where(); break;
case CHAMELEON_UNMLQ: cl_zunmlq_restore_where(); break;
case CHAMELEON_TSMLQ: cl_ztsmlq_restore_where(); break;
case CHAMELEON_TSLQT: cl_ztslqt_restore_where(); break;
case TASK_GELQT: cl_zgelqt_restore_where(); break;
case TASK_UNMLQ: cl_zunmlq_restore_where(); break;
case TASK_TSMLQ: cl_ztsmlq_restore_where(); break;
case TASK_TSLQT: cl_ztslqt_restore_where(); break;
/* LQ-RH */
/* case CHAMELEON_TTMLQ: cl_zttmlq_restore_where(); break; */
/* case CHAMELEON_TTLQT: cl_zttlqt_restore_where(); break; */
/* case TASK_TTMLQ: cl_zttmlq_restore_where(); break; */
/* case TASK_TTLQT: cl_zttlqt_restore_where(); break; */
default:
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment