Package: coalpy
coalpyCompute abstraction layer for python.CoalPyis a free low friction python (3.10, 3.11) native module for Windows and Linux. Coalpy's main goal is to make modern DirectX12 or Vulkan GPU compute software easy to write and deploy.Python moduleGet started with API documentation here:coalpy.gpu documentationTo install, just run the pip command:pip install coalpyTo check that coalpy is installed properly run the seascape example:python -m coalpy.examples.seascapeAnd presto!About ContributingThe following section specifies guidelines for contributing to the coalpy project.Building requirementsInstall Python supported versions
** Preferably3.11** Other versions include 3.10Ensure you have a version of visual studio with support for VCEnsure you are on the latest and greatest version of windows 10DirectoriesSource - everything inside here gets compiled by the build system.modules - Internal c++ implementation of coalpy.pymodules/gpu - The Python glue code, which translates the c++ coalpy module into public functions and types ready to be used in python.scripts - Python scripts that get packaged with the coalpy module.[libpng|libjpeg|zlib|imgui] - External libraries, which are compiled in source.tests - Internal graphics and system test suites for coalpy, does not test the Python layer, only the internal layer.Build - Build scripts for the tundra build system.External - External precompiled libraries used.Tools - Executables and tools used to assist in building. In this case the tundra build system is contained here.docs - Documentation folder. This documentation utilizes github pages, which can be seenhereCompiling in WindowsTo compile in Windows, use the build.bat script file:build.bat debugfor release modebuild.bat releaseTo generate a solution for visual studio, use the gensln.bat script:gensln.batTo run the internal c++ tests, run the coalpy_tests.exe program generated:t2-output\win64-msvc-debug-default\coalpy_tests.exeFor information about the test suites commands, such as filters / repeating tests etc use the -h flag.Compiling in Linux (Ubuntu 20.x LTS+)Before compiling into linux, the necessary dependencies must be installed.
For ubuntu apt package manager, you can run the script:sudo ./linux-deps.shThen proceed to install vulkan lunar SDK as assigned below.Vulkan Lunar SDKFollow this by installing vulkan lunar SDK:vulkan lunar SDKCompiling for LinuxTo compile for Linux, use the build.sh script file:./build.sh debugfor release mode./build.sh releaseCreating Python packagecd into the t2-output\win64-msvc-[debug|release]-default\coalpy_pip directory. Run the command:python -m buildEnsure you have the latest version of the build module. To configure metadata of the pip package modify things inside the Source/pipfiles folder.Updating documentationAll documentation of the coalpy Python API is self contained inside the Source/pymodules/gpu folder. Inside we fill doc strings inside types and functions exported to Python.
To generate the documentation, cd into the t2-output/win64-msvc-[release|debug|production]-default folder, and run the commands:python -m pydoc -w coalpy
python -m pydoc -w coalpy.gpuThis will generate coalpy.html and coalpy.gpu.html which can be copied into the docs directory.CreditsCoalpy utilizes a few great open source libraries. Links with the authors and source provided here:libjpeg - JPEG library by @LuaDistlibpng - PNG library by @glennrpzlib - compression library by @madlerimgui - User interface library by @ocornutDirectXShaderCompiler - hlsl compiler by @microsoftSpecial thanks to my amazing wife Katie: I love you.