Home
last modified time | relevance | path

Searched refs:numer (Results 1 – 25 of 56) sorted by relevance

123

/external/skia/src/core/
DSkMath.cpp50 if ((numer = (numer << 1) - denom) >= 0) \
51 result |= 1 << (n - 1); else numer += denom
53 int32_t SkDivBits(int32_t numer, int32_t denom, int shift_bias) { in SkDivBits() argument
55 if (numer == 0) { in SkDivBits()
60 int32_t sign = SkExtractSign(numer ^ denom); in SkDivBits()
61 numer = SkAbs32(numer); in SkDivBits()
64 int nbits = SkCLZ(numer) - 1; in SkDivBits()
76 numer <<= nbits; in SkDivBits()
81 if ((numer -= denom) >= 0) { in SkDivBits()
84 numer += denom; in SkDivBits()
DSkColor.cpp28 static inline SkScalar ByteDivToScalar(int numer, U8CPU denom) { in ByteDivToScalar() argument
30 return SkIntToScalar(numer) / (int)denom; in ByteDivToScalar()
DSkGeometry.cpp41 static int valid_unit_divide(SkScalar numer, SkScalar denom, SkScalar* ratio) { in valid_unit_divide() argument
44 if (numer < 0) { in valid_unit_divide()
45 numer = -numer; in valid_unit_divide()
49 if (denom == 0 || numer == 0 || numer >= denom) { in valid_unit_divide()
53 SkScalar r = numer / denom; in valid_unit_divide()
57 SkASSERTF(r >= 0 && r < SK_Scalar1, "numer %f, denom %f, r %f", numer, denom, r); in valid_unit_divide()
DSkTime.cpp89 return new double(timebase.numer * 1.0 / timebase.denom); in GetNSecs()
DSkGeometry.h323 Sk2s numer = fNumer.eval(tt); in eval() local
325 return numer / denom; in eval()
/external/skia/include/core/
DSkMath.h60 int32_t SkDivBits(int32_t numer, int32_t denom, int shift);
186 inline void SkTDivMod(In numer, In denom, Out* div, Out* mod) { in SkTDivMod() argument
194 const In d = numer/denom; in SkTDivMod()
196 *mod = static_cast<Out>(numer-d*denom); in SkTDivMod()
199 *div = static_cast<Out>(numer/denom); in SkTDivMod()
200 *mod = static_cast<Out>(numer%denom); in SkTDivMod()
DSkFixed.h86 #define SkFixedDiv(numer, denom) SkDivBits(numer, denom, 16) argument
89 #define SkFixedDiv(numer, denom) \ argument
90 SkToS32(SkTPin<int64_t>((SkLeftShift((int64_t)numer, 16) / denom), SK_MinS32, SK_MaxS32))
/external/skia/tests/
DMathTest.cpp561 SkFixed numer = rand.nextS(); in DEF_TEST() local
563 SkFixed result = SkFixedDiv(numer, denom); in DEF_TEST()
564 int64_t check = SkLeftShift((int64_t)numer, 16) / denom; in DEF_TEST()
566 (void)SkCLZ(numer); in DEF_TEST()
576 ERRORF(reporter, "\nFixed Divide: %8x / %8x -> %8x %8x\n", numer, denom, result, check); in DEF_TEST()
632 T numer; in test_divmod() member
646 const T numer = kEdgeCases[i].numer; in test_divmod() local
649 SkTDivMod(numer, denom, &div, &mod); in test_divmod()
650 REPORTER_ASSERT(r, numer/denom == div); in test_divmod()
651 REPORTER_ASSERT(r, numer%denom == mod); in test_divmod()
[all …]
/external/opencv3/3rdparty/include/
Dmsc_inttypes.h276 imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) in imaxdiv() argument
280 result.quot = numer / denom; in imaxdiv()
281 result.rem = numer % denom; in imaxdiv()
283 if (numer < 0 && result.rem > 0) { in imaxdiv()
/external/mesa3d/include/c99/
Dinttypes.h280 imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) in imaxdiv() argument
284 result.quot = numer / denom; in imaxdiv()
285 result.rem = numer % denom; in imaxdiv()
287 if (numer < 0 && result.rem > 0) { in imaxdiv()
/external/skia/src/effects/
DSkEmbossMask.cpp112 SkFixed numer = lx * nx + ly * ny + lz_dot_nz; in Emboss() local
116 if (numer > 0) { // preflight when numer/denom will be <= 0 in Emboss()
119 SkFixed dot = numer / denom; in Emboss()
126 …SkFixed dot = (unsigned)(numer >> 4) * gInvSqrtTable[(SkAbs32(nx) >> 1 << 7) | (SkAbs32(ny) >> 1)]… in Emboss()
/external/skia/src/pathops/
DSkPathOpsLine.cpp40 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearPoint() local
41 if (!between(0, numer, denom)) { in nearPoint()
47 double t = numer / denom; in nearPoint()
70 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearRay() local
71 double t = numer / denom; in nearRay()
DSkPathOpsQuad.cpp306 static int valid_unit_divide(double numer, double denom, double* ratio) in valid_unit_divide() argument
308 if (numer < 0) { in valid_unit_divide()
309 numer = -numer; in valid_unit_divide()
312 if (denom == 0 || numer == 0 || numer >= denom) { in valid_unit_divide()
315 double r = numer / denom; in valid_unit_divide()
/external/webrtc/webrtc/system_wrappers/source/
Dtick_util.cc36 timebase_from_millisecond_fract = (timebase.denom * 1e6) / timebase.numer; in MillisecondsToTicks()
55 timebase_microsecond_fract = timebase.numer / (timebase.denom * 1e6); in TicksToMilliseconds()
74 timebase_microsecond_fract = timebase.numer / (timebase.denom * 1e3); in TicksToMicroseconds()
/external/clang/test/CodeGen/
Duint128_t.c4 extern uint64_t numer;
13 tmp *= numer; in f()
/external/libcxx/include/
Dcstdlib67 div_t div( int numer, int denom);
68 ldiv_t div( long numer, long denom);
69 lldiv_t div(long long numer, long long denom); // C++0X
70 ldiv_t ldiv( long numer, long denom);
71 lldiv_t lldiv(long long numer, long long denom); // C99
/external/libcxx/src/
Dchrono.cpp108 return static_cast<double>(MachInfo.numer) / MachInfo.denom; in compute_steady_factor()
127 if (MachInfo.numer == MachInfo.denom) in init_steady_clock()
/external/skia/experimental/
DSkSetPoly3To3_A.cpp18 static SkScalar divide(SkDScalar numer, SkDScalar denom) { in divide() argument
19 return static_cast<float>(numer / denom); in divide()
/external/compiler-rt/test/builtins/timing/
Dtiming.h23 conversion = (double) freq * (1e-9 * (double) info.numer / (double) info.denom); in intervalInCycles()
/external/chromium-trace/catapult/third_party/coverage/coverage/htmlfiles/
Dcoverage_html.js122 var sum = 0, numer = 0, denom = 0;
127 numer += parseInt(splitted[0], 10);
147 var pct = numer * 100 / denom;
/external/compiler-rt/test/tsan/
Dtest.h61 return (mach_absolute_time() * timebase_info.numer) / timebase_info.denom; in monotonic_clock_ns()
/external/dhcpcd-6.8.2/
Dcommon.c106 factor = (double)info.numer / (double)info.denom; in get_monotonic()
112 if ((info.denom != 1 || info.numer != 1) && factor != 0.0) in get_monotonic()
/external/libmpeg2/decoder/
Dimpeg2d_pic_proc.c313 UWORD32 numer; in impeg2d_init_video_state() local
315 numer = (UWORD32)gau2_impeg2_frm_rate_code[ps_dec->u2_frame_rate_code][1] * in impeg2d_init_video_state()
320 ps_dec->u2_framePeriod = (numer * 1000 * 100) / denom; in impeg2d_init_video_state()
/external/chromium-trace/catapult/common/py_trace_event/py_trace_event/
Dtrace_time.py63 ticks_per_second = timebase.numer / timebase.denom * 1.0e9
/external/skia/src/effects/gradients/
DSkTwoPointConicalGradient.cpp23 static int valid_divide(float numer, float denom, float* ratio) { in valid_divide() argument
28 *ratio = numer / denom; in valid_divide()

123