Home | History | Annotate | Download | only in glshared

Lines Matching full:rnd

220 inline T getRandom (deRandom& rnd, T min, T max);
223 inline GLValue::Float getRandom (deRandom& rnd, GLValue::Float min, GLValue::Float max)
228 return GLValue::Float::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
232 inline GLValue::Short getRandom (deRandom& rnd, GLValue::Short min, GLValue::Short max)
237 return GLValue::Short::create((min == max ? min : (deInt16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
241 inline GLValue::Ushort getRandom (deRandom& rnd, GLValue::Ushort min, GLValue::Ushort max)
246 return GLValue::Ushort::create((min == max ? min : (deUint16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
250 inline GLValue::Byte getRandom (deRandom& rnd, GLValue::Byte min, GLValue::Byte max)
255 return GLValue::Byte::create((min == max ? min : (deInt8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
259 inline GLValue::Ubyte getRandom (deRandom& rnd, GLValue::Ubyte min, GLValue::Ubyte max)
264 return GLValue::Ubyte::create((min == max ? min : (deUint8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
268 inline GLValue::Fixed getRandom (deRandom& rnd, GLValue::Fixed min, GLValue::Fixed max)
273 return GLValue::Fixed::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
277 inline GLValue::Half getRandom (deRandom& rnd, GLValue::Half min, GLValue::Half max)
284 GLValue::Half h = GLValue::Half::create(fMin + deRandom_getFloat(&rnd) * (fMax - fMin));
289 inline GLValue::Int getRandom (deRandom& rnd, GLValue::Int min, GLValue::Int max)
294 return GLValue::Int::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
298 inline GLValue::Uint getRandom (deRandom& rnd, GLValue::Uint min, GLValue::Uint max)
303 return GLValue::Uint::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
307 inline GLValue::Double getRandom (deRandom& rnd, GLValue::Double min, GLValue::Double max)
312 return GLValue::Double::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
1320 static void setData (char* data, Array::InputType type, deRandom& rnd, GLValue min, GLValue max);
1323 void RandomArrayGenerator::setData (char* data, Array::InputType type, deRandom& rnd, GLValue min, GLValue max)
1329 alignmentSafeAssignment<float>(data, getRandom<GLValue::Float>(rnd, min.fl, max.fl));
1335 alignmentSafeAssignment<double>(data, getRandom<GLValue::Float>(rnd, min.fl, max.fl));
1341 alignmentSafeAssignment<deInt16>(data, getRandom<GLValue::Short>(rnd, min.s, max.s));
1347 alignmentSafeAssignment<deUint16>(data, getRandom<GLValue::Ushort>(rnd, min.us, max.us));
1353 alignmentSafeAssignment<deInt8>(data, getRandom<GLValue::Byte>(rnd, min.b, max.b));
1359 alignmentSafeAssignment<deUint8>(data, getRandom<GLValue::Ubyte>(rnd, min.ub, max.ub));
1365 alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Fixed>(rnd, min.fi, max.fi));
1371 alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Int>(rnd, min.i, max.i));
1377 alignmentSafeAssignment<deUint32>(data, getRandom<GLValue::Uint>(rnd, min.ui, max.ui));
1383 alignmentSafeAssignment<deFloat16>(data, getRandom<GLValue::Half>(rnd, min.h, max.h).getValue());
1397 deRandom rnd;
1398 deRandom_init(&rnd, seed);
1409 setData(&(data[vertexNdx * stride + Array::inputTypeSize(type) * componentNdx]), type, rnd, min, max);
1502 deRandom rnd;
1503 deRandom_init(&rnd, seed);
1511 deUint32 x1 = min + deRandom_getUint32(&rnd) % (max - min);
1512 deUint32 x2 = min + deRandom_getUint32(&rnd) % (max - x1);
1514 deUint32 y1 = min + deRandom_getUint32(&rnd) % (max - min);
1515 deUint32 y2 = min + deRandom_getUint32(&rnd) % (max - y1);
1517 deUint32 z = min + deRandom_getUint32(&rnd) % (max - min);
1518 deUint32 w = deRandom_getUint32(&rnd) % max2;
1579 deRandom rnd;
1580 deRandom_init(&rnd, seed);
1600 x1 = roundTo(minDiff, getRandom<T>(rnd, min, max));
1601 x2 = roundTo(minDiff, getRandom<T>(rnd, minDiff, abs<T>(max - x1)));
1603 y1 = roundTo(minDiff, getRandom<T>(rnd, min, max));
1604 y2 = roundTo(minDiff, getRandom<T>(rnd, minDiff, abs<T>(max - y1)));
1606 z = (componentCount > 2) ? roundTo(minDiff, (getRandom<T>(rnd, min, max))) : (T::create(0));
1607 w = (componentCount > 3) ? roundTo(minDiff, (getRandom<T>(rnd, min, max))) : (T::create(1));
1721 deRandom rnd;
1722 deRandom_init(&rnd, seed);
1748 T val = getRandom<T>(rnd, min, max);