Skip to content

Commit 2072959

Browse files
committedMar 12, 2015
add note in README
1 parent ad7d7da commit 2072959

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎README.md

+21
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,27 @@ into a distributed array constructor:
9898
In this case the `init` function only needs to call `fill` with the
9999
dimensions of the local piece it is creating.
100100

101+
`DArray`'s can also be constructed from multidimensional `Array` comprehensions with
102+
the `@DArray` macro syntax. This syntax is just sugar for the primitive `DArray` constructor:
103+
104+
```julia
105+
julia> [i+j for i = 1:5, j = 1:5]
106+
5x5 Array{Int64,2}:
107+
2 3 4 5 6
108+
3 4 5 6 7
109+
4 5 6 7 8
110+
5 6 7 8 9
111+
6 7 8 9 10
112+
113+
julia> @DArray [i+j for i = 1:5, j = 1:5]
114+
5x5 DistributedArrays.DArray{Int64,2,Array{Int64,2}}:
115+
2 3 4 5 6
116+
3 4 5 6 7
117+
4 5 6 7 8
118+
5 6 7 8 9
119+
6 7 8 9 10
120+
```
121+
101122
Distributed Array Operations
102123
----------------------------
103124

0 commit comments

Comments
 (0)
Please sign in to comment.