]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use uint64_t instead of 'unsigned long long int'. 9581/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 1 Mar 2020 05:10:22 +0000 (22:10 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 1 Mar 2020 05:10:22 +0000 (22:10 -0700)
include/deal.II/base/types.h
include/deal.II/particles/particle.h

index 17318eea56b9fa9a1e2923ffcec01543e523a4bc..48ff55ac0dc3e2b2cd1310fc0df187f1f0588c1d 100644 (file)
@@ -20,6 +20,7 @@
 #include <deal.II/base/config.h>
 
 #include <cstddef>
+#include <cstdint>
 
 
 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.
index c65234ea41ee31266839dcfcb7589d732fbdda9f..4e3727ead5eef319fff048262b4bc1333ecca47f 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <deal.II/particles/property_pool.h>
 
+#include <cstdint>
+
 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.