示例#1
0
        public void CreateLike(Mat mat, VkAllocator allocator)
        {
            if (mat == null)
            {
                throw new ArgumentNullException(nameof(mat));
            }
            if (allocator == null)
            {
                throw new ArgumentNullException(nameof(allocator));
            }

            this.ThrowIfDisposed();
            mat.ThrowIfDisposed();
            allocator.ThrowIfDisposed();

            var error = NativeMethods.mat_VkMat_create_like_mat(this.NativePtr,
                                                                mat.NativePtr,
                                                                allocator.NativePtr);

            if (error != NativeMethods.ErrorType.OK)
            {
                throw new NcnnException("Unknown Exception");
            }
        }