Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
b
c
d
e
h
i
l
m
n
p
r
s
u
x
Typedefs
b
c
d
e
f
g
i
m
p
r
u
v
Enumerations
Enumerator
a
b
f
g
i
m
n
r
s
u
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
m
n
p
q
r
s
t
u
v
x
Enumerations
a
c
d
e
f
k
l
m
p
r
s
t
v
w
Enumerator
a
b
d
f
g
h
i
l
m
n
o
p
r
s
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
b
c
d
e
f
g
m
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
w
Typedefs
Enumerations
Enumerator
Macros
_
d
f
i
m
n
p
s
t
u
shared
depthai-shared
3rdparty
nanorpc
core
hash.h
Go to the documentation of this file.
1
#ifndef __NANO_RPC_CORE_HASH_H__
2
#define __NANO_RPC_CORE_HASH_H__
3
4
// STD
5
#include <cstdint>
6
#include <string>
7
8
namespace
nanorpc
9
{
10
namespace
core
11
{
12
13
14
inline
type::id
hash_id
(
const
std::string& str) {
15
type::id
h = UINT64_C(1125899906842597);
// prime
16
for
(
const
auto
& c : str) h = 31 * h + c;
// as 'h' is unsigned, both 31 and 'c' are promoted to unsigned
17
return
h;
18
}
19
20
21
}
// namespace core
22
}
// namespace nanorpc
23
24
25
#endif // !__NANO_RPC_CORE_HASH_H__
nanorpc
Definition:
client.h:30
nanorpc::core::hash_id
type::id hash_id(const std::string &str)
Definition:
hash.h:14
nanorpc::core::type::id
std::uint64_t id
Definition:
type.h:27
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19