Function setCacheLineSize

Synopsis

#include <Source/Falcor/Utils/AlignedAllocator.h>

void setCacheLineSize(int cacheLineSize)

Description

Sets the cache line size so that allocations can be aligned so that they don't span multiple cache lines (if possible). If a value of zero is provided, then the allocator doesn't prevent objects from spanning cache lines.

Source

Lines 62-66 in Source/Falcor/Utils/AlignedAllocator.h.

void setCacheLineSize(int cacheLineSize)
{
    assert(cacheLineSize == 0 || isPowerOf2(cacheLineSize));
    mCacheLineSize = cacheLineSize;
}





Add Discussion as Guest

Log in to DocsForge