Beispiel #1
0
def hollow(shape, dtype=np.float, distaxes='all'):
    """Create a pyDive.gpu_ndarray instance distributed across all engines without allocating a local
    gpu-array.

    :param ints shape: shape of array
    :param dtype: datatype of a single element
    :param ints distaxes: distributed axes. Defaults to 'all' meaning each axis is distributed.
    """
    return gpu_ndarray(shape, dtype, distaxes, None, None, True)
Beispiel #2
0
def hollow(shape, dtype=np.float, distaxes="all"):
    """Create a pyDive.gpu_ndarray instance distributed across all engines without allocating a local
    gpu-array.

    :param ints shape: shape of array
    :param dtype: datatype of a single element
    :param ints distaxes: distributed axes. Defaults to 'all' meaning each axis is distributed.
    """
    return gpu_ndarray(shape, dtype, distaxes, None, None, True)
Beispiel #3
0
def hollow_like(other):
    """Create a pyDive.gpu_ndarray instance with the same
    shape, distribution and type as ``other`` without allocating a local gpu-array.
    """
    return gpu_ndarray(other.shape, other.dtype, other.distaxes,
                       other.target_offsets, other.target_ranks, True)
Beispiel #4
0
def hollow_like(other):
    """Create a pyDive.gpu_ndarray instance with the same
    shape, distribution and type as ``other`` without allocating a local gpu-array.
    """
    return gpu_ndarray(other.shape, other.dtype, other.distaxes, other.target_offsets, other.target_ranks, True)