Skip to content

Commit

Permalink
Merge pull request #214 from scality/ft/decode_buffers
Browse files Browse the repository at this point in the history
Decoding using packets
  • Loading branch information
lamphamsy authored Jul 27, 2018
2 parents 1a706d0 + fff0af5 commit 73e7da2
Show file tree
Hide file tree
Showing 19 changed files with 770 additions and 105 deletions.
7 changes: 1 addition & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,4 @@ jobs:
- run: cd build && make check-format
- run: cd build && make check-lint
- run: cd build && make check
# w/o SIMD
- run: cd build && cmake .. -DQUADIRON_USE_SIMD=OFF && make benchmark
# w/ SSE4
- run: cd build && cmake .. -DQUADIRON_USE_SIMD=SSE4 && make benchmark
# w/ AVX2
- run: cd build && cmake .. -DQUADIRON_USE_SIMD=AVX2 && make benchmark
- run: cd build && make benchmark
22 changes: 16 additions & 6 deletions benchmark/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ bool Benchmark<T>::encode()
{
// this operation is done per trail
reset_d_streams();
reset_c_streams();

if (operation_on_packet)
fec->encode_packet(*d_streams, *c_streams, c_props);
Expand Down Expand Up @@ -496,12 +497,21 @@ bool Benchmark<T>::decode()
reset_a_streams();
reset_r_streams();

if (!fec->decode_bufs(
d_streams_shuffled,
c_streams_shuffled,
c_props_shuffled,
*r_streams))
return false;
if (operation_on_packet) {
if (!fec->decode_packet(
d_streams_shuffled,
c_streams_shuffled,
c_props_shuffled,
*r_streams))
return false;
} else {
if (!fec->decode_bufs(
d_streams_shuffled,
c_streams_shuffled,
c_props_shuffled,
*r_streams))
return false;
}

if (!compare(d_chunks, r_chunks)) {
std::cerr << errors_desc.at(ERR_FAILED_REPAIR_CHUNK) << std::endl;
Expand Down
27 changes: 1 addition & 26 deletions scripts/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,14 @@ then
fi

chunk_size=51200
sce_type=enc_only
# for rs-nf4
ec_type=rs-nf4
word_size=8
for k in 16; do
for n in 256 1024; do
m=$((n-k))
${bin} -e ${ec_type} -w ${word_size} -k ${k} -m ${m} -c ${chunk_size} -s ${sce_type} -g ${threads_nb} -f ${show_type}
show_type=0
done
done

# for rs-fnt with different packet sizes
ec_type=rs-fnt
word_size=2
for k in 16; do
for n in 256 1024; do
m=$((n-k))
for pkt_size in 0 256 512; do
for pkt_size in 256 512 1024; do
${bin} -e ${ec_type} -w ${word_size} -k ${k} -m ${m} -c ${chunk_size} -s ${sce_type} -g ${threads_nb} -f ${show_type} -p ${pkt_size}
done
done
done

# for all cases
sce_type=enc_dec
chunk_size=512
for ec_type in rs-gf2n-v rs-gf2n-c rs-gf2n-fft rs-gf2n-fft-add rs-gfp-fft rs-fnt rs-nf4; do
for k in 5; do
for m in 2; do
for word_size in 1 2 4 8; do
${bin} -e ${ec_type} -w ${word_size} -k ${k} -m ${m} -c ${chunk_size} -s ${sce_type} -g ${threads_nb} -f ${show_type}
done
done
done
done
Loading

0 comments on commit 73e7da2

Please sign in to comment.