Skip to content
Snippets Groups Projects
Commit 8aa8f6c6 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Added isInitialized in the memory interface

parent 62f314ea
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,16 @@ class CudaMemory : public memory
return ref_cnt;
}
/*! \brief Allocated Memory is never initialized
*
* \return false
*
*/
bool isInitialized()
{
return false;
}
//! Constructor
CudaMemory():is_hm_sync(false),sz(0),dm(0),hm(0),ref_cnt(0) {};
......
......@@ -87,6 +87,16 @@ public:
return ref_cnt;
}
/*! \brief Allocated Memory is never initialized
*
* \return false
*
*/
bool isInitialized()
{
return false;
}
//! Constructor, we choose a default alignment of 32 for avx
HeapMemory():alignement(MEM_ALIGNMENT),sz(0),dm(NULL),dmOrig(NULL),ref_cnt(0) {};
......
......@@ -168,6 +168,16 @@ public:
{
return hp.copy(m);
}
/*! \brief Allocated Memory is never initialized
*
* \return false
*
*/
bool isInitialized()
{
return false;
}
};
#endif /* PREALLOCHEAPMEMORY_HPP_ */
......@@ -91,6 +91,16 @@ public:
return ref_cnt;
}
/*! \brief Allocated Memory is already initialized
*
* \return true
*
*/
bool isInitialized()
{
return true;
}
// Default constructor
PtrMemory():spm(0),dm(NULL),sz(0),ref_cnt(0)
{
......
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