def _axpbz(self, selffac, other, out, stream=None): """Compute ``out = selffac * self + other``, where `other` is a scalar.""" func = elementwise.get_axpbz_kernel(self.dtype) func.set_block_shape(*self._block) func.prepared_async_call(self._grid, stream, selffac, self.gpudata, other, out.gpudata, self.mem_size) return out
def _axpbz(self, selffac, other, out, stream=None): """Compute ``out = selffac * self + other``, where `other` is a scalar.""" if not self.flags.forc: raise RuntimeError("only contiguous arrays may " "be used as arguments to this operation") func = elementwise.get_axpbz_kernel(self.dtype) func.prepared_async_call( self._grid, self._block, stream, selffac, self.gpudata, other, out.gpudata, self.mem_size ) return out
def _axpbz(self, selffac, other, out, stream=None): """Compute ``out = selffac * self + other``, where `other` is a scalar.""" if not self.flags.forc: raise RuntimeError("only contiguous arrays may " "be used as arguments to this operation") func = elementwise.get_axpbz_kernel(self.dtype, out.dtype) func.prepared_async_call(self._grid, self._block, stream, selffac, self.gpudata, other, out.gpudata, self.mem_size) return out