Skip to content

Commit 67ccce9

Browse files
committed
api docs for saveToFile and parseFromFile
1 parent 4196653 commit 67ccce9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

include/tensor.cuh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ public:
257257
*
258258
* This static function reads data from a text file, creates a DTensor and uploads the data to the device.
259259
*
260+
* The data may be stored in a text file or a binary file. Binary files must have the extension .bt.
261+
*
260262
* @param path_to_file path to file as string
261263
* @param mode storage mode (default: StorageMode::defaultMajor)
262264
* @return instance of DTensor
@@ -506,7 +508,12 @@ public:
506508
/**
507509
* Saves the current instance of DTensor to a (text) file
508510
*
509-
* @param pathToFile
511+
* If the file extension is .bt, the data will be stored in a binary file.
512+
* Writing to and reading from a binary file is significantly faster and
513+
* the generated binary files tend to have a smaller size (about 40% of the
514+
* size of text files for data of type double and float).
515+
*
516+
* @param pathToFile path to file
510517
*/
511518
void saveToFile(std::string pathToFile);
512519

0 commit comments

Comments
 (0)