Partager via


MPSCnnPoolingNode Constructeurs

Définition

Surcharges

MPSCnnPoolingNode(NSObjectFlag)

Constructeur pour appeler des classes dérivées pour ignorer l’initialisation et simplement allouer l’objet.

MPSCnnPoolingNode(IntPtr)

Constructeur utilisé lors de la création de représentations managées d’objets non managés ; Appelé par le runtime.

MPSCnnPoolingNode(MPSNNImageNode, nuint)
MPSCnnPoolingNode(MPSNNImageNode, nuint, nuint)
MPSCnnPoolingNode(MPSNNImageNode, nuint, nuint, nuint, nuint)

MPSCnnPoolingNode(NSObjectFlag)

Constructeur pour appeler des classes dérivées pour ignorer l’initialisation et simplement allouer l’objet.

protected MPSCnnPoolingNode (Foundation.NSObjectFlag t);
new MetalPerformanceShaders.MPSCnnPoolingNode : Foundation.NSObjectFlag -> MetalPerformanceShaders.MPSCnnPoolingNode

Paramètres

t
NSObjectFlag

Valeur sentinelle inutilisée, passez NSObjectFlag.Empty.

Remarques

Ce constructeur doit être appelé par des classes dérivées lorsqu’elles construisent complètement l’objet dans le code managé et veulent simplement que le runtime alloue et initialise le NSObject. Cela est nécessaire pour implémenter le processus d’initialisation en deux étapes utilisé par Objective-C. La première étape consiste à effectuer l’allocation d’objets, la deuxième étape consiste à initialiser l’objet. Lorsque les développeurs appellent le constructeur qui utilise NSObjectFlag.Empty, ils tirent parti d’un chemin d’accès direct qui va jusqu’à NSObject pour simplement allouer la mémoire de l’objet et lier les objets Objective-C et C#. L’initialisation réelle de l’objet incombe au développeur.

Ce constructeur est généralement utilisé par le générateur de liaison pour allouer l’objet, mais empêche l’initialisation réelle de se produire. Une fois l’allocation effectuée, le constructeur doit initialiser l’objet. Avec les constructeurs générés par le générateur de liaison, cela signifie qu’il appelle manuellement l’une des méthodes « init » pour initialiser l’objet.

Il incombe au développeur d’initialiser complètement l’objet s’il est chaîné à l’aide du chemin NSObjectFlag.Empty.

En général, si le constructeur du développeur appelle l’implémentation de base NSObjectFlag.Empty, il doit appeler une méthode init Objective-C. Si ce n’est pas le cas, les développeurs doivent plutôt chaîner au constructeur approprié dans leur classe.

La valeur de l’argument est ignorée et garantit simplement que le seul code exécuté est la phase de construction est l’allocation NSObject de base et l’inscription du type runtime. En règle générale, le chaînage se présente comme suit :

//
// The NSObjectFlag merely allocates the object and registers the
// C# class with the Objective-C runtime if necessary, but no actual
// initXxx method is invoked, that is done later in the constructor
//
// This is taken from Xamarin.iOS's source code:
//
[Export ("initWithFrame:")]
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
{
// Invoke the init method now.
	var initWithFrame = new Selector ("initWithFrame:").Handle;
	if (IsDirectBinding)
		Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSend_CGRect (this.Handle, initWithFrame, frame);
	else
		Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect (this.SuperHandle, initWithFrame, frame);
}

S’applique à

MPSCnnPoolingNode(IntPtr)

Constructeur utilisé lors de la création de représentations managées d’objets non managés ; Appelé par le runtime.

protected internal MPSCnnPoolingNode (IntPtr handle);
new MetalPerformanceShaders.MPSCnnPoolingNode : nativeint -> MetalPerformanceShaders.MPSCnnPoolingNode

Paramètres

handle
IntPtr

nativeint

Pointeur (handle) vers l’objet non managé.

Remarques

Ce constructeur est appelé par l’infrastructure runtime (GetNSObject(IntPtr)) pour créer une représentation managée pour un pointeur vers un objet Objective-C non managé. Les développeurs ne doivent pas appeler cette méthode directement, mais ils doivent appeler la méthode GetNSObject, car cela empêchera deux instances d’un objet managé de pointer vers le même objet natif.

S’applique à

MPSCnnPoolingNode(MPSNNImageNode, nuint)

[Foundation.Export("initWithSource:filterSize:")]
public MPSCnnPoolingNode (MetalPerformanceShaders.MPSNNImageNode sourceNode, nuint size);
new MetalPerformanceShaders.MPSCnnPoolingNode : MetalPerformanceShaders.MPSNNImageNode * nuint -> MetalPerformanceShaders.MPSCnnPoolingNode

Paramètres

sourceNode
MPSNNImageNode
size
System.System.UIntPtr System.unativeint
Attributs

S’applique à

MPSCnnPoolingNode(MPSNNImageNode, nuint, nuint)

[Foundation.Export("initWithSource:filterSize:stride:")]
public MPSCnnPoolingNode (MetalPerformanceShaders.MPSNNImageNode sourceNode, nuint size, nuint stride);
new MetalPerformanceShaders.MPSCnnPoolingNode : MetalPerformanceShaders.MPSNNImageNode * nuint * nuint -> MetalPerformanceShaders.MPSCnnPoolingNode

Paramètres

sourceNode
MPSNNImageNode
size
System.System.UIntPtr System.unativeint
stride
System.System.UIntPtr System.unativeint
Attributs

S’applique à

MPSCnnPoolingNode(MPSNNImageNode, nuint, nuint, nuint, nuint)

[Foundation.Export("initWithSource:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY:")]
public MPSCnnPoolingNode (MetalPerformanceShaders.MPSNNImageNode sourceNode, nuint kernelWidth, nuint kernelHeight, nuint strideInPixelsX, nuint strideInPixelsY);
new MetalPerformanceShaders.MPSCnnPoolingNode : MetalPerformanceShaders.MPSNNImageNode * nuint * nuint * nuint * nuint -> MetalPerformanceShaders.MPSCnnPoolingNode

Paramètres

sourceNode
MPSNNImageNode
kernelWidth
System.System.UIntPtr System.unativeint
kernelHeight
System.System.UIntPtr System.unativeint
strideInPixelsX
System.System.UIntPtr System.unativeint
strideInPixelsY
System.System.UIntPtr System.unativeint
Attributs

S’applique à