Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
84548bf9
Commit
84548bf9
authored
Dec 30, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements
parent
0197fcef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
src/utils/octet.hpp
src/utils/octet.hpp
+34
-1
No files found.
src/utils/octet.hpp
View file @
84548bf9
...
...
@@ -94,6 +94,12 @@ struct octet2
{
return
value
;
}
static
inline
void
SetTo
(
const
octet2
&
v
,
uint8_t
*
buffer
)
{
buffer
[
0
]
=
v
[
0
];
buffer
[
1
]
=
v
[
1
];
}
};
struct
octet3
...
...
@@ -135,6 +141,13 @@ struct octet3
{
return
value
;
}
static
inline
void
SetTo
(
const
octet3
&
v
,
uint8_t
*
buffer
)
{
buffer
[
0
]
=
v
[
0
];
buffer
[
1
]
=
v
[
1
];
buffer
[
2
]
=
v
[
2
];
}
};
struct
octet4
...
...
@@ -191,6 +204,14 @@ struct octet4
{
return
value
==
other
.
value
;
}
static
inline
void
SetTo
(
const
octet4
&
v
,
uint8_t
*
buffer
)
{
buffer
[
0
]
=
v
[
0
];
buffer
[
1
]
=
v
[
1
];
buffer
[
2
]
=
v
[
2
];
buffer
[
3
]
=
v
[
3
];
}
};
struct
octet8
...
...
@@ -212,7 +233,7 @@ struct octet8
}
inline
octet8
(
uint8_t
octet0
,
uint8_t
octet1
,
uint8_t
octet2
,
uint8_t
octet3
,
uint8_t
octet4
,
uint8_t
octet5
,
uint8_t
octet6
,
uint8_t
octet7
)
noexcept
uint8_t
octet6
,
uint8_t
octet7
)
noexcept
:
value
{(
static_cast
<
uint64_t
>
(
octet0
)
<<
56U
)
|
(
static_cast
<
uint64_t
>
(
octet1
)
<<
48U
)
|
((
static_cast
<
uint64_t
>
(
octet2
)
<<
40U
))
|
(
static_cast
<
uint64_t
>
(
octet3
)
<<
32U
)
|
(
static_cast
<
uint64_t
>
(
octet4
)
<<
24U
)
|
(
static_cast
<
uint64_t
>
(
octet5
)
<<
16U
)
|
...
...
@@ -235,6 +256,18 @@ struct octet8
{
return
value
;
}
static
inline
void
SetTo
(
const
octet8
&
v
,
uint8_t
*
buffer
)
{
buffer
[
0
]
=
v
[
0
];
buffer
[
1
]
=
v
[
1
];
buffer
[
2
]
=
v
[
2
];
buffer
[
3
]
=
v
[
3
];
buffer
[
4
]
=
v
[
4
];
buffer
[
5
]
=
v
[
5
];
buffer
[
6
]
=
v
[
6
];
buffer
[
7
]
=
v
[
7
];
}
};
Json
ToJson
(
const
octet
&
v
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment