Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
154
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Merge requests
!24219
CxxUtils: Add templated versions of the get_unaligned functions.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
CxxUtils: Add templated versions of the get_unaligned functions.
ssnyder/athena:unaligned2.CxxUtils-20190615
into
master
Overview
2
Commits
1
Pipelines
1
Changes
2
Merged
Scott Snyder
requested to merge
ssnyder/athena:unaligned2.CxxUtils-20190615
into
master
5 years ago
Overview
2
Commits
1
Pipelines
1
Changes
2
Expand
Allows using get_unaligned from template code.
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
4efd9c91
1 commit,
5 years ago
2 files
+
118
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Control/CxxUtils/CxxUtils/get_unaligned.h
+
87
−
0
Options
@@ -147,6 +147,93 @@ double get_unaligned_double (const uint8_t* ATH_RESTRICT & p)
}
/// Define templated versions of the above functions.
template
<
class
T
>
T
get_unaligned
(
const
uint8_t
*
ATH_RESTRICT
&
p
);
template
<
>
inline
uint8_t
get_unaligned
<
uint8_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
*
p
++
;
}
template
<
>
inline
uint16_t
get_unaligned
<
uint16_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned16
(
p
);
}
template
<
>
inline
uint32_t
get_unaligned
<
uint32_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned32
(
p
);
}
template
<
>
inline
uint64_t
get_unaligned
<
uint64_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned64
(
p
);
}
template
<
>
inline
float
get_unaligned
<
float
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned_float
(
p
);
}
template
<
>
inline
double
get_unaligned
<
double
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned_double
(
p
);
}
template
<
>
inline
int8_t
get_unaligned
<
int8_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned
<
uint8_t
>
(
p
);
}
template
<
>
inline
int16_t
get_unaligned
<
int16_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned
<
uint16_t
>
(
p
);
}
template
<
>
inline
int32_t
get_unaligned
<
int32_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned
<
uint32_t
>
(
p
);
}
template
<
>
inline
int64_t
get_unaligned
<
int64_t
>
(
const
uint8_t
*
ATH_RESTRICT
&
p
)
{
return
get_unaligned
<
uint64_t
>
(
p
);
}
}
// namespace CxxUtils
Loading