Lines Matching refs:sendbuf
74 def reduce(sendbuf, root=0, op=getattr(mpi, 'SUM', None)): argument
76 return sendbuf
78 is_array = isinstance(sendbuf, np.ndarray)
79 sendbuf = np.asarray(sendbuf, order='C')
80 sendbuf = sendbuf.astype(sendbuf.dtype.char)
81 shape, mpi_dtype = comm.bcast((sendbuf.shape, sendbuf.dtype.char))
82 assert sendbuf.shape == shape and sendbuf.dtype.char == mpi_dtype
84 recvbuf = np.zeros_like(sendbuf)
85 send_seg = np.ndarray(sendbuf.size, dtype=sendbuf.dtype, buffer=sendbuf)
87 for p0, p1 in lib.prange(0, sendbuf.size, BLKSIZE):
93 return sendbuf if is_array else sendbuf.ravel()[0]
96 def allreduce(sendbuf, root=0, op=getattr(mpi, 'SUM', None)): argument
98 return sendbuf
100 is_array = isinstance(sendbuf, np.ndarray)
101 sendbuf = np.asarray(sendbuf, order='C')
102 sendbuf = sendbuf.astype(sendbuf.dtype.char)
103 shape, mpi_dtype = comm.bcast((sendbuf.shape, sendbuf.dtype.char))
104 assert sendbuf.shape == shape and sendbuf.dtype.char == mpi_dtype
106 recvbuf = np.zeros_like(sendbuf)
107 send_seg = np.ndarray(sendbuf.size, dtype=sendbuf.dtype, buffer=sendbuf)
109 for p0, p1 in lib.prange(0, sendbuf.size, BLKSIZE):