Skip to content
Snippets Groups Projects
Commit 4f276acd authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added operator!() to smart pointers

parent 9c3af95c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment