#ifndef CONTEXT_SHADOW_REPLAY_H #define CONTEXT_SHADOW_REPLAY_H #include "model.h" #define SR_STATES 256 #define SR_PIPES 40 #define SR_EVENTS 512 typedef struct { NativePropertyCache context; NativePropertyState states[SR_STATES]; NativePipeCache pipes[SR_PIPES]; NativeJacobianScalars memo; NativeJacobianScalarEntry entries[MODEL_JACOBIAN_SCALAR_COUNT]; NativePropertyTemperatures observer; } SRContext; typedef struct { double p[48],h[232],q[232],fb[152],w[NOUTPUTS],dy[NSTATES]; NativeGas g[56]; } SRFrame; typedef int (*SRTail)(double,const double*,SRContext*,SRFrame*); typedef double (*SROperation)(NativePropertyCache*,NativePipeCache*,const double*); void sr_shadow(int,double,const double*,NativePropertyCache*,NativePipeCache*, const double*,const double*,const double*,const double*,const NativeGas*,const double*,SROperation,SRTail); void sr_eval_result(int,const double*,const double*); void sr_native_enter(const char*); void sr_or(const void*,unsigned,const char*,const char*); #endif