symforce.caspar.memory.layouts module

get_default_caspar_layout(stype, dtype)[source]

Default layout for a given storage type.

Parameters:
Return type:

list[list[int]]

caspar_size(size)[source]

Number of elements the caspar layout uses for a given size.

Parameters:

size (int | T.StorableOrType)

Return type:

int

stacked_size(size)[source]

Number of elements the caspar layout uses for a given size.

Parameters:

size (int | T.StorableOrType)

Return type:

int

chunk_dim(chunk)[source]

The number of elements in a chunk of the caspar layout.

In the cuda kernels we use the float, float2, float3, float4 types. float3 is aligned to 16 bytes and needs padding.

Parameters:

chunk (list[int])

Return type:

int