-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiply sparse matrices #132
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
46a0501
started a branch for multiplying sparse matrices against vectors.
rhl- ecab33b
added values removed MultiplyCSR.
rhl- 114ea14
implemented multiply for graphs and distgraphs.
rhl- e08607b
implemented multiply for graphs and distgraphs.
rhl- babba77
fixed this.
rhl- 8e04d35
compiles finally.
rhl- 70c8108
Merge branch 'master' into multiply_sparse_matrices
rhl- 83812d9
Merge branch 'multiply_sparse_matrices' of github.com:rhl-/Elemental …
rhl- c78c650
Merge branch 'master' into multiply_sparse_matrices
rhl- 2dbc810
I believe things will now compile.
rhl- 17ef6b6
Merge branch 'master' of git://github.com/elemental/Elemental into mu…
rhl- 8b85694
towards multiplying sparse matrices
rhl- b18c7e5
towards multiplying sparse matrices
rhl- 418f3b6
Merge branch 'master' of git://github.com/elemental/Elemental into mu…
rhl- dbb84c8
temporarily disabling one new function as I cant figure out macro sys…
rhl- e07bcdb
Merge branch 'master' of git://github.com/elemental/Elemental into mu…
rhl- 8cd5636
merged in jacks changes. need to figure out whats wrong with template…
rhl- 9842229
hm still broken.
rhl- a43cb33
put back multivec.
rhl- edfda9e
trying to get unit test compiling.
rhl- adf8f2c
added a basic unit test.
rhl- 32571ce
fixed introduced bug Y not x.
rhl- c762c2a
addresses review.
rhl- 04e78df
fixed errors.
rhl- 2f6048e
address review.
rhl- 0a15f61
Odd that I missed a multMeta.
rhl- 1a83151
fix Get v GetLocal weirdness.
rhl- a1e8579
fix Get v GetLocal weirdness.
rhl- 2ead9d5
Addresses review.
rhl- File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,44 +11,8 @@ | |
#ifndef EL_CORE_DISTSPARSEMATRIX_DECL_HPP | ||
#define EL_CORE_DISTSPARSEMATRIX_DECL_HPP | ||
|
||
namespace El { | ||
namespace El { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the extra single space? |
||
|
||
struct DistSparseMultMeta | ||
{ | ||
bool ready; | ||
// NOTE: The 'send' and 'recv' roles reverse for adjoint multiplication | ||
Int numRecvInds; | ||
vector<int> sendSizes, sendOffs, | ||
recvSizes, recvOffs; | ||
vector<Int> sendInds, colOffs; | ||
|
||
DistSparseMultMeta() : ready(false), numRecvInds(0) { } | ||
|
||
void Clear() | ||
{ | ||
ready = false; | ||
numRecvInds = 0; | ||
SwapClear( sendSizes ); | ||
SwapClear( recvSizes ); | ||
SwapClear( sendOffs ); | ||
SwapClear( recvOffs ); | ||
SwapClear( sendInds ); | ||
SwapClear( colOffs ); | ||
} | ||
|
||
const DistSparseMultMeta& operator=( const DistSparseMultMeta& meta ) | ||
{ | ||
ready = meta.ready; | ||
numRecvInds = meta.numRecvInds; | ||
sendSizes = meta.sendSizes; | ||
sendOffs = meta.sendOffs; | ||
recvSizes = meta.recvSizes; | ||
recvOffs = meta.recvOffs; | ||
sendInds = meta.sendInds; | ||
colOffs = meta.colOffs; | ||
return *this; | ||
} | ||
}; | ||
|
||
// Use a simple 1d distribution where each process owns a fixed number of rows, | ||
// if last process, height - (commSize-1)*floor(height/commSize) | ||
|
@@ -194,8 +158,7 @@ class DistSparseMatrix | |
// total number of nonzeros divided by the number of processes | ||
double Imbalance() const EL_NO_RELEASE_EXCEPT; | ||
|
||
mutable DistSparseMultMeta multMeta; | ||
DistSparseMultMeta InitializeMultMeta() const; | ||
DistGraphMultMeta InitializeMultMeta() const; | ||
|
||
void MappedSources | ||
( const DistMap& reordering, vector<Int>& mappedSources ) const; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because a few lines early we issue:
B.distGraph_ = A.distGraph_;
which assigns the multMeta objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, agreed.