about summary refs log tree commit diff stats
path: root/020run.cc
diff options
context:
space:
mode:
Diffstat (limited to '020run.cc')
-rw-r--r--020run.cc11
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 + ": ";