Skip to content
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

refactor!: remove Algorithm::CopyBankRow #27

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/services/Algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ namespace iguana {
return result;
}

void Algorithm::CopyBankRow(bank_ptr srcBank, int srcRow, bank_ptr destBank, int destRow) {
// TODO: check srcBank->getSchema() == destBank.getSchema()
for(int item = 0; item < srcBank->getSchema().getEntries(); item++) {
auto val = srcBank->get(item, srcRow);
destBank->put(item, destRow, val);
}
}

void Algorithm::BlankRow(bank_ptr bank, int row) {
for(int item = 0; item < bank->getSchema().getEntries(); item++) {
bank->put(item, row, 0);
Expand Down
7 changes: 0 additions & 7 deletions src/services/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ namespace iguana {
/// @return the modified `bank_vec_t`
bank_ptr GetBank(bank_vec_t banks, int idx, std::string expectedBankName="");

/// Copy a row from one bank to another, assuming their schemata are equivalent
/// @param srcBank the source bank
/// @param srcRow the row in `srcBank` to copy from
/// @param destBank the destination bank
/// @param destRow the row in `destBank` to copy to
void CopyBankRow(bank_ptr srcBank, int srcRow, bank_ptr destBank, int destRow);

/// Blank a row, setting all items to zero
/// @param bank the bank to modify
/// @param row the row to blank
Expand Down