Commit 6513fcbf authored by Mathieu Faverge's avatar Mathieu Faverge

Restructure headers in cudablas directory

parent 856b8030
......@@ -20,8 +20,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if !defined(CHAMELEON_USE_CUBLAS_V2)
#error "This file requires cublas api v2 support"
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_zgelqt(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_zgemerge( MORSE_enum side, MORSE_enum diag,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zgemm(MORSE_enum transa, MORSE_enum transb,
int m, int n, int k,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_zgeqrt(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
#if defined(HAVE_MAGMA_GETRF_INCPIV_GPU)
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
#if defined(HAVE_MAGMA_GETRF_INCPIV_GPU)
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zhemm(MORSE_enum side, MORSE_enum uplo,
int m, int n,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zher2k(MORSE_enum uplo, MORSE_enum trans,
int n, int k,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_zherfb( MORSE_enum uplo, int n,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zherk( MORSE_enum uplo, MORSE_enum trans,
int n, int k,
......
......@@ -24,8 +24,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_zlarfb(MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_zlauum(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
/**
*****************************************************************************
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_zpotrf(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
#if defined(HAVE_MAGMA_GETRF_INCPIV_GPU)
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zsymm(MORSE_enum side, MORSE_enum uplo,
int m, int n,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zsyr2k(
MORSE_enum uplo, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zsyrk(MORSE_enum uplo, MORSE_enum trans,
int n, int k,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_ztpmqrt( MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_ztrmm(
MORSE_enum side, MORSE_enum uplo,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_ztrsm(MORSE_enum side, MORSE_enum uplo,
MORSE_enum transa, MORSE_enum diag,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_ztrtri(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA) && 0
int CUDA_ztslqt(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_ztsmlq(
MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_ztsmqr(
MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_ztsqrt(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
#if defined(CHAMELEON_USE_MAGMA) && 0
int CUDA_ztstrf(
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int CUDA_zttmqr(
MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_zunmlqt(MORSE_enum side, MORSE_enum trans,
......
......@@ -22,8 +22,8 @@
* @precisions normal z -> c d s
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas/include/cudablas_z.h"
#include "cudablas.h"
#include "cudablas/cudablas_z.h"
int
CUDA_zunmqrt(MORSE_enum side, MORSE_enum trans,
......
......@@ -19,7 +19,7 @@
* @date 2017-04-06
*
**/
#include "cudablas/include/cudablas.h"
#include "cudablas.h"
/*******************************************************************************
* LAPACK Constants
......
......@@ -27,31 +27,36 @@
# ---------------------
set(CUDABLAS_HDRS_GENERATED "")
set(ZHDR
cudablas_z.h
cudablas/cudablas_z.h
)
precisions_rules_py(CUDABLAS_HDRS_GENERATED "${ZHDR}"
PRECISIONS "s;d;c;z;zc;ds" )
precisions_rules_py(
CUDABLAS_HDRS_GENERATED "${ZHDR}"
TARGETDIR cudablas
PRECISIONS "s;d;c;z;zc;ds" )
# Define the list of headers
# --------------------------
set(CUDABLAS_HDRS
cudablas.h
${CUDABLAS_HDRS_GENERATED}
)
# Add generated headers
# ---------------------
foreach( hdr_file ${CUDABLAS_HDRS_GENERATED} )
list(APPEND CUDABLAS_HDRS ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
# Force generation of headers
# ---------------------------
add_custom_target(cudablas_include ALL SOURCES ${CUDABLAS_HDRS})
set(HDR_INSTALL "cudablas.h")
foreach( hdr_file ${CUDABLAS_HDRS_GENERATED} )
list(APPEND HDR_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
endforeach()
# installation
# Installation
# ------------
install(FILES ${HDR_INSTALL}
DESTINATION include/chameleon/cudablas/include)
install( FILES cudablas.h
DESTINATION include )
install( FILES ${CUDABLAS_HDRS}
DESTINATION include/cudablas )
###
### END CMakeLists.txt
......
......@@ -25,7 +25,7 @@
#ifndef _CUDA_BLAS_H_
#define _CUDA_BLAS_H_
#include "include/chameleon_config.h"
#include "chameleon/chameleon_config.h"
#if !defined(CHAMELEON_USE_CUDA)
#error "This file should not be included"
......@@ -68,20 +68,21 @@
/** ****************************************************************************
* MORSE types and constants
**/
#include "morse_types.h"
#include "morse_struct.h"
#include "morse_constants.h"
//#include "control/auxiliary.h"
//#include "control/descriptor.h"
//#include "control/tile.h"
#include "chameleon/morse_types.h"
#include "chameleon/morse_struct.h"
#include "chameleon/morse_constants.h"
/** ****************************************************************************
* CUDA BLAS headers
**/
#include "cudablas/include/cudablas_z.h"
#include "cudablas/include/cudablas_d.h"
#include "cudablas/include/cudablas_c.h"
#include "cudablas/include/cudablas_s.h"
BEGIN_C_DECLS
#include "cudablas/cudablas_z.h"
#include "cudablas/cudablas_d.h"
#include "cudablas/cudablas_c.h"
#include "cudablas/cudablas_s.h"
END_C_DECLS
/** ****************************************************************************
* Coreblas Error
......@@ -91,6 +92,8 @@
/** ****************************************************************************
* LAPACK Constants
**/
BEGIN_C_DECLS
extern char *morse_lapack_constants[];
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]
......@@ -102,4 +105,6 @@ extern int morse_cublas_constants[];
#define morse_cublas_const(morse_const) morse_lapack_constants[morse_const][0]
#endif
END_C_DECLS
#endif
......@@ -25,13 +25,6 @@
#ifndef _MORSE_CUDA_ZBLAS_H_
#define _MORSE_CUDA_ZBLAS_H_
#include "include/chameleon_config.h"
#include "morse_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** ****************************************************************************
* Declarations of cuda kernels - alphabetical order
**/
......@@ -56,8 +49,4 @@ int CUDA_zttmqr( MORSE_enum side, MORSE_enum trans, int M1, int N1, int M2, int
int CUDA_zunmlqt(MORSE_enum side, MORSE_enum trans, int M, int N, int K, int IB, const cuDoubleComplex *A, int LDA, const cuDoubleComplex *T, int LDT, cuDoubleComplex *C, int LDC, cuDoubleComplex *WORK, int LDWORK, CUBLAS_STREAM_PARAM );
int CUDA_zunmqrt(MORSE_enum side, MORSE_enum trans, int M, int N, int K, int IB, const cuDoubleComplex *A, int LDA, const cuDoubleComplex *T, int LDT, cuDoubleComplex *C, int LDC, cuDoubleComplex *WORK, int LDWORK, CUBLAS_STREAM_PARAM );
#ifdef __cplusplus
}
#endif
#endif
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