SlideShare a Scribd company logo
1 of 25
Download to read offline
高速並列sort “PARADIS”の紹介
尾城 拓真
PARADISの特徴
• Parallel RADIx Sort の略
• 分類ではParallel in-place MSD radix sort
• 省メモリで高速に動作する
• スレッドレベルの並列化
• 投機的実行
• 似ているsort
• american flag sort
• Parallel LSD radix sort by Satish (SIGMOD 2010)
• Regions sort (SPAA 2019)
PARADIS アルゴリズム(1/2)
PARADIS アルゴリズム (2/2)
• 全部で4stepからなる
• Step 1 Build Histogram
• 各値がいくつあるかをカウントする.
• Step2 Partition Array
• 各値が入るべきバケットの開始位置と終了位置を求める.
• Step3 PARADIS_Permutate , PARADIS_Repair
• 各パーティションごとに現在の要素が正しい位置にあるかどうかをチェ
ックし、間違っていたら合っているところと入れ替える.
• 次のPARADIS_Permutateのためにソート済みでないデータを寄せる
• Step4 Recursion
• 下位の桁に対しても同様に適用する.
今からこれをsortします
これを
こうする
step1 Build Histogram
p0 p1 p2 p3
x3 x12
x8 x2
x8 x11
x3 x3
x9 x11
x3 x2
x8 x8
x5 x4
x28 x42
x19 x11
Partition for permute
x28 x42
x19 x11
28 42 19 11
Partition for permute
x28 x42
x19 x11
28 42 19 11
Partition for permute
x28 x42
x19 x11
28 42 19 11
Partition for permute
x28 x42
x19 x11
28 42 19 11
PARADIS_Permute 位置関係チェック
PARADIS_Permute
図示してあるキーを一つのスレッドで扱う
PARADIS_Permute 位置関係チェック
PARADIS_Permute
PARADIS Permute 解説の前に記号の説明
head…現在処理対象の位置を示すポインタ
ph…partitionされたbucketのwrong elementsの先頭
位置を示すポインタ
swap… 始点と終点を入れ替える
step 3-1 1/10
step 3-1 2/10
if k==i then のhead 更新後
d[head]がはじめから正しい位置にある
step 3-1 3/10
step 3-1 4/10
if k==i then のhead 更新後
step 3-1 5/10
if k==i then のhead 更新後
step 3-1 6/10
if k==i then のhead 更新後
ph[k]==pt[k]
step 3-1 7/10
if k==i then のhead 更新後
head更新後
バケットがいっ
ぱいです
headが次のバケットへ
headが外に出たので次
のバケットへ
step 3-1 8/10
step 3-1 9/10
バケットがいっ
ぱいです
バケットがいっ
ぱいです
step 3-1 10/10
バケットがいっ
ぱいです
PARADIS_Permute , synchronize
PARADIS_Repair
PARADIS_Repair
再びpermuteを行う

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

高速並列sort アルゴリズム PARADIS の紹介