Commit 3755e526 authored by Mathieu Faverge's avatar Mathieu Faverge

Move headers in subdirectory chameleon

parent fc13d6dd
......@@ -57,13 +57,15 @@ else()
"https://gitlab.inria.fr/solverstack/morse_cmake. Please set MORSE_CMAKE_DIR to this source "
"directory.")
endif()
include(MorseInit)
include(GenPkgConfig)
include(FortranCInterface)
# Ensure that the fortran compiler and c compiler specified are compatible
# ------------------------------------------------------------------------
include(FortranCInterface)
FortranCInterface_VERIFY()
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/include/morse_mangling.h
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/include/chameleon/morse_mangling.h
MACRO_NAMESPACE "MORSE_")
#############################################
......
......@@ -32,66 +32,67 @@
# ------------------------------------------------------
set(CHAMELEON_HDRS_GENERATED "")
set(ZHDR
morse_z.h
morse_zc.h
runtime_z.h
runtime_zc.h
chameleon/morse_z.h
chameleon/morse_zc.h
chameleon/runtime_z.h
chameleon/runtime_zc.h
)
precisions_rules_py(CHAMELEON_HDRS_GENERATED "${ZHDR}"
PRECISIONS "z;c;d;s;zc;ds")
TARGETDIR "chameleon"
PRECISIONS "z;c;d;s;zc;ds" )
configure_file("chameleon_config.h.in"
"chameleon_config.h"
@ONLY)
configure_file("morse.h.in"
"morse.h"
configure_file("chameleon/chameleon_config.h.in"
"chameleon/chameleon_config.h"
@ONLY)
# Define the list of headers
# --------------------------
set(CHAMELEON_HDRS
chameleon_config.h
morse_constants.h
morse_kernels.h
morse_simulate.h
morse_struct.h
morse_types.h
morse.h
morse_mangling.h
runtime.h
chameleon/chameleon_config.h
chameleon/morse_constants.h
chameleon/morse_kernels.h
chameleon/morse_simulate.h
chameleon/morse_struct.h
chameleon/morse_types.h
chameleon/morse_mangling.h
chameleon/runtime.h
${CHAMELEON_HDRS_GENERATED}
)
set(flags_to_add "")
foreach(_prec ${CHAMELEON_PRECISION})
set(flags_to_add "${flags_to_add} -DPRECISION_${_prec}")
endforeach()
set_source_files_properties(runtime.h PROPERTIES COMPILE_FLAGS "${flags_to_add}")
# set(flags_to_add "")
# foreach(_prec ${CHAMELEON_PRECISION})
# set(flags_to_add "${flags_to_add} -DPRECISION_${_prec}")
# endforeach()
# set_source_files_properties(runtime.h PROPERTIES COMPILE_FLAGS "${flags_to_add}")
# Force generation of headers
# ---------------------------
add_custom_target(chameleon_include ALL SOURCES ${CHAMELEON_HDRS})
add_custom_target(chameleon_include
ALL SOURCES morse.h ${CHAMELEON_HDRS} )
set(HDR_INSTALL
morse_constants.h
morse_fortran.h
morse_kernels.h
morse_simulate.h
morse_struct.h
morse_types.h
runtime.h
${CMAKE_CURRENT_BINARY_DIR}/morse.h
${CMAKE_CURRENT_BINARY_DIR}/chameleon_config.h
)
foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
# set(HDR_INSTALL
# chameleon/chameleon_config.h
# chameleon/morse_constants.h
# chameleon/morse_kernels.h
# chameleon/morse_simulate.h
# chameleon/morse_struct.h
# chameleon/morse_types.h
# chameleon/morse_mangling.h
# chameleon/runtime.h
# ${CHAMELEON_HDRS_GENERATED}
# )
# foreach( hdr_file ${CHAMELEON_HDRS_GENERATED} )
# list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
# endforeach()
# installation
# ------------
install(FILES ${HDR_INSTALL}
DESTINATION include/chameleon)
install( FILES morse.h
DESTINATION include )
install( FILES ${CHAMELEON_HDRS}
DESTINATION include/chameleon )
###
### END CMakeLists.txt
......
......@@ -25,6 +25,10 @@
#ifndef CHAMELEON_CONFIG_H_HAS_BEEN_INCLUDED
#define CHAMELEON_CONFIG_H_HAS_BEEN_INCLUDED
#define MORSE_VERSION_MAJOR @MORSE_VERSION_MAJOR@
#define MORSE_VERSION_MINOR @MORSE_VERSION_MINOR@
#define MORSE_VERSION_MICRO @MORSE_VERSION_MICRO@
#define CHAMELEON_VERSION_MAJOR @CHAMELEON_VERSION_MAJOR@
#define CHAMELEON_VERSION_MINOR @CHAMELEON_VERSION_MINOR@
#define CHAMELEON_VERSION_MICRO @CHAMELEON_VERSION_MICRO@
......
......@@ -32,12 +32,10 @@
typedef enum morse_kernel_e {
MORSE_GEMM,
#if defined(PRECISION_z) || defined(PRECISION_c)
MORSE_HEMM,
MORSE_HER2K,
MORSE_HERK,
MORSE_SYTRF_NOPIV,
#endif
MORSE_SYMM,
MORSE_SYR2K,
MORSE_SYRK,
......
......@@ -114,8 +114,8 @@ void RUNTIME_slocality_onerestore (MORSE_kernel_t);
/*******************************************************************************
* RUNTIME Profiling
**/
void RUNTIME_schedprofile_display ();
void RUNTIME_kernelprofile_display();
void RUNTIME_schedprofile_display ();
void RUNTIME_kernelprofile_display();
double RUNTIME_get_time();
void RUNTIME_start_profiling();
......@@ -124,25 +124,14 @@ void RUNTIME_stop_profiling();
void RUNTIME_start_stats();
void RUNTIME_stop_stats();
#if defined(PRECISION_z)
void RUNTIME_zdisplay_allprofile ();
void RUNTIME_zdisplay_oneprofile (MORSE_kernel_t);
#endif
#if defined(PRECISION_c)
void RUNTIME_cdisplay_allprofile ();
void RUNTIME_cdisplay_oneprofile (MORSE_kernel_t);
#endif
#if defined(PRECISION_d)
void RUNTIME_ddisplay_allprofile ();
void RUNTIME_ddisplay_oneprofile (MORSE_kernel_t);
#endif
#if defined(PRECISION_s)
void RUNTIME_sdisplay_allprofile ();
void RUNTIME_sdisplay_oneprofile (MORSE_kernel_t);
#endif
/*******************************************************************************
* RUNTIME Kernels
......
......@@ -28,10 +28,6 @@
#ifndef _MORSE_H_
#define _MORSE_H_
#define MORSE_VERSION_MAJOR @MORSE_VERSION_MAJOR@
#define MORSE_VERSION_MINOR @MORSE_VERSION_MINOR@
#define MORSE_VERSION_MICRO @MORSE_VERSION_MICRO@
/* ****************************************************************************
* MORSE types and constants
*/
......
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