Skip to content

Commit 6cc34a6

Browse files
committed
nominmax
1 parent 097fed3 commit 6cc34a6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
#include <iostream>
42
#include <fstream>
53
#include <sstream>
@@ -22,6 +20,7 @@
2220
#include <sys/types.h>
2321

2422
#ifdef _WIN32
23+
#define NOMINMAX
2524
#include <windows.h>
2625
#include <direct.h> // For _mkdir on Windows
2726
#else
@@ -305,7 +304,7 @@ void string_to_spv(const std::string& _name, const std::string& in_fname, const
305304
{
306305
// wait until fewer than N compiles are in progress.
307306
// 16 is an arbitrary limit, the goal is to avoid "failed to create pipe" errors.
308-
uint32_t N = (std::max)(1u, (std::min)(16u, std::thread::hardware_concurrency()));
307+
uint32_t N = std::max(1u, std::min(16u, std::thread::hardware_concurrency()));
309308
std::unique_lock<std::mutex> guard(compile_count_mutex);
310309
while (compile_count >= N) {
311310
compile_count_cond.wait(guard);

0 commit comments

Comments
 (0)