Skip to content

Commit

Permalink
Fix crash the right way: add missing include to avoid mismatching str…
Browse files Browse the repository at this point in the history
…uct definitions
  • Loading branch information
DanielSeemaier committed Dec 11, 2023
1 parent bf2c6af commit 373a496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kagen/sampling/rng/dSFMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ static void period_certification(dsfmt_t* dsfmt);

#if defined(SAMPLING_HAVE_SSE2)
/** 1 in 64bit for sse2 */
static const union X128I_T sse2_int_one = {{1, 1}};
[[maybe_unused]] static const union X128I_T sse2_int_one = {{1, 1}};
/** 2.0 double for sse2 */
static const union X128D_T sse2_double_two = {{2.0, 2.0}};
[[maybe_unused]] static const union X128D_T sse2_double_two = {{2.0, 2.0}};
/** -1.0 double for sse2 */
static const union X128D_T sse2_double_m_one = {{-1.0, -1.0}};
#endif
Expand Down
7 changes: 4 additions & 3 deletions kagen/sampling/rng/dSFMT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@

#pragma once

#include "kagen/sampling/config.hpp"
#include "kagen/tlx/attribute_always_inline.hpp"
#include "kagen/tlx/likely.hpp"

#include <inttypes.h>

#include <cassert>
#include <cmath>
#include <limits>
#include <vector>

#include <inttypes.h>
#if defined(HAVE_ALTIVEC) && !defined(__APPLE__)
#include <altivec.h>
#elif defined(SAMPLING_HAVE_SSE2)
Expand Down Expand Up @@ -184,7 +185,7 @@ union W128_T {
typedef union W128_T w128_t;

/** the 128-bit internal state array */
struct alignas(sizeof(w128_t)) DSFMT_T {
struct DSFMT_T {
w128_t status[DSFMT_N + 1];
int idx;
};
Expand Down

0 comments on commit 373a496

Please sign in to comment.