40 bool donate_with_move =
false) {
41 auto maybe_donate = [&out, donate_with_move](
const array& x) {
43 if (donate_with_move) {
59 if (!(maybe_donate(a) || maybe_donate(b) || maybe_donate(c))) {
const Flags & flags() const
Get the Flags bit-field.
Definition array.h:318
const Strides & strides() const
The strides of the array.
Definition array.h:117
size_t nbytes() const
The number of bytes in the array.
Definition array.h:93
void copy_shared_buffer(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)
void move_shared_buffer(array other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)
size_t itemsize() const
The size of the array's datatype in bytes.
Definition array.h:83
void set_data(allocator::Buffer buffer, Deleter d=allocator::free)
size_t data_size() const
The size (in elements) of the underlying buffer the array points to.
Definition array.h:332
Buffer malloc_or_wait(size_t size)
@ General
Definition binary.h:16
TernaryOpType get_ternary_op_type(const array &a, const array &b, const array &c)
Definition ternary.h:18
void set_ternary_op_output_data(const array &a, const array &b, const array &c, array &out, TernaryOpType topt, bool donate_with_move=false)
Definition ternary.h:34
TernaryOpType
Definition ternary.h:11
@ ScalarScalarScalar
Definition ternary.h:12
@ General
Definition ternary.h:14
@ VectorVectorVector
Definition ternary.h:13
bool is_donatable(const array &in, const array &out)
Definition utils.h:155
bool row_contiguous
Definition array.h:237
bool col_contiguous
Definition array.h:243