Loading src/TNL/Pointers/DevicePointer.h +6 −6 Original line number Diff line number Diff line Loading @@ -14,14 +14,13 @@ #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> // std::memcpy, std::memcmp namespace TNL { namespace Pointers { /*** * The DevicePointer is like SharedPointer, except it takes an existing host Loading Loading @@ -774,4 +773,5 @@ struct Formatter< DevicePointer< Object, Device > > } // namespace Assert #endif } // namespace Pointers } // namespace TNL src/TNL/Pointers/SharedPointerCuda.h +19 −17 Original line number Diff line number Diff line Loading @@ -12,12 +12,12 @@ #pragma once #include <TNL/Assert.h> #include "SharedPointer.h" #include <TNL/Devices/Cuda.h> #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> #include <cstring> // std::memcpy, std::memcmp #include <cstddef> // std::nullptr_t //#define TNL_DEBUG_SHARED_POINTERS Loading Loading @@ -290,7 +290,9 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer PointerData* pd; }; #else // HAVE_CUDA_UNIFIED_MEMORY template< typename Object > class SharedPointer< Object, Devices::Cuda > : public SmartPointer { Loading src/TNL/Pointers/SharedPointerHost.h +13 −9 Original line number Diff line number Diff line Loading @@ -12,10 +12,14 @@ #pragma once #include "SharedPointer.h" #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/Devices/CudaCallable.h> #include <TNL/Pointers/SmartPointer.h> #include <cstddef> // std::nullptr_t namespace TNL { namespace Pointers { Loading src/TNL/Pointers/SharedPointerMic.h +15 −13 Original line number Diff line number Diff line Loading @@ -12,16 +12,18 @@ #pragma once #include "SharedPointer.h" #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> // std::memcpy, std::memcmp #include <cstddef> // std::nullptr_t namespace TNL { namespace Pointers { #ifdef HAVE_MIC /**** * Specialization for MIC */ template< typename Object> class SharedPointer< Object, Devices::MIC > : public SmartPointer { Loading src/TNL/Pointers/SmartPointer.h +5 −13 Original line number Diff line number Diff line /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /*************************************************************************** SmartPointer.h - description ------------------- Loading @@ -15,6 +6,8 @@ email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #pragma once class SmartPointer Loading @@ -24,4 +17,3 @@ class SmartPointer virtual bool synchronize() = 0; }; Loading
src/TNL/Pointers/DevicePointer.h +6 −6 Original line number Diff line number Diff line Loading @@ -14,14 +14,13 @@ #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> // std::memcpy, std::memcmp namespace TNL { namespace Pointers { /*** * The DevicePointer is like SharedPointer, except it takes an existing host Loading Loading @@ -774,4 +773,5 @@ struct Formatter< DevicePointer< Object, Device > > } // namespace Assert #endif } // namespace Pointers } // namespace TNL
src/TNL/Pointers/SharedPointerCuda.h +19 −17 Original line number Diff line number Diff line Loading @@ -12,12 +12,12 @@ #pragma once #include <TNL/Assert.h> #include "SharedPointer.h" #include <TNL/Devices/Cuda.h> #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> #include <cstring> // std::memcpy, std::memcmp #include <cstddef> // std::nullptr_t //#define TNL_DEBUG_SHARED_POINTERS Loading Loading @@ -290,7 +290,9 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer PointerData* pd; }; #else // HAVE_CUDA_UNIFIED_MEMORY template< typename Object > class SharedPointer< Object, Devices::Cuda > : public SmartPointer { Loading
src/TNL/Pointers/SharedPointerHost.h +13 −9 Original line number Diff line number Diff line Loading @@ -12,10 +12,14 @@ #pragma once #include "SharedPointer.h" #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/Devices/CudaCallable.h> #include <TNL/Pointers/SmartPointer.h> #include <cstddef> // std::nullptr_t namespace TNL { namespace Pointers { Loading
src/TNL/Pointers/SharedPointerMic.h +15 −13 Original line number Diff line number Diff line Loading @@ -12,16 +12,18 @@ #pragma once #include "SharedPointer.h" #include <TNL/Devices/MIC.h> #include <TNL/Pointers/SmartPointer.h> #include <cstring> // std::memcpy, std::memcmp #include <cstddef> // std::nullptr_t namespace TNL { namespace Pointers { #ifdef HAVE_MIC /**** * Specialization for MIC */ template< typename Object> class SharedPointer< Object, Devices::MIC > : public SmartPointer { Loading
src/TNL/Pointers/SmartPointer.h +5 −13 Original line number Diff line number Diff line /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /*************************************************************************** SmartPointer.h - description ------------------- Loading @@ -15,6 +6,8 @@ email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #pragma once class SmartPointer Loading @@ -24,4 +17,3 @@ class SmartPointer virtual bool synchronize() = 0; };