Commit 4f276acd authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added operator!() to smart pointers

parent 9c3af95c
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -119,6 +119,12 @@ class DevicePointer< Object, Devices::Host > : public SmartPointer
         return this->pointer;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pointer;
      }

      template< typename Device = Devices::Host >
      __cuda_callable__
      const Object& getData() const
@@ -287,6 +293,12 @@ class DevicePointer< Object, Devices::Cuda > : public SmartPointer
         return this->pd;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pd;
      }

      template< typename Device = Devices::Host >
      __cuda_callable__
      const Object& getData() const
+12 −0
Original line number Diff line number Diff line
@@ -167,6 +167,12 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer
         return this->pd;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pd;
      }

      template< typename Device = Devices::Host >
      __cuda_callable__
      const Object& getData() const
@@ -402,6 +408,12 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
         return this->pd;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pd;
      }

      template< typename Device = Devices::Host >
      __cuda_callable__
      const Object& getData() const
+12 −0
Original line number Diff line number Diff line
@@ -67,6 +67,12 @@ class UniquePointer< Object, Devices::Host > : public SmartPointer
         return this->pointer;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pointer;
      }

      template< typename Device = Devices::Host >
      const Object& getData() const
      {
@@ -155,6 +161,12 @@ class UniquePointer< Object, Devices::Cuda > : public SmartPointer
         return this->pd;
      }

      __cuda_callable__
      bool operator!() const
      {
         return ! this->pd;
      }

      template< typename Device = Devices::Host >      
      const Object& getData() const
      {