MCPcopy Create free account
hub / github.com/blender/cycles / TEST

Function TEST

src/test/util_aligned_malloc_test.cpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#define CHECK_ALIGNMENT(ptr, align) EXPECT_EQ((size_t)ptr % align, 0)
10
11CCL_NAMESPACE_BEGIN
12
13TEST(util_aligned_malloc, aligned_malloc_16)
14{
15 int *mem = (int *)util_aligned_malloc(sizeof(int), 16);
16 CHECK_ALIGNMENT(mem, 16);
17 util_aligned_free(mem, sizeof(int));
18}
19
20/* On Apple we currently only support 16 bytes alignment. */
21#ifndef __APPLE__

Callers

nothing calls this directly

Calls 2

util_aligned_mallocFunction · 0.85
util_aligned_freeFunction · 0.85

Tested by

no test coverage detected