MCPcopy Create free account
hub / github.com/PX4/eigen / test_first_aligned

Function test_first_aligned

test/first_aligned.cpp:29–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27struct some_non_vectorizable_type { float x; };
28
29void test_first_aligned()
30{
31 EIGEN_ALIGN16 float array_float[100];
32 test_first_aligned_helper(array_float, 50);
33 test_first_aligned_helper(array_float+1, 50);
34 test_first_aligned_helper(array_float+2, 50);
35 test_first_aligned_helper(array_float+3, 50);
36 test_first_aligned_helper(array_float+4, 50);
37 test_first_aligned_helper(array_float+5, 50);
38
39 EIGEN_ALIGN16 double array_double[100];
40 test_first_aligned_helper(array_double, 50);
41 test_first_aligned_helper(array_double+1, 50);
42 test_first_aligned_helper(array_double+2, 50);
43
44 double *array_double_plus_4_bytes = (double*)(internal::UIntPtr(array_double)+4);
45 test_none_aligned_helper(array_double_plus_4_bytes, 50);
46 test_none_aligned_helper(array_double_plus_4_bytes+1, 50);
47
48 some_non_vectorizable_type array_nonvec[100];
49 test_first_aligned_helper(array_nonvec, 100);
50 test_none_aligned_helper(array_nonvec, 100);
51}

Callers

nothing calls this directly

Calls 2

test_none_aligned_helperFunction · 0.85

Tested by

no test coverage detected