gpu_info_darwin.m 327 Bytes
Newer Older
1
// go:build darwin
2
3
#include "gpu_info_darwin.h"

4
5
6
7
8
uint64_t getRecommendedMaxVRAM() {
  id<MTLDevice> device = MTLCreateSystemDefaultDevice();
  uint64_t result = device.recommendedMaxWorkingSetSize;
  CFRelease(device);
  return result;
9
10
}

11
12
13
uint64_t getPhysicalMemory() {
  return [[NSProcessInfo processInfo] physicalMemory];
}