Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 42ae49b

Browse files
ohm314pramodk
authored andcommitted
Changes to Random123 to support bgclang (#115)
bgclang defines a new constant __bgclang__, which has to be used instead of __clang__. Additionally we use a known workaround for BG\Q for Random123 reported elsewhere.
1 parent 3702d37 commit 42ae49b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

coreneuron/utils/randoms/Random123/features/compilerfeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ added to each of the *features.h files, AND to examples/ut_features.cpp.
209209
#include "sunprofeatures.h"
210210
#elif defined(__OPEN64__)
211211
#include "open64features.h"
212-
#elif defined(__clang__)
212+
#elif defined(__clang__) || defined(__bgclang__)
213213
#include "clangfeatures.h"
214214
#elif defined(_CRAYC)
215215
#include "crayfeatures.h"

coreneuron/utils/randoms/Random123/features/gccfeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4444
Please let the authors know of any successes (or failures). */
4545
#endif
4646

47-
#ifdef __powerpc__
47+
#if defined(__powerpc__) && !defined(__bgclang__)
4848
#include <ppu_intrinsics.h>
4949
#endif
5050

coreneuron/utils/randoms/nrnran123.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ of the full distribution available from
5151
http://www.deshawresearch.com/resources_random123.html
5252
*/
5353

54+
#ifdef __bgclang__
55+
#define R123_USE_MULHILO64_MULHI_INTRIN 0
56+
#define R123_USE_GNU_UINT128 1
57+
#endif
58+
5459
#include "Random123/philox.h"
5560
#include <inttypes.h>
5661

0 commit comments

Comments
 (0)