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

Adding additional function in ExtPreAlloc

parent fc5ba103
No related branches found
No related tags found
No related merge requests found
Pipeline #5363 passed
......@@ -65,6 +65,27 @@ public:
mem.resize(size);
}
/*! \brief Set the internal memory if you did not do it in the constructor
*
* \param size number of bytes
* \param mem external memory, used if you want to keep the memory
*
*/
void setMemory(size_t size, Mem & mem)
{
this->mem = &mem;
mem.resize(size);
}
/*! \brief Get the internal memory if you did not do it in the constructor
*
* \return the internal memory
*
*/
Mem * getMemory()
{
return this->mem;
}
/*! \brief Copy the memory from device to device
*
......
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