pub struct Cpu;
Expand description

The CPU device

Implementations

vector matrix multiply c += a * b

vector matrix multiply c += a * trans(b)

vector vector

Trait Implementations

Allocates using alloc_zeroed.

Allocate a new T and then store f applied to t in the new T. Uses ForEachElement::foreach_mr.

Computes lhs += rhs, using ForEachElement::foreach_mr.

Computes lhs -= rhs using ForEachElement::foreach_mr

Computes out += lhs * rhs using ForEachElement::foreach_mrr.

Allocate a new T and then store f applied to t in the new T. Uses ForEachElement::foreach_mr.

Computes lhs += rhs, using ForEachElement::foreach_mr.

Computes lhs -= rhs using ForEachElement::foreach_mr

Computes out += lhs * rhs using ForEachElement::foreach_mrr.

Allocate a new T and then store f applied to t in the new T. Uses ForEachElement::foreach_mr.

Computes lhs += rhs, using ForEachElement::foreach_mr.

Computes lhs -= rhs using ForEachElement::foreach_mr

Computes out += lhs * rhs using ForEachElement::foreach_mrr.

Allocate a new T and then store f applied to t in the new T. Uses ForEachElement::foreach_mr.

Computes lhs += rhs, using ForEachElement::foreach_mr.

Computes lhs -= rhs using ForEachElement::foreach_mr

Computes out += lhs * rhs using ForEachElement::foreach_mrr.

Allocate a new T and then store f applied to t in the new T. Uses ForEachElement::foreach_mr.

Computes lhs += rhs, using ForEachElement::foreach_mr.

Computes lhs -= rhs using ForEachElement::foreach_mr

Computes out += lhs * rhs using ForEachElement::foreach_mrr.

Mutate elements of a by applying f to all elements of a.

Mutate elements of a and b by applying f to all elements of (a, b). mm stands for mut mut Read more

Mutate elements of a by applying f to all elements of (a, b). mr stands for mut ref Read more

Mutate elements of a, b, and c by applying f to all elements of (a, b, c). mmm stands for mut mut mut Read more

Mutate elements of a by applying f to all elements of (a, b, c). mrr stands for mut ref ref Read more

Mutate elements of a by applying f to all elements of a.

Mutate elements of a and b by applying f to all elements of (a, b). mm stands for mut mut Read more

Mutate elements of a by applying f to all elements of (a, b). mr stands for mut ref Read more

Mutate elements of a, b, and c by applying f to all elements of (a, b, c). mmm stands for mut mut mut Read more

Mutate elements of a by applying f to all elements of (a, b, c). mrr stands for mut ref ref Read more

Broadcast c BATCH times.

Broadcast c BATCH times.

Broadcast c BATCH times.

Broadcast c BATCH times.

Broadcast b BATCH times.

Broadcast b BATCH times.

Broadcast b BATCH times.

Broadcast b BATCH times.

Matmul

Matmul, a is transposed.

Matmul, b is transposed

Matmul, a and c are transposed

Batched matmul

Batched matmul

Batched matmul

Batched matmul

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Equivalent to psuedocode out = inp[indices]

inp[indices] += out

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.