[−][src]Function concrete_lib::operators::math::tensor::read_in_file_ctorus
pub fn read_in_file_ctorus(tensor: &mut [CTorus], path: &str) -> Result<()>
Reads in a compact way a tensor of CTorus elements inside a file
Arguments
tensor
- CTorus slice (output)path
- string containing the path of the file we read in
Example
use concrete_lib::operators::math::tensor; use concrete_lib::types::CTorus; use num_traits::Zero; // setting let size: usize = 128; // create a tensor let mut tensor: Vec<CTorus> = vec![CTorus::zero(); size]; // reads in a file tensor::read_in_file_ctorus(&mut tensor, "test_read_write_ftorus.txt");