SlideShare a Scribd company logo
What is
BLAS???Milad Zahed
‫تعریف‬
BLAS
‫خطی‬ ‫جبر‬ ‫اصلی‬ ‫های‬ ‫زیربرنامه‬
(
BLAS
)
‫كه‬ ‫هستند‬ ‫هایي‬ ‫رابط‬
‫مي‬ ‫قرار‬ ‫استفاده‬ ‫مورد‬ ‫خطي‬ ‫جبر‬ ‫اصلي‬ ‫هاي‬ ‫عملیات‬ ‫براي‬ ‫معموال‬
‫گیرند‬
.
‫رابط‬
BLAS
‫کارایی‬ ‫با‬ ‫حمل‬ ‫قابل‬ ‫هاي‬ ‫برنامه‬ ‫اجراي‬ ‫از‬
‫پشتیبانی‬ ‫است‬ ‫فشرده‬ ‫برداری‬ ‫و‬ ‫ماتریسی‬ ‫محاسبات‬ ‫شامل‬ ‫که‬ ‫باال‬
‫میکند‬
.
‫واقع‬ ‫در‬
BLAS
‫های‬‫بلوک‬ ‫که‬ ‫هستند‬ ‫هایی‬‫روتین‬ ‫ها‬
‫و‬ ‫بردار‬ ‫اولیه‬ ‫عملیات‬ ‫انجام‬ ‫برای‬ ‫را‬ ‫استاندارد‬ ‫ساختمانی‬
‫کنند‬‫می‬ ‫فراهم‬ ‫ماتریس‬
.
‫سطوح‬
BLAS
‫های‬ ‫زیربرنامه‬
BLAS
‫کرد‬ ‫تقسیم‬ ‫سطح‬ ‫سه‬ ‫به‬ ‫توان‬ ‫می‬ ‫را‬
:
•
BLAS
‫سطح‬
1
:
‫می‬ ‫انجام‬ ‫را‬ ‫بردار‬ ‫و‬ ‫برداری‬ ،‫اسکالر‬ ‫عملیات‬
‫دهد‬
.
O(n)
‫و‬ ‫دیتا‬
O(n)
‫عملیات‬
.
•
BLAS
‫سطح‬
2
:
‫ماتریس‬ ‫عملیات‬
-
‫دهد‬ ‫می‬ ‫انجام‬ ‫را‬ ‫بردار‬
.
O(n^2)
‫و‬ ‫داده‬
O(n^2)
‫عملیات‬
.
•
BLAS
‫سطح‬
3
:
‫ماتریس‬ ‫عملیات‬
-
‫دهد‬ ‫می‬ ‫انجام‬ ‫را‬ ‫ماتریس‬
.
O(n^2)
‫و‬ ‫داده‬
O(n^3)
‫عملیات‬
.
‫که‬ ‫آنجایی‬ ‫از‬
BLAS
‫گسترده‬ ‫طور‬ ‫به‬ ‫و‬ ‫حمل‬ ‫قابل‬ ،‫کارآمد‬ ‫ها‬
‫کیفیت‬ ‫با‬ ‫خطی‬ ‫جبر‬ ‫افزار‬ ‫نرم‬ ‫توسعه‬ ‫در‬ ً
‫معموال‬ ،‫هستند‬ ‫دسترس‬ ‫در‬
‫هاي‬ ‫نسخه‬
BLAS
‫روتین‬ ‫هر‬
BLAS
‫و‬
LAPACK
‫نسخه‬ ‫هر‬ ،‫شود‬ ‫می‬ ‫ارائه‬ ‫نسخه‬ ‫چندین‬ ‫در‬
‫دقت‬ ‫اندازه‬ ‫یك‬ ‫برای‬
.
‫شده‬ ‫استفاده‬ ‫دقت‬ ‫زیربرنامه‬ ‫نام‬ ‫اول‬ ‫حرف‬
‫دهد‬ ‫می‬ ‫نشان‬ ‫را‬ ‫زیربرنامه‬ ‫آن‬ ‫در‬
:
•
: S
‫دقته‬ ‫تک‬
Real
.
•
: D
‫دقته‬ ‫دو‬
Real
.
•
: C
‫دقته‬ ‫تک‬
Complex
.
•
: Z
‫دقت‬ ‫دو‬
Complex
.
BLAS 1
‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬
BLAS 1
‫از‬ ‫عبارتند‬
:
(1
xCOPY
:
‫كند‬ ‫مي‬ ‫کپی‬ ‫دیگر‬ ‫بردار‬ ‫به‬ ‫را‬ ‫بردار‬ ‫یک‬
(2
xSWAP
:
‫كند‬ ‫مي‬ ‫مبادله‬ ‫را‬ ‫بردار‬ ‫دو‬
(3
xSCAL
:
‫ی‬ ‫مقیاس‬
‫ک‬
‫بردار‬
(4
xAXPY
:
‫كند‬ ‫مي‬ ‫اضافه‬ ‫دیگر‬ ‫بردار‬ ‫به‬ ‫را‬ ‫بردار‬ ‫یک‬ ‫مضرب‬
.
(5
xDOT
:
‫داخلي‬ ‫ضرب‬
(6
xASUM
:
‫بردار‬ ‫یک‬ ‫رم‬ ُ
‫ن‬
‫اول‬ ‫حرف‬
(
x
)
‫حروف‬ ‫از‬ ‫یک‬ ‫هر‬ ‫تواند‬ ‫می‬ ‫دقت‬ ‫به‬ ‫بسته‬
S,D,C,Z
(
‫در‬
‫قبل‬ ‫اسالید‬
)
‫باشد‬
BLAS 2
‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬
BLAS 2
‫از‬ ‫عبارتند‬
:
(1
xGEMV
:
‫ماتریس‬ ‫ضرب‬
-
‫کلی‬ ‫بردار‬
(2
xGER
:
‫روز‬ ‫به‬
‫مرتبه‬ ‫عمومی‬ ‫رسانی‬
1
(3
xSYR2
:
‫مرتبه‬ ‫متقارن‬ ‫رسانی‬ ‫روز‬ ‫به‬
2
(4
xTRSV
:
‫معادالت‬ ‫از‬ ‫مثلثی‬ ‫سیستم‬ ‫یک‬ ‫حل‬
BLAS 3
‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬
BLAS 3
‫از‬ ‫عبارتند‬
:
(1
xGEMM
:
‫ماتریس‬ ‫ضرب‬
-
‫عمومی‬ ‫ماتریس‬
(2
xSYMM
:
‫ماتریس‬ ‫متقارن‬ ‫ضرب‬
-
‫ماتریس‬
(3
xSYRK
:
‫رتبه‬ ‫رسانی‬ ‫روز‬ ‫به‬
-
k
‫متقارن‬
(4
xSYR2K
:
‫رتبه‬ ‫متقارن‬ ‫رسانی‬ ‫روز‬ ‫به‬
-
2
k
،‫معادالت‬ ‫خطی‬ ‫سیستم‬ ‫یک‬ ‫حل‬ ‫مانند‬ ،‫تر‬ ‫پیشرفته‬ ‫ماتریسی‬ ‫عملیات‬
‫در‬
LAPACK
‫است‬ ‫موجود‬
.
‫منابع‬
https://web.stanford.edu/class/me200c/tutorial_77/18.1_blas.html
http://www.netlib.org/blas/
https://link.springer.com/referenceworkentry/10.1007/978-0-387-09766-4_84
‫پایان‬

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
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...
 

BLAS.pptx

  • 2. ‫تعریف‬ BLAS ‫خطی‬ ‫جبر‬ ‫اصلی‬ ‫های‬ ‫زیربرنامه‬ ( BLAS ) ‫كه‬ ‫هستند‬ ‫هایي‬ ‫رابط‬ ‫مي‬ ‫قرار‬ ‫استفاده‬ ‫مورد‬ ‫خطي‬ ‫جبر‬ ‫اصلي‬ ‫هاي‬ ‫عملیات‬ ‫براي‬ ‫معموال‬ ‫گیرند‬ . ‫رابط‬ BLAS ‫کارایی‬ ‫با‬ ‫حمل‬ ‫قابل‬ ‫هاي‬ ‫برنامه‬ ‫اجراي‬ ‫از‬ ‫پشتیبانی‬ ‫است‬ ‫فشرده‬ ‫برداری‬ ‫و‬ ‫ماتریسی‬ ‫محاسبات‬ ‫شامل‬ ‫که‬ ‫باال‬ ‫میکند‬ . ‫واقع‬ ‫در‬ BLAS ‫های‬‫بلوک‬ ‫که‬ ‫هستند‬ ‫هایی‬‫روتین‬ ‫ها‬ ‫و‬ ‫بردار‬ ‫اولیه‬ ‫عملیات‬ ‫انجام‬ ‫برای‬ ‫را‬ ‫استاندارد‬ ‫ساختمانی‬ ‫کنند‬‫می‬ ‫فراهم‬ ‫ماتریس‬ .
  • 3. ‫سطوح‬ BLAS ‫های‬ ‫زیربرنامه‬ BLAS ‫کرد‬ ‫تقسیم‬ ‫سطح‬ ‫سه‬ ‫به‬ ‫توان‬ ‫می‬ ‫را‬ : • BLAS ‫سطح‬ 1 : ‫می‬ ‫انجام‬ ‫را‬ ‫بردار‬ ‫و‬ ‫برداری‬ ،‫اسکالر‬ ‫عملیات‬ ‫دهد‬ . O(n) ‫و‬ ‫دیتا‬ O(n) ‫عملیات‬ . • BLAS ‫سطح‬ 2 : ‫ماتریس‬ ‫عملیات‬ - ‫دهد‬ ‫می‬ ‫انجام‬ ‫را‬ ‫بردار‬ . O(n^2) ‫و‬ ‫داده‬ O(n^2) ‫عملیات‬ . • BLAS ‫سطح‬ 3 : ‫ماتریس‬ ‫عملیات‬ - ‫دهد‬ ‫می‬ ‫انجام‬ ‫را‬ ‫ماتریس‬ . O(n^2) ‫و‬ ‫داده‬ O(n^3) ‫عملیات‬ . ‫که‬ ‫آنجایی‬ ‫از‬ BLAS ‫گسترده‬ ‫طور‬ ‫به‬ ‫و‬ ‫حمل‬ ‫قابل‬ ،‫کارآمد‬ ‫ها‬ ‫کیفیت‬ ‫با‬ ‫خطی‬ ‫جبر‬ ‫افزار‬ ‫نرم‬ ‫توسعه‬ ‫در‬ ً ‫معموال‬ ،‫هستند‬ ‫دسترس‬ ‫در‬
  • 4. ‫هاي‬ ‫نسخه‬ BLAS ‫روتین‬ ‫هر‬ BLAS ‫و‬ LAPACK ‫نسخه‬ ‫هر‬ ،‫شود‬ ‫می‬ ‫ارائه‬ ‫نسخه‬ ‫چندین‬ ‫در‬ ‫دقت‬ ‫اندازه‬ ‫یك‬ ‫برای‬ . ‫شده‬ ‫استفاده‬ ‫دقت‬ ‫زیربرنامه‬ ‫نام‬ ‫اول‬ ‫حرف‬ ‫دهد‬ ‫می‬ ‫نشان‬ ‫را‬ ‫زیربرنامه‬ ‫آن‬ ‫در‬ : • : S ‫دقته‬ ‫تک‬ Real . • : D ‫دقته‬ ‫دو‬ Real . • : C ‫دقته‬ ‫تک‬ Complex . • : Z ‫دقت‬ ‫دو‬ Complex .
  • 5. BLAS 1 ‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬ BLAS 1 ‫از‬ ‫عبارتند‬ : (1 xCOPY : ‫كند‬ ‫مي‬ ‫کپی‬ ‫دیگر‬ ‫بردار‬ ‫به‬ ‫را‬ ‫بردار‬ ‫یک‬ (2 xSWAP : ‫كند‬ ‫مي‬ ‫مبادله‬ ‫را‬ ‫بردار‬ ‫دو‬ (3 xSCAL : ‫ی‬ ‫مقیاس‬ ‫ک‬ ‫بردار‬ (4 xAXPY : ‫كند‬ ‫مي‬ ‫اضافه‬ ‫دیگر‬ ‫بردار‬ ‫به‬ ‫را‬ ‫بردار‬ ‫یک‬ ‫مضرب‬ . (5 xDOT : ‫داخلي‬ ‫ضرب‬ (6 xASUM : ‫بردار‬ ‫یک‬ ‫رم‬ ُ ‫ن‬ ‫اول‬ ‫حرف‬ ( x ) ‫حروف‬ ‫از‬ ‫یک‬ ‫هر‬ ‫تواند‬ ‫می‬ ‫دقت‬ ‫به‬ ‫بسته‬ S,D,C,Z ( ‫در‬ ‫قبل‬ ‫اسالید‬ ) ‫باشد‬
  • 6. BLAS 2 ‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬ BLAS 2 ‫از‬ ‫عبارتند‬ : (1 xGEMV : ‫ماتریس‬ ‫ضرب‬ - ‫کلی‬ ‫بردار‬ (2 xGER : ‫روز‬ ‫به‬ ‫مرتبه‬ ‫عمومی‬ ‫رسانی‬ 1 (3 xSYR2 : ‫مرتبه‬ ‫متقارن‬ ‫رسانی‬ ‫روز‬ ‫به‬ 2 (4 xTRSV : ‫معادالت‬ ‫از‬ ‫مثلثی‬ ‫سیستم‬ ‫یک‬ ‫حل‬
  • 7. BLAS 3 ‫های‬ ‫زیربرنامه‬ ‫از‬ ‫برخی‬ BLAS 3 ‫از‬ ‫عبارتند‬ : (1 xGEMM : ‫ماتریس‬ ‫ضرب‬ - ‫عمومی‬ ‫ماتریس‬ (2 xSYMM : ‫ماتریس‬ ‫متقارن‬ ‫ضرب‬ - ‫ماتریس‬ (3 xSYRK : ‫رتبه‬ ‫رسانی‬ ‫روز‬ ‫به‬ - k ‫متقارن‬ (4 xSYR2K : ‫رتبه‬ ‫متقارن‬ ‫رسانی‬ ‫روز‬ ‫به‬ - 2 k ،‫معادالت‬ ‫خطی‬ ‫سیستم‬ ‫یک‬ ‫حل‬ ‫مانند‬ ،‫تر‬ ‫پیشرفته‬ ‫ماتریسی‬ ‫عملیات‬ ‫در‬ LAPACK ‫است‬ ‫موجود‬ .