erasure-code: use ErasureCode::SIMD_ALIGN in ceph_erasure_code_benchmark

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
This commit is contained in:
Loic Dachary 2014-10-13 16:43:20 +02:00
parent c894812c8e
commit bc8fd4924c
2 changed files with 7 additions and 5 deletions

View File

@ -2,6 +2,7 @@ check_SCRIPTS += \
test/erasure-code/test-erasure-code.sh
ceph_erasure_code_benchmark_SOURCES = \
erasure-code/ErasureCode.cc \
test/erasure-code/ceph_erasure_code_benchmark.cc
ceph_erasure_code_benchmark_LDADD = $(LIBOSD) $(LIBCOMMON) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
if LINUX
@ -9,6 +10,9 @@ ceph_erasure_code_benchmark_LDADD += -ldl
endif
bin_DEBUGPROGRAMS += ceph_erasure_code_benchmark
noinst_HEADERS += \
test/erasure-code/ceph_erasure_code_benchmark.h
ceph_erasure_code_SOURCES = \
test/erasure-code/ceph_erasure_code.cc
ceph_erasure_code_LDADD = $(LIBOSD) $(LIBCOMMON) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
@ -177,6 +181,3 @@ noinst_HEADERS += test/erasure-code/ErasureCodeExample.h
unittest_erasure_code_example_CXXFLAGS = $(UNITTEST_CXXFLAGS)
unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
check_PROGRAMS += unittest_erasure_code_example
noinst_HEADERS += \
test/erasure-code/ceph_erasure_code_benchmark.h

View File

@ -31,6 +31,7 @@
#include "common/Clock.h"
#include "include/utime.h"
#include "erasure-code/ErasureCodePlugin.h"
#include "erasure-code/ErasureCode.h"
namespace po = boost::program_options;
@ -144,7 +145,7 @@ int ErasureCodeBench::encode()
bufferlist in;
in.append(string(in_size, 'X'));
in.rebuild_aligned(32);
in.rebuild_aligned(ErasureCode::SIMD_ALIGN);
set<int> want_to_encode;
for (int i = 0; i < k + m; i++) {
want_to_encode.insert(i);
@ -184,7 +185,7 @@ int ErasureCodeBench::decode()
}
bufferlist in;
in.append(string(in_size, 'X'));
in.rebuild_aligned(32);
in.rebuild_aligned(ErasureCode::SIMD_ALIGN);
set<int> want_to_encode;
for (int i = 0; i < k + m; i++) {