File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments