CNAME and NAME and how they work #5224
-
Hey, I'm currently trying to understand the structure of the OpenBLAS library, and I'm seeing an unfamiliar pattern throughout that I can't seem to pin down what's actually happening with it. I can't seem to find a #define macro that establishes them when I search the repo, and I can't seem to find anything about them in the documentation of the C++ language, which leads me to believe it's a common symbol this project just happens to use for linking, like how Where would I even start to read up on this pattern and how it's used in this library? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is the function name that gets defined by the build system (Makefile or CMakeLists.txt) at the time the respective source file is compiled - for example some functions use the same sources for single and double precision, or with/without transposition applied, just with appropriate defines. |
Beta Was this translation helpful? Give feedback.
-
yes - though the obj_name gets passed in from the CMakeLists.txt that uses this utility function (only when no name is given, it is derived from the source file name), the FU and BU are optional leading and trailing underlines (varies by compiler and operating system) |
Beta Was this translation helpful? Give feedback.
This is the function name that gets defined by the build system (Makefile or CMakeLists.txt) at the time the respective source file is compiled - for example some functions use the same sources for single and double precision, or with/without transposition applied, just with appropriate defines.