Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
2c5b48f9
Commit
2c5b48f9
authored
Sep 12, 2014
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update c kernel to compile on bsd
parent
33bfb23b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
Addons/CKernelApi/Src/CKernelApi.h
Addons/CKernelApi/Src/CKernelApi.h
+5
-13
Addons/CKernelApi/Src/ScalfmmCKernelApiCore.cpp
Addons/CKernelApi/Src/ScalfmmCKernelApiCore.cpp
+14
-0
No files found.
Addons/CKernelApi/Src/CKernelApi.h
View file @
2c5b48f9
...
...
@@ -91,20 +91,12 @@ void Scalfmm_execute_kernel(Scalfmm_Handle handle, struct Scalfmm_Kernel_Descrip
///////////////////////////////////////////////////////////////////////////
//< This function fill the childFullPosition[3] with [0;1] to know the position of a child relatively to
//< its position from its parent
inline
void
Scalfmm_utils_parentChildPosition
(
int
childPosition
,
int
*
childFullPosition
){
childFullPosition
[
2
]
=
(
childPosition
%
2
?
1
:
-
1
);
childFullPosition
[
1
]
=
((
childPosition
/
2
)
%
2
?
1
:
-
1
);
childFullPosition
[
0
]
=
((
childPosition
/
4
)
%
2
?
1
:
-
1
);
}
//< This function fill the childFullPosition[3] with [-1;1] to know the position of a child relatively to
//< its position from its parent in term of halph box for this level
void
Scalfmm_utils_parentChildPosition
(
int
childPosition
,
int
*
childFullPosition
);
//< This function fill the childFullPosition[3] with [-3;3] to know the position of a interaction
//< cell relatively to its position from the target
inline
void
Scalfmm_utils_interactionPosition
(
int
interactionPosition
,
int
*
srcPosition
){
srcPosition
[
2
]
=
interactionPosition
%
7
-
3
;
srcPosition
[
1
]
=
(
interactionPosition
/
7
)
%
7
-
3
;
srcPosition
[
0
]
=
(
interactionPosition
/
49
)
%
7
-
3
;
}
//< cell relatively to its position from the target in term of box
void
Scalfmm_utils_interactionPosition
(
int
interactionPosition
,
int
*
srcPosition
);
#endif // CKERNELAPI_H
Addons/CKernelApi/Src/ScalfmmCKernelApiCore.cpp
View file @
2c5b48f9
...
...
@@ -250,6 +250,20 @@ extern "C" void Scalfmm_execute_kernel(Scalfmm_Handle handle, struct Scalfmm_Ker
algorithm
.
execute
();
}
//< This function fill the childFullPosition[3] with [-1;1] to know the position of a child relatively to
//< its position from its parent
extern
"C"
void
Scalfmm_utils_parentChildPosition
(
int
childPosition
,
int
*
childFullPosition
){
childFullPosition
[
2
]
=
(
childPosition
%
2
?
1
:
-
1
);
childFullPosition
[
1
]
=
((
childPosition
/
2
)
%
2
?
1
:
-
1
);
childFullPosition
[
0
]
=
((
childPosition
/
4
)
%
2
?
1
:
-
1
);
}
//< This function fill the childFullPosition[3] with [-3;3] to know the position of a interaction
//< cell relatively to its position from the target
extern
"C"
void
Scalfmm_utils_interactionPosition
(
int
interactionPosition
,
int
*
srcPosition
){
srcPosition
[
2
]
=
interactionPosition
%
7
-
3
;
srcPosition
[
1
]
=
(
interactionPosition
/
7
)
%
7
-
3
;
srcPosition
[
0
]
=
(
interactionPosition
/
49
)
%
7
-
3
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment