Commit 4362055b authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

align struct correctly

parent c177983a
......@@ -3,7 +3,7 @@
#include "../Utils/FGlobal.hpp"
struct OutOfBlockInteraction{
struct alignas(1) OutOfBlockInteraction{
MortonIndex outIndex;
MortonIndex insideIndex;
int outPosition;
......
......@@ -25,11 +25,11 @@ typedef long long int MortonIndex;
/***************************************************************************/
/***************************************************************************/
typedef struct OutOfBlockInteraction_t{
typedef struct OutOfBlockInteraction{
MortonIndex outIndex;
MortonIndex insideIndex;
int outPosition;
} OutOfBlockInteraction;
} __attribute__ ((aligned (1)));
#define Between(inValue, inMin, inMax) ( (inMin) <= (inValue) && (inValue) < (inMax) )
#define pow2(power) (1 << (power))
......@@ -389,11 +389,11 @@ __global unsigned char* FOpenCLGroupOfCells_getCell(struct FOpenCLGroupOfCells*
/***************************************************************************/
struct Uptr9{
__global unsigned char* ptrs[9];
};
} __attribute__ ((aligned (1)));
struct size_t9{
size_t v[9];
};
} __attribute__ ((aligned (1)));
struct Uptr343{
__global unsigned char* ptrs[343];
......@@ -601,7 +601,7 @@ __kernel void FOpenCL__upwardPassPerform(__global unsigned char* currentCellsPtr
__kernel void FOpenCL__transferInoutPassPerformMpi(__global unsigned char* currentCellsPtr, size_t currentCellsSize,
__global unsigned char* externalCellsPtr, size_t externalCellsSize,
int idxLevel, const __global OutOfBlockInteraction* outsideInteractions,
int idxLevel, const __global struct OutOfBlockInteraction* outsideInteractions,
size_t nbOutsideInteractions, __global void* userkernel){
struct FOpenCLGroupOfCells currentCells = BuildFOpenCLGroupOfCells(currentCellsPtr, currentCellsSize);
struct FOpenCLGroupOfCells cellsOther = BuildFOpenCLGroupOfCells(externalCellsPtr, externalCellsSize);
......@@ -671,7 +671,7 @@ __kernel void FOpenCL__transferInPassPerform(__global unsigned char* currentCel
__kernel void FOpenCL__transferInoutPassPerform(__global unsigned char* currentCellsPtr, size_t currentCellsSize,
__global unsigned char* externalCellsPtr, size_t externalCellsSize,
int idxLevel, const __global OutOfBlockInteraction* outsideInteractions,
int idxLevel, const __global struct OutOfBlockInteraction* outsideInteractions,
size_t nbOutsideInteractions, __global void* userkernel){
struct FOpenCLGroupOfCells currentCells = BuildFOpenCLGroupOfCells(currentCellsPtr, currentCellsSize);
struct FOpenCLGroupOfCells cellsOther = BuildFOpenCLGroupOfCells(externalCellsPtr, externalCellsSize);
......@@ -752,7 +752,7 @@ __kernel void FOpenCL__downardPassPerform(__global unsigned char* currentCellsPt
__kernel void FOpenCL__directInoutPassPerformMpi(__global unsigned char* containersPtr, size_t containersSize,
__global unsigned char* externalContainersPtr, size_t externalContainersSize,
const __global OutOfBlockInteraction* outsideInteractions,
const __global struct OutOfBlockInteraction* outsideInteractions,
size_t nbOutsideInteractions, const int treeHeight, __global void* userkernel){
struct FOpenCLGroupOfParticles containers = BuildFOpenCLGroupOfParticles(containersPtr, containersSize);
struct FOpenCLGroupOfParticles containersOther = BuildFOpenCLGroupOfParticles(externalContainersPtr, externalContainersSize);
......@@ -813,7 +813,7 @@ __kernel void FOpenCL__directInPassPerform(__global unsigned char* containersPtr
__kernel void FOpenCL__directInoutPassPerform(__global unsigned char* containersPtr, size_t containersSize,
__global unsigned char* externalContainersPtr, size_t externalContainersSize,
const __global OutOfBlockInteraction* outsideInteractions,
const __global struct OutOfBlockInteraction* outsideInteractions,
size_t nbOutsideInteractions, const int treeHeight, __global void* userkernel){
struct FOpenCLGroupOfParticles containers = BuildFOpenCLGroupOfParticles(containersPtr, containersSize);
struct FOpenCLGroupOfParticles containersOther = BuildFOpenCLGroupOfParticles(externalContainersPtr, externalContainersSize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment