SlideShare a Scribd company logo
1 of 12
OMPILER DESIGN
BY,
ISHWARIYA.R, M.Sc(cs).,
NSCAS,Theni.
 The class of affine array access, where each array index is
expressed as affine expressions of loop indexes and symbolic
constants.
 Affine functions provide a succinct mapping from the iteration
space to the data space, making it easy to determine which
iterations map to the same data or same cache line.
 The affine upper and lower bounds of a loop can be
represented as a matrix-vector calculation.
Affine Array Index
Affine Array Indexes
1.Affine Accesses
2.Affine and Nonaffine Accesses in Practice
3.Exercises for Section 11.4
1. Affine Accesses
We say that an array access in a loop is affine if,
1. The bounds of the loop are expressed as affine expressions of
the sur-rounding loop variables and symbolic constants,
2. The index for each dimension of the array is also an affine
expression of surrounding loop variables and symbolic constants.
Formally, we represent an array access in a loop nest that uses a
vector of index variables i by the four-tuple T = (F,f,B>b); it
maps a vector i within the bounds
Bi + b > 0
To the array element location
Fi + f
The two loop indexes are i and j, and these form the vector i. Also, X, Y,
and Z are arrays with 1, 2, and 3 dimensions, respectively. The first access,
A[i - 1], is represented by a 1 x 2 matrix F and a vector f of length 1. Notice
that when we perform the matrix-vector multiplication and add in the
vector f, we are left with a single function, which is exactly the formula for
the access to the one-dimensional array X. Also notice the third access,
Y[j,j + 1], which, after matrix-vector multiplication and addition, yields a
pair of functions, (J,j + 1). These are the indexes of the two dimensions of
the array access. Finally, let us observe the fourth access K[l,2] . This
access is a constant, and unsurprisingly the matrix F is all 0's. Thus, the
vector of loop indexes, i, does not appear in the access function.
Example 11 . 17:
There are certain common data access patterns found in numerical
programs that fail to be affine. Programs involving sparse matrices are one
important example. One popular representation for sparse matrices is to
store only the nonzero elements in a vector, and auxiliary index arrays are
used to mark where a row starts and which columns contain nonzeros.
Indirect array accesses are used in accessing such data. An access of this
type, such as nonaffine access to the array X. If the sparsity is regular, as in
banded matrices having nonzeros only around the diagonal, then dense
arrays can be used to represent the subregions with nonzero elements. In
that case, accesses may be affine.
2. Affine and Nonaffine Accesses in Practice
Another common example of nonaffine accesses is linearized arrays. Pro-
grammers sometimes use a linear array to store a logically
multidimensional object. One reason why this is the case is that the
dimensions of the array may not be known at compile time. An access that
would normally look like Z[i,j] would be expressed as Z[i * n + j], which
is a quadratic function. We can convert the linear access into a
multidimensional access if every access can be decomposed into separate
dimensions with the guarantee that none of the components exceeds its
bound. Finally, we note that induction-variable analy-ses can be used to
convert some nonaffine accesses into affine ones, as shown in Example
11.18.
Exercise 11.4.1 : For each of the following array accesses,
give the vector f and the matrix F that describe them.
3. Exercises for Section 11.4
Thank you..

More Related Content

What's hot

Data Representation of Strings
Data Representation of StringsData Representation of Strings
Data Representation of StringsProf Ansari
 
Programming in python
Programming in pythonProgramming in python
Programming in pythonIvan Rojas
 
Polymath For Chemical Engineers
Polymath For Chemical EngineersPolymath For Chemical Engineers
Polymath For Chemical EngineersHashim Khan
 
A taxonomy of suffix array construction algorithms
A taxonomy of suffix array construction algorithmsA taxonomy of suffix array construction algorithms
A taxonomy of suffix array construction algorithmsunyil96
 
Cryptography an application of vectors and matrices
Cryptography an application of vectors and matricesCryptography an application of vectors and matrices
Cryptography an application of vectors and matricesdianasc04
 
Matrices And Application Of Matrices
Matrices And Application Of MatricesMatrices And Application Of Matrices
Matrices And Application Of Matricesmailrenuka
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++Muhammad Hammad Waseem
 
Applications of Matrices
Applications of MatricesApplications of Matrices
Applications of Matricessanthosh kumar
 
