Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
    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
Ejemplo n.º 4
0
    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