2024-04-16 18:22:38 +00:00
|
|
|
// go:build darwin
|
2024-02-25 23:16:45 +00:00
|
|
|
#include "gpu_info_darwin.h"
|
|
|
|
|
2024-04-16 18:22:38 +00:00
|
|
|
uint64_t getRecommendedMaxVRAM() {
|
|
|
|
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
|
|
|
|
uint64_t result = device.recommendedMaxWorkingSetSize;
|
|
|
|
CFRelease(device);
|
|
|
|
return result;
|
2024-02-25 23:16:45 +00:00
|
|
|
}
|
|
|
|
|
2024-04-16 18:22:38 +00:00
|
|
|
uint64_t getPhysicalMemory() {
|
|
|
|
return [[NSProcessInfo processInfo] physicalMemory];
|
|
|
|
}
|