torch.RegisterDTypeOptions
export interface RegisterDTypeOptions {
/**
* Memory layout for multi-component types.
* - 'interleaved': [w0,x0,y0,z0, w1,x1,y1,z1, ...] (default)
* - 'planar': [w0,w1,..., x0,x1,..., y0,y1,..., z0,z1,...]
*/
readonly layout?: 'interleaved' | 'planar';
/**
* Types that can be cast to this dtype.
*/
readonly promotes_from?: readonly DType[];
/**
* What this dtype promotes to when mixed with others.
*/
readonly promotes_to?: DType;
/**
* Named access to components (e.g., ['w', 'x', 'y', 'z'] for quaternions).
*/
readonly component_names?: readonly string[];
/**
* Whether .view() can expose underlying components as base dtype.
*/
readonly allow_component_view?: boolean;
}- readonly
layout('interleaved' | 'planar')optional - – Memory layout for multi-component types. - 'interleaved': [w0,x0,y0,z0, w1,x1,y1,z1, ...] (default) - 'planar': [w0,w1,..., x0,x1,..., y0,y1,..., z0,z1,...]
- readonly
promotes_from(readonly DType[])optional - – Types that can be cast to this dtype.
- readonly
promotes_to(DType)optional - – What this dtype promotes to when mixed with others.
- readonly
component_names(readonly string[])optional - – Named access to components (e.g., ['w', 'x', 'y', 'z'] for quaternions).
- readonly
allow_component_view(boolean)optional - – Whether .view() can expose underlying components as base dtype.
Options for register_dtype.