Commit e9ec1a9d authored by Mathieu Faverge's avatar Mathieu Faverge

Cleanup headers in starpu directory

parent 835769e6
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
# @copyright (c) 2009-2015 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2016 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
# @copyright (c) 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
###
#
......@@ -26,81 +26,92 @@
# @date 13-07-2012
#
###
cmake_minimum_required(VERSION 2.8)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/include )
# Generate headers for all possible precisions
# --------------------------------------------
set(RUNTIME_HDRS_GENERATED "")
set(ZHDR
include/runtime_codelet_z.h
)
)
precisions_rules_py(RUNTIME_HDRS_GENERATED "${ZHDR}"
PRECISIONS "s;d;c;z;ds;zc"
TARGETDIR "include")
PRECISIONS "s;d;c;z;ds;zc"
TARGETDIR "include")
# Define the list of headers
# --------------------------
set(RUNTIME_HDRS
include/morse_starpu.h
include/runtime_codelet_profile.h
include/runtime_codelets.h
include/runtime_profiling.h
include/runtime_workspace.h
${RUNTIME_HDRS_GENERATED}
)
include/chameleon_starpu.h
include/runtime_codelet_profile.h
include/runtime_codelets.h
include/runtime_profiling.h
include/runtime_workspace.h
)
# Add generated headers
# ---------------------
foreach( hdr_file ${RUNTIME_HDRS_GENERATED} )
list(APPEND RUNTIME_HDRS ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
# Force generation of headers
# ---------------------------
add_custom_target(runtime_starpu_include ALL SOURCES ${RUNTIME_HDRS})
add_custom_target(
runtime_starpu_include
ALL SOURCES ${RUNTIME_HDRS})
# installation
# Installation
# ------------
#install(FILES ${RUNTIME_HDRS}
# DESTINATION include)
install(
FILES ${RUNTIME_HDRS}
DESTINATION include/runtime/starpu )
# Generate the morse common for all possible precisions
# Generate the Chameleon common for all possible precisions
# -----------------------------------------------------
set(RUNTIME_COMMON_GENERATED "")
set(ZSRC
control/runtime_zprofiling.c
control/runtime_zlocality.c
)
control/runtime_zprofiling.c
control/runtime_zlocality.c
)
precisions_rules_py(RUNTIME_COMMON_GENERATED "${ZSRC}"
PRECISIONS "${CHAMELEON_PRECISION}"
TARGETDIR "control")
precisions_rules_py(
RUNTIME_COMMON_GENERATED "${ZSRC}"
PRECISIONS "${CHAMELEON_PRECISION}"
TARGETDIR "control")
set(RUNTIME_COMMON
control/runtime_async.c
control/runtime_context.c
control/runtime_control.c
control/runtime_descriptor.c
control/runtime_options.c
control/runtime_profiling.c
control/runtime_workspace.c
codelets/codelet_dataflush.c
${RUNTIME_COMMON_GENERATED}
)
control/runtime_async.c
control/runtime_context.c
control/runtime_control.c
control/runtime_descriptor.c
control/runtime_options.c
control/runtime_profiling.c
control/runtime_workspace.c
codelets/codelet_dataflush.c
${RUNTIME_COMMON_GENERATED}
)
set(flags_to_add "")
foreach(_prec ${CHAMELEON_PRECISION})
set(flags_to_add "${flags_to_add} -DPRECISION_${_prec}")
set(flags_to_add "${flags_to_add} -DPRECISION_${_prec}")
endforeach()
set_source_files_properties(control/runtime_profiling.c PROPERTIES COMPILE_FLAGS "${flags_to_add}")
# Generate the morse sources for all possible precisions
# Generate the Chameleon sources for all possible precisions
# ------------------------------------------------------
set(RUNTIME_SRCS_GENERATED "")
set(ZSRC
codelets/codelet_zcallback.c
${CODELETS_ZSRC}
)
codelets/codelet_zcallback.c
${CODELETS_ZSRC}
)
precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
PRECISIONS "${CHAMELEON_PRECISION}"
TARGETDIR "codelets")
PRECISIONS "${CHAMELEON_PRECISION}"
TARGETDIR "codelets")
set(RUNTIME_SRCS
${RUNTIME_COMMON}
......@@ -115,10 +126,10 @@ set_property(TARGET chameleon_starpu PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_
target_link_libraries(chameleon_starpu ${STARPU_LIBRARIES_DEP})
if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon_starpu coreblas)
target_link_libraries(chameleon_starpu coreblas)
endif()
if(CHAMELEON_USE_CUDA AND NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon_starpu cudablas)
target_link_libraries(chameleon_starpu cudablas)
endif(CHAMELEON_USE_CUDA AND NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon_starpu
......@@ -126,19 +137,19 @@ add_dependencies(chameleon_starpu
coreblas_include
control_include
runtime_starpu_include
)
)
if (NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon_starpu coreblas_include)
add_dependencies(chameleon_starpu coreblas_include)
endif()
if (CHAMELEON_USE_CUDA AND NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon_starpu cudablas_include)
add_dependencies(chameleon_starpu cudablas_include)
endif()
# installation
# ------------
install(TARGETS chameleon_starpu
DESTINATION lib)
DESTINATION lib)
###
### END CMakeLists.txt
......
......@@ -24,7 +24,8 @@
* @date 2014-02-05
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "chameleon_starpu.h"
#include "chameleon/morse_tasks.h"
#ifdef HAVE_STARPU_DATA_WONT_USE
#elif defined HAVE_STARPU_IDLE_PREFETCH
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_dzasum(const MORSE_option_t *options,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zaxpy(const MORSE_option_t *options,
......
......@@ -29,8 +29,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zbuild( const MORSE_option_t *options,
......
......@@ -25,8 +25,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
CHAMELEON_CL_CB(zasum, starpu_matrix_get_nx(task->handles[0]), starpu_matrix_get_ny(task->handles[0]), 0, M*N)
CHAMELEON_CL_CB(zaxpy, starpu_matrix_get_nx(task->handles[0]), starpu_matrix_get_nx(task->handles[1]), 0, M)
......
......@@ -26,8 +26,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -29,8 +29,8 @@
*
**/
#include "coreblas/cblas.h"
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zgessq( const MORSE_option_t *options,
......
......@@ -26,8 +26,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zgetrf(const MORSE_option_t *options,
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -25,8 +25,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -20,8 +20,8 @@
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zhessq( const MORSE_option_t *options,
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -26,8 +26,8 @@
* @precisions mixed zc -> ds
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -26,8 +26,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zlange(const MORSE_option_t *options,
......
......@@ -26,8 +26,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zlanhe(const MORSE_option_t *options,
......
......@@ -26,8 +26,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zlansy(const MORSE_option_t *options,
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
void MORSE_TASK_zlantr(const MORSE_option_t *options,
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -27,8 +27,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
......
......@@ -27,8 +27,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/**
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/* MORSE_TASK_zplghe - Generate a tile for random hermitian (positive definite if bump is large enough) matrix. */
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/* MORSE_TASK_zplgsy - Generate a tile for random symmetric (positive definite if 'bump' is large enough) matrix. */
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/* MORSE_TASK_zplrnt - Generate a tile for random matrix. */
......
......@@ -25,8 +25,8 @@
*
**/
#include <math.h>
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#include "chameleon/morse_tasks_z.h"
/*****************************************************************************
......
......@@ -28,8 +28,8 @@
* @precisions normal z -> c d s
*
**/
#include "runtime/starpu/include/morse_starpu.h"
#include "runtime/starpu/include/runtime_codelet_z.h"