gstaichi 0.1.23.dev0__cp310-cp310-macosx_15_0_arm64.whl → 1.0.1__cp310-cp310-macosx_15_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gstaichi/CHANGELOG.md +6 -0
- gstaichi/__init__.py +40 -0
- {taichi → gstaichi}/_funcs.py +8 -8
- {taichi → gstaichi}/_kernels.py +19 -19
- gstaichi/_lib/__init__.py +3 -0
- taichi/_lib/core/taichi_python.cpython-310-darwin.so → gstaichi/_lib/core/gstaichi_python.cpython-310-darwin.so +0 -0
- taichi/_lib/core/taichi_python.pyi → gstaichi/_lib/core/gstaichi_python.pyi +382 -520
- {taichi → gstaichi}/_lib/runtime/runtime_arm64.bc +0 -0
- {taichi → gstaichi}/_lib/utils.py +15 -15
- {taichi → gstaichi}/_logging.py +1 -1
- gstaichi/_snode/__init__.py +5 -0
- {taichi → gstaichi}/_snode/fields_builder.py +27 -29
- {taichi → gstaichi}/_snode/snode_tree.py +5 -5
- gstaichi/_test_tools/__init__.py +0 -0
- gstaichi/_test_tools/load_kernel_string.py +30 -0
- gstaichi/_version.py +1 -0
- {taichi → gstaichi}/_version_check.py +8 -5
- gstaichi/ad/__init__.py +3 -0
- {taichi → gstaichi}/ad/_ad.py +26 -26
- {taichi → gstaichi}/algorithms/_algorithms.py +7 -7
- {taichi → gstaichi}/examples/minimal.py +1 -1
- {taichi → gstaichi}/experimental.py +1 -1
- gstaichi/lang/__init__.py +50 -0
- {taichi → gstaichi}/lang/_ndarray.py +30 -26
- {taichi → gstaichi}/lang/_ndrange.py +8 -8
- gstaichi/lang/_template_mapper.py +199 -0
- {taichi → gstaichi}/lang/_texture.py +19 -19
- {taichi → gstaichi}/lang/_wrap_inspect.py +7 -7
- {taichi → gstaichi}/lang/any_array.py +13 -13
- {taichi → gstaichi}/lang/argpack.py +29 -29
- gstaichi/lang/ast/__init__.py +5 -0
- {taichi → gstaichi}/lang/ast/ast_transformer.py +94 -582
- {taichi → gstaichi}/lang/ast/ast_transformer_utils.py +54 -41
- gstaichi/lang/ast/ast_transformers/__init__.py +0 -0
- gstaichi/lang/ast/ast_transformers/call_transformer.py +267 -0
- gstaichi/lang/ast/ast_transformers/function_def_transformer.py +320 -0
- {taichi → gstaichi}/lang/ast/checkers.py +5 -5
- gstaichi/lang/ast/transform.py +9 -0
- {taichi → gstaichi}/lang/common_ops.py +12 -12
- gstaichi/lang/exception.py +80 -0
- {taichi → gstaichi}/lang/expr.py +22 -22
- {taichi → gstaichi}/lang/field.py +29 -27
- {taichi → gstaichi}/lang/impl.py +116 -121
- {taichi → gstaichi}/lang/kernel_arguments.py +16 -16
- {taichi → gstaichi}/lang/kernel_impl.py +330 -363
- {taichi → gstaichi}/lang/matrix.py +119 -115
- {taichi → gstaichi}/lang/matrix_ops.py +6 -6
- {taichi → gstaichi}/lang/matrix_ops_utils.py +4 -4
- {taichi → gstaichi}/lang/mesh.py +22 -22
- {taichi → gstaichi}/lang/misc.py +39 -68
- {taichi → gstaichi}/lang/ops.py +146 -141
- {taichi → gstaichi}/lang/runtime_ops.py +2 -2
- {taichi → gstaichi}/lang/shell.py +3 -3
- {taichi → gstaichi}/lang/simt/__init__.py +1 -1
- {taichi → gstaichi}/lang/simt/block.py +7 -7
- {taichi → gstaichi}/lang/simt/grid.py +1 -1
- {taichi → gstaichi}/lang/simt/subgroup.py +1 -1
- {taichi → gstaichi}/lang/simt/warp.py +1 -1
- {taichi → gstaichi}/lang/snode.py +46 -44
- {taichi → gstaichi}/lang/source_builder.py +13 -13
- {taichi → gstaichi}/lang/struct.py +33 -33
- {taichi → gstaichi}/lang/util.py +24 -24
- gstaichi/linalg/__init__.py +8 -0
- {taichi → gstaichi}/linalg/matrixfree_cg.py +14 -14
- {taichi → gstaichi}/linalg/sparse_cg.py +10 -10
- {taichi → gstaichi}/linalg/sparse_matrix.py +23 -23
- {taichi → gstaichi}/linalg/sparse_solver.py +21 -21
- {taichi → gstaichi}/math/__init__.py +1 -1
- {taichi → gstaichi}/math/_complex.py +21 -20
- {taichi → gstaichi}/math/mathimpl.py +56 -56
- gstaichi/profiler/__init__.py +6 -0
- {taichi → gstaichi}/profiler/kernel_metrics.py +11 -11
- {taichi → gstaichi}/profiler/kernel_profiler.py +30 -36
- {taichi → gstaichi}/profiler/memory_profiler.py +1 -1
- {taichi → gstaichi}/profiler/scoped_profiler.py +2 -2
- {taichi → gstaichi}/sparse/_sparse_grid.py +7 -7
- {taichi → gstaichi}/tools/__init__.py +4 -4
- {taichi → gstaichi}/tools/diagnose.py +10 -17
- gstaichi/types/__init__.py +19 -0
- {taichi → gstaichi}/types/annotations.py +1 -1
- {taichi → gstaichi}/types/compound_types.py +8 -8
- {taichi → gstaichi}/types/enums.py +1 -1
- {taichi → gstaichi}/types/ndarray_type.py +7 -7
- {taichi → gstaichi}/types/primitive_types.py +17 -14
- {taichi → gstaichi}/types/quant.py +9 -9
- {taichi → gstaichi}/types/texture_type.py +5 -5
- {taichi → gstaichi}/types/utils.py +1 -1
- {gstaichi-0.1.23.dev0.dist-info → gstaichi-1.0.1.dist-info}/METADATA +13 -16
- gstaichi-1.0.1.dist-info/RECORD +166 -0
- gstaichi-1.0.1.dist-info/top_level.txt +1 -0
- gstaichi-0.1.23.dev0.dist-info/RECORD +0 -219
- gstaichi-0.1.23.dev0.dist-info/entry_points.txt +0 -2
- gstaichi-0.1.23.dev0.dist-info/top_level.txt +0 -1
- taichi/__init__.py +0 -44
- taichi/__main__.py +0 -5
- taichi/_lib/__init__.py +0 -3
- taichi/_lib/c_api/include/taichi/cpp/taichi.hpp +0 -1401
- taichi/_lib/c_api/include/taichi/taichi.h +0 -29
- taichi/_lib/c_api/include/taichi/taichi_core.h +0 -1111
- taichi/_lib/c_api/include/taichi/taichi_cpu.h +0 -29
- taichi/_lib/c_api/include/taichi/taichi_metal.h +0 -72
- taichi/_lib/c_api/include/taichi/taichi_platform.h +0 -55
- taichi/_lib/c_api/include/taichi/taichi_unity.h +0 -64
- taichi/_lib/c_api/include/taichi/taichi_vulkan.h +0 -151
- taichi/_lib/c_api/lib/libtaichi_c_api.dylib +0 -0
- taichi/_lib/c_api/runtime/runtime_arm64.bc +0 -0
- taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiConfig.cmake +0 -29
- taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiConfigVersion.cmake +0 -65
- taichi/_lib/c_api/taichi/lib/cmake/taichi/TaichiTargets.cmake +0 -121
- taichi/_lib/runtime/libMoltenVK.dylib +0 -0
- taichi/_main.py +0 -552
- taichi/_snode/__init__.py +0 -5
- taichi/_ti_module/__init__.py +0 -3
- taichi/_ti_module/cppgen.py +0 -309
- taichi/_ti_module/module.py +0 -145
- taichi/_version.py +0 -1
- taichi/ad/__init__.py +0 -3
- taichi/aot/__init__.py +0 -12
- taichi/aot/_export.py +0 -28
- taichi/aot/conventions/__init__.py +0 -3
- taichi/aot/conventions/gfxruntime140/__init__.py +0 -38
- taichi/aot/conventions/gfxruntime140/dr.py +0 -244
- taichi/aot/conventions/gfxruntime140/sr.py +0 -613
- taichi/aot/module.py +0 -253
- taichi/aot/utils.py +0 -151
- taichi/graph/__init__.py +0 -3
- taichi/graph/_graph.py +0 -292
- taichi/lang/__init__.py +0 -50
- taichi/lang/ast/__init__.py +0 -5
- taichi/lang/ast/transform.py +0 -9
- taichi/lang/exception.py +0 -80
- taichi/linalg/__init__.py +0 -8
- taichi/profiler/__init__.py +0 -6
- taichi/shaders/Circles_vk.frag +0 -29
- taichi/shaders/Circles_vk.vert +0 -45
- taichi/shaders/Circles_vk_frag.spv +0 -0
- taichi/shaders/Circles_vk_vert.spv +0 -0
- taichi/shaders/Lines_vk.frag +0 -9
- taichi/shaders/Lines_vk.vert +0 -11
- taichi/shaders/Lines_vk_frag.spv +0 -0
- taichi/shaders/Lines_vk_vert.spv +0 -0
- taichi/shaders/Mesh_vk.frag +0 -71
- taichi/shaders/Mesh_vk.vert +0 -68
- taichi/shaders/Mesh_vk_frag.spv +0 -0
- taichi/shaders/Mesh_vk_vert.spv +0 -0
- taichi/shaders/Particles_vk.frag +0 -95
- taichi/shaders/Particles_vk.vert +0 -73
- taichi/shaders/Particles_vk_frag.spv +0 -0
- taichi/shaders/Particles_vk_vert.spv +0 -0
- taichi/shaders/SceneLines2quad_vk_comp.spv +0 -0
- taichi/shaders/SceneLines_vk.frag +0 -9
- taichi/shaders/SceneLines_vk.vert +0 -12
- taichi/shaders/SceneLines_vk_frag.spv +0 -0
- taichi/shaders/SceneLines_vk_vert.spv +0 -0
- taichi/shaders/SetImage_vk.frag +0 -21
- taichi/shaders/SetImage_vk.vert +0 -15
- taichi/shaders/SetImage_vk_frag.spv +0 -0
- taichi/shaders/SetImage_vk_vert.spv +0 -0
- taichi/shaders/Triangles_vk.frag +0 -16
- taichi/shaders/Triangles_vk.vert +0 -29
- taichi/shaders/Triangles_vk_frag.spv +0 -0
- taichi/shaders/Triangles_vk_vert.spv +0 -0
- taichi/shaders/lines2quad_vk_comp.spv +0 -0
- taichi/types/__init__.py +0 -19
- {taichi → gstaichi}/_lib/core/__init__.py +0 -0
- {taichi → gstaichi}/_lib/core/py.typed +0 -0
- {taichi/_lib/c_api → gstaichi/_lib}/runtime/libMoltenVK.dylib +0 -0
- {taichi → gstaichi}/algorithms/__init__.py +0 -0
- {taichi → gstaichi}/assets/.git +0 -0
- {taichi → gstaichi}/assets/Go-Regular.ttf +0 -0
- {taichi → gstaichi}/assets/static/imgs/ti_gallery.png +0 -0
- {taichi → gstaichi}/lang/ast/symbol_resolver.py +0 -0
- {taichi → gstaichi}/sparse/__init__.py +0 -0
- {taichi → gstaichi}/tools/np2ply.py +0 -0
- {taichi → gstaichi}/tools/vtk.py +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/GLFW/glfw3.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/GLFW/glfw3native.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv-tools/instrument.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv-tools/libspirv.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv-tools/libspirv.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv-tools/linker.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv-tools/optimizer.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/GLSL.std.450.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cfg.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_common.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cpp.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross_c.h +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross_containers.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross_error_handling.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross_parsed_ir.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_cross_util.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_glsl.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_hlsl.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_msl.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_parser.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/include/spirv_cross/spirv_reflect.hpp +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools/SPIRV-ToolsConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffTargets-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-diff/SPIRV-Tools-diffTargets.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkTargets-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-link/SPIRV-Tools-linkTargets.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintTargets-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-lint/SPIRV-Tools-lintTargets.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceTarget-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/SPIRV-Tools-reduce/SPIRV-Tools-reduceTarget.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/glfw3/glfw3Config.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/glfw3/glfw3ConfigVersion.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/glfw3/glfw3Targets-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/cmake/glfw3/glfw3Targets.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/lib/libSPIRV-Tools-shared.dylib +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_c/cmake/spirv_cross_cConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_c/cmake/spirv_cross_cConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_core/cmake/spirv_cross_coreConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_core/cmake/spirv_cross_coreConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_cpp/cmake/spirv_cross_cppConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_cpp/cmake/spirv_cross_cppConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_glsl/cmake/spirv_cross_glslConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_glsl/cmake/spirv_cross_glslConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_hlsl/cmake/spirv_cross_hlslConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_hlsl/cmake/spirv_cross_hlslConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_msl/cmake/spirv_cross_mslConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_msl/cmake/spirv_cross_mslConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_reflect/cmake/spirv_cross_reflectConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_reflect/cmake/spirv_cross_reflectConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_util/cmake/spirv_cross_utilConfig-release.cmake +0 -0
- {gstaichi-0.1.23.dev0.data → gstaichi-1.0.1.data}/data/share/spirv_cross_util/cmake/spirv_cross_utilConfig.cmake +0 -0
- {gstaichi-0.1.23.dev0.dist-info → gstaichi-1.0.1.dist-info}/WHEEL +0 -0
- {gstaichi-0.1.23.dev0.dist-info → gstaichi-1.0.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,29 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#ifndef TAICHI_H
|
4
|
-
#include "taichi.h"
|
5
|
-
#endif // TAICHI_H
|
6
|
-
|
7
|
-
#ifdef __cplusplus
|
8
|
-
extern "C" {
|
9
|
-
#endif // __cplusplus
|
10
|
-
|
11
|
-
// Structure `TiCpuMemoryInteropInfo`
|
12
|
-
typedef struct TiCpuMemoryInteropInfo {
|
13
|
-
void *ptr;
|
14
|
-
uint64_t size;
|
15
|
-
} TiCpuMemoryInteropInfo;
|
16
|
-
|
17
|
-
// Function `ti_export_cpu_memory`
|
18
|
-
TI_DLL_EXPORT void TI_API_CALL
|
19
|
-
ti_export_cpu_memory(TiRuntime runtime,
|
20
|
-
TiMemory memory,
|
21
|
-
TiCpuMemoryInteropInfo *interop_info);
|
22
|
-
|
23
|
-
TI_DLL_EXPORT TiMemory TI_API_CALL ti_import_cpu_memory(TiRuntime runtime,
|
24
|
-
void *ptr,
|
25
|
-
size_t memory_size);
|
26
|
-
|
27
|
-
#ifdef __cplusplus
|
28
|
-
} // extern "C"
|
29
|
-
#endif // __cplusplus
|
@@ -1,72 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#ifndef TAICHI_H
|
4
|
-
#include "taichi.h"
|
5
|
-
#endif // TAICHI_H
|
6
|
-
|
7
|
-
#ifdef __cplusplus
|
8
|
-
extern "C" {
|
9
|
-
#endif // __cplusplus
|
10
|
-
|
11
|
-
// Handle `TiNsBundle`
|
12
|
-
typedef struct TiNsBundle_t *TiNsBundle;
|
13
|
-
|
14
|
-
// Handle `TiMtlDevice`
|
15
|
-
typedef struct TiMtlDevice_t *TiMtlDevice;
|
16
|
-
|
17
|
-
// Handle `TiMtlBuffer`
|
18
|
-
typedef struct TiMtlBuffer_t *TiMtlBuffer;
|
19
|
-
|
20
|
-
// Handle `TiMtlTexture`
|
21
|
-
typedef struct TiMtlTexture_t *TiMtlTexture;
|
22
|
-
|
23
|
-
// Structure `TiMetalRuntimeInteropInfo`
|
24
|
-
typedef struct TiMetalRuntimeInteropInfo {
|
25
|
-
TiNsBundle bundle;
|
26
|
-
TiMtlDevice device;
|
27
|
-
} TiMetalRuntimeInteropInfo;
|
28
|
-
|
29
|
-
// Structure `TiMetalMemoryInteropInfo`
|
30
|
-
typedef struct TiMetalMemoryInteropInfo {
|
31
|
-
TiMtlBuffer buffer;
|
32
|
-
} TiMetalMemoryInteropInfo;
|
33
|
-
|
34
|
-
// Structure `TiMetalImageInteropInfo`
|
35
|
-
typedef struct TiMetalImageInteropInfo {
|
36
|
-
TiMtlTexture texture;
|
37
|
-
} TiMetalImageInteropInfo;
|
38
|
-
|
39
|
-
// Function `ti_import_metal_runtime`
|
40
|
-
TI_DLL_EXPORT TiRuntime TI_API_CALL
|
41
|
-
ti_import_metal_runtime(const TiMetalRuntimeInteropInfo *interop_info);
|
42
|
-
|
43
|
-
// Function `ti_export_metal_runtime`
|
44
|
-
TI_DLL_EXPORT void TI_API_CALL
|
45
|
-
ti_export_metal_runtime(TiRuntime runtime,
|
46
|
-
TiMetalRuntimeInteropInfo *interop_info);
|
47
|
-
|
48
|
-
// Function `ti_import_metal_memory`
|
49
|
-
TI_DLL_EXPORT TiMemory TI_API_CALL
|
50
|
-
ti_import_metal_memory(TiRuntime runtime,
|
51
|
-
const TiMetalMemoryInteropInfo *interop_info);
|
52
|
-
|
53
|
-
// Function `ti_export_metal_memory`
|
54
|
-
TI_DLL_EXPORT void TI_API_CALL
|
55
|
-
ti_export_metal_memory(TiRuntime runtime,
|
56
|
-
TiMemory memory,
|
57
|
-
TiMetalMemoryInteropInfo *interop_info);
|
58
|
-
|
59
|
-
// Function `ti_import_metal_image`
|
60
|
-
TI_DLL_EXPORT TiImage TI_API_CALL
|
61
|
-
ti_import_metal_image(TiRuntime runtime,
|
62
|
-
const TiMetalImageInteropInfo *interop_info);
|
63
|
-
|
64
|
-
// Function `ti_export_metal_image`
|
65
|
-
TI_DLL_EXPORT void TI_API_CALL
|
66
|
-
ti_export_metal_image(TiRuntime runtime,
|
67
|
-
TiImage image,
|
68
|
-
TiMetalImageInteropInfo *interop_info);
|
69
|
-
|
70
|
-
#ifdef __cplusplus
|
71
|
-
} // extern "C"
|
72
|
-
#endif // __cplusplus
|
@@ -1,55 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
// TO KEEP THE INCLUDE DEPENDENCY CLEAN, PLEASE DO NOT INCLUDE ANY OTHER
|
4
|
-
// TAICHI HEADERS INTO THIS ONE.
|
5
|
-
//
|
6
|
-
// TODO(#2196): Once we can slim down "taichi/common/core.h", consider moving
|
7
|
-
// the contents back to core.h and delete this file.
|
8
|
-
#ifndef _CRT_SECURE_NO_WARNINGS
|
9
|
-
#define _CRT_SECURE_NO_WARNINGS
|
10
|
-
#endif
|
11
|
-
|
12
|
-
// https://gcc.gnu.org/wiki/Visibility
|
13
|
-
#if defined _WIN32 || defined _WIN64 || defined __CYGWIN__
|
14
|
-
#ifdef __GNUC__
|
15
|
-
#define TI_DLL_EXPORT __attribute__((dllexport))
|
16
|
-
#define TI_API_CALL
|
17
|
-
#else
|
18
|
-
#define TI_DLL_EXPORT __declspec(dllexport)
|
19
|
-
#define TI_API_CALL __stdcall
|
20
|
-
#endif // __GNUC__
|
21
|
-
#else
|
22
|
-
#define TI_DLL_EXPORT __attribute__((visibility("default")))
|
23
|
-
#define TI_API_CALL
|
24
|
-
#endif // defined _WIN32 || defined _WIN64 || defined __CYGWIN__
|
25
|
-
|
26
|
-
// Windows
|
27
|
-
#if defined(_WIN64)
|
28
|
-
#define TI_PLATFORM_WINDOWS
|
29
|
-
#endif
|
30
|
-
|
31
|
-
#if defined(_WIN32) && !defined(_WIN64)
|
32
|
-
static_assert(false, "32-bit Windows systems are not supported")
|
33
|
-
#endif
|
34
|
-
|
35
|
-
// Linux
|
36
|
-
#if defined(__linux__)
|
37
|
-
#if defined(ANDROID)
|
38
|
-
#define TI_PLATFORM_ANDROID
|
39
|
-
#else
|
40
|
-
#define TI_PLATFORM_LINUX
|
41
|
-
#endif
|
42
|
-
#endif
|
43
|
-
|
44
|
-
// OSX
|
45
|
-
#if defined(__APPLE__)
|
46
|
-
#define TI_PLATFORM_OSX
|
47
|
-
#endif
|
48
|
-
|
49
|
-
#if (defined(TI_PLATFORM_LINUX) || defined(TI_PLATFORM_OSX) || \
|
50
|
-
defined(__unix__))
|
51
|
-
#define TI_PLATFORM_UNIX
|
52
|
-
#endif
|
53
|
-
|
54
|
-
#include <stddef.h>
|
55
|
-
#include <stdint.h>
|
@@ -1,64 +0,0 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#ifndef TAICHI_H
|
4
|
-
#include "taichi.h"
|
5
|
-
#endif // TAICHI_H
|
6
|
-
|
7
|
-
#ifdef __cplusplus
|
8
|
-
extern "C" {
|
9
|
-
#endif // __cplusplus
|
10
|
-
|
11
|
-
// Handle `TixNativeBufferUnity`
|
12
|
-
typedef struct TixNativeBufferUnity_t *TixNativeBufferUnity;
|
13
|
-
|
14
|
-
// Callback `TixAsyncTaskUnity`
|
15
|
-
typedef void(TI_API_CALL *TixAsyncTaskUnity)(void *user_data);
|
16
|
-
|
17
|
-
// Function `tix_import_native_runtime_unity`
|
18
|
-
TI_DLL_EXPORT TiRuntime TI_API_CALL tix_import_native_runtime_unity();
|
19
|
-
|
20
|
-
// Function `tix_enqueue_task_async_unity`
|
21
|
-
TI_DLL_EXPORT void TI_API_CALL
|
22
|
-
tix_enqueue_task_async_unity(void *user_data, TixAsyncTaskUnity async_task);
|
23
|
-
|
24
|
-
// Function `tix_launch_kernel_async_unity`
|
25
|
-
TI_DLL_EXPORT void TI_API_CALL
|
26
|
-
tix_launch_kernel_async_unity(TiRuntime runtime,
|
27
|
-
TiKernel kernel,
|
28
|
-
uint32_t arg_count,
|
29
|
-
const TiArgument *args);
|
30
|
-
|
31
|
-
// Function `tix_launch_compute_graph_async_unity`
|
32
|
-
TI_DLL_EXPORT void TI_API_CALL
|
33
|
-
tix_launch_compute_graph_async_unity(TiRuntime runtime,
|
34
|
-
TiComputeGraph compute_graph,
|
35
|
-
uint32_t arg_count,
|
36
|
-
const TiNamedArgument *args);
|
37
|
-
|
38
|
-
// Function `tix_copy_memory_to_native_buffer_async_unity`
|
39
|
-
TI_DLL_EXPORT void TI_API_CALL
|
40
|
-
tix_copy_memory_to_native_buffer_async_unity(TiRuntime runtime,
|
41
|
-
TixNativeBufferUnity dst,
|
42
|
-
uint64_t dst_offset,
|
43
|
-
const TiMemorySlice *src);
|
44
|
-
|
45
|
-
// Function `tix_copy_memory_device_to_host_unity`
|
46
|
-
TI_DLL_EXPORT void TI_API_CALL
|
47
|
-
tix_copy_memory_device_to_host_unity(TiRuntime runtime,
|
48
|
-
void *dst,
|
49
|
-
uint64_t dst_offset,
|
50
|
-
const TiMemorySlice *src);
|
51
|
-
|
52
|
-
// Function `tix_copy_memory_host_to_device_unity`
|
53
|
-
TI_DLL_EXPORT void TI_API_CALL
|
54
|
-
tix_copy_memory_host_to_device_unity(TiRuntime runtime,
|
55
|
-
const TiMemorySlice *dst,
|
56
|
-
const void *src,
|
57
|
-
uint64_t src_offset);
|
58
|
-
|
59
|
-
// Function `tix_submit_async_unity`
|
60
|
-
TI_DLL_EXPORT void *TI_API_CALL tix_submit_async_unity(TiRuntime runtime);
|
61
|
-
|
62
|
-
#ifdef __cplusplus
|
63
|
-
} // extern "C"
|
64
|
-
#endif // __cplusplus
|
@@ -1,151 +0,0 @@
|
|
1
|
-
// # Vulkan Backend Features
|
2
|
-
//
|
3
|
-
// Taichi's Vulkan API gives you further control over the Vulkan version and
|
4
|
-
// extension requirements and allows you to interop with external Vulkan
|
5
|
-
// applications with shared resources.
|
6
|
-
//
|
7
|
-
#pragma once
|
8
|
-
|
9
|
-
#ifndef TAICHI_H
|
10
|
-
#include "taichi.h"
|
11
|
-
#endif // TAICHI_H
|
12
|
-
|
13
|
-
#ifdef __cplusplus
|
14
|
-
extern "C" {
|
15
|
-
#endif // __cplusplus
|
16
|
-
|
17
|
-
// Structure `TiVulkanRuntimeInteropInfo` (1.4.0)
|
18
|
-
//
|
19
|
-
// Necessary detail to share the same Vulkan runtime between Taichi and external
|
20
|
-
// procedures.
|
21
|
-
//
|
22
|
-
//
|
23
|
-
// **NOTE** `compute_queue` and `graphics_queue` can be the same if the queue
|
24
|
-
// family have `VK_QUEUE_COMPUTE_BIT` and `VK_QUEUE_GRAPHICS_BIT` set at the
|
25
|
-
// same tiem.
|
26
|
-
typedef struct TiVulkanRuntimeInteropInfo {
|
27
|
-
// Pointer to Vulkan loader function `vkGetInstanceProcAddr`.
|
28
|
-
PFN_vkGetInstanceProcAddr get_instance_proc_addr;
|
29
|
-
// Target Vulkan API version.
|
30
|
-
uint32_t api_version;
|
31
|
-
// Vulkan instance handle.
|
32
|
-
VkInstance instance;
|
33
|
-
// Vulkan physical device handle.
|
34
|
-
VkPhysicalDevice physical_device;
|
35
|
-
// Vulkan logical device handle.
|
36
|
-
VkDevice device;
|
37
|
-
// Vulkan queue handle created in the queue family at
|
38
|
-
// `structure.vulkan_runtime_interop_info.compute_queue_family_index`.
|
39
|
-
VkQueue compute_queue;
|
40
|
-
// Index of a Vulkan queue family with the `VK_QUEUE_COMPUTE_BIT` set.
|
41
|
-
uint32_t compute_queue_family_index;
|
42
|
-
// Vulkan queue handle created in the queue family at
|
43
|
-
// `structure.vulkan_runtime_interop_info.graphics_queue_family_index`.
|
44
|
-
VkQueue graphics_queue;
|
45
|
-
// Index of a Vulkan queue family with the `VK_QUEUE_GRAPHICS_BIT` set.
|
46
|
-
uint32_t graphics_queue_family_index;
|
47
|
-
} TiVulkanRuntimeInteropInfo;
|
48
|
-
|
49
|
-
// Structure `TiVulkanMemoryInteropInfo` (1.4.0)
|
50
|
-
//
|
51
|
-
// Necessary detail to share the same piece of Vulkan buffer between Taichi and
|
52
|
-
// external procedures.
|
53
|
-
typedef struct TiVulkanMemoryInteropInfo {
|
54
|
-
// Vulkan buffer.
|
55
|
-
VkBuffer buffer;
|
56
|
-
// Size of the piece of memory in bytes.
|
57
|
-
uint64_t size;
|
58
|
-
// Vulkan buffer usage. In most of the cases, Taichi requires the
|
59
|
-
// `VK_BUFFER_USAGE_STORAGE_BUFFER_BIT`.
|
60
|
-
VkBufferUsageFlags usage;
|
61
|
-
// Device memory binded to the Vulkan buffer.
|
62
|
-
VkDeviceMemory memory;
|
63
|
-
// Offset in `VkDeviceMemory` object to the beginning of this allocation, in
|
64
|
-
// bytes.
|
65
|
-
uint64_t offset;
|
66
|
-
} TiVulkanMemoryInteropInfo;
|
67
|
-
|
68
|
-
// Structure `TiVulkanImageInteropInfo` (1.4.0)
|
69
|
-
//
|
70
|
-
// Necessary detail to share the same piece of Vulkan image between Taichi and
|
71
|
-
// external procedures.
|
72
|
-
typedef struct TiVulkanImageInteropInfo {
|
73
|
-
// Vulkan image.
|
74
|
-
VkImage image;
|
75
|
-
// Vulkan image allocation type.
|
76
|
-
VkImageType image_type;
|
77
|
-
// Pixel format.
|
78
|
-
VkFormat format;
|
79
|
-
// Image extent.
|
80
|
-
VkExtent3D extent;
|
81
|
-
// Number of mip-levels of the image.
|
82
|
-
uint32_t mip_level_count;
|
83
|
-
// Number of array layers.
|
84
|
-
uint32_t array_layer_count;
|
85
|
-
// Number of samples per pixel.
|
86
|
-
VkSampleCountFlagBits sample_count;
|
87
|
-
// Image tiling.
|
88
|
-
VkImageTiling tiling;
|
89
|
-
// Vulkan image usage. In most cases, Taichi requires the
|
90
|
-
// `VK_IMAGE_USAGE_STORAGE_BIT` and the `VK_IMAGE_USAGE_SAMPLED_BIT`.
|
91
|
-
VkImageUsageFlags usage;
|
92
|
-
} TiVulkanImageInteropInfo;
|
93
|
-
|
94
|
-
// Function `ti_create_vulkan_runtime_ext` (1.4.0)
|
95
|
-
//
|
96
|
-
// Creates a Vulkan Taichi runtime with user-controlled capability settings.
|
97
|
-
TI_DLL_EXPORT TiRuntime TI_API_CALL
|
98
|
-
ti_create_vulkan_runtime_ext(uint32_t api_version,
|
99
|
-
uint32_t instance_extension_count,
|
100
|
-
const char **instance_extensions,
|
101
|
-
uint32_t device_extension_count,
|
102
|
-
const char **device_extensions);
|
103
|
-
|
104
|
-
// Function `ti_import_vulkan_runtime` (1.4.0)
|
105
|
-
//
|
106
|
-
// Imports the Vulkan runtime owned by Taichi to external procedures.
|
107
|
-
TI_DLL_EXPORT TiRuntime TI_API_CALL
|
108
|
-
ti_import_vulkan_runtime(const TiVulkanRuntimeInteropInfo *interop_info);
|
109
|
-
|
110
|
-
// Function `ti_export_vulkan_runtime` (1.4.0)
|
111
|
-
//
|
112
|
-
// Exports a Vulkan runtime from external procedures to Taichi.
|
113
|
-
TI_DLL_EXPORT void TI_API_CALL
|
114
|
-
ti_export_vulkan_runtime(TiRuntime runtime,
|
115
|
-
TiVulkanRuntimeInteropInfo *interop_info);
|
116
|
-
|
117
|
-
// Function `ti_import_vulkan_memory` (1.4.0)
|
118
|
-
//
|
119
|
-
// Imports the Vulkan buffer owned by Taichi to external procedures.
|
120
|
-
TI_DLL_EXPORT TiMemory TI_API_CALL
|
121
|
-
ti_import_vulkan_memory(TiRuntime runtime,
|
122
|
-
const TiVulkanMemoryInteropInfo *interop_info);
|
123
|
-
|
124
|
-
// Function `ti_export_vulkan_memory` (1.4.0)
|
125
|
-
//
|
126
|
-
// Exports a Vulkan buffer from external procedures to Taichi.
|
127
|
-
TI_DLL_EXPORT void TI_API_CALL
|
128
|
-
ti_export_vulkan_memory(TiRuntime runtime,
|
129
|
-
TiMemory memory,
|
130
|
-
TiVulkanMemoryInteropInfo *interop_info);
|
131
|
-
|
132
|
-
// Function `ti_import_vulkan_image` (1.4.0)
|
133
|
-
//
|
134
|
-
// Imports the Vulkan image owned by Taichi to external procedures.
|
135
|
-
TI_DLL_EXPORT TiImage TI_API_CALL
|
136
|
-
ti_import_vulkan_image(TiRuntime runtime,
|
137
|
-
const TiVulkanImageInteropInfo *interop_info,
|
138
|
-
VkImageViewType view_type,
|
139
|
-
VkImageLayout layout);
|
140
|
-
|
141
|
-
// Function `ti_export_vulkan_image` (1.4.0)
|
142
|
-
//
|
143
|
-
// Exports a Vulkan image from external procedures to Taichi.
|
144
|
-
TI_DLL_EXPORT void TI_API_CALL
|
145
|
-
ti_export_vulkan_image(TiRuntime runtime,
|
146
|
-
TiImage image,
|
147
|
-
TiVulkanImageInteropInfo *interop_info);
|
148
|
-
|
149
|
-
#ifdef __cplusplus
|
150
|
-
} // extern "C"
|
151
|
-
#endif // __cplusplus
|
Binary file
|
Binary file
|
@@ -1,29 +0,0 @@
|
|
1
|
-
|
2
|
-
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
3
|
-
####### Any changes to this file will be overwritten by the next CMake run ####
|
4
|
-
####### The input file was TaichiConfig.cmake.in ########
|
5
|
-
|
6
|
-
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../../../../../" ABSOLUTE)
|
7
|
-
|
8
|
-
macro(set_and_check _var _file)
|
9
|
-
set(${_var} "${_file}")
|
10
|
-
if(NOT EXISTS "${_file}")
|
11
|
-
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
12
|
-
endif()
|
13
|
-
endmacro()
|
14
|
-
|
15
|
-
macro(check_required_components _NAME)
|
16
|
-
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
17
|
-
if(NOT ${_NAME}_${comp}_FOUND)
|
18
|
-
if(${_NAME}_FIND_REQUIRED_${comp})
|
19
|
-
set(${_NAME}_FOUND FALSE)
|
20
|
-
endif()
|
21
|
-
endif()
|
22
|
-
endforeach()
|
23
|
-
endmacro()
|
24
|
-
|
25
|
-
####################################################################################
|
26
|
-
|
27
|
-
include("${CMAKE_CURRENT_LIST_DIR}/TaichiTargets.cmake")
|
28
|
-
|
29
|
-
check_required_components("Runtime")
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# This is a basic version file for the Config-mode of find_package().
|
2
|
-
# It is used by write_basic_package_version_file() as input file for configure_file()
|
3
|
-
# to create a version-file which can be installed along a config.cmake file.
|
4
|
-
#
|
5
|
-
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
6
|
-
# the requested version string are exactly the same and it sets
|
7
|
-
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
|
8
|
-
# but only if the requested major version is the same as the current one.
|
9
|
-
# The variable CVF_VERSION must be set before calling configure_file().
|
10
|
-
|
11
|
-
|
12
|
-
set(PACKAGE_VERSION "0.1.23")
|
13
|
-
|
14
|
-
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
15
|
-
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
16
|
-
else()
|
17
|
-
|
18
|
-
if("0.1.23" MATCHES "^([0-9]+)\\.")
|
19
|
-
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
20
|
-
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
|
21
|
-
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
|
22
|
-
endif()
|
23
|
-
else()
|
24
|
-
set(CVF_VERSION_MAJOR "0.1.23")
|
25
|
-
endif()
|
26
|
-
|
27
|
-
if(PACKAGE_FIND_VERSION_RANGE)
|
28
|
-
# both endpoints of the range must have the expected major version
|
29
|
-
math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
|
30
|
-
if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
31
|
-
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
32
|
-
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
|
33
|
-
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
34
|
-
elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
35
|
-
AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
|
36
|
-
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
|
37
|
-
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
38
|
-
else()
|
39
|
-
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
40
|
-
endif()
|
41
|
-
else()
|
42
|
-
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
43
|
-
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
44
|
-
else()
|
45
|
-
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
46
|
-
endif()
|
47
|
-
|
48
|
-
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
49
|
-
set(PACKAGE_VERSION_EXACT TRUE)
|
50
|
-
endif()
|
51
|
-
endif()
|
52
|
-
endif()
|
53
|
-
|
54
|
-
|
55
|
-
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
56
|
-
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
57
|
-
return()
|
58
|
-
endif()
|
59
|
-
|
60
|
-
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
61
|
-
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
62
|
-
math(EXPR installedBits "8 * 8")
|
63
|
-
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
64
|
-
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
65
|
-
endif()
|
@@ -1,121 +0,0 @@
|
|
1
|
-
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
2
|
-
message(FATAL_ERROR "CMake >= 2.8.0 required")
|
3
|
-
endif()
|
4
|
-
if(CMAKE_VERSION VERSION_LESS "2.8.3")
|
5
|
-
message(FATAL_ERROR "CMake >= 2.8.3 required")
|
6
|
-
endif()
|
7
|
-
cmake_policy(PUSH)
|
8
|
-
cmake_policy(VERSION 2.8.3...3.23)
|
9
|
-
|
10
|
-
# Commands may need to know the format version.
|
11
|
-
set(CMAKE_IMPORT_FILE_VERSION 1)
|
12
|
-
|
13
|
-
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
14
|
-
set(_cmake_targets_defined "")
|
15
|
-
set(_cmake_targets_not_defined "")
|
16
|
-
set(_cmake_expected_targets "")
|
17
|
-
foreach(_cmake_expected_target IN ITEMS taichi_c_api)
|
18
|
-
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
19
|
-
if(TARGET "${_cmake_expected_target}")
|
20
|
-
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
21
|
-
else()
|
22
|
-
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
|
23
|
-
endif()
|
24
|
-
endforeach()
|
25
|
-
unset(_cmake_expected_target)
|
26
|
-
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
|
27
|
-
unset(_cmake_targets_defined)
|
28
|
-
unset(_cmake_targets_not_defined)
|
29
|
-
unset(_cmake_expected_targets)
|
30
|
-
unset(CMAKE_IMPORT_FILE_VERSION)
|
31
|
-
cmake_policy(POP)
|
32
|
-
return()
|
33
|
-
endif()
|
34
|
-
if(NOT _cmake_targets_defined STREQUAL "")
|
35
|
-
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
|
36
|
-
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
|
37
|
-
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
|
38
|
-
endif()
|
39
|
-
unset(_cmake_targets_defined)
|
40
|
-
unset(_cmake_targets_not_defined)
|
41
|
-
unset(_cmake_expected_targets)
|
42
|
-
|
43
|
-
|
44
|
-
# Compute the installation prefix relative to this file.
|
45
|
-
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
46
|
-
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
47
|
-
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
48
|
-
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
49
|
-
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
50
|
-
if(_IMPORT_PREFIX STREQUAL "/")
|
51
|
-
set(_IMPORT_PREFIX "")
|
52
|
-
endif()
|
53
|
-
|
54
|
-
# - [taichi_c_api] -------------------------------------------------------------
|
55
|
-
|
56
|
-
add_library(taichi_c_api SHARED IMPORTED)
|
57
|
-
|
58
|
-
list(APPEND _cmake_import_check_targets taichi_c_api )
|
59
|
-
|
60
|
-
if (APPLE)
|
61
|
-
set_target_properties(taichi_c_api PROPERTIES
|
62
|
-
IMPORTED_LOCATION "${_IMPORT_PREFIX}/lib/libtaichi_c_api.dylib"
|
63
|
-
IMPORTED_SONAME "@rpath/libtaichi_c_api.dylib"
|
64
|
-
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
65
|
-
)
|
66
|
-
list(APPEND _cmake_import_check_files_for_taichi_c_api "${_IMPORT_PREFIX}/lib/libtaichi_c_api.dylib" )
|
67
|
-
elseif (WIN32)
|
68
|
-
set_target_properties(taichi_c_api PROPERTIES
|
69
|
-
IMPORTED_LOCATION "${_IMPORT_PREFIX}/bin/taichi_c_api.dll"
|
70
|
-
IMPORTED_IMPLIB "${_IMPORT_PREFIX}/lib/taichi_c_api.lib"
|
71
|
-
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
72
|
-
)
|
73
|
-
list(APPEND _cmake_import_check_files_for_taichi_c_api "${_IMPORT_PREFIX}/bin/taichi_c_api.dll" )
|
74
|
-
elseif (UNIX)
|
75
|
-
# Check if the .so file exists in the lib directory
|
76
|
-
if(EXISTS "${_IMPORT_PREFIX}/lib/libtaichi_c_api.so")
|
77
|
-
set(TAICHI_SO_LOCATION "${_IMPORT_PREFIX}/lib/libtaichi_c_api.so")
|
78
|
-
else()
|
79
|
-
set(TAICHI_SO_LOCATION "${_IMPORT_PREFIX}/lib64/libtaichi_c_api.so")
|
80
|
-
endif()
|
81
|
-
|
82
|
-
set_target_properties(taichi_c_api PROPERTIES
|
83
|
-
IMPORTED_LOCATION "${TAICHI_SO_LOCATION}"
|
84
|
-
IMPORTED_SONAME "libtaichi_c_api.so"
|
85
|
-
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
86
|
-
)
|
87
|
-
list(APPEND _cmake_import_check_files_for_taichi_c_api "${TAICHI_SO_LOCATION}" )
|
88
|
-
endif()
|
89
|
-
|
90
|
-
# ------------------------------------------------------------------------------
|
91
|
-
|
92
|
-
# Cleanup temporary variables.
|
93
|
-
set(_IMPORT_PREFIX)
|
94
|
-
|
95
|
-
# Loop over all imported files and verify that they actually exist
|
96
|
-
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
|
97
|
-
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
|
98
|
-
if(NOT EXISTS "${_cmake_file}")
|
99
|
-
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
|
100
|
-
\"${_cmake_file}\"
|
101
|
-
but this file does not exist. Possible reasons include:
|
102
|
-
* The file was deleted, renamed, or moved to another location.
|
103
|
-
* An install or uninstall procedure did not complete successfully.
|
104
|
-
* The installation package was faulty and contained
|
105
|
-
\"${CMAKE_CURRENT_LIST_FILE}\"
|
106
|
-
but not all the files it references.
|
107
|
-
")
|
108
|
-
endif()
|
109
|
-
endforeach()
|
110
|
-
unset(_cmake_file)
|
111
|
-
unset("_cmake_import_check_files_for_${_cmake_target}")
|
112
|
-
endforeach()
|
113
|
-
unset(_cmake_target)
|
114
|
-
unset(_cmake_import_check_targets)
|
115
|
-
|
116
|
-
# This file does not depend on other imported targets which have
|
117
|
-
# been exported from the same project but in a separate export set.
|
118
|
-
|
119
|
-
# Commands beyond this point should not need to know the version.
|
120
|
-
set(CMAKE_IMPORT_FILE_VERSION)
|
121
|
-
cmake_policy(POP)
|
Binary file
|