Feedback: FP32 (vectorsets) should explicitly document endianness
Closed this issue · 2 comments
Page https://redis.io/docs/latest/commands/vadd, https://redis.io/docs/latest/commands/vsim, possibly others
The vector for these commands can be specified either as a sequence VALUES {N} {val0}... or as a blob FP32 {blob}; when using the more efficient FP32 version, the caller needs to know the expected endianness, since the local CPU endianness can be exotic on some platforms, most notably some ARM variants (I won't make you laugh by citing Itanium).
IMO any docs that mention FP32 should clarify that "this parameter requires using little-endian encoding; on incompatible platforms, the caller should either manually adjust endianness appropriately, or use the VALUES syntax". Or something like that.
Thank you, @mgravell. That's a good suggestion. I'll open a ticket for this and place it in my queue.
Thanks; even if such CPUs are virtually non-existent in reality, it would be great for readers to not have to ask themselves "is this network-byte-order? or...?"