Lines Matching defs:max

686 inline T getRandom (deRandom& rnd, T min, T max);
689 inline GLValue::Float getRandom (deRandom& rnd, GLValue::Float min, GLValue::Float max)
691 if (max < min)
694 return GLValue::Float::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
698 inline GLValue::Double getRandom (deRandom& rnd, GLValue::Double min, GLValue::Double max)
700 if (max < min)
703 return GLValue::Double::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
707 inline GLValue::Short getRandom (deRandom& rnd, GLValue::Short min, GLValue::Short max)
709 if (max < min)
712 return GLValue::Short::create((min == max ? min : (deInt16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
716 inline GLValue::Ushort getRandom (deRandom& rnd, GLValue::Ushort min, GLValue::Ushort max)
718 if (max < min)
721 return GLValue::Ushort::create((min == max ? min : (deUint16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
725 inline GLValue::Byte getRandom (deRandom& rnd, GLValue::Byte min, GLValue::Byte max)
727 if (max < min)
730 return GLValue::Byte::create((min == max ? min : (deInt8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
734 inline GLValue::Ubyte getRandom (deRandom& rnd, GLValue::Ubyte min, GLValue::Ubyte max)
736 if (max < min)
739 return GLValue::Ubyte::create((min == max ? min : (deUint8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
743 inline GLValue::Fixed getRandom (deRandom& rnd, GLValue::Fixed min, GLValue::Fixed max)
745 if (max < min)
748 return GLValue::Fixed::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
752 inline GLValue::Half getRandom (deRandom& rnd, GLValue::Half min, GLValue::Half max)
754 if (max < min)
757 float fMax = max.to<float>();
764 inline GLValue::Int getRandom (deRandom& rnd, GLValue::Int min, GLValue::Int max)
766 if (max < min)
769 return GLValue::Int::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
773 inline GLValue::Uint getRandom (deRandom& rnd, GLValue::Uint min, GLValue::Uint max)
775 if (max < min)
778 return GLValue::Uint::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
1534 static char* generateIndices (int seed, int elementCount, DrawTestSpec::IndexType type, int offset, int min, int max, int indexBase);
1539 static char* createIndices (int seed, int elementCount, int offset, int min, int max, int indexBase);
1592 const GLType max = extractGLValue<GLType>(GLValue::getMaxValue(GLValueTypeTraits<GLType>::Type));
1612 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1618 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1669 char* RandomArrayGenerator::generateIndices (int seed, int elementCount, DrawTestSpec::IndexType type, int offset, int min, int max, int indexBase)
1676 data = createIndices<deUint8>(seed, elementCount, offset, min, max, indexBase);
1680 data = createIndices<deUint16>(seed, elementCount, offset, min, max, indexBase);
1684 data = createIndices<deUint32>(seed, elementCount, offset, min, max, indexBase);
1696 char* RandomArrayGenerator::createIndices (int seed, int elementCount, int offset, int min, int max, int indexBase)
1712 if (min < 0 || (size_t)min > std::numeric_limits<T>::max() ||
1713 max < 0 || (size_t)max > std::numeric_limits<T>::max() ||
1714 min > max)
1719 deUint32 ndx = getRandom(rnd, GLValue::Uint::create(min), GLValue::Uint::create(max)).getValue();
1722 // generation of degenerate triangles and lines. If [min, max] is too
1726 if (ndx > (deUint32)max) ndx = min;
1728 if (ndx > (deUint32)max) ndx = min;
1730 if (ndx > (deUint32)max) ndx = min;
3212 const int indexMax = de::max(0, (ranged) ? (de::clamp<int>(spec.indexMax, 0, maxElementIndex)) : (maxElementIndex));
3249 const size_t referencedElementCount = (ranged) ? (de::max<size_t>(evaluatedElementCount, spec.indexMax + 1)) : (evaluatedElementCount);
3816 const float max = GLValue::getMaxValue(attribSpec.inputType).toFloat();
3818 attrMaxValue += (attribSpec.normalize && !inputTypeIsFloatType(attribSpec.inputType)) ? (1.0f) : (max * 1.1f);
3856 const float max = GLValue::getMaxValue(attribSpec.inputType).toFloat();
3858 colorScale *= (attribSpec.normalize && !inputTypeIsFloatType(attribSpec.inputType) ? 1.0f : float(1.0 / double(max)));
3862 colorScale *= (attribSpec.normalize && !inputTypeIsFloatType(attribSpec.inputType) ? 1.0f : float(1.0 / double(max)));