pfnet-research / menoh

Menoh: fast DNN inference library with multiple programming language support
MIT License
279 stars 34 forks source link

Feature request: function for computing element size of a dtype #174

Closed msakai closed 6 years ago

msakai commented 6 years ago

It would be nice to have a function for computing element size of a given dtype, something like the following.

menoh_error_code MENOH_API menoh_dtype_size(menoh_dtype dtype, int32_t *dst_size);

It is useful for binding libraries, to allocate buffer or to copy data for example, in a general way without knowing each dtype (so that it is safe even if a new dtype is introduced in the future Menoh).

msakai commented 6 years ago

PR #175 added such function.