arr_o_gpu/arr_o_gpu/array/operation/contiguous/
element_wise.rs1use crate::{AbleElementWise, GpuArray};
2
3impl GpuArray {
4 pub fn add<A>(&self, arr: &A) -> Result<GpuArray, crate::ArrOgpuErr>
5 where
6 A: AbleElementWise,
7 {
8 self.module().add(self, arr)
9 }
10
11 pub fn sub<A>(&self, arr: &A) -> Result<GpuArray, crate::ArrOgpuErr>
12 where
13 A: AbleElementWise,
14 {
15 self.module().sub(self, arr)
16 }
17
18 pub fn mul<A>(&self, arr: &A) -> Result<GpuArray, crate::ArrOgpuErr>
19 where
20 A: AbleElementWise,
21 {
22 self.module().mul(self, arr)
23 }
24
25 pub fn div<A>(&self, arr: &A) -> Result<GpuArray, crate::ArrOgpuErr>
26 where
27 A: AbleElementWise,
28 {
29 self.module().div(self, arr)
30 }
31}