TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
metal_private.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
#pragma once
3
4
#import <Metal/Metal.h>
5
6
#include <cstddef>
7
#include <mutex>
8
9
namespace
tmk::gpu::metal
{
10
11
// One stable, registry-ID-ordered snapshot shared by discovery and field dispatch.
12
std::size_t
device_count
();
13
id<MTLDevice>
device_at_index
(
int
index
);
14
15
// Process working-set budget, not free VRAM: currentAllocatedSize excludes other processes.
16
std::size_t
working_set_headroom
(id<MTLDevice> device);
17
18
// Serialize admission and allocation so callers cannot admit against the same headroom.
19
std::mutex&
allocation_mutex
();
20
21
}
// namespace tmk::gpu::metal
tmk::gpu::metal
Definition
metal_private.hpp:9
tmk::gpu::metal::working_set_headroom
std::size_t working_set_headroom(id< MTLDevice > device)
Process working-set budget, not free VRAM: currentAllocatedSize excludes other processes.
tmk::gpu::metal::allocation_mutex
std::mutex & allocation_mutex()
Serialize admission and allocation so callers cannot admit against the same headroom.
tmk::gpu::metal::device_at_index
id< MTLDevice > device_at_index(int index)
tmk::gpu::metal::device_count
std::size_t device_count()
One stable, registry-ID-ordered snapshot shared by discovery and field dispatch.
tmk::index
Definition
uniform_grid.hpp:11
gpu
metal_private.hpp
Generated by
1.15.0