@@ -74,6 +74,7 @@ func setSliceFloat32(x []float32, rank int, offset float32) {
7474 }
7575 }
7676}
77+
7778func setSliceFloat64 (x []float64 , rank int , offset float64 ) {
7879 for i := 0 ; i < len (x ); i ++ {
7980 if i == rank {
@@ -204,7 +205,7 @@ func bcast(A *Communicator) func(*testing.T) {
204205 b [i ] = byte (1 + i )
205206 }
206207 }
207- var exp = []byte {1 , 2 , 3 , 4 }
208+ exp : = []byte {1 , 2 , 3 , 4 }
208209 A .BcastBytes (b , root )
209210 if ! chkArraysEqualByte (b , exp ) {
210211 t .Errorf ("received %v, expected %v" , b , exp )
@@ -219,7 +220,7 @@ func bcast(A *Communicator) func(*testing.T) {
219220 u32 [i ] = uint32 (1 + i )
220221 }
221222 }
222- var exp = []uint32 {1 , 2 , 3 , 4 }
223+ exp : = []uint32 {1 , 2 , 3 , 4 }
223224 A .BcastUint32s (u32 , root )
224225 if ! chkArraysEqualUint32 (u32 , exp ) {
225226 t .Errorf ("received %v, expected %v" , u32 , exp )
@@ -234,12 +235,11 @@ func bcast(A *Communicator) func(*testing.T) {
234235 i32 [i ] = int32 (1 + i )
235236 }
236237 }
237- var exp = []int32 {1 , 2 , 3 , 4 }
238+ exp : = []int32 {1 , 2 , 3 , 4 }
238239 A .BcastInt32s (i32 , root )
239240 if ! chkArraysEqualInt32 (i32 , exp ) {
240241 t .Errorf ("received %v, expected %v" , i32 , exp )
241242 }
242-
243243 })
244244 A .Barrier ()
245245
@@ -265,7 +265,7 @@ func bcast(A *Communicator) func(*testing.T) {
265265 i64 [i ] = int64 (1 + i )
266266 }
267267 }
268- var exp = []int64 {1 , 2 , 3 , 4 }
268+ exp : = []int64 {1 , 2 , 3 , 4 }
269269 A .BcastInt64s (i64 , root )
270270 if ! chkArraysEqualInt64 (i64 , exp ) {
271271 t .Errorf ("received %v, expected %v" , i64 , exp )
@@ -280,7 +280,7 @@ func bcast(A *Communicator) func(*testing.T) {
280280 f32 [i ] = float32 (1 + i )
281281 }
282282 }
283- var exp = []float32 {1 , 2 , 3 , 4 }
283+ exp : = []float32 {1 , 2 , 3 , 4 }
284284 A .BcastFloat32s (f32 , root )
285285 if ! chkArraysEqualFloat32 (f32 , exp ) {
286286 t .Errorf ("received %v, expected %v" , f32 , exp )
@@ -295,7 +295,7 @@ func bcast(A *Communicator) func(*testing.T) {
295295 f64 [i ] = float64 (1 + i )
296296 }
297297 }
298- var exp = []float64 {1 , 2 , 3 , 4 }
298+ exp : = []float64 {1 , 2 , 3 , 4 }
299299 A .BcastFloat64s (f64 , root )
300300 if ! chkArraysEqualFloat64 (f64 , exp ) {
301301 t .Errorf ("received %v, expected %v" , f64 , exp )
@@ -310,7 +310,7 @@ func bcast(A *Communicator) func(*testing.T) {
310310 c128 [i ] = complex (float64 (1 + i ), float64 (i ))
311311 }
312312 }
313- var exp = []complex128 {complex (1 , 0 ), complex (2 , 1 ), complex (3 , 2 ), complex (4 , 3 )}
313+ exp : = []complex128 {complex (1 , 0 ), complex (2 , 1 ), complex (3 , 2 ), complex (4 , 3 )}
314314 A .BcastComplex128s (c128 , root )
315315 if ! chkArraysEqualComplex128 (c128 , exp ) {
316316 t .Errorf ("received %v, expected %v" , c128 , exp )
@@ -609,7 +609,7 @@ func reduce(A *Communicator) func(*testing.T) {
609609 {}, // min - not tested
610610 {}, // max - not tested
611611
612- {(2.2 - 1.8i ), (4.4 - 3.6i ), (6.6 - 5.4i ), (8.8 - 7.199999999999999i )}, //prod
612+ {(2.2 - 1.8i ), (4.4 - 3.6i ), (6.6 - 5.4i ), (8.8 - 7.199999999999999i )}, // prod
613613 {}, // prod - not tested
614614 {}, // land - not tested
615615 {}, // lor - not tested
@@ -645,6 +645,7 @@ func reduce(A *Communicator) func(*testing.T) {
645645 }
646646 }
647647}
648+
648649func allreduce (A * Communicator ) func (* testing.T ) {
649650 root := 3
650651 testNames := [... ]string {
@@ -913,7 +914,7 @@ func allreduce(A *Communicator) func(*testing.T) {
913914 {}, // min - not tested
914915 {}, // max - not tested
915916
916- {(2.2 - 1.8i ), (4.4 - 3.6i ), (6.6 - 5.4i ), (8.8 - 7.199999999999999i )}, //prod
917+ {(2.2 - 1.8i ), (4.4 - 3.6i ), (6.6 - 5.4i ), (8.8 - 7.199999999999999i )}, // prod
917918 {}, // prod - not tested
918919 {}, // land - not tested
919920 {}, // lor - not tested
0 commit comments