heterocl.util module¶
Utility functions for HeteroCL
-
class
CastRemover
[source]¶ Bases:
heterocl.mutator.Mutator
-
class
VarName
[source]¶ Bases:
object
A counter for each type of variables.
- Parameters
name_dict (dict) – A dictionary whose key is the variable type and whose value is the number of such variable.
-
name_dict
= {'compute': 2, 'mutate': 2, 'placeholder': 7, 'ra': 9, 'scalar': 1}¶
-
get_dtype
(dtype, name=None)[source]¶ Get the data type by default or from a value.
We first check if the data type of a variable is specified after the scheduling or the variable is used for the first time. After that, we check whether user specifies the data type or not.