本文整理汇总了C++中HPX_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ HPX_ASSERT函数的具体用法?C++ HPX_ASSERT怎么用?C++ HPX_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HPX_ASSERT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: query_sync
/// Query the current value of the accumulator.
///
/// \note This function is fully synchronous.
double query_sync()
{
HPX_ASSERT(this->get_id());
return query_async().get();
}
开发者ID:7ev3n,项目名称:hpx,代码行数:9,代码来源:template_function_accumulator.hpp
示例2: save
void save(bool b)
{
HPX_ASSERT(0 == static_cast<int>(b) || 1 == static_cast<int>(b));
save_binary(&b, sizeof(bool));
}
开发者ID:akemp,项目名称:hpx,代码行数:5,代码来源:output_archive.hpp
示例3: empty
bool empty() const
{
HPX_ASSERT(messages_.size() == handlers_.size());
return messages_.empty();
}
开发者ID:41i,项目名称:hpx,代码行数:5,代码来源:message_buffer.hpp
示例4: get_or_create_thread_tss_data
tss_storage* get_or_create_thread_tss_data()
{
HPX_ASSERT(m_pimpl);
return m_pimpl->get_thread_tss_data(true);
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
示例5: get
Impl & get()
{
HPX_ASSERT(Impl::get_type() == get_type());
return static_cast<impl<Impl>*>(this)->impl_;
}
开发者ID:ddemidov,项目名称:hpx,代码行数:5,代码来源:locality.hpp
示例6: get_thread_id
thread_id_repr_type get_thread_id() const
{
HPX_ASSERT(m_pimpl);
return m_pimpl->get_thread_id();
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
示例7: set_thread_data
std::size_t set_thread_data(std::size_t data)
{
HPX_ASSERT(m_pimpl);
return m_pimpl->set_thread_data(data);
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
示例8: HPX_ASSERT
jacobi::row stencil_iterator::get(std::size_t idx)
{
HPX_ASSERT(rows[idx].id);
return rows[idx];
}
开发者ID:AntonBikineev,项目名称:hpx,代码行数:5,代码来源:stencil_iterator.cpp
示例9: HPX_ASSERT
double operator[](std::size_t i) const
{
HPX_ASSERT(data_);
return data_[i];
}
开发者ID:ltroska,项目名称:hpx,代码行数:5,代码来源:transpose_block.cpp
示例10: HPX_ASSERT
~memory_block_header()
{
// invoke destructor, if needed
HPX_ASSERT(this->managing_object_.destruct());
this->managing_object_.destruct()(this->get_ptr());
}
开发者ID:AntonBikineev,项目名称:hpx,代码行数:6,代码来源:memory_block.hpp
示例11: set_parcelhandler
void set_parcelhandler(parcelhandler* ph)
{
HPX_ASSERT(ph_ == 0);
ph_ = ph;
}
开发者ID:41i,项目名称:hpx,代码行数:5,代码来源:global_parcelhandler_queue.hpp
示例12: ConvertFiberToThread
~prepare_main_thread() noexcept
{
BOOL result = ConvertFiberToThread();
HPX_ASSERT(FALSE != result);
HPX_UNUSED(result);
}
开发者ID:K-ballo,项目名称:hpx,代码行数:6,代码来源:context_windows_fibers.hpp
示例13: prepare_main_thread
prepare_main_thread() noexcept
{
LPVOID result = ConvertThreadToFiber(nullptr);
HPX_ASSERT(nullptr != result);
HPX_UNUSED(result);
}
开发者ID:K-ballo,项目名称:hpx,代码行数:6,代码来源:context_windows_fibers.hpp
示例14: trampoline
HPX_FORCEINLINE VOID CALLBACK trampoline(LPVOID pv)
{
T* fun = static_cast<T*>(pv);
HPX_ASSERT(fun);
(*fun)();
}
开发者ID:K-ballo,项目名称:hpx,代码行数:6,代码来源:context_windows_fibers.hpp
示例15: HPX_ASSERT
hpx::state thread_pool<Scheduler>::get_state(std::size_t num_thread) const
{
HPX_ASSERT(num_thread != std::size_t(-1));
return sched_.get_state(num_thread).load();
}
开发者ID:wzugang,项目名称:hpx,代码行数:5,代码来源:thread_pool.cpp
示例16: pending
bool pending() const
{
HPX_ASSERT(m_pimpl);
return m_pimpl->pending();
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
示例17: test
bool test(std::size_t position) const
{
HPX_ASSERT(position < security::traits::capability<>::size);
return (bits_[position / CHAR_BIT] & (1ull << (position % CHAR_BIT))) != 0;
}
开发者ID:devangb,项目名称:hpx,代码行数:6,代码来源:capability.hpp
示例18: get_thread_data
std::size_t get_thread_data() const
{
HPX_ASSERT(m_pimpl);
return m_pimpl->get_thread_data();
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
示例19: defined
// schedule threads based on given parcel
void applier::schedule_action(parcelset::parcel p, std::size_t num_thread)
{
// fetch the set of destinations
#if !defined(HPX_SUPPORT_MULTIPLE_PARCEL_DESTINATIONS)
std::size_t const size = 1ul;
#else
std::size_t const size = p.size();
#endif
naming::id_type const* ids = p.destinations();
naming::address const* addrs = p.addrs();
// decode the action-type in the parcel
std::unique_ptr<actions::continuation> cont = p.get_continuation();
actions::base_action * act = p.get_action();
#if defined(HPX_HAVE_SECURITY)
// we look up the certificate of the originating locality, no matter
// whether this parcel was routed through another locality or not
boost::uint32_t locality_id =
naming::get_locality_id_from_gid(p.get_parcel_id());
error_code ec(lightweight);
components::security::signed_certificate const& cert =
get_locality_certificate(locality_id, ec);
if (verify_capabilities_ && ec) {
// we should have received the sender's certificate by now
HPX_THROW_EXCEPTION(security_error,
"applier::schedule_action",
boost::str(boost::format("couldn't extract sender's "
"certificate (sender locality id: %1%)") % locality_id));
return;
}
components::security::capability caps_sender;
if (verify_capabilities_)
caps_sender = cert.get_type().get_capability();
#endif
int comptype = act->get_component_type();
naming::gid_type dest = p.destination_locality();
// if the parcel carries a continuation it should be directed to a
// single destination
HPX_ASSERT(!cont || size == 1);
naming::resolver_client& client = hpx::naming::get_agas_client();
// schedule a thread for each of the destinations
for (std::size_t i = 0; i != size; ++i)
{
naming::address const& addr = addrs[i];
// make sure this parcel destination matches the proper locality
HPX_ASSERT(dest == addr.locality_);
// decode the local virtual address of the parcel
naming::address::address_type lva = addr.address_;
// by convention, a zero address references either the local
// runtime support component or one of the AGAS components
if (0 == lva)
{
switch(comptype)
{
case components::component_runtime_support:
lva = get_runtime_support_raw_gid().get_lsb();
break;
case components::component_agas_primary_namespace:
lva = get_agas_client().get_primary_ns_lva();
break;
case components::component_agas_symbol_namespace:
lva = get_agas_client().get_symbol_ns_lva();
break;
case components::component_plain_function:
break;
default:
HPX_ASSERT(false);
}
}
else if (comptype == components::component_memory)
{
HPX_ASSERT(naming::refers_to_virtual_memory(ids[i].get_gid()));
lva = get_memory_raw_gid().get_lsb();
}
// make sure the target has not been migrated away
auto r = act->was_object_migrated(ids[i], lva);
if (r.first)
{
#if defined(HPX_SUPPORT_MULTIPLE_PARCEL_DESTINATIONS)
// it's unclear at this point what could be done if there is
// more than one destination
HPX_ASSERT(size == 1);
#endif
// set continuation in outgoing parcel
if (cont)
//.........这里部分代码省略.........
开发者ID:parsa,项目名称:hpx,代码行数:101,代码来源:applier.cpp
示例20: get_thread_tss_data
tss_storage* get_thread_tss_data()
{
HPX_ASSERT(m_pimpl);
return m_pimpl->get_thread_tss_data(false);
}
开发者ID:dmarce1,项目名称:hpx,代码行数:5,代码来源:self.hpp
注:本文中的HPX_ASSERT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论