Backends/SiaNet.Backend.Torch/TypeGeneration.cs
/// <summary>
///   Create a new tensor with a specified storage arena.
/// </summary>        
/// <param name="storage">Storage arena.</param>
/// <param name="offset">Offset within the input storage the storage of the new tensor will start from.</param> 
/// <param name="size0">Size of the first dimension.</param>     
/// <param name="stride0">Stride of the first dimension.</param>
/// <param name="size1">Size of the second dimension.</param>     
/// <param name="stride1">Stride of the second dimension.</param>
/// <param name="size2">Size of the third dimension.</param>     
/// <param name="stride2">Stride of the third dimension.</param>
/// <param name="size3">Size of the fourth dimension.</param>     
/// <param name="stride3">Stride of the fourth dimension.</param>
Create a new tensor with a specified storage arena.
Create a new tensor with a specified storage arena .
public ShortTensor NewWithStorage4d(ShortTensor.ShortStorage storage, UIntPtr offset, long size0, long stride0, long size1, long stride1, long size2, long stride2, long size3, long stride3)
        {
            var result =  new ShortTensor(THShortTensor_newWithStorage4d(storage.handle, offset, size0, stride0, size1, stride1, size2, stride2, size3, stride3));
            return result;
        }
public ShortTensor NewWithStorage4d ( ShortTensor . ShortStorage storage , UIntPtr offset , long size0 , long stride0 , long size1 , long stride1 , long size2 , long stride2 , long size3 , long stride3 ) { var result = new ShortTensor ( THShortTensor_newWithStorage4d ( storage . handle , offset , size0 , stride0 , size1 , stride1 , size2 , stride2 , size3 , stride3 ) ) ; return result ; }
Create a new tensor with a specified storage arena.
Create a new tensor with a specified storage arena .
storage
ShortTensor.ShortStorage
None
offset
UIntPtr
Offset within the input storage the storage of the new tensor will start from.
Offset within the input storage the storage of the new tensor will start from .
size0
long
Size of the first dimension.
Size of the first dimension .
stride0
long
Stride of the first dimension.
Stride of the first dimension .
size1
long
Size of the second dimension.
Size of the second dimension .
stride1
long
Stride of the second dimension.
Stride of the second dimension .
size2
long
Size of the third dimension.
Size of the third dimension .
stride2
long
Stride of the third dimension.
Stride of the third dimension .
size3
long
Size of the fourth dimension.
Size of the fourth dimension .
stride3
long
Stride of the fourth dimension.
Stride of the fourth dimension .