arma_util.hpp File Reference
Include dependency graph for arma_util.hpp:

Go to the source code of this file.

Functions

template
T::elem_type * GetMemory (T &m)
 Return the matrix's allocated memory pointer, unless the matrix is using its internal preallocated memory, in which case we copy that and return a pointer to the memory we just made. More...

 
template
size_t GetMemState (T &t)
 Get the memory state of the given Armadillo object. More...

 
template
void SetMemState (T &t, int state)
 Set the memory state of the given Armadillo object. More...

 

Detailed Description

Author
Ryan Curtin

Utility function for Cython to set the memory state of an Armadillo object.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Definition in file arma_util.hpp.

Function Documentation

◆ GetMemory()

T::elem_type* GetMemory ( T &  m)
inline

Return the matrix's allocated memory pointer, unless the matrix is using its internal preallocated memory, in which case we copy that and return a pointer to the memory we just made.

Definition at line 47 of file arma_util.hpp.

◆ GetMemState()

size_t GetMemState ( T &  t)

Get the memory state of the given Armadillo object.

Definition at line 31 of file arma_util.hpp.

◆ SetMemState()

void SetMemState ( T &  t,
int  state 
)

Set the memory state of the given Armadillo object.

Definition at line 22 of file arma_util.hpp.