mem: reformat using new code style

Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
This commit is contained in:
Marcel Cornu
2024-04-19 17:09:34 +01:00
committed by Pablo de Lara
parent fa5b8baf84
commit aaa78d6a7c
5 changed files with 243 additions and 239 deletions

View File

@@ -33,27 +33,28 @@
#include "mem_routines.h"
#include "test.h"
#define TEST_LEN 8*1024
#define TEST_LEN 8 * 1024
#define TEST_TYPE_STR "_warm"
int main(int argc, char *argv[])
int
main(int argc, char *argv[])
{
int val = 0;
void *buf;
struct perf start;
int val = 0;
void *buf;
struct perf start;
printf("Test mem_zero_detect_perf %d bytes\n", TEST_LEN);
printf("Test mem_zero_detect_perf %d bytes\n", TEST_LEN);
if (posix_memalign(&buf, 64, TEST_LEN)) {
printf("alloc error: Fail");
return -1;
}
if (posix_memalign(&buf, 64, TEST_LEN)) {
printf("alloc error: Fail");
return -1;
}
memset(buf, 0, TEST_LEN);
BENCHMARK(&start, BENCHMARK_TIME, val |= isal_zero_detect(buf, TEST_LEN));
memset(buf, 0, TEST_LEN);
BENCHMARK(&start, BENCHMARK_TIME, val |= isal_zero_detect(buf, TEST_LEN));
printf("mem_zero_detect_perf" TEST_TYPE_STR ": ");
perf_print(start, (long long)TEST_LEN);
printf("mem_zero_detect_perf" TEST_TYPE_STR ": ");
perf_print(start, (long long) TEST_LEN);
return 0;
return 0;
}