Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

common.h 5.4 KB
Newer Older
1 2
/**
 *
3 4
 * @copyright (c) 2009-2014 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
5
 *                          All rights reserved.
6
 * @copyright (c) 2012-2015 Inria. All rights reserved.
7
 * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
8 9 10 11 12 13 14 15 16 17 18 19
 *
 **/

/**
 *
 * @file common.h
 *
 *  MORSE codelets kernel
 *  MORSE is a software package provided by Univ. of Tennessee,
 *  Univ. of California Berkeley and Univ. of Colorado Denver,
 *  and INRIA Bordeaux Sud-Ouest
 *
20
 * @version 0.9.0
21 22 23 24 25 26 27 28 29 30 31 32 33
 * @author Mathieu Faverge
 * @author Cedric Castagnede
 * @date 2012-09-15
 *
 **/

/*******************************************************************************
 *  MORSE facilities of interest to both MORSE core developer
 *  and also of interest to MORSE community contributor.
 **/
#ifndef _MORSE_COMMON_H_
#define _MORSE_COMMON_H_

34
#include <stdlib.h>
35 36 37 38 39 40 41 42 43 44 45
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>

#if defined( _WIN32 ) || defined( _WIN64 )
#include <io.h>
#else
#include <unistd.h>
#endif

PRUVOST Florent's avatar
@all  
PRUVOST Florent committed
46 47
/* need the config to get definitions */
#include "control/config.h"
48 49 50 51

/** ****************************************************************************
 * Implementation headers
 **/
52
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
53 54 55
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_runtime_api.h>
56
#if defined(CHAMELEON_USE_CUBLAS_V2)
57
#include <cublas.h>
58 59
#include <cublas_v2.h>
#else
60 61
#include <cublas.h>
#endif
62
#endif
63

64
#if defined(CHAMELEON_USE_OPENCL) && !defined(CHAMELEON_SIMULATION)
65 66 67
#include <OpenCL/cl.h>
#endif

68
#if defined(CHAMELEON_USE_MPI)
69 70 71 72 73 74 75
#include <mpi.h>
#endif


/** ****************************************************************************
 * Linear Algebra headers
 **/
76
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
77 78 79 80 81 82 83 84 85 86
#include <magma.h>
#endif

/** ****************************************************************************
 *  Line to avoid conflict with magma, because, we don't know why
 *  but lapacke provide a wrong interface of lapack in fortran
 **/
#ifndef LAPACK_NAME
#define LAPACK_NAME(a, b) lapackef77_##a
#endif
87 88 89 90 91 92

/** ****************************************************************************
 *  Chameleon header files
 **/
#include "morse.h"

93
#include "coreblas/include/coreblas.h"
94
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
95 96
#include "cudablas/include/cudablas.h"
#endif
97

98 99
#include "control/global.h"
#include "control/auxiliary.h"
100 101
#include "control/context.h"
#include "control/descriptor.h"
102 103
#include "control/tile.h"
#include "control/async.h"
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143

/** ****************************************************************************
 *  Determine FORTRAN names
 **/
#if defined(ADD_)
#define MORSE_FNAME(lcname, UCNAME)        morse_##lcname##_
#define MORSE_TILE_FNAME(lcname, UCNAME)   morse_##lcname##_tile_
#define MORSE_ASYNC_FNAME(lcname, UCNAME)  morse_##lcname##_tile_async_
#define MORSE_WS_FNAME(lcname, UCNAME)     morse_alloc_workspace_##lcname##_
#define MORSE_WST_FNAME(lcname, UCNAME)    morse_alloc_workspace_##lcname##_tile_
#elif defined(NOCHANGE)
#define MORSE_FNAME(lcname, UCNAME)        morse_##lcname
#define MORSE_TILE_FNAME(lcname, UCNAME)   morse_##lcname##_tile
#define MORSE_ASYNC_FNAME(lcname, UCNAME)  morse_##lcname##_tile_async
#define MORSE_WS_FNAME(lcname, UCNAME)     morse_alloc_workspace_##lcname
#define MORSE_WST_FNAME(lcname, UCNAME)    morse_alloc_workspace_##lcname##_tile
#elif defined(UPCASE)
#define MORSE_FNAME(lcname, UCNAME)        MORSE_##UCNAME
#define MORSE_TILE_FNAME(lcname, UCNAME)   MORSE_##UCNAME##_TILE
#define MORSE_ASYNC_FNAME(lcname, UCNAME)  MORSE_##UCNAME##_TILE_ASYNC
#define MORSE_WS_FNAME(lcname, UCNAME)     MORSE_ALLOC_WORKSPACE_##UCNAME
#define MORSE_WST_FNAME(lcname, UCNAME)    MORSE_ALLOC_WORKSPACE_##UCNAME##_TILE
#endif


/*******************************************************************************
 *  Global shortcuts
 **/
#define MORSE_RANK        morse_rank(morse)
#define MORSE_SIZE        morse->world_size
#define MORSE_GRPSIZE     morse->group_size
#define MORSE_NB          morse->nb
#define MORSE_IB          morse->ib
#define MORSE_NBNBSIZE    morse->nbnbsize
#define MORSE_IBNBSIZE    morse->ibnbsize
#define MORSE_SCHEDULING  morse->scheduling
#define MORSE_RHBLK       morse->rhblock
#define MORSE_TRANSLATION morse->translation
#define MORSE_PARALLEL    morse->parallel_enabled
#define MORSE_PROFILING   morse->profiling_enabled
144
#if defined(CHAMELEON_USE_MPI)
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
#define MORSE_MPI_RANK    morse->my_mpi_rank
#define MORSE_MPI_SIZE    morse->mpi_comm_size
#endif

/*******************************************************************************
 *  IPT internal define
 **/
#define MorseIPT_NoDep   0
#define MorseIPT_Panel   1
#define MorseIPT_All     2


/*******************************************************************************
 *  Global array of LAPACK constants
 **/
extern char *morse_lapack_constants[];
161
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]
162 163 164 165 166

#ifdef __cplusplus
extern "C" {
#endif

167 168
#include "control/compute_s.h"
#include "control/compute_d.h"
169
#define COMPLEX
170 171
#include "control/compute_c.h"
#include "control/compute_z.h"
172 173 174 175 176 177 178 179 180 181 182 183 184 185
#undef COMPLEX

/*
void morse_pdlag2s(MORSE_context_t *morse);
void morse_pzlag2c(MORSE_context_t *morse);
void morse_pslag2d(MORSE_context_t *morse);
void morse_pclag2z(MORSE_context_t *morse);
*/

#ifdef __cplusplus
}
#endif

#endif