Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Computing
cbmroot
Merge requests
!941
L1 [bugfix]: reimplemented serialization of SIMD vectors
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
L1 [bugfix]: reimplemented serialization of SIMD vectors
s.zharko/cbmroot:L1Algo-dev12
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Sergei Zharko
requested to merge
s.zharko/cbmroot:L1Algo-dev12
into
master
2 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
In this MR a serialization of fvec objects was modified:
The save and load routines were override to avoid usage of reinterpret_cast on a fvec object for accessing its elements;
Only the first scalar of vector is serialized, the loaded vector will consist from the same elements equal to this scalar
0
0
Merge request reports
Compare
master
version 1
d563b22b
2 years ago
master (base)
and
latest version
latest version
3f37ad42
1 commit,
2 years ago
version 1
d563b22b
1 commit,
2 years ago
1 file
+
20
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
reco/L1/L1Algo/L1SimdSerializer.h
+
20
−
3
Options
@@ -11,20 +11,37 @@
#define L1SimdSerializer_h 1
#include
<boost/serialization/access.hpp>
#include
<boost/serialization/split_free.hpp>
#include
"vectors/L1vec.h"
/// This header defines functionality for saving and loading SIMDized vectors. At the moment, only the first element of
/// the vector can be saved, and the loaded vector will be horizontally equal.
///
namespace
boost
{
namespace
serialization
{
template
<
class
Archive
>
void
serialize
(
Archive
&
ar
,
fvec
&
vect
,
const
unsigned
int
)
void
save
(
Archive
&
ar
,
const
fvec
&
vect
,
unsigned
int
)
{
ar
<<
vect
[
0
];
}
template
<
class
Archive
>
void
load
(
Archive
&
ar
,
fvec
&
vect
,
unsigned
int
)
{
fscal
buffer
;
ar
>>
buffer
;
for
(
size_t
i
=
0
;
i
<
fvec
::
size
();
++
i
)
{
ar
&
(
reinterpret_cast
<
fscal
*>
(
&
vect
))
[
i
];
vect
[
i
]
=
buffer
;
}
}
template
<
class
Archive
>
void
serialize
(
Archive
&
ar
,
fvec
&
vect
,
const
unsigned
int
version
)
{
split_free
(
ar
,
vect
,
version
);
}
}
// namespace serialization
}
// namespace boost
Loading