Skip to main content

struct

OpCount

Holds number of operations counted by category.

Fields

  • loads (Int): The number of operations that load from memory.
  • stores (Int): The number of operations that store to memory.
  • additions (Int): The number of addition operations.
  • comparisons (Int): The number of comparison operations.
  • divisions (Int): The number of division operations.
  • multiplications (Int): The number of multiplication operations.
  • multiply_adds (Int): The number of multiply-add operations.
  • other (Int): The number of operations that do not fall into any other category. This count also excludes constants and control flow operations.

Implemented traits

AnyType

Methods

__init__

__init__(inout self: Self, /, counts: Tuple[index, index, index, index, index, index, index, index])

Constructs an OpCount struct.

Args:

  • counts (Tuple[index, index, index, index, index, index, index, index]): The number of instructions in each category.

__str__

__str__(self: Self) -> String