diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 14:16:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 14:16:26 -0700 |
commit | 78164bab59d20c2e5ddc25d336acb0266b451647 (patch) | |
tree | 7cd76ceab6225b1d935d3bf5b48ebcd799ecfdd7 /020run.cc | |
parent | ebf6889f504b3a14ba077c59f3c3c7814b155ff2 (diff) | |
download | mu-78164bab59d20c2e5ddc25d336acb0266b451647.tar.gz |
2301 - test_all_layers fixes
Diffstat (limited to '020run.cc')
-rw-r--r-- | 020run.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/020run.cc b/020run.cc index d135e4b5..81d0e4ae 100644 --- a/020run.cc +++ b/020run.cc @@ -295,17 +295,24 @@ bool size_mismatch(const reagent& x, const vector<double>& data) { return size_of(x) != SIZE(data); } -bool is_dummy(const reagent& x) { +inline bool is_dummy(const reagent& x) { return x.name == "_"; } -bool is_literal(const reagent& r) { +inline bool is_literal(const reagent& r) { if (!r.type) return false; if (r.type->value == 0) assert(!r.type->left && !r.type->right); return r.type->value == 0; } +inline bool scalar(const vector<long long int>& x) { + return SIZE(x) == 1; +} +inline bool scalar(const vector<double>& x) { + return SIZE(x) == 1; +} + // hook to suppress inserting recipe name into errors and warnings (for later layers) string maybe(string s) { return s + ": "; |