Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
runningstats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
dataAnalysis
runningstats
Commits
a35b31df
Commit
a35b31df
authored
1 month ago
by
Jakobsen, Mads Bregenholt
Browse files
Options
Downloads
Patches
Plain Diff
adding debugging info
parent
20193d96
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runningstats/runningstats_impl.cpp
+7
-6
7 additions, 6 deletions
src/runningstats/runningstats_impl.cpp
with
7 additions
and
6 deletions
src/runningstats/runningstats_impl.cpp
+
7
−
6
View file @
a35b31df
...
...
@@ -112,12 +112,12 @@ inline bool is_data_aligned_for_simd(const double* incoming_data_ptr, const doub
constexpr
auto
align_val_data
=
stdx
::
memory_alignment_v
<
stdx
::
native_simd
<
double
>>
;
const
bool
data_is_aligned
=
is_aligned
(
incoming_data_ptr
,
align_val_data
);
//
std::cout << "data_is_aligned? " << data_is_aligned << " &data " << incoming_data_ptr << "\n";
std
::
cout
<<
"data_is_aligned? "
<<
data_is_aligned
<<
" &data "
<<
incoming_data_ptr
<<
"
\n
"
;
constexpr
auto
align_val_mem
=
stdx
::
memory_alignment_v
<
stdx
::
native_simd
<
double
>>
;
static_assert
(
align_val_mem
==
stdx
::
memory_alignment_v
<
stdx
::
native_simd
<
std
::
uint64_t
>>
);
const
bool
mem_is_aligned
=
is_aligned
(
running_mean_mem_ptr
,
align_val_mem
);
//
std::cout << "mem_is_aligned? " << mem_is_aligned << " &running_mean_mem_ptr " << running_mean_mem_ptr << "\n";
std
::
cout
<<
"mem_is_aligned? "
<<
mem_is_aligned
<<
" &running_mean_mem_ptr "
<<
running_mean_mem_ptr
<<
"
\n
"
;
return
(
mem_is_aligned
&&
data_is_aligned
);
}
...
...
@@ -132,10 +132,10 @@ void running_stats_simd(
std
::
uint32_t
*
vec_size
)
// of size 1
{
//
if (!is_data_aligned_for_simd(data, running_mean_mem))
//
{
//
std::cout << "ERROR, MEMORY NOT ALIGNED for simd vector_aligned!\n";
//
}
if
(
!
is_data_aligned_for_simd
(
data
,
running_mean_mem
))
{
std
::
cout
<<
"ERROR, MEMORY NOT ALIGNED for simd vector_aligned!
\n
"
;
}
constexpr
auto
align_val_data
=
stdx
::
memory_alignment_v
<
stdx
::
native_simd
<
double
>>
;
constexpr
auto
num_elements_per_data_vec
=
align_val_data
/
sizeof
(
double
);
...
...
@@ -159,6 +159,7 @@ void running_stats_simd(
*
vec_size
=
num_elements_per_data_vec
;
double
*
memory
=
running_mean_mem
;
for
(
std
::
uint32_t
idx
=
0
;
idx
<
data_size
;
idx
+=
num_elements_per_data_vec
)
{
// read values
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment