Utilities#

Tensile.Utilities.Profile.profile(func: Callable) Callable#

Profiling decorator.

Add @profile to mark a function for profiling; set the environment variable TENSILE_PROFILE=ON to enable profiling decorated functions.

Tensile.Utilities.String.splitDelimitedString(input: str, delimiters: Set[str]) Set[str]#

Given the delimiters, split string into a set.

Parameters:
  • input – String to be split.

  • delimiters – In order of decreasing priority, delimiters to split the string by.

Returns:

Input separated by delimiters as a set.

Tensile.Utilities.toFile.toFile(outputFile: Path, contents: List[str], delimiter: str = '\n') None#

Generates a user specified delimited file.

Writes the elements of a List of strings with a given delimiter.

Parameters:
  • outputFile – Path to file for writing manifest.

  • contents – List of items to write manifest.

  • delimiter – Symbol used to delimit elements when writing file.

Raises:

AssertionError – If contents is not a List[str]