Skip to content

Commit 04c4ffd

Browse files
author
Simon Gladman
committed
Add comments to error enums.
1 parent 8175931 commit 04c4ffd

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

stdlib/public/Darwin/Accelerate/vImage_Error.swift

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,72 @@ extension vImage {
2121

2222
/// Error codes returned by vImage operations.
2323
public enum Error: Int, Swift.Error {
24+
/// The vImage function completed without error.
2425
case noError = 0
26+
27+
// The region of interest, as specified by the `srcOffsetToROI_X` and
28+
// `srcOffsetToROI_Y` parameters and the height and width of the destination
29+
// buffer, extends beyond the bottom edge or right edge of the source buffer.
2530
case roiLargerThanInputBuffer = -21766
31+
32+
/// Either the kernel height, the kernel width, or both, are even.
2633
case invalidKernelSize = -21767
34+
35+
/// The edge style specified is invalid.
2736
case invalidEdgeStyle = -21768
37+
38+
/// The `srcOffsetToROI_X` parameter that specifies the left edge of
39+
/// the region of interest is greater than the width of the source image.
2840
case invalidOffset_X = -21769
41+
42+
/// The `srcOffsetToROI_X` parameter that specifies the left edge of
43+
/// the region of interest is greater than the height of the source image.
2944
case invalidOffset_Y = -21770
45+
46+
/// An attempt to allocate memory failed.
3047
case memoryAllocationError = -21771
48+
49+
/// A pointer parameter is NULL and it must not be.
3150
case nullPointerArgument = -21772
51+
52+
/// Invalid parameter.
3253
case invalidParameter = -21773
54+
55+
/// The function requires the source and destination buffers to have
56+
/// the same height and the same width, but they do not.
3357
case bufferSizeMismatch = -21774
58+
59+
/// The flag is not recognized.
3460
case unknownFlagsBit = -21775
61+
62+
/// A serious error occured inside vImage, which prevented vImage
63+
/// from continuing.
3564
case internalError = -21776
65+
66+
/// The vImage_Buffer.rowBytes field is invalid.
3667
case invalidRowBytes = -21777
68+
69+
/// a `vImage_CGImageFormat` or `vImageCVImageFormatRef` contains
70+
/// an invalid format.
3771
case invalidImageFormat = -21778
72+
73+
/// ColorSync.framework is completely missing.
3874
case colorSyncIsAbsent = -21779
75+
76+
/// The source images and destination images may not alias the same image data.
3977
case outOfPlaceOperationRequired = -21780
78+
79+
/// An invalid `CGImageRef` or `CVPixelBufferRef` was passed to the function.
4080
case invalidImageObject = -21781
81+
82+
/// A `vImageCVImageFormatRef` contains an invalid format.
4183
case invalidCVImageFormat = -21782
84+
85+
/// Some lower level conversion APIs only support conversion among a
86+
/// sparse matrix of image formats.
4287
case unsupportedConversion = -21783
88+
89+
/// Core Video is absent.
4390
case coreVideoIsAbsent = -21784
4491

4592
public init(vImageError: vImage_Error) {

0 commit comments

Comments
 (0)