@@ -7,10 +7,12 @@ function nditeration_testsuite()
77 let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((256 , 256 )), CartesianIndices ((32 , 32 )))
88 @test length (ndrange) == 256 * 256
99 @test all (p -> p[1 ] == p[2 ], zip (ndrange, CartesianIndices ((256 , 256 ))))
10+ @test ndims (ndrange) == 2
1011 end
1112 let ndrange = NDRange {2, StaticSize{(256, 256)}, DynamicSize} (nothing , CartesianIndices ((32 , 32 )))
1213 @test length (ndrange) == 256 * 256
1314 @test all (p -> p[1 ] == p[2 ], zip (ndrange, CartesianIndices ((256 , 256 ))))
15+ @test ndims (ndrange) == 2
1416 end
1517 end
1618
@@ -40,13 +42,15 @@ function nditeration_testsuite()
4042 I = Tuple (I)
4143 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
4244 end
45+ @test ndims (ndrange) == 2
4346 end
4447 let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 , 4 )), CartesianIndices ((Dim_x, Dim_y)))
4548 idx = linear_iteration (ndrange)
4649 for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
4750 I = Tuple (I)
4851 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
4952 end
53+ @test ndims (ndrange) == 2
5054 end
5155
5256 Dim_x = 32
@@ -58,13 +62,15 @@ function nditeration_testsuite()
5862 I = Tuple (I)
5963 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
6064 end
65+ @test ndims (ndrange) == 2
6166 end
6267 let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 , 4 * 32 )), CartesianIndices ((Dim_x, Dim_y)))
6368 idx = linear_iteration (ndrange)
6469 for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
6570 I = Tuple (I)
6671 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
6772 end
73+ @test ndims (ndrange) == 2
6874 end
6975
7076 Dim_x = 1
@@ -76,13 +82,15 @@ function nditeration_testsuite()
7682 I = Tuple (I)
7783 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
7884 end
85+ @test ndims (ndrange) == 2
7986 end
8087 let ndrange = NDRange {2, DynamicSize, DynamicSize} (CartesianIndices ((4 * 32 , 4 )), CartesianIndices ((Dim_x, Dim_y)))
8188 idx = linear_iteration (ndrange)
8289 for (i, I) in zip (1 : length (blocks (ndrange)), blocks (ndrange))
8390 I = Tuple (I)
8491 @test check (idx, i - 1 , ntuple (i -> I[i] - 1 , length (I))... , Dim_x, Dim_y)
8592 end
93+ @test ndims (ndrange) == 2
8694 end
8795 end
8896end
0 commit comments