]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::free instead of free to avoid name collision when using hipcc 8620/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 22 Aug 2019 02:05:46 +0000 (02:05 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 22 Aug 2019 02:05:46 +0000 (02:05 +0000)
include/deal.II/base/memory_space.h
include/deal.II/lac/read_write_vector.h

index 7cc0a7fe932d7ae795255e4ab3881b7b7671f6da..9042ac105e8c63b3c194bb207a77aeb9eb2c13f5 100644 (file)
@@ -85,7 +85,7 @@ namespace MemorySpace
     /**
      * Pointer to data on the host.
      */
-    std::unique_ptr<Number[], decltype(&free)> values;
+    std::unique_ptr<Number[], decltype(&std::free)> values;
 
     /**
      * Pointer to data on the device.
@@ -114,7 +114,7 @@ namespace MemorySpace
   struct MemorySpaceData<Number, Host>
   {
     MemorySpaceData()
-      : values(nullptr, &free)
+      : values(nullptr, &std::free)
     {}
 
     void
@@ -129,7 +129,7 @@ namespace MemorySpace
       std::copy(begin, begin + n_elements, values.get());
     }
 
-    std::unique_ptr<Number[], decltype(&free)> values;
+    std::unique_ptr<Number[], decltype(&std::free)> values;
 
     // This is not used but it allows to simplify the code until we start using
     // CUDA-aware MPI.
@@ -153,7 +153,7 @@ namespace MemorySpace
   struct MemorySpaceData<Number, CUDA>
   {
     MemorySpaceData()
-      : values(nullptr, &free)
+      : values(nullptr, &std::free)
       , values_dev(nullptr, Utilities::CUDA::delete_device_data<Number>)
     {}
 
@@ -179,8 +179,8 @@ namespace MemorySpace
       AssertCuda(cuda_error_code);
     }
 
-    std::unique_ptr<Number[], decltype(&free)>    values;
-    std::unique_ptr<Number[], void (*)(Number *)> values_dev;
+    std::unique_ptr<Number[], decltype(&std::free)> values;
+    std::unique_ptr<Number[], void (*)(Number *)>   values_dev;
   };
 
 
index f08bd622fd29c9a684084407d99f8d96524d92d0..1c90d3f369b5eb76d432c8fb96af8ca3000b9de3 100644 (file)
@@ -701,7 +701,7 @@ namespace LinearAlgebra
     /**
      * Pointer to the array of local elements of this vector.
      */
-    std::unique_ptr<Number[], decltype(free) *> values;
+    std::unique_ptr<Number[], decltype(std::free) *> values;
 
     /**
      * For parallel loops with TBB, this member variable stores the affinity

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.