Coder Social home page Coder Social logo

nontan-rh / libaramid Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 445 KB

Portable Multiprocessing Library for C

Home Page: https://nontan-rh.github.io/libaramid

License: Apache License 2.0

CMake 14.42% C 52.57% Dockerfile 0.83% C++ 24.15% Shell 2.08% Java 1.78% Objective-C++ 3.03% HTML 0.57% JavaScript 0.58%
c library cross-platform parallel threadpool performance android ios macos linux

libaramid's Introduction

libaramid Build

libaramid is a multiprocessing library for C which employs the work-stealing algorithm, fork-join model, and task flow model. This library focuses on portability and usability in real-world applications.

Key Features

  • Largely compliant with C99 (but a few unavoidable intrinsics)
  • Abstracting underlying thread APIs
  • Independent of ABI specifics
  • Tested on a bunch of environments (including real smartphone devices and Webassembly)
  • Error handling API
  • Various ways to synchronization
  • Custom scheduling
  • Capability to use from other languages

Supported Platforms

Tested platforms and toolchain

OS CPU Compiler Note
Linux x64 Clang Verified using ASAN
macOS x64 AppleClang Verified using ASAN
Windows x64 MSVC
MinGW
iOS ARMv8 AppleClang Build only (automatic test planned)
Android ARMv8 GCC
WASM - Emscripten Tested on Headless Chrome

Getting Started

CMake

NOTE: Android NDK can utilize CMake and it requires Ninja

You can use ExternalProject to add to your project. See CMake Documentation if you don't know how to use the feature.

cmake_minimum_required(VERSION 3.10.2)

ExternalProject_Add(libaramid
    GIT_REPOSITORY https://github.com/nontan-rh/libaramid.git
    GIT_TAG master
    GIT_SHALLOW ON
    SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/libaramid-src"
    BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libaramid-build"
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    TEST_COMMAND ""
)

target_link_libraries(<your_target> aramid)

Carthage

NOTE: You need cmake in addition to Xcode and Carthage.

github "nontan-rh/libaramid"

Development

NOTE: In-source build is disabled

Generic

$ mkdir -p build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
$ cmake --build .
# for Linux, macOS, Windows
$ ctest
# for Wasm
$ python3 -m http.server --directory test_executable 8080
# -> then visit localhost:8080

Android

Open etc/android/TestProject as a project with AndroidStudio

iOS

Open etc/ios/libaramid/libaramid.xcodeproj with Xcode

Third Party Licenses

Build scripts or test drivers in this repository include some third-party software.

Project License URL
ios-cmake BSD-3-Clause https://github.com/leetal/ios-cmake
googletest BSD-3-Clause https://github.com/google/googletest
google-toolbox-for-mac Apache-2.0 https://github.com/google/google-toolbox-for-mac

Package managers also fetch some third-party software. Check build.gradle and package.json.

libaramid's People

Contributors

nontan-rh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.