@@ -142,25 +142,25 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
constObject*operator->()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
return&this->pd->data;
}
Object*operator->()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
return&this->pd->data;
}
constObject&operator*()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
Object&operator*()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
@@ -180,7 +180,7 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
__cuda_callable__
constObject&getData()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
@@ -188,7 +188,7 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
__cuda_callable__
Object&modifyData()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
@@ -405,26 +405,26 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
constObject*operator->()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
return&this->pd->data;
}
Object*operator->()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
this->pd->maybe_modified=true;
return&this->pd->data;
}
constObject&operator*()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
Object&operator*()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
this->pd->maybe_modified=true;
returnthis->pd->data;
}
@@ -446,8 +446,8 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
constObject&getData()const
{
static_assert(std::is_same<Device,Devices::Host>::value||std::is_same<Device,Devices::Cuda>::value,"Only Devices::Host or Devices::Cuda devices are accepted here.");
TNL_ASSERT(this->pd,);
TNL_ASSERT(this->cuda_pointer,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
TNL_ASSERT_TRUE(this->cuda_pointer,"Attempt to dereference a null pointer");
if(std::is_same<Device,Devices::Host>::value)
returnthis->pd->data;
if(std::is_same<Device,Devices::Cuda>::value)
@@ -459,8 +459,8 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
Object&modifyData()
{
static_assert(std::is_same<Device,Devices::Host>::value||std::is_same<Device,Devices::Cuda>::value,"Only Devices::Host or Devices::Cuda devices are accepted here.");
TNL_ASSERT(this->pd,);
TNL_ASSERT(this->cuda_pointer,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
TNL_ASSERT_TRUE(this->cuda_pointer,"Attempt to dereference a null pointer");
if(std::is_same<Device,Devices::Host>::value)
{
this->pd->maybe_modified=true;
@@ -606,14 +606,14 @@ class SharedPointer< Object, Devices::Cuda > : public SmartPointer
voidset_last_sync_state()
{
TNL_ASSERT(this->pd,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
@@ -126,26 +126,26 @@ class SharedPointer< Object, Devices::MIC > : public SmartPointer
constObject*operator->()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
return&this->pd->data;
}
Object*operator->()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
this->pd->maybe_modified=true;
return&this->pd->data;
}
constObject&operator*()const
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
returnthis->pd->data;
}
Object&operator*()
{
TNL_ASSERT_TRUE(this->pd!=nullptr,"Attempt of dereferencing of null pointer");
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
this->pd->maybe_modified=true;
returnthis->pd->data;
}
@@ -160,8 +160,8 @@ class SharedPointer< Object, Devices::MIC > : public SmartPointer
constObject&getData()const
{
static_assert(std::is_same<Device,Devices::Host>::value||std::is_same<Device,Devices::MIC>::value,"Only Devices::Host or Devices::MIC devices are accepted here.");
TNL_ASSERT(this->pd,);
TNL_ASSERT(this->mic_pointer,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
TNL_ASSERT_TRUE(this->mic_pointer,"Attempt to dereference a null pointer");
if(std::is_same<Device,Devices::Host>::value)
returnthis->pd->data;
if(std::is_same<Device,Devices::MIC>::value)
@@ -174,8 +174,8 @@ class SharedPointer< Object, Devices::MIC > : public SmartPointer
Object&modifyData()
{
static_assert(std::is_same<Device,Devices::Host>::value||std::is_same<Device,Devices::MIC>::value,"Only Devices::Host or Devices::MIC devices are accepted here.");
TNL_ASSERT(this->pd,);
TNL_ASSERT(this->mic_pointer,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");
TNL_ASSERT_TRUE(this->mic_pointer,"Attempt to dereference a null pointer");
if(std::is_same<Device,Devices::Host>::value)
{
this->pd->maybe_modified=true;
@@ -323,14 +323,14 @@ class SharedPointer< Object, Devices::MIC > : public SmartPointer
voidset_last_sync_state()
{
TNL_ASSERT(this->pd,);
TNL_ASSERT_TRUE(this->pd,"Attempt to dereference a null pointer");