-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close #1563 and close #1553 - add type to get a architecture depending useful alignment - change `__optimal_align__` based on discussion #1563 - add pre processor macro `PMACC_ROUND_UP_NEXT_POW2`
- Loading branch information
1 parent
a8652d4
commit 94cf783
Showing
3 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright 2016 Rene Widera | ||
* | ||
* This file is part of libPMacc. | ||
* | ||
* libPMacc is free software: you can redistribute it and/or modify | ||
* it under the terms of either the GNU General Public License or | ||
* the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* libPMacc is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License and the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* and the GNU Lesser General Public License along with libPMacc. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
|
||
#pragma once | ||
|
||
#include <boost/align/alignment_of.hpp> | ||
|
||
namespace PMacc | ||
{ | ||
/** object to test for a useful alignment | ||
* | ||
* The compiler auto align the member array to a useful architecture | ||
* depending value. | ||
*/ | ||
struct UsefulAlignTestObject | ||
{ | ||
char x[512] __attribute__ ((aligned)); | ||
}; | ||
|
||
/** type which defines a useful alignment for the architecture */ | ||
typedef boost::alignment::alignment_of<UsefulAlignTestObject> useful_align_t; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters