Skip to content

Commit

Permalink
Fixing usage of HPX_HAVE_ITTNOTIFY
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Feb 4, 2017
1 parent 3bf35c4 commit a6084a8
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions hpx/runtime/actions/action_support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <hpx/traits/is_bitwise_serializable.hpp>
#include <hpx/util/detail/count_num_args.hpp>
#include <hpx/util/tuple.hpp>
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#include <hpx/util/itt_notify.hpp>
#endif

Expand Down Expand Up @@ -145,7 +145,7 @@ namespace hpx { namespace actions
}
#endif

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
template <typename Action>
util::itt::string_handle const& get_action_name_itt()
#ifndef HPX_HAVE_AUTOMATIC_SERIALIZATION_REGISTRATION
Expand Down
4 changes: 2 additions & 2 deletions hpx/runtime/actions/base_action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <hpx/runtime/threads/thread_data_fwd.hpp>
#include <hpx/runtime/threads/thread_enums.hpp>
#include <hpx/traits/polymorphic_traits.hpp>
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#include <hpx/util/itt_notify.hpp>
#endif

Expand Down Expand Up @@ -127,7 +127,7 @@ namespace hpx { namespace actions
naming::gid_type&& target, naming::address_type lva,
std::size_t num_thread) = 0;

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
/// The function \a get_action_name_itt returns the name of this action
/// as a ITT string_handle
virtual util::itt::string_handle const& get_action_name_itt() const = 0;
Expand Down
6 changes: 3 additions & 3 deletions hpx/runtime/actions/basic_action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <hpx/util/logging.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/void_guard.hpp>
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#include <hpx/util/itt_notify.hpp>
#endif

Expand Down Expand Up @@ -836,7 +836,7 @@ namespace hpx { namespace serialization
#define HPX_DEFINE_GET_ACTION_NAME(action) \
HPX_DEFINE_GET_ACTION_NAME_(action, action) \
/**/
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#define HPX_DEFINE_GET_ACTION_NAME_ITT(action, actionname) \
namespace hpx { namespace actions { namespace detail { \
template<> HPX_ALWAYS_EXPORT \
Expand Down Expand Up @@ -893,7 +893,7 @@ namespace hpx { namespace serialization
#endif

///////////////////////////////////////////////////////////////////////////////
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#define HPX_REGISTER_ACTION_DECLARATION_NO_DEFAULT_GUID_ITT(action) \
namespace hpx { namespace actions { namespace detail { \
template <> HPX_ALWAYS_EXPORT \
Expand Down
4 changes: 2 additions & 2 deletions hpx/runtime/actions/basic_action_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define HPX_RUNTIME_ACTIONS_BASIC_ACTION_FWD_HPP

#include <hpx/config.hpp>
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#include <hpx/util/itt_notify.hpp>
#endif

Expand All @@ -28,7 +28,7 @@ namespace hpx { namespace actions
template <typename Action>
char const* get_action_name();

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
template <typename Action>
util::itt::string_handle const& get_action_name_itt();
#endif
Expand Down
2 changes: 1 addition & 1 deletion hpx/runtime/actions/transfer_base_action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace hpx { namespace actions
return detail::get_action_name<derived_type>();
}

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
/// The function \a get_action_name_itt returns the name of this action
/// as a ITT string_handle
util::itt::string_handle const& get_action_name_itt() const
Expand Down
4 changes: 2 additions & 2 deletions hpx/runtime/applier/apply_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace hpx { namespace applier { namespace detail
data.lva = lva;
#endif
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
data.description = util::thread_description(
actions::detail::get_action_name<Action>(),
actions::detail::get_action_name_itt<Action>());
Expand Down Expand Up @@ -113,7 +113,7 @@ namespace hpx { namespace applier { namespace detail
data.lva = lva;
#endif
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
data.description = util::thread_description(
actions::detail::get_action_name<Action>(),
actions::detail::get_action_name_itt<Action>());
Expand Down
2 changes: 1 addition & 1 deletion hpx/runtime/threads/detail/scheduling_loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ namespace hpx { namespace threads { namespace detail
// store the returned state in the thread
{
is_active_wrapper utilization(counters.is_active_);
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
util::itt::caller_context cctx(ctx);
// util::itt::undo_frame_context undoframe(fctx);
util::itt::task task(domain, thrd->get_description());
Expand Down
12 changes: 6 additions & 6 deletions hpx/util/thread_description.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <hpx/traits/get_function_address.hpp>
#include <hpx/traits/is_action.hpp>
#include <hpx/util/assert.hpp>
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
#include <hpx/util/itt_notify.hpp>
#endif

Expand Down Expand Up @@ -44,7 +44,7 @@ namespace hpx { namespace util

data_type type_;
data data_;
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
util::itt::string_handle desc_itt_;
#endif

Expand All @@ -63,7 +63,7 @@ namespace hpx { namespace util
data_.desc_ = desc;
}

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
thread_description(char const* desc,
util::itt::string_handle const& sh) HPX_NOEXCEPT
: type_(data_type_description)
Expand Down Expand Up @@ -99,7 +99,7 @@ namespace hpx { namespace util
: type_(data_type_description)
{
data_.desc_ = hpx::actions::detail::get_action_name<Action>();
#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
desc_itt_ = hpx::actions::detail::get_action_name_itt<Action>();
#endif
}
Expand All @@ -115,7 +115,7 @@ namespace hpx { namespace util
return data_.desc_;
}

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
util::itt::string_handle get_description_itt() const HPX_NOEXCEPT
{
HPX_ASSERT(type_ == data_type_description);
Expand Down Expand Up @@ -197,7 +197,7 @@ namespace hpx { namespace util
return "<unknown>";
}

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
util::itt::string_handle get_description_itt() const HPX_NOEXCEPT
{
HPX_ASSERT(type_ == data_type_description);
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/parcelset/parcel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ namespace hpx { namespace parcelset
// continuation support, this is handled in the transfer action
action_->load_schedule(ar, std::move(data_.dest_), lva, num_thread);

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
static util::itt::event parcel_recv("recv_parcel");
util::itt::event_tick(parcel_recv);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/parcelset/parcelhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ namespace hpx { namespace parcelset
// invoke the original handler
f(ec, p);

#if defined(HPX_HAVE_ITTNOTIFY) && !defined(HPX_HAVE_APEX)
#if HPX_HAVE_ITTNOTIFY != 0 && !defined(HPX_HAVE_APEX)
static util::itt::event parcel_send("send_parcel");
util::itt::event_tick(parcel_send);
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/util/runtime_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ namespace hpx { namespace util
pre_initialize_ini();

// set global config options
#ifdef HPX_HAVE_ITTNOTIFY
#if HPX_HAVE_ITTNOTIFY != 0
use_ittnotify_api = get_itt_notify_mode();
#endif
HPX_ASSERT(init_small_stack_size() >= HPX_SMALL_STACK_SIZE);
Expand Down Expand Up @@ -519,7 +519,7 @@ namespace hpx { namespace util
post_initialize_ini(hpx_ini_file, cmdline_ini_defs);

// set global config options
#ifdef HPX_HAVE_ITTNOTIFY
#if HPX_HAVE_ITTNOTIFY != 0
use_ittnotify_api = get_itt_notify_mode();
#endif
HPX_ASSERT(init_small_stack_size() >= HPX_SMALL_STACK_SIZE);
Expand Down

0 comments on commit a6084a8

Please sign in to comment.