示例#1
0
    std::string as_string(thread_description const& desc)
    {
        if (desc.kind() == util::thread_description::data_type_description)
            return desc ? desc.get_description() : "<unknown>";

        std::stringstream strm;
        strm << "address: 0x" << std::hex
             << util::safe_lexical_cast<std::string>(
                    desc.get_address());
        return strm.str();
    }
示例#2
0
    std::string as_string(thread_description const& desc)
    {
#if defined(HPX_HAVE_THREAD_DESCRIPTION)
        if (desc.kind() == util::thread_description::data_type_description)
            return desc ? desc.get_description() : "<unknown>";

        std::stringstream strm;
        strm << "address: 0x" << std::hex
             << util::safe_lexical_cast<std::string>(desc.get_address());
        return strm.str();
#else
        return "<unknown>";
#endif
    }
示例#3
0
文件: apex.cpp 项目: hapoo/hpx
 apex_task_wrapper apex_new_task(
        thread_description const& description,
        std::uint32_t parent_locality_id,
        threads::thread_id_type const& parent_task)
 {
     //static std::uint32_t num_localities = find_all_localities().size();
     apex_task_wrapper parent_wrapper = nullptr;
     // Parent pointers aren't reliable in distributed runs.
     if (parent_task != nullptr &&
         parent_locality_id == hpx::get_locality_id()) {
         parent_wrapper = parent_task.get()->get_apex_data();
     }
     if (description.kind() ==
             thread_description::data_type_description) {
         return apex::new_task(description.get_description(),
             UINTMAX_MAX, parent_wrapper);
     } else {
         return apex::new_task(description.get_address(),
             UINTMAX_MAX, parent_wrapper);
     }
 }