Skip to content

Commit

Permalink
feat(hwloc) add hwloc bindings
Browse files Browse the repository at this point in the history
Close #98
  • Loading branch information
Spasi committed Mar 8, 2023
1 parent c2be3b6 commit 5a1d892
Show file tree
Hide file tree
Showing 59 changed files with 13,677 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/modules/lwjgl/lwjgl.hwloc.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules/samples.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules/templates.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/modules/templates/templates.hwloc.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ improve the chances of a quick and useful response.
|Library|Description|
|-------|-----------|
|[CUDA](https://developer.nvidia.com/cuda-zone/)|A parallel computing platform and programming model developed by NVIDIA for general computing on GPUs.|
|[hwloc](https://www.open-mpi.org/projects/hwloc/)|A portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading.|
|[jemalloc](http://jemalloc.net/)|A general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.|
|[libffi](https://sourceware.org)|A portable, high level programming interface to various calling conventions.|
|[libdivide](https://libdivide.com/)|A library that replaces expensive integer divides with comparatively cheap multiplication and bitshifts.|
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ enum class Artifacts(
"A text shaping library that allows programs to convert a sequence of Unicode input into properly formatted and positioned glyph output — for any writing system and language.",
*Platforms.ALL
),
HWLOC(
"lwjgl-hwloc", "LWJGL - hwloc bindings",
"A portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading.",
*Platforms.ALL
),
JAWT(
"lwjgl-jawt", "LWJGL - JAWT bindings",
"The AWT native interface."
Expand Down
5 changes: 5 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@
<compileBinding binding="fmod"/>
<compileBinding binding="freetype"/>
<compileBinding binding="harfbuzz"/>
<compileBinding binding="hwloc"/>
<compileBinding binding="jawt"/>
<compileBinding binding="jemalloc"/>
<compileBinding binding="libdivide"/>
Expand Down Expand Up @@ -841,6 +842,7 @@
<include name="org/lwjgl/demo/util/*.java"/>
<include name="org/lwjgl/demo/util/freetype/**" if:true="${binding.freetype}"/>
<include name="org/lwjgl/demo/util/harfbuzz/**" if:true="${binding.harfbuzz}"/>
<include name="org/lwjgl/demo/util/hwloc/**" if:true="${binding.hwloc}"/>
<include name="org/lwjgl/demo/util/ktx/**" if:true="${binding.ktx}"/>
<include name="org/lwjgl/demo/util/lmdb/**" if:true="${binding.lmdb}"/>
<include name="org/lwjgl/demo/util/lz4/**" if:true="${binding.lz4}"/>
Expand Down Expand Up @@ -1607,6 +1609,9 @@
<!-- HarfBuzz -->
<release-module name="harfbuzz" native-library="harfbuzz" title="HarfBuzz" if:true="${binding.harfbuzz}"/>

<!-- hwloc -->
<release-module name="hwloc" native-library="hwloc" title="hwloc" if:true="${binding.hwloc}"/>

<!-- JAWT -->
<release-module name="jawt" title="JAWT" if:true="${binding.jawt}"/>

Expand Down
2 changes: 2 additions & 0 deletions config/build-bindings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This script is included in /config/build-definitions.xml.
<property name="binding.freetype" value="true"/>
<property name="binding.glfw" value="true"/>
<property name="binding.harfbuzz" value="true"/>
<property name="binding.hwloc" value="true"/>
<property name="binding.jawt" value="true"/>
<property name="binding.jemalloc" value="true"/>
<property name="binding.ktx" value="true"/>
Expand Down Expand Up @@ -106,6 +107,7 @@ This script is included in /config/build-definitions.xml.
<sequential if:true="${binding.freetype}"><local name="module"/><property name="module" value="freetype"/><body/></sequential>
<sequential if:true="${binding.glfw}"><local name="module"/><property name="module" value="glfw"/><body/></sequential>
<sequential if:true="${binding.harfbuzz}"><local name="module"/><property name="module" value="harfbuzz"/><body/></sequential>
<sequential if:true="${binding.hwloc}"><local name="module"/><property name="module" value="hwloc"/><body/></sequential>
<sequential if:true="${binding.jawt}"><local name="module"/><property name="module" value="jawt"/><body/></sequential>
<sequential if:true="${binding.jemalloc}"><local name="module"/><property name="module" value="jemalloc"/><body/></sequential>
<sequential if:true="${binding.ktx}"><local name="module"/><property name="module" value="ktx"/><body/></sequential>
Expand Down
1 change: 1 addition & 0 deletions config/linux/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@
<update-dependency module="freetype" artifact="libfreetype.so"/>
<update-dependency module="glfw" artifact="libglfw.so"/>
<update-dependency module="harfbuzz" artifact="libharfbuzz.so"/>
<update-dependency module="hwloc" artifact="libhwloc.so"/>
<update-dependency module="jemalloc" artifact="libjemalloc.so"/>
<update-dependency module="ktx" artifact="libktx.so"/>
<update-dependency module="openal" artifact="libopenal.so"/>
Expand Down
1 change: 1 addition & 0 deletions config/macos/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@
<update-dependency module="glfw" artifact="libglfw.dylib"/>
<update-dependency module="glfw" artifact="libglfw_async.dylib"/>
<update-dependency module="harfbuzz" artifact="libharfbuzz.dylib"/>
<update-dependency module="hwloc" artifact="libhwloc.dylib"/>
<update-dependency module="jemalloc" artifact="libjemalloc.dylib"/>
<update-dependency module="ktx" artifact="libktx.dylib"/>
<update-dependency module="openal" artifact="libopenal.dylib"/>
Expand Down
1 change: 1 addition & 0 deletions config/windows/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ EXPORTS
<update-dependency module="freetype" artifact="freetype.dll"/>
<update-dependency module="glfw" artifact="glfw.dll"/>
<update-dependency module="harfbuzz" artifact="harfbuzz.dll"/>
<update-dependency module="hwloc" artifact="hwloc.dll"/>
<update-dependency module="jemalloc" artifact="jemalloc.dll"/>
<update-dependency module="ktx" artifact="ktx.dll"/>
<update-dependency module="openal" artifact="OpenAL.dll"/>
Expand Down
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This build includes the following changes:
- Added [HarfBuzz](https://harfbuzz.github.io/) bindings. (#611)
* The default build works standalone.
* FreeType interop can be enabled by making HarfBuzz use FreeType's shared library (see `Configuration.HARFBUZZ_LIBRARY_NAME`).
- Added [hwloc](https://www.open-mpi.org/projects/hwloc/) bindings. (#98)
- Added [KTX (Khronos Texture)](https://www.khronos.org/ktx/) bindings. (#660)
- Assimp: Updated to 5.2.5 (up from 5.2.2)
* `KHR_draco_mesh_compression` is now supported via the bundled [Draco](https://github.com/google/draco) library. (#773)
Expand Down
19 changes: 19 additions & 0 deletions modules/generator/src/main/kotlin/org/lwjgl/generator/Modules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,25 @@ enum class Module(
""",
arrayOverloads = false
),
HWLOC(
"hwloc",
"org.lwjgl.util.hwloc",
"""
Contains bindings to the ${url("https://www.open-mpi.org/projects/hwloc/", "hwloc")}, a portable abstraction (across OS, versions, architectures, ...)
of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading.
It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces,
InfiniBand HCAs or GPUs.
hwloc primarily aims at helping applications with gathering information about increasingly complex parallel computing platforms so as to exploit them
accordingly and efficiently. For instance, two tasks that tightly cooperate should probably be placed onto cores sharing a cache. However, two
independent memory-intensive tasks should better be spread out onto different sockets so as to maximize their memory throughput.
hwloc may also help many applications just by providing a portable CPU and memory binding API and a reliable way to find out how many cores and/or
hardware threads are available.
""",
arrayOverloads = false
),
JAWT(
"jawt",
"org.lwjgl.system.jawt",
Expand Down
Loading

0 comments on commit 5a1d892

Please sign in to comment.