Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2c5b48f9 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

update c kernel to compile on bsd

parent 33bfb23b
No related branches found
No related tags found
No related merge requests found
...@@ -91,20 +91,12 @@ void Scalfmm_execute_kernel(Scalfmm_Handle handle, struct Scalfmm_Kernel_Descrip ...@@ -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 //< This function fill the childFullPosition[3] with [-1;1] to know the position of a child relatively to
//< its position from its parent //< its position from its parent in term of halph box for this level
inline void Scalfmm_utils_parentChildPosition(int childPosition, int* childFullPosition){ 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 //< This function fill the childFullPosition[3] with [-3;3] to know the position of a interaction
//< cell relatively to its position from the target //< cell relatively to its position from the target in term of box
inline void Scalfmm_utils_interactionPosition(int interactionPosition, int* srcPosition){ 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;
}
#endif // CKERNELAPI_H #endif // CKERNELAPI_H
...@@ -250,6 +250,20 @@ extern "C" void Scalfmm_execute_kernel(Scalfmm_Handle handle, struct Scalfmm_Ker ...@@ -250,6 +250,20 @@ extern "C" void Scalfmm_execute_kernel(Scalfmm_Handle handle, struct Scalfmm_Ker
algorithm.execute(); 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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment