Skip to content

Commit 9e1fcf5

Browse files
committed
quick partial fix for not supported symbols
1 parent 9fc6aa3 commit 9e1fcf5

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,16 @@ if(NOT UMF_DISABLE_HWLOC)
151151
set(UMF_LIBS ${UMF_LIBS} ${LIBHWLOC_LIBRARIES})
152152

153153
if(NOT WINDOWS)
154-
add_optional_symbol(umfMemspaceCreateFromNumaArray)
155154
add_optional_symbol(umfMemspaceHighestBandwidthGet)
156155
add_optional_symbol(umfMemspaceHighestCapacityGet)
157156
add_optional_symbol(umfMemspaceHostAllGet)
158157
add_optional_symbol(umfMemspaceLowestLatencyGet)
159158
endif()
160159
endif()
161160

161+
# File with unsupported symbols (checks UMF_COMMON_COMPILE_DEFINITIONS)
162+
set(UMF_SOURCES ${UMF_SOURCES} unsupported.c)
163+
162164
if(WINDOWS)
163165
message(STATUS "UMF_OPTIONAL_SYMBOLS: ${UMF_OPTIONAL_SYMBOLS_WINDOWS}")
164166
else()

src/libumf.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ EXPORTS
4343
umfMempolicySetCustomSplitPartitions
4444
umfMempolicySetInterleavePartSize
4545
umfMemspaceClone
46+
umfMemspaceCreateFromNumaArray
4647
umfMemspaceDestroy
4748
umfMemspaceFilterByCapacity
4849
umfMemspaceFilterById

src/libumf.map.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ UMF_1.0 {
3737
umfMempolicySetCustomSplitPartitions;
3838
umfMempolicySetInterleavePartSize;
3939
umfMemspaceClone;
40+
umfMemspaceCreateFromNumaArray;
4041
umfMemspaceDestroy;
4142
umfMemspaceFilterByCapacity;
4243
umfMemspaceFilterById;

src/unsupported.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
*
3+
* Copyright (C) 2023-2024 Intel Corporation
4+
*
5+
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
6+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
*
8+
*/
9+
10+
#include <umf.h>
11+
#include <umf/memspace.h>
12+
13+
#if defined(UMF_NO_HWLOC) || defined(_WIN32)
14+
15+
umf_result_t umfMemspaceCreateFromNumaArray(unsigned *nodeIds, size_t numIds,
16+
umf_memspace_handle_t *hMemspace) {
17+
(void)nodeIds;
18+
(void)numIds;
19+
(void)hMemspace;
20+
21+
return UMF_RESULT_ERROR_NOT_SUPPORTED;
22+
}
23+
24+
#endif

0 commit comments

Comments
 (0)