Lines Matching refs:FixedPoint

36 //    abstractions, namely the FixedPoint class and its arithmetic
339 // Part 2: the FixedPoint class.
341 // A FixedPoint object represents a fixed-point value stored in the underlying
344 // case a FixedPoint object represents a corresponding SIMD vector of fixed
369 class FixedPoint {
382 typedef FixedPoint<ScalarRawType, kIntegerBits> ScalarFixedPointType;
400 static FixedPoint FromRaw(RawType x) {
401 FixedPoint retval;
406 static FixedPoint FromScalarRaw(ScalarRawType x) {
407 FixedPoint retval;
412 static FixedPoint FromScalarFixedPoint(ScalarFixedPointType x) {
417 static FixedPoint ConstantPOT() {
425 static FixedPoint Zero() { return FromScalarRaw(0); }
427 static FixedPoint One() {
433 static FixedPoint FromDouble(double x) {
450 // FixedPoint class, and a few related functions.
452 // A FixedPoint multiplication is just a
457 FixedPoint<tRawType, tIntegerBits_a + tIntegerBits_b> operator*(
458 FixedPoint<tRawType, tIntegerBits_a> a,
459 FixedPoint<tRawType, tIntegerBits_b> b) {
460 FixedPoint<tRawType, tIntegerBits_a + tIntegerBits_b> c;
467 FixedPoint<tRawType, tExponent + tIntegerBits> ExactMulByPot(
468 FixedPoint<tRawType, tIntegerBits> a) {
469 FixedPoint<tRawType, tExponent + tIntegerBits> c;
477 FixedPoint<tRawType, tIntegerBits> SaturatingRoundingMultiplyByPOT(
478 FixedPoint<tRawType, tIntegerBits> a) {
479 return FixedPoint<tRawType, tIntegerBits>::FromRaw(
487 FixedPoint<tRawType, tIntegerBits> FuncName( \
488 FixedPoint<tRawType, tIntegerBits> a) { \
489 return FixedPoint<tRawType, tIntegerBits>::FromRaw(ImplFuncName(a.raw())); \
494 FixedPoint<tRawType, tIntegerBits> FuncName( \
495 FixedPoint<tRawType, tIntegerBits> a, \
496 FixedPoint<tRawType, tIntegerBits> b) { \
497 return FixedPoint<tRawType, tIntegerBits>::FromRaw( \
515 tRawType FuncName(FixedPoint<tRawType, tIntegerBits> a) { \
521 tRawType FuncName(FixedPoint<tRawType, tIntegerBits> a, \
522 FixedPoint<tRawType, tIntegerBits> b) { \
539 FixedPoint<tRawType, tIntegerBits> SelectUsingMask(
540 tRawType if_mask, FixedPoint<tRawType, tIntegerBits> then_val,
541 FixedPoint<tRawType, tIntegerBits> else_val) {
542 return FixedPoint<tRawType, tIntegerBits>::FromRaw(
547 bool operator==(FixedPoint<tRawType, tIntegerBits> a,
548 FixedPoint<tRawType, tIntegerBits> b) {
553 bool operator!=(FixedPoint<tRawType, tIntegerBits> a,
554 FixedPoint<tRawType, tIntegerBits> b) {
560 double ToDouble(FixedPoint<tRawType, tIntegerBits> x) {
563 typedef FixedPoint<tRawType, tIntegerBits> F;
570 FixedPoint<tRawType, tIntegerBitsDst> Rescale(
571 FixedPoint<tRawType, tIntegerBitsSrc> x) {
573 FixedPoint<tRawType, tIntegerBitsDst> result;
605 FixedPoint<tRawType, 0> exp_on_interval_between_negative_one_quarter_and_0_excl(
606 FixedPoint<tRawType, 0> a) {
607 typedef FixedPoint<tRawType, 0> F;
629 FixedPoint<tRawType, 0> exp_on_negative_values(
630 FixedPoint<tRawType, tIntegerBits> a) {
631 typedef FixedPoint<tRawType, tIntegerBits> InputF;
632 typedef FixedPoint<tRawType, 0> ResultF;
678 FixedPoint<tRawType, 0> one_minus_x_over_one_plus_x_for_x_in_0_1(
679 FixedPoint<tRawType, 0> a) {
680 typedef FixedPoint<tRawType, 0> F0;
681 typedef FixedPoint<tRawType, 2> F2;
702 FixedPoint<tRawType, 0> neg_tanh_on_negative_values(
703 FixedPoint<tRawType, tIntegerBits> a) {
710 FixedPoint<tRawType, 0> tanh(FixedPoint<tRawType, tIntegerBits> a) {
711 typedef FixedPoint<tRawType, tIntegerBits> InputF;
712 typedef FixedPoint<tRawType, 0> ResultF;
725 FixedPoint<tRawType, 0> one_over_one_plus_x_for_x_in_0_1(
726 FixedPoint<tRawType, 0> a) {
727 typedef FixedPoint<tRawType, 0> F0;
728 typedef FixedPoint<tRawType, 2> F2;
749 FixedPoint<tRawType, 0> logistic_on_positive_values(
750 FixedPoint<tRawType, tIntegerBits> a) {
756 FixedPoint<tRawType, 0> logistic(FixedPoint<tRawType, tIntegerBits> a) {
757 typedef FixedPoint<tRawType, tIntegerBits> InputF;
758 typedef FixedPoint<tRawType, 0> ResultF;