Home
last modified time | relevance | path

Searched refs:f (Results 1 – 25 of 1047) sorted by relevance

12345678910>>...42

/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/
Dcanny.rscript270 int dir = (int)(4 * native_atan2pi((float)sum_v, (float)sum_h) + 8.5f);
368 float2 cs[] = {{1.0f,0.0f},
369 … {0.9999619f,0.008726535f},{0.9998477f,0.017452406f},{0.99965733f,0.026176948f},
370 … {0.99939084f,0.034899496f},{0.99904823f,0.043619387f},{0.9986295f,0.052335955f},
371 … {0.9981348f,0.06104854f},{0.9975641f,0.06975647f},{0.9969173f,0.0784591f},
372 … {0.9961947f,0.087155744f},{0.9953962f,0.09584575f},{0.9945219f,0.104528464f},
373 … {0.9935719f,0.11320321f},{0.99254614f,0.12186934f},{0.9914449f,0.13052619f},
374 … {0.99026805f,0.1391731f},{0.9890159f,0.14780942f},{0.98768836f,0.15643446f},
375 … {0.9862856f,0.1650476f},{0.9848077f,0.17364818f},{0.9832549f,0.18223552f},
376 … {0.98162717f,0.190809f},{0.9799247f,0.19936794f},{0.9781476f,0.20791169f},
[all …]
/frameworks/rs/
Drsg_generator.c24 void printFileHeader(FILE *f) { in printFileHeader() argument
25 fprintf(f, "/*\n"); in printFileHeader()
26 fprintf(f, " * Copyright (C) 2015 The Android Open Source Project\n"); in printFileHeader()
27 fprintf(f, " *\n"); in printFileHeader()
28 fprintf(f, " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"); in printFileHeader()
29 fprintf(f, " * you may not use this file except in compliance with the License.\n"); in printFileHeader()
30 fprintf(f, " * You may obtain a copy of the License at\n"); in printFileHeader()
31 fprintf(f, " *\n"); in printFileHeader()
32 fprintf(f, " * http://www.apache.org/licenses/LICENSE-2.0\n"); in printFileHeader()
33 fprintf(f, " *\n"); in printFileHeader()
[all …]
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/
DConvolve5x5.java47 float f[] = new float[25]; in createTest() local
60 f[0] = -1.f; f[1] = -3.f; f[2] = -4.f; f[3] = -3.f; f[4] = -1.f; in createTest()
61 f[5] = -3.f; f[6] = 0.f; f[7] = 6.f; f[8] = 0.f; f[9] = -3.f; in createTest()
62 f[10]= -4.f; f[11]= 6.f; f[12]= 20.f; f[13]= 6.f; f[14]= -4.f; in createTest()
63 f[15]= -3.f; f[16]= 0.f; f[17]= 6.f; f[18]= 0.f; f[19]= -3.f; in createTest()
64 f[20]= -1.f; f[21]= -3.f; f[22]= -4.f; f[23]= -3.f; f[24]= -1.f; in createTest()
68 mIntrinsic.setCoefficients(f); in createTest()
72 mScript.set_gCoeffs(f); in createTest()
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/
DConvolve5x5.java37 return (v2 * p) + (v1 * (1.f-p)); in blend()
41 float f[] = new float[25]; in updateMatrix() local
42 final float f125 = 1.f / 25.f; in updateMatrix()
43 float cf1 = blend(f125, -1.f, str); in updateMatrix()
44 float cf2 = blend(f125, -3.f, str); in updateMatrix()
45 float cf3 = blend(f125, -4.f, str); in updateMatrix()
46 float cf4 = blend(f125, 6.f, str); in updateMatrix()
47 float cf5 = blend(f125, 20.f, str); in updateMatrix()
48 float cf6 = blend(f125, 0.f, str); in updateMatrix()
49 f[0] = cf1; f[1] = cf2; f[2] = cf3; f[3] = cf2; f[4] = cf1; in updateMatrix()
[all …]
DConvolve3x3.java37 return (v2 * p) + (v1 * (1.f-p)); in blend()
41 float f[] = new float[9]; in updateMatrix() local
42 float cf1 = blend(1.f / 9.f, 0.f, str); in updateMatrix()
43 float cf2 = blend(1.f / 9.f, -1.f, str); in updateMatrix()
44 float cf3 = blend(1.f / 9.f, 5.f, str); in updateMatrix()
45 f[0] = cf1; f[1] = cf2; f[2] = cf1; in updateMatrix()
46 f[3] = cf2; f[4] = cf3; f[5] = cf2; in updateMatrix()
47 f[6] = cf1; f[7] = cf2; f[8] = cf1; in updateMatrix()
48 return f; in updateMatrix()
55 float f[] = updateMatrix(1.f); in createTest() local
[all …]
/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/
Dclamp.rscript6 float2 src2 = { 2.0f, 2.0f};
7 float2 min2 = { 0.5f, -3.0f};
8 float2 max2 = { 1.0f, 9.0f};
11 _RS_ASSERT(res2.x == 1.0f);
12 _RS_ASSERT(res2.y == 2.0f);
15 float3 src3 = { 2.0f, 2.0f, 1.0f};
16 float3 min3 = { 0.5f, -3.0f, 3.0f};
17 float3 max3 = { 1.0f, 9.0f, 4.0f};
20 _RS_ASSERT(res3.x == 1.0f);
21 _RS_ASSERT(res3.y == 2.0f);
[all …]
Dfp_mad.rscript14 data_f4[i] = (data_f4[i] * 0.02f +
15 data_f4[i+1] * 0.04f +
16 data_f4[i+2] * 0.05f +
17 data_f4[i+3] * 0.1f +
18 data_f4[i+4] * 0.2f +
19 data_f4[i+5] * 0.2f +
20 data_f4[i+6] * 0.1f +
21 data_f4[i+7] * 0.05f +
22 data_f4[i+8] * 0.04f +
23 data_f4[i+9] * 0.02f + 1.f);
[all …]
Dapitest.rscript64 volatile float f;
328 f = rsGetElementAt_float(aFloat, 0);
329 rsSetElementAt_float(aFloat, f, 0);
330 f = rsGetElementAt_float(aFloat, 0, 0);
331 rsSetElementAt_float(aFloat, f, 0, 0);
332 f = rsGetElementAt_float(aFloat, 0, 0, 0);
333 rsSetElementAt_float(aFloat, f, 0, 0, 0);
395 f4 += rsSample(allocDst, samplerNonNull, f);
396 f4 += rsSample(allocDst, samplerNonNull, f, f);
398 f4 += rsSample(allocDst, samplerNonNull, f2, f);
[all …]
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
DConvolve5x5.java44 return (v2 * p) + (v1 * (1.f-p)); in blend()
48 float f[] = new float[25]; in updateMatrix() local
49 final float f125 = 1.f / 25.f; in updateMatrix()
50 float cf1 = blend(f125, -1.f, str); in updateMatrix()
51 float cf2 = blend(f125, -3.f, str); in updateMatrix()
52 float cf3 = blend(f125, -4.f, str); in updateMatrix()
53 float cf4 = blend(f125, 6.f, str); in updateMatrix()
54 float cf5 = blend(f125, 20.f, str); in updateMatrix()
55 float cf6 = blend(f125, 0.f, str); in updateMatrix()
56 f[0] = cf1; f[1] = cf2; f[2] = cf3; f[3] = cf2; f[4] = cf1; in updateMatrix()
[all …]
DConvolve3x3.java44 return (v2 * p) + (v1 * (1.f-p)); in blend()
48 float f[] = new float[9]; in updateMatrix() local
49 float cf1 = blend(1.f / 9.f, 0.f, str); in updateMatrix()
50 float cf2 = blend(1.f / 9.f, -1.f, str); in updateMatrix()
51 float cf3 = blend(1.f / 9.f, 5.f, str); in updateMatrix()
52 f[0] = cf1; f[1] = cf2; f[2] = cf1; in updateMatrix()
53 f[3] = cf2; f[4] = cf3; f[5] = cf2; in updateMatrix()
54 f[6] = cf1; f[7] = cf2; f[8] = cf1; in updateMatrix()
55 return f; in updateMatrix()
62 float f[] = updateMatrix(1.f); in createTest() local
[all …]
/frameworks/base/core/tests/benchmarks/src/android/util/
DFloatMathBenchmark.java24 float f = 0.0f; in timeFloatMathCeil() local
26 f += FloatMath.ceil(100.123f); in timeFloatMathCeil()
28 return f; in timeFloatMathCeil()
33 float f = 0.0f; in timeFloatMathCeil_math() local
35 f += (float) Math.ceil(100.123f); in timeFloatMathCeil_math()
37 return f; in timeFloatMathCeil_math()
42 float f = 0.0f; in timeFloatMathCos() local
44 f += FloatMath.cos(100.123f); in timeFloatMathCos()
46 return f; in timeFloatMathCos()
51 float f = 0.0f; in timeFloatMathExp() local
[all …]
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
Dbugdroid.rscript25 static float sigmoid(float f) {
26 return (float) (1 / (1 + exp(f / 2)));
116 float3 p1 = { size * 0.5f, size * 0.5f, size * 0.3f };
117 float3 p2 = { size * 0.5f, size * 0.5f, size * 0.65f };
118 float radius = size * 0.22f;
120 p2.z = size * 0.4f;
122 float3 normal = { 0.0f, 0.0f, 1.0f };
123 v -= circle(p1, radius*0.9f, normal, size * 0.05f, 144, img);
125 float armOffset = 0.27f;
127 float3 p1 = { size * (0.5f - armOffset), size * 0.5f, size * 0.4f };
[all …]
/frameworks/native/vulkan/scripts/
Ddriver_generator.py205 with open(genfile, 'w') as f:
206 f.write(gencom.copyright_and_warning(2016))
208 f.write("""\
231 f.write(gencom.indent(2) + gencom.base_ext_name(ext) + ',\n')
233 f.write('\n')
235 f.write(gencom.indent(2) + 'EXTENSION_CORE_' + version + ',\n')
238 f.write("""\
256 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
259 f.write("""\
268 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
[all …]
Dapi_generator.py39 with open(genfile, 'w') as f:
52 f.write(gencom.copyright_and_warning(2016))
54 f.write("""\
71 f.write(gencom.indent(1) + entry + '\n')
73 f.write("""\
81 f.write(gencom.indent(1) + entry + '\n')
83 f.write("""\
101 f.close()
105 def _define_extension_stub(cmd, f): argument
119 f.write('VKAPI_ATTR ' + ret + ' disabled' + gencom.base_name(cmd) +
[all …]
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/
Dclamp.rscript22 float2 src2 = { 2.0f, 2.0f};
23 float2 min2 = { 0.5f, -3.0f};
24 float2 max2 = { 1.0f, 9.0f};
27 _RS_ASSERT(res2.x == 1.0f);
28 _RS_ASSERT(res2.y == 2.0f);
31 float3 src3 = { 2.0f, 2.0f, 1.0f};
32 float3 min3 = { 0.5f, -3.0f, 3.0f};
33 float3 max3 = { 1.0f, 9.0f, 4.0f};
36 _RS_ASSERT(res3.x == 1.0f);
37 _RS_ASSERT(res3.y == 2.0f);
[all …]
Dfp_mad.rscript30 data_f4[i] = (data_f4[i] * 0.02f +
31 data_f4[i+1] * 0.04f +
32 data_f4[i+2] * 0.05f +
33 data_f4[i+3] * 0.1f +
34 data_f4[i+4] * 0.2f +
35 data_f4[i+5] * 0.2f +
36 data_f4[i+6] * 0.1f +
37 data_f4[i+7] * 0.05f +
38 data_f4[i+8] * 0.04f +
39 data_f4[i+9] * 0.02f + 1.f);
[all …]
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/
Dclamp.rscript24 float2 src2 = { 2.0f, 2.0f};
25 float2 min2 = { 0.5f, -3.0f};
26 float2 max2 = { 1.0f, 9.0f};
29 _RS_ASSERT(res2.x == 1.0f);
30 _RS_ASSERT(res2.y == 2.0f);
33 float3 src3 = { 2.0f, 2.0f, 1.0f};
34 float3 min3 = { 0.5f, -3.0f, 3.0f};
35 float3 max3 = { 1.0f, 9.0f, 4.0f};
38 _RS_ASSERT(res3.x == 1.0f);
39 _RS_ASSERT(res3.y == 2.0f);
[all …]
Dapitest.rscript82 volatile float f;
348 f = rsGetElementAt_float(aFloat, 0);
349 rsSetElementAt_float(aFloat, f, 0);
350 f = rsGetElementAt_float(aFloat, 0, 0);
351 rsSetElementAt_float(aFloat, f, 0, 0);
352 f = rsGetElementAt_float(aFloat, 0, 0, 0);
353 rsSetElementAt_float(aFloat, f, 0, 0, 0);
415 f4 += rsSample(allocDst, samplerNonNull, f);
416 f4 += rsSample(allocDst, samplerNonNull, f, f);
418 f4 += rsSample(allocDst, samplerNonNull, f2, f);
[all …]
/frameworks/base/core/java/android/app/
DFragmentManager.java365 public abstract Fragment.SavedState saveFragmentInstanceState(Fragment f); in saveFragmentInstanceState() argument
462 public void onFragmentPreAttached(FragmentManager fm, Fragment f, Context context) {} in onFragmentPreAttached() argument
472 public void onFragmentAttached(FragmentManager fm, Fragment f, Context context) {} in onFragmentAttached() argument
483 public void onFragmentPreCreated(FragmentManager fm, Fragment f, in onFragmentPreCreated() argument
495 public void onFragmentCreated(FragmentManager fm, Fragment f, Bundle savedInstanceState) {} in onFragmentCreated() argument
506 public void onFragmentActivityCreated(FragmentManager fm, Fragment f, in onFragmentActivityCreated() argument
518 public void onFragmentViewCreated(FragmentManager fm, Fragment f, View v, in onFragmentViewCreated() argument
528 public void onFragmentStarted(FragmentManager fm, Fragment f) {} in onFragmentStarted() argument
537 public void onFragmentResumed(FragmentManager fm, Fragment f) {} in onFragmentResumed() argument
546 public void onFragmentPaused(FragmentManager fm, Fragment f) {} in onFragmentPaused() argument
[all …]
/frameworks/rs/tests/java_api/RsTest_16/src/com/android/rs/test/
Dfp_mad.rscript14 data_f4[i] = (data_f4[i] * 0.02f +
15 data_f4[i+1] * 0.04f +
16 data_f4[i+2] * 0.05f +
17 data_f4[i+3] * 0.1f +
18 data_f4[i+4] * 0.2f +
19 data_f4[i+5] * 0.2f +
20 data_f4[i+6] * 0.1f +
21 data_f4[i+7] * 0.05f +
22 data_f4[i+8] * 0.04f +
23 data_f4[i+9] * 0.02f + 1.f);
[all …]
/frameworks/rs/tests/java_api/RsTest_11/src/com/android/rs/test/
Dfp_mad.rscript14 data_f4[i] = (data_f4[i] * 0.02f +
15 data_f4[i+1] * 0.04f +
16 data_f4[i+2] * 0.05f +
17 data_f4[i+3] * 0.1f +
18 data_f4[i+4] * 0.2f +
19 data_f4[i+5] * 0.2f +
20 data_f4[i+6] * 0.1f +
21 data_f4[i+7] * 0.05f +
22 data_f4[i+8] * 0.04f +
23 data_f4[i+9] * 0.02f + 1.f);
[all …]
/frameworks/rs/tests/java_api/RsTest_14/src/com/android/rs/test/
Dfp_mad.rscript14 data_f4[i] = (data_f4[i] * 0.02f +
15 data_f4[i+1] * 0.04f +
16 data_f4[i+2] * 0.05f +
17 data_f4[i+3] * 0.1f +
18 data_f4[i+4] * 0.2f +
19 data_f4[i+5] * 0.2f +
20 data_f4[i+6] * 0.1f +
21 data_f4[i+7] * 0.05f +
22 data_f4[i+8] * 0.04f +
23 data_f4[i+9] * 0.02f + 1.f);
[all …]
/frameworks/rs/tests/java_api/RSUnitTests/supportlibonlysrc/com/android/rs/unittest/
Dapitest.rscript80 volatile float f;
346 f = rsGetElementAt_float(aFloat, 0);
347 rsSetElementAt_float(aFloat, f, 0);
348 f = rsGetElementAt_float(aFloat, 0, 0);
349 rsSetElementAt_float(aFloat, f, 0, 0);
350 f = rsGetElementAt_float(aFloat, 0, 0, 0);
351 rsSetElementAt_float(aFloat, f, 0, 0, 0);
413 f4 += rsSample(allocDst, samplerNonNull, f);
414 f4 += rsSample(allocDst, samplerNonNull, f, f);
416 f4 += rsSample(allocDst, samplerNonNull, f2, f);
[all …]
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/
Dyuv.rscript15 float4 ncolor = 0.f;
18 if (color.r < 0.5f) {
20 ncolor.r = 4.0f * v * v * v;
22 v = 1.0f - color.r;
23 ncolor.r = 1.0f - (4.0f * v * v * v);
26 if (color.g < 0.5f) {
28 ncolor.g = 2.0f * v * v;
30 v = 1.0f - color.g;
31 ncolor.g = 1.0f - (2.0f * v * v);
34 ncolor.b = color.b * 0.5f + 0.25f;
[all …]
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/
Dball_physics.rscript6 float2 gGravityVector = {0.f, 9.8f};
8 float2 gMinPos = {0.f, 0.f};
9 float2 gMaxPos = {1280.f, 700.f};
13 static const float gDT = 1.f / 30.f;
19 float gScale = 1.f;
37 gridPos[0] = convert_int2((ball->position / 100.f) /*- 0.4999f*/);
63 if ((len2 < 10000.f) && (len2 > 0.001f)) {
64 float len = rsqrt(len2 + 4.f);
65 float f = (len * len * len) * 20000.f;
66 fv -= vec * f;
[all …]

12345678910>>...42