(self)
return result
Return a `GPUArray` of the absolute values of the elements
        of `self`.
Return a `GPUArray` of the absolute values of the elements
        of `self`.
Return a GPUArray of the absolute values of the elements of self .
def __abs__(self):
        """Return a `GPUArray` of the absolute values of the elements
        of `self`.
        """

        result = self._new_like_me()

        if self.dtype == np.float32:
            fname = "fabsf"
        elif self.dtype == np.float64:
            fname = "fabs"
        else:
            fname = "abs"

        if issubclass(self.dtype.type, np.complexfloating):
            from pytools import match_precision

            out_dtype = match_precision(np.dtype(np.float64), self.dtype)
            result = self._new_like_me(out_dtype)
        else:
            out_dtype = self.dtype

        func = elementwise.get_unary_func_kernel(fname, self.dtype, out_dtype=out_dtype)

        func.prepared_async_call(
            self._grid, self._block, None, self.gpudata, result.gpudata, self.mem_size
        )

        return result
def __abs__ ( self ) : result = self . _new_like_me ( ) if self . dtype == np . float32 : fname = "fabsf" elif self . dtype == np . float64 : fname = "fabs" else : fname = "abs" if issubclass ( self . dtype . type , np . complexfloating ) : from pytools import match_precision out_dtype = match_precision ( np . dtype ( np . float64 ) , self . dtype ) result = self . _new_like_me ( out_dtype ) else : out_dtype = self . dtype func = elementwise . get_unary_func_kernel ( fname , self . dtype , out_dtype = out_dtype ) func . prepared_async_call ( self . _grid , self . _block , None , self . gpudata , result . gpudata , self . mem_size ) return result