Skip to content

Commit

Permalink
[misc] Enforce the use of #include "taichi/..." (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichi-gardener authored Mar 31, 2020
1 parent a742a9f commit 30701fc
Show file tree
Hide file tree
Showing 74 changed files with 147 additions and 147 deletions.
4 changes: 2 additions & 2 deletions taichi/backends/cuda/cuda_context.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#if defined(TI_WITH_CUDA)
#define TI_RUNTIME_HOST

#include <taichi/lang_util.h>
#include <taichi/program/program.h>
#include "taichi/lang_util.h"
#include "taichi/program/program.h"

#include "cuda_context.h"

Expand Down
4 changes: 2 additions & 2 deletions taichi/backends/cuda/cuda_context.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#if defined(TI_WITH_CUDA)
#include <taichi/program/profiler.h>
#include <taichi/backends/cuda/cuda_utils.h>
#include "taichi/program/profiler.h"
#include "taichi/backends/cuda/cuda_utils.h"
#include <mutex>

TLANG_NAMESPACE_BEGIN
Expand Down
2 changes: 1 addition & 1 deletion taichi/backends/cuda/cuda_utils.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#if defined(TI_WITH_CUDA)

#include <taichi/lang_util.h>
#include "taichi/lang_util.h"
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <driver_types.h>
Expand Down
2 changes: 1 addition & 1 deletion taichi/codegen/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "codegen.h"
#include "codegen_cpu.h"
#include "codegen_cuda.h"
#include <taichi/system/timer.h>
#include "taichi/system/timer.h"

TLANG_NAMESPACE_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions taichi/codegen/codegen_cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// x86 backend implementation

#include <taichi/common/util.h>
#include <taichi/util/io.h>
#include "taichi/common/util.h"
#include "taichi/util/io.h"
#include <set>
#include "codegen_cpu.h"
#include "taichi/lang_util.h"
Expand Down
4 changes: 2 additions & 2 deletions taichi/codegen/codegen_llvm_cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <taichi/common/util.h>
#include <taichi/util/io.h>
#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"
Expand Down
8 changes: 4 additions & 4 deletions taichi/codegen/codegen_opengl.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//#define _GLSL_DEBUG 1
#include "codegen_opengl.h"
#include <taichi/platform/opengl/opengl_api.h>
#include <taichi/platform/opengl/opengl_data_types.h>
#include "taichi/platform/opengl/opengl_api.h"
#include "taichi/platform/opengl/opengl_data_types.h"

#include <string>
#include <taichi/ir/ir.h>
#include <taichi/util/line_appender.h>
#include "taichi/ir/ir.h"
#include "taichi/util/line_appender.h"

