Example #1
0
 /// <summary>
 ///   Write longs to the file from the given long tensor.
 /// </summary>
 /// <param name="tensor">A tensor containing data to be written to the file.</param>
 /// <returns>The number of longs written.</returns>
 public long WriteTensor(AtenSharp.LongTensor tensor)
 {
     return(THFile_writeLongRaw(this.handle, tensor.Data, tensor.NumElements));
 }
Example #2
0
 /// <summary>
 ///   Read longs from the file into the given long tensor.
 /// </summary>
 /// <param name="tensor">A tensor to place the data in after reading it from the file.</param>
 /// <returns>The number of longs read.</returns>
 public long ReadTensor(AtenSharp.LongTensor tensor)
 {
     return(THFile_readLongRaw(this.handle, tensor.Data, tensor.NumElements));
 }