Blender  V2.93
numaapi_stub.c
Go to the documentation of this file.
1 // Copyright (c) 2016, libnumaapi authors
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 // IN THE SOFTWARE.
20 //
21 // Author: Sergey Sharybin <sergey.vfx@gmail.com>
22 
23 #include "numaapi.h"
24 
25 #include "build_config.h"
26 
27 // Stub implementation for platforms which doesn't have NUMA support.
28 
29 #if !OS_LINUX && !OS_WIN
30 
32 // Initialization.
33 
35  return NUMAAPI_NOT_AVAILABLE;
36 }
37 
39 // Topology query.
40 
42  return 0;
43 }
44 
46  (void) node; // Ignored.
47  return false;
48 }
49 
51  (void) node; // Ignored.
52  return 0;
53 }
54 
56 // Topology helpers.
57 
59  return 0;
60 }
61 
63 // Affinities.
64 
66  (void) node; // Ignored.
67  return false;
68 }
69 
71  (void) node; // Ignored.
72  return false;
73 }
74 
76 // Memory management.
77 
78 void* numaAPI_AllocateOnNode(size_t size, int node) {
79  (void) size; // Ignored.
80  (void) node; // Ignored.
81  return 0;
82 }
83 
84 void* numaAPI_AllocateLocal(size_t size) {
85  (void) size; // Ignored.
86  return NULL;
87 }
88 
89 void numaAPI_Free(void* start, size_t size) {
90  (void) start; // Ignored.
91  (void) size; // Ignored.
92 }
93 
94 #endif // !OS_LINUX && !OS_WIN
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
OperationNode * node
NUMAAPI_Result
Definition: numaapi.h:36
@ NUMAAPI_NOT_AVAILABLE
Definition: numaapi.h:39
bool numaAPI_IsNodeAvailable(int node)
Definition: numaapi_stub.c:45
bool numaAPI_RunProcessOnNode(int node)
Definition: numaapi_stub.c:65
void * numaAPI_AllocateOnNode(size_t size, int node)
Definition: numaapi_stub.c:78
NUMAAPI_Result numaAPI_Initialize(void)
Definition: numaapi_stub.c:34
void * numaAPI_AllocateLocal(size_t size)
Definition: numaapi_stub.c:84
void numaAPI_Free(void *start, size_t size)
Definition: numaapi_stub.c:89
int numaAPI_GetNumCurrentNodesProcessors(void)
Definition: numaapi_stub.c:58
int numaAPI_GetNumNodeProcessors(int node)
Definition: numaapi_stub.c:50
int numaAPI_GetNumNodes(void)
Definition: numaapi_stub.c:41
bool numaAPI_RunThreadOnNode(int node)
Definition: numaapi_stub.c:70