17static float sk_fsel(
float pred,
float result_ge,
float result_lt) {
18 return pred >= 0 ? result_ge : result_lt;
23 float big =
sk_fsel(
x, (
float)(1 << 23), -(
float)(1 << 23));
24 return (
x + big) - big;
32 float fSrc[kBuffer], fDst[kBuffer];
38 for (
int i = 0;
i < kBuffer; ++
i) {
60 for (
int i = 0;
i < n;
i++) {
79 uint32_t*
d =
reinterpret_cast<uint32_t*
>(
dst);
80 const uint32_t*
s =
reinterpret_cast<const uint32_t*
>(
src);
144 const uint32_t mask = 0xFF00FF;
146 uint64_t tmp =
value;
147 tmp = (tmp & mask) | ((tmp & ~mask) << 24);
149 return (uint32_t) (((tmp >> 8) & mask) | ((tmp >> 32) & ~mask));
158 int count)
override {
173 int count)
override {
186 int exponent = bits << 1 >> 24;
187 return exponent != 0xFF;
203#define mulzeroadd(data) (data[0]*0 + data[1]*0 + data[2]*0 + data[3]*0)
216#define MAKEREC(name) { name, #name }
250 for (
int i = 0;
i < N; ++
i) {
256 fName =
"isfinite_rect";
258 fProc =
gRec[index].fProc;
259 fName =
gRec[index].fName;
270 const float*
data = fData;
275 for (
int j = 0; j < loops; ++j) {
276 for (
int i = 0;
i < N - 4; ++
i) {
277 counter += proc(&
data[
i]);
281 for (
int j = 0; j < loops; ++j) {
282 for (
int i = 0;
i < N - 4; ++
i) {
293 if (
paint.getAlpha() == 0) {
320 for (
int i = 0;
i < ARRAY; ++
i) {
325 fName =
"floor_fast";
341 const float*
data = fData;
344 for (
int j = 0; j < loops; ++j) {
345 for (
int i = 0;
i < ARRAY; ++
i) {
351 for (
int j = 0; j < loops; ++j) {
352 for (
int i = 0;
i < ARRAY; ++
i) {
374 uint32_t fData[ARRAY];
378 CLZBench(
bool usePortable) : fUsePortable(usePortable) {
381 for (
int i = 0;
i < ARRAY; ++
i) {
386 fName =
"clz_portable";
388 fName =
"clz_intrinsic";
404 for (
int j = 0; j < loops; ++j) {
405 for (
int i = 0;
i < ARRAY; ++
i) {
411 for (
int j = 0; j < loops; ++j) {
412 for (
int i = 0;
i < ARRAY; ++
i) {
434 uint32_t fData[ARRAY];
438 CTZBench(
bool usePortable) : fUsePortable(usePortable) {
441 for (
int i = 0;
i < ARRAY; ++
i) {
446 fName =
"ctz_portable";
448 fName =
"ctz_intrinsic";
464 for (
int j = 0; j < loops; ++j) {
465 for (
int i = 0;
i < ARRAY; ++
i) {
471 for (
int j = 0; j < loops; ++j) {
472 for (
int i = 0;
i < ARRAY; ++
i) {
501 for (
int i = 0;
i < ARRAY; ++
i) {
505 fName =
"point_normalize";
519 for (
int j = 0; j < loops; ++j) {
520 for (
int i = 0;
i < ARRAY; ++
i) {
549 for (
int i = 0;
i < N; ++
i) {
561 for (
int j = 0; j < loops; ++j) {
562 for (
int i = 0;
i < N - 4; ++
i) {
568 if (
paint.getAlpha() == 0) {
574 return "float_to_fixed";
610#include
"src/base/SkFloatBits.h"
622 for (
int i = 0;
i < ARRAY; ++
i) {
627 fName =
"floor2int_sat";
629 fName =
"floor2int_undef";
634 return backend == Backend::kNonRendering;
640 virtual int count() {
return ARRAY; }
647 for (
int j = 0; j < loops; ++j) {
648 int n = this->
count();
650 for (
int i = 0;
i < n; ++
i) {
654 for (
int i = 0;
i < n; ++
i) {
static bool isFinite_mulzero(float x)
static bool isFinite_int(float x)
static bool isfinite_plus_int(const float data[4])
static const struct @229 gRec[]
static float fast_floor(float x)
static bool isfinite_and_int(const float data[4])
static bool isfinite_and_mulzero(const float data[4])
static bool isFinite(const SkRect &r)
static uint32_t QMul64(uint32_t value, U8CPU alpha)
static float sk_fsel(float pred, float result_ge, float result_lt)
static bool isfinite_plus_mulzero(const float data[4])
bool(* IsFiniteProc)(const float[])
static SK_ALWAYS_INLINE uint32_t SkAlphaMulQ(uint32_t c, unsigned scale)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SkFloatToFixed(x)
static float SkBits2Float(uint32_t bits)
static uint32_t SkFloat2Bits(float value)
#define sk_float_floor2int_no_saturate(x)
static float sk_float_rsqrt(float x)
#define sk_float_floor2int(x)
constexpr int SkCTZ_portable(uint32_t x)
Returns the number of trailing zero bits (0...32)
static int SkCTZ(uint32_t mask)
constexpr int SkCLZ_portable(uint32_t x)
Returns the number of leading zero bits (0...32)
static int SkCLZ(uint32_t mask)
#define INHERITED(method,...)
virtual void process(int)
bool isSuitableFor(Backend backend) override
const char * onGetName() override
void onDraw(int loops, SkCanvas *) override
CLZBench(bool usePortable)
bool isSuitableFor(Backend backend) override
virtual void process(int)
const char * onGetName() override
CTZBench(bool usePortable)
void onDraw(int loops, SkCanvas *) override
void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count) override
const char * onGetName() override
void onDraw(int loops, SkCanvas *) override
bool isSuitableFor(Backend backend) override
void onDraw(int loops, SkCanvas *) override
virtual void process(unsigned)
bool isSuitableFor(Backend backend) override
const char * onGetName() override
const char * onGetName() override
virtual void process(float)
bool isSuitableFor(Backend backend) override
void onDraw(int loops, SkCanvas *) override
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
bool isSuitableFor(Backend backend) override
void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count) override
virtual void performITest(uint32_t *SK_RESTRICT dst, const uint32_t *SK_RESTRICT src, int count)=0
MathBenchU32(const char name[])
MathBench(const char name[])
bool isSuitableFor(Backend backend) override
virtual void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count)=0
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
virtual int mulLoopCount() const
void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count) override
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
bool isSuitableFor(Backend backend) override
virtual void process(int)
void performITest(uint32_t *SK_RESTRICT dst, const uint32_t *SK_RESTRICT src, int count) override
void performITest(uint32_t *SK_RESTRICT dst, const uint32_t *SK_RESTRICT src, int count) override
void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count) override
void performTest(float *SK_RESTRICT dst, const float *SK_RESTRICT src, int count) override
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
static float sat(float r, float g, float b)
DEF_SWITCHES_START aot vmservice shared library name
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
SIN Vec< N, float > floor(const Vec< N, float > &x)
static void process(const char *inPath, const char *lexer, const char *token, const char *hPath, const char *cppPath)
void set(float x, float y)
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds
std::shared_ptr< const fml::Mapping > data