Lines Matching defs:fmt

255 //! Print out an interval with the precision of `fmt`.
257 void printIVal (const FloatFormat& fmt, const typename Traits<T>::IVal& ival, ostream& os)
259 Traits<T>::doPrintIVal(fmt, ival, os);
263 string intervalToString (const FloatFormat& fmt, const typename Traits<T>::IVal& ival)
266 printIVal<T>(fmt, ival, oss);
270 //! Print out a value with the precision of `fmt`.
272 void printValue (const FloatFormat& fmt, const T& value, ostream& os)
274 Traits<T>::doPrintValue(fmt, value, os);
278 string valueToString (const FloatFormat& fmt, const T& val)
281 printValue(fmt, val, oss);
285 //! Approximate `value` elementwise to the float precision defined in `fmt`.
289 typename Traits<T>::IVal round (const FloatFormat& fmt, const T& value)
291 return Traits<T>::doRound(fmt, value);
295 typename Traits<T>::IVal convert (const FloatFormat& fmt,
298 return Traits<T>::doConvert(fmt, value);
329 static Interval doConvert (const FloatFormat& fmt, const IVal& ival)
331 return fmt.convert(ival);
334 static Interval doRound (const FloatFormat& fmt, T value)
336 return fmt.roundOut(double(value), false);
343 static void doPrintIVal (const FloatFormat& fmt,
347 os << fmt.intervalToHex(ival);
350 static void doPrintValue (const FloatFormat& fmt,
354 os << fmt.floatToHex(value);
447 static void doPrintIVal (const FloatFormat& fmt, const IVal ival, ostream& os)
456 printIVal<Element>(fmt, ival[ndx], os);
462 static void doPrintValue (const FloatFormat& fmt, const T& value, ostream& os)
471 printValue<Element>(fmt, value[ndx], os);
477 static IVal doConvert (const FloatFormat& fmt, const IVal& value)
482 ret[ndx] = convert<Element>(fmt, value[ndx]);
487 static IVal doRound (const FloatFormat& fmt, T value)
492 ret[ndx] = round(fmt, value[ndx]);
2080 const FloatFormat& fmt = ctx.format;
2089 deLdExp(1.0, fmt.getMinExp()),
2090 deLdExp(1.0, fmt.getMaxExp() - 1)))
2091 return fmt.ulp(ret, 2.5);
4374 Value genRandom (const FloatFormat& fmt, Precision prec, Random& rnd) const
4379 ret[ndx] = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd);
4384 void genFixeds (const FloatFormat& fmt, vector<Value>& dst) const
4388 instance<DefaultSampling<T> >().genFixeds(fmt, scalars);
4406 Value genRandom (const FloatFormat& fmt, Precision prec, Random& rnd) const
4412 ret(rowNdx, colNdx) = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd);
4417 void genFixeds (const FloatFormat& fmt, vector<Value>& dst) const
4421 instance<DefaultSampling<T> >().genFixeds(fmt, scalars);
4629 const FloatFormat& fmt = getFormat();
4770 env.lookup(*variables.in0) = convert<In0>(fmt, round(fmt, inputs.in0[valueNdx]));
4771 env.lookup(*variables.in1) = convert<In1>(fmt, round(fmt, inputs.in1[valueNdx]));
4772 env.lookup(*variables.in2) = convert<In2>(fmt, round(fmt, inputs.in2[valueNdx]));
4773 env.lookup(*variables.in3) = convert<In3>(fmt, round(fmt, inputs.in3[valueNdx]));
4776 EvalContext ctx (fmt, m_ctx.precision, env);
5528 const FloatFormat& fmt = *de::getSizedArrayElement<glu::PRECISION_LAST>(ctx.formats, precNdx);
5537 const Context caseCtx (name, ctx.testCtx, ctx.renderCtx, fmt, highpFmt,