• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #848

07 Dec 2022 11:00PM CUT coverage: 86.456% (+0.6%) from 85.835%
#848

push

StellarBot
Merge #6096

6096: Forking Boost.Tokenizer r=hkaiser a=hkaiser

- flyby: remove more Boost headers that are not needed anymore

Working towards #3440 

Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

525 of 525 new or added lines in 20 files covered. (100.0%)

173087 of 200202 relevant lines covered (86.46%)

1845223.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

13.33
/libs/full/segmented_algorithms/tests/unit/partitioned_vector_target.cpp
1
//  Copyright (c) 2016 Hartmut Kaiser
2
//
3
//  SPDX-License-Identifier: BSL-1.0
4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/config.hpp>
8
#if !defined(HPX_COMPUTE_DEVICE_CODE)
9
#include <hpx/hpx_main.hpp>
10
#include <hpx/include/compute.hpp>
11
#include <hpx/include/partitioned_vector.hpp>
12
#include <hpx/include/runtime.hpp>
13
#include <hpx/modules/testing.hpp>
14

15
#include <cstddef>
16
#include <vector>
17

18
///////////////////////////////////////////////////////////////////////////////
19
// Define the vector types to be used.
20
typedef hpx::compute::host::block_allocator<int> target_allocator_int;
21
typedef hpx::compute::vector<int, target_allocator_int> target_vector_int;
22
HPX_REGISTER_PARTITIONED_VECTOR_DECLARATION(int, target_vector_int)
23
HPX_REGISTER_PARTITIONED_VECTOR(int, target_vector_int)
64✔
24

25
typedef hpx::compute::host::block_allocator<double> target_allocator_double;
26
typedef hpx::compute::vector<double, target_allocator_double>
27
    target_vector_double;
28
HPX_REGISTER_PARTITIONED_VECTOR_DECLARATION(double, target_vector_double)
29
HPX_REGISTER_PARTITIONED_VECTOR(double, target_vector_double)
70✔
30

31
///////////////////////////////////////////////////////////////////////////////
32
template <typename T>
33
void allocation_tests()
×
34
{
35
    std::size_t const length = 12;
×
36

37
    typedef hpx::compute::host::block_allocator<T> target_allocator;
38
    typedef hpx::compute::vector<T, target_allocator> target_vector;
39

40
    for (hpx::id_type const& locality : hpx::find_all_localities())
×
41
    {
42
        std::vector<hpx::compute::host::distributed::target> targets =
43
            hpx::compute::host::distributed::get_targets(locality).get();
×
44

45
        {
46
            hpx::partitioned_vector<T, target_vector> v(
×
47
                length, T(42), hpx::compute::host::target_layout);
×
48
        }
×
49
    }
×
50

51
    //{
52
    //    hpx::partitioned_vector<T> v;
53
    //    copy_tests(v);
54
    //}
55
    //
56
    //{
57
    //    hpx::partitioned_vector<T> v(length);
58
    //    copy_tests(v);
59
    //}
60
    //
61
    //{
62
    //    hpx::partitioned_vector<T> v(length, T(42));
63
    //    copy_tests(v);
64
    //}
65
    //
66
    //copy_tests_with_policy<T>(length, 1, hpx::container_layout);
67
    //copy_tests_with_policy<T>(length, 3, hpx::container_layout(3));
68
    //copy_tests_with_policy<T>(length, 3, hpx::container_layout(3, localities));
69
    //copy_tests_with_policy<T>(length, localities.size(),
70
    //    hpx::container_layout(localities));
71
}
×
72

73
///////////////////////////////////////////////////////////////////////////////
74
int main()
×
75
{
76
    allocation_tests<double>();
×
77
    allocation_tests<int>();
×
78

79
    return 0;
×
80
}
81
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc