Skip to main content
Log in

Mojo function

env_get_dtype

env_get_dtype[name: StringSlice[StaticConstantOrigin], default: DType]() -> DType

Try to get an DType-valued define. If the name is not defined, return a default value instead.

Parameters:

  • name (StringSlice[StaticConstantOrigin]): The name of the define.
  • default (DType): The default value to use.

Returns:

An DType parameter value.