Commit: 5085c622ea883c77c723f6f6e2ca656f88d1999e Author: Sergey Sharybin Date: Fri Jan 7 12:03:49 2022 +0100 Branches: master https://developer.blender.org/rB5085c622ea883c77c723f6f6e2ca656f88d1999e
Cleanup: Remove unused numapi library =================================================================== M intern/CMakeLists.txt D intern/numaapi/AUTHORS D intern/numaapi/CMakeLists.txt D intern/numaapi/LICENSE D intern/numaapi/README D intern/numaapi/README.blender D intern/numaapi/include/numaapi.h D intern/numaapi/source/build_config.h D intern/numaapi/source/numaapi.c D intern/numaapi/source/numaapi_linux.c D intern/numaapi/source/numaapi_stub.c D intern/numaapi/source/numaapi_win32.c =================================================================== diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index dbd939e64b7..0a61cef7cc8 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -25,7 +25,6 @@ add_subdirectory(ghost) add_subdirectory(guardedalloc) add_subdirectory(libmv) add_subdirectory(memutil) -add_subdirectory(numaapi) add_subdirectory(opencolorio) add_subdirectory(opensubdiv) add_subdirectory(mikktspace) diff --git a/intern/numaapi/AUTHORS b/intern/numaapi/AUTHORS deleted file mode 100644 index a824c03d9ff..00000000000 --- a/intern/numaapi/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Sergey Sharybin <[email protected]> diff --git a/intern/numaapi/CMakeLists.txt b/intern/numaapi/CMakeLists.txt deleted file mode 100644 index e65ae15ae47..00000000000 --- a/intern/numaapi/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ***** END GPL LICENSE BLOCK ***** - -set(INC - include -) - -set(INC_SYS - -) - -set(SRC - source/numaapi.c - source/numaapi_linux.c - source/numaapi_stub.c - source/numaapi_win32.c - - include/numaapi.h - source/build_config.h -) - -set(LIB -) - -add_definitions(-DWITH_DYNLOAD) - -blender_add_lib(bf_intern_numaapi "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/intern/numaapi/LICENSE b/intern/numaapi/LICENSE deleted file mode 100644 index 3562d7ac274..00000000000 --- a/intern/numaapi/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 libnumaapi authors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/intern/numaapi/README b/intern/numaapi/README deleted file mode 100644 index a510ff12548..00000000000 --- a/intern/numaapi/README +++ /dev/null @@ -1,7 +0,0 @@ -LibNumaAPI is aimed to provide one common cross-platform API for all -possible platforms, so cross-platform applications might not worry -about implementation details. - -LICENSE - -LibNumaAPI library is released under the MIT license. diff --git a/intern/numaapi/README.blender b/intern/numaapi/README.blender deleted file mode 100644 index a7f43445169..00000000000 --- a/intern/numaapi/README.blender +++ /dev/null @@ -1,5 +0,0 @@ -Project: LibNumaAPI -URL: https://github.com/Nazg-Gul/libNumaAPI -License: MIT -Upstream version: 1c1ae7bc78e -Local modifications: None diff --git a/intern/numaapi/include/numaapi.h b/intern/numaapi/include/numaapi.h deleted file mode 100644 index 11e916019ef..00000000000 --- a/intern/numaapi/include/numaapi.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2016, libnumaapi authors -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// -// Author: Sergey Sharybin <[email protected]> - -/** \file - * \ingroup intern_numaapi - */ - -#ifndef __LIBNUMAAPI_H__ -#define __LIBNUMAAPI_H__ - -#include <stdbool.h> -#include <stddef.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define NUMAAPI_VERSION_MAJOR 1 -#define NUMAAPI_VERSION_MINOR 0 - -typedef enum NUMAAPI_Result { - NUMAAPI_SUCCESS = 0, - // NUMA is not available on this platform. - NUMAAPI_NOT_AVAILABLE = 1, - // Generic error, no real details are available, - NUMAAPI_ERROR = 2, - // Error installing atexit() handlers. - NUMAAPI_ERROR_ATEXIT = 3, -} NUMAAPI_Result; - -//////////////////////////////////////////////////////////////////////////////// -// Initialization. - -// Initialize NUMA API. -// -// This is first call which should be called before any other NUMA functions -// can be used. -NUMAAPI_Result numaAPI_Initialize(void); - -// Get string representation of NUMAPIResult. -const char* numaAPI_ResultAsString(NUMAAPI_Result result); - -//////////////////////////////////////////////////////////////////////////////// -// Topology query. - -// Get number of available nodes. -// -// This is in fact an index of last node plus one and it's not guaranteed -// that all nodes up to this one are available. -int numaAPI_GetNumNodes(void); - -// Returns truth if the given node is available for compute. -bool numaAPI_IsNodeAvailable(int node); - -// Get number of available processors on a given node. -int numaAPI_GetNumNodeProcessors(int node); - -//////////////////////////////////////////////////////////////////////////////// -// Topology helpers. -// -// Those are a bit higher level queries, but is still rather platform-specific -// and generally useful. - -// Get number of processors within the NUMA nodes on which current thread is -// set affinity on. -int numaAPI_GetNumCurrentNodesProcessors(void); - -//////////////////////////////////////////////////////////////////////////////// -// Affinities. - -// Runs the current process and its children on a specific node. -// -// Returns truth if affinity has successfully changed. -// -// NOTE: This function can not change active CPU group. Mainly designed to deal -// with Threadripper 2 topology, to make it possible to gain maximum performance -// for the main application thread. -bool numaAPI_RunProcessOnNode(int node); - -// Runs the current thread and its children on a specific node. -// -// Returns truth if affinity has successfully changed. -bool numaAPI_RunThreadOnNode(int node); - -//////////////////////////////////////////////////////////////////////////////// -// Memory management. - -// Allocate memory on a given node, -void* numaAPI_AllocateOnNode(size_t size, int node); - -// Allocate memory in the local memory, closest to the current node. -void* numaAPI_AllocateLocal(size_t size); - -// Frees size bytes of memory starting at start. -// -// TODO(sergey): Consider making it regular free() semantic. -void numaAPI_Free(void* start, size_t size); - -#ifdef __cplusplus -} -#endif - -#endif // __LIBNUMAAPI_H__ diff --git a/intern/numaapi/source/build_config.h b/intern/numaapi/source/build_config.h deleted file mode 100644 index 58c07ac85ab..00000000000 --- a/intern/numaapi/source/build_config.h +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright (c) 2018, libnumaapi authors -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// -// Author: Sergey Sharybin <[email protected]> - -/** \file - * \ingroup intern_numaapi - */ - -#ifndef __BUILD_CONFIG_H__ -#define __BUILD_CONFIG_H__ - -#include <limits.h> -#include <stdint.h> - -// Initially is based on Chromium's build_config.h, with tweaks and extensions -// needed for this project. -// -// NOTE: All commonly used symbols (which are checked on a "top" level, from -// outside of any platform-specific ifdef block) are to be explicitly defined -// to 0 when they are not "active". This is extra lines @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
