[apps] Use crc32 methods in models

Change-Id: I2c0588eef90c8015d13fd7aed87a4b615243fe5c
This commit is contained in:
Émilie Feral
2017-01-09 15:27:37 +01:00
parent affda5eae9
commit e9e171935c
4 changed files with 7 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
#include <math.h>
#include <assert.h>
#include <stddef.h>
#include <ion.h>
FloatPairStore::FloatPairStore() :
m_numberOfPairs(0)
@@ -58,8 +59,7 @@ float FloatPairStore::sumOfColumn(int i) {
uint32_t FloatPairStore::storeChecksum() {
size_t dataLengthInBytes = m_numberOfPairs*2*sizeof(float);
assert((dataLengthInBytes & 0x3) == 0); // Assert that dataLengthInBytes is a multiple of 4
//return Ion::crc32((uint32_t *)m_data, dataLengthInBytes>>2);
return sumOfColumn(0)+sumOfColumn(1);
return Ion::crc32((uint32_t *)m_data, dataLengthInBytes>>2);
}
float FloatPairStore::defaultValue(int i) {