Aae oop xp_05
Aae oop xp_05Aae oop xp_05
Aae oop xp_05Niit Care
 
Number systems and Logic gates
Number systems and Logic gatesNumber systems and Logic gates
Number systems and Logic gatesRaviHN
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introductionnazlitemu
 
Basic operators in matlab
Basic operators in matlabBasic operators in matlab
Basic operators in matlabrishiteta
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListSelvaraj Seerangan
 
Uop gsp 125 final exam guide new
Uop gsp 125 final exam guide newUop gsp 125 final exam guide new
Uop gsp 125 final exam guide newElijahEthaan
 
8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patilwidespreadpromotion
 

What's hot (20)

Data Representation of Strings
Data Representation of StringsData Representation of Strings
Data Representation of Strings
 
Programming in python
Programming in pythonProgramming in python
Programming in python
 
Polymath For Chemical Engineers
Polymath For Chemical EngineersPolymath For Chemical Engineers
Polymath For Chemical Engineers
 
Control statements
Control statementsControl statements
Control statements
 
A taxonomy of suffix array construction algorithms
A taxonomy of suffix array construction algorithmsA taxonomy of suffix array construction algorithms
A taxonomy of suffix array construction algorithms
 
[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes
 
Cryptography an application of vectors and matrices
Cryptography an application of vectors and matricesCryptography an application of vectors and matrices
Cryptography an application of vectors and matrices
 
Matrices And Application Of Matrices
Matrices And Application Of MatricesMatrices And Application Of Matrices
Matrices And Application Of Matrices
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++
 
Application of Matrices
Application of MatricesApplication of Matrices
Application of Matrices
 
Applications of Matrices
Applications of MatricesApplications of Matrices
Applications of Matrices
 
Aae oop xp_05
Aae oop xp_05Aae oop xp_05
Aae oop xp_05
 
Number systems and Logic gates
Number systems and Logic gatesNumber systems and Logic gates
Number systems and Logic gates
 
Fem in matlab
Fem in matlabFem in matlab
Fem in matlab
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introduction
 
Basic operators in matlab
Basic operators in matlabBasic operators in matlab
Basic operators in matlab
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked List
 
Uop gsp 125 final exam guide new
Uop gsp 125 final exam guide newUop gsp 125 final exam guide new
Uop gsp 125 final exam guide new
 
8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil
 
Lattices
LatticesLattices
Lattices
 

Similar to Affine array index

Affine Array Indexes
Affine Array IndexesAffine Array Indexes
Affine Array IndexesNilaNila16
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfNehaVerma933923
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksAlina Leidinger
 
GRAPH MATRIX APPLICATIONS.pdf
GRAPH MATRIX APPLICATIONS.pdfGRAPH MATRIX APPLICATIONS.pdf
GRAPH MATRIX APPLICATIONS.pdfDurgaPrasad736072
 
Curv encyclopedia-fadili
Curv encyclopedia-fadiliCurv encyclopedia-fadili
Curv encyclopedia-fadiliSmitha Prakash
 
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)Inference & Learning in Linear Chain Conditional Random Fields (CRFs)
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)Anmol Dwivedi
 
graph representation.pdf
graph representation.pdfgraph representation.pdf
graph representation.pdfamitbhachne
 
Sulpcegu5e ppt 2_1
Sulpcegu5e ppt 2_1Sulpcegu5e ppt 2_1
Sulpcegu5e ppt 2_1silvia
 
Linear_Algebra_final.pdf
Linear_Algebra_final.pdfLinear_Algebra_final.pdf
Linear_Algebra_final.pdfRohitAnand125
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture ThreeAngelo Corsaro
 
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)csandit
 
An Application Of Graph Theory In Cryptography
An Application Of Graph Theory In CryptographyAn Application Of Graph Theory In Cryptography
An Application Of Graph Theory In CryptographyLori Mitchell
 
Asymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAsymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAmrinder Arora
 
Lesson 1_Functions.pptx
Lesson 1_Functions.pptxLesson 1_Functions.pptx
Lesson 1_Functions.pptxAlfredoLabador
 
vector spaces notes.pdf
vector spaces notes.pdfvector spaces notes.pdf
vector spaces notes.pdfjacky489530
 

Similar to Affine array index (20)

Affine Array Indexes
Affine Array IndexesAffine Array Indexes
Affine Array Indexes
 
