34 #if defined(HAVE_CONFIG_H) 35 # include "cs_config.h" 49 #if defined(ENABLE_NLS) && defined(HAVE_GETTEXT) 52 # define _(String) dgettext(PACKAGE, String) 54 # define N_(String) gettext_noop(String) 56 # define N_(String) String 61 # define _(String) (String) 62 # define N_(String) String 63 # define textdomain(String) (String) 64 # define gettext(String) (String) 65 # define dgettext(Domain,String) (String) 66 # define dcgettext(Domain,String,Type) (String) 67 # define bindtextdomain(Domain, Directory) (Domain) 79 #if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI) 83 # if !defined(MPI_VERSION) 84 # define MPI_VERSION 1 89 # define MPI_INFO_NULL 0 94 #if defined(HAVE_OPENMP) 106 #if !defined(__STDC_VERSION__) 107 # define __STDC_VERSION__ 1989 115 #if (__STDC_VERSION__ < 199901L) 117 # if defined(__GNUC__) 118 # define inline __inline__ 119 # define restrict __restrict__ 129 # ifndef HAVE_RESTRICT 158 #elif HAVE_INTTYPES_H 159 # include <inttypes.h> 166 #if defined(HAVE_SYS_TYPES_H) 167 #include <sys/types.h> 173 # include <stdbool.h> 177 # define _Bool signed char; 185 # define __bool_true_false_are_defined 1 190 #if !defined(HAVE_INT32_T) 191 # if (SIZEOF_INT == 4) 193 # elif (SIZEOF_SHORT == 4) 194 typedef short int32_t;
202 #if !defined(HAVE_INT64_T) 203 # if (SIZEOF_INT == 8) 205 # elif (SIZEOF_LONG == 8) 206 typedef long int64_t;
207 # elif (HAVE_LONG_LONG == 8) 208 typedef long long int64_t;
216 #if !defined(HAVE_UINT32_T) 217 # if (SIZEOF_INT == 4) 218 typedef unsigned uint32_t;
219 # elif (SIZEOF_SHORT == 4) 220 typedef unsigned short uint32_t;
228 #if !defined(HAVE_UINT64_T) 229 # if (SIZEOF_INT == 8) 230 typedef unsigned uint64_t;
231 # elif (SIZEOF_LONG == 8) 232 typedef unsigned long uint64_t;
233 # elif (HAVE_LONG_LONG) 234 typedef unsigned long long uint64_t;
279 #if defined(HAVE_LONG_GNUM) 280 #if (SIZEOF_LONG == 8) 282 #elif (SIZEOF_LONG_LONG == 8) 348 #if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI) 350 # define CS_MPI_INT MPI_INT 351 # define CS_MPI_REAL MPI_DOUBLE 355 # if defined(HAVE_LONG_GNUM) 356 # if (SIZEOF_LONG == 8) 357 # define CS_MPI_GNUM MPI_UNSIGNED_LONG 358 # elif (SIZEOF_LONG_LONG == 8) 359 # if defined(MPI_UNSIGNED_LONG_LONG) 360 # define CS_MPI_GNUM MPI_UNSIGNED_LONG_LONG 361 # elif defined(MPI_LONG_LONG) 362 # define CS_MPI_GNUM MPI_LONG_LONG 365 # if !defined(CS_MPI_GNUM) 369 # define CS_MPI_GNUM MPI_UNSIGNED 372 # define CS_MPI_FLAG MPI_UNSIGNED_SHORT 373 # define CS_MPI_LNUM MPI_INT 374 # define CS_MPI_COORD MPI_DOUBLE 381 #if defined(HAVE_LONG_GNUM) 382 # define CS_GNUM_TYPE CS_UINT64 383 #elif (SIZEOF_INT == 8) 384 # define CS_GNUM_TYPE CS_UINT64 386 # define CS_GNUM_TYPE CS_UINT32 389 #if (SIZEOF_INT == 8) 390 # define CS_LNUM_TYPE CS_INT64 392 # define CS_LNUM_TYPE CS_INT32 395 #if (SIZEOF_INT == 8) 396 # define CS_INT_TYPE CS_INT64 398 # define CS_INT_TYPE CS_INT32 401 #define CS_FLAG_TYPE CS_UINT16 402 #define CS_REAL_TYPE CS_DOUBLE 403 #define CS_COORD_TYPE CS_DOUBLE 409 #if defined(__bgq__) && defined(__xlc__) 410 # define CS_THR_MIN 1014 412 # define CS_THR_MIN 128 418 #define CS_CL_SIZE 64 424 #define CS_ABS(a) ((a) < 0 ? -(a) : (a)) 425 #define CS_MIN(a,b) ((a) < (b) ? (a) : (b)) 426 #define CS_MAX(a,b) ((a) > (b) ? (a) : (b)) 448 #define CS_UNUSED(x) (void)(x) 449 #define CS_NO_WARN_IF_UNUSED(x) (void)(x) 458 #if defined(__cplusplus) 459 # define BEGIN_C_DECLS extern "C" { 460 # define END_C_DECLS } 462 # define BEGIN_C_DECLS 475 #if !defined (__hpux) 476 #define CS_PROCF(x, y) x##_ 478 #define CS_PROCF(x, y) x 488 #if defined (__uxpv__) 489 #define CS_ARGF_SUPP_CHAINE 491 #define CS_ARGF_SUPP_CHAINE , ... 505 #if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI) 518 #if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI) 543 return ((i > 0) ? ((i-1)/m+1)*m : 0);
MPI_Comm cs_glob_mpi_comm
Definition: cs_defs.c:181
cs_datatype_t
Definition: cs_defs.h:255
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:281
Definition: cs_defs.h:263
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:309
Definition: cs_defs.h:262
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:312
Definition: cs_defs.h:436
cs_real_t cs_real_34_t[3][4]
Definition: cs_defs.h:320
cs_real_t cs_real_66_t[6][6]
6x6 matrix of floating-point values
Definition: cs_defs.h:317
char cs_byte_t
Definition: cs_defs.h:298
cs_interlace_t
Definition: cs_defs.h:434
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:296
Definition: cs_defs.h:257
cs_real_t cs_real_99_t[9][9]
Definition: cs_defs.h:318
int cs_glob_n_ranks
Definition: cs_defs.c:177
cs_real_66_t cs_real_662_t[2]
Definition: cs_defs.h:326
Definition: cs_defs.h:265
double cs_coord_t
Definition: cs_defs.h:294
cs_real_t cs_real_4_t[4]
vector of 4 floating-point values
Definition: cs_defs.h:311
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_defs.h:338
Definition: cs_defs.h:437
Definition: cs_defs.h:329
cs_real_t cs_real_9_t[9]
Definition: cs_defs.h:314
Definition: cs_defs.h:259
double meas
Definition: cs_defs.h:340
int cs_glob_n_threads
Definition: cs_defs.c:174
MPI_Datatype cs_datatype_to_mpi[]
Definition: cs_defs.c:159
cs_real_33_t cs_real_332_t[2]
vector of 2 3x3 matrices of floating-point values
Definition: cs_defs.h:324
int cs_lnum_2_t[2]
vector of 2 local mesh-entity ids
Definition: cs_defs.h:303
Definition: cs_defs.h:264
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:310
const size_t cs_datatype_size[]
Definition: cs_defs.c:135
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
int cs_lnum_3_t[3]
Definition: cs_defs.h:304
double cs_coord_3_t[3]
Definition: cs_defs.h:306
Definition: cs_defs.h:258
unsigned short int cs_flag_t
Definition: cs_defs.h:299
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:316
const char * cs_datatype_name[]
Definition: cs_defs.c:145
cs_real_t cs_real_63_t[6][3]
Definition: cs_defs.h:322
int id
Definition: cs_defs.h:332
Definition: cs_defs.h:261
Definition: cs_defs.h:260
int cs_glob_rank_id
Definition: cs_defs.c:176
static cs_lnum_t cs_align(cs_lnum_t i, cs_lnum_t m)
Given a base index i, return the next index aligned with a size m.
Definition: cs_defs.h:540
double val
Definition: cs_defs.h:331