TLANG_NAMESPACE_BEGIN
namespace opengl {
Expand Down
2 changes: 1 addition & 1 deletion taichi/common/dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <sstream>
#include <typeinfo>

#include <taichi/math/math.h>
#include "taichi/math/math.h"
#include "util.h"

TI_NAMESPACE_BEGIN
Expand Down
2 changes: 1 addition & 1 deletion taichi/common/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include <taichi/common/dict.h>
#include "taichi/common/dict.h"
#include <cstring>
#include <string>
#include <map>
Expand Down
4 changes: 2 additions & 2 deletions taichi/core/bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The use of this software is governed by the LICENSE file.
*******************************************************************************/

#include <taichi/common/testing.h>
#include <taichi/common/bit.h>
#include "taichi/common/testing.h"
#include "taichi/common/bit.h"

TI_NAMESPACE_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions taichi/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The use of this software is governed by the LICENSE file.
*******************************************************************************/

#include <taichi/common/util.h>
#include <taichi/common/version.h>
#include "taichi/common/util.h"
#include "taichi/common/version.h"

TI_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/core/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
The use of this software is governed by the LICENSE file.
*******************************************************************************/

#include <taichi/common/interface.h>
#include "taichi/common/interface.h"
6 changes: 3 additions & 3 deletions taichi/core/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
*******************************************************************************/

#include <functional>
#include <taichi/common/interface.h>
#include "taichi/common/interface.h"
#include <pybind11/pybind11.h>
#include <taichi/common/task.h>
#include <taichi/system/benchmark.h>
#include "taichi/common/task.h"
#include "taichi/system/benchmark.h"

TI_NAMESPACE_BEGIN

Expand Down
6 changes: 3 additions & 3 deletions taichi/core/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
The use of this software is governed by the LICENSE file.
*******************************************************************************/

#include <taichi/common/util.h>
#include <taichi/system/threading.h>
#include "taichi/common/util.h"
#include "taichi/system/threading.h"
#include <csignal>
#include <taichi/python/export.h>
#include "taichi/python/export.h"
#include "spdlog/common.h"
#include "spdlog/spdlog.h"
#include "spdlog/sinks/stdout_color_sinks.h"
Expand Down
2 changes: 1 addition & 1 deletion taichi/core/testing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*******************************************************************************/

#define CATCH_CONFIG_RUNNER
#include <taichi/common/testing.h>
#include "taichi/common/testing.h"

TI_NAMESPACE_BEGIN

Expand Down
8 changes: 4 additions & 4 deletions taichi/gui/cocoa.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <taichi/common/bit.h>
#include <taichi/common/task.h>
#include <taichi/gui/gui.h>
#include "taichi/common/bit.h"
#include "taichi/common/task.h"
#include "taichi/gui/gui.h"

#if defined(TI_GUI_COCOA)

#include <taichi/platform/mac/objc_api.h>
#include "taichi/platform/mac/objc_api.h"

#include <algorithm>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion taichi/gui/gui.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <taichi/gui/gui.h>
#include "taichi/gui/gui.h"

TI_NAMESPACE_BEGIN

Expand Down
6 changes: 3 additions & 3 deletions taichi/gui/gui.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <taichi/math/math.h>
#include <taichi/system/timer.h>
#include <taichi/program/profiler.h>
#include "taichi/math/math.h"
#include "taichi/system/timer.h"
#include "taichi/program/profiler.h"
#include <ctime>
#include <numeric>

Expand Down
6 changes: 3 additions & 3 deletions taichi/gui/win32.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <taichi/common/util.h>
#include "taichi/common/util.h"

#if defined(TI_PLATFORM_WINDOWS)
#include <windowsx.h>
#include <taichi/common/task.h>
#include <taichi/gui/gui.h>
#include "taichi/common/task.h"
#include "taichi/gui/gui.h"
#include <map>

// Note: some code is copied from MSDN:
Expand Down
2 changes: 1 addition & 1 deletion taichi/gui/x11.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <taichi/gui/gui.h>
#include "taichi/gui/gui.h"

#if defined(TI_GUI_X11)
#include <X11/Xlib.h>
Expand Down
2 changes: 1 addition & 1 deletion taichi/ir/expr.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <taichi/lang_util.h>
#include "taichi/lang_util.h"

TLANG_NAMESPACE_BEGIN

Expand Down
6 changes: 3 additions & 3 deletions taichi/ir/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <cuda_runtime.h>
#endif

#include <taichi/common/util.h>
#include <taichi/common/dict.h>
#include <taichi/util/io.h>
#include "taichi/common/util.h"
#include "taichi/common/dict.h"
#include "taichi/util/io.h"

namespace taichi {
static_assert(
Expand Down
2 changes: 1 addition & 1 deletion taichi/ir/scratch_pad.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <taichi/common/testing.h>
#include "taichi/common/testing.h"
#include "taichi/ir/frontend.h"

TLANG_NAMESPACE_BEGIN
Expand Down
10 changes: 5 additions & 5 deletions taichi/jit/jit_arch_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <memory>
#include <cuda_runtime_api.h>
#include <cuda.h>
#include <taichi/backends/cuda/cuda_context.h>
#include "taichi/backends/cuda/cuda_context.h"
#endif
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/DataLayout.h"
Expand All @@ -21,10 +21,10 @@
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h>
#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/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"

Expand Down
6 changes: 3 additions & 3 deletions taichi/lang_util.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Definitions of utility functions and enums

#pragma once
#include <taichi/util/io.h>
#include <taichi/common/util.h>
#include <taichi/system/profiler.h>
#include "taichi/util/io.h"
#include "taichi/common/util.h"
#include "taichi/system/profiler.h"

TLANG_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/llvm/llvm_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "taichi/lang_util.h"
#include "llvm_context.h"
#include <taichi/jit/jit_session.h>
#include "taichi/jit/jit_session.h"

TLANG_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/math/array_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include <taichi/common/util.h>
#include "taichi/common/util.h"

TI_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/math/geometry_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <vector>

#include <taichi/common/util.h>
#include "taichi/common/util.h"
#include "linalg.h"

TI_NAMESPACE_BEGIN
Expand Down
2 changes: 1 addition & 1 deletion taichi/math/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <functional>
#include <vector>
#include <array>
#include <taichi/common/util.h>
#include "taichi/common/util.h"
#include "scalar.h"
#include "array_fwd.h"
TI_NAMESPACE_BEGIN
Expand Down
2 changes: 1 addition & 1 deletion taichi/math/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include <taichi/common/util.h>
#include "taichi/common/util.h"
#include "geometry_util.h"
#include "array.h"
#include "linalg.h"
Expand Down
2 changes: 1 addition & 1 deletion taichi/math/scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#pragma once

#include <cmath>
#include <taichi/common/util.h>
#include "taichi/common/util.h"

TI_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/math/sifakis_svd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <cmath>
#include <algorithm>
#include <taichi/common/util.h>
#include "taichi/common/util.h"

namespace SifakisSVD {

Expand Down
2 changes: 1 addition & 1 deletion taichi/platform/mac/objc_api.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <string>

#include <taichi/common/util.h>
#include "taichi/common/util.h"

#ifdef TI_PLATFORM_OSX

Expand Down
2 changes: 1 addition & 1 deletion taichi/platform/opengl/opengl_api.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "opengl_api.h"
#include <taichi/program/program.h>
#include "taichi/program/program.h"

#ifdef TI_WITH_OPENGL
#include <GL/glew.h>
Expand Down
2 changes: 1 addition & 1 deletion taichi/platform/opengl/opengl_api.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <taichi/common/util.h>
#include "taichi/common/util.h"

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion taichi/platform/opengl/opengl_data_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <taichi/lang_util.h>
#include "taichi/lang_util.h"
#include <string>

TLANG_NAMESPACE_BEGIN
Expand Down
2 changes: 1 addition & 1 deletion taichi/platform/opengl/opengl_kernel_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string>
#include <vector>

#include <taichi/ir/statements.h>
#include "taichi/ir/statements.h"

TLANG_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion taichi/program/kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <taichi/common/task.h>
#include "taichi/common/task.h"
#include "kernel.h"
#include "program.h"
#if defined(TI_WITH_CUDA)
Expand Down
2 changes: 1 addition & 1 deletion taichi/program/profiler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "profiler.h"

#include <taichi/system/timer.h>
#include "taichi/system/timer.h"

#if defined(TI_WITH_CUDA)
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion taichi/python/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The use of this software is governed by the LICENSE file.
*******************************************************************************/

#include <taichi/python/exception.h>
#include "taichi/python/exception.h"

TI_NAMESPACE_BEGIN

Expand Down
Loading

0 comments on commit 30701fc

Please sign in to comment.