/external/libtextclassifier/annotator/ |
D | quantization_test.cc | 40 std::vector<float> scales{{0.1, 9.0, -7.0}}; in TEST() local 51 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST() 69 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST() 92 std::vector<float> scales(num_buckets); in TEST() local 94 std::fill(scales.begin(), scales.end(), 1); in TEST() 98 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST() 115 std::vector<float> scales(num_buckets, 1.0); in TEST() local 119 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding, in TEST() 135 std::vector<float> scales(num_buckets, 1.0); in TEST() local 136 scales[1] = 9.0; in TEST() [all …]
|
D | quantization.cc | 28 void DequantizeAdd8bit(const float* scales, const uint8* embeddings, in DequantizeAdd8bit() argument 32 const float multiplier = scales[bucket_id]; in DequantizeAdd8bit() 40 void DequantizeAddNBit(const float* scales, const uint8* embeddings, in DequantizeAddNBit() argument 45 const float multiplier = scales[bucket_id]; in DequantizeAddNBit() 73 bool DequantizeAdd(const float* scales, const uint8* embeddings, in DequantizeAdd() argument 78 DequantizeAdd8bit(scales, embeddings, bytes_per_embedding, in DequantizeAdd() 81 DequantizeAddNBit(scales, embeddings, bytes_per_embedding, in DequantizeAdd()
|
D | model-executor.cc | 71 const TfLiteTensor* scales = interpreter->tensor(1); in FromBuffer() local 72 if (scales->dims->size != 2 || scales->dims->data[0] != num_buckets || in FromBuffer() 73 scales->dims->data[1] != 1) { in FromBuffer() 85 embedding_size, scales, embeddings, std::move(interpreter), in FromBuffer() 92 const TfLiteTensor* scales, const TfLiteTensor* embeddings, in TFLiteEmbeddingExecutor() argument 100 scales_(scales), in TFLiteEmbeddingExecutor()
|
/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | subgraph_quantizer.cc | 36 TfLiteStatus AddQuantizationParams(const std::vector<float>& scales, in AddQuantizationParams() argument 43 tensor->quantization->scale.assign(scales.begin(), scales.end()); in AddQuantizationParams() 44 if (zero_point.size() != scales.size()) { in AddQuantizationParams() 107 std::vector<float> scales(channel_dim_size); in SymmetricPerChannelQuantizeTensor() local 114 float_input_data, tensor_dims, channel_dim_index, &scales, &final_buffer); in SymmetricPerChannelQuantizeTensor() 119 std::vector<int64_t> zero_point(scales.size(), 0); in SymmetricPerChannelQuantizeTensor() 120 return AddQuantizationParams(scales, zero_point, channel_dim_index, in SymmetricPerChannelQuantizeTensor() 164 std::vector<float> scales(channel_dim_size); in SymmetricPerChannelBiasQuantize() local 166 scales[i] = input_tensor->quantization->scale[0] * weight_scales[i]; in SymmetricPerChannelBiasQuantize() 178 float scaling_factor = scales[channel_idx]; in SymmetricPerChannelBiasQuantize() [all …]
|
/external/dng_sdk/source/ |
D | dng_misc_opcodes.cpp | 1277 uint32 scales = SafeUint32DivideUp (fAreaSpec.Area ().H (), in dng_opcode_ScalePerRow() local 1280 if (scales != stream.Get_uint32 ()) in dng_opcode_ScalePerRow() 1285 if (dataSize != dng_area_spec::kDataSize + 4 + scales * 4) in dng_opcode_ScalePerRow() 1290 fTable.Reset (host.Allocate (SafeUint32Mult (scales, in dng_opcode_ScalePerRow() 1295 for (uint32 j = 0; j < scales; j++) in dng_opcode_ScalePerRow() 1305 printf ("Count: %u\n", (unsigned) scales); in dng_opcode_ScalePerRow() 1307 for (uint32 k = 0; k < scales && k < gDumpLineLimit; k++) in dng_opcode_ScalePerRow() 1312 if (scales > gDumpLineLimit) in dng_opcode_ScalePerRow() 1314 printf (" ... %u scales skipped\n", (unsigned) (scales - gDumpLineLimit)); in dng_opcode_ScalePerRow() 1328 uint32 scales = SafeUint32DivideUp (fAreaSpec.Area ().H (), in PutData() local [all …]
|
/external/skqp/src/gpu/gradients/ |
D | GrUnrolledBinaryGradientColorizer.fp | 137 // The raster implementation also uses scales and biases, but since they must be calculated 139 SkPMColor4f scales[kMaxIntervals]; 168 scale.store(scales + intervalCount); 176 scales[i] = SK_PMColor4fTRANSPARENT; 182 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], 183 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4],
|
D | GrUnrolledBinaryGradientColorizer.cpp | 332 SkPMColor4f scales[kMaxIntervals]; in Make() local 361 scale.store(scales + intervalCount); in Make() 369 scales[i] = SK_PMColor4fTRANSPARENT; in Make() 375 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], in Make() 376 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4], biases[5], in Make()
|
/external/skia/src/gpu/gradients/ |
D | GrUnrolledBinaryGradientColorizer.fp | 137 // The raster implementation also uses scales and biases, but since they must be calculated 139 SkPMColor4f scales[kMaxIntervals]; 168 scale.store(scales + intervalCount); 176 scales[i] = SK_PMColor4fTRANSPARENT; 182 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], 183 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4],
|
D | GrUnrolledBinaryGradientColorizer.cpp | 332 SkPMColor4f scales[kMaxIntervals]; in Make() local 361 scale.store(scales + intervalCount); in Make() 369 scales[i] = SK_PMColor4fTRANSPARENT; in Make() 375 intervalCount, scales[0], scales[1], scales[2], scales[3], scales[4], scales[5], in Make() 376 scales[6], scales[7], biases[0], biases[1], biases[2], biases[3], biases[4], biases[5], in Make()
|
/external/skia/tests/ |
D | MatrixTest.cpp | 169 SkScalar scales[2]; in test_matrix_min_max_scale() local 176 success = identity.getMinMaxScales(scales); in test_matrix_min_max_scale() 177 REPORTER_ASSERT(reporter, success && SK_Scalar1 == scales[0] && SK_Scalar1 == scales[1]); in test_matrix_min_max_scale() 183 success = scale.getMinMaxScales(scales); in test_matrix_min_max_scale() 184 … REPORTER_ASSERT(reporter, success && SK_Scalar1 * 2 == scales[0] && SK_Scalar1 * 4 == scales[1]); in test_matrix_min_max_scale() 191 success = rot90Scale.getMinMaxScales(scales); in test_matrix_min_max_scale() 192 … REPORTER_ASSERT(reporter, success && SK_Scalar1 / 4 == scales[0] && SK_Scalar1 / 2 == scales[1]); in test_matrix_min_max_scale() 198 success = rotate.getMinMaxScales(scales); in test_matrix_min_max_scale() 200 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[0], SK_ScalarNearlyZero)); in test_matrix_min_max_scale() 201 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[1], SK_ScalarNearlyZero)); in test_matrix_min_max_scale() [all …]
|
/external/skqp/tests/ |
D | MatrixTest.cpp | 169 SkScalar scales[2]; in test_matrix_min_max_scale() local 176 success = identity.getMinMaxScales(scales); in test_matrix_min_max_scale() 177 REPORTER_ASSERT(reporter, success && SK_Scalar1 == scales[0] && SK_Scalar1 == scales[1]); in test_matrix_min_max_scale() 183 success = scale.getMinMaxScales(scales); in test_matrix_min_max_scale() 184 … REPORTER_ASSERT(reporter, success && SK_Scalar1 * 2 == scales[0] && SK_Scalar1 * 4 == scales[1]); in test_matrix_min_max_scale() 191 success = rot90Scale.getMinMaxScales(scales); in test_matrix_min_max_scale() 192 … REPORTER_ASSERT(reporter, success && SK_Scalar1 / 4 == scales[0] && SK_Scalar1 / 2 == scales[1]); in test_matrix_min_max_scale() 198 success = rotate.getMinMaxScales(scales); in test_matrix_min_max_scale() 200 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[0], SK_ScalarNearlyZero)); in test_matrix_min_max_scale() 201 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(SK_Scalar1, scales[1], SK_ScalarNearlyZero)); in test_matrix_min_max_scale() [all …]
|
/external/skia/gm/ |
D | imagefiltersscaled.cpp | 118 SkVector scales[] = { in onDraw() local 131 for (size_t j = 0; j < SK_ARRAY_COUNT(scales); ++j) { in onDraw() 139 canvas->scale(scales[j].fX, scales[j].fY); in onDraw() 149 canvas->translate(r.width() * scales[j].fX + margin, 0); in onDraw() 152 canvas->translate(0, r.height() * scales[j].fY + margin); in onDraw()
|
D | blurrect.cpp | 116 SkScalar scales[] = { SK_Scalar1, 0.6f }; in onDraw() local 118 for (size_t s = 0; s < SK_ARRAY_COUNT(scales); ++s) { in onDraw() 133 canvas->scale(scales[s], scales[s]); in onDraw() 143 canvas->translate(0, SK_ARRAY_COUNT(procs) * r.height() * 4/3 * scales[s]); in onDraw() 146 canvas->translate(4 * r.width() * 4/3 * scales[s], 0); in onDraw()
|
D | dftext.cpp | 41 SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f }; in onDraw() local 73 canvas->scale(scales[i], scales[i]); in onDraw() 76 y += font.getMetrics(nullptr)*scales[i]; in onDraw() 102 SkScalar scaleFactor = SkScalarInvert(scales[arraySize - i - 1]); in onDraw()
|
D | convex_all_line_paths.cpp | 287 const float scales[] = { 1.0f, 0.75f, 0.5f, 0.25f, 0.1f, 0.01f, 0.001f }; in drawPath() local 295 for (size_t i = 0; i < SK_ARRAY_COUNT(scales); ++i) { in drawPath() 305 canvas->scale(scales[i], scales[i]); in drawPath()
|
/external/skqp/gm/ |
D | imagefiltersscaled.cpp | 118 SkVector scales[] = { in onDraw() local 131 for (size_t j = 0; j < SK_ARRAY_COUNT(scales); ++j) { in onDraw() 139 canvas->scale(scales[j].fX, scales[j].fY); in onDraw() 149 canvas->translate(r.width() * scales[j].fX + margin, 0); in onDraw() 152 canvas->translate(0, r.height() * scales[j].fY + margin); in onDraw()
|
D | blurrect.cpp | 116 SkScalar scales[] = { SK_Scalar1, 0.6f }; in onDraw() local 118 for (size_t s = 0; s < SK_ARRAY_COUNT(scales); ++s) { in onDraw() 133 canvas->scale(scales[s], scales[s]); in onDraw() 143 canvas->translate(0, SK_ARRAY_COUNT(procs) * r.height() * 4/3 * scales[s]); in onDraw() 146 canvas->translate(4 * r.width() * 4/3 * scales[s], 0); in onDraw()
|
D | dftext.cpp | 43 SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f }; in onDraw() local 75 canvas->scale(scales[i], scales[i]); in onDraw() 78 y += font.getMetrics(nullptr)*scales[i]; in onDraw() 104 SkScalar scaleFactor = SkScalarInvert(scales[arraySize - i - 1]); in onDraw()
|
D | convex_all_line_paths.cpp | 287 const float scales[] = { 1.0f, 0.75f, 0.5f, 0.25f, 0.1f, 0.01f, 0.001f }; in drawPath() local 295 for (size_t i = 0; i < SK_ARRAY_COUNT(scales); ++i) { in drawPath() 305 canvas->scale(scales[i], scales[i]); in drawPath()
|
/external/skia/src/gpu/effects/ |
D | GrYUVtoRGBEffect.h | 36 GrYUVtoRGBEffect(const sk_sp<GrTextureProxy> proxies[], const SkSize scales[], in GrYUVtoRGBEffect() argument 44 fSamplerTransforms[i] = SkMatrix::MakeScale(scales[i].width(), scales[i].height()); in GrYUVtoRGBEffect()
|
D | GrBicubicEffect.cpp | 178 SkScalar scales[2]; in ShouldUseBicubic() local 179 if (!matrix.getMinMaxScales(scales) || scales[0] < SK_Scalar1) { in ShouldUseBicubic() 186 if (scales[1] == SK_Scalar1) { in ShouldUseBicubic()
|
/external/skqp/src/gpu/effects/ |
D | GrYUVtoRGBEffect.h | 36 GrYUVtoRGBEffect(const sk_sp<GrTextureProxy> proxies[], const SkSize scales[], in GrYUVtoRGBEffect() argument 44 fSamplerTransforms[i] = SkMatrix::MakeScale(scales[i].width(), scales[i].height()); in GrYUVtoRGBEffect()
|
D | GrBicubicEffect.cpp | 195 SkScalar scales[2]; in ShouldUseBicubic() local 196 if (!matrix.getMinMaxScales(scales) || scales[0] < SK_Scalar1) { in ShouldUseBicubic() 203 if (scales[1] == SK_Scalar1) { in ShouldUseBicubic()
|
/external/tensorflow/tensorflow/examples/android/jni/object_tracking/ |
D | frame_pair.cc | 152 Point2f* const scales) const { in FillScales() 177 scales[i].x = dist2_x / dist1_x; in FillScales() 178 scales[i].y = dist2_y / dist1_y; in FillScales() 182 scales[i].x = 1.0f; in FillScales() 183 scales[i].y = 1.0f; in FillScales()
|
/external/mesa3d/src/gallium/auxiliary/gallivm/ |
D | lp_bld_format_aos.c | 229 LLVMValueRef scales[4]; in lp_build_unpack_arith_rgba_aos() local 271 scales[i] = LLVMConstNull(LLVMFloatTypeInContext(gallivm->context)); in lp_build_unpack_arith_rgba_aos() 286 scales[i] = lp_build_const_float(gallivm, 1.0 / mask); in lp_build_unpack_arith_rgba_aos() 290 scales[i] = lp_build_const_float(gallivm, 1.0); in lp_build_unpack_arith_rgba_aos() 322 scales[i] = lp_build_const_float(gallivm, 1.0 / mask); in lp_build_unpack_arith_rgba_aos() 347 scaled = LLVMBuildFMul(builder, casted, LLVMConstVector(scales, 4), ""); in lp_build_unpack_arith_rgba_aos() 374 LLVMValueRef scales[4]; in lp_build_pack_rgba_aos() local 407 scales[i] = LLVMGetUndef(LLVMFloatTypeInContext(gallivm->context)); in lp_build_pack_rgba_aos() 418 scales[i] = lp_build_const_float(gallivm, mask); in lp_build_pack_rgba_aos() 422 scales[i] = lp_build_const_float(gallivm, 1.0); in lp_build_pack_rgba_aos() [all …]
|