aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <antonios@ece.ubc.ca>2021-04-21 11:03:23 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2021-04-22 20:42:12 +0000
commit045c0609b5c059974104f29dad91bcc3828e91ac (patch)
treea36af76171b54defaa82a7ad33f6ee76ecc5f5f9 /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h
parentd213a0bcea2344aa3f6c9856da9f5b2a26ccec25 (diff)
Check existence of BSD random before use.
`TensorRandom` currently relies on BSD `random()`, which is not always available. The [linux manpage](https://man7.org/linux/man-pages/man3/srandom.3.html) gives the glibc condition: ``` _XOPEN_SOURCE >= 500 || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE ``` In particular, this was failing to compile for MinGW via msys2. If not available, we fall back to using `rand()`.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h')
0 files changed, 0 insertions, 0 deletions