Skip to content

brakmic/simple_hpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal HPX Demo

This project is a minimal demo to help new users get familiar with the HPX library. It demonstrates how to use HPX's core functionality, including asynchronous output (hpx::cout). The program prints "The answer is 42!" to the console using HPX's parallel execution engine.

What is HPX?

HPX is a C++ Standard Library for concurrency and parallelism, enabling distributed and asynchronous computing. HPX provides a unified API for local and distributed execution, making it ideal for applications that require high performance, scalability, and parallelism.

This project uses HPX's hpx_main to handle the underlying runtime initialization, allowing developers to focus directly on the code logic without worrying about manually managing the HPX runtime.

Project Structure

  • simple_hpx.cpp: The main source file that prints "The answer is 42!" using HPX's asynchronous output capabilities (hpx::cout).
  • CMakeLists.txt: The CMake configuration file that sets up the project, including the necessary HPX and Boost libraries.

Prerequisites

To compile and run this project, you'll need the following dependencies:

  1. HPX: Install HPX via your package manager or build from source. Check out HPX installation guide.
  2. Boost: Ensure Boost (version 1.71 or higher) is installed on your system. Boost installation guide.

Build Instructions

Follow these steps to build and run the project:

  1. Clone the repository:

    git clone https://github.com/brakmic/simple_hpx.git
    cd simple_hpx
  2. Create a build directory:

    mkdir build && cd build
  3. Configure the project using CMake:

    cmake ..
  4. Build the project:

    make
  5. Run the program:

    ./simple_hpx

You should see the following output:

The answer is 42!

License

MIT

About

A maximally minimal HPX program

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published