Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
stan::memory Namespace Reference

(Expert) Allocate, free, and manage underlying system memory. More...

Classes

class  stack_alloc
 An instance of this class provides a memory pool through which blocks of raw memory may be allocated and then collected simultaneously. More...
 

Functions

template<typename T >
bool is_aligned (T *ptr, unsigned int bytes_aligned)
 Return true if the specified pointer is aligned on the number of bytes. More...
 

Detailed Description

(Expert) Allocate, free, and manage underlying system memory.

Function Documentation

template<typename T >
bool stan::memory::is_aligned ( T *  ptr,
unsigned int  bytes_aligned 
)

Return true if the specified pointer is aligned on the number of bytes.

This doesn't really make sense other than for powers of 2.

Parameters
ptrPointer to test.
bytes_alignedNumber of bytes of alignment required.
Returns
true if pointer is aligned.
Template Parameters
Typeof object to which pointer points.

Definition at line 32 of file stack_alloc.hpp.


     [ Stan Home Page ] © 2011–2014, Stan Development Team.