Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cabana
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
CoPA
Cabana
Merge requests
!1
The source project of this merge request has been removed.
Particle Data Structure
Merged
Particle Data Structure
(removed):particle_api
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Slattery, Stuart
requested to merge
(removed):particle_api
into
master
7 years ago
Overview
0
Pipelines
0
Changes
1
Expand
Creating a general AoSoA data structure with general types.
Edited
7 years ago
by
Slattery, Stuart
0
0
Merge request reports
Viewing commit
7cee5590
Show latest version
1 file
+
9
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
7cee5590
adding struct array size function
· 7cee5590
Slattery, Stuart
authored
7 years ago
packages/Core/src/Cabana_AoSoA.hpp
+
9
−
0
Options
@@ -223,6 +223,15 @@ class AoSoA
// -------------------------------
// Raw array data access
// Get the size of the data array at a given struct member index.
template
<
std
::
size_t
I
>
CABANA_INLINE_FUNCTION
std
::
size_t
arraySize
(
const
std
::
size_t
s
)
{
return
(
s
<
_num_soa
-
1
)
?
soa_array_size
:
(
_size
%
soa_array_size
);
}
// Access the data array at a given struct member index.
template
<
std
::
size_t
I
>
CABANA_INLINE_FUNCTION
Loading