Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ is_aligned()

template<typename T >
bool stan::math::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 29 of file stack_alloc.hpp.