本文整理汇总了C++中hpx::init方法的典型用法代码示例。如果您正苦于以下问题:C++ hpx::init方法的具体用法?C++ hpx::init怎么用?C++ hpx::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hpx
的用法示例。
在下文中一共展示了hpx::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(
int argc
, char* argv[]
)
{
// Configure application-specific options.
options_description cmdline("usage: " HPX_APPLICATION_STRING " [options]");
cmdline.add_options()
( "delay"
, value<boost::uint64_t>()->default_value(1000)
, "number of milliseconds to wait for object destruction")
;
// We need to explicitly enable the test components used by this test.
using namespace boost::assign;
std::vector<std::string> cfg;
cfg += "hpx.components.simple_refcnt_checker.enabled! = 1";
cfg += "hpx.components.managed_refcnt_checker.enabled! = 1";
// Initialize and run HPX.
return init(cmdline, argc, argv, cfg);
}
示例2: main
int main(
int argc
, char* argv[]
)
{
// Configure application-specific options.
options_description cmdline("usage: " HPX_APPLICATION_STRING " [options]");
cmdline.add_options()
( "tasks"
, value<boost::uint64_t>(&tasks)->default_value(500000)
, "number of tasks to invoke")
( "min-delay"
, value<boost::uint64_t>(&min_delay)->default_value(0)
, "minimum number of iterations in the delay loop")
( "max-delay"
, value<boost::uint64_t>(&max_delay)->default_value(0)
, "maximum number of iterations in the delay loop")
( "total-delay"
, value<boost::uint64_t>(&total_delay)->default_value(0)
, "total number of delay iterations to be executed")
( "seed"
, value<boost::uint64_t>(&seed)->default_value(0)
, "seed for the pseudo random number generator (if 0, a seed is "
"choosen based on the current system time)")
( "no-header"
, "do not print out the csv header row")
;
// Initialize and run HPX.
return init(cmdline, argc, argv);
}
示例3: main
int main(
int argc
, char* argv[]
)
{
// Configure application-specific options.
options_description cmdline("usage: " HPX_APPLICATION_STRING " [options]");
cmdline.add_options()
( "tasks"
, value<boost::uint64_t>(&tasks)->default_value(500000)
, "number of tasks to invoke")
( "delay"
, value<boost::uint64_t>(&delay)->default_value(0)
, "number of iterations in the delay loop")
( "no-header"
, "do not print out the csv header row")
;
// Initialize and run HPX.
return init(cmdline, argc, argv);
}
示例4: main
int main(int argc, char* argv[])
{
// Configure application-specific options.
options_description
desc_commandline("Usage: " HPX_APPLICATION_STRING " [options]");
desc_commandline.add_options()
( "size,S"
, value<unsigned int>()->default_value(2048)
, "the height of the NxN+1 matrix generated")
( "blocksize,B"
, value<unsigned int>()->default_value(256)
, "the amount of work performed by each pxthread during gaussian "
"elimination")
( "allocblock,A"
, value<unsigned int>()->default_value(512)
, "amount of work each thread performs during memory allocation "
"(must be a power of 2)")
;
// Initialize and run HPX.
return init(desc_commandline, argc, argv);
}
示例5: main
int main(
int argc
, char* argv[]
)
{
// Configure application-specific options.
options_description cmdline("usage: " HPX_APPLICATION_STRING " [options]");
cmdline.add_options()
( "futures"
, value<std::uint64_t>()->default_value(500000)
, "number of futures to invoke")
( "delay-iterations"
, value<std::uint64_t>()->default_value(0)
, "number of iterations in the delay loop")
( "csv"
, "output results as csv (format: count,duration)")
;
// Initialize and run HPX.
return init(cmdline, argc, argv);
}