Template Function mgb::static_cast_dtype

Function Documentation

template<typename T>
void mgb::static_cast_dtype(T *dest, DType src_type, const void *storage, size_t nr_elem = 1)

static cast from any dtype to given ctype

Batched interface to improve speed (so dtype dispatch would not take much time)

Parameters
  • nr_elem: number of elements to write in dest