Skip to content

Commit

Permalink
sequential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ascannel committed Oct 26, 2024
1 parent 622c2e8 commit 534f6eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/seq/lopatin_i_count_words/src/countWordsSeq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ namespace lopatin_i_count_words_seq {
std::vector<char> generateLongString(int n) {
std::vector<char> testData;
std::string testString = "This is a long sentence for performance testing of the word count algorithm using MPI. ";
for (int i = 0; i < n; i++) {
for (int i = 0; i < n - 1; i++) {
for (unsigned long int j = 0; j < testString.length(); j++) {
testData.push_back(testString[j]);
}
}
std::string lastSentence = "This is a long sentence for performance testing of the word count algorithm using MPI.";
for (unsigned long int j = 0; j < lastSentence.length(); j++) {
testData.push_back(lastSentence[j]);
}
return testData;
}

Expand Down

0 comments on commit 534f6eb

Please sign in to comment.