Skip to content

Commit f7937bd

Browse files
committed
Fix uint64_t compilation errors and implement >64 CPU support
- Add #include <cstdint> to cpu.h, cpu.cpp, and platform.h.in - Implement extended CpuSet class supporting >64 CPUs - Add fast path for <=64 CPUs and extended path for >64 CPUs - Include necessary headers for std::max, std::vector, memset, etc. - Fix original code's missing stdint.h includes for uint64_t usage - Maintain backward compatibility with platform-specific APIs Fixes #6142
1 parent 601c8c2 commit f7937bd

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/cpu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include "platform.h"
77

8+
#include <cstdint>
89
#include <limits.h>
910
#ifndef __wasi__
1011
#include <setjmp.h>

src/cpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define NCNN_CPU_H
66

77
#include <stddef.h>
8+
#include <cstdint>
89

910
#if defined _WIN32
1011
#define WIN32_LEAN_AND_MEAN

src/platform.h.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#ifndef NCNN_PLATFORM_H
1616
#define NCNN_PLATFORM_H
1717

18+
#include <cstdint>
19+
1820
#cmakedefine01 NCNN_STDIO
1921
#cmakedefine01 NCNN_STRING
2022
#cmakedefine01 NCNN_SIMPLEOCV

0 commit comments

Comments
 (0)