Download presentation
Presentation is loading. Please wait.
Published byJasmine Davis Modified over 6 years ago
1
Fast Multipole: It's All About Adding Functions in Finite Precision
Alan Edelman Per-Olof Persson MIT: Dept of Mathematics, Computer Science Artificial Intelligence Laboratory University of Maryland, College Park April 27, 2004 11/10/2018
2
Exclusive Sum Problem Given vector x compute “exclusive sum”:
yi = ∑j≠i xj Example: x=[ ] y=[ ] Students quickly think of “sum(x)-x” Now impose NO SUBTRACTION rule 11/10/2018
3
Tree algorithm for exclusive sum
10 26 3 7 11 15 Tree algorithm for exclusive sum 1 2 36 3 4 5 6 Up the tree: Pairwise Adds Down the tree: Sibling Swap + Parent 7 8 11/10/2018
4
Parallel Prefix Like Algorithm
10 26 3 7 11 15 Parallel Prefix Like Algorithm 1 2 36 3 4 5 6 Up the tree: Pairwise Adds Down the tree: Sibling Swap + Parent 7 8 Adds may be done in parallel 11/10/2018
5
Parallel Exclusive Prefix Algorithm
10 26 3 7 11 15 Parallel Exclusive Prefix Algorithm 1 2 36 3 4 5 6 Down the tree: if right : add left if left : add 0 + Parent Up the tree: Pairwise Adds 7 8 Adds may be done in parallel 11/10/2018
6
The prefix operator yk=∑i=1xi
“Parallel Prefix” goes back to 1800’s: Babbage, carry, look-ahead addition 11/10/2018
7
Simple algorithm for exclusive sum
Compute directly: exclusive_prefix_sum=[ ] exclusive_suffix_sum=[ ] Vector sum: y=[ ] 11/10/2018
8
Comparison Tree Direct Complexity 3n 2n Simplicity involved simple
Typical Venue Parallel Serial FMM Connection FMM like Why not??? 11/10/2018
9
The Algorithm Menu Direction of Summation Data Structure Prefix
Suffix Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive Topology Line (1d) Plane (2d) Space (3d) Circle, sphere, manifolds, … Data Structure Direct Hierarchical Function Representation Exact Multipole Interpolation 11/10/2018
10
The Algorithm Menu Direction of Summation Data Structure Prefix
Suffix Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive Topology Line (1d) Plane (2d) Space (3d) Circle, sphere, manifolds, … Data Structure Direct Hierarchical Function Representation Exact Multipole Interpolation 2d FMM: 1c+2c+3b+4b+5b ParPrefix: 1a+2a+3a+4b+5a 11/10/2018
11
The Algorithm Menu Direction of Summation Prefix Suffix
Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive 11/10/2018
12
The Algorithm Menu Direction of Summation Prefix Suffix
Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive Pseudocode: 11/10/2018
13
The Algorithm Menu Direction of Summation Prefix Suffix
Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive 11/10/2018
14
The Algorithm Menu Direction of Summation Prefix Suffix
Bidirectional Exclusions Inclusive Exclusive Neighborhood Exclusive 11/10/2018
15
Algorithms as Pictures
11/10/2018
16
The Algorithm Menu Direction of Summation Data Structure Exclusions
Topology Data Structure Function Representation Discrete algorithms cover 1,2,3 and 4 Item 5 needs Functions Discrete Representation of Functions Addition on this representation 11/10/2018
17
Exclude (Numbers or functions)
MATLAB: Tree algorithm expressed recursively >> exclude([ ]) ans = >> exclude([1/(t-1) 1/(t-2) 1/(t-3) 1/(t-4)]) ans = [1/(t-2)+1/(t-3)+1/(t-4), 1/(t-1)+1/(t-3)+1/(t-4), 1/(t-4)+1/(t-1)+1/(t-2), 1/(t-3)+1/(t-1)+1/(t-2)] 11/10/2018
18
Reals:Floats::Functions:Discretized math vs. computation
11/10/2018
19
Function Representation: The analog of rounding
Polynomials: f(x)=∑0 ≤ k <p ak(x-c)k Truncated Multipole Series: f(x)=∑1 ≤ k ≤ p ak/(x-c)k Virtual Charges: f(x)=∑1 ≤ k ≤ p ak/(x-xk) Interpolate Number of points Locations of points Approximate L2 (least squares) L∞ (“Remez”) 11/10/2018
20
Function Representation: The analog of rounding
f(x)=1/(x-0.75) 11/10/2018
21
Function Approx:Multipole vs taylor
11/10/2018
22
Virtual Charges f(x)=∑1 ≤ k ≤ p ak/(x-xk)
Prechoose xk: Then interpolate, or least squares, or maybe Remez Compute xk: Many choices New idea(?): Lanczos Eigenvalues not linear, but Tridiagonal eigenvalue problem is solid as a rock 11/10/2018
23
11/10/2018
24
Lanczos appears to be more accurate than multipole closer to singularities
11/10/2018
25
Lanczos Virtual Charges
11/10/2018
26
Non-tree algorithms … 11/10/2018
27
Non-tree in 2d: cumulate sums
11/10/2018
28
Non-tree in 3d: cumulate sums
11/10/2018
29
Non-tree in 3d: cumulate sums
Any number of dimensions ok 11/10/2018
30
Direct FMM 1d Experiments
Our Experiments are preliminary: We would be delighted if others would proceed more extensively. Comments: Need accuracy near the boundary Virtual charges worked better One representation not two (multipole + taylor) More charges needed as we proceeded to maintain accuracy (other choices?) No power of two restriction Easy to implement (only func rep needed) 11/10/2018
31
Pascal’s Triangle Flip Shift Taylor Shift Multipole
Representations of Mobius functions but with a catch! 11/10/2018
32
General Orthogonal Polynomials
Pascal’s Triangle Flip Shift Taylor Shift Multipole Representations of Mobius functions but with a catch! General Orthogonal Polynomials mi(x) = ∑j=0,∞ mi+jxj H πi(x) = ∑j=0,i < πi,xj> xj LT fi(x) = ∑j=i, ∞ <xi, πj>x-j+1 L 11/10/2018
33
Conclusion Formulation of FMM Direct (non-tree) algorithm
Higher dimensions Lanczos Virtual Charges Orthogonal Polynomials 11/10/2018
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.