LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-05-2012, 02:31 PM   #1
unkn(0)wn
Member
 
Registered: Aug 2011
Distribution: Slackware 14, Debian 7.0.0 Wheezy, Windows 7, Windows 8
Posts: 116

Rep: Reputation: Disabled
Does calling an element of an array calls the whole array


I am working on code to multiply matrices of higher dimensions eg. 10000x10000.
Code is working, but i want to reduce the time elapsed as much as possible.

So i used Cannon's Matrix Multiplication algorithm, (In this algorithm Matrix is divided into partitions of smaller size, as 5,10,20,100 or whatever we want). I have a doubt that whenever i access any partition(element) of that 2d array, Does the whole row or column of that 2d array is fetched to memory or cpu ? Or only that specific partition(element) is fetched ?

If the whole row or column is fetched. Suggest some ways to fetch only that specific partition(element). Can vectors do that? Or i have to create N smaller 2d matrices (N = number of partitions) and copy data of matrix into smaller matrices.

PS: This seems to be part of Computer Architecture to me.
 
Old 07-05-2012, 06:52 PM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,754

Rep: Reputation: Disabled
It depends on your code.
library: blas?
Usually it should be about distributing tasks to processors.
 
Old 07-05-2012, 08:07 PM   #3
unkn(0)wn
Member
 
Registered: Aug 2011
Distribution: Slackware 14, Debian 7.0.0 Wheezy, Windows 7, Windows 8
Posts: 116

Original Poster
Rep: Reputation: Disabled
Well i am distributing partitions to different Processors. Coding OpenMP.
 
Old 07-06-2012, 07:50 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,888
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Moderator Response

Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Out of bound array element acess Santoshkb Programming 2 01-31-2010 07:27 PM
[perl] copying an array element into another array s0l1dsnak3123 Programming 2 05-17-2008 01:47 AM
Every Element in C++ Array Points to the Same Thing anamericanjoe Programming 5 12-14-2006 08:26 PM
index of an element in the array ? thelonius Programming 1 09-24-2005 12:41 PM
C++ Six Element Array petercool Programming 2 08-20-2003 11:08 AM


All times are GMT -5. The time now is 06:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration