philipturner / molecular-renderer

Renderer for molecular nanotechnology
MIT License
65 stars 6 forks source link

OpenCL backend for MRSimulation codec #5

Closed philipturner closed 1 year ago

philipturner commented 1 year ago

The MRSimulation file in the MolecularRenderer module uses Metal for GPU-accelerated encoding/decoding and Apple's Compression library for multicore LZBITMAP compression. The latter is discussed in #2, but can be solved with an (unoptimized) solution right now, just copying the code in the linked repo. For GPU, we would need to use some #if os gating around any usage of Metal APIs (MTLBuffer, MTLCommandBuffer, etc.) and add another compile path for using OpenCL. Then gate out all of the rendering code in the MolecularRenderer module.

philipturner commented 1 year ago

This can probably just be accomplished with some CPU code that maximizes ALU utilization. 1/10 the power of the GPU is still a lot of power.