Force 32bit alignment for vectorized operations, fixes 32bit build

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-03-14 23:19:16 +00:00
parent 6d9633b7fb
commit 2dc12fb1ca
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
8 changed files with 656 additions and 5 deletions

View file

@ -48,7 +48,7 @@ struct Port {
/** Voltage of the port. */
/** NOTE alignas is required in order to allow SSE usage.
Consecutive data (like in a vector) would otherwise pack Ports in a way that breaks SSE. */
union alignas(PORT_MAX_CHANNELS) {
union alignas(32) {
/** Unstable API. Use getVoltage() and setVoltage() instead. */
float voltages[PORT_MAX_CHANNELS] = {};
/** DEPRECATED. Unstable API. Use getVoltage() and setVoltage() instead. */