Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
bfb73dff
Commit
bfb73dff
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm obsolete casts
parent
29814c93
No related branches found
No related tags found
1 merge request
!232
Cleanup in context of Simulation, Computation; *Element now inherits from IElement
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Core/Simulation/ISimulation.cpp
+2
-2
2 additions, 2 deletions
Core/Simulation/ISimulation.cpp
with
2 additions
and
2 deletions
Core/Simulation/ISimulation.cpp
+
2
−
2
View file @
bfb73dff
...
@@ -37,7 +37,7 @@ size_t getIndexStep(size_t total_size, size_t n_handlers)
...
@@ -37,7 +37,7 @@ size_t getIndexStep(size_t total_size, size_t n_handlers)
size_t
getStartIndex
(
size_t
n_handlers
,
size_t
current_handler
,
size_t
n_elements
)
size_t
getStartIndex
(
size_t
n_handlers
,
size_t
current_handler
,
size_t
n_elements
)
{
{
const
size_t
handler_size
=
getIndexStep
(
n_elements
,
static_cast
<
size_t
>
(
n_handlers
)
)
;
const
size_t
handler_size
=
getIndexStep
(
n_elements
,
n_handlers
);
const
size_t
start_index
=
current_handler
*
handler_size
;
const
size_t
start_index
=
current_handler
*
handler_size
;
if
(
start_index
>=
n_elements
)
if
(
start_index
>=
n_elements
)
return
n_elements
;
return
n_elements
;
...
@@ -46,7 +46,7 @@ size_t getStartIndex(size_t n_handlers, size_t current_handler, size_t n_element
...
@@ -46,7 +46,7 @@ size_t getStartIndex(size_t n_handlers, size_t current_handler, size_t n_element
size_t
batchSize
(
size_t
n_handlers
,
size_t
current_handler
,
size_t
n_elements
)
size_t
batchSize
(
size_t
n_handlers
,
size_t
current_handler
,
size_t
n_elements
)
{
{
const
size_t
handler_size
=
getIndexStep
(
n_elements
,
static_cast
<
size_t
>
(
n_handlers
)
)
;
const
size_t
handler_size
=
getIndexStep
(
n_elements
,
n_handlers
);
const
size_t
start_index
=
current_handler
*
handler_size
;
const
size_t
start_index
=
current_handler
*
handler_size
;
if
(
start_index
>=
n_elements
)
if
(
start_index
>=
n_elements
)
return
0
;
return
0
;
...
...
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