From 114f8749398fc608d602d265f0c6f81f1d5c4dfc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 29 Feb 2020 22:10:22 -0700 Subject: [PATCH] Use uint64_t instead of 'unsigned long long int'. --- include/deal.II/base/types.h | 16 ++++++++-------- include/deal.II/particles/particle.h | 7 +++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/include/deal.II/base/types.h b/include/deal.II/base/types.h index 17318eea56..48ff55ac0d 100644 --- a/include/deal.II/base/types.h +++ b/include/deal.II/base/types.h @@ -20,6 +20,7 @@ #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -45,13 +46,13 @@ namespace types /** * The type used for global indices of vertices. */ - using global_vertex_index = unsigned long long int; + using global_vertex_index = uint64_t; /** * An identifier that denotes the MPI type associated with * types::global_vertex_index. */ -#define DEAL_II_VERTEX_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG +#define DEAL_II_VERTEX_INDEX_MPI_TYPE MPI_UINT64_T #ifdef DEAL_II_WITH_64BIT_INDICES /** @@ -67,15 +68,14 @@ namespace types * @ref GlobalDoFIndex * page for guidance on when this type should or should not be used. */ - // TODO: we should check that unsigned long long int - // has the same size as uint64_t - using global_dof_index = unsigned long long int; + using global_dof_index = uint64_t; /** * An identifier that denotes the MPI type associated with * types::global_dof_index. */ -# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG +# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UINT64_T + #else /** * The type used for global indices of degrees of freedom. While in @@ -100,7 +100,7 @@ namespace types * The type used for coarse-cell ids. See the glossary * entry on @ref GlossCoarseCellId "coarse cell IDs" for more information. */ - using coarse_cell_id = unsigned long long int; + using coarse_cell_id = uint64_t; #else /** * The type used for coarse-cell ids. See the glossary @@ -162,7 +162,7 @@ namespace TrilinosWrappers /** * Declare type of integer used in the Epetra package of Trilinos. */ - using int_type = long long; + using int_type = long long int; #else /** * Declare type of integer used in the Epetra package of Trilinos. diff --git a/include/deal.II/particles/particle.h b/include/deal.II/particles/particle.h index c65234ea41..4e3727ead5 100644 --- a/include/deal.II/particles/particle.h +++ b/include/deal.II/particles/particle.h @@ -24,6 +24,8 @@ #include +#include + DEAL_II_NAMESPACE_OPEN namespace types @@ -42,15 +44,16 @@ namespace types * * The data type always indicates an unsigned integer type. */ - using particle_index = unsigned long long int; + using particle_index = uint64_t; # ifdef DEAL_II_WITH_MPI /** * An identifier that denotes the MPI type associated with * types::global_dof_index. */ -# define DEAL_II_PARTICLE_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG +# define DEAL_II_PARTICLE_INDEX_MPI_TYPE MPI_UINT64_T # endif + #else /** * The type used for indices of particles. While in -- 2.39.5