|
@@ -55,7 +55,7 @@ class Externals;
|
|
|
|
|
|
namespace artis { namespace utils {
|
|
namespace artis { namespace utils {
|
|
|
|
|
|
-enum TraceType { NONE = 0, CHECK, CONSTRUCT, SUBMODEL_ADD, INTERNAL_DECL,
|
|
|
|
|
|
+enum TraceType { NONE = 0, CHECK = 1, CONSTRUCT, SUBMODEL_ADD, INTERNAL_DECL,
|
|
EXTERNAL_DECL, INTERNAL_LINK, INIT, START, BEFORE_COMPUTE,
|
|
EXTERNAL_DECL, INTERNAL_LINK, INIT, START, BEFORE_COMPUTE,
|
|
COMPUTE, PUT, AFTER_COMPUTE, DESTRUCT, KERNEL};
|
|
COMPUTE, PUT, AFTER_COMPUTE, DESTRUCT, KERNEL};
|
|
static const std::vector <std::string> TraceTypesStr = {
|
|
static const std::vector <std::string> TraceTypesStr = {
|
|
@@ -150,6 +150,15 @@ public:
|
|
const std::string& tgt_internal_var() const
|
|
const std::string& tgt_internal_var() const
|
|
{ return KernelInfo::term(_tgt_internal_var); }
|
|
{ return KernelInfo::term(_tgt_internal_var); }
|
|
|
|
|
|
|
|
+ unsigned int var_idx() const
|
|
|
|
+ { return _var; }
|
|
|
|
+
|
|
|
|
+ unsigned int tgt_internal_var_idx() const
|
|
|
|
+ { return _tgt_internal_var; }
|
|
|
|
+
|
|
|
|
+ unsigned int tgt_model_idx() const
|
|
|
|
+ { return _tgt_model; }
|
|
|
|
+
|
|
bool is_internal_var() const
|
|
bool is_internal_var() const
|
|
{ return _internal_var; }
|
|
{ return _internal_var; }
|
|
|
|
|
|
@@ -203,9 +212,11 @@ class TraceElement
|
|
private:
|
|
private:
|
|
TraceElement(bool from_kernel, const std::string& model_name,
|
|
TraceElement(bool from_kernel, const std::string& model_name,
|
|
typename Time::type time, TraceType type) :
|
|
typename Time::type time, TraceType type) :
|
|
- _model_name(model_name), _time(time), _type(type),
|
|
|
|
|
|
+ _time(time), _type(type),
|
|
_from_kernel(from_kernel)
|
|
_from_kernel(from_kernel)
|
|
- { }
|
|
|
|
|
|
+ {
|
|
|
|
+ _model_name = KernelInfo::term(model_name);
|
|
|
|
+ }
|
|
|
|
|
|
public:
|
|
public:
|
|
TraceElement() : _time(Time::null), _type(NONE),
|
|
TraceElement() : _time(Time::null), _type(NONE),
|
|
@@ -214,9 +225,11 @@ public:
|
|
|
|
|
|
TraceElement(const std::string& model_name, typename Time::type time,
|
|
TraceElement(const std::string& model_name, typename Time::type time,
|
|
TraceType type) :
|
|
TraceType type) :
|
|
- _model_name(model_name), _time(time), _type(type),
|
|
|
|
|
|
+ _time(time), _type(type),
|
|
_from_kernel(false)
|
|
_from_kernel(false)
|
|
- { }
|
|
|
|
|
|
+ {
|
|
|
|
+ _model_name = KernelInfo::term(model_name);
|
|
|
|
+ }
|
|
|
|
|
|
virtual ~TraceElement()
|
|
virtual ~TraceElement()
|
|
{ }
|
|
{ }
|
|
@@ -225,6 +238,9 @@ public:
|
|
{ return _comment; }
|
|
{ return _comment; }
|
|
|
|
|
|
const std::string& get_model_name() const
|
|
const std::string& get_model_name() const
|
|
|
|
+ { return KernelInfo::term(_model_name); }
|
|
|
|
+
|
|
|
|
+ unsigned int get_model_name_idx() const
|
|
{ return _model_name; }
|
|
{ return _model_name; }
|
|
|
|
|
|
typename Time::type get_time() const
|
|
typename Time::type get_time() const
|
|
@@ -269,7 +285,7 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
- std::string _model_name;
|
|
|
|
|
|
+ unsigned int _model_name;
|
|
typename Time::type _time;
|
|
typename Time::type _time;
|
|
TraceType _type;
|
|
TraceType _type;
|
|
std::string _comment;
|
|
std::string _comment;
|