From 30701fc6dbb7080fb3952ce992d33433c476d071 Mon Sep 17 00:00:00 2001 From: Taichi Gardener <62079278+taichi-gardener@users.noreply.github.com> Date: Tue, 31 Mar 2020 16:00:51 -0400 Subject: [PATCH] [misc] Enforce the use of #include "taichi/..." (#688) --- taichi/backends/cuda/cuda_context.cpp | 4 ++-- taichi/backends/cuda/cuda_context.h | 4 ++-- taichi/backends/cuda/cuda_utils.h | 2 +- taichi/codegen/codegen.cpp | 2 +- taichi/codegen/codegen_cpu.cpp | 4 ++-- taichi/codegen/codegen_llvm_cpu.cpp | 4 ++-- taichi/codegen/codegen_opengl.cpp | 8 ++++---- taichi/common/dict.h | 2 +- taichi/common/interface.h | 2 +- taichi/core/bit.cpp | 4 ++-- taichi/core/core.cpp | 4 ++-- taichi/core/interface.cpp | 2 +- taichi/core/interfaces.cpp | 6 +++--- taichi/core/logging.cpp | 6 +++--- taichi/core/testing.cpp | 2 +- taichi/gui/cocoa.cpp | 8 ++++---- taichi/gui/gui.cpp | 2 +- taichi/gui/gui.h | 6 +++--- taichi/gui/win32.cpp | 6 +++--- taichi/gui/x11.cpp | 2 +- taichi/ir/expr.h | 2 +- taichi/ir/frontend.h | 6 +++--- taichi/ir/scratch_pad.h | 2 +- taichi/jit/jit_arch_cuda.cpp | 10 +++++----- taichi/lang_util.h | 6 +++--- taichi/llvm/llvm_context.cpp | 2 +- taichi/math/array_fwd.h | 2 +- taichi/math/geometry_util.h | 2 +- taichi/math/linalg.h | 2 +- taichi/math/math.h | 2 +- taichi/math/scalar.h | 2 +- taichi/math/sifakis_svd.h | 2 +- taichi/platform/mac/objc_api.h | 2 +- taichi/platform/opengl/opengl_api.cpp | 2 +- taichi/platform/opengl/opengl_api.h | 2 +- taichi/platform/opengl/opengl_data_types.h | 2 +- taichi/platform/opengl/opengl_kernel_util.h | 2 +- taichi/program/kernel.cpp | 2 +- taichi/program/profiler.cpp | 2 +- taichi/python/exception.cpp | 2 +- taichi/python/exception.h | 2 +- taichi/python/export.cpp | 6 +++--- taichi/python/export.h | 4 ++-- taichi/python/export_lang.cpp | 14 ++++++------- taichi/python/export_math.cpp | 4 ++-- taichi/python/export_misc.cpp | 22 ++++++++++----------- taichi/python/export_visual.cpp | 6 +++--- taichi/struct/struct_opengl.h | 6 +++--- taichi/system/benchmark.h | 4 ++-- taichi/system/demangling.cpp | 4 ++-- taichi/system/memory_pool.cpp | 2 +- taichi/system/memory_usage_monitor.cpp | 14 ++++++------- taichi/system/profiler.cpp | 2 +- taichi/system/profiler.h | 4 ++-- taichi/system/run_tests.cpp | 6 +++--- taichi/system/threading.cpp | 2 +- taichi/system/threading.h | 2 +- taichi/system/timer.cpp | 2 +- taichi/system/timer.h | 2 +- taichi/system/traceback.cpp | 2 +- taichi/system/unified_allocator.cpp | 6 +++--- taichi/system/unit_dll.h | 2 +- taichi/system/virtual_memory.h | 2 +- taichi/transforms/type_check.cpp | 2 +- taichi/util/base64.h | 2 +- taichi/util/image_buffer.cpp | 6 +++--- taichi/util/image_io.cpp | 4 ++-- taichi/util/io.h | 2 +- taichi/util/zip.cpp | 2 +- tests/cpp/test_alg_simp.cpp | 4 ++-- tests/cpp/test_dict.cpp | 4 ++-- tests/cpp/test_exception_handling.cpp | 4 ++-- tests/cpp/test_gui.cpp | 4 ++-- tests/cpp/test_simplify.cpp | 4 ++-- 74 files changed, 147 insertions(+), 147 deletions(-) diff --git a/taichi/backends/cuda/cuda_context.cpp b/taichi/backends/cuda/cuda_context.cpp index f6f42c53e71d4..9ec82ffbc3e10 100644 --- a/taichi/backends/cuda/cuda_context.cpp +++ b/taichi/backends/cuda/cuda_context.cpp @@ -1,8 +1,8 @@ #if defined(TI_WITH_CUDA) #define TI_RUNTIME_HOST -#include -#include +#include "taichi/lang_util.h" +#include "taichi/program/program.h" #include "cuda_context.h" diff --git a/taichi/backends/cuda/cuda_context.h b/taichi/backends/cuda/cuda_context.h index 34ca4fcbed695..716d068a15ef9 100644 --- a/taichi/backends/cuda/cuda_context.h +++ b/taichi/backends/cuda/cuda_context.h @@ -1,8 +1,8 @@ #pragma once #if defined(TI_WITH_CUDA) -#include -#include +#include "taichi/program/profiler.h" +#include "taichi/backends/cuda/cuda_utils.h" #include TLANG_NAMESPACE_BEGIN diff --git a/taichi/backends/cuda/cuda_utils.h b/taichi/backends/cuda/cuda_utils.h index 3b0510b9d27a5..3df1db78bdd5f 100644 --- a/taichi/backends/cuda/cuda_utils.h +++ b/taichi/backends/cuda/cuda_utils.h @@ -1,7 +1,7 @@ #pragma once #if defined(TI_WITH_CUDA) -#include +#include "taichi/lang_util.h" #include #include #include diff --git a/taichi/codegen/codegen.cpp b/taichi/codegen/codegen.cpp index 8bd657ca8dfbd..4f76cf937728f 100644 --- a/taichi/codegen/codegen.cpp +++ b/taichi/codegen/codegen.cpp @@ -3,7 +3,7 @@ #include "codegen.h" #include "codegen_cpu.h" #include "codegen_cuda.h" -#include +#include "taichi/system/timer.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/codegen/codegen_cpu.cpp b/taichi/codegen/codegen_cpu.cpp index d48dd8ff5c574..43143aa4d7c7a 100644 --- a/taichi/codegen/codegen_cpu.cpp +++ b/taichi/codegen/codegen_cpu.cpp @@ -1,7 +1,7 @@ // x86 backend implementation -#include -#include +#include "taichi/common/util.h" +#include "taichi/util/io.h" #include #include "codegen_cpu.h" #include "taichi/lang_util.h" diff --git a/taichi/codegen/codegen_llvm_cpu.cpp b/taichi/codegen/codegen_llvm_cpu.cpp index 7875506cd26d2..f754962a496f5 100644 --- a/taichi/codegen/codegen_llvm_cpu.cpp +++ b/taichi/codegen/codegen_llvm_cpu.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "taichi/common/util.h" +#include "taichi/util/io.h" #include "taichi/lang_util.h" #include "taichi/program/program.h" #include "taichi/ir/ir.h" diff --git a/taichi/codegen/codegen_opengl.cpp b/taichi/codegen/codegen_opengl.cpp index 1eb28d941fee0..b3eef46d12ef8 100644 --- a/taichi/codegen/codegen_opengl.cpp +++ b/taichi/codegen/codegen_opengl.cpp @@ -1,11 +1,11 @@ //#define _GLSL_DEBUG 1 #include "codegen_opengl.h" -#include -#include +#include "taichi/platform/opengl/opengl_api.h" +#include "taichi/platform/opengl/opengl_data_types.h" #include -#include -#include +#include "taichi/ir/ir.h" +#include "taichi/util/line_appender.h" TLANG_NAMESPACE_BEGIN namespace opengl { diff --git a/taichi/common/dict.h b/taichi/common/dict.h index c38b85a65a0fa..1ef7b444c7006 100644 --- a/taichi/common/dict.h +++ b/taichi/common/dict.h @@ -14,7 +14,7 @@ #include #include -#include +#include "taichi/math/math.h" #include "util.h" TI_NAMESPACE_BEGIN diff --git a/taichi/common/interface.h b/taichi/common/interface.h index 72afaec169c8f..822e7e815321c 100644 --- a/taichi/common/interface.h +++ b/taichi/common/interface.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "taichi/common/dict.h" #include #include #include diff --git a/taichi/core/bit.cpp b/taichi/core/bit.cpp index 462c6c72f412f..1787d3fd1b5ae 100644 --- a/taichi/core/bit.cpp +++ b/taichi/core/bit.cpp @@ -3,8 +3,8 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/common/testing.h" +#include "taichi/common/bit.h" TI_NAMESPACE_BEGIN diff --git a/taichi/core/core.cpp b/taichi/core/core.cpp index bc89b1fa873d0..97fd9cd97465a 100644 --- a/taichi/core/core.cpp +++ b/taichi/core/core.cpp @@ -3,8 +3,8 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/common/util.h" +#include "taichi/common/version.h" TI_NAMESPACE_BEGIN diff --git a/taichi/core/interface.cpp b/taichi/core/interface.cpp index 4c229547a3624..15ff99610eb22 100644 --- a/taichi/core/interface.cpp +++ b/taichi/core/interface.cpp @@ -3,4 +3,4 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include +#include "taichi/common/interface.h" diff --git a/taichi/core/interfaces.cpp b/taichi/core/interfaces.cpp index 01c1c62a60423..ef60e74a6f662 100644 --- a/taichi/core/interfaces.cpp +++ b/taichi/core/interfaces.cpp @@ -4,10 +4,10 @@ *******************************************************************************/ #include -#include +#include "taichi/common/interface.h" #include -#include -#include +#include "taichi/common/task.h" +#include "taichi/system/benchmark.h" TI_NAMESPACE_BEGIN diff --git a/taichi/core/logging.cpp b/taichi/core/logging.cpp index 30ac03072bf5e..114402fa051a0 100644 --- a/taichi/core/logging.cpp +++ b/taichi/core/logging.cpp @@ -3,10 +3,10 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/common/util.h" +#include "taichi/system/threading.h" #include -#include +#include "taichi/python/export.h" #include "spdlog/common.h" #include "spdlog/spdlog.h" #include "spdlog/sinks/stdout_color_sinks.h" diff --git a/taichi/core/testing.cpp b/taichi/core/testing.cpp index 9c3da5276eb34..fda6f601ea1ca 100644 --- a/taichi/core/testing.cpp +++ b/taichi/core/testing.cpp @@ -4,7 +4,7 @@ *******************************************************************************/ #define CATCH_CONFIG_RUNNER -#include +#include "taichi/common/testing.h" TI_NAMESPACE_BEGIN diff --git a/taichi/gui/cocoa.cpp b/taichi/gui/cocoa.cpp index 57ed1e2f2e9b2..80b01a47ea2fd 100644 --- a/taichi/gui/cocoa.cpp +++ b/taichi/gui/cocoa.cpp @@ -1,10 +1,10 @@ -#include -#include -#include +#include "taichi/common/bit.h" +#include "taichi/common/task.h" +#include "taichi/gui/gui.h" #if defined(TI_GUI_COCOA) -#include +#include "taichi/platform/mac/objc_api.h" #include #include diff --git a/taichi/gui/gui.cpp b/taichi/gui/gui.cpp index 127d40fd91e8a..989955dea9913 100644 --- a/taichi/gui/gui.cpp +++ b/taichi/gui/gui.cpp @@ -1,4 +1,4 @@ -#include +#include "taichi/gui/gui.h" TI_NAMESPACE_BEGIN diff --git a/taichi/gui/gui.h b/taichi/gui/gui.h index 56a7d07bc9402..b40fc90037073 100644 --- a/taichi/gui/gui.h +++ b/taichi/gui/gui.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include "taichi/math/math.h" +#include "taichi/system/timer.h" +#include "taichi/program/profiler.h" #include #include diff --git a/taichi/gui/win32.cpp b/taichi/gui/win32.cpp index 33f4a0177436f..817b40ce9e619 100644 --- a/taichi/gui/win32.cpp +++ b/taichi/gui/win32.cpp @@ -1,9 +1,9 @@ -#include +#include "taichi/common/util.h" #if defined(TI_PLATFORM_WINDOWS) #include -#include -#include +#include "taichi/common/task.h" +#include "taichi/gui/gui.h" #include // Note: some code is copied from MSDN: diff --git a/taichi/gui/x11.cpp b/taichi/gui/x11.cpp index c0aa7cea3c9be..84aaf919ef174 100644 --- a/taichi/gui/x11.cpp +++ b/taichi/gui/x11.cpp @@ -1,4 +1,4 @@ -#include +#include "taichi/gui/gui.h" #if defined(TI_GUI_X11) #include diff --git a/taichi/ir/expr.h b/taichi/ir/expr.h index a9a266288ca93..64ff3a280a192 100644 --- a/taichi/ir/expr.h +++ b/taichi/ir/expr.h @@ -1,5 +1,5 @@ #pragma once -#include +#include "taichi/lang_util.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/ir/frontend.h b/taichi/ir/frontend.h index 7721cce780a29..ecf1781cef4d2 100644 --- a/taichi/ir/frontend.h +++ b/taichi/ir/frontend.h @@ -5,9 +5,9 @@ #include #endif -#include -#include -#include +#include "taichi/common/util.h" +#include "taichi/common/dict.h" +#include "taichi/util/io.h" namespace taichi { static_assert( diff --git a/taichi/ir/scratch_pad.h b/taichi/ir/scratch_pad.h index 349c0fab3cb31..6d1009be8a707 100644 --- a/taichi/ir/scratch_pad.h +++ b/taichi/ir/scratch_pad.h @@ -1,4 +1,4 @@ -#include +#include "taichi/common/testing.h" #include "taichi/ir/frontend.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/jit/jit_arch_cuda.cpp b/taichi/jit/jit_arch_cuda.cpp index d793c2379cedf..5b389f1039c79 100644 --- a/taichi/jit/jit_arch_cuda.cpp +++ b/taichi/jit/jit_arch_cuda.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include "taichi/backends/cuda/cuda_context.h" #endif #include "llvm/ADT/StringRef.h" #include "llvm/IR/DataLayout.h" @@ -21,10 +21,10 @@ #include #include #include -#include -#include -#include -#include +#include "taichi/backends/cuda/cuda_utils.h" +#include "taichi/program/program.h" +#include "taichi/runtime/llvm/context.h" +#include "taichi/system/timer.h" #include "taichi/lang_util.h" #include "jit_session.h" diff --git a/taichi/lang_util.h b/taichi/lang_util.h index 2c4e18bbc8801..f74f2fd325dc7 100644 --- a/taichi/lang_util.h +++ b/taichi/lang_util.h @@ -1,9 +1,9 @@ // Definitions of utility functions and enums #pragma once -#include -#include -#include +#include "taichi/util/io.h" +#include "taichi/common/util.h" +#include "taichi/system/profiler.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/llvm/llvm_context.cpp b/taichi/llvm/llvm_context.cpp index d73d63b0e693b..b6433b7a13e61 100644 --- a/taichi/llvm/llvm_context.cpp +++ b/taichi/llvm/llvm_context.cpp @@ -28,7 +28,7 @@ #include "taichi/lang_util.h" #include "llvm_context.h" -#include +#include "taichi/jit/jit_session.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/math/array_fwd.h b/taichi/math/array_fwd.h index d0aaeb49312c7..9da305eaa92bd 100644 --- a/taichi/math/array_fwd.h +++ b/taichi/math/array_fwd.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "taichi/common/util.h" TI_NAMESPACE_BEGIN diff --git a/taichi/math/geometry_util.h b/taichi/math/geometry_util.h index 32180136f1a55..1181d69032632 100644 --- a/taichi/math/geometry_util.h +++ b/taichi/math/geometry_util.h @@ -7,7 +7,7 @@ #include -#include +#include "taichi/common/util.h" #include "linalg.h" TI_NAMESPACE_BEGIN diff --git a/taichi/math/linalg.h b/taichi/math/linalg.h index 15a4cfe457a25..4fbd1f1fb1e57 100644 --- a/taichi/math/linalg.h +++ b/taichi/math/linalg.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include "taichi/common/util.h" #include "scalar.h" #include "array_fwd.h" TI_NAMESPACE_BEGIN diff --git a/taichi/math/math.h b/taichi/math/math.h index 2ad8b7e769b5b..552bd185453c7 100644 --- a/taichi/math/math.h +++ b/taichi/math/math.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "taichi/common/util.h" #include "geometry_util.h" #include "array.h" #include "linalg.h" diff --git a/taichi/math/scalar.h b/taichi/math/scalar.h index 5369899f26d21..2b606e542c3dc 100644 --- a/taichi/math/scalar.h +++ b/taichi/math/scalar.h @@ -6,7 +6,7 @@ #pragma once #include -#include +#include "taichi/common/util.h" TI_NAMESPACE_BEGIN diff --git a/taichi/math/sifakis_svd.h b/taichi/math/sifakis_svd.h index 49fe88efe4919..1c03ea5d8c972 100644 --- a/taichi/math/sifakis_svd.h +++ b/taichi/math/sifakis_svd.h @@ -1,6 +1,6 @@ #include #include -#include +#include "taichi/common/util.h" namespace SifakisSVD { diff --git a/taichi/platform/mac/objc_api.h b/taichi/platform/mac/objc_api.h index daec7c5c25dce..87a24500edf7d 100644 --- a/taichi/platform/mac/objc_api.h +++ b/taichi/platform/mac/objc_api.h @@ -1,6 +1,6 @@ #include -#include +#include "taichi/common/util.h" #ifdef TI_PLATFORM_OSX diff --git a/taichi/platform/opengl/opengl_api.cpp b/taichi/platform/opengl/opengl_api.cpp index 54065f7126f58..dbb9d01e2272b 100644 --- a/taichi/platform/opengl/opengl_api.cpp +++ b/taichi/platform/opengl/opengl_api.cpp @@ -1,5 +1,5 @@ #include "opengl_api.h" -#include +#include "taichi/program/program.h" #ifdef TI_WITH_OPENGL #include diff --git a/taichi/platform/opengl/opengl_api.h b/taichi/platform/opengl/opengl_api.h index 6727b89082c41..422b3166fb717 100644 --- a/taichi/platform/opengl/opengl_api.h +++ b/taichi/platform/opengl/opengl_api.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "taichi/common/util.h" #include #include diff --git a/taichi/platform/opengl/opengl_data_types.h b/taichi/platform/opengl/opengl_data_types.h index 74ed36b3a7809..7e0d13e5becd3 100644 --- a/taichi/platform/opengl/opengl_data_types.h +++ b/taichi/platform/opengl/opengl_data_types.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "taichi/lang_util.h" #include TLANG_NAMESPACE_BEGIN diff --git a/taichi/platform/opengl/opengl_kernel_util.h b/taichi/platform/opengl/opengl_kernel_util.h index 463253f8f54d9..9cc82b8ec0d21 100644 --- a/taichi/platform/opengl/opengl_kernel_util.h +++ b/taichi/platform/opengl/opengl_kernel_util.h @@ -3,7 +3,7 @@ #include #include -#include +#include "taichi/ir/statements.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/program/kernel.cpp b/taichi/program/kernel.cpp index 9d4616bf2dcb3..d89145be6c3ec 100644 --- a/taichi/program/kernel.cpp +++ b/taichi/program/kernel.cpp @@ -1,4 +1,4 @@ -#include +#include "taichi/common/task.h" #include "kernel.h" #include "program.h" #if defined(TI_WITH_CUDA) diff --git a/taichi/program/profiler.cpp b/taichi/program/profiler.cpp index 7a9def4213c46..d86eec5a0c6bc 100644 --- a/taichi/program/profiler.cpp +++ b/taichi/program/profiler.cpp @@ -1,6 +1,6 @@ #include "profiler.h" -#include +#include "taichi/system/timer.h" #if defined(TI_WITH_CUDA) #include diff --git a/taichi/python/exception.cpp b/taichi/python/exception.cpp index b7e420870f3ce..84339632d7f90 100644 --- a/taichi/python/exception.cpp +++ b/taichi/python/exception.cpp @@ -3,7 +3,7 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include +#include "taichi/python/exception.h" TI_NAMESPACE_BEGIN diff --git a/taichi/python/exception.h b/taichi/python/exception.h index a677012026235..43991eed42146 100644 --- a/taichi/python/exception.h +++ b/taichi/python/exception.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "taichi/common/interface.h" #include TI_NAMESPACE_BEGIN diff --git a/taichi/python/export.cpp b/taichi/python/export.cpp index ee5cbfb407f9d..22f448249fd38 100644 --- a/taichi/python/export.cpp +++ b/taichi/python/export.cpp @@ -3,9 +3,9 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include -#include +#include "taichi/python/export.h" +#include "taichi/common/interface.h" +#include "taichi/util/io.h" TI_NAMESPACE_BEGIN diff --git a/taichi/python/export.h b/taichi/python/export.h index 1f5f4e415e55b..e19fa360bcf3c 100644 --- a/taichi/python/export.h +++ b/taichi/python/export.h @@ -25,8 +25,8 @@ #pragma GCC diagnostic ignored "-Wunused-function" #include #pragma GCC diagnostic pop -#include -#include +#include "taichi/util/io.h" +#include "taichi/common/util.h" TI_NAMESPACE_BEGIN diff --git a/taichi/python/export_lang.cpp b/taichi/python/export_lang.cpp index 51c586bb122c6..e249d39783930 100644 --- a/taichi/python/export_lang.cpp +++ b/taichi/python/export_lang.cpp @@ -3,10 +3,10 @@ #include "taichi/ir/frontend.h" #include #include -#include -#include -#include -#include +#include "taichi/program/extension.h" +#include "taichi/common/interface.h" +#include "taichi/python/export.h" +#include "taichi/gui/gui.h" #include "taichi/math/svd.h" TI_NAMESPACE_BEGIN @@ -46,7 +46,7 @@ void export_lang(py::module &m) { py::enum_(m, "Arch", py::arithmetic()) #define PER_ARCH(x) .value(#x, Arch::x) -#include +#include "taichi/inc/archs.inc.h" #undef PER_ARCH .export_values(); @@ -55,13 +55,13 @@ void export_lang(py::module &m) { py::enum_(m, "SNodeType", py::arithmetic()) #define PER_SNODE(x) .value(#x, SNodeType::x) -#include +#include "taichi/inc/snodes.inc.h" #undef PER_SNODE .export_values(); py::enum_(m, "Extension", py::arithmetic()) #define PER_EXTENSION(x) .value(#x, Extension::x) -#include +#include "taichi/inc/extensions.inc.h" #undef PER_EXTENSION .export_values(); diff --git a/taichi/python/export_math.cpp b/taichi/python/export_math.cpp index 06eb7cb7b4854..acaccecaf6d6c 100644 --- a/taichi/python/export_math.cpp +++ b/taichi/python/export_math.cpp @@ -3,8 +3,8 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/python/export.h" +#include "taichi/common/dict.h" TI_NAMESPACE_BEGIN diff --git a/taichi/python/export_misc.cpp b/taichi/python/export_misc.cpp index 34afffd61229f..eab269fb159be 100644 --- a/taichi/python/export_misc.cpp +++ b/taichi/python/export_misc.cpp @@ -3,17 +3,17 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "taichi/common/util.h" +#include "taichi/common/task.h" +#include "taichi/math/math.h" +#include "taichi/python/exception.h" +#include "taichi/python/export.h" +#include "taichi/system/benchmark.h" +#include "taichi/system/profiler.h" +#include "taichi/system/memory_usage_monitor.h" +#include "taichi/system/unit_dll.h" +#include "taichi/backends/metal/api.h" +#include "taichi/platform/opengl/opengl_api.h" #if defined(TI_WITH_CUDA) #include #endif diff --git a/taichi/python/export_visual.cpp b/taichi/python/export_visual.cpp index de90b056d2865..999ec17e680b5 100644 --- a/taichi/python/export_visual.cpp +++ b/taichi/python/export_visual.cpp @@ -3,9 +3,9 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include -#include +#include "taichi/python/export.h" +#include "taichi/util/image_io.h" +#include "taichi/gui/gui.h" TI_NAMESPACE_BEGIN diff --git a/taichi/struct/struct_opengl.h b/taichi/struct/struct_opengl.h index c4c831c80df21..f2d3094d65c86 100644 --- a/taichi/struct/struct_opengl.h +++ b/taichi/struct/struct_opengl.h @@ -1,9 +1,9 @@ // Codegen for the hierarchical data structure #pragma once -#include -#include -#include +#include "taichi/platform/opengl/opengl_kernel_util.h" +#include "taichi/platform/opengl/opengl_data_types.h" +#include "taichi/ir/snode.h" #include #include diff --git a/taichi/system/benchmark.h b/taichi/system/benchmark.h index ea0f776c88494..6642510c285ca 100644 --- a/taichi/system/benchmark.h +++ b/taichi/system/benchmark.h @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "taichi/common/interface.h" +#include "taichi/system/timer.h" TI_NAMESPACE_BEGIN diff --git a/taichi/system/demangling.cpp b/taichi/system/demangling.cpp index 644f6a45a14b3..64599781c4f18 100644 --- a/taichi/system/demangling.cpp +++ b/taichi/system/demangling.cpp @@ -3,8 +3,8 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/common/util.h" +#include "taichi/common/task.h" #if !defined(_WIN64) #include #endif diff --git a/taichi/system/memory_pool.cpp b/taichi/system/memory_pool.cpp index 4ad93e8c3e311..410bc6271aad3 100644 --- a/taichi/system/memory_pool.cpp +++ b/taichi/system/memory_pool.cpp @@ -1,5 +1,5 @@ #include "memory_pool.h" -#include +#include "taichi/system/timer.h" #include "taichi/backends/cuda/cuda_utils.h" #if TI_WITH_CUDA #include diff --git a/taichi/system/memory_usage_monitor.cpp b/taichi/system/memory_usage_monitor.cpp index 74e202524ea9c..72a850155c41f 100644 --- a/taichi/system/memory_usage_monitor.cpp +++ b/taichi/system/memory_usage_monitor.cpp @@ -1,10 +1,10 @@ -#include -#include -#include -#include -#include -#include -#include +#include "taichi/system/memory_usage_monitor.h" +#include "taichi/system/timer.h" +#include "taichi/common/util.h" +#include "taichi/common/task.h" +#include "taichi/system/threading.h" +#include "taichi/system/timer.h" +#include "taichi/math/scalar.h" #include #include diff --git a/taichi/system/profiler.cpp b/taichi/system/profiler.cpp index 57ff69a17ef3f..8ef9c45092304 100644 --- a/taichi/system/profiler.cpp +++ b/taichi/system/profiler.cpp @@ -1,4 +1,4 @@ -#include +#include "taichi/system/profiler.h" TI_NAMESPACE_BEGIN diff --git a/taichi/system/profiler.h b/taichi/system/profiler.h index 83f74ee21320a..3c193b58113c7 100644 --- a/taichi/system/profiler.h +++ b/taichi/system/profiler.h @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "taichi/common/util.h" +#include "taichi/system/timer.h" #include "spdlog/fmt/bundled/color.h" #include #include diff --git a/taichi/system/run_tests.cpp b/taichi/system/run_tests.cpp index 127ead7ab2fa6..5b99dc3b31328 100644 --- a/taichi/system/run_tests.cpp +++ b/taichi/system/run_tests.cpp @@ -3,9 +3,9 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include -#include +#include "taichi/common/util.h" +#include "taichi/common/task.h" +#include "taichi/common/testing.h" TI_NAMESPACE_BEGIN diff --git a/taichi/system/threading.cpp b/taichi/system/threading.cpp index 9855f01ab6ed0..f58502e9d44c2 100644 --- a/taichi/system/threading.cpp +++ b/taichi/system/threading.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include "taichi/system/threading.h" #include #include #if defined(TI_PLATFORM_WINDOWS) diff --git a/taichi/system/threading.h b/taichi/system/threading.h index 046fcbeb0f77e..17ba939221905 100644 --- a/taichi/system/threading.h +++ b/taichi/system/threading.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include "taichi/common/util.h" #include TI_NAMESPACE_BEGIN diff --git a/taichi/system/timer.cpp b/taichi/system/timer.cpp index 1daff9e8edaec..85ce58f540b8a 100644 --- a/taichi/system/timer.cpp +++ b/taichi/system/timer.cpp @@ -3,7 +3,7 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include +#include "taichi/system/timer.h" #ifndef _WIN64 diff --git a/taichi/system/timer.h b/taichi/system/timer.h index a3bd119d6f122..82be2e1d6d839 100644 --- a/taichi/system/timer.h +++ b/taichi/system/timer.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include "taichi/common/util.h" #if defined(TI_PLATFORM_UNIX) #include #else diff --git a/taichi/system/traceback.cpp b/taichi/system/traceback.cpp index 2f5de3b55ebdd..d1d493caeffff 100644 --- a/taichi/system/traceback.cpp +++ b/taichi/system/traceback.cpp @@ -3,7 +3,7 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include +#include "taichi/common/util.h" #include #include #include "spdlog/fmt/bundled/color.h" diff --git a/taichi/system/unified_allocator.cpp b/taichi/system/unified_allocator.cpp index dabd82c581c12..6856abc9d8009 100644 --- a/taichi/system/unified_allocator.cpp +++ b/taichi/system/unified_allocator.cpp @@ -4,9 +4,9 @@ #include "taichi/backends/cuda/cuda_utils.h" #endif #include "taichi/lang_util.h" -#include -#include -#include +#include "taichi/system/unified_allocator.h" +#include "taichi/system/virtual_memory.h" +#include "taichi/system/timer.h" #include TLANG_NAMESPACE_BEGIN diff --git a/taichi/system/unit_dll.h b/taichi/system/unit_dll.h index 7d4efcdf7999d..c0def57d7e3ff 100644 --- a/taichi/system/unit_dll.h +++ b/taichi/system/unit_dll.h @@ -9,7 +9,7 @@ #include #endif -#include +#include "taichi/common/interface.h" TI_NAMESPACE_BEGIN diff --git a/taichi/system/virtual_memory.h b/taichi/system/virtual_memory.h index de0a061f49ad0..f5f4dd68f48fb 100644 --- a/taichi/system/virtual_memory.h +++ b/taichi/system/virtual_memory.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "taichi/common/util.h" #if defined(TI_PLATFORM_UNIX) #include diff --git a/taichi/transforms/type_check.cpp b/taichi/transforms/type_check.cpp index 1b81d88811923..8496a9a28af75 100644 --- a/taichi/transforms/type_check.cpp +++ b/taichi/transforms/type_check.cpp @@ -1,7 +1,7 @@ // Type checking #include "taichi/ir/ir.h" -#include +#include "taichi/ir/frontend.h" TLANG_NAMESPACE_BEGIN diff --git a/taichi/util/base64.h b/taichi/util/base64.h index 75ed44e9f6a0c..e2f85f56acb93 100644 --- a/taichi/util/base64.h +++ b/taichi/util/base64.h @@ -1,4 +1,4 @@ -#include +#include "taichi/common/util.h" TI_NAMESPACE_BEGIN /* diff --git a/taichi/util/image_buffer.cpp b/taichi/util/image_buffer.cpp index c8ac0ade84678..9ae21938dddcc 100644 --- a/taichi/util/image_buffer.cpp +++ b/taichi/util/image_buffer.cpp @@ -3,9 +3,9 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include -#include +#include "taichi/math/math.h" +#include "taichi/math/linalg.h" +#include "taichi/util/base64.h" #define STBI_FAILURE_USERMSG #define STB_IMAGE_IMPLEMENTATION diff --git a/taichi/util/image_io.cpp b/taichi/util/image_io.cpp index de34ff56e0be2..5419ebc15e057 100644 --- a/taichi/util/image_io.cpp +++ b/taichi/util/image_io.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "taichi/common/util.h" +#include "taichi/util/image_io.h" #include #include diff --git a/taichi/util/io.h b/taichi/util/io.h index 3d8331496ea81..e66338d73d86c 100644 --- a/taichi/util/io.h +++ b/taichi/util/io.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "taichi/common/util.h" #include #include #include diff --git a/taichi/util/zip.cpp b/taichi/util/zip.cpp index 83dc599db84c2..1c1c14b0aa874 100644 --- a/taichi/util/zip.cpp +++ b/taichi/util/zip.cpp @@ -1,4 +1,4 @@ -#include +#include "taichi/common/util.h" #if defined(__GNUC__) // Ensure we get the 64-bit variants of the CRT's file I/O calls diff --git a/tests/cpp/test_alg_simp.cpp b/tests/cpp/test_alg_simp.cpp index 3321e529ed040..62d6f09504c2d 100644 --- a/tests/cpp/test_alg_simp.cpp +++ b/tests/cpp/test_alg_simp.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "taichi/ir/frontend.h" +#include "taichi/common/testing.h" TLANG_NAMESPACE_BEGIN diff --git a/tests/cpp/test_dict.cpp b/tests/cpp/test_dict.cpp index 5fe8be982cdc9..64ff350cea39c 100644 --- a/tests/cpp/test_dict.cpp +++ b/tests/cpp/test_dict.cpp @@ -3,8 +3,8 @@ The use of this software is governed by the LICENSE file. *******************************************************************************/ -#include -#include +#include "taichi/common/dict.h" +#include "taichi/common/testing.h" TI_NAMESPACE_BEGIN diff --git a/tests/cpp/test_exception_handling.cpp b/tests/cpp/test_exception_handling.cpp index e48ab0045dd94..2e877b61c56d4 100644 --- a/tests/cpp/test_exception_handling.cpp +++ b/tests/cpp/test_exception_handling.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "taichi/common/task.h" +#include "taichi/ir/ir.h" TLANG_NAMESPACE_BEGIN diff --git a/tests/cpp/test_gui.cpp b/tests/cpp/test_gui.cpp index 2a278ade98464..cefe78bd0fd64 100644 --- a/tests/cpp/test_gui.cpp +++ b/tests/cpp/test_gui.cpp @@ -1,7 +1,7 @@ // Note: this is not really a test case. -#include -#include +#include "taichi/gui/gui.h" +#include "taichi/common/task.h" TI_NAMESPACE_BEGIN diff --git a/tests/cpp/test_simplify.cpp b/tests/cpp/test_simplify.cpp index 3c327f9a2d185..3355a4b42e408 100644 --- a/tests/cpp/test_simplify.cpp +++ b/tests/cpp/test_simplify.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "taichi/ir/frontend.h" +#include "taichi/common/testing.h" TLANG_NAMESPACE_BEGIN