Intel HEXL
Intel Homomorphic Encryption Acceleration Library, accelerating the modular arithmetic operations used in homomorphic encryption.
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
e
g
i
l
m
n
p
r
s
+
Functions
a
b
c
e
g
i
l
m
n
p
r
s
Variables
Typedefs
Enumerations
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
g
m
n
o
s
v
~
+
Functions
a
b
c
d
g
m
n
o
~
Variables
Typedefs
Related Functions
+
Files
File List
+
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
hexl
include
hexl
util
util.hpp
Go to the documentation of this file.
1
// Copyright (C) 2020-2021 Intel Corporation
2
// SPDX-License-Identifier: Apache-2.0
3
4
#pragma once
5
6
#include <cstddef>
7
8
namespace
intel
{
9
namespace
hexl {
10
11
#undef TRUE // MSVC defines TRUE
12
#undef FALSE // MSVC defines FALSE
13
16
enum class
CMPINT
{
17
EQ
= 0,
18
LT
= 1,
19
LE
= 2,
20
FALSE
= 3,
21
NE
= 4,
22
NLT
= 5,
23
NLE
= 6,
24
TRUE
= 7
25
};
26
29
inline
CMPINT
Not
(
CMPINT
cmp) {
30
switch
(cmp) {
31
case
CMPINT::EQ
:
32
return
CMPINT::NE
;
33
case
CMPINT::LT
:
34
return
CMPINT::NLT
;
35
case
CMPINT::LE
:
36
return
CMPINT::NLE
;
37
case
CMPINT::FALSE
:
38
return
CMPINT::TRUE
;
39
case
CMPINT::NE
:
40
return
CMPINT::EQ
;
41
case
CMPINT::NLT
:
42
return
CMPINT::LT
;
43
case
CMPINT::NLE
:
44
return
CMPINT::LE
;
45
case
CMPINT::TRUE
:
46
return
CMPINT::FALSE
;
47
default
:
48
return
CMPINT::FALSE
;
49
}
50
}
51
52
}
// namespace hexl
53
}
// namespace intel
intel::hexl::CMPINT::LT
Less than.
intel::hexl::CMPINT::NLT
Not less than.
intel::hexl::CMPINT::EQ
Equal.
intel::hexl::CMPINT
CMPINT
Represents binary operations between two boolean values.
Definition:
util.hpp:16
intel::hexl::Not
CMPINT Not(CMPINT cmp)
Returns the logical negation of a binary operation.
Definition:
util.hpp:29
intel::hexl::CMPINT::FALSE
False.
intel
Definition:
eltwise-add-mod.hpp:8
intel::hexl::CMPINT::TRUE
True.
intel::hexl::CMPINT::NE
Not equal.
intel::hexl::CMPINT::NLE
Not less than or equal.
intel::hexl::CMPINT::LE
Less than or equal.
Generated by
1.8.13