Add ISPC_HAS_RAND definition on targets that have a HW RNG.
This lets us check for a functioning rdrand() call in the stdlib more reliably. Fixes issue #333.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 1;
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 1;
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 1;
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 0;
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 0;
|
||||
#else
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
#if !defined(ISPC_TARGET_AVX11) && !defined(ISPC_TARGET_AVX2)
|
||||
#ifndef ISPC_HAS_RAND
|
||||
RET[programIndex] = 0;
|
||||
#else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user