R EPRESENTING H IGHER D IMENSIONAL A RRAYS INTO A G ENERALIZED T WO - DIMENSIONAL A RRAY Authors K.M. Azharul Hasan Md Abu Hanif Shaikh Dept. of Computer.

Slides:



Advertisements
Similar presentations
Multilinear Algebra for Analyzing Data with Multiple Linkages
Advertisements

A NOVEL APPROACH TO SOLVING LARGE-SCALE LINEAR SYSTEMS Ken Habgood, Itamar Arel Department of Electrical Engineering & Computer Science GABRIEL CRAMER.
Efficient Sparse Matrix-Matrix Multiplication on Heterogeneous High Performance Systems AACEC 2010 – Heraklion, Crete, Greece Jakob Siegel 1, Oreste Villa.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Maths for Computer Graphics
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
A Hybrid Approach of Failed Disk Recovery Using RAID-6 Codes: Algorithms and Performance Evaluation Yinlong Xu University of Science and Technology of.
Expectation Maximization Method Effective Image Retrieval Based on Hidden Concept Discovery in Image Database By Sanket Korgaonkar Masters Computer Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CS Data Structures Chapter 2 Arrays and Structures.
Dimension reduction : PCA and Clustering Christopher Workman Center for Biological Sequence Analysis DTU.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Arrays (Part II). Two- and Multidimensional Arrays Two-dimensional array: collection of a fixed number of components (of the same type) arranged in two.
DATA LOCALITY & ITS OPTIMIZATION TECHNIQUES Presented by Preethi Rajaram CSS 548 Introduction to Compilers Professor Carol Zander Fall 2012.
Chapter 8 Multidimensional Arrays C Programming for Scientists & Engineers with Applications by Reddy & Ziegler.
Matrices Write and Augmented Matrix of a system of Linear Equations Write the system from the augmented matrix Solve Systems of Linear Equations using.
Multi-Dimensional Arrays in Java "If debugging is the process of removing software bugs, then programming must be the process of putting them in." -- Edsger.
College of Nanoscale Science and Engineering A uniform algebraically-based approach to computational physics and efficient programming James E. Raynolds.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Modular SRAM-based Binary Content-Addressable Memories Ameer M.S. Abdelhadi and Guy G.F. Lemieux Department of Electrical and Computer Engineering University.
ARRAYS 1 Week 2. Data Structures  Data structure  A particular way of storing and organising data in a computer so that it can be used efficiently 
Two dimensional arrays in Java Computer Science 3 Gerb Objective: Use matrices in Java.
SAND C 1/17 Coupled Matrix Factorizations using Optimization Daniel M. Dunlavy, Tamara G. Kolda, Evrim Acar Sandia National Laboratories SIAM Conference.
CHAPTER: 12. Array is a collection of variables of the same data type that are referenced by a common name. An Array of 10 Elements of type double.
Autonomic scheduling of tasks from data parallel patterns to CPU/GPU core mixes Published in: High Performance Computing and Simulation (HPCS), 2013 International.
Community Grids Lab. Indiana University, Bloomington Seung-Hee Bae.
Computer Science: A Structured Programming Approach Using C1 8-7 Two-Dimensional Arrays The arrays we have discussed so far are known as one- dimensional.
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 2.
JAVA AND MATRIX COMPUTATION
Copyright © Curt Hill Multiple Dimension Arrays Extending Java Arrays.
Working with Arrays in MATLAB
An Introduction to Programming with C++ Fifth Edition Chapter 11 Arrays.
Week # 2: Arrays.  Data structure  A particular way of storing and organising data in a computer so that it can be used efficiently  Types of data.
PH24010 Data Handling and Statistics Use of MathCAD to handle statistical data Data storage in vectors and matrices MathCAD’s built-in functions: –Mean,
Sparse Vectors & Matrices Jyh-Shing Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University.
Algorithms 2005 Ramesh Hariharan. Algebraic Methods.
Computer Construction of Quasi-Twisted Two-Weight Codes Eric Chen Dept. of Comp.Science Kristianstad University Kristianstad Sweden.
Parallelizing the conjugate gradient algorithm for multilevel Toeplitz systems Jie Chen a and Tom L. H. Li b a Argonne National Laboratory b University.
Computer Science: A Structured Programming Approach Using C1 8-7 Two-Dimensional Arrays The arrays we have discussed so far are known as one- dimensional.
Indexing OLAP Data Sunita Sarawagi Monowar Hossain York University.
Chapter 6Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 6 l Array Basics l Arrays in Classes and Methods l Programming.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Logical & Physical Address Nihal Güngör. Logical Address In simplest terms, an address generated by the CPU is known as a logical address. Logical addresses.
1 Arrays of Arrays Quick review … arrays Arrays of arrays ≡ multidimensional array Example: times table Representation in memory Ragged arrays Example:
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
1. 2  Introduction  Array Operations  Number of Elements in an array One-dimensional array Two dimensional array Multi-dimensional arrays Representation.
ECE 103 Engineering Programming Chapter 23 Multi-Dimensional Arrays Herbert G. Mayer, PSU CS Status 6/24/2014 Initial content copied verbatim from ECE.
Arrays. Outline 1.(Introduction) Arrays An array is a contiguous block of list of data in memory. Each element of the list must be the same type and use.
Multi-dimensional Array 1 Multi-dimensional array refers to an array with more than one index. It is a logical representation. On physical storage, the.
Two dimensional arrays A two dimensional m x n array A is a collection of m. n elements such that each element is specified by a pair of integers (such.
MULTI-DIMENSIONAL ARRAYS 1. Multi-dimensional Arrays The types of arrays discussed so far are all linear arrays. That is, they all dealt with a single.
Arrays. C++ Style Data Structures: Arrays(1) An ordered set (sequence) with a fixed number of elements, all of the same type, where the basic operation.
CS 201 Tarik Booker California State University, Los Angeles.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Matrix Multiplication in Hadoop
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
LU Decomposition ● In Gauss elimination; Forward elimination Backward substitution Major computational effort Low computational effort can be used for.
13.4 Product of Two Matrices
Matrices Elements, Adding and Subtracting
CSCI N207 Data Analysis Using Spreadsheet
Multidimensional array
Parallel build blocks.
Shared Memory Accesses
Multi-Dimensional Arrays
Matrix A matrix is a rectangular arrangement of numbers in rows and columns Each number in a matrix is called an Element. The dimensions of a matrix are.
Working with Arrays in MATLAB
Arrays and Matrices Prof. Abdul Hameed.
Presentation transcript:

R EPRESENTING H IGHER D IMENSIONAL A RRAYS INTO A G ENERALIZED T WO - DIMENSIONAL A RRAY Authors K.M. Azharul Hasan Md Abu Hanif Shaikh Dept. of Computer Science and Engineering Khulna University of Engineering & Technology, Khulna, Bangladesh

P RESENTATION L AYOUT Motivation toward G2A Why G2APrevious Work G2A 3-D to 2-D4-D to 2-D6-D to 2-D Matrix Operation Algorithm Addition/SubtractionMultiplication Experimental Data Addition/SubtractionMultiplication

W HY G2A ? Modeling and analyzing scientific phenomena strongly requires handling large scale data of higher dimension efficiently and effectively The cost of index computation becomes high for higher dimensional array The cache miss rate increases for higher dimensional arrays as more cache lines need to be accessed Visualization and operation on higher dimensional array is tough for Traditional Multidimensional Array (TMA)

P REVIOUS W ORK Extendible Karnaugh Map Representation (EKMR) by Lin et al. But it works well till four dimensions. Matricization of n-way tensor by Brett W. Bader and Tamara G. Kolda has a higher storage rate though operation on stored data good hear.

G2A N-dimensional array will be fitted in a 2-D space by placing odd dimensions in row direction and even dimensions along column direction Forward Mapping: Equivalent G2A indices from TMA(n)

G2A (C ONTINUED ….) Backward Mapping: Finding TMA from G2A Initialize x 1 ’ := 0, x 2 ’ : = 0 Repeat i := 1 to n Repeat j:= i +2 to n x i := x i × l j j := j + 2 x’ 2 - i%2 := x’ 2 - i%2 + x i

G2A: 3-D TO 2-D G2A A[ l 1 '][ l 2 '] for TMA(3) A[2][3][4] where l 1 '= l 1 × l 3 =8 and l 2 '= l 2 =3 Element A[1][1]2] of TMA(3) is equi- valent G2A is A[ x 1 '][ x 2 '] where x 1 '= 1 × = 6 and x 2 '= x 2 =1 G2A is A[ x 1 '][ x 2 '] is known then it’s equivalent TMA(4) becomes A[ x 1 ][ x 2 ][ x 3 ] where x 3 = x 1 '% l 3 =6%4=2, x 1 = x 1 '/ l 3 =1 and x 2 = x 2 '=1

