IReadOnlyTensor<TSelf,T>.TryGetSpan Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| TryGetSpan(ReadOnlySpan<NIndex>, Int32, ReadOnlySpan<T>) |
Tente de retourner une étendue qui commence à l’index spécifié et contient le nombre spécifié d’éléments. |
| TryGetSpan(ReadOnlySpan<IntPtr>, Int32, ReadOnlySpan<T>) |
Tente de retourner une étendue qui commence à l’index spécifié et contient le nombre spécifié d’éléments. |
TryGetSpan(ReadOnlySpan<NIndex>, Int32, ReadOnlySpan<T>)
- Source:
- IReadOnlyTensor_1.cs
- Source:
- IReadOnlyTensor_1.cs
Tente de retourner une étendue qui commence à l’index spécifié et contient le nombre spécifié d’éléments.
public:
bool TryGetSpan(ReadOnlySpan<System::Buffers::NIndex> startIndexes, int length, [Runtime::InteropServices::Out] ReadOnlySpan<T> % span);
public bool TryGetSpan(scoped ReadOnlySpan<System.Buffers.NIndex> startIndexes, int length, out ReadOnlySpan<T> span);
abstract member TryGetSpan : ReadOnlySpan<System.Buffers.NIndex> * int * ReadOnlySpan -> bool
Public Function TryGetSpan (startIndexes As ReadOnlySpan(Of NIndex), length As Integer, ByRef span As ReadOnlySpan(Of T)) As Boolean
Paramètres
- startIndexes
- ReadOnlySpan<NIndex>
Index auquel l’étendue doit démarrer.
- length
- Int32
Longueur souhaitée de l’étendue à récupérer.
- span
- ReadOnlySpan<T>
En cas de retour réussi, une étendue qui se compose d’éléments length du tenseur actuel à startIndexespartir de .
Retours
true si une étendue a été récupérée avec succès ; sinon, false ce qui indique qu’il length n’était pas valide.
S’applique à
TryGetSpan(ReadOnlySpan<IntPtr>, Int32, ReadOnlySpan<T>)
- Source:
- IReadOnlyTensor_1.cs
- Source:
- IReadOnlyTensor_1.cs
Tente de retourner une étendue qui commence à l’index spécifié et contient le nombre spécifié d’éléments.
public:
bool TryGetSpan(ReadOnlySpan<IntPtr> startIndexes, int length, [Runtime::InteropServices::Out] ReadOnlySpan<T> % span);
public bool TryGetSpan(scoped ReadOnlySpan<IntPtr> startIndexes, int length, out ReadOnlySpan<T> span);
abstract member TryGetSpan : ReadOnlySpan<nativeint> * int * ReadOnlySpan -> bool
Public Function TryGetSpan (startIndexes As ReadOnlySpan(Of IntPtr), length As Integer, ByRef span As ReadOnlySpan(Of T)) As Boolean
Paramètres
- startIndexes
-
ReadOnlySpan<nativeint>
Index auquel l’étendue doit démarrer.
- length
- Int32
Longueur souhaitée de l’étendue à récupérer.
- span
- ReadOnlySpan<T>
En cas de retour réussi, une étendue qui se compose d’éléments length du tenseur actuel à startIndexespartir de .
Retours
true si une étendue a été récupérée avec succès ; sinon, false ce qui indique qu’il length n’était pas valide.
Exceptions
startIndexes ne contient pas d’éléments Rank .
startIndexes n’est pas un index valide dans le capteur.