TTDim#

class TTDim#

Specification of a single dimension in a tile tensor shape. See more in TTShape.

apply_compatibility_adjustments(self: pyhelayers.TTDim, other: pyhelayers.TTDim, actionType: pyhelayers.ActionType) None#

Change this TTDim to be the result of applying a tile tensor operator on this object and other object.

Parameters:
  • other (TTDim) – TTDim on which an operator is applied.

  • at (ActionType) – Action type to apply compatibility for

duplicate(self: pyhelayers.TTDim, dup: int = -1) None#

Sets dim to be duplicated. Assumes this dim is either incomplete or originalSize==1. and currently not duplicated.

Parameters:

dup – duplication count. Defaults to -1, which means duplicate to the entire tile size.

Raises:

ValueError – If the specified dimension has originalSize>1, or is already duplicated

get_are_unused_slots_unknown(self: pyhelayers.TTDim) bool#
get_external_size(self: pyhelayers.TTDim) int#
get_is_complex_packed(self: pyhelayers.TTDim) bool#

Returns whether this dimension is complex packed.

get_max_used_slots_in_tile(self: pyhelayers.TTDim) int#

Returns a bound on the number of used slots along this dimension in a single tile.

get_num_duplicated(self: pyhelayers.TTDim) int#

Returns number of duplications.

get_num_duplicated_slots(self: pyhelayers.TTDim) int#

Returns the number of slots that contain duplicated values.

get_num_unused_slots(self: pyhelayers.TTDim) int#
get_num_used_slots(self: pyhelayers.TTDim) int#
get_original_size(self: pyhelayers.TTDim) int#

Returns original size.

get_original_size_slots(self: pyhelayers.TTDim) int#

Returns the minimal number of slots required to store the original size numbers.

get_tile_size(self: pyhelayers.TTDim) int#
is_compatible(self: pyhelayers.TTDim, other: pyhelayers.TTDim, action_type: pyhelayers.ActionType = <ActionType.OTHER_ACTION_TYPE: 2>) bool#

Returns whether other TTDim is compatible for tile tensor

Parameters:
  • other (TTDim) – TTDim to check compatibility with.

  • at (ActionType) – Action type to check compatibility with.

is_degenerate_tile(self: pyhelayers.TTDim) bool#
is_equal_on_original_slots(self: pyhelayers.TTDim, other: pyhelayers.TTDim, enforceInterleavedExternalSize: bool = True) bool#
is_fully_duplicated(self: pyhelayers.TTDim) bool#
is_incomplete(self: pyhelayers.TTDim) bool#
is_interleaved(self: pyhelayers.TTDim) bool#
reduce_original_size(self: pyhelayers.TTDim, new_original_size: int, new_interleaved_external_size: int = False) pyhelayers.TTDim#
set_are_unused_slots_unknown(self: pyhelayers.TTDim, are_unknown: bool) pyhelayers.TTDim#

Sets the value of the unknown flag for this dimension. fully duplicated along tile size.

Parameters:

are_unknown (bool) – Value to set.

Raises:

ValueError – If areUknown is true and this dimension has no unused slots.

set_incomplete(self: pyhelayers.TTDim) None#
set_interleaved(self: pyhelayers.TTDim, is_interleaved: bool, external_size_divisor: int = 1) pyhelayers.TTDim#

Turns interleave flag on or off.

Parameters:
  • is_interleaved (bool) – Whether this dimension is interleaved.

  • external_size_divisor (int) – If isInterleaved, you can forc the external size to be divisible by this value. Defaults to 1.

set_interleaved_external_size(self: pyhelayers.TTDim, new_size: int) pyhelayers.TTDim#

Set the interleaved external size of this dimension. Can be called only for dimensions marked with setInterleaved(true). Given size must be at least getMinExternalSize()

Parameters:

new_size (int) – new interleaved size.

set_is_complex_packed(self: pyhelayers.TTDim, val: bool) pyhelayers.TTDim#

Sets this dimension’s complex packed flag

Parameters:

val (bool) – new value to set.

set_num_duplicated(self: pyhelayers.TTDim, num: int) pyhelayers.TTDim#
set_original_size(self: pyhelayers.TTDim, size: int, keep_interleaved_placing: bool = False) pyhelayers.TTDim#
set_tile_size(self: pyhelayers.TTDim, size: int) pyhelayers.TTDim#
set_unused_slots_unknown(self: pyhelayers.TTDim) pyhelayers.TTDim#

Indicates that unused slots if they exist are unknown. This turns on the unknown flag for this dimension if it has unused slots.