Compiler Designing
Compiler DesigningCompiler Designing
Compiler Designing
 
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdfEigen-Decomposition: Eigenvalues and Eigenvectors.pdf
Eigen-Decomposition: Eigenvalues and Eigenvectors.pdf
 
Master Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural NetworksMaster Thesis on the Mathematial Analysis of Neural Networks
Master Thesis on the Mathematial Analysis of Neural Networks
 
GRAPH MATRIX APPLICATIONS.pdf
GRAPH MATRIX APPLICATIONS.pdfGRAPH MATRIX APPLICATIONS.pdf
GRAPH MATRIX APPLICATIONS.pdf
 
Curv encyclopedia-fadili
Curv encyclopedia-fadiliCurv encyclopedia-fadili
Curv encyclopedia-fadili
 
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)Inference & Learning in Linear Chain Conditional Random Fields (CRFs)
Inference & Learning in Linear Chain Conditional Random Fields (CRFs)
 
graph representation.pdf
graph representation.pdfgraph representation.pdf
graph representation.pdf
 
Sulpcegu5e ppt 2_1
Sulpcegu5e ppt 2_1Sulpcegu5e ppt 2_1
Sulpcegu5e ppt 2_1
 
Linear_Algebra_final.pdf
Linear_Algebra_final.pdfLinear_Algebra_final.pdf
Linear_Algebra_final.pdf
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)
MULTI RESOLUTION LATTICE DISCRETE FOURIER TRANSFORM (MRL-DFT)
 
An Application Of Graph Theory In Cryptography
An Application Of Graph Theory In CryptographyAn Application Of Graph Theory In Cryptography
An Application Of Graph Theory In Cryptography
 
Asymptotic Notation and Data Structures
Asymptotic Notation and Data StructuresAsymptotic Notation and Data Structures
Asymptotic Notation and Data Structures
 
Lesson 1_Functions.pptx
Lesson 1_Functions.pptxLesson 1_Functions.pptx
Lesson 1_Functions.pptx
 
Sparse autoencoder
Sparse autoencoderSparse autoencoder
Sparse autoencoder
 
Row enumeration by Carpenter algorithm_ANIKET CHOUDHURY
Row enumeration by Carpenter algorithm_ANIKET CHOUDHURYRow enumeration by Carpenter algorithm_ANIKET CHOUDHURY
Row enumeration by Carpenter algorithm_ANIKET CHOUDHURY
 
03 Data Representation
03 Data Representation03 Data Representation
03 Data Representation
 
vector spaces notes.pdf
vector spaces notes.pdfvector spaces notes.pdf
vector spaces notes.pdf
 
Iclr2016 vaeまとめ
Iclr2016 vaeまとめIclr2016 vaeまとめ
Iclr2016 vaeまとめ
 

More from Ishucs

Renuga
RenugaRenuga
RenugaIshucs
 
Thresholding
ThresholdingThresholding
ThresholdingIshucs
 
Ishwariya
IshwariyaIshwariya
IshwariyaIshucs
 
Image compression
Image compressionImage compression
Image compressionIshucs
 
Deepika
DeepikaDeepika
DeepikaIshucs
 
Renuga
RenugaRenuga
RenugaIshucs
 
Soundharya
SoundharyaSoundharya
SoundharyaIshucs
 
Lavanya
LavanyaLavanya
LavanyaIshucs
 
M.srinandhini
M.srinandhiniM.srinandhini
M.srinandhiniIshucs
 
Deepika t
Deepika tDeepika t
Deepika tIshucs
 
Sragavi (1)
Sragavi (1)Sragavi (1)
Sragavi (1)Ishucs
 
Ishwariya
IshwariyaIshwariya
IshwariyaIshucs
 
Software enginnering
Software enginneringSoftware enginnering
Software enginneringIshucs
 
Partial redundancy elimination
Partial redundancy eliminationPartial redundancy elimination
Partial redundancy eliminationIshucs
 
Software engineering
Software engineeringSoftware engineering
Software engineeringIshucs
 
Web programming
Web programmingWeb programming
Web programmingIshucs
 
Big data
Big dataBig data
Big dataIshucs
 
Business intelligence tools to handle big data
Business intelligence tools to handle big dataBusiness intelligence tools to handle big data
Business intelligence tools to handle big dataIshucs
 

