Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
18
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
cellframe
cellframe-sdk
Commits
5ea6c960
Commit
5ea6c960
authored
3 years ago
by
Anton Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
corrected sums with unit test
parent
fb5099ec
No related branches found
Branches containing commit
No related tags found
1 merge request
!419
Feature 5220
Pipeline
#7617
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap-sdk/core/include/dap_math_ops.h
+17
-1
17 additions, 1 deletion
dap-sdk/core/include/dap_math_ops.h
with
17 additions
and
1 deletion
dap-sdk/core/include/dap_math_ops.h
+
17
−
1
View file @
5ea6c960
#pragma once
#include
<stdint.h>
#include
"dap_common.h"
#include <boost/multiprecision/cpp_int.hpp>
#include
"dap_common.h"
#include
<boost/multiprecision/cpp_int.hpp>
#include
<stdint.h>
#include
<stdio.h>
#include
<stdlib.h>
...
...
@@ -87,7 +88,22 @@ static inline int SUM_256_256(unsign256_t a_256_bit,unsign256_t b_256_bit,unsig
return
overflow_flag
;}
static
inline
bool
dap_unsign128_t_check_equal
(
unsign128_t
a_128_bit
,
unsign128_t
b_128_bit
)
{
#ifdef DAP_GLOBAL_IS_INT128
return
a_128_bit
==
b_128_bit
;
#else
return
a_128_bit
.
lo
==
b_128_bit
.
lo
&&
a_128_bit
.
hi
==
b_128_bit
;
#endif
}
static
inline
bool
dap_unsign256_t_check_equal
(
unsign256_t
a_256_bit
,
unsign256_t
b_256_bit
)
{
return
a_256_bit
.
lo
.
lo
==
b_256_bit
.
lo
.
lo
&&
a_256_bit
.
lo
.
hi
==
b_256_bit
.
lo
.
hi
&&
a_256_bit
.
hi
.
lo
==
b_256_bit
.
hi
.
lo
&&
a_256_bit
.
hi
.
hi
==
b_256_bit
.
hi
.
hi
;
}
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