Skip to content

Commit

Permalink
[TEST] Adds first simple test case for vectorised alignment algorithm.
Browse files Browse the repository at this point in the history
* Tests dna sequences of same length.
* Only score and back coordinate can be computed.
  • Loading branch information
rrahn committed Dec 5, 2019
1 parent b25884b commit f208b50
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/alignment/pairwise/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ seqan3_test(alignment_result_test.cpp)
seqan3_test(align_result_selector_test.cpp)
seqan3_test(alignment_configurator_test.cpp)
seqan3_test(global_affine_banded_test.cpp)
seqan3_test(global_affine_unbanded_collection_simd_test.cpp)
seqan3_test(global_affine_unbanded_collection_test.cpp)
seqan3_test(global_affine_unbanded_test.cpp)
seqan3_test(local_affine_banded_test.cpp)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
// -----------------------------------------------------------------------------------------------------

#include <vector>

#include <gtest/gtest.h>

#include <seqan3/alignment/pairwise/align_pairwise.hpp>

#include "fixture/global_affine_unbanded.hpp"
#include "pairwise_alignment_collection_test_template.hpp"

using namespace seqan3;
using namespace seqan3::detail;
using namespace seqan3::test::alignment;

namespace seqan3::test::alignment::collection::simd::global::affine::unbanded
{

static auto dna4_01 = []()
{
using fixture_t = decltype(fixture::global::affine::unbanded::dna4_01);

std::vector<fixture_t> data;
for (size_t i = 0; i < 100; ++i)
data.push_back(fixture::global::affine::unbanded::dna4_01);

auto config = fixture::global::affine::unbanded::dna4_01.config | align_cfg::vectorise;
return alignment_fixture_collection{config, data};
}();

} // namespace seqan3::test::alignment::collection::simd::global::affine::unbanded

using pairwise_collection_simd_global_affine_unbanded_testing_types = ::testing::Types<
pairwise_alignment_fixture<&collection::simd::global::affine::unbanded::dna4_01>
>;

INSTANTIATE_TYPED_TEST_CASE_P(pairwise_collection_simd_global_affine_unbanded,
pairwise_alignment_collection_test,
pairwise_collection_simd_global_affine_unbanded_testing_types);

0 comments on commit f208b50

Please sign in to comment.