Changeset 9f0b10c in OpenModelica


Ignore:
Timestamp:
2020-09-29T01:02:35+02:00 (4 years ago)
Author:
Adrian Pop <adrian.pop@…>
Branches:
maintenance/v1.16
Children:
a87e006
Parents:
6e0b36d4
git-author:
AnHeuermann <andreas.heuermann@…> (06/10/20 10:35:46)
git-committer:
Adrian Pop <adrian.pop@…> (09/29/20 01:02:35)
Message:

More rtclock dummy function in OMC_MINIMAL_RUNTIME

  • Added dummies for rt_accumulateand rt_clear.
  • Define simulation-specific timing macros for OMC_MINIMAL_RUNTIME.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/SimulationRuntime/c/util/rtclock.h

    r83be5f2b r9f0b10c  
    3535#endif
    3636
    37 #if defined(OMC_MINIMAL_RUNTIME)
    38 
    39 typedef int rtclock_t;
    40 static inline void rt_ext_tp_tick(rtclock_t* tick_tp) {}
    41 static inline double rt_ext_tp_tock(rtclock_t* tick_tp) {return 0.0;}
    42 static inline void rt_tick(int ix) {}
    43 static inline double rt_tock(int ix) {return 0.0;}
    44 
    45 #else
    46 
    47 #include <stdint.h>
    48 
    4937#define NUM_RT_CLOCKS 33
    5038#define NUM_USER_RT_CLOCKS 32
     
    6957#define SIM_TIMER_DAE            15
    7058#define SIM_TIMER_FIRST_FUNCTION 16
     59
     60#if defined(OMC_MINIMAL_RUNTIME)
     61
     62typedef int rtclock_t;
     63static inline void rt_ext_tp_tick(rtclock_t* tick_tp) {}
     64static inline double rt_ext_tp_tock(rtclock_t* tick_tp) {return 0.0;}
     65static inline void rt_tick(int ix) {}
     66static inline void rt_accumulate(int ix) {}
     67static inline void rt_clear(int ix) {}
     68static inline double rt_tock(int ix) {return 0.0;}
     69
     70#else
     71
     72#include <stdint.h>
    7173
    7274#define SIM_PROF_TICK_FN(ix) rt_tick(ix+SIM_TIMER_FIRST_FUNCTION)
Note: See TracChangeset for help on using the changeset viewer.