libnop icon indicating copy to clipboard operation
libnop copied to clipboard

encode array of floats as binary container

Open corecode opened this issue 4 years ago • 5 comments

Is there a reason why arrays of floating point numbers are not being encoded in a binary container?

corecode avatar Aug 05 '20 15:08 corecode

No reason other than there isn't a specialization to handle it, like there is for integral types.

I think it makes sense to use the binary container encoding for floating point arrays.

eieio avatar Aug 07 '20 19:08 eieio

It seems like e.g. the vector specialization just needs to be changed from EnableIfIntegral to EnableIfArithmetic?

corecode avatar Aug 07 '20 21:08 corecode

That would work, but there might be users with data in the current encoding. It would be safer to add a separate specialization that can handle reading both encodings.

eieio avatar Aug 13 '20 18:08 eieio

how would I implement this?

On 13/08/2020 20:19, Corey Tabaka wrote:

That would work, but there might be users with data in the current encoding. It would be safer to add a separate specialization that can handle reading both formats.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/libnop/issues/17#issuecomment-673635203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLOO6A43W44QZV2C6R3K3SAQVCPANCNFSM4PVTX6EQ.

corecode avatar Aug 14 '20 10:08 corecode

I'll look into it when I get a chance. I'm thinking of starting to maintain versioned releases to handle format breaking changes. Once I work that out I'll put up a point release with this change.

eieio avatar Aug 21 '20 00:08 eieio