crystal-omp
Version, currently master branch1 version
- master branchlatestApr 10, 2024
github.com/Oblivious-Oblivious/crystal-omp
C bindings for OpenMP.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crystal-omp:
github: Oblivious-Oblivious/crystal-omp
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.11.2- License
- MIT
- Author
- Oblivious
Dependencies
This version declares no dependencies.
README
crystal-omp
OpenMP integration for Crystal. Supported up to latest version.
Installation
-
Add the dependency to your
shard.yml:dependencies: crystal-omp: github: Oblivious-Oblivious/crystal-omp -
Run
shards install
Usage
require "crystal-omp"
Try examples for more.
cat function.c
int run_in_c(char *value) {
#pragma omp parallel
for(;;);
printf("%s\n", value);
return 42;
}
cat test.cr
@[Link(ldflags: "#{__DIR__}/function.o")]
lib LibTest
fun run_in_c(LibC::Char*) : LibC::Int;
end
res = LibTest.run_in_c "somestring";
pp res;
clang -fopenmp -o function.o function.c
crystal test.cr
Development
- Tests for binded functionality
- Wrapper objects for converting safe values to unsafe ones
Contributing
- Fork it (https://github.com/Oblivious-Oblivious/crystal-omp/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Oblivious - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Apr 10, 2024
- Crystal
>= 1.11.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Oblivious-Oblivious/crystal-omp
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1