taichi.lang.common_ops

Module Contents

Classes

TaichiOperations

The base class of taichi operations of expressions. Subclasses: Expr, Matrix

class taichi.lang.common_ops.TaichiOperations

The base class of taichi operations of expressions. Subclasses: Expr, Matrix

logical_and(self, other)

Return the new expression of computing logical and between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of logical and.

Return type

Expr

logical_or(self, other)

Return the new expression of computing logical or between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of logical or.

Return type

Expr

atomic_add(self, other)

Return the new expression of computing atomic add between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of atomic add.

Return type

Expr

atomic_sub(self, other)

Return the new expression of computing atomic sub between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of atomic sub.

Return type

Expr

atomic_and(self, other)

Return the new expression of computing atomic and between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of atomic and.

Return type

Expr

atomic_xor(self, other)

Return the new expression of computing atomic xor between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of atomic xor.

Return type

Expr

atomic_or(self, other)

Return the new expression of computing atomic or between self and a given operand.

Parameters

other (Any) – Given operand.

Returns

The computing expression of atomic or.

Return type

Expr

assign(self, other)

Assign the expression of the given operand to self.

Parameters

other (Any) – Given operand.

Returns

The expression after assigning.

Return type

Expr

augassign(self, x, op)

Generate the computing expression between self and the given operand of given operator and assigned to self.

Parameters
  • x (Any) – Given operand.

  • op (str) – The name of operator.