diff --git a/.gitmodules b/.gitmodules index 406e26d5..f041c6f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,3 +40,6 @@ [submodule "third_party/cutlass"] path = third_party/cutlass url = https://github.com/MegEngine/cutlass.git +[submodule "third_party/range-v3"] + path = third_party/range-v3 + url = https://github.com/ericniebler/range-v3.git diff --git a/ACKNOWLEDGMENTS b/ACKNOWLEDGMENTS index addbf8fc..ec1b987e 100644 --- a/ACKNOWLEDGMENTS +++ b/ACKNOWLEDGMENTS @@ -2288,3 +2288,71 @@ and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. ********************************************************************************************************************************* +============================================================================== +libc++ License +============================================================================== +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT + http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT + +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. +============================================================================== +Stepanov and McJones, "Elements of Programming" license +============================================================================== + +// Copyright (c) 2009 Alexander Stepanov and Paul McJones +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without +// fee, provided that the above copyright notice appear in all copies +// and that both that copyright notice and this permission notice +// appear in supporting documentation. The authors make no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. +// +// Algorithms from +// Elements of Programming +// by Alexander Stepanov and Paul McJones +// Addison-Wesley Professional, 2009 + +============================================================================== +SGI C++ Standard Template Library license +============================================================================== + +// Copyright (c) 1994 +// Hewlett-Packard Company +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Hewlett-Packard Company makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// Copyright (c) 1996 +// Silicon Graphics Computer Systems, Inc. +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Silicon Graphics makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. diff --git a/imperative/CMakeLists.txt b/imperative/CMakeLists.txt index e6c613a0..8f375970 100644 --- a/imperative/CMakeLists.txt +++ b/imperative/CMakeLists.txt @@ -46,6 +46,9 @@ else() endif() endif() +add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/range-v3 ${PROJECT_BINARY_DIR}/third_party/range-v3) +target_link_libraries(${MODULE_NAME} PRIVATE range-v3) + target_include_directories(${MODULE_NAME} PUBLIC src/include PRIVATE ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${MGB_OPDEF_OUT_DIR}) target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=${MODULE_NAME}) target_compile_options(${MODULE_NAME} PRIVATE -Wno-unused-parameter) @@ -77,4 +80,3 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/python/requires-style.txt ${CMAKE_CURRENT_BINARY_DIR}/python/requires-style.txt COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/python/requires-test.txt ${CMAKE_CURRENT_BINARY_DIR}/python/requires-test.txt ) - diff --git a/imperative/test/CMakeLists.txt b/imperative/test/CMakeLists.txt index 03a92575..52aec90d 100644 --- a/imperative/test/CMakeLists.txt +++ b/imperative/test/CMakeLists.txt @@ -18,7 +18,7 @@ target_include_directories(imperative_test PRIVATE ${MODULE_SRC_INCLUDE} ${PYTHO target_compile_definitions(imperative_test PRIVATE MODULE_NAME=C) target_compile_options(imperative_test PRIVATE -Wno-unused-parameter) -set(LINK_LIBS megbrain megdnn gtest gmock pybind11::embed) +set(LINK_LIBS megbrain megdnn gtest gmock pybind11::embed range-v3) if(MGE_WITH_CUDA) list(APPEND LINK_LIBS cudart) endif() diff --git a/third_party/prepare.sh b/third_party/prepare.sh index 25a02dab..7b01f6d5 100755 --- a/third_party/prepare.sh +++ b/third_party/prepare.sh @@ -48,3 +48,4 @@ popd >/dev/null git submodule update --init pybind11 git submodule update --init llvm-project +git submodule update --init range-v3 diff --git a/third_party/range-v3 b/third_party/range-v3 new file mode 160000 index 00000000..d098b961 --- /dev/null +++ b/third_party/range-v3 @@ -0,0 +1 @@ +Subproject commit d098b9610ac2f182f667ae9274ac2fac7f1327f5