Skip to content

Commit

Permalink
Eliminate execution space specifiers from defaulted functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhoberock committed Feb 23, 2018
1 parent 41340b8 commit 25611b0
Show file tree
Hide file tree
Showing 44 changed files with 16 additions and 109 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ TODO

## New Features

* `require` and properties:
* `bulk`
* `single`
* `then`
* `always_blocking`

### Control Structures

TODO
Expand Down Expand Up @@ -67,10 +73,14 @@ TODO

TODO

* [#437](../../issues/437) Nvcc emits warnings regarding standard library functions calling `__host__`-only functions

## Resolved Issues

TODO

* [#428](../../issues/428) Warnings regarding ignored CUDA annotations have been eliminated

## Acknowledgments

TODO
Expand Down
12 changes: 0 additions & 12 deletions agency/coordinate/detail/named_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ struct named_array_element;
template<class T>
struct named_array_element<T,0>
{
__AGENCY_ANNOTATION
named_array_element() = default;

__AGENCY_ANNOTATION
named_array_element(const named_array_element&) = default;

__AGENCY_ANNOTATION
Expand All @@ -34,10 +32,8 @@ struct named_array_element<T,0>
template<class T>
struct named_array_element<T,1>
{
__AGENCY_ANNOTATION
named_array_element() = default;

__AGENCY_ANNOTATION
named_array_element(const named_array_element&) = default;

__AGENCY_ANNOTATION
Expand All @@ -49,10 +45,8 @@ struct named_array_element<T,1>
template<class T>
struct named_array_element<T,2>
{
__AGENCY_ANNOTATION
named_array_element() = default;

__AGENCY_ANNOTATION
named_array_element(const named_array_element&) = default;

__AGENCY_ANNOTATION
Expand All @@ -64,10 +58,8 @@ struct named_array_element<T,2>
template<class T>
struct named_array_element<T,3>
{
__AGENCY_ANNOTATION
named_array_element() = default;

__AGENCY_ANNOTATION
named_array_element(const named_array_element&) = default;

__AGENCY_ANNOTATION
Expand All @@ -83,10 +75,8 @@ struct named_array_base;
template<class T, size_t... Indices>
struct named_array_base<T, index_sequence<Indices...>> : named_array_element<T,Indices>...
{
__AGENCY_ANNOTATION
named_array_base() = default;

__AGENCY_ANNOTATION
named_array_base(const named_array_base&) = default;

__AGENCY_ANNOTATION
Expand All @@ -112,10 +102,8 @@ struct named_array : named_array_base<T,make_index_sequence<N>>
using iterator = pointer;
using const_iterator = const_pointer;

__AGENCY_ANNOTATION
named_array() = default;

__AGENCY_ANNOTATION
named_array(const named_array&) = default;

__AGENCY_ANNOTATION
Expand Down
2 changes: 0 additions & 2 deletions agency/coordinate/lattice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@ class lattice
using index_type = decltype(value_type{} - value_type{});

// XXX should create a grid empty of points
__AGENCY_ANNOTATION
lattice() = default;

// copy from
__AGENCY_ANNOTATION
lattice(const lattice&) = default;

// creates a new lattice with min as the first lattice point
Expand Down
2 changes: 0 additions & 2 deletions agency/coordinate/point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@ class point : public agency::detail::point_base_t<T,Rank>,
using typename super_t::const_pointer;


__AGENCY_ANNOTATION
point() = default;


__AGENCY_ANNOTATION
point(const point &) = default;


Expand Down
1 change: 0 additions & 1 deletion agency/cuda/detail/future/async_future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class async_future
detail::asynchronous_state<T> state_;

public:
__host__ __device__
async_future() = default;

__host__ __device__
Expand Down
9 changes: 0 additions & 9 deletions agency/cuda/detail/future/deferred_future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,10 @@ class deferred_function<Result(Args...)>
}

public:
__AGENCY_ANNOTATION
deferred_function() = default;

__AGENCY_ANNOTATION
deferred_function(deferred_function&& other) = default;

__AGENCY_ANNOTATION
deferred_function& operator=(deferred_function&& other) = default;

template<class Function>
Expand Down Expand Up @@ -452,10 +449,8 @@ class deferred_state
}

public:
__AGENCY_ANNOTATION
deferred_state() = default;

__AGENCY_ANNOTATION
deferred_state(deferred_state&&) = default;

template<class U,
Expand Down Expand Up @@ -496,7 +491,6 @@ class deferred_state
{
}

__AGENCY_ANNOTATION
deferred_state& operator=(deferred_state&& other) = default;

__AGENCY_ANNOTATION
Expand Down Expand Up @@ -619,13 +613,10 @@ template<class T>
class deferred_future
{
public:
__AGENCY_ANNOTATION
deferred_future() = default;

__AGENCY_ANNOTATION
deferred_future(deferred_future&&) = default;

__AGENCY_ANNOTATION
deferred_future& operator=(deferred_future&& other) = default;

template<class U,
Expand Down
3 changes: 0 additions & 3 deletions agency/cuda/detail/future/future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ class future
using variant_type = agency::experimental::variant<agency::cuda::async_future<T>, agency::cuda::deferred_future<T>, agency::always_ready_future<T>>;

public:
__AGENCY_ANNOTATION
future() = default;

__AGENCY_ANNOTATION
future(future&&) = default;

template<class Future,
Expand Down Expand Up @@ -87,7 +85,6 @@ class future
: future(converting_move_construct(std::move(other)))
{}

__AGENCY_ANNOTATION
future& operator=(future&& other) = default;

shared_future<T> share();
Expand Down
6 changes: 6 additions & 0 deletions agency/cuda/detail/future/shared_future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,26 @@ class shared_future
friend agency::cuda::future<U>& detail::underlying_future(shared_future<U>& future);

public:
__agency_exec_check_disable__
shared_future() = default;

__agency_exec_check_disable__
shared_future(const shared_future&) = default;

shared_future(agency::cuda::future<T>&& other)
: underlying_future_(std::make_shared<agency::cuda::future<T>>(std::move(other)))
{}

__agency_exec_check_disable__
shared_future(shared_future&& other) = default;

__agency_exec_check_disable__
~shared_future() = default;

__agency_exec_check_disable__
shared_future& operator=(const shared_future& other) = default;

__agency_exec_check_disable__
shared_future& operator=(shared_future&& other) = default;

bool valid() const
Expand Down
2 changes: 0 additions & 2 deletions agency/cuda/memory/allocator/heterogeneous_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ class heterogeneous_allocator : public agency::detail::allocator_adaptor<T,heter
using super_t = agency::detail::allocator_adaptor<T,heterogeneous_resource<HostResource,DeviceResource>>;

public:
__host__ __device__
heterogeneous_allocator() = default;

__host__ __device__
heterogeneous_allocator(const heterogeneous_allocator&) = default;

template<class U>
Expand Down
7 changes: 0 additions & 7 deletions agency/detail/asynchronous_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class asynchronous_state
using pointer = typename storage_type::pointer;

// constructs an invalid state
__AGENCY_ANNOTATION
asynchronous_state() = default;

// constructs an immediately ready state
Expand Down Expand Up @@ -100,7 +99,6 @@ class asynchronous_state
: asynchronous_state(construct_ready, allocator, T{})
{}

__AGENCY_ANNOTATION
asynchronous_state(asynchronous_state&& other) = default;

template<class OtherT,
Expand All @@ -114,7 +112,6 @@ class asynchronous_state
: storage_(std::move(other.storage_))
{}

__AGENCY_ANNOTATION
asynchronous_state& operator=(asynchronous_state&&) = default;

__AGENCY_ANNOTATION
Expand Down Expand Up @@ -165,10 +162,8 @@ struct empty_type_ptr
{
using element_type = T;

__AGENCY_ANNOTATION
empty_type_ptr() = default;

__AGENCY_ANNOTATION
empty_type_ptr(const empty_type_ptr&) = default;

template<class U,
Expand Down Expand Up @@ -207,10 +202,8 @@ struct empty_type_ptr
template<>
struct empty_type_ptr<void> : unit_ptr
{
__AGENCY_ANNOTATION
empty_type_ptr() = default;

__AGENCY_ANNOTATION
empty_type_ptr(const empty_type_ptr&) = default;

// allow copy construction from empty_type_ptr<T>
Expand Down
1 change: 0 additions & 1 deletion agency/detail/factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ template<class T>
class moving_factory
{
public:
__AGENCY_ANNOTATION
moving_factory(moving_factory&& other) = default;

// this constructor moves other's value into value_
Expand Down
2 changes: 0 additions & 2 deletions agency/detail/iterator/constant_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ class constant_iterator
using difference_type = std::ptrdiff_t;
using iterator_category = std::random_access_iterator_tag;

__AGENCY_ANNOTATION
constant_iterator() = default;

__AGENCY_ANNOTATION
constant_iterator(const constant_iterator&) = default;

__AGENCY_ANNOTATION
Expand Down
1 change: 0 additions & 1 deletion agency/detail/iterator/forwarding_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class forwarding_iterator
using difference_type = typename std::iterator_traits<Iterator>::difference_type;
using iterator_category = typename std::iterator_traits<Iterator>::iterator_category;

__AGENCY_ANNOTATION
forwarding_iterator() = default;

__AGENCY_ANNOTATION
Expand Down
1 change: 0 additions & 1 deletion agency/detail/iterator/reverse_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class reverse_iterator

using iterator_type = Iterator;

__AGENCY_ANNOTATION
reverse_iterator() = default;

__AGENCY_ANNOTATION
Expand Down
1 change: 0 additions & 1 deletion agency/detail/tuple/tuple_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class tuple_base<index_sequence<I...>, Types...>
: public tuple_leaf<I,Types>...
{
public:
__AGENCY_ANNOTATION
tuple_base() = default;


Expand Down
4 changes: 0 additions & 4 deletions agency/detail/tuple/tuple_leaf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class tuple_leaf_base
{
public:
__agency_exec_check_disable__
__AGENCY_ANNOTATION
tuple_leaf_base() = default;

__agency_exec_check_disable__
Expand All @@ -65,7 +64,6 @@ class tuple_leaf_base
tuple_leaf_base(U&& arg) : val_(std::forward<U>(arg)) {}

__agency_exec_check_disable__
__AGENCY_ANNOTATION
~tuple_leaf_base() = default;

__AGENCY_ANNOTATION
Expand All @@ -89,7 +87,6 @@ template<class T>
class tuple_leaf_base<T,true> : public T
{
public:
__AGENCY_ANNOTATION
tuple_leaf_base() = default;

template<class U>
Expand Down Expand Up @@ -118,7 +115,6 @@ class tuple_leaf : public tuple_leaf_base<T>


public:
__AGENCY_ANNOTATION
tuple_leaf() = default;


Expand Down
6 changes: 0 additions & 6 deletions agency/detail/unique_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ class unique_function<Result(Args...)>
public:
using result_type = Result;

__AGENCY_ANNOTATION
unique_function() = default;

__AGENCY_ANNOTATION
unique_function(std::nullptr_t)
: f_ptr_(nullptr)
{}

__AGENCY_ANNOTATION
unique_function(unique_function&& other) = default;

template<class Function>
Expand Down Expand Up @@ -94,7 +92,6 @@ class unique_function<Result(Args...)>
: f_ptr_(allocate_function_pointer(alloc, std::forward<Function>(f)))
{}

__AGENCY_ANNOTATION
unique_function& operator=(unique_function&& other) = default;

__AGENCY_ANNOTATION
Expand Down Expand Up @@ -150,7 +147,6 @@ class unique_function<Result(Args...)>
mutable Function f_;

__agency_exec_check_disable__
__AGENCY_ANNOTATION
~callable() = default;

__agency_exec_check_disable__
Expand Down Expand Up @@ -213,10 +209,8 @@ class unique_function<Result(Args...)>
{
using value_type = T;

__AGENCY_ANNOTATION
default_allocator() = default;

__AGENCY_ANNOTATION
default_allocator(const default_allocator&) = default;

template<class U>
Expand Down
Loading

0 comments on commit 25611b0

Please sign in to comment.