Checks that two SparseData have the same dimension */
| 446 | /* Checks that two SparseData have the same dimension |
| 447 | */ |
| 448 | void |
| 449 | check_sdata_dimensions(SparseData left, SparseData right) |
| 450 | { |
| 451 | if (left->total_value_count != right->total_value_count) |
| 452 | { |
| 453 | ereport(ERROR, |
| 454 | (errcode(ERRCODE_INVALID_PARAMETER_VALUE), |
| 455 | errmsg("dimensions of vectors must be the same"))); |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | /* Do one of subtract, add, multiply, or divide depending on |
| 460 | * the value of operation. |