sensor: axis-align: Add helper API to align for fetch-get - #18
Conversation
PetervdPerk-NXP
left a comment
There was a problem hiding this comment.
Could you do the axis alignment on the raw struct sensor_value instead of doubles, this generates either a vmul.f64 or vneg.f64 cpu instruction which is quite costly.
Also we I would consider unrolling the loop to help the CPU pipeline.
|
@PetervdPerk-NXP I can make the change - Although I'm concerned that most if not all floating-point operations in Cerebri are done with doubles. Wouldn't that be a much higher problem? |
For backwards compatibility support. Operates on struct sensor_value[3] directly to avoid costly floating-point operations (vmul.f64/vneg.f64). Loop is unrolled to help CPU pipelining. Signed-off-by: Luis Ubieda <luisf@croxel.com>
031c066 to
98e52c3
Compare
@PetervdPerk-NXP PTAL with these new updates. Should meet your previous change-requests. |
For backwards compatibility support. Assuming double[3].
Tested by adding the following code in imu zros-driver: