tensor_rs/tensor_trait/
elemwise.rs1pub trait ElemwiseTensorOp {
2 type TensorType;
3 type ElementType;
4
5 fn abs(&self) -> Self::TensorType;
6 fn acos(&self) -> Self::TensorType;
7 fn asin(&self) -> Self::TensorType;
8 fn atan(&self) -> Self::TensorType;
9 fn ceil(&self) -> Self::TensorType;
10 fn clamp(&self, min: Self::ElementType, max: Self::ElementType) -> Self::TensorType;
11 fn cos(&self) -> Self::TensorType;
12 fn cosh(&self) -> Self::TensorType;
13 fn exp(&self) -> Self::TensorType;
14 fn expm1(&self) -> Self::TensorType;
15 fn floor(&self) -> Self::TensorType;
16 fn frac(&self) -> Self::TensorType ;
17 fn log(&self) -> Self::TensorType;
18 fn log10(&self) -> Self::TensorType;
19 fn log1p(&self) -> Self::TensorType;
20 fn log1pexp(&self) -> Self::TensorType;
21 fn log2(&self) -> Self::TensorType;
22 fn neg(&self) -> Self::TensorType;
23 fn pow(&self, n: Self::ElementType) -> Self::TensorType;
24 fn reciprocal(&self) -> Self::TensorType;
25 fn round(&self) -> Self::TensorType;
26 fn rsqrt(&self) -> Self::TensorType ;
27 fn sigmoid(&self) -> Self::TensorType;
28 fn sign(&self) -> Self::TensorType;
29 fn sin(&self) -> Self::TensorType;
30 fn sinh(&self) -> Self::TensorType;
31 fn sqrt(&self) -> Self::TensorType;
32 fn square(&self) -> Self::TensorType;
33 fn tan(&self) -> Self::TensorType;
34 fn tanh(&self) -> Self::TensorType;
35 fn trunc(&self) -> Self::TensorType;
36
37}