hpx/hpx_init_impl.hpp
hpx/hpx_init_impl.hpp#
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
Functions
-
inline int init(std::function<int(hpx::program_options::variables_map&)> f, int argc, char **argv, init_params const ¶ms = init_params())#
Main entry point for launching the HPX runtime system.
This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread. This overload will not callhpx_main
.This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread.Note
If the parameter
mode
is not given (defaulted), the created runtime system instance will be executed in console or worker mode depending on the command line arguments passed inargc
/argv
. Otherwise it will be executed as specified by the parametermode
.- Parameters
f – [in] The function to be scheduled as an HPX thread. Usually this function represents the main entry point of any HPX application. If
f
isnullptr
the HPX runtime environment will be started without invokingf
.argc – [in] The number of command line arguments passed in
argv
. This is usually the unchanged value as passed by the operating system (tomain()
).argv – [in] The command line arguments for this application, usually that is the value as passed by the operating system (to
main()
).params – [in] The parameters to the hpx::init function (See documentation of hpx::init_params)
- Returns
The function returns the value, which has been returned from the user supplied
f
.
-
inline int init(std::function<int(int, char**)> f, int argc, char **argv, init_params const ¶ms = init_params())#
Main entry point for launching the HPX runtime system.
This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread. This overload will not callhpx_main
.This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread.Note
If the parameter
mode
is not given (defaulted), the created runtime system instance will be executed in console or worker mode depending on the command line arguments passed inargc
/argv
. Otherwise it will be executed as specified by the parametermode
.- Parameters
f – [in] The function to be scheduled as an HPX thread. Usually this function represents the main entry point of any HPX application. If
f
isnullptr
the HPX runtime environment will be started without invokingf
.argc – [in] The number of command line arguments passed in
argv
. This is usually the unchanged value as passed by the operating system (tomain()
).argv – [in] The command line arguments for this application, usually that is the value as passed by the operating system (to
main()
).params – [in] The parameters to the hpx::init function (See documentation of hpx::init_params)
- Returns
The function returns the value, which has been returned from the user supplied
f
.
-
inline int init(int argc, char **argv, init_params const ¶ms = init_params())#
Main entry point for launching the HPX runtime system.
This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread. This overload will not callhpx_main
.This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread.Note
If the parameter
mode
is not given (defaulted), the created runtime system instance will be executed in console or worker mode depending on the command line arguments passed inargc
/argv
. Otherwise it will be executed as specified by the parametermode
.- Parameters
argc – [in] The number of command line arguments passed in
argv
. This is usually the unchanged value as passed by the operating system (tomain()
).argv – [in] The command line arguments for this application, usually that is the value as passed by the operating system (to
main()
).params – [in] The parameters to the hpx::init function (See documentation of hpx::init_params)
- Returns
The function returns the value, which has been returned from the user supplied
f
.
-
inline int init(std::nullptr_t f, int argc, char **argv, init_params const ¶ms = init_params())#
Main entry point for launching the HPX runtime system.
This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread. This overload will not callhpx_main
.This is the main entry point for any HPX application. This function (or one of its overloads below) should be called from the users
main()
function. It will set up the HPX runtime environment and schedule the function given byf
as a HPX thread.Note
If the parameter
mode
is not given (defaulted), the created runtime system instance will be executed in console or worker mode depending on the command line arguments passed inargc
/argv
. Otherwise it will be executed as specified by the parametermode
.- Parameters
f – [in] The function to be scheduled as an HPX thread. Usually this function represents the main entry point of any HPX application. If
f
isnullptr
the HPX runtime environment will be started without invokingf
.argc – [in] The number of command line arguments passed in
argv
. This is usually the unchanged value as passed by the operating system (tomain()
).argv – [in] The command line arguments for this application, usually that is the value as passed by the operating system (to
main()
).params – [in] The parameters to the hpx::init function (See documentation of hpx::init_params)
- Returns
The function returns the value, which has been returned from the user supplied
f
.
-
inline int init(init_params const ¶ms = init_params())#
Main entry point for launching the HPX runtime system.
This is a simplified main entry point, which can be used to set up the runtime for an HPX application (the runtime system will be set up in console mode or worker mode depending on the command line settings).
This is a simplified main entry point, which can be used to set up the runtime for an HPX application (the runtime system will be set up in console mode or worker mode depending on the command line settings).
Note
The created runtime system instance will be executed in console or worker mode depending on the command line arguments passed in
argc
/argv
. If not command line arguments are passed, console mode is assumed.Note
If no command line arguments are passed the HPX runtime system will not support any of the default command line options as described in the section ‘HPX Command Line Options’.
- Parameters
params – [in] The parameters to the hpx::init function (See documentation of hpx::init_params)
- Returns
The function returns the value, which has been returned from
hpx_main
(or 0 when executed in worker mode).
-
inline int init(std::function<int(hpx::program_options::variables_map&)> f, int argc, char **argv, init_params const ¶ms = init_params())#