MCPcopy Create free account
hub / github.com/Derious/cuMPC / check_aligned_new

Function check_aligned_new

dependence/eigen-3.4.0/test/dynalloc.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void check_aligned_new()
46{
47 for(int i = ALIGNMENT; i < 1000; i++)
48 {
49 float *p = internal::aligned_new<float>(i);
50 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);
51 // if the buffer is wrongly allocated this will give a bad write --> check with valgrind
52 for(int j = 0; j < i; j++) p[j]=0;
53 internal::aligned_delete(p,i);
54 }
55}
56
57void check_aligned_stack_alloc()
58{

Callers 1

EIGEN_DECLARE_TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected