/third_party/skia/resources/sksl/shared/ |
D | NumberConversions.sksl | 9 half h = half(unknownInput); 47 sk_FragColor.r = half(s) + half(i) + half(us) + half(ui) + half(h) + half(f) + half(s2s) + 48 half(i2s) + half(us2s) + half(ui2s) + half(h2s) + half(f2s) + half(b2s) + 49 half(s2i) + half(i2i) + half(us2i) + half(ui2i) + half(h2i) + half(f2i) + 50 half(b2i) + half(s2us) + half(i2us) + half(us2us); 51 sk_FragColor.r += half(ui2us) + half(h2us) + half(f2us) + half(b2us) + half(s2ui) + half(i2ui) + 52 half(us2ui) + half(ui2ui) + half(h2ui) + half(f2ui) + half(b2ui) + half(s2f) + 53 half(i2f) + half(us2f) + half(ui2f) + half(h2f) + half(f2f) + half(b2f);
|
D | ScalarConversionConstructorsES3.sksl | 26 return half(f1) + half(f2) + half(f3) + half(f4) + 27 half(i1) + half(i2) + half(i3) + half(i4) + 28 half(u1) + half(u2) + half(u3) + half(u4) + 29 half(b1) + half(b2) + half(b3) + half(b4) == 16 ? colorGreen : colorRed;
|
D | VectorConstructors.sksl | 9 return half(v1.x) + half(v2.x) + half(v3.x) + half(v4.x) + 10 half(v5.x) + half(v6.x) + half(v7.x) + half(v8.x) + 11 half(v9.x) + half(v10.x) + half(v11.x) + half(v12.x) + 12 half(v13.x) + half(v14.x) + half(v15.x) + half(v16.x) + 13 half(v17.x) == 17;
|
/third_party/skia/tests/sksl/shared/ |
D | NumberConversions.metal | 20 half h = half(_uniforms.unknownInput); 57 …half(s) + half(i)) + half(us)) + half(ui)) + h) + half(f)) + half(s2s)) + half(i2s)) + half(us2s))… 58 …half(ui2us) + half(h2us)) + half(f2us)) + half(b2us)) + half(s2ui)) + half(i2ui)) + half(us2ui)) +…
|
D | ScalarConversionConstructorsES3.metal | 36 …half(f1) + half(f2)) + half(f3)) + half(f4)) + half(i1)) + half(i2)) + half(i3)) + half(i4)) + hal…
|
/third_party/boost/libs/rational/test/ |
D | rational_example.cpp | 45 rational<int> half(1,2); in main() local 50 assert(half.numerator() == 1); in main() 51 assert(half.denominator() == 2); in main() 52 assert(boost::rational_cast<double>(half) == 0.5); in main() 55 assert(half + half == one); in main() 56 assert(one - half == half); in main() 57 assert(two * half == one); in main() 58 assert(one / half == two); in main() 61 assert(half+half == 1); in main() 62 assert(2 * half == one); in main() [all …]
|
/third_party/skia/resources/sksl/errors/ |
D | VectorIndexOutOfRange.sksl | 1 void half4_neg1() { half4 h; half v = h[-1]; } 2 void half4_0() { half4 h; half v = h[0]; } 3 void half4_1() { half4 h; half v = h[1]; } 4 void half4_2() { half4 h; half v = h[2]; } 5 void half4_3() { half4 h; half v = h[3]; } 6 void half4_4() { half4 h; half v = h[4]; } 7 void half4_huge() { half4 h; half v = h[1000000000]; } 9 void half3_neg1() { half3 h; half v = h[-1]; } 10 void half3_0() { half3 h; half v = h[0]; } 11 void half3_1() { half3 h; half v = h[1]; } [all …]
|
/third_party/boost/libs/safe_numerics/test/ |
D | test_rational.cpp | 47 rational<int_type> half(1,2); in main() local 52 assert(half.numerator() == 1); in main() 53 assert(half.denominator() == 2); in main() 62 assert(half + half == one); in main() 63 assert(one - half == half); in main() 64 assert(two * half == one); in main() 65 assert(one / half == two); in main() 68 assert(half+half == 1); in main() 69 assert(2 * half == one); in main() 70 assert(2 * half == 1); in main() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/ |
D | sync_batch_norm_grad_impl.cu | 25 __inline__ __device__ float HalfFloatInputConvert(const half val) { return __half2float(val); } in HalfFloatInputConvert() 28 __inline__ __device__ void HalfFloatOutputAssign(const float val, half *arr, int idx) { arr[idx] = … in HalfFloatOutputAssign() 151 template void CalSyncBatchNormGradPre<float, half>(size_t N, size_t C, size_t H, size_t W, const fl… 152 … const float *dy, half *saved_mean, half *saved_invstd, 154 template void CalSyncBatchNormGradPre<half, float>(size_t N, size_t C, size_t H, size_t W, const ha… 155 … const half *dy, float *saved_mean, float *saved_invstd, 157 template void CalSyncBatchNormGradPre<half, half>(size_t N, size_t C, size_t H, size_t W, const hal… 158 … const half *dy, half *saved_mean, half *saved_invstd, 166 template void CalSyncBatchNormGradPost<half, float, float>(size_t N, size_t C, size_t H, size_t W, … 167 … const half *dy, half *dx, float *saved_mean, [all …]
|
D | gelu_impl.cu | 34 __global__ void GeluKernel(size_t size, half *input_addr, half *output_addr) { in GeluKernel() 36 half x = input_addr[pos]; in GeluKernel() 37 float tanh_res = tanh(__half2float(half(0.7978845608) * (x + half(0.044715) * x * x * x))); in GeluKernel() 38 output_addr[pos] = half(0.5) * x * (half(1.0) + __float2half(tanh_res)); in GeluKernel() 60 void Gelu(size_t size, half *input_addr, half *output_addr, cudaStream_t cuda_stream) { in Gelu() 65 …GeluKernel<half><<<GET_BLOCKS(size), GET_THREADS, 0, cuda_stream>>>(size, input_addr, output_addr); in Gelu() 103 __global__ void GeluGradKernel(size_t size, half *dy_addr, half *x_addr, half *dx_addr) { in GeluGradKernel() 105 half x = x_addr[pos]; in GeluGradKernel() 106 half tanh_param = half(0.7978845608) * (x + half(0.044715) * x * x * x); in GeluGradKernel() 107 half tanh_res = __float2half_rn(tanh(__half2float(tanh_param))); in GeluGradKernel() [all …]
|
D | adagrad_impl.cu | 25 __device__ __forceinline__ half SqrtFunc(half input) { in SqrtFunc() 48 const half *gradient, in ApplyAdagradKernel() 49 half *variable, in ApplyAdagradKernel() 50 half *accumulation) { in ApplyAdagradKernel() 63 const half *gradient, in ApplyAdagradKernel() 77 const half *learning_rate, in ApplyAdagradKernel() 94 half *variable, in ApplyAdagradKernel() 95 half *accumulation) { in ApplyAdagradKernel() 124 template void ApplyAdagrad<half, half, half>(const size_t size, 126 const half *learning_rate, [all …]
|
D | unary_op_grad_impl.cu | 53 __global__ void AsinGradKernel(const half *input, const half *dout, half *output, const size_t coun… in AsinGradKernel() 55 half one = 1; in AsinGradKernel() 56 half sqt = hsqrt(one - input[i] * input[i]); in AsinGradKernel() 74 __global__ void ACosGradKernel(const half *input, const half *dout, half *output, const size_t coun… in ACosGradKernel() 76 half neg_one = -1; in ACosGradKernel() 77 half one = 1; in ACosGradKernel() 78 half sqt = hsqrt(one - input[i] * input[i]); in ACosGradKernel() 206 template void SqrtGrad<half>(const half *input, const half *dout, half *output, const size_t count, 208 template void RsqrtGrad<half>(const half *input, const half *dout, half *output, const size_t count, 210 template void AsinGrad<half>(const half *input, const half *dout, half *output, const size_t count, [all …]
|
D | adam_impl.cu | 25 __device__ __forceinline__ half SqrtFunc(half input) { in SqrtFunc() 58 __global__ void AdamWeightDecayKernel(const size_t size, const half *gradient, const float *learnin… in AdamWeightDecayKernel() 60 half *variable, half *m, half *v) { in AdamWeightDecayKernel() 62 half next_m = __float2half(beta1[0]) * m[i] + __float2half(1 - beta1[0]) * gradient[i]; in AdamWeightDecayKernel() 63 …half next_v = __float2half(beta2[0]) * v[i] + __float2half(1 - beta2[0]) * gradient[i] * gradient[… in AdamWeightDecayKernel() 64 half update = next_m / (hsqrt(next_v) + __float2half(epsilon[0])); in AdamWeightDecayKernel() 89 template void ApplyAdam<half>(const size_t size, const half *gradient, const half *beta1_power, con… 90 … const half *learning_rate, const half *beta1, const half *beta2, const half *epsilon, 91 half *variable, half *m, half *v, cudaStream_t cuda_stream); 95 template void AdamWeightDecayOp<half>(const size_t size, const half *gradient, const float *learnin… [all …]
|
D | layer_norm_grad_grad_impl.cu | 36 inline __device__ half my_pow(half a, double b) { in my_pow() 231 … const half &epsilon, half *sum5, half *sum6, half *sum7, in InputThreadReduceOuterMean() 232 … half *share_mem, const half *dy, const half *x, const half *mean, in InputThreadReduceOuterMean() 233 … const half *var, const half *gamma, const half *grad_dx, in InputThreadReduceOuterMean() 234 const half *grad_dg, half *d_x) { in InputThreadReduceOuterMean() 245 half v1 = x[pos] - mean[row]; in InputThreadReduceOuterMean() 246 half v2 = my_pow(var[row] + epsilon, -0.5); in InputThreadReduceOuterMean() 247 half v3 = dy[pos] * gamma[gamma_offset]; in InputThreadReduceOuterMean() 248 …half v4 = v3 - share_mem[2] * __float2half(1.0 / col_dim) - v1 * v2 * share_mem[3] * __float2half(… in InputThreadReduceOuterMean() 249 half v5 = v3 * share_mem[1] * __float2half(1.0 / col_dim); in InputThreadReduceOuterMean() [all …]
|
D | loss_with_reduction_impl.cu | 23 inline __device__ half logT(half x) { return hlog(x); } in logT() 25 inline __device__ half castT(half ref, int x) { return __int2half_rd(x); } in castT() 27 inline __device__ half maxT(half a, half b) { return a > b ? a : b; } in maxT() 62 __device__ void MultiplyDevice(const half a, const float b, float *out) { in MultiplyDevice() 69 __device__ void MultiplyDevice(const float a, const half b, half *out) { in MultiplyDevice() 82 __global__ void Divide(const float *numerator, const half *denominator, float *result) { in Divide() 89 __global__ void Divide(const half *numerator, const float *denominator, half *result) { in Divide() 404 template void NLLLoss<float, half>(const int n, const int c, const int reduction, const float *inpu… 405 … const int32_t *target, const half *weight, float *loss, half *total_weight, 406 float *tmp_loss, half *tmp_target_weight, cudaStream_t stream); [all …]
|
/third_party/skia/third_party/externals/swiftshader/src/Common/ |
D | Half.hpp | 20 class half class 23 half() = default; 24 half(const half& h) = default; 25 explicit half(float f); 29 half &operator=(const half& h) = default; 30 half &operator=(float f); 36 inline half shortAsHalf(short s) in shortAsHalf() 40 half h; in shortAsHalf() 57 void toRGB16F(half rgb[3]) const in toRGB16F() 62 rgb[0] = half(R * factor); in toRGB16F() [all …]
|
/third_party/boost/boost/detail/ |
D | binary_search.hpp | 43 typename traits::difference_type half; in lower_bound() local 47 half = len >> 1; in lower_bound() 49 std::advance(middle, half); in lower_bound() 53 len = len - half - 1; in lower_bound() 56 len = half; in lower_bound() 68 typename traits::difference_type half; in lower_bound() local 72 half = len >> 1; in lower_bound() 74 std::advance(middle, half); in lower_bound() 78 len = len - half - 1; in lower_bound() 81 len = half; in lower_bound() [all …]
|
/third_party/openGLES/extensions/NV/ |
D | NV_half_float.txt | 54 half-precision (16-bit) floating-point quantities. The floating-point 60 This extension allows applications to use half-precision floating point 71 What should the new data type be called? "half"? "hfloat"? In addition, 74 RESOLVED: half and "h". This convention builds on the convention of 76 numbers. Here, "half" will refer to half-precision floating-point 82 have reflected a second-class status better than "half/h". 84 Both names are not without conflicting precedents. The name "half" is 89 Should we provide immediate-mode entry points for half-precision 95 Should we support half-precision floating-point color index data? 99 Should half-precision data be accepted by all commands that accept pixel [all …]
|
/third_party/skia/third_party/externals/opengl-registry/extensions/NV/ |
D | NV_half_float.txt | 54 half-precision (16-bit) floating-point quantities. The floating-point 60 This extension allows applications to use half-precision floating point 71 What should the new data type be called? "half"? "hfloat"? In addition, 74 RESOLVED: half and "h". This convention builds on the convention of 76 numbers. Here, "half" will refer to half-precision floating-point 82 have reflected a second-class status better than "half/h". 84 Both names are not without conflicting precedents. The name "half" is 89 Should we provide immediate-mode entry points for half-precision 95 Should we support half-precision floating-point color index data? 99 Should half-precision data be accepted by all commands that accept pixel [all …]
|
/third_party/skia/resources/sksl/inliner/ |
D | InlinerManglesNames.sksl | 3 half add(half a, half b) { 4 half c = a + b; 8 half mul(half a, half b) { 12 half fma(half a, half b, half c) { 17 half a = fma(color.x, color.y, color.z); 18 half b = fma(color.y, color.z, color.w); 19 half c = fma(color.z, color.w, color.x);
|
/third_party/ffmpeg/libavcodec/x86/ |
D | qpeldsp_init.c | 103 uint8_t *const half = (uint8_t *) temp; \ 104 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \ 106 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \ 123 uint8_t *const half = (uint8_t *) temp; \ 124 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \ 126 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + 1, half, stride, \ 135 uint8_t *const half = (uint8_t *) temp; \ 136 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \ 138 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \ 155 uint8_t *const half = (uint8_t *) temp; \ [all …]
|
/third_party/boost/boost/move/algo/detail/ |
D | merge_sort.hpp | 72 size_type const half = count/2; in merge_sort_copy() local 73 merge_sort_copy(first + half, last , dest+half , comp); in merge_sort_copy() 74 merge_sort_copy(first , first + half, first + half, comp); in merge_sort_copy() 76 ( first + half, first + half + half in merge_sort_copy() 77 , dest, dest+half, dest + count in merge_sort_copy() 95 size_type const half = count/2; in merge_sort_uninitialized_copy() local 96 merge_sort_uninitialized_copy(first + half, last, uninitialized + half, comp); in merge_sort_uninitialized_copy() 97 destruct_n<value_type, RandItRaw> d(uninitialized+half); in merge_sort_uninitialized_copy() 98 d.incr(count-half); in merge_sort_uninitialized_copy() 99 merge_sort_copy(first, first + half, first + half, comp); in merge_sort_uninitialized_copy() [all …]
|
/third_party/skia/third_party/externals/spirv-cross/reference/shaders-msl-no-opt/asm/tesc/ |
D | tess-level-initializer-quad.asm.tesc | 58 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(0.0); 59 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(0.0); 60 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(0.0); 61 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[3] = half(0.0); 62 spvTessLevel[gl_PrimitiveID].insideTessellationFactor[0] = half(0.0); 63 spvTessLevel[gl_PrimitiveID].insideTessellationFactor[1] = half(0.0); 64 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(0.0); 65 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(0.0); 66 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(0.0); 67 spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[3] = half(0.0); [all …]
|
/third_party/skia/third_party/externals/spirv-cross/reference/shaders-msl-no-opt/frag/ |
D | fp16.desktop.invalid.frag | 16 half v1 [[user(locn0)]]; 58 half a = half(1.0); 59 half b = half(1.5); 60 half c = half(-1.5); 61 half d = half(0.0 / 0.0); 62 half e = half(1.0 / 0.0); 63 half f = half(-1.0 / 0.0); 64 half g = half(1014.0); 65 half h = half(9.5367431640625e-07); 69 half test_result() [all …]
|
/third_party/skia/tests/sksl/metal/ |
D | OutParams.metal | 9 void out_half_vh(thread half& v); 10 void _skOutParamHelper0_out_half_vh(thread half& h) { 11 half _var0; 33 void out_half_vh(thread half& v); 35 half _var0; 51 void out_pair_vhh(thread half& v1, thread half& v2); 52 void _skOutParamHelper7_out_pair_vhh(thread half& h, thread half& h1) { 53 half _var0; 54 half _var1; 59 void out_pair_vhh(thread half& v1, thread half& v2); [all …]
|