This library provides means to compile and distribute OpenMP library for iOS.
OpenMP is part of LLVM distribution.
Latest supported version of OpenMP is 16.0.5.
- iOS
- iOS Simulator
- tvOS
- tvOS Simulator
- watchOS
- watchOS Simulator
- macOS
- Xcode (including multiple
platforms
) - LLVM with Clang
- Homebrew
- g++
- CMake
- node
- python
- perl
- ruby (for Cocoapods)
- carthage
- swift
Libraries such as BLAS, or FAISS depend on OpenMP to run parallel execution across different platforms, this repository is a structured way to get the OpenMP source code compiled and distributed to iOS developers.
Run ./openmp.sh
and it will create dist/openmp.xcframework
that you can use in your Xcode project.
Once the compilation is done, you'll have XCframework created with the files below:
dist/openmp.xcframework
├── Info.plist
├── ios-arm64_arm64e
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
├── ios-arm64_arm64e_x86_64-simulator
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
├── macos-arm64_arm64e_x86_64
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
├── tvos-arm64
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
├── tvos-x86_64-simulator
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
├── watchos-arm64_32_armv7k
│ ├── Headers
│ │ ├── omp-tools.h
│ │ ├── omp.h
│ │ └── ompt.h
│ └── libomp.a
└── watchos-i386-simulator
├── Headers
│ ├── omp-tools.h
│ ├── omp.h
│ └── ompt.h
└── libomp.a
If you're looking to run parallel code on iOS using Objective-C or Swift, make sure to check examples
for the details on how to integrate the library.
If you're not looking to run complex calculations (linear algebra, DSP, neural networks), then you might want to consider Apple's Grand Central Dispatch, as it is more optimized to provide a better user experience (battery management and performance).
This package is available using following package managers.
./Pacakage.swift
points to remote release hosted on this GitHub repository.
Use these instructions to add this GitHub repository.
./OpenMP.podspec
includes all the specific details about the build.
In your Podfile
you can add this library using this syntax:
pod 'OpenMP', :git => 'https://github.com/eugenehp/openmp-mobile.git', :tag => 'v16.0.5'
In Cartfile
add following:
binary "https://raw.githubusercontent.com/eugenehp/openmp-mobile/master/carthage/openmp-static-xcframework.json" ~> 16.0.5
Release management works using gh.
brew install gh tree
To release a draft:
./openmp.sh release
Contributions are welcome, feel free to submit an issue or open a pull request.
Copyright © 2023 Eugene Hauptmann
The OpenMP name and the OpenMP logo are registered trademarks of the OpenMP Architecture Review Board