Skip to content

Commit

Permalink
Added a getNumBytesToRead() method to FileReadAction
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Oct 4, 2023
1 parent d3af2c2 commit 9b954d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/wrench/action/FileReadAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace wrench {
std::shared_ptr<DataFile> getFile() const;
std::vector<std::shared_ptr<FileLocation>> getFileLocations() const;
std::shared_ptr<FileLocation> getUsedFileLocation() const;
double getNumBytesToRead() const;
bool usesScratch() const override;

protected:
Expand Down
8 changes: 8 additions & 0 deletions src/wrench/action/FileReadAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ namespace wrench {
return this->used_location;
}

/**
* @brief Return the number of bytes to read by this action
* @return A number of bytes
*/
double FileReadAction::getNumBytesToRead() const {
return this->num_bytes_to_read;
}

/**
* @brief Determine whether the action uses scratch
* @return true if the action uses scratch, false otherwise
Expand Down

0 comments on commit 9b954d5

Please sign in to comment.