@@ -7,10 +7,12 @@ function nditeration_testsuite()
7
7
let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((256 , 256 )), CartesianIndices ((32 , 32 )))
8
8
@test length (ndrange) == 256 * 256
9
9
@test all (p -> p[1 ] == p[2 ], zip (ndrange, CartesianIndices ((256 , 256 ))))
10
+ @test ndims (ndrange) == 2
10
11
end
11
12
let ndrange = NDRange {2, StaticSize{(256, 256)}, DynamicSize} (nothing , CartesianIndices ((32 , 32 )))
12
13
@test length (ndrange) == 256 * 256
13
14
@test all (p -> p[1 ] == p[2 ], zip (ndrange, CartesianIndices ((256 , 256 ))))
15
+ @test ndims (ndrange) == 2
14
16
end
15
17
end
16
18
@@ -40,13 +42,15 @@ function nditeration_testsuite()
40
42
I = Tuple (I)
41
43
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
42
44
end
45
+ @test ndims (ndrange) == 2
43
46
end
44
47
let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 , 4 )), CartesianIndices ((Dim_x, Dim_y)))
45
48
idx = linear_iteration (ndrange)
46
49
for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
47
50
I = Tuple (I)
48
51
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
49
52
end
53
+ @test ndims (ndrange) == 2
50
54
end
51
55
52
56
Dim_x = 32
@@ -58,13 +62,15 @@ function nditeration_testsuite()
58
62
I = Tuple (I)
59
63
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
60
64
end
65
+ @test ndims (ndrange) == 2
61
66
end
62
67
let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 , 4 * 32 )), CartesianIndices ((Dim_x, Dim_y)))
63
68
idx = linear_iteration (ndrange)
64
69
for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
65
70
I = Tuple (I)
66
71
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
67
72
end
73
+ @test ndims (ndrange) == 2
68
74
end
69
75
70
76
Dim_x = 1
@@ -76,13 +82,15 @@ function nditeration_testsuite()
76
82
I = Tuple (I)
77
83
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
78
84
end
85
+ @test ndims (ndrange) == 2
79
86
end
80
87
let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 * 32 , 4 )), CartesianIndices ((Dim_x, Dim_y)))
81
88
idx = linear_iteration (ndrange)
82
89
for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
83
90
I = Tuple (I)
84
91
@test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
85
92
end
93
+ @test ndims (ndrange) == 2
86
94
end
87
95
end
88
96
end
0 commit comments