forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNDArray.CopyTo.cs
More file actions
44 lines (37 loc) · 1.73 KB
/
NDArray.CopyTo.cs
File metadata and controls
44 lines (37 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using NumSharp.Backends.Unmanaged;
namespace NumSharp
{
public partial class NDArray
{
/// <summary>
/// Copies the entire contents of this storage to given address (using <see cref="Count"/>).
/// </summary>
/// <param name="slice">The slice to copy to.</param>
public void CopyTo(IMemoryBlock slice) => Storage.CopyTo(slice);
/// <summary>
/// Copies the entire contents of this storage to given address (using <see cref="Count"/>).
/// </summary>
/// <param name="address">The address to copy to.</param>
public unsafe void CopyTo(void* address) => Storage.CopyTo(address);
/// <summary>
/// Copies the entire contents of this storage to given array.
/// </summary>
/// <param name="array">The array to copy to.</param>
public void CopyTo<T>(T[] array) where T : unmanaged => Storage.CopyTo<T>(array);
/// <summary>
/// Copies the entire contents of this storage to given address.
/// </summary>
public void CopyTo(IntPtr ptr) => Storage.CopyTo(ptr);
/// <summary>
/// Copies the entire contents of this storage to given address (using <see cref="Count"/>).
/// </summary>
/// <param name="block">The slice to copy to.</param>
public unsafe void CopyTo<T>(IMemoryBlock<T> block) where T : unmanaged => Storage.CopyTo<T>(block);
/// <summary>
/// Copies the entire contents of this storage to given address.
/// </summary>
/// <param name="address">The address to copy to.</param>
public unsafe void CopyTo<T>(T* address) where T : unmanaged => Storage.CopyTo<T>(address);
}
}