G2A: 4-D TO 2-D TMA(4) A[ l 1 ][ l 2 ][ l 3 ][ l 4 ] of size [2, 3, 3, 2], the corresponding G2A A[ l 1 '][ l 2 ‘] where l 1 '= l 1 × l 3 =2×3=6 and l 2 '= l 2 × l 4 =3×2=6 Element A[1][1][2][0] of TMA(4) is equivalent G2A is A[ x 1 '][ x 2 '] where x 1 '= 1 × = 5 and x 2 '= 1 × = 2 G2A is A[ x 1 '][ x 2 '] is known then it’s equivalent TMA(3) becomes A[ x 1 ][ x 2 ][ x 3 ] [ x 4 ] where x 3 = x 1 '% l 3 =5%3=2, x 1 = x 1 '/ l 3 =1 and x 4 = x 2 '% l 4 =2%2=0, x 2 = x 2 '/ l 4 =2/2=1

G2A: 6-D TO 2-D Similarly for G2A of size[12,12] equivale- nt to TMA(6) of size [2, 2, 2, 3, 3, 2] x ' 1 = x 1 × l 3 × l 5 + x 3 × l 5 + x 5, x ' 2 = x 2 × l 4 × l 6 + x 4 × l 6 + x 6 For backward mapping x 6 = 7 % l 6 = 7 % 2 = 1, x 4 =(7/ l 6 )% l 4 =(7/2)%3=0 x 2 =(7/ l 6 )/ l 4 =(7/2)/3=1 …………

M ATRIX -M ATRIX A DDITION /S UBTRACTION Algorithm 1: matrix- matrix_addition_TMA_n begin for x 1 = 0 to (l 1 -1) do for x 2 = 0 to (l 2 -1) do …………………. for x n =0 to (l n -1) do C[x 1 ][x 2 ]…[x n ] = A[x 1 ][x 2 ]…[x n ] + B[x 1 ][x 2 ]…[x n ]; End. Algorithm 2: matrix-matrix_addition_G2A begin for = 0 to (-1) do C'[ x ' 1 ][ x ' 2 ] = A'[ x ' 1 ][ x ' 2 ] + B'[ x ' 1 ][ x ' 2 ]; End.

M ATRIX -M ATRIX M ULTIPLICATION Algorithm 3: matrix- matrix_multiplication_TMA_n begin for x 1 = 0 to (l 1 -1) do for x 2 = 0 to (l 2 -1) do for x 3 =0 to (l 3 -1) do …………………… for x n-1 =0 to (l-1) do for x n =0 to (l-1) do for i =0 to (l-1) do C[x 1 ][x 2 ]…[x n-1 ][x n ]= C[x 1 ][x 2 ]…[x n-1 ][x n ] + A[x 1 ][x 2 ]…[x n-1 ][i]×B[x 1 ][x 2 ]…[i][ x n ]; End. Algorithm 4: matrix-matrix_multiplication_G2A begin for = 0 to (-1) do begin m= - for = 0 to (-1) do begin n = - for i =0 to (l-1) do C'[ x ' 1 ][ x ' 2 ] = C'[ x ' 1 ][ x ' 2 ] + A'[ x ' 1 ][n+i] × B'[m+i][ x ‘ 2 ]; end End.

M ATRIX O PERATION ( BLOCK BY BLOCK )

E XPERIMENTAL R ESULT (A DDITION ) Execution time is less for our proposed G2A scheme than TMA. Because the algorithm for TMA has many loops than G2A based algorithm. Hence TMA based algorithm has higher cache miss rate than that of G2A based algorithm.

E XPERIMENTAL R ESULT (M ULTIPLICATION ) Execution time is less for our proposed G2A scheme than TMA. Because the algorithm for TMA has many loops than G2A based algorithm. Hence TMA based algorithm has higher cache miss rate than that of G2A based algorithm.

F UTURE S COPE Efficient Storage Scheme for higher dimensional sparse array Better Memory Management with G2A than TMA Operations on Stored data with G2A Parallelization on operation on G2A operation

Thank you