diff --git a/src/TNL/DevicePointer.h b/src/TNL/DevicePointer.h index ce734107d916c7d62d778554ce922ed6066b72ec..fab718cf1d5be52af40d1f54bf7b60634095e1c1 100644 --- a/src/TNL/DevicePointer.h +++ b/src/TNL/DevicePointer.h @@ -113,7 +113,8 @@ class DevicePointer< Object, Devices::Host > : public SmartPointer return *( this->pointer ); } - operator bool() + __cuda_callable__ + operator bool() const { return this->pointer; } @@ -280,7 +281,8 @@ class DevicePointer< Object, Devices::Cuda > : public SmartPointer return *( this->pointer ); } - operator bool() + __cuda_callable__ + operator bool() const { return this->pd; } diff --git a/src/TNL/SharedPointer.h b/src/TNL/SharedPointer.h index 97109e911924c2c9436a53c1fddef0fe3e33597c..c1a3e063477cfe04d8d64bd9144a203e676ebee5 100644 --- a/src/TNL/SharedPointer.h +++ b/src/TNL/SharedPointer.h @@ -161,7 +161,8 @@ class SharedPointer< Object, Devices::Host > : public SmartPointer return this->pd->data; } - operator bool() + __cuda_callable__ + operator bool() const { return this->pd; } @@ -395,7 +396,8 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer return this->pd->data; } - operator bool() + __cuda_callable__ + operator bool() const { return this->pd; } diff --git a/src/TNL/UniquePointer.h b/src/TNL/UniquePointer.h index 1367cab5adb30ecfab66c180a502e6d28117c4f3..01765d51b16baa65e460b1dd639ebef363cc633c 100644 --- a/src/TNL/UniquePointer.h +++ b/src/TNL/UniquePointer.h @@ -61,7 +61,8 @@ class UniquePointer< Object, Devices::Host > : public SmartPointer return *( this->pointer ); } - operator bool() + __cuda_callable__ + operator bool() const { return this->pointer; } @@ -148,7 +149,8 @@ class UniquePointer< Object, Devices::Cuda > : public SmartPointer return this->pd->data; } - operator bool() + __cuda_callable__ + operator bool() const { return this->pd; }