Module ocl_core::util

source ·
Expand description

Utility and debugging functions.

Stability

Printing functions may be moved/renamed/removed at any time.

Modules

Enums

Functions

  • Converts a vector of bytes into a value of arbitrary type.
  • Converts a byte Vec into a string, removing the trailing null byte if it exists.
  • Converts a vector of bytes into a vector of arbitrary type.
  • Copies a slice of bytes to a new value of arbitrary type.
  • Copies a byte slice to a new u32.
  • Copies a slice of bytes into a vector of arbitrary type.
  • [UNTESTED] Copies an arbitrary primitive or struct into core bytes.
  • Pads len to make it evenly divisible by incr.
  • Prints bytes as hex.
  • [UNSTABLE]: MAY BE REMOVED AT ANY TIME Prints a vector to stdout. Used for debugging.
  • Batch removes elements from a vector using a list of indices to remove.
  • Wraps (%) each value in the list vals if it equals or exceeds val_n.