@@ -30,7 +30,8 @@ class Jacobi : public CommonTestFixture {
30
30
std::initializer_list<gko::precision_reduction> block_precisions,
31
31
std::initializer_list<double > condition_numbers,
32
32
gko::uint32 max_block_size, int min_nnz, int max_nnz, int num_rhs = 1 ,
33
- double accuracy = 0.1 , bool skip_sorting = true , bool l1 = false )
33
+ double accuracy = 0.1 , bool skip_sorting = true ,
34
+ bool aggregate_l1 = false )
34
35
{
35
36
std::default_random_engine engine (42 );
36
37
const auto dim = *(end (block_pointers) - 1 );
@@ -61,13 +62,13 @@ class Jacobi : public CommonTestFixture {
61
62
.with_max_block_stride (gko::uint32 (exec->get_warp_size ()))
62
63
#endif
63
64
.with_skip_sorting (skip_sorting)
64
- .with_l1 (l1 )
65
+ .with_aggregate_l1 (aggregate_l1 )
65
66
.on (ref);
66
67
d_bj_factory = Bj::build ()
67
68
.with_max_block_size (max_block_size)
68
69
.with_block_pointers (block_ptrs)
69
70
.with_skip_sorting (skip_sorting)
70
- .with_l1 (l1 )
71
+ .with_aggregate_l1 (aggregate_l1 )
71
72
.on (exec);
72
73
} else {
73
74
bj_factory =
@@ -80,15 +81,15 @@ class Jacobi : public CommonTestFixture {
80
81
.with_storage_optimization (block_prec)
81
82
.with_accuracy (accuracy)
82
83
.with_skip_sorting (skip_sorting)
83
- .with_l1 (l1 )
84
+ .with_aggregate_l1 (aggregate_l1 )
84
85
.on (ref);
85
86
d_bj_factory = Bj::build ()
86
87
.with_max_block_size (max_block_size)
87
88
.with_block_pointers (block_ptrs)
88
89
.with_storage_optimization (block_prec)
89
90
.with_accuracy (accuracy)
90
91
.with_skip_sorting (skip_sorting)
91
- .with_l1 (l1 )
92
+ .with_aggregate_l1 (aggregate_l1 )
92
93
.on (exec);
93
94
}
94
95
b = gko::test::generate_random_matrix<Vec>(
@@ -268,12 +269,16 @@ TEST_F(Jacobi, ScalarInLargeMatrixEquivalentToRef)
268
269
mtx->read (data::diag ({550 , 550 },
269
270
{{1.0 , 1.0 , 0.0 }, {1.0 , 1.0 , 0.0 }, {1.0 , 0.0 , 1.0 }}));
270
271
271
- auto bj =
272
- Bj::build ().with_max_block_size (1u ).with_l1 (true ).on (ref)->generate (
273
- mtx);
274
- auto d_bj =
275
- Bj::build ().with_max_block_size (1u ).with_l1 (true ).on (exec)->generate (
276
- mtx);
272
+ auto bj = Bj::build ()
273
+ .with_max_block_size (1u )
274
+ .with_aggregate_l1 (true )
275
+ .on (ref)
276
+ ->generate (mtx);
277
+ auto d_bj = Bj::build ()
278
+ .with_max_block_size (1u )
279
+ .with_aggregate_l1 (true )
280
+ .on (exec)
281
+ ->generate (mtx);
277
282
278
283
GKO_ASSERT_MTX_NEAR (gko::as<Bj>(d_bj.get ()), gko::as<Bj>(bj.get ()), 1e-13 );
279
284
}
@@ -297,12 +302,16 @@ TEST_F(Jacobi, BlockL1InLargeMatrixEquivalentToRef)
297
302
{1.0 , 0.0 , 1.0 , 1.0 , 0.0 },
298
303
{1.0 , 0.0 , 1.0 , 0.0 , 0.0 }}});
299
304
300
- auto bj =
301
- Bj::build ().with_max_block_size (3u ).with_l1 (true ).on (ref)->generate (
302
- mtx);
303
- auto d_bj =
304
- Bj::build ().with_max_block_size (3u ).with_l1 (true ).on (exec)->generate (
305
- mtx);
305
+ auto bj = Bj::build ()
306
+ .with_max_block_size (3u )
307
+ .with_aggregate_l1 (true )
308
+ .on (ref)
309
+ ->generate (mtx);
310
+ auto d_bj = Bj::build ()
311
+ .with_max_block_size (3u )
312
+ .with_aggregate_l1 (true )
313
+ .on (exec)
314
+ ->generate (mtx);
306
315
307
316
GKO_ASSERT_MTX_NEAR (gko::as<Bj>(d_bj.get ()), gko::as<Bj>(bj.get ()), 1e-13 );
308
317
}
@@ -531,12 +540,16 @@ TEST_F(Jacobi, ScalarL1ApplyEquivalentToRef)
531
540
d_smtx->copy_from (smtx);
532
541
d_sb->copy_from (sb);
533
542
534
- auto sj =
535
- Bj::build ().with_max_block_size (1u ).with_l1 (true ).on (ref)->generate (
536
- smtx);
537
- auto d_sj =
538
- Bj::build ().with_max_block_size (1u ).with_l1 (true ).on (exec)->generate (
539
- d_smtx);
543
+ auto sj = Bj::build ()
544
+ .with_max_block_size (1u )
545
+ .with_aggregate_l1 (true )
546
+ .on (ref)
547
+ ->generate (smtx);
548
+ auto d_sj = Bj::build ()
549
+ .with_max_block_size (1u )
550
+ .with_aggregate_l1 (true )
551
+ .on (exec)
552
+ ->generate (d_smtx);
540
553
541
554
sj->apply (sb, sx);
542
555
d_sj->apply (d_sb, d_sx);
0 commit comments