typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
11 lines (10 loc) • 398 B
JavaScript
import { getLayoutInfo } from "./schemaMemoryLayout.js";
export function getLongestContiguousPrefix(schema) {
return getLayoutInfo(schema, 'longestContiguousPrefix');
}
/**
* Returns the size (in bytes) of the longest contiguous memory prefix of data represented by the `schema`.
*/
export function PUBLIC_getLongestContiguousPrefix(schema) {
return getLongestContiguousPrefix(schema);
}