Documentation
¶
Overview ¶
Package utils holds small utility types and functions used internally in stablehlo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DTypeToStableHLO ¶
func SortedKeys ¶
SortedKeys returns the keys of the set in sorted order.
func ToSnakeCase ¶
ToSnakeCase converts a string from CamelCase to snake_case.
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
Set implements a Set for the key type T.
func MakeSet ¶
func MakeSet[T comparable](size ...int) Set[T]
MakeSet returns an empty Set of the given type. Size is optional, and if given will reserve the expected size.
func SetWith ¶
func SetWith[T comparable](elements ...T) Set[T]
SetWith creates a Set[T] with the given elements inserted.
Click to show internal directories.
Click to hide internal directories.