Skip to content

Commit

Permalink
Merge pull request #2888 from STEllAR-GROUP/fixing_2881
Browse files Browse the repository at this point in the history
Fix compilation problems if HPX_WITH_ITT_NOTIFY=ON
  • Loading branch information
hkaiser committed Sep 7, 2017
2 parents 3542836 + 942580c commit 60a0111
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion hpx/lcos/detail/future_data.hpp
Expand Up @@ -1182,7 +1182,7 @@ namespace hpx { namespace traits
template <typename F1, typename F2>
struct get_function_annotation_itt<lcos::detail::compose_cb_impl<F1, F2> >
{
static char const*
static util::itt::string_handle
call(lcos::detail::compose_cb_impl<F1, F2> const& f) noexcept
{
return get_function_annotation_itt<F1>::call(f.f1_);
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/algorithms/for_each.hpp
Expand Up @@ -565,7 +565,7 @@ namespace hpx { namespace traits
struct get_function_annotation_itt<
parallel::v1::detail::for_each_iteration<ExPolicy, F, Proj> >
{
static char const* call(
static util::itt::string_handle call(
parallel::v1::detail::for_each_iteration<ExPolicy, F, Proj> const& f)
noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/algorithms/for_loop.hpp
Expand Up @@ -1172,7 +1172,7 @@ namespace hpx { namespace traits
struct get_function_annotation_itt<
parallel::v2::detail::part_iterations<F, S, Tuple> >
{
static char const* call(
static util::itt::string_handle call(
parallel::v2::detail::part_iterations<F, S, Tuple> const& f)
noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/algorithms/transform.hpp
Expand Up @@ -965,7 +965,7 @@ namespace hpx { namespace traits
struct get_function_annotation_itt<
parallel::v1::detail::transform_iteration<ExPolicy, F, Proj> >
{
static char const* call(
static util::itt::string_handle call(
parallel::v1::detail::transform_iteration<ExPolicy, F, Proj> const& f)
noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/util/detail/partitioner_iteration.hpp
Expand Up @@ -87,7 +87,7 @@ namespace hpx { namespace traits
struct get_function_annotation_itt<
parallel::util::detail::partitioner_iteration<Result, F> >
{
static char const* call(
static util::itt::string_handle call(
parallel::util::detail::partitioner_iteration<Result, F> const& f)
noexcept
{
Expand Down
14 changes: 8 additions & 6 deletions hpx/util/bind.hpp
Expand Up @@ -337,14 +337,15 @@ namespace hpx { namespace util
}

#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
char const* get_function_annotation_itt() const
util::itt::string_handle get_function_annotation_itt() const
{
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
return traits::get_function_annotation_itt<
typename std::decay<F>::type
>::call(_f);
#else
return nullptr;
static util::itt::string_handle sh("bound");
return sh;
#endif
}
#endif
Expand Down Expand Up @@ -452,12 +453,13 @@ namespace hpx { namespace util
}

#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
char const* get_function_annotation_itt() const
util::itt::string_handle get_function_annotation_itt() const
{
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
return traits::get_function_annotation_itt<F>::call(_f);
#else
return nullptr;
static util::itt::string_handle sh("one_shot_wrapper");
return sh;
#endif
}
#endif
Expand Down Expand Up @@ -544,7 +546,7 @@ namespace hpx { namespace traits
template <typename Sig>
struct get_function_annotation_itt<util::detail::bound<Sig> >
{
static char const*
static util::itt::string_handle
call(util::detail::bound<Sig> const& f) noexcept
{
return f.get_function_annotation_itt();
Expand All @@ -554,7 +556,7 @@ namespace hpx { namespace traits
template <typename F>
struct get_function_annotation_itt<util::detail::one_shot_wrapper<F> >
{
static char const*
static util::itt::string_handle
call(util::detail::one_shot_wrapper<F> const& f) noexcept
{
return f.get_function_annotation_itt();
Expand Down
7 changes: 4 additions & 3 deletions hpx/util/deferred_call.hpp
Expand Up @@ -129,14 +129,15 @@ namespace hpx { namespace util
}

#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
char const* get_function_annotation_itt() const
util::itt::string_handle get_function_annotation_itt() const
{
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
return traits::get_function_annotation_itt<
typename util::decay_unwrap<F>::type
>::call(_f);
#else
return nullptr;
static util::itt::string_handle sh("deferred");
return sh;
#endif
}
#endif
Expand Down Expand Up @@ -202,7 +203,7 @@ namespace hpx { namespace traits
template <typename Sig>
struct get_function_annotation_itt<util::detail::deferred<Sig> >
{
static char const*
static util::itt::string_handle
call(util::detail::deferred<Sig> const& f) noexcept
{
return f.get_function_annotation_itt();
Expand Down
5 changes: 3 additions & 2 deletions hpx/util/detail/basic_function.hpp
Expand Up @@ -214,12 +214,13 @@ namespace hpx { namespace util { namespace detail
#endif
}

char const* get_function_annotation_itt() const
util::itt::string_handle get_function_annotation_itt() const
{
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
return vptr->get_function_annotation_itt(object);
#else
return nullptr;
static util::itt::string_handle sh;
return sh;
#endif
}

Expand Down
5 changes: 3 additions & 2 deletions hpx/util/detail/vtable/callable_vtable.hpp
Expand Up @@ -38,11 +38,12 @@ namespace hpx { namespace util { namespace detail

#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
template <typename T>
HPX_FORCEINLINE static char const* _get_function_annotation_itt(void** f)
HPX_FORCEINLINE static util::itt::string_handle
_get_function_annotation_itt(void** f)
{
return traits::get_function_annotation_itt<T>::call(vtable::get<T>(f));
}
char const* (*get_function_annotation_itt)(void**);
util::itt::string_handle (*get_function_annotation_itt)(void**);
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion hpx/util/function.hpp
Expand Up @@ -164,7 +164,7 @@ namespace hpx { namespace traits
template <typename Sig, bool Serializable>
struct get_function_annotation_itt<util::function<Sig, Serializable> >
{
static char const*
static util::itt::string_handle
call(util::function<Sig, Serializable> const& f) noexcept
{
return f.get_function_annotation_itt();
Expand Down
2 changes: 1 addition & 1 deletion hpx/util/itt_notify.hpp
Expand Up @@ -668,7 +668,7 @@ namespace hpx { namespace util { namespace itt
///////////////////////////////////////////////////////////////////////////
struct string_handle
{
string_handle(char const* s) {}
string_handle(char const* s = nullptr) {}
};

//////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion hpx/util/unique_function.hpp
Expand Up @@ -126,7 +126,7 @@ namespace hpx { namespace traits
template <typename Sig, bool Serializable>
struct get_function_annotation_itt<util::unique_function<Sig, Serializable> >
{
static char const*
static util::itt::string_handle
call(util::unique_function<Sig, Serializable> const& f) noexcept
{
return f.get_function_annotation_itt();
Expand Down

0 comments on commit 60a0111

Please sign in to comment.