stanle / madopt

Apache License 2.0
16 stars 5 forks source link

Fix memory issue that manifested on Beaglebone Black. #21

Closed dexterurbane closed 7 years ago

dexterurbane commented 7 years ago

This problem was due to the fact that uintptr_t is 4 bytes on the BBB, but was being used to store 8 byte doubles via reinterpret_cast.

I have changed the code from using uintptr_t to using a union. I have tested using the examples/get_started.cpp code on my mac (clang), with identical output and nearly identical timing.