Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
2c5b48f9
Commit
2c5b48f9
authored
Sep 12, 2014
by
BRAMAS Berenger
Browse files
update c kernel to compile on bsd
parent
33bfb23b
Changes
2
Show whitespace changes
Inline
Side-by-side
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