Removed scalar operations on tensors because they can be done with iterators.

This commit is contained in:
2023-05-07 17:05:31 +02:00
parent 3a8b9d20ab
commit 1513222f12
2 changed files with 0 additions and 40 deletions

View File

@@ -186,42 +186,6 @@ uint8_t tensor_cpy(tensor t1, const tensor t2)
return 1;
}
void tensor_add_scalar(tensor t, dtype n)
{
assert(!tensor_is_empty(t));
tensoriter_scalar iter = tensoriter_scalar_create(t);
tensoriter_scalar_map_add(iter, n);
tensoriter_scalar_destroy(iter);
}
void tensor_sub_scalar(tensor t, dtype n)
{
assert(!tensor_is_empty(t));
tensoriter_scalar iter = tensoriter_scalar_create(t);
tensoriter_scalar_map_sub(iter, n);
tensoriter_scalar_destroy(iter);
}
void tensor_mul_scalar(tensor t, dtype n)
{
assert(!tensor_is_empty(t));
tensoriter_scalar iter = tensoriter_scalar_create(t);
tensoriter_scalar_map_mul(iter, n);
tensoriter_scalar_destroy(iter);
}
void tensor_div_scalar(tensor t, dtype n)
{
assert(!tensor_is_empty(t));
tensoriter_scalar iter = tensoriter_scalar_create(t);
tensoriter_scalar_map_div(iter, n);
tensoriter_scalar_destroy(iter);
}
uint8_t tensor_add_inplace(tensor t1, const tensor t2)
{
assert(!tensor_is_empty(t1));