C内核按库功能拆解,编译结果缓存区构建,编译过程与已有缓存结果对照功能实现

This commit is contained in:
lujingze committed 2026-09-12 05:24:48 +00:00
1 parent aa4951b14e
commit 151e6e4b97
30 files changed
+4856 -604

No files matched your search

@@ -0,0 +1,10 @@
#ifndef NATIVE_COMPONENT_CONSTANTS_INTERNAL_H
#define NATIVE_COMPONENT_CONSTANTS_INTERNAL_H
/* Include only in modules using PI, so each standalone translation unit can
* fold the unchanged double constant without an external data dependency.
* The include guard also keeps the diagnostic amalgamation valid.
*/
static const double PI=3.1415926535897932384626433832795;
#endif
@@ -0,0 +1,31 @@
#ifndef NATIVE_COMPONENT_PROPERTIES_INTERNAL_H
#define NATIVE_COMPONENT_PROPERTIES_INTERNAL_H
#include "kernels.h"
/* Private interfaces shared by the flow modules. Gas/EOS formulas, property
* reuse and isentropic calculations stay together in properties.c. This
* switch is only for the diagnostic amalgamation in components/kernels.c;
* separately compiled production modules share ordinary external symbols.
*/
#ifdef NATIVE_COMPONENT_AMALGAMATION
#define NATIVE_COMPONENT_INTERNAL static
static const NativeMedium helium_medium;
#else
#define NATIVE_COMPONENT_INTERNAL
extern const NativeMedium helium_medium;
#endif
NATIVE_COMPONENT_INTERNAL int same_medium(const NativeMedium *, const NativeMedium *);
NATIVE_COMPONENT_INTERNAL NativePropertyState *property_pt(
NativePropertyCache *, const NativeMedium *, double p, double T,
NativePropertyState *scratch);
NATIVE_COMPONENT_INTERNAL double property_density(NativePropertyState *);
NATIVE_COMPONENT_INTERNAL double property_viscosity(NativePropertyState *);
NATIVE_COMPONENT_INTERNAL void state_valve(
NativePropertyCache *, NativePropertyState *, double pd, double *cm, double *velocity);
NATIVE_COMPONENT_INTERNAL void medium_valve(
NativePropertyCache *, const NativeMedium *, double p, double pd, double T,
double *cm, double *velocity);
#endif