include_logical_kernels.h#
-
namespace onnx_light
Alias that makes onnx-light headers compatible with code that references
ONNX_LIGHT_NAMESPACE(the macro used in the standard onnx package).Set to
ONNX_LIGHT_NAMESPACEso both names resolve to the same namespace.Symbol-visibility attribute for the public onnx-light C++ API.
Defined as empty because onnx-light does not require explicit
__declspec(dllexport)or__attribute__((visibility("default")))annotations — visibility is controlled at the shared-library level. The macro is provided so that vendored ONNX headers that decorate their declarations withONNX_APIcompile without modification.Namespace alias so that ONNX C++ code (and consumers such as onnxruntime) that refers to the literal
onnxnamespace — rather than theONNX_NAMESPACEmacro — resolves to the onnx-light namespace. The standard onnx package lives innamespace onnx; onnx-light usesonnx_light(via ONNX_LIGHT_NAMESPACE), so this alias keeps onnx-light a true drop-in. It is only introduced when the onnx-light namespace differs fromonnx.-
namespace onnx_kernels
-
namespace kernel
-
class And : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise logical AND on BOOL tensors with multidirectional broadcasting.
Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class BitShift : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
BitShifton unsigned integer tensors (opset 11). Both inputs must share the same dtype (UINT8, UINT16, UINT32 or UINT64); the output has the same dtype. Multidirectional (Numpy-style) broadcasting is supported. The requireddirectionattribute selects"LEFT"or"RIGHT"and is passed tooperator(). Mirrors the upstreamnp.left_shift/np.right_shiftreference implementations.Public Types
Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class BitwiseAnd : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise bitwise AND on integer tensors with multidirectional broadcasting (opset 18). Inputs may be INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output has the same dtype. Mirrors the upstream ONNX
BitwiseAndreference implementation (np.bitwise_and).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class BitwiseNot : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise bitwise NOT on integer tensors (opset 18). Input may be INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64; the output has the same dtype and shape. Mirrors the upstream ONNX
BitwiseNotreference implementation (np.bitwise_not).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class BitwiseOr : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise bitwise OR on integer tensors with multidirectional broadcasting (opset 18). Inputs may be INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output has the same dtype. Mirrors the upstream ONNX
BitwiseOrreference implementation (np.bitwise_or).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class BitwiseXor : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise bitwise XOR on integer tensors with multidirectional broadcasting (opset 18). Inputs may be INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output has the same dtype. Mirrors the upstream ONNX
BitwiseXorreference implementation (np.bitwise_xor).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Equal : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
Equalcomparison with multidirectional broadcasting. Inputs may be BOOL, FLOAT, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64 or STRING (both inputs must share the same dtype); the output is BOOL (one byte per element,0or1). Mirrors the upstream ONNXEqualreference implementation (np.equal). STRING support matches theEqualopset 19 type expansion and is restricted to equal-shape inputs or scalar broadcasting.Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Greater : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
Greatercomparison with multidirectional broadcasting. Inputs may be FLOAT, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output is BOOL (one byte per element,0or1). Mirrors the upstream ONNXGreaterreference implementation (np.greater).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class GreaterOrEqual : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
GreaterOrEqualcomparison with multidirectional broadcasting. Inputs may be FLOAT, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output is BOOL (one byte per element,0or1). Mirrors the upstream ONNXGreaterOrEqualreference implementation (np.greater_equal).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class IsInf : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
IsInf: returns a BOOL tensor with the same shape as the input, where each element istrueiff the corresponding input value is +/- infinity. The two boolean attributesdetect_positiveanddetect_negative(both default to 1) toggle whether +inf and -inf are reported respectively. Mirrors the upstream ONNXIsInfreference implementation (np.isinf/np.isposinf/np.isneginf). Only the FLOAT input dtype is supported.Public Functions
-
void operator()(const Tensor &x, int64_t detect_positive, int64_t detect_negative, Tensor &output) const#
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
Input is FLOAT (4 bytes/elt) and output is BOOL (1 byte/elt), so the output buffer cannot alias the input buffer.
-
void operator()(const Tensor &x, int64_t detect_positive, int64_t detect_negative, Tensor &output) const#
-
class IsNaN : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
IsNaN: returns a BOOL tensor with the same shape as the input, where each element istrueiff the corresponding input value is NaN. Mirrors the upstream ONNXIsNaNreference implementation (np.isnan). Supports FLOAT, DOUBLE, FLOAT16 and BFLOAT16 inputs.Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
Input is FLOAT (4 bytes/elt) and output is BOOL (1 byte/elt), so the output buffer cannot alias the input buffer.
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Less : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
Lesscomparison with multidirectional broadcasting. Inputs may be FLOAT, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output is BOOL (one byte per element,0or1). Mirrors the upstream ONNXLessreference implementation (np.less).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class LessOrEqual : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
LessOrEqualcomparison with multidirectional broadcasting. Inputs may be FLOAT, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32 or UINT64 (both inputs must share the same dtype); the output is BOOL (one byte per element,0or1). Mirrors the upstream ONNXLessOrEqualreference implementation (np.less_equal).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Not : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise logical NOT on a BOOL tensor (opset 1). The output has the same BOOL dtype and shape as the input. Mirrors the upstream ONNX
Notreference implementation (np.logical_not).Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Or : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise logical OR on BOOL tensors with multidirectional broadcasting.
Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Where : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise
Whereselection with multidirectional broadcasting.conditionmust be BOOL;xandymust share the same dtype and may be BOOL, FLOAT, DOUBLE, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64 or STRING. Output dtype equalsx/ydtype.Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class Xor : public onnx_light::onnx_kernels::kernel::KernelBase#
- #include <include_logical_kernels.h>
Element-wise logical XOR on BOOL tensors with multidirectional broadcasting.
Public Functions
-
inline explicit KernelBase(const KernelContext &ctx)#
Public Static Functions
-
static inline constexpr bool CanRunInPlace() noexcept#
-
inline explicit KernelBase(const KernelContext &ctx)#
-
class And : public onnx_light::onnx_kernels::kernel::KernelBase#
-
namespace kernel
-
namespace onnx_kernels