MU Library
vector_error.hpp
Go to the documentation of this file.
1 // SPDX-License-Identifier: Apache-2.0
2 // Copyright 2024 XCENA Inc.
3 
4 #pragma once
5 #include <cstdint>
6 namespace mu
7 {
8 namespace vector
9 {
10 
17 class VdmaError
18 {
19 public:
20  VdmaError() = default;
21  ~VdmaError() = default;
22 
30  bool isSuccessful() const;
31 
39  bool isUnderflowed() const;
40 
48  bool isOverflowed() const;
49 
57  bool isNan() const;
58 
66  bool isOutOfRange() const;
67 
75  bool isInvalidAddress() const;
76 
84  bool isInvalidOperation() const;
85 
93  bool isDeprecated() const;
94 
102  bool isNotSupported() const;
103 
113 
114 private:
115  uint64_t errorBitmap_ = 0;
116 };
117 } // namespace vector
118 } // namespace mu
The VdmaError class represents an error that can occur during vector operations.
VdmaError & clear()
bool isOutOfRange() const
Check if the vector function received an out-of-range index parameter.
bool isOverflowed() const
Check if the vector function has encountered at least one overflow error.
VdmaError & setOutOfRange()
VdmaError & setNan()
VdmaError & setUnderflowed()
bool isNotSupported() const
Check if the vector operation is not supported.
bool isInvalidOperation() const
Check if the vector operation was invalid.
VdmaError & setInvalidOperation()
VdmaError & setNotSupported()
VdmaError & setDeprecated()
bool isSuccessful() const
Check if the vector operation was successful.
VdmaError & setInvalidAddress()
bool isInvalidAddress() const
Check if the vector function input parameter has some invalid addresses.
bool isDeprecated() const
Check if the vector operation is deprecated.
bool isNan() const
Check if the vector function has encountered at least one NaN error.
bool isUnderflowed() const
Check if the vector function has encountered at least one underflow error.
VdmaError & setOverflowed()
Definition: assert.hpp:9