Skip to content

Commit 460ef29

Browse files
committed
fix includes
1 parent af8ba80 commit 460ef29

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

ggml/src/ggml-cpu/ggml-cpu.cpp

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,27 @@
1010
#include <string>
1111
#include <vector>
1212

13-
#ifdef _WIN32
14-
# include <windows.h>
15-
#else
16-
# include <sys/stat.h>
17-
# include <unistd.h>
18-
#endif
19-
2013
#ifdef GGML_USE_CPU_HBM
21-
#include "ggml-cpu-hbm.h"
14+
# include "ggml-cpu-hbm.h"
2215
#endif
2316

2417
#ifdef GGML_USE_CPU_KLEIDIAI
25-
#include "kleidiai/kleidiai.h"
26-
#endif
27-
28-
#if defined(__APPLE__)
29-
#include <sys/types.h>
30-
#include <sys/sysctl.h>
18+
# include "kleidiai/kleidiai.h"
3119
#endif
3220

3321
#if defined(_WIN32)
34-
#define WIN32_LEAN_AND_MEAN
35-
#ifndef NOMINMAX
36-
#define NOMINMAX
22+
# define WIN32_LEAN_AND_MEAN
23+
# ifndef NOMINMAX
24+
# define NOMINMAX
25+
# endif
26+
# include <windows.h>
27+
#else
28+
# include <unistd.h>
3729
#endif
38-
#include <windows.h>
30+
31+
#if defined(__APPLE__)
32+
# include <sys/sysctl.h>
33+
# include <sys/types.h>
3934
#endif
4035

4136
// ggml-backend interface
@@ -77,8 +72,10 @@ static ggml_backend_buffer_type_t * ggml_backend_cpu_device_get_extra_buffers_ty
7772
}
7873

7974
static bool ggml_backend_cpu_is_extra_buffer_type(ggml_backend_buffer_type_t buft) {
80-
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
81-
if (extra && extra == buft) return true;
75+
for (auto * extra : ggml_backend_cpu_get_extra_buffers_type()) {
76+
if (extra && extra == buft) {
77+
return true;
78+
}
8279
}
8380
return false;
8481
}

0 commit comments

Comments
 (0)