| … | … | @@ -243,7 +243,7 @@ void OpenclJobValue::check_signature(const Handle& kern, |
| 243 | 243 | const Handle& iface, |
| 244 | 244 | const ValueSeq& flovecs) |
| 245 | 245 | { |
| 246 | | // iface is a ConnectorSeq oc Connectors |
| 246 | // iface is a ConnectorSeq of Connectors |
| 247 | 247 | if (flovecs.size() != iface->size()) |
| 248 | 248 | throw RuntimeException(TRACE_INFO, |
| 249 | 249 | "Expected %zu arguments, got %zu for %s", |
| … | … | @@ -254,13 +254,21 @@ void OpenclJobValue::check_signature(const Handle& kern, |
| 254 | 254 | { |
| 255 | 255 | TypeNodePtr typ = TypeNodeCast(cons[i]->getOutgoingAtom(0)); |
| 256 | 256 | |
| 257 | | if (not flovecs[i]->is_type(typ->get_kind()) and |
| 258 | | not flovecs[i]->is_type(CONNECTOR)) |
| 257 | // Is it a FloatValue? |
| 258 | bool is_ok = flovecs[i]->is_type(typ->get_kind()); |
| 259 | |
| 260 | // If not, is it a scalar? |
| 261 | if (not is_ok) |
| 259 | 262 | { |
| 263 | Handle sex = cons[i]->getOutgoingAtom(1); |
| 264 | is_ok = flovecs[i]->is_type(CONNECTOR) and |
| 265 | (0 == sex->get_name().compare("scalar")); |
| 266 | } |
| 267 | |
| 268 | if (not is_ok) |
| 260 | 269 | throw RuntimeException(TRACE_INFO, |
| 261 | 270 | "Argument type mismatch at %zu: expected type %s for %s", |
| 262 | 271 | i, typ->to_string().c_str(), kern->to_string().c_str()); |
| 263 | | } |
| 264 | 272 | } |
| 265 | 273 | } |
| 266 | 274 | |