SlimMPSCnnFullyConnected (IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, IntPtr kernelWeights, IntPtr biasTerms, MPSCnnConvolutionFlags flags) : base (NSObjectFlag.Empty) { var sel = "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:"; var selector = Selector.GetHandle (sel); InitializeHandle (IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_UInt64 (Handle, selector, device.Handle, convolutionDescriptor.Handle, kernelWeights, biasTerms, (ulong)flags), sel); }
public MPSCnnFullyConnected(IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, float[] kernelWeights, float[] biasTerms, MPSCnnConvolutionFlags flags) : base(NSObjectFlag.Empty) { if (kernelWeights == null) { throw new ArgumentNullException(nameof(kernelWeights)); } unsafe { fixed(float *kernelWeightsptr = kernelWeights) fixed(float *biasTermsptr = biasTerms) InitializeHandle(InitWithDevice(device, convolutionDescriptor, (IntPtr)kernelWeightsptr, (IntPtr)biasTermsptr, flags), "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:"); } }
public MPSCnnFullyConnected(IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, float[] kernelWeights, float[] biasTerms, MPSCnnConvolutionFlags flags) : this(device, convolutionDescriptor, MPSKernel.GetPtr(kernelWeights, true), MPSKernel.GetPtr(biasTerms, false), flags) { }
SlimMPSCnnFullyConnected(IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, IntPtr kernelWeights, IntPtr biasTerms, MPSCnnConvolutionFlags flags) : base(NSObjectFlag.Empty) { var sel = "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:"; var selector = Selector.GetHandle(sel); InitializeHandle(IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_UInt64(Handle, selector, device.Handle, convolutionDescriptor.Handle, kernelWeights, biasTerms, (ulong)flags), sel); }