已开启
【代码侦探Challenge05】 cftang9999 MulCustom #2471
【代码侦探Challenge05】 cftang9999 MulCustom #2471
已开启
cftang9999创建于 20 天前
246 个文件变更+21765-0
@@ -0,0 +1,38 @@
1+# DivCustomTemplate 算子工程说明
2+ 
3+## 目录结构与各文件职责
4+ 
5+```
6+DivCustomTemplate/
7+├── div_custom_template.json # 算子原型定义:声明算子名、输入(x,y)/输出(z)的 dtype 与 format
8+├── run.sh # 一键编译运行脚本:msopgen 生成→编译→安装→编译测试→运行测试
9+├── test/
10+│ ├── main.cpp # ACLNN 接口调用测试:构造 x=1.0/y=2.0,调用 aclnnDivCustomTemplate,验证 z=0.5
11+│ └── CMakeLists.txt # 测试构建脚本(可选,run.sh 默认用 g++ 直接编译)
12+└── custom_op/ # msopgen 生成的算子工程
13+ ├── CMakeLists.txt # 顶层构建脚本,组织子目录编译
14+ ├── CMakePresets.json # CMake 预设(ASCEND_CANN_PACKAGE_PATH、compute unit 等)
15+ ├── build.sh # 编译打包脚本,调用 cmake+make 生成 .run 安装包
16+ ├── framework/tf_plugin/ # 框架适配插件(TensorFlow 图解析),本题不涉及修改
17+ ├── op_host/ # Host 侧
18+ │ ├── CMakeLists.txt
19+ │ └── div_custom_template.cpp # 算子注册(OpDef)、InferShape/InferDataType、TilingFunc 计算 tile 参数
20+ └── op_kernel/ # Kernel 侧
21+ ├── CMakeLists.txt
22+ ├── div_custom_template_tiling.h # Tiling 数据结构定义(totalLength/tileNum/tileLength)
23+ └── div_custom_template.cpp # Ascend C 核函数:Double Buffer 流水线,Div 逐元素除法
24+```
25+ 
26+## 三层职责划分
27+ 
28+| 层 | 目录 | 职责 |
29+|---|---|---|
30+| 原型定义 | `div_custom_template.json` | 声明算子 IO 接口(名称、类型、格式),msopgen 的输入 |
31+| Host 侧 | `op_host/` | 算子注册到框架、Shape 推导、Tiling 计算(分块参数下发给 kernel) |
32+| Kernel 侧 | `op_kernel/` | Ascend C 核函数实现,GM↔UB 数据搬运 + Div 计算 |
33+ 
34+## 数据流
35+ 
36+`GM(x,y) → CopyIn → UB → Div 计算 → UB → CopyOut → GM(z)`
37+ 
38+通过 Double Buffer(BUFFER_NUM=2)实现搬运与计算的流水重叠。
@@ -0,0 +1,31 @@
1+# ----------------------------------------------------------------------------------------------------------
2+# Copyright (c) 2025 Huawei Technologies Co., Ltd.
3+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4+# CANN Open Software License Agreement Version 2.0 (the "License").
5+# Please refer to the License for details. You may not use this file except in compliance with the License.
6+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8+# See LICENSE in the root of the software repository for the full text of the License.
9+# ----------------------------------------------------------------------------------------------------------
10+ 
11+ 
12+cmake_minimum_required(VERSION 3.16.0)
13+project(opp)
14+find_package(ASC REQUIRED)
15+set(package_name ${vendor_name})
16+ 
17+npu_op_package(${package_name}
18+ TYPE RUN
19+ CONFIG
20+ INSTALL_PATH ${CMAKE_BINARY_DIR}/
21+)
22+ 
23+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/framework)
24+ add_subdirectory(framework)
25+endif()
26+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/op_host)
27+ add_subdirectory(op_host)
28+endif()
29+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/op_kernel)
30+ add_subdirectory(op_kernel)
31+endif()
@@ -0,0 +1,67 @@
1+{
2+ "version": 1,
3+ "cmakeMinimumRequired": {
4+ "major": 3,
5+ "minor": 16,
6+ "patch": 0
7+ },
8+ "configurePresets": [
9+ {
10+ "name": "default",
11+ "displayName": "Default Config",
12+ "description": "Default build using Unix Makefiles generator",
13+ "generator": "Unix Makefiles",
14+ "binaryDir": "${sourceDir}/build_out",
15+ "cacheVariables": {
16+ "CMAKE_BUILD_TYPE": {
17+ "type": "STRING",
18+ "value": "Release"
19+ },
20+ "ENABLE_SOURCE_PACKAGE": {
21+ "type": "BOOL",
22+ "value": "True"
23+ },
24+ "ENABLE_BINARY_PACKAGE": {
25+ "type": "BOOL",
26+ "value": "True"
27+ },
28+ "ASCEND_COMPUTE_UNIT": {
29+ "type": "STRING",
30+ "value": "ascend910b"
31+ },
32+ "ENABLE_TEST": {
33+ "type": "BOOL",
34+ "value": "True"
35+ },
36+ "vendor_name": {
37+ "type": "STRING",
38+ "value": "customize"
39+ },
40+ "ASCEND_CANN_PACKAGE_PATH": {
41+ "type": "PATH",
42+ "value": "/usr/local/Ascend/cann-9.0.0"
43+ },
44+ "ASCEND_PYTHON_EXECUTABLE": {
45+ "type": "STRING",
46+ "value": "python3"
47+ },
48+ "CMAKE_INSTALL_PREFIX": {
49+ "type": "PATH",
50+ "value": "${sourceDir}/build_out"
51+ },
52+ "ENABLE_CROSS_COMPILE": {
53+ "type": "BOOL",
54+ "value": "False"
55+ },
56+ "CMAKE_CROSS_PLATFORM_COMPILER": {
57+ "type": "PATH",
58+ "value": "/usr/bin/aarch64-linux-gnu-g++"
59+ },
60+ "ASCEND_PACK_SHARED_LIBRARY": {
61+ "type": "BOOL",
62+ "value": "False"
63+ }
64+ }
65+ }
66+ ]
67+}
@@ -0,0 +1,40 @@
1+#!/bin/bash
2+# ----------------------------------------------------------------------------------------------------------
3+# Copyright (c) 2025 Huawei Technologies Co., Ltd.
4+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
5+# CANN Open Software License Agreement Version 2.0 (the "License").
6+# Please refer to the License for details. You may not use this file except in compliance with the License.
7+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9+# See LICENSE in the root of the software repository for the full text of the License.
10+# ----------------------------------------------------------------------------------------------------------
11+ 
12+if [ -z "$BASE_LIBS_PATH" ]; then
13+ if [ -z "$ASCEND_HOME_PATH" ]; then
14+ if [ -z "$ASCEND_AICPU_PATH" ]; then
15+ echo "please set env."
16+ exit 1
17+ else
18+ export ASCEND_HOME_PATH=$ASCEND_AICPU_PATH
19+ fi
20+ else
21+ export ASCEND_HOME_PATH=$ASCEND_HOME_PATH
22+ fi
23+else
24+ export ASCEND_HOME_PATH=$BASE_LIBS_PATH
25+fi
26+echo "using ASCEND_HOME_PATH: $ASCEND_HOME_PATH"
27+script_path=$(realpath $(dirname $0))
28+ 
29+BUILD_DIR="build_out"
30+mkdir -p build_out
31+rm -rf build_out/*
32+opts=$(python3 $ASCEND_HOME_PATH/tools/tikcpp/ascendc_kernel_cmake/fwk_modules/util/preset_parse.py $script_path/CMakePresets.json)
33+cmake_version=$(cmake --version | grep "cmake version" | awk '{print $3}')
34+ 
35+if [ "$cmake_version" \< "3.19.0" ] ; then
36+ cmake -S . -B "$BUILD_DIR" $opts
37+else
38+ cmake -S . -B "$BUILD_DIR" --preset=default
39+fi
40+cmake --build "$BUILD_DIR" --target binary package -j$(nproc)
@@ -0,0 +1,450 @@
1+# This is the CMakeCache file.
2+# For build in directory: /tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out
3+# It was generated by CMake: /usr/local/bin/cmake
4+# You can edit this file to change values found and used by cmake.
5+# If you do not want to change any of the values, simply exit the editor.
6+# If you do want to change a value, simply edit, save, and exit the editor.
7+# The syntax for the file is as follows:
8+# KEY:TYPE=VALUE
9+# KEY is the name of a variable in the cache.
10+# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
11+# VALUE is the current value for the KEY.
12+ 
13+########################
14+# EXTERNAL cache entries
15+########################
16+ 
17+ASCENDC_CMAKE_SCRIPTS_PATH:STRING=/usr/local/Ascend/cann-9.0.0/compiler/tikcpp/ascendc_kernel_cmake/fwk_modules
18+ 
19+ASCENDC_INSTALL_PREFIX:PATH=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out
20+ 
21+//No help, variable specified on the command line.
22+ASCEND_CANN_PACKAGE_PATH:PATH=/usr/local/Ascend/cann-9.0.0
23+ 
24+ASCEND_CHECK_OPTYPE_DUPLICATE:BOOL=FALSE
25+ 
26+//No help, variable specified on the command line.
27+ASCEND_COMPUTE_UNIT:STRING=ascend910b
28+ 
29+//No help, variable specified on the command line.
30+ASCEND_PACK_SHARED_LIBRARY:BOOL=False
31+ 
32+//No help, variable specified on the command line.
33+ASCEND_PYTHON_EXECUTABLE:STRING=python3
34+ 
35+//The directory containing a CMake configuration file for ASC.
36+ASC_DIR:PATH=/usr/local/Ascend/cann-9.0.0/lib64/cmake
37+ 
38+//Path to a program.
39+CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
40+ 
41+//Path to a program.
42+CMAKE_AR:FILEPATH=/usr/bin/ar
43+ 
44+//No help, variable specified on the command line.
45+CMAKE_BUILD_TYPE:STRING=Release
46+ 
47+//Enable/Disable color output during build.
48+CMAKE_COLOR_MAKEFILE:BOOL=ON
49+ 
50+CMAKE_CROSS_LIBRARY_PATH:PATH=
51+ 
52+//No help, variable specified on the command line.
53+CMAKE_CROSS_PLATFORM_COMPILER:PATH=/usr/bin/aarch64-linux-gnu-g++
54+ 
55+//CXX compiler
56+CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
57+ 
58+//A wrapper around 'ar' adding the appropriate '--plugin' option
59+// for the GCC compiler
60+CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
61+ 
62+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
63+// for the GCC compiler
64+CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
65+ 
66+//Flags used by the CXX compiler during all build types.
67+CMAKE_CXX_FLAGS:STRING=
68+ 
69+//Flags used by the CXX compiler during DEBUG builds.
70+CMAKE_CXX_FLAGS_DEBUG:STRING=-g
71+ 
72+//Flags used by the CXX compiler during MINSIZEREL builds.
73+CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
74+ 
75+//Flags used by the CXX compiler during RELEASE builds.
76+CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
77+ 
78+//Flags used by the CXX compiler during RELWITHDEBINFO builds.
79+CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
80+ 
81+//C compiler
82+CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
83+ 
84+//A wrapper around 'ar' adding the appropriate '--plugin' option
85+// for the GCC compiler
86+CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
87+ 
88+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
89+// for the GCC compiler
90+CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
91+ 
92+//Flags used by the C compiler during all build types.
93+CMAKE_C_FLAGS:STRING=
94+ 
95+//Flags used by the C compiler during DEBUG builds.
96+CMAKE_C_FLAGS_DEBUG:STRING=-g
97+ 
98+//Flags used by the C compiler during MINSIZEREL builds.
99+CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
100+ 
101+//Flags used by the C compiler during RELEASE builds.
102+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
103+ 
104+//Flags used by the C compiler during RELWITHDEBINFO builds.
105+CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
106+ 
107+//Path to a program.
108+CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
109+ 
110+//Flags used by the linker during all build types.
111+CMAKE_EXE_LINKER_FLAGS:STRING=
112+ 
113+//Flags used by the linker during DEBUG builds.
114+CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
115+ 
116+//Flags used by the linker during MINSIZEREL builds.
117+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
118+ 
119+//Flags used by the linker during RELEASE builds.
120+CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
121+ 
122+//Flags used by the linker during RELWITHDEBINFO builds.
123+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
124+ 
125+//Enable/Disable output of compile commands during generation.
126+CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
127+ 
128+//Value Computed by CMake.
129+CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out/CMakeFiles/pkgRedirects
130+ 
131+//No help, variable specified on the command line.
132+CMAKE_INSTALL_PREFIX:PATH=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out
133+ 
134+//Path to a program.
135+CMAKE_LINKER:FILEPATH=/usr/bin/ld
136+ 
137+//Path to a program.
138+CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
139+ 
140+//Flags used by the linker during the creation of modules during
141+// all build types.
142+CMAKE_MODULE_LINKER_FLAGS:STRING=
143+ 
144+//Flags used by the linker during the creation of modules during
145+// DEBUG builds.
146+CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
147+ 
148+//Flags used by the linker during the creation of modules during
149+// MINSIZEREL builds.
150+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
151+ 
152+//Flags used by the linker during the creation of modules during
153+// RELEASE builds.
154+CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
155+ 
156+//Flags used by the linker during the creation of modules during
157+// RELWITHDEBINFO builds.
158+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
159+ 
160+//Path to a program.
161+CMAKE_NM:FILEPATH=/usr/bin/nm
162+ 
163+//Path to a program.
164+CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
165+ 
166+//Path to a program.
167+CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
168+ 
169+//Value Computed by CMake
170+CMAKE_PROJECT_DESCRIPTION:STATIC=
171+ 
172+//Value Computed by CMake
173+CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
174+ 
175+//Value Computed by CMake
176+CMAKE_PROJECT_NAME:STATIC=opp
177+ 
178+//Path to a program.
179+CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
180+ 
181+//Path to a program.
182+CMAKE_READELF:FILEPATH=/usr/bin/readelf
183+ 
184+//Flags used by the linker during the creation of shared libraries
185+// during all build types.
186+CMAKE_SHARED_LINKER_FLAGS:STRING=
187+ 
188+//Flags used by the linker during the creation of shared libraries
189+// during DEBUG builds.
190+CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
191+ 
192+//Flags used by the linker during the creation of shared libraries
193+// during MINSIZEREL builds.
194+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
195+ 
196+//Flags used by the linker during the creation of shared libraries
197+// during RELEASE builds.
198+CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
199+ 
200+//Flags used by the linker during the creation of shared libraries
201+// during RELWITHDEBINFO builds.
202+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
203+ 
204+//If set, runtime paths are not added when installing shared libraries,
205+// but are added when building.
206+CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
207+ 
208+//If set, runtime paths are not added when using shared libraries.
209+CMAKE_SKIP_RPATH:BOOL=NO
210+ 
211+//Flags used by the linker during the creation of static libraries
212+// during all build types.
213+CMAKE_STATIC_LINKER_FLAGS:STRING=
214+ 
215+//Flags used by the linker during the creation of static libraries
216+// during DEBUG builds.
217+CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
218+ 
219+//Flags used by the linker during the creation of static libraries
220+// during MINSIZEREL builds.
221+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
222+ 
223+//Flags used by the linker during the creation of static libraries
224+// during RELEASE builds.
225+CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
226+ 
227+//Flags used by the linker during the creation of static libraries
228+// during RELWITHDEBINFO builds.
229+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
230+ 
231+//Path to a program.
232+CMAKE_STRIP:FILEPATH=/usr/bin/strip
233+ 
234+//If this value is on, makefiles will be generated without the
235+// .SILENT directive, and all commands will be echoed to the console
236+// during the make. This is useful for debugging only. With Visual
237+// Studio IDE projects all commands are done without /nologo.
238+CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
239+ 
240+//Enable to build RPM source packages
241+CPACK_SOURCE_RPM:BOOL=OFF
242+ 
243+//Enable to build TBZ2 source packages
244+CPACK_SOURCE_TBZ2:BOOL=ON
245+ 
246+//Enable to build TGZ source packages
247+CPACK_SOURCE_TGZ:BOOL=ON
248+ 
249+//Enable to build TXZ source packages
250+CPACK_SOURCE_TXZ:BOOL=ON
251+ 
252+//Enable to build TZ source packages
253+CPACK_SOURCE_TZ:BOOL=ON
254+ 
255+//Enable to build ZIP source packages
256+CPACK_SOURCE_ZIP:BOOL=OFF
257+ 
258+//No help, variable specified on the command line.
259+ENABLE_BINARY_PACKAGE:BOOL=True
260+ 
261+ENABLE_COPY_KERNEL_SRC_TO_ASCENDC:BOOL=FALSE
262+ 
263+//No help, variable specified on the command line.
264+ENABLE_CROSS_COMPILE:BOOL=False
265+ 
266+//No help, variable specified on the command line.
267+ENABLE_SOURCE_PACKAGE:BOOL=True
268+ 
269+//No help, variable specified on the command line.
270+ENABLE_TEST:BOOL=True
271+ 
272+_ASCEND_CANN_PACKAGE_PATH:PATH=/usr/local/Ascend/cann-9.0.0
273+ 
274+//Value Computed by CMake
275+opp_BINARY_DIR:STATIC=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out
276+ 
277+//Value Computed by CMake
278+opp_IS_TOP_LEVEL:STATIC=ON
279+ 
280+//Value Computed by CMake
281+opp_SOURCE_DIR:STATIC=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op
282+ 
283+//No help, variable specified on the command line.
284+vendor_name:STRING=customize
285+ 
286+ 
287+########################
288+# INTERNAL cache entries
289+########################
290+ 
291+//ADVANCED property for variable: CMAKE_ADDR2LINE
292+CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
293+//ADVANCED property for variable: CMAKE_AR
294+CMAKE_AR-ADVANCED:INTERNAL=1
295+//This is the directory where this CMakeCache.txt was created
296+CMAKE_CACHEFILE_DIR:INTERNAL=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op/build_out
297+//Major version of cmake used to create the current loaded cache
298+CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
299+//Minor version of cmake used to create the current loaded cache
300+CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
301+//Patch version of cmake used to create the current loaded cache
302+CMAKE_CACHE_PATCH_VERSION:INTERNAL=4
303+//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
304+CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
305+//Path to CMake executable.
306+CMAKE_COMMAND:INTERNAL=/usr/local/bin/cmake
307+//Path to cpack program executable.
308+CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/bin/cpack
309+//Path to ctest program executable.
310+CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/bin/ctest
311+//ADVANCED property for variable: CMAKE_CXX_COMPILER
312+CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
313+//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
314+CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
315+//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
316+CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
317+//ADVANCED property for variable: CMAKE_CXX_FLAGS
318+CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
319+//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
320+CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
321+//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
322+CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
323+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
324+CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
325+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
326+CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
327+//ADVANCED property for variable: CMAKE_C_COMPILER
328+CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
329+//ADVANCED property for variable: CMAKE_C_COMPILER_AR
330+CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
331+//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
332+CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
333+//ADVANCED property for variable: CMAKE_C_FLAGS
334+CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
335+//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
336+CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
337+//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
338+CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
339+//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
340+CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
341+//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
342+CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
343+//ADVANCED property for variable: CMAKE_DLLTOOL
344+CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
345+//Path to cache edit program executable.
346+CMAKE_EDIT_COMMAND:INTERNAL=/usr/local/bin/ccmake
347+//Executable file format
348+CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
349+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
350+CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
351+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
352+CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
353+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
354+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
355+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
356+CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
357+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
358+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
359+//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
360+CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
361+//Name of external makefile project generator.
362+CMAKE_EXTRA_GENERATOR:INTERNAL=
363+//Name of generator.
364+CMAKE_GENERATOR:INTERNAL=Unix Makefiles
365+//Generator instance identifier.
366+CMAKE_GENERATOR_INSTANCE:INTERNAL=
367+//Name of generator platform.
368+CMAKE_GENERATOR_PLATFORM:INTERNAL=
369+//Name of generator toolset.
370+CMAKE_GENERATOR_TOOLSET:INTERNAL=
371+//Source directory with the top level CMakeLists.txt file for this
372+// project
373+CMAKE_HOME_DIRECTORY:INTERNAL=/tmp/code/cann-outreach_4921/2026/CANN-Code-Detective/Challenge04-DivCustomTemplate/cftang9999/DivCustomTemplate/custom_op
374+//Install .so files without execute permission.
375+CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
376+//ADVANCED property for variable: CMAKE_LINKER
377+CMAKE_LINKER-ADVANCED:INTERNAL=1
378+//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
379+CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
380+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
381+CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
382+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
383+CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
384+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
385+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
386+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
387+CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
388+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
389+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
390+//ADVANCED property for variable: CMAKE_NM
391+CMAKE_NM-ADVANCED:INTERNAL=1
392+//number of local generators
393+CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=5
394+//ADVANCED property for variable: CMAKE_OBJCOPY
395+CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
396+//ADVANCED property for variable: CMAKE_OBJDUMP
397+CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
398+//Platform information initialized
399+CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
400+//ADVANCED property for variable: CMAKE_RANLIB
401+CMAKE_RANLIB-ADVANCED:INTERNAL=1
402+//ADVANCED property for variable: CMAKE_READELF
403+CMAKE_READELF-ADVANCED:INTERNAL=1
404+//Path to CMake installation.
405+CMAKE_ROOT:INTERNAL=/usr/local/share/cmake-3.26
406+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
407+CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
408+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
409+CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
410+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
411+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
412+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
413+CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
414+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
415+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
416+//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
417+CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
418+//ADVANCED property for variable: CMAKE_SKIP_RPATH
419+CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
420+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
421+CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
422+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
423+CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
424+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
425+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
426+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
427+CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
428+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
429+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
430+//ADVANCED property for variable: CMAKE_STRIP
431+CMAKE_STRIP-ADVANCED:INTERNAL=1
432+//uname command
433+CMAKE_UNAME:INTERNAL=/usr/bin/uname
434+//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
435+CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
436+//ADVANCED property for variable: CPACK_SOURCE_RPM
437+CPACK_SOURCE_RPM-ADVANCED:INTERNAL=1
438+//ADVANCED property for variable: CPACK_SOURCE_TBZ2
439+CPACK_SOURCE_TBZ2-ADVANCED:INTERNAL=1
440+//ADVANCED property for variable: CPACK_SOURCE_TGZ
441+CPACK_SOURCE_TGZ-ADVANCED:INTERNAL=1
442+//ADVANCED property for variable: CPACK_SOURCE_TXZ
443+CPACK_SOURCE_TXZ-ADVANCED:INTERNAL=1
444+//ADVANCED property for variable: CPACK_SOURCE_TZ
445+CPACK_SOURCE_TZ-ADVANCED:INTERNAL=1
446+//ADVANCED property for variable: CPACK_SOURCE_ZIP
447+CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1
448+//linker supports push/pop state
449+_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
450+ 
@@ -0,0 +1,72 @@
1+set(CMAKE_C_COMPILER "/usr/bin/cc")
2+set(CMAKE_C_COMPILER_ARG1 "")
3+set(CMAKE_C_COMPILER_ID "GNU")
4+set(CMAKE_C_COMPILER_VERSION "11.4.0")
5+set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
6+set(CMAKE_C_COMPILER_WRAPPER "")
7+set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
8+set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
9+set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
10+set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
11+set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
12+set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
13+set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
14+set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
15+ 
16+set(CMAKE_C_PLATFORM_ID "Linux")
17+set(CMAKE_C_SIMULATE_ID "")
18+set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU")
19+set(CMAKE_C_SIMULATE_VERSION "")
20+ 
21+ 
22+ 
23+ 
24+set(CMAKE_AR "/usr/bin/ar")
25+set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11")
26+set(CMAKE_RANLIB "/usr/bin/ranlib")
27+set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
28+set(CMAKE_LINKER "/usr/bin/ld")
29+set(CMAKE_MT "")
30+set(CMAKE_COMPILER_IS_GNUCC 1)
31+set(CMAKE_C_COMPILER_LOADED 1)
32+set(CMAKE_C_COMPILER_WORKS TRUE)
33+set(CMAKE_C_ABI_COMPILED TRUE)
34+ 
35+set(CMAKE_C_COMPILER_ENV_VAR "CC")
36+ 
37+set(CMAKE_C_COMPILER_ID_RUN 1)
38+set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
39+set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
40+set(CMAKE_C_LINKER_PREFERENCE 10)
41+ 
42+# Save compiler ABI information.
43+set(CMAKE_C_SIZEOF_DATA_PTR "8")
44+set(CMAKE_C_COMPILER_ABI "ELF")
45+set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
46+set(CMAKE_C_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
47+ 
48+if(CMAKE_C_SIZEOF_DATA_PTR)
49+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
50+endif()
51+ 
52+if(CMAKE_C_COMPILER_ABI)
53+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
54+endif()
55+ 
56+if(CMAKE_C_LIBRARY_ARCHITECTURE)
57+ set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
58+endif()
59+ 
60+set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
61+if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
62+ set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
63+endif()
64+ 
65+ 
66+ 
67+ 
68+ 
69+set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
70+set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
71+set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
72+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
@@ -0,0 +1,83 @@
1+set(CMAKE_CXX_COMPILER "/usr/bin/c++")
2+set(CMAKE_CXX_COMPILER_ARG1 "")
3+set(CMAKE_CXX_COMPILER_ID "GNU")
4+set(CMAKE_CXX_COMPILER_VERSION "11.4.0")
5+set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
6+set(CMAKE_CXX_COMPILER_WRAPPER "")
7+set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
8+set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
9+set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
10+set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
11+set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
12+set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
13+set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
14+set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
15+set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
16+ 
17+set(CMAKE_CXX_PLATFORM_ID "Linux")
18+set(CMAKE_CXX_SIMULATE_ID "")
19+set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
20+set(CMAKE_CXX_SIMULATE_VERSION "")
21+ 
22+ 
23+ 
24+ 
25+set(CMAKE_AR "/usr/bin/ar")
26+set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11")
27+set(CMAKE_RANLIB "/usr/bin/ranlib")
28+set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
29+set(CMAKE_LINKER "/usr/bin/ld")
30+set(CMAKE_MT "")
31+set(CMAKE_COMPILER_IS_GNUCXX 1)
32+set(CMAKE_CXX_COMPILER_LOADED 1)
33+set(CMAKE_CXX_COMPILER_WORKS TRUE)
34+set(CMAKE_CXX_ABI_COMPILED TRUE)
35+ 
36+set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
37+ 
38+set(CMAKE_CXX_COMPILER_ID_RUN 1)
39+set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
40+set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
41+ 
42+foreach (lang C OBJC OBJCXX)
43+ if (CMAKE_${lang}_COMPILER_ID_RUN)
44+ foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
45+ list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
46+ endforeach()
47+ endif()
48+endforeach()
49+ 
50+set(CMAKE_CXX_LINKER_PREFERENCE 30)
51+set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
52+ 
53+# Save compiler ABI information.
54+set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
55+set(CMAKE_CXX_COMPILER_ABI "ELF")
56+set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
57+set(CMAKE_CXX_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
58+ 
59+if(CMAKE_CXX_SIZEOF_DATA_PTR)
60+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
61+endif()
62+ 
63+if(CMAKE_CXX_COMPILER_ABI)
64+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
65+endif()
66+ 
67+if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
68+ set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
69+endif()
70+ 
71+set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
72+if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
73+ set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
74+endif()
75+ 
76+ 
77+ 
78+ 
79+ 
80+set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/aarch64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
81+set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
82+set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
83+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
@@ -0,0 +1,15 @@
1+set(CMAKE_HOST_SYSTEM "Linux-5.15.0-25-generic")
2+set(CMAKE_HOST_SYSTEM_NAME "Linux")
3+set(CMAKE_HOST_SYSTEM_VERSION "5.15.0-25-generic")
4+set(CMAKE_HOST_SYSTEM_PROCESSOR "aarch64")
5+ 
6+ 
7+ 
8+set(CMAKE_SYSTEM "Linux-5.15.0-25-generic")
9+set(CMAKE_SYSTEM_NAME "Linux")
10+set(CMAKE_SYSTEM_VERSION "5.15.0-25-generic")
11+set(CMAKE_SYSTEM_PROCESSOR "aarch64")
12+ 
13+set(CMAKE_CROSSCOMPILING "FALSE")
14+ 
15+set(CMAKE_SYSTEM_LOADED 1)
@@ -0,0 +1,866 @@
1+#ifdef __cplusplus
2+# error "A C++ compiler has been selected for C."
3+#endif
4+ 
5+#if defined(__18CXX)
6+# define ID_VOID_MAIN
7+#endif
8+#if defined(__CLASSIC_C__)
9+/* cv-qualifiers did not exist in K&R C */
10+# define const
11+# define volatile
12+#endif
13+ 
14+#if !defined(__has_include)
15+/* If the compiler does not have __has_include, pretend the answer is
16+ always no. */
17+# define __has_include(x) 0
18+#endif
19+ 
20+ 
21+/* Version number components: V=Version, R=Revision, P=Patch
22+ Version date components: YYYY=Year, MM=Month, DD=Day */
23+ 
24+#if defined(__INTEL_COMPILER) || defined(__ICC)
25+# define COMPILER_ID "Intel"
26+# if defined(_MSC_VER)
27+# define SIMULATE_ID "MSVC"
28+# endif
29+# if defined(__GNUC__)
30+# define SIMULATE_ID "GNU"
31+# endif
32+ /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
33+ except that a few beta releases use the old format with V=2021. */
34+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
35+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
36+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
37+# if defined(__INTEL_COMPILER_UPDATE)
38+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
39+# else
40+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
41+# endif
42+# else
43+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
44+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
45+ /* The third version component from --version is an update index,
46+ but no macro is provided for it. */
47+# define COMPILER_VERSION_PATCH DEC(0)
48+# endif
49+# if defined(__INTEL_COMPILER_BUILD_DATE)
50+ /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
51+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
52+# endif
53+# if defined(_MSC_VER)
54+ /* _MSC_VER = VVRR */
55+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
56+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
57+# endif
58+# if defined(__GNUC__)
59+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
60+# elif defined(__GNUG__)
61+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
62+# endif
63+# if defined(__GNUC_MINOR__)
64+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
65+# endif
66+# if defined(__GNUC_PATCHLEVEL__)
67+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
68+# endif
69+ 
70+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
71+# define COMPILER_ID "IntelLLVM"
72+#if defined(_MSC_VER)
73+# define SIMULATE_ID "MSVC"
74+#endif
75+#if defined(__GNUC__)
76+# define SIMULATE_ID "GNU"
77+#endif
78+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
79+ * later. Look for 6 digit vs. 8 digit version number to decide encoding.
80+ * VVVV is no smaller than the current year when a version is released.
81+ */
82+#if __INTEL_LLVM_COMPILER < 1000000L
83+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
84+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
85+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
86+#else
87+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
88+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
89+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
90+#endif
91+#if defined(_MSC_VER)
92+ /* _MSC_VER = VVRR */
93+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
94+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
95+#endif
96+#if defined(__GNUC__)
97+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
98+#elif defined(__GNUG__)
99+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
100+#endif
101+#if defined(__GNUC_MINOR__)
102+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
103+#endif
104+#if defined(__GNUC_PATCHLEVEL__)
105+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
106+#endif
107+ 
108+#elif defined(__PATHCC__)
109+# define COMPILER_ID "PathScale"
110+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
111+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
112+# if defined(__PATHCC_PATCHLEVEL__)
113+# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
114+# endif
115+ 
116+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
117+# define COMPILER_ID "Embarcadero"
118+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
119+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
120+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
121+ 
122+#elif defined(__BORLANDC__)
123+# define COMPILER_ID "Borland"
124+ /* __BORLANDC__ = 0xVRR */
125+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
126+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
127+ 
128+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
129+# define COMPILER_ID "Watcom"
130+ /* __WATCOMC__ = VVRR */
131+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
132+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
133+# if (__WATCOMC__ % 10) > 0
134+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
135+# endif
136+ 
137+#elif defined(__WATCOMC__)
138+# define COMPILER_ID "OpenWatcom"
139+ /* __WATCOMC__ = VVRP + 1100 */
140+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
141+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
142+# if (__WATCOMC__ % 10) > 0
143+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
144+# endif
145+ 
146+#elif defined(__SUNPRO_C)
147+# define COMPILER_ID "SunPro"
148+# if __SUNPRO_C >= 0x5100
149+ /* __SUNPRO_C = 0xVRRP */
150+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
151+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
152+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
153+# else
154+ /* __SUNPRO_CC = 0xVRP */
155+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
156+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
157+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
158+# endif
159+ 
160+#elif defined(__HP_cc)
161+# define COMPILER_ID "HP"
162+ /* __HP_cc = VVRRPP */
163+# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
164+# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
165+# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
166+ 
167+#elif defined(__DECC)
168+# define COMPILER_ID "Compaq"
169+ /* __DECC_VER = VVRRTPPPP */
170+# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
171+# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
172+# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
173+ 
174+#elif defined(__IBMC__) && defined(__COMPILER_VER__)
175+# define COMPILER_ID "zOS"
176+ /* __IBMC__ = VRP */
177+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
178+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
179+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
180+ 
181+#elif defined(__open_xl__) && defined(__clang__)
182+# define COMPILER_ID "IBMClang"
183+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
184+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
185+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
186+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
187+ 
188+ 
189+#elif defined(__ibmxl__) && defined(__clang__)
190+# define COMPILER_ID "XLClang"
191+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
192+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
193+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
194+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
195+ 
196+ 
197+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
198+# define COMPILER_ID "XL"
199+ /* __IBMC__ = VRP */
200+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
201+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
202+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
203+ 
204+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
205+# define COMPILER_ID "VisualAge"
206+ /* __IBMC__ = VRP */
207+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
208+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
209+# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
210+ 
211+#elif defined(__NVCOMPILER)
212+# define COMPILER_ID "NVHPC"
213+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
214+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
215+# if defined(__NVCOMPILER_PATCHLEVEL__)
216+# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
217+# endif
218+ 
219+#elif defined(__PGI)
220+# define COMPILER_ID "PGI"
221+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
222+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
223+# if defined(__PGIC_PATCHLEVEL__)
224+# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
225+# endif
226+ 
227+#elif defined(_CRAYC)
228+# define COMPILER_ID "Cray"
229+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
230+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
231+ 
232+#elif defined(__TI_COMPILER_VERSION__)
233+# define COMPILER_ID "TI"
234+ /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
235+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
236+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
237+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
238+ 
239+#elif defined(__CLANG_FUJITSU)
240+# define COMPILER_ID "FujitsuClang"
241+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
242+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
243+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
244+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
245+ 
246+ 
247+#elif defined(__FUJITSU)
248+# define COMPILER_ID "Fujitsu"
249+# if defined(__FCC_version__)
250+# define COMPILER_VERSION __FCC_version__
251+# elif defined(__FCC_major__)
252+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
253+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
254+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
255+# endif
256+# if defined(__fcc_version)
257+# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
258+# elif defined(__FCC_VERSION)
259+# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
260+# endif
261+ 
262+ 
263+#elif defined(__ghs__)
264+# define COMPILER_ID "GHS"
265+/* __GHS_VERSION_NUMBER = VVVVRP */
266+# ifdef __GHS_VERSION_NUMBER
267+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
268+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
269+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
270+# endif
271+ 
272+#elif defined(__TASKING__)
273+# define COMPILER_ID "Tasking"
274+ # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
275+ # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
276+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
277+ 
278+#elif defined(__TINYC__)
279+# define COMPILER_ID "TinyCC"
280+ 
281+#elif defined(__BCC__)
282+# define COMPILER_ID "Bruce"
283+ 
284+#elif defined(__SCO_VERSION__)
285+# define COMPILER_ID "SCO"
286+ 
287+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
288+# define COMPILER_ID "ARMCC"
289+#if __ARMCC_VERSION >= 1000000
290+ /* __ARMCC_VERSION = VRRPPPP */
291+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
292+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
293+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
294+#else
295+ /* __ARMCC_VERSION = VRPPPP */
296+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
297+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
298+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
299+#endif
300+ 
301+ 
302+#elif defined(__clang__) && defined(__apple_build_version__)
303+# define COMPILER_ID "AppleClang"
304+# if defined(_MSC_VER)
305+# define SIMULATE_ID "MSVC"
306+# endif
307+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
308+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
309+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
310+# if defined(_MSC_VER)
311+ /* _MSC_VER = VVRR */
312+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
313+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
314+# endif
315+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
316+ 
317+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
318+# define COMPILER_ID "ARMClang"
319+ # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
320+ # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
321+ # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
322+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
323+ 
324+#elif defined(__clang__)
325+# define COMPILER_ID "Clang"
326+# if defined(_MSC_VER)
327+# define SIMULATE_ID "MSVC"
328+# endif
329+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
330+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
331+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
332+# if defined(_MSC_VER)
333+ /* _MSC_VER = VVRR */
334+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
335+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
336+# endif
337+ 
338+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
339+# define COMPILER_ID "LCC"
340+# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
341+# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
342+# if defined(__LCC_MINOR__)
343+# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
344+# endif
345+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
346+# define SIMULATE_ID "GNU"
347+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
348+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
349+# if defined(__GNUC_PATCHLEVEL__)
350+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
351+# endif
352+# endif
353+ 
354+#elif defined(__GNUC__)
355+# define COMPILER_ID "GNU"
356+# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
357+# if defined(__GNUC_MINOR__)
358+# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
359+# endif
360+# if defined(__GNUC_PATCHLEVEL__)
361+# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
362+# endif
363+ 
364+#elif defined(_MSC_VER)
365+# define COMPILER_ID "MSVC"
366+ /* _MSC_VER = VVRR */
367+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
368+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
369+# if defined(_MSC_FULL_VER)
370+# if _MSC_VER >= 1400
371+ /* _MSC_FULL_VER = VVRRPPPPP */
372+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
373+# else
374+ /* _MSC_FULL_VER = VVRRPPPP */
375+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
376+# endif
377+# endif
378+# if defined(_MSC_BUILD)
379+# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
380+# endif
381+ 
382+#elif defined(_ADI_COMPILER)
383+# define COMPILER_ID "ADSP"
384+#if defined(__VERSIONNUM__)
385+ /* __VERSIONNUM__ = 0xVVRRPPTT */
386+# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
387+# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
388+# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
389+# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
390+#endif
391+ 
392+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
393+# define COMPILER_ID "IAR"
394+# if defined(__VER__) && defined(__ICCARM__)
395+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
396+# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
397+# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
398+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
399+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
400+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
401+# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
402+# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
403+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
404+# endif
405+ 
406+#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
407+# define COMPILER_ID "SDCC"
408+# if defined(__SDCC_VERSION_MAJOR)
409+# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
410+# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
411+# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
412+# else
413+ /* SDCC = VRP */
414+# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
415+# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
416+# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
417+# endif
418+ 
419+ 
420+/* These compilers are either not known or too old to define an
421+ identification macro. Try to identify the platform and guess that
422+ it is the native compiler. */
423+#elif defined(__hpux) || defined(__hpua)
424+# define COMPILER_ID "HP"
425+ 
426+#else /* unknown compiler */
427+# define COMPILER_ID ""
428+#endif
429+ 
430+/* Construct the string literal in pieces to prevent the source from
431+ getting matched. Store it in a pointer rather than an array
432+ because some compilers will just produce instructions to fill the
433+ array rather than assigning a pointer to a static array. */
434+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
435+#ifdef SIMULATE_ID
436+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
437+#endif
438+ 
439+#ifdef __QNXNTO__
440+char const* qnxnto = "INFO" ":" "qnxnto[]";
441+#endif
442+ 
443+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
444+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
445+#endif
446+ 
447+#define STRINGIFY_HELPER(X) #X
448+#define STRINGIFY(X) STRINGIFY_HELPER(X)
449+ 
450+/* Identify known platforms by name. */
451+#if defined(__linux) || defined(__linux__) || defined(linux)
452+# define PLATFORM_ID "Linux"
453+ 
454+#elif defined(__MSYS__)
455+# define PLATFORM_ID "MSYS"
456+ 
457+#elif defined(__CYGWIN__)
458+# define PLATFORM_ID "Cygwin"
459+ 
460+#elif defined(__MINGW32__)
461+# define PLATFORM_ID "MinGW"
462+ 
463+#elif defined(__APPLE__)
464+# define PLATFORM_ID "Darwin"
465+ 
466+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
467+# define PLATFORM_ID "Windows"
468+ 
469+#elif defined(__FreeBSD__) || defined(__FreeBSD)
470+# define PLATFORM_ID "FreeBSD"
471+ 
472+#elif defined(__NetBSD__) || defined(__NetBSD)
473+# define PLATFORM_ID "NetBSD"
474+ 
475+#elif defined(__OpenBSD__) || defined(__OPENBSD)
476+# define PLATFORM_ID "OpenBSD"
477+ 
478+#elif defined(__sun) || defined(sun)
479+# define PLATFORM_ID "SunOS"
480+ 
481+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
482+# define PLATFORM_ID "AIX"
483+ 
484+#elif defined(__hpux) || defined(__hpux__)
485+# define PLATFORM_ID "HP-UX"
486+ 
487+#elif defined(__HAIKU__)
488+# define PLATFORM_ID "Haiku"
489+ 
490+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
491+# define PLATFORM_ID "BeOS"
492+ 
493+#elif defined(__QNX__) || defined(__QNXNTO__)
494+# define PLATFORM_ID "QNX"
495+ 
496+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
497+# define PLATFORM_ID "Tru64"
498+ 
499+#elif defined(__riscos) || defined(__riscos__)
500+# define PLATFORM_ID "RISCos"
501+ 
502+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
503+# define PLATFORM_ID "SINIX"
504+ 
505+#elif defined(__UNIX_SV__)
506+# define PLATFORM_ID "UNIX_SV"
507+ 
508+#elif defined(__bsdos__)
509+# define PLATFORM_ID "BSDOS"
510+ 
511+#elif defined(_MPRAS) || defined(MPRAS)
512+# define PLATFORM_ID "MP-RAS"
513+ 
514+#elif defined(__osf) || defined(__osf__)
515+# define PLATFORM_ID "OSF1"
516+ 
517+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
518+# define PLATFORM_ID "SCO_SV"
519+ 
520+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
521+# define PLATFORM_ID "ULTRIX"
522+ 
523+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
524+# define PLATFORM_ID "Xenix"
525+ 
526+#elif defined(__WATCOMC__)
527+# if defined(__LINUX__)
528+# define PLATFORM_ID "Linux"
529+ 
530+# elif defined(__DOS__)
531+# define PLATFORM_ID "DOS"
532+ 
533+# elif defined(__OS2__)
534+# define PLATFORM_ID "OS2"
535+ 
536+# elif defined(__WINDOWS__)
537+# define PLATFORM_ID "Windows3x"
538+ 
539+# elif defined(__VXWORKS__)
540+# define PLATFORM_ID "VxWorks"
541+ 
542+# else /* unknown platform */
543+# define PLATFORM_ID
544+# endif
545+ 
546+#elif defined(__INTEGRITY)
547+# if defined(INT_178B)
548+# define PLATFORM_ID "Integrity178"
549+ 
550+# else /* regular Integrity */
551+# define PLATFORM_ID "Integrity"
552+# endif
553+ 
554+# elif defined(_ADI_COMPILER)
555+# define PLATFORM_ID "ADSP"
556+ 
557+#else /* unknown platform */
558+# define PLATFORM_ID
559+ 
560+#endif
561+ 
562+/* For windows compilers MSVC and Intel we can determine
563+ the architecture of the compiler being used. This is because
564+ the compilers do not have flags that can change the architecture,
565+ but rather depend on which compiler is being used
566+*/
567+#if defined(_WIN32) && defined(_MSC_VER)
568+# if defined(_M_IA64)
569+# define ARCHITECTURE_ID "IA64"
570+ 
571+# elif defined(_M_ARM64EC)
572+# define ARCHITECTURE_ID "ARM64EC"
573+ 
574+# elif defined(_M_X64) || defined(_M_AMD64)
575+# define ARCHITECTURE_ID "x64"
576+ 
577+# elif defined(_M_IX86)
578+# define ARCHITECTURE_ID "X86"
579+ 
580+# elif defined(_M_ARM64)
581+# define ARCHITECTURE_ID "ARM64"
582+ 
583+# elif defined(_M_ARM)
584+# if _M_ARM == 4
585+# define ARCHITECTURE_ID "ARMV4I"
586+# elif _M_ARM == 5
587+# define ARCHITECTURE_ID "ARMV5I"
588+# else
589+# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
590+# endif
591+ 
592+# elif defined(_M_MIPS)
593+# define ARCHITECTURE_ID "MIPS"
594+ 
595+# elif defined(_M_SH)
596+# define ARCHITECTURE_ID "SHx"
597+ 
598+# else /* unknown architecture */
599+# define ARCHITECTURE_ID ""
600+# endif
601+ 
602+#elif defined(__WATCOMC__)
603+# if defined(_M_I86)
604+# define ARCHITECTURE_ID "I86"
605+ 
606+# elif defined(_M_IX86)
607+# define ARCHITECTURE_ID "X86"
608+ 
609+# else /* unknown architecture */
610+# define ARCHITECTURE_ID ""
611+# endif
612+ 
613+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
614+# if defined(__ICCARM__)
615+# define ARCHITECTURE_ID "ARM"
616+ 
617+# elif defined(__ICCRX__)
618+# define ARCHITECTURE_ID "RX"
619+ 
620+# elif defined(__ICCRH850__)
621+# define ARCHITECTURE_ID "RH850"
622+ 
623+# elif defined(__ICCRL78__)
624+# define ARCHITECTURE_ID "RL78"
625+ 
626+# elif defined(__ICCRISCV__)
627+# define ARCHITECTURE_ID "RISCV"
628+ 
629+# elif defined(__ICCAVR__)
630+# define ARCHITECTURE_ID "AVR"
631+ 
632+# elif defined(__ICC430__)
633+# define ARCHITECTURE_ID "MSP430"
634+ 
635+# elif defined(__ICCV850__)
636+# define ARCHITECTURE_ID "V850"
637+ 
638+# elif defined(__ICC8051__)
639+# define ARCHITECTURE_ID "8051"
640+ 
641+# elif defined(__ICCSTM8__)
642+# define ARCHITECTURE_ID "STM8"
643+ 
644+# else /* unknown architecture */
645+# define ARCHITECTURE_ID ""
646+# endif
647+ 
648+#elif defined(__ghs__)
649+# if defined(__PPC64__)
650+# define ARCHITECTURE_ID "PPC64"
651+ 
652+# elif defined(__ppc__)
653+# define ARCHITECTURE_ID "PPC"
654+ 
655+# elif defined(__ARM__)
656+# define ARCHITECTURE_ID "ARM"
657+ 
658+# elif defined(__x86_64__)
659+# define ARCHITECTURE_ID "x64"
660+ 
661+# elif defined(__i386__)
662+# define ARCHITECTURE_ID "X86"
663+ 
664+# else /* unknown architecture */
665+# define ARCHITECTURE_ID ""
666+# endif
667+ 
668+#elif defined(__TI_COMPILER_VERSION__)
669+# if defined(__TI_ARM__)
670+# define ARCHITECTURE_ID "ARM"
671+ 
672+# elif defined(__MSP430__)
673+# define ARCHITECTURE_ID "MSP430"
674+ 
675+# elif defined(__TMS320C28XX__)
676+# define ARCHITECTURE_ID "TMS320C28x"
677+ 
678+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
679+# define ARCHITECTURE_ID "TMS320C6x"
680+ 
681+# else /* unknown architecture */
682+# define ARCHITECTURE_ID ""
683+# endif
684+ 
685+# elif defined(__ADSPSHARC__)
686+# define ARCHITECTURE_ID "SHARC"
687+ 
688+# elif defined(__ADSPBLACKFIN__)
689+# define ARCHITECTURE_ID "Blackfin"
690+ 
691+#elif defined(__TASKING__)
692+ 
693+# if defined(__CTC__) || defined(__CPTC__)
694+# define ARCHITECTURE_ID "TriCore"
695+ 
696+# elif defined(__CMCS__)
697+# define ARCHITECTURE_ID "MCS"
698+ 
699+# elif defined(__CARM__)
700+# define ARCHITECTURE_ID "ARM"
701+ 
702+# elif defined(__CARC__)
703+# define ARCHITECTURE_ID "ARC"
704+ 
705+# elif defined(__C51__)
706+# define ARCHITECTURE_ID "8051"
707+ 
708+# elif defined(__CPCP__)
709+# define ARCHITECTURE_ID "PCP"
710+ 
711+# else
712+# define ARCHITECTURE_ID ""
713+# endif
714+ 
715+#else
716+# define ARCHITECTURE_ID
717+#endif
718+ 
719+/* Convert integer to decimal digit literals. */
720+#define DEC(n) \
721+ ('0' + (((n) / 10000000)%10)), \
722+ ('0' + (((n) / 1000000)%10)), \
723+ ('0' + (((n) / 100000)%10)), \
724+ ('0' + (((n) / 10000)%10)), \
725+ ('0' + (((n) / 1000)%10)), \
726+ ('0' + (((n) / 100)%10)), \
727+ ('0' + (((n) / 10)%10)), \
728+ ('0' + ((n) % 10))
729+ 
730+/* Convert integer to hex digit literals. */
731+#define HEX(n) \
732+ ('0' + ((n)>>28 & 0xF)), \
733+ ('0' + ((n)>>24 & 0xF)), \
734+ ('0' + ((n)>>20 & 0xF)), \
735+ ('0' + ((n)>>16 & 0xF)), \
736+ ('0' + ((n)>>12 & 0xF)), \
737+ ('0' + ((n)>>8 & 0xF)), \
738+ ('0' + ((n)>>4 & 0xF)), \
739+ ('0' + ((n) & 0xF))
740+ 
741+/* Construct a string literal encoding the version number. */
742+#ifdef COMPILER_VERSION
743+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
744+ 
745+/* Construct a string literal encoding the version number components. */
746+#elif defined(COMPILER_VERSION_MAJOR)
747+char const info_version[] = {
748+ 'I', 'N', 'F', 'O', ':',
749+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
750+ COMPILER_VERSION_MAJOR,
751+# ifdef COMPILER_VERSION_MINOR
752+ '.', COMPILER_VERSION_MINOR,
753+# ifdef COMPILER_VERSION_PATCH
754+ '.', COMPILER_VERSION_PATCH,
755+# ifdef COMPILER_VERSION_TWEAK
756+ '.', COMPILER_VERSION_TWEAK,
757+# endif
758+# endif
759+# endif
760+ ']','\0'};
761+#endif
762+ 
763+/* Construct a string literal encoding the internal version number. */
764+#ifdef COMPILER_VERSION_INTERNAL
765+char const info_version_internal[] = {
766+ 'I', 'N', 'F', 'O', ':',
767+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
768+ 'i','n','t','e','r','n','a','l','[',
769+ COMPILER_VERSION_INTERNAL,']','\0'};
770+#elif defined(COMPILER_VERSION_INTERNAL_STR)
771+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
772+#endif
773+ 
774+/* Construct a string literal encoding the version number components. */
775+#ifdef SIMULATE_VERSION_MAJOR
776+char const info_simulate_version[] = {
777+ 'I', 'N', 'F', 'O', ':',
778+ 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
779+ SIMULATE_VERSION_MAJOR,
780+# ifdef SIMULATE_VERSION_MINOR
781+ '.', SIMULATE_VERSION_MINOR,
782+# ifdef SIMULATE_VERSION_PATCH
783+ '.', SIMULATE_VERSION_PATCH,
784+# ifdef SIMULATE_VERSION_TWEAK
785+ '.', SIMULATE_VERSION_TWEAK,
786+# endif
787+# endif
788+# endif
789+ ']','\0'};
790+#endif
791+ 
792+/* Construct the string literal in pieces to prevent the source from
793+ getting matched. Store it in a pointer rather than an array
794+ because some compilers will just produce instructions to fill the
795+ array rather than assigning a pointer to a static array. */
796+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
797+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
798+ 
799+ 
800+ 
801+#if !defined(__STDC__) && !defined(__clang__)
802+# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
803+# define C_VERSION "90"
804+# else
805+# define C_VERSION
806+# endif
807+#elif __STDC_VERSION__ > 201710L
808+# define C_VERSION "23"
809+#elif __STDC_VERSION__ >= 201710L
810+# define C_VERSION "17"
811+#elif __STDC_VERSION__ >= 201000L
812+# define C_VERSION "11"
813+#elif __STDC_VERSION__ >= 199901L
814+# define C_VERSION "99"
815+#else
816+# define C_VERSION "90"
817+#endif
818+const char* info_language_standard_default =
819+ "INFO" ":" "standard_default[" C_VERSION "]";
820+ 
821+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
822+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
823+ defined(__TI_COMPILER_VERSION__)) && \
824+ !defined(__STRICT_ANSI__)
825+ "ON"
826+#else
827+ "OFF"
828+#endif
829+"]";
830+ 
831+/*--------------------------------------------------------------------------*/
832+ 
833+#ifdef ID_VOID_MAIN
834+void main() {}
835+#else
836+# if defined(__CLASSIC_C__)
837+int main(argc, argv) int argc; char *argv[];
838+# else
839+int main(int argc, char* argv[])
840+# endif
841+{
842+ int require = 0;
843+ require += info_compiler[argc];
844+ require += info_platform[argc];
845+ require += info_arch[argc];
846+#ifdef COMPILER_VERSION_MAJOR
847+ require += info_version[argc];
848+#endif
849+#ifdef COMPILER_VERSION_INTERNAL
850+ require += info_version_internal[argc];
851+#endif
852+#ifdef SIMULATE_ID
853+ require += info_simulate[argc];
854+#endif
855+#ifdef SIMULATE_VERSION_MAJOR
856+ require += info_simulate_version[argc];
857+#endif
858+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
859+ require += info_cray[argc];
860+#endif
861+ require += info_language_standard_default[argc];
862+ require += info_language_extensions_default[argc];
863+ (void)argv;
864+ return require;
865+}
866+#endif
@@ -0,0 +1,855 @@
1+/* This source file must have a .cpp extension so that all C++ compilers
2+ recognize the extension without flags. Borland does not know .cxx for
3+ example. */
4+#ifndef __cplusplus
5+# error "A C compiler has been selected for C++."
6+#endif
7+ 
8+#if !defined(__has_include)
9+/* If the compiler does not have __has_include, pretend the answer is
10+ always no. */
11+# define __has_include(x) 0
12+#endif
13+ 
14+ 
15+/* Version number components: V=Version, R=Revision, P=Patch
16+ Version date components: YYYY=Year, MM=Month, DD=Day */
17+ 
18+#if defined(__COMO__)
19+# define COMPILER_ID "Comeau"
20+ /* __COMO_VERSION__ = VRR */
21+# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
22+# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
23+ 
24+#elif defined(__INTEL_COMPILER) || defined(__ICC)
25+# define COMPILER_ID "Intel"
26+# if defined(_MSC_VER)
27+# define SIMULATE_ID "MSVC"
28+# endif
29+# if defined(__GNUC__)
30+# define SIMULATE_ID "GNU"
31+# endif
32+ /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
33+ except that a few beta releases use the old format with V=2021. */
34+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
35+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
36+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
37+# if defined(__INTEL_COMPILER_UPDATE)
38+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
39+# else
40+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
41+# endif
42+# else
43+# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
44+# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
45+ /* The third version component from --version is an update index,
46+ but no macro is provided for it. */
47+# define COMPILER_VERSION_PATCH DEC(0)
48+# endif
49+# if defined(__INTEL_COMPILER_BUILD_DATE)
50+ /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
51+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
52+# endif
53+# if defined(_MSC_VER)
54+ /* _MSC_VER = VVRR */
55+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
56+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
57+# endif
58+# if defined(__GNUC__)
59+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
60+# elif defined(__GNUG__)
61+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
62+# endif
63+# if defined(__GNUC_MINOR__)
64+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
65+# endif
66+# if defined(__GNUC_PATCHLEVEL__)
67+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
68+# endif
69+ 
70+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
71+# define COMPILER_ID "IntelLLVM"
72+#if defined(_MSC_VER)
73+# define SIMULATE_ID "MSVC"
74+#endif
75+#if defined(__GNUC__)
76+# define SIMULATE_ID "GNU"
77+#endif
78+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
79+ * later. Look for 6 digit vs. 8 digit version number to decide encoding.
80+ * VVVV is no smaller than the current year when a version is released.
81+ */
82+#if __INTEL_LLVM_COMPILER < 1000000L
83+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
84+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
85+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
86+#else
87+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
88+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
89+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
90+#endif
91+#if defined(_MSC_VER)
92+ /* _MSC_VER = VVRR */
93+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
94+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
95+#endif
96+#if defined(__GNUC__)
97+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
98+#elif defined(__GNUG__)
99+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
100+#endif
101+#if defined(__GNUC_MINOR__)
102+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
103+#endif
104+#if defined(__GNUC_PATCHLEVEL__)
105+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
106+#endif
107+ 
108+#elif defined(__PATHCC__)
109+# define COMPILER_ID "PathScale"
110+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
111+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
112+# if defined(__PATHCC_PATCHLEVEL__)
113+# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
114+# endif
115+ 
116+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
117+# define COMPILER_ID "Embarcadero"
118+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
119+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
120+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
121+ 
122+#elif defined(__BORLANDC__)
123+# define COMPILER_ID "Borland"
124+ /* __BORLANDC__ = 0xVRR */
125+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
126+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
127+ 
128+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
129+# define COMPILER_ID "Watcom"
130+ /* __WATCOMC__ = VVRR */
131+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
132+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
133+# if (__WATCOMC__ % 10) > 0
134+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
135+# endif
136+ 
137+#elif defined(__WATCOMC__)
138+# define COMPILER_ID "OpenWatcom"
139+ /* __WATCOMC__ = VVRP + 1100 */
140+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
141+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
142+# if (__WATCOMC__ % 10) > 0
143+# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
144+# endif
145+ 
146+#elif defined(__SUNPRO_CC)
147+# define COMPILER_ID "SunPro"
148+# if __SUNPRO_CC >= 0x5100
149+ /* __SUNPRO_CC = 0xVRRP */
150+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
151+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
152+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
153+# else
154+ /* __SUNPRO_CC = 0xVRP */
155+# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
156+# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
157+# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
158+# endif
159+ 
160+#elif defined(__HP_aCC)
161+# define COMPILER_ID "HP"
162+ /* __HP_aCC = VVRRPP */
163+# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
164+# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
165+# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
166+ 
167+#elif defined(__DECCXX)
168+# define COMPILER_ID "Compaq"
169+ /* __DECCXX_VER = VVRRTPPPP */
170+# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
171+# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
172+# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
173+ 
174+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
175+# define COMPILER_ID "zOS"
176+ /* __IBMCPP__ = VRP */
177+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
178+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
179+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
180+ 
181+#elif defined(__open_xl__) && defined(__clang__)
182+# define COMPILER_ID "IBMClang"
183+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
184+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
185+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
186+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
187+ 
188+ 
189+#elif defined(__ibmxl__) && defined(__clang__)
190+# define COMPILER_ID "XLClang"
191+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
192+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
193+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
194+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
195+ 
196+ 
197+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
198+# define COMPILER_ID "XL"
199+ /* __IBMCPP__ = VRP */
200+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
201+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
202+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
203+ 
204+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
205+# define COMPILER_ID "VisualAge"
206+ /* __IBMCPP__ = VRP */
207+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
208+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
209+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
210+ 
211+#elif defined(__NVCOMPILER)
212+# define COMPILER_ID "NVHPC"
213+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
214+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
215+# if defined(__NVCOMPILER_PATCHLEVEL__)
216+# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
217+# endif
218+ 
219+#elif defined(__PGI)
220+# define COMPILER_ID "PGI"
221+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
222+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
223+# if defined(__PGIC_PATCHLEVEL__)
224+# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
225+# endif
226+ 
227+#elif defined(_CRAYC)
228+# define COMPILER_ID "Cray"
229+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
230+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
231+ 
232+#elif defined(__TI_COMPILER_VERSION__)
233+# define COMPILER_ID "TI"
234+ /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
235+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
236+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
237+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
238+ 
239+#elif defined(__CLANG_FUJITSU)
240+# define COMPILER_ID "FujitsuClang"
241+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
242+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
243+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
244+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
245+ 
246+ 
247+#elif defined(__FUJITSU)
248+# define COMPILER_ID "Fujitsu"
249+# if defined(__FCC_version__)
250+# define COMPILER_VERSION __FCC_version__
251+# elif defined(__FCC_major__)
252+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
253+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
254+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
255+# endif
256+# if defined(__fcc_version)
257+# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
258+# elif defined(__FCC_VERSION)
259+# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
260+# endif
261+ 
262+ 
263+#elif defined(__ghs__)
264+# define COMPILER_ID "GHS"
265+/* __GHS_VERSION_NUMBER = VVVVRP */
266+# ifdef __GHS_VERSION_NUMBER
267+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
268+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
269+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
270+# endif
271+ 
272+#elif defined(__TASKING__)
273+# define COMPILER_ID "Tasking"
274+ # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
275+ # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
276+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
277+ 
278+#elif defined(__SCO_VERSION__)
279+# define COMPILER_ID "SCO"
280+ 
281+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
282+# define COMPILER_ID "ARMCC"
283+#if __ARMCC_VERSION >= 1000000
284+ /* __ARMCC_VERSION = VRRPPPP */
285+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
286+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
287+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
288+#else
289+ /* __ARMCC_VERSION = VRPPPP */
290+ # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
291+ # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
292+ # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
293+#endif
294+ 
295+ 
296+#elif defined(__clang__) && defined(__apple_build_version__)
297+# define COMPILER_ID "AppleClang"
298+# if defined(_MSC_VER)
299+# define SIMULATE_ID "MSVC"
300+# endif
301+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
302+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
303+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
304+# if defined(_MSC_VER)
305+ /* _MSC_VER = VVRR */
306+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
307+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
308+# endif
309+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
310+ 
311+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
312+# define COMPILER_ID "ARMClang"
313+ # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
314+ # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
315+ # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
316+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
317+ 
318+#elif defined(__clang__)
319+# define COMPILER_ID "Clang"
320+# if defined(_MSC_VER)
321+# define SIMULATE_ID "MSVC"
322+# endif
323+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
324+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
325+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
326+# if defined(_MSC_VER)
327+ /* _MSC_VER = VVRR */
328+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
329+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
330+# endif
331+ 
332+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
333+# define COMPILER_ID "LCC"
334+# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
335+# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
336+# if defined(__LCC_MINOR__)
337+# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
338+# endif
339+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
340+# define SIMULATE_ID "GNU"
341+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
342+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
343+# if defined(__GNUC_PATCHLEVEL__)
344+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
345+# endif
346+# endif
347+ 
348+#elif defined(__GNUC__) || defined(__GNUG__)
349+# define COMPILER_ID "GNU"
350+# if defined(__GNUC__)
351+# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
352+# else
353+# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
354+# endif
355+# if defined(__GNUC_MINOR__)
356+# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
357+# endif
358+# if defined(__GNUC_PATCHLEVEL__)
359+# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
360+# endif
361+ 
362+#elif defined(_MSC_VER)
363+# define COMPILER_ID "MSVC"
364+ /* _MSC_VER = VVRR */
365+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
366+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
367+# if defined(_MSC_FULL_VER)
368+# if _MSC_VER >= 1400
369+ /* _MSC_FULL_VER = VVRRPPPPP */
370+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
371+# else
372+ /* _MSC_FULL_VER = VVRRPPPP */
373+# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
374+# endif
375+# endif
376+# if defined(_MSC_BUILD)
377+# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
378+# endif
379+ 
380+#elif defined(_ADI_COMPILER)
381+# define COMPILER_ID "ADSP"
382+#if defined(__VERSIONNUM__)
383+ /* __VERSIONNUM__ = 0xVVRRPPTT */
384+# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
385+# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
386+# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
387+# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
388+#endif
389+ 
390+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
391+# define COMPILER_ID "IAR"
392+# if defined(__VER__) && defined(__ICCARM__)
393+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
394+# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
395+# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
396+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
397+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
398+# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
399+# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
400+# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
401+# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
402+# endif
403+ 
404+ 
405+/* These compilers are either not known or too old to define an
406+ identification macro. Try to identify the platform and guess that
407+ it is the native compiler. */
408+#elif defined(__hpux) || defined(__hpua)
409+# define COMPILER_ID "HP"
410+ 
411+#else /* unknown compiler */
412+# define COMPILER_ID ""
413+#endif
414+ 
415+/* Construct the string literal in pieces to prevent the source from
416+ getting matched. Store it in a pointer rather than an array
417+ because some compilers will just produce instructions to fill the
418+ array rather than assigning a pointer to a static array. */
419+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
420+#ifdef SIMULATE_ID
421+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
422+#endif
423+ 
424+#ifdef __QNXNTO__
425+char const* qnxnto = "INFO" ":" "qnxnto[]";
426+#endif
427+ 
428+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
429+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
430+#endif
431+ 
432+#define STRINGIFY_HELPER(X) #X
433+#define STRINGIFY(X) STRINGIFY_HELPER(X)
434+ 
435+/* Identify known platforms by name. */
436+#if defined(__linux) || defined(__linux__) || defined(linux)
437+# define PLATFORM_ID "Linux"
438+ 
439+#elif defined(__MSYS__)
440+# define PLATFORM_ID "MSYS"
441+ 
442+#elif defined(__CYGWIN__)
443+# define PLATFORM_ID "Cygwin"
444+ 
445+#elif defined(__MINGW32__)
446+# define PLATFORM_ID "MinGW"
447+ 
448+#elif defined(__APPLE__)
449+# define PLATFORM_ID "Darwin"
450+ 
451+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
452+# define PLATFORM_ID "Windows"
453+ 
454+#elif defined(__FreeBSD__) || defined(__FreeBSD)
455+# define PLATFORM_ID "FreeBSD"
456+ 
457+#elif defined(__NetBSD__) || defined(__NetBSD)
458+# define PLATFORM_ID "NetBSD"
459+ 
460+#elif defined(__OpenBSD__) || defined(__OPENBSD)
461+# define PLATFORM_ID "OpenBSD"
462+ 
463+#elif defined(__sun) || defined(sun)
464+# define PLATFORM_ID "SunOS"
465+ 
466+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
467+# define PLATFORM_ID "AIX"
468+ 
469+#elif defined(__hpux) || defined(__hpux__)
470+# define PLATFORM_ID "HP-UX"
471+ 
472+#elif defined(__HAIKU__)
473+# define PLATFORM_ID "Haiku"
474+ 
475+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
476+# define PLATFORM_ID "BeOS"
477+ 
478+#elif defined(__QNX__) || defined(__QNXNTO__)
479+# define PLATFORM_ID "QNX"
480+ 
481+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
482+# define PLATFORM_ID "Tru64"
483+ 
484+#elif defined(__riscos) || defined(__riscos__)
485+# define PLATFORM_ID "RISCos"
486+ 
487+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
488+# define PLATFORM_ID "SINIX"
489+ 
490+#elif defined(__UNIX_SV__)
491+# define PLATFORM_ID "UNIX_SV"
492+ 
493+#elif defined(__bsdos__)
494+# define PLATFORM_ID "BSDOS"
495+ 
496+#elif defined(_MPRAS) || defined(MPRAS)
497+# define PLATFORM_ID "MP-RAS"
498+ 
499+#elif defined(__osf) || defined(__osf__)
500+# define PLATFORM_ID "OSF1"
501+ 
502+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
503+# define PLATFORM_ID "SCO_SV"
504+ 
505+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
506+# define PLATFORM_ID "ULTRIX"
507+ 
508+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
509+# define PLATFORM_ID "Xenix"
510+ 
511+#elif defined(__WATCOMC__)
512+# if defined(__LINUX__)
513+# define PLATFORM_ID "Linux"
514+ 
515+# elif defined(__DOS__)
516+# define PLATFORM_ID "DOS"
517+ 
518+# elif defined(__OS2__)
519+# define PLATFORM_ID "OS2"
520+ 
521+# elif defined(__WINDOWS__)
522+# define PLATFORM_ID "Windows3x"
523+ 
524+# elif defined(__VXWORKS__)
525+# define PLATFORM_ID "VxWorks"
526+ 
527+# else /* unknown platform */
528+# define PLATFORM_ID
529+# endif
530+ 
531+#elif defined(__INTEGRITY)
532+# if defined(INT_178B)
533+# define PLATFORM_ID "Integrity178"
534+ 
535+# else /* regular Integrity */
536+# define PLATFORM_ID "Integrity"
537+# endif
538+ 
539+# elif defined(_ADI_COMPILER)
540+# define PLATFORM_ID "ADSP"
541+ 
542+#else /* unknown platform */
543+# define PLATFORM_ID
544+ 
545+#endif
546+ 
547+/* For windows compilers MSVC and Intel we can determine
548+ the architecture of the compiler being used. This is because
549+ the compilers do not have flags that can change the architecture,
550+ but rather depend on which compiler is being used
551+*/
552+#if defined(_WIN32) && defined(_MSC_VER)
553+# if defined(_M_IA64)
554+# define ARCHITECTURE_ID "IA64"
555+ 
556+# elif defined(_M_ARM64EC)
557+# define ARCHITECTURE_ID "ARM64EC"
558+ 
559+# elif defined(_M_X64) || defined(_M_AMD64)
560+# define ARCHITECTURE_ID "x64"
561+ 
562+# elif defined(_M_IX86)
563+# define ARCHITECTURE_ID "X86"
564+ 
565+# elif defined(_M_ARM64)
566+# define ARCHITECTURE_ID "ARM64"
567+ 
568+# elif defined(_M_ARM)
569+# if _M_ARM == 4
570+# define ARCHITECTURE_ID "ARMV4I"
571+# elif _M_ARM == 5
572+# define ARCHITECTURE_ID "ARMV5I"
573+# else
574+# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
575+# endif
576+ 
577+# elif defined(_M_MIPS)
578+# define ARCHITECTURE_ID "MIPS"
579+ 
580+# elif defined(_M_SH)
581+# define ARCHITECTURE_ID "SHx"
582+ 
583+# else /* unknown architecture */
584+# define ARCHITECTURE_ID ""
585+# endif
586+ 
587+#elif defined(__WATCOMC__)
588+# if defined(_M_I86)
589+# define ARCHITECTURE_ID "I86"
590+ 
591+# elif defined(_M_IX86)
592+# define ARCHITECTURE_ID "X86"
593+ 
594+# else /* unknown architecture */
595+# define ARCHITECTURE_ID ""
596+# endif
597+ 
598+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
599+# if defined(__ICCARM__)
600+# define ARCHITECTURE_ID "ARM"
601+ 
602+# elif defined(__ICCRX__)
603+# define ARCHITECTURE_ID "RX"
604+ 
605+# elif defined(__ICCRH850__)
606+# define ARCHITECTURE_ID "RH850"
607+ 
608+# elif defined(__ICCRL78__)
609+# define ARCHITECTURE_ID "RL78"
610+ 
611+# elif defined(__ICCRISCV__)
612+# define ARCHITECTURE_ID "RISCV"
613+ 
614+# elif defined(__ICCAVR__)
615+# define ARCHITECTURE_ID "AVR"
616+ 
617+# elif defined(__ICC430__)
618+# define ARCHITECTURE_ID "MSP430"
619+ 
620+# elif defined(__ICCV850__)
621+# define ARCHITECTURE_ID "V850"
622+ 
623+# elif defined(__ICC8051__)
624+# define ARCHITECTURE_ID "8051"
625+ 
626+# elif defined(__ICCSTM8__)
627+# define ARCHITECTURE_ID "STM8"
628+ 
629+# else /* unknown architecture */
630+# define ARCHITECTURE_ID ""
631+# endif
632+ 
633+#elif defined(__ghs__)
634+# if defined(__PPC64__)
635+# define ARCHITECTURE_ID "PPC64"
636+ 
637+# elif defined(__ppc__)
638+# define ARCHITECTURE_ID "PPC"
639+ 
640+# elif defined(__ARM__)
641+# define ARCHITECTURE_ID "ARM"
642+ 
643+# elif defined(__x86_64__)
644+# define ARCHITECTURE_ID "x64"
645+ 
646+# elif defined(__i386__)
647+# define ARCHITECTURE_ID "X86"
648+ 
649+# else /* unknown architecture */
650+# define ARCHITECTURE_ID ""
651+# endif
652+ 
653+#elif defined(__TI_COMPILER_VERSION__)
654+# if defined(__TI_ARM__)
655+# define ARCHITECTURE_ID "ARM"
656+ 
657+# elif defined(__MSP430__)
658+# define ARCHITECTURE_ID "MSP430"
659+ 
660+# elif defined(__TMS320C28XX__)
661+# define ARCHITECTURE_ID "TMS320C28x"
662+ 
663+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
664+# define ARCHITECTURE_ID "TMS320C6x"
665+ 
666+# else /* unknown architecture */
667+# define ARCHITECTURE_ID ""
668+# endif
669+ 
670+# elif defined(__ADSPSHARC__)
671+# define ARCHITECTURE_ID "SHARC"
672+ 
673+# elif defined(__ADSPBLACKFIN__)
674+# define ARCHITECTURE_ID "Blackfin"
675+ 
676+#elif defined(__TASKING__)
677+ 
678+# if defined(__CTC__) || defined(__CPTC__)
679+# define ARCHITECTURE_ID "TriCore"
680+ 
681+# elif defined(__CMCS__)
682+# define ARCHITECTURE_ID "MCS"
683+ 
684+# elif defined(__CARM__)
685+# define ARCHITECTURE_ID "ARM"
686+ 
687+# elif defined(__CARC__)
688+# define ARCHITECTURE_ID "ARC"
689+ 
690+# elif defined(__C51__)
691+# define ARCHITECTURE_ID "8051"
692+ 
693+# elif defined(__CPCP__)
694+# define ARCHITECTURE_ID "PCP"
695+ 
696+# else
697+# define ARCHITECTURE_ID ""
698+# endif
699+ 
700+#else
701+# define ARCHITECTURE_ID
702+#endif
703+ 
704+/* Convert integer to decimal digit literals. */
705+#define DEC(n) \
706+ ('0' + (((n) / 10000000)%10)), \
707+ ('0' + (((n) / 1000000)%10)), \
708+ ('0' + (((n) / 100000)%10)), \
709+ ('0' + (((n) / 10000)%10)), \
710+ ('0' + (((n) / 1000)%10)), \
711+ ('0' + (((n) / 100)%10)), \
712+ ('0' + (((n) / 10)%10)), \
713+ ('0' + ((n) % 10))
714+ 
715+/* Convert integer to hex digit literals. */
716+#define HEX(n) \
717+ ('0' + ((n)>>28 & 0xF)), \
718+ ('0' + ((n)>>24 & 0xF)), \
719+ ('0' + ((n)>>20 & 0xF)), \
720+ ('0' + ((n)>>16 & 0xF)), \
721+ ('0' + ((n)>>12 & 0xF)), \
722+ ('0' + ((n)>>8 & 0xF)), \
723+ ('0' + ((n)>>4 & 0xF)), \
724+ ('0' + ((n) & 0xF))
725+ 
726+/* Construct a string literal encoding the version number. */
727+#ifdef COMPILER_VERSION
728+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
729+ 
730+/* Construct a string literal encoding the version number components. */
731+#elif defined(COMPILER_VERSION_MAJOR)
732+char const info_version[] = {
733+ 'I', 'N', 'F', 'O', ':',
734+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
735+ COMPILER_VERSION_MAJOR,
736+# ifdef COMPILER_VERSION_MINOR
737+ '.', COMPILER_VERSION_MINOR,
738+# ifdef COMPILER_VERSION_PATCH
739+ '.', COMPILER_VERSION_PATCH,
740+# ifdef COMPILER_VERSION_TWEAK
741+ '.', COMPILER_VERSION_TWEAK,
742+# endif
743+# endif
744+# endif
745+ ']','\0'};
746+#endif
747+ 
748+/* Construct a string literal encoding the internal version number. */
749+#ifdef COMPILER_VERSION_INTERNAL
750+char const info_version_internal[] = {
751+ 'I', 'N', 'F', 'O', ':',
752+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
753+ 'i','n','t','e','r','n','a','l','[',
754+ COMPILER_VERSION_INTERNAL,']','\0'};
755+#elif defined(COMPILER_VERSION_INTERNAL_STR)
756+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
757+#endif
758+ 
759+/* Construct a string literal encoding the version number components. */
760+#ifdef SIMULATE_VERSION_MAJOR
761+char const info_simulate_version[] = {
762+ 'I', 'N', 'F', 'O', ':',
763+ 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
764+ SIMULATE_VERSION_MAJOR,
765+# ifdef SIMULATE_VERSION_MINOR
766+ '.', SIMULATE_VERSION_MINOR,
767+# ifdef SIMULATE_VERSION_PATCH
768+ '.', SIMULATE_VERSION_PATCH,
769+# ifdef SIMULATE_VERSION_TWEAK
770+ '.', SIMULATE_VERSION_TWEAK,
771+# endif
772+# endif
773+# endif
774+ ']','\0'};
775+#endif
776+ 
777+/* Construct the string literal in pieces to prevent the source from
778+ getting matched. Store it in a pointer rather than an array
779+ because some compilers will just produce instructions to fill the
780+ array rather than assigning a pointer to a static array. */
781+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
782+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
783+ 
784+ 
785+ 
786+#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
787+# if defined(__INTEL_CXX11_MODE__)
788+# if defined(__cpp_aggregate_nsdmi)
789+# define CXX_STD 201402L
790+# else
791+# define CXX_STD 201103L
792+# endif
793+# else
794+# define CXX_STD 199711L
795+# endif
796+#elif defined(_MSC_VER) && defined(_MSVC_LANG)
797+# define CXX_STD _MSVC_LANG
798+#else
799+# define CXX_STD __cplusplus
800+#endif
801+ 
802+const char* info_language_standard_default = "INFO" ":" "standard_default["
803+#if CXX_STD > 202002L
804+ "23"
805+#elif CXX_STD > 201703L
806+ "20"
807+#elif CXX_STD >= 201703L
808+ "17"
809+#elif CXX_STD >= 201402L
810+ "14"
811+#elif CXX_STD >= 201103L
812+ "11"
813+#else
814+ "98"
815+#endif
816+"]";
817+ 
818+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
819+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
820+ defined(__TI_COMPILER_VERSION__)) && \
821+ !defined(__STRICT_ANSI__)
822+ "ON"
823+#else
824+ "OFF"
825+#endif
826+"]";
827+ 
828+/*--------------------------------------------------------------------------*/
829+ 
830+int main(int argc, char* argv[])
831+{
832+ int require = 0;
833+ require += info_compiler[argc];
834+ require += info_platform[argc];
835+ require += info_arch[argc];
836+#ifdef COMPILER_VERSION_MAJOR
837+ require += info_version[argc];
838+#endif
839+#ifdef COMPILER_VERSION_INTERNAL
840+ require += info_version_internal[argc];
841+#endif
842+#ifdef SIMULATE_ID
843+ require += info_simulate[argc];
844+#endif
845+#ifdef SIMULATE_VERSION_MAJOR
846+ require += info_simulate_version[argc];
847+#endif
848+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
849+ require += info_cray[argc];
850+#endif
851+ require += info_language_standard_default[argc];
852+ require += info_language_extensions_default[argc];
853+ (void)argv;
854+ return require;
855+}