Skip to content

Add OpenCL opcodes (cladsyn) - #45

Merged
vlazzarini merged 1 commit into
developfrom
add-opencl-opcodes-7x
Oct 12, 2026
Merged

vlazzarini merged 1 commit into
developfrom
add-opencl-opcodes-7x

Conversation

@vlazzarini

Copy link
Copy Markdown
Member

Ports the Csound 6.x OpenCL plugin (cladsynth.c) to the Csound 7 plugin API as the cladsyn opcode.

Changes

  • 7.x/src/OpenCL/ — 7.x port of cladsynth.c and a CMakeLists.txt with a BUILD_OPENCL_OPCODES option. find_package(OpenCL) uses the system framework on macOS, the ICD loader on Linux (ocl-icd-opencl-dev) and the vcpkg opencl port on Windows.
  • 7.x/CMakeLists.txt — add the OpenCL subdirectory.
  • 7.x/vcpkg.json, 7.x/x64-windows-csound.cmake — add the windows-only opencl dependency with dynamic linkage.
  • CI — install ocl-icd-opencl-dev on Linux and stage the OpenCL plugins on Linux and macOS (Windows staging is recursive).
  • README — document the opcode, a note and the build option.

Notes

  • One canonical source is kept (as with the CUDA port): the 6.x cladsynth.cpp, cladsynth2.cpp variants and the unused openclop.cpp helper are intentionally not carried over. clconv cannot be ported (no source is present in the repository or its history).
  • Verified locally on macOS: the plugin configures, compiles and links against -framework OpenCL. CI builds it compile-only (no OpenCL device on the runners).

Port the Csound 6.x OpenCL plugin (cladsynth.c) to the Csound 7 plugin API
as the cladsyn opcode, plus the CMake plumbing to build it on all platforms:

- 7.x/src/OpenCL: source and CMakeLists with a BUILD_OPENCL_OPCODES option,
  using find_package(OpenCL) (system framework on macOS, ocl-icd on Linux,
  vcpkg opencl port on Windows).
- 7.x/CMakeLists.txt: add the OpenCL subdirectory.
- 7.x/vcpkg.json and x64-windows-csound.cmake: add the windows-only opencl
  dependency with dynamic linkage.
- CI: install ocl-icd-opencl-dev on Linux and stage the OpenCL plugins on
  Linux and macOS.
- README: document the opcode, the note and the build option.
@vlazzarini
vlazzarini merged commit 961ae5a into develop Oct 12, 2026
6 checks passed
@vlazzarini
vlazzarini deleted the add-opencl-opcodes-7x branch October 12, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant