hpx/hpx_start_impl.hpp#

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx_startup
namespace hpx

Functions

inline bool start(std::function<int(hpx::program_options::variables_map&)> f, int argc, char **argv, init_params const &params = init_params())#

Main non-blocking entry point for launching the HPX runtime system.

This is the main, non-blocking 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 by f as a HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution. This overload will not call hpx_main.

This is the main, non-blocking 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 by f as an HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

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 in argc/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 is nullptr the HPX runtime environment will be started without invoking f.

  • argc – [in] The number of command line arguments passed in argv. This is usually the unchanged value as passed by the operating system (to main()).

  • 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::start function (See documentation of hpx::init_params)

Returns

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.

inline bool start(std::function<int(int, char**)> f, int argc, char **argv, init_params const &params = init_params())#

Main non-blocking entry point for launching the HPX runtime system.

This is the main, non-blocking 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 by f as a HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution. This overload will not call hpx_main.

This is the main, non-blocking 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 by f as an HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

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 in argc/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 is nullptr the HPX runtime environment will be started without invoking f.

  • argc – [in] The number of command line arguments passed in argv. This is usually the unchanged value as passed by the operating system (to main()).

  • 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::start function (See documentation of hpx::init_params)

Returns

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.

inline bool start(int argc, char **argv, init_params const &params = init_params())#

Main non-blocking entry point for launching the HPX runtime system.

This is the main, non-blocking 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 by f as a HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution. This overload will not call hpx_main.

This is the main, non-blocking 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 by f as an HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

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 in argc/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 (to main()).

  • 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::start function (See documentation of hpx::init_params)

Returns

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.

inline bool start(std::nullptr_t f, int argc, char **argv, init_params const &params = init_params())#

Main non-blocking entry point for launching the HPX runtime system.

This is the main, non-blocking 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 by f as a HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution. This overload will not call hpx_main.

This is the main, non-blocking 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 by f as an HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

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 in argc/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 is nullptr the HPX runtime environment will be started without invoking f.

  • argc – [in] The number of command line arguments passed in argv. This is usually the unchanged value as passed by the operating system (to main()).

  • 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::start function (See documentation of hpx::init_params)

Returns

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.

inline bool start(init_params const &params = init_params())#

Main non-blocking entry point for launching the HPX runtime system.

This is a simplified main, non-blocking 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). It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

This is the main, non-blocking 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 by f as an HPX thread. It will return immediately after that. Use hpx::wait and hpx::stop to synchronize with the runtime system’s execution.

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::start function (See documentation of hpx::init_params)

Returns

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.