More from Ishucs (20)

Renuga
RenugaRenuga
Renuga
 
Snega
SnegaSnega
Snega
 
Thresholding
ThresholdingThresholding
Thresholding
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Image compression
Image compressionImage compression
Image compression
 
Deepika
DeepikaDeepika
Deepika
 
Snega
SnegaSnega
Snega
 
Renuga
RenugaRenuga
Renuga
 
Soundharya
SoundharyaSoundharya
Soundharya
 
Lavanya
LavanyaLavanya
Lavanya
 
M.srinandhini
M.srinandhiniM.srinandhini
M.srinandhini
 
Deepika t
Deepika tDeepika t
Deepika t
 
Sragavi (1)
Sragavi (1)Sragavi (1)
Sragavi (1)
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Software enginnering
Software enginneringSoftware enginnering
Software enginnering
 
Partial redundancy elimination
Partial redundancy eliminationPartial redundancy elimination
Partial redundancy elimination
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Web programming
Web programmingWeb programming
Web programming
 
Big data
Big dataBig data
Big data
 
Business intelligence tools to handle big data
Business intelligence tools to handle big dataBusiness intelligence tools to handle big data
Business intelligence tools to handle big data
 

Recently uploaded

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

Affine array index

  • 2.  The class of affine array access, where each array index is expressed as affine expressions of loop indexes and symbolic constants.  Affine functions provide a succinct mapping from the iteration space to the data space, making it easy to determine which iterations map to the same data or same cache line.  The affine upper and lower bounds of a loop can be represented as a matrix-vector calculation. Affine Array Index
  • 3. Affine Array Indexes 1.Affine Accesses 2.Affine and Nonaffine Accesses in Practice 3.Exercises for Section 11.4
  • 4. 1. Affine Accesses We say that an array access in a loop is affine if, 1. The bounds of the loop are expressed as affine expressions of the sur-rounding loop variables and symbolic constants, 2. The index for each dimension of the array is also an affine expression of surrounding loop variables and symbolic constants.
  • 5. Formally, we represent an array access in a loop nest that uses a vector of index variables i by the four-tuple T = (F,f,B>b); it maps a vector i within the bounds Bi + b > 0 To the array element location Fi + f
  • 6. The two loop indexes are i and j, and these form the vector i. Also, X, Y, and Z are arrays with 1, 2, and 3 dimensions, respectively. The first access, A[i - 1], is represented by a 1 x 2 matrix F and a vector f of length 1. Notice that when we perform the matrix-vector multiplication and add in the vector f, we are left with a single function, which is exactly the formula for the access to the one-dimensional array X. Also notice the third access, Y[j,j + 1], which, after matrix-vector multiplication and addition, yields a pair of functions, (J,j + 1). These are the indexes of the two dimensions of the array access. Finally, let us observe the fourth access K[l,2] . This access is a constant, and unsurprisingly the matrix F is all 0's. Thus, the vector of loop indexes, i, does not appear in the access function. Example 11 . 17:
  • 7.
  • 8. There are certain common data access patterns found in numerical programs that fail to be affine. Programs involving sparse matrices are one important example. One popular representation for sparse matrices is to store only the nonzero elements in a vector, and auxiliary index arrays are used to mark where a row starts and which columns contain nonzeros. Indirect array accesses are used in accessing such data. An access of this type, such as nonaffine access to the array X. If the sparsity is regular, as in banded matrices having nonzeros only around the diagonal, then dense arrays can be used to represent the subregions with nonzero elements. In that case, accesses may be affine. 2. Affine and Nonaffine Accesses in Practice
  • 9. Another common example of nonaffine accesses is linearized arrays. Pro- grammers sometimes use a linear array to store a logically multidimensional object. One reason why this is the case is that the dimensions of the array may not be known at compile time. An access that would normally look like Z[i,j] would be expressed as Z[i * n + j], which is a quadratic function. We can convert the linear access into a multidimensional access if every access can be decomposed into separate dimensions with the guarantee that none of the components exceeds its bound. Finally, we note that induction-variable analy-ses can be used to convert some nonaffine accesses into affine ones, as shown in Example 11.18.
  • 10.
  • 11. Exercise 11.4.1 : For each of the following array accesses, give the vector f and the matrix F that describe them. 3. Exercises for Section 11.4