9# include <Metal/Metal.h>
18# define metal_printf VLOG(4) << string_printf
22enum AppleGPUArchitecture {
34 static const vector<id<MTLDevice>> &get_usable_devices();
35 static int get_apple_gpu_core_count(id<MTLDevice> device);
36 static AppleGPUArchitecture get_apple_gpu_architecture(id<MTLDevice> device);
37 static int optimal_sort_partition_elements();
38 static string get_device_name(id<MTLDevice> device);
42class MetalBufferPool {
43 struct MetalBufferListEntry {
45 id<MTLCommandBuffer> command_buffer;
47 std::vector<MetalBufferListEntry> temp_buffers;
49 size_t total_temp_mem_size = 0;
54 id<MTLBuffer> get_buffer(id<MTLDevice> device,
55 id<MTLCommandBuffer> command_buffer,
59 void process_command_buffer_completion(id<MTLCommandBuffer> command_buffer);
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
#define CCL_NAMESPACE_END