@@ -170,23 +170,23 @@ leg2cheb(v::Vector) = plan_leg2cheb(v)*v
170
170
cheb2leg (v:: Vector ) = plan_cheb2leg (v)* v
171
171
172
172
function A_mul_B! (y:: Vector , P:: LegendreToChebyshevPlan , x:: AbstractVector )
173
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
174
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
173
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
174
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
175
175
scale! (2 / π, y)
176
176
y[1 ] *= 0.5
177
177
y
178
178
end
179
179
180
180
function A_mul_B! (y:: Vector , P:: ChebyshevToLegendrePlan , x:: AbstractVector )
181
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
182
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
181
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
182
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
183
183
end
184
184
185
185
function A_mul_B! (Y:: Matrix , P:: LegendreToChebyshevPlan , X:: Matrix )
186
186
m, n = size (X)
187
187
for j = 1 : n
188
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
189
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
188
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
189
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
190
190
end
191
191
scale! (2 / π, Y)
192
192
for j = 1 : n
198
198
function A_mul_B! (Y:: Matrix , P:: ChebyshevToLegendrePlan , X:: Matrix )
199
199
m, n = size (X)
200
200
for j = 1 : n
201
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
202
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
201
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
202
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
203
203
end
204
204
Y
205
205
end
@@ -288,25 +288,25 @@ cheb2normleg(v::Vector) = plan_cheb2normleg(v)*v
288
288
289
289
function A_mul_B!! (y:: Vector , P:: NormalizedLegendreToChebyshevPlan , x:: AbstractVector )
290
290
unsafe_broadcasttimes! (x, P. scl)
291
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
292
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
291
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
292
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
293
293
scale! (2 / π, y)
294
294
y[1 ] *= 0.5
295
295
y
296
296
end
297
297
298
298
function A_mul_B! (y:: Vector , P:: ChebyshevToNormalizedLegendrePlan , x:: AbstractVector )
299
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
300
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
299
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
300
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
301
301
unsafe_broadcasttimes! (y, P. scl)
302
302
end
303
303
304
304
function A_mul_B!! (Y:: Matrix , P:: NormalizedLegendreToChebyshevPlan , X:: Matrix )
305
305
m, n = size (X)
306
306
scale! (P. scl, X)
307
307
for j = 1 : n
308
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
309
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
308
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
309
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
310
310
end
311
311
scale! (2 / π, Y)
312
312
@inbounds @simd for j = 1 : n
318
318
function A_mul_B! (Y:: Matrix , P:: ChebyshevToNormalizedLegendrePlan , X:: Matrix )
319
319
m, n = size (X)
320
320
for j = 1 : n
321
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
322
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
321
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
322
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
323
323
end
324
324
scale! (P. scl, Y)
325
325
end
@@ -328,8 +328,8 @@ function A_mul_B_col_J!!(Y::Matrix, P::NormalizedLegendreToChebyshevPlan, X::Mat
328
328
m, n = size (X)
329
329
COLSHIFT = m* (J- 1 )
330
330
scale_col_J! (P. scl, X, J)
331
- A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
332
- A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
331
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
332
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
333
333
scale_col_J! (2 / π, Y, J)
334
334
@inbounds Y[1 + COLSHIFT] *= 0.5
335
335
Y
338
338
function A_mul_B_col_J! (Y:: Matrix , P:: ChebyshevToNormalizedLegendrePlan , X:: Matrix , J:: Int )
339
339
m, n = size (X)
340
340
COLSHIFT = m* (J- 1 )
341
- A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
342
- A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
341
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
342
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
343
343
scale_col_J! (P. scl, Y, J)
344
344
end
345
345
@@ -411,31 +411,31 @@ cheb22normleg1(v::Vector) = plan_cheb22normleg1(v)*v
411
411
412
412
function A_mul_B!! (y:: Vector , P:: NormalizedLegendre1ToChebyshev2Plan , x:: AbstractVector )
413
413
unsafe_broadcasttimes! (x, P. scl)
414
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
415
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
414
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
415
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
416
416
end
417
417
418
418
function A_mul_B! (y:: Vector , P:: Chebyshev2ToNormalizedLegendre1Plan , x:: AbstractVector )
419
- A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
420
- A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
419
+ HierarchicalMatrices . A_mul_B! (y, P. even, x, 1 , 1 , 2 , 2 )
420
+ HierarchicalMatrices . A_mul_B! (y, P. odd, x, 2 , 2 , 2 , 2 )
421
421
unsafe_broadcasttimes! (y, P. scl)
422
422
end
423
423
424
424
function A_mul_B!! (Y:: Matrix , P:: NormalizedLegendre1ToChebyshev2Plan , X:: Matrix )
425
425
m, n = size (X)
426
426
scale! (P. scl, X)
427
427
for j = 1 : n
428
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
429
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
428
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
429
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
430
430
end
431
431
Y
432
432
end
433
433
434
434
function A_mul_B! (Y:: Matrix , P:: Chebyshev2ToNormalizedLegendre1Plan , X:: Matrix )
435
435
m, n = size (X)
436
436
for j = 1 : n
437
- A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
438
- A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
437
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + m* (j- 1 ), 1 + m* (j- 1 ), 2 , 2 )
438
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + m* (j- 1 ), 2 + m* (j- 1 ), 2 , 2 )
439
439
end
440
440
scale! (P. scl, Y)
441
441
end
@@ -444,15 +444,15 @@ function A_mul_B_col_J!!(Y::Matrix, P::NormalizedLegendre1ToChebyshev2Plan, X::M
444
444
m, n = size (X)
445
445
COLSHIFT = m* (J- 1 )
446
446
scale_col_J! (P. scl, X, J)
447
- A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
448
- A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
447
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
448
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
449
449
Y
450
450
end
451
451
452
452
function A_mul_B_col_J! (Y:: Matrix , P:: Chebyshev2ToNormalizedLegendre1Plan , X:: Matrix , J:: Int )
453
453
m, n = size (X)
454
454
COLSHIFT = m* (J- 1 )
455
- A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
456
- A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
455
+ HierarchicalMatrices . A_mul_B! (Y, P. even, X, 1 + COLSHIFT, 1 + COLSHIFT, 2 , 2 )
456
+ HierarchicalMatrices . A_mul_B! (Y, P. odd, X, 2 + COLSHIFT, 2 + COLSHIFT, 2 , 2 )
457
457
scale_col_J! (P. scl, Y, J)
458
458
end
0 commit comments