Commit 7a0889ad authored by Guillaume Sylvand's avatar Guillaume Sylvand

Move the flag gemm3m_enabled from MORSE_context_t to coreblas/compute/global.c

to avoid reverse dependency libcoreblas->libchameleon
set_coreblas_gemm3m_enabled()/get_coreblas_gemm3m_enabled() allow to set/get
this variable.
parent bb81b954
......@@ -83,7 +83,6 @@ MORSE_context_t *morse_context_create()
morse->parallel_enabled = MORSE_FALSE;
morse->profiling_enabled = MORSE_FALSE;
morse->progress_enabled = MORSE_FALSE;
morse->gemm3m_enabled = MORSE_FALSE;
morse->householder = MORSE_FLAT_HOUSEHOLDER;
morse->translation = MORSE_OUTOFPLACE;
......@@ -170,7 +169,7 @@ int MORSE_Enable(MORSE_enum option)
break;
case MORSE_GEMM3M:
#ifdef CBLAS_HAS_ZGEMM3M
morse->gemm3m_enabled = MORSE_TRUE;
set_coreblas_gemm3m_enabled(1);
#else
morse_error("MORSE_Enable", "cannot enable GEMM3M (not available in cblas)");
#endif
......@@ -241,7 +240,7 @@ int MORSE_Disable(MORSE_enum option)
morse->progress_enabled = MORSE_FALSE;
break;
case MORSE_GEMM3M:
morse->gemm3m_enabled = MORSE_FALSE;
set_coreblas_gemm3m_enabled(0);
break;
case MORSE_PARALLEL_MODE:
morse->parallel_enabled = MORSE_FALSE;
......
......@@ -43,8 +43,7 @@ void CORE_zgemm(MORSE_enum transA, int transB,
MORSE_Complex64_t beta, MORSE_Complex64_t *C, int LDC)
{
#ifdef CBLAS_HAS_ZGEMM3M
MORSE_context_t *morse = morse_context_self();
if (morse->gemm3m_enabled)
if (get_coreblas_gemm3m_enabled())
cblas_zgemm3m(
CblasColMajor,
(CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
......
......@@ -23,6 +23,15 @@
*
**/
static int coreblas_gemm3m_enabled=0;
void set_coreblas_gemm3m_enabled(int v) {
coreblas_gemm3m_enabled=v;
}
int get_coreblas_gemm3m_enabled(void) {
return coreblas_gemm3m_enabled;
}
/*******************************************************************************
* LAPACK Constants
**/
......
......@@ -94,6 +94,9 @@ extern "C" {
extern char *morse_lapack_constants[];
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]
void set_coreblas_gemm3m_enabled(int v) ;
int get_coreblas_gemm3m_enabled(void) ;
#ifdef __cplusplus
}
#endif
......
......@@ -132,7 +132,6 @@ typedef struct morse_context_s {
MORSE_bool parallel_enabled;
MORSE_bool profiling_enabled;
MORSE_bool progress_enabled;
MORSE_bool gemm3m_enabled;
MORSE_enum householder; // "domino" (flat) or tree-based (reduction) Householder
MORSE_enum translation; // In place or Out of place layout conversion
......
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