Created
March 22, 2015 21:05
-
-
Save reportbase/619189da55b76d60884f to your computer and use it in GitHub Desktop.
ema32 test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline void ema32f_test(const char*, const char*, void*, node<message*>** errors) | |
{ | |
int status = ippStsNoErr; | |
float data[] = {22.17, 22.40, 23.10, 22.68, 23.33, 23.10, 23.19, 23.65, 23.87, 23.82, 23.63, | |
23.95, 23.83, 23.75, 24.05, 23.36, 22.61, 22.38, 22.39, 22.15, 22.29, 22.24, 22.43, 22.23, | |
22.13, 22.18, 22.17, 22.08, 22.19, 22.27 | |
}; | |
float expected [] = {22.9155602300309, 23.0806847255934, 23.2313924423919, 23.2611240962568, | |
23.3901516732027, 23.4044076005811, 23.4725870673769, 23.5360508601273, 23.5099066068223, | |
23.4293969638939, 23.3420407336481, 23.2772053411254, 23.1273398613755, 22.9706598305701, | |
22.7968064595856, 22.517896783938, 22.3316960692576, 22.2696507513148, 22.2447731404959, | |
22.2119227272727, 22.22475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | |
}; | |
static unsigned long size = 30; | |
float result[30] = {0}; | |
ippsSet_32f(std::numeric_limits<float>::quiet_NaN(), result, size); | |
ema_32f(data, result, size, 10); | |
echo()(data, expected, result, size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment