Add set_threadgroup_memory_length to CommandEncoder

This method exposes the Metal API's setThreadgroupMemoryLength functionality,
which is needed when implementing custom kernels that require configuring
threadgroup memory size. This allows for better performance tuning in
specialized Metal compute operations that rely on shared threadgroup memory.
This commit is contained in:
Jack 2025-05-13 21:45:30 -04:00
parent eca2f3eb97
commit d197c18528

View File

@ -95,6 +95,10 @@ struct CommandEncoder {
return enc_->setBytes(&v, sizeof(T), idx);
}
void set_threadgroup_memory_length(size_t length, NS::UInteger index) {
enc_->setThreadgroupMemoryLength(length, index);
}
ConcurrentContext start_concurrent() {
return ConcurrentContext(*this);
}