Home
last modified time | relevance | path

Searched refs:float_type (Results 1 – 25 of 87) sorted by relevance

1234

/external/tensorflow/tensorflow/python/lib/core/
Dbfloat16_test.py38 def numpy_assert_allclose(a, b, float_type, **kwargs): argument
39 a = a.astype(np.float32) if a.dtype == float_type else a
40 b = b.astype(np.float32) if b.dtype == float_type else b
45 a: Type[np.generic], b: Type[np.generic], float_type: Type[np.generic],
47 if a == float_type and b == float_type:
48 return float_type
49 if a == float_type:
51 if b == float_type:
56 def truncate(x, float_type): argument
58 return x.astype(float_type).astype(np.float32)
[all …]
/external/ml_dtypes/ml_dtypes/tests/
Dcustom_float_test.py62 def numpy_assert_allclose(a, b, float_type, **kwargs): argument
63 a = a.astype(np.float32) if a.dtype == float_type else a
64 b = b.astype(np.float32) if b.dtype == float_type else b
71 float_type: Type[np.generic],
74 if a == float_type and b == float_type:
75 return float_type
76 if a == float_type:
78 if b == float_type:
83 def truncate(x, float_type): argument
85 return x.astype(float_type).astype(np.float32)
[all …]
/external/rust/android-crates-io/crates/portable-atomic/src/imp/
Dfloat.rs27 $atomic_type:ident, $float_type:ident, $atomic_int_type:ident, $int_type:ident,
32 v: UnsafeCell<$float_type>,
41 pub(crate) const fn new(v: $float_type) -> Self {
53 pub(crate) fn get_mut(&mut self) -> &mut $float_type {
64 pub(crate) fn load(&self, order: Ordering) -> $float_type {
65 $float_type::from_bits(self.as_bits().load(order))
73 pub(crate) fn store(&self, val: $float_type, order: Ordering) {
88 pub(crate) const fn as_ptr(&self) -> *mut $float_type {
97 pub(crate) fn swap(&self, val: $float_type, order: Ordering) -> $float_type {
98 $float_type::from_bits(self.as_bits().swap(val.to_bits(), order))
[all …]
/external/mesa3d/src/compiler/glsl/
Dir_expression_operation.py87 float_type = type("float", "f", "GLSL_TYPE_FLOAT") variable
91 all_types = (uint_type, int_type, float_type, double_type, uint64_type, int64_type, bool_type)
92 numeric_types = (uint_type, int_type, float_type, double_type, uint64_type, int64_type)
93 signed_numeric_types = (int_type, float_type, double_type, int64_type)
95 real_types = (float_type, double_type)
455 …operation("exp", 1, source_types=(float_type,), c_expression="expf({src0})"), # Log base e…
456 …operation("log", 1, source_types=(float_type,), c_expression="logf({src0})"), # Natural lo…
457 operation("exp2", 1, source_types=(float_type,), c_expression="exp2f({src0})"),
458 operation("log2", 1, source_types=(float_type,), c_expression="log2f({src0})"),
461 operation("f2i", 1, source_types=(float_type,), dest_type=int_type, c_expression="(int) {src0}"),
[all …]
/external/sdv/vsomeip/third_party/boost/container_hash/include/boost/container_hash/detail/
Dfloat_functions.hpp80 typedef Float float_type; typedef
88 typedef Float float_type; typedef
134 template <typename T> is<T> float_type(T);
142 typedef double float_type; typedef
157 typedef double float_type; typedef
209 sizeof(float_type(cpp_func(x,y))) \
212 sizeof(float_type(c99_func(x,y))) \
223 typedef type1 float_type; \
241 typedef type1 float_type; \
265 typedef type1 float_type; \
[all …]
/external/rust/android-crates-io/crates/portable-atomic/src/
Dlib.rs2644 $(, #[$cfg_float:meta] $atomic_float_type:ident, $float_type:ident)?
4009 atomic_int!(float, $atomic_float_type, $float_type, $atomic_type, $int_type, $align);
4016 $float_type:ident,
4025 [`", stringify!($float_type), "`].
4040 Self::new($float_type::default())
4044 impl From<$float_type> for $atomic_type {
4046 fn from(v: $float_type) -> Self {
4063 pub const fn new(v: $float_type) -> Self {
4064 static_assert_layout!($atomic_type, $float_type);
4075 can be bigger than `align_of::<", stringify!($float_type), ">()`).
[all …]
/external/angle/third_party/spirv-tools/src/source/opt/
Dconst_folding_rules.cpp28 const analysis::Float* float_type = type->AsFloat(); in GetNan() local
29 if (float_type == nullptr) { in GetNan()
33 switch (float_type->width()) { in GetNan()
48 const analysis::Float* float_type = type->AsFloat(); in GetInf() local
49 if (float_type == nullptr) { in GetInf()
53 switch (float_type->width()) { in GetInf()
79 const analysis::Float* float_type = result_type->AsFloat(); in NegateFPConst() local
80 assert(float_type != nullptr); in NegateFPConst()
81 if (float_type->width() == 32) { in NegateFPConst()
84 } else if (float_type->width() == 64) { in NegateFPConst()
[all …]
Dtype_manager.h161 Float float_type(32); in GetFloatType()
162 return GetRegisteredType(&float_type); in GetFloatType()
168 Float float_type(64); in GetDoubleType()
169 return GetRegisteredType(&float_type); in GetDoubleType()
/external/deqp-deps/SPIRV-Tools/source/opt/
Dconst_folding_rules.cpp28 const analysis::Float* float_type = type->AsFloat(); in GetNan() local
29 if (float_type == nullptr) { in GetNan()
33 switch (float_type->width()) { in GetNan()
48 const analysis::Float* float_type = type->AsFloat(); in GetInf() local
49 if (float_type == nullptr) { in GetInf()
53 switch (float_type->width()) { in GetInf()
79 const analysis::Float* float_type = result_type->AsFloat(); in NegateFPConst() local
80 assert(float_type != nullptr); in NegateFPConst()
81 if (float_type->width() == 32) { in NegateFPConst()
84 } else if (float_type->width() == 64) { in NegateFPConst()
[all …]
Dtype_manager.h161 Float float_type(32); in GetFloatType()
162 return GetRegisteredType(&float_type); in GetFloatType()
168 Float float_type(64); in GetDoubleType()
169 return GetRegisteredType(&float_type); in GetDoubleType()
/external/swiftshader/third_party/SPIRV-Tools/source/opt/
Dconst_folding_rules.cpp81 const analysis::Float* float_type = type->AsFloat(); in GetNan() local
82 if (float_type == nullptr) { in GetNan()
86 switch (float_type->width()) { in GetNan()
101 const analysis::Float* float_type = type->AsFloat(); in GetInf() local
102 if (float_type == nullptr) { in GetInf()
106 switch (float_type->width()) { in GetInf()
132 const analysis::Float* float_type = result_type->AsFloat(); in NegateFPConst() local
133 assert(float_type != nullptr); in NegateFPConst()
134 if (float_type->width() == 32) { in NegateFPConst()
137 } else if (float_type->width() == 64) { in NegateFPConst()
[all …]
Dtype_manager.h161 Float float_type(32); in GetFloatType()
162 return GetRegisteredType(&float_type); in GetFloatType()
168 Float float_type(64); in GetDoubleType()
169 return GetRegisteredType(&float_type); in GetDoubleType()
/external/sdv/vsomeip/third_party/boost/container_hash/test/
Dhash_float_test.hpp37 char const* float_type(float*) { return "float"; } in float_type() function
38 char const* float_type(double*) { return "double"; } in float_type() function
39 char const* float_type(long double*) { return "long double"; } in float_type() function
59 << float_type(static_cast<BOOST_DEDUCED_TYPENAME in float_tests()
60 boost::hash_detail::call_ldexp<T>::float_type*>(0)) in float_tests()
63 << float_type(static_cast<BOOST_DEDUCED_TYPENAME in float_tests()
64 boost::hash_detail::call_frexp<T>::float_type*>(0)) in float_tests()
67 << float_type(static_cast<BOOST_DEDUCED_TYPENAME in float_tests()
/external/angle/third_party/spirv-tools/src/source/fuzz/
Dtransformation_equation_instruction.cpp178 } else if (const auto* float_type = vector->element_type()->AsFloat()) { in MaybeGetResultTypeId() local
180 ir_context, float_type->width(), true); in MaybeGetResultTypeId()
185 ir_context, float_type->width(), false); in MaybeGetResultTypeId()
200 } else if (const auto* float_type = operand_type->AsFloat()) { in MaybeGetResultTypeId() local
202 ir_context, float_type->width(), true)) { in MaybeGetResultTypeId()
206 return fuzzerutil::MaybeGetIntegerType(ir_context, float_type->width(), in MaybeGetResultTypeId()
Dforce_render_red.cpp124 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument
131 MakeUnique<opt::analysis::FloatConstant>(float_type, zero_bytes)); in FindOrCreateFloatZeroAndOne()
133 MakeUnique<opt::analysis::FloatConstant>(float_type, one_bytes)); in FindOrCreateFloatZeroAndOne()
202 opt::analysis::Float* float_type = ir_context->get_type_mgr() in ForceRenderRed() local
206 FindOrCreateFloatZeroAndOne(ir_context.get(), float_type); in ForceRenderRed()
234 auto temp_vec4 = opt::analysis::Vector(float_type, 4); in ForceRenderRed()
267 auto float_type_id = ir_context->get_type_mgr()->GetId(float_type); in ForceRenderRed()
/external/deqp-deps/SPIRV-Tools/source/fuzz/
Dtransformation_equation_instruction.cpp178 } else if (const auto* float_type = vector->element_type()->AsFloat()) { in MaybeGetResultTypeId() local
180 ir_context, float_type->width(), true); in MaybeGetResultTypeId()
185 ir_context, float_type->width(), false); in MaybeGetResultTypeId()
200 } else if (const auto* float_type = operand_type->AsFloat()) { in MaybeGetResultTypeId() local
202 ir_context, float_type->width(), true)) { in MaybeGetResultTypeId()
206 return fuzzerutil::MaybeGetIntegerType(ir_context, float_type->width(), in MaybeGetResultTypeId()
Dforce_render_red.cpp124 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument
131 MakeUnique<opt::analysis::FloatConstant>(float_type, zero_bytes)); in FindOrCreateFloatZeroAndOne()
133 MakeUnique<opt::analysis::FloatConstant>(float_type, one_bytes)); in FindOrCreateFloatZeroAndOne()
202 opt::analysis::Float* float_type = ir_context->get_type_mgr() in ForceRenderRed() local
206 FindOrCreateFloatZeroAndOne(ir_context.get(), float_type); in ForceRenderRed()
234 auto temp_vec4 = opt::analysis::Vector(float_type, 4); in ForceRenderRed()
267 auto float_type_id = ir_context->get_type_mgr()->GetId(float_type); in ForceRenderRed()
/external/swiftshader/third_party/SPIRV-Tools/source/fuzz/
Dtransformation_equation_instruction.cpp178 } else if (const auto* float_type = vector->element_type()->AsFloat()) { in MaybeGetResultTypeId() local
180 ir_context, float_type->width(), true); in MaybeGetResultTypeId()
185 ir_context, float_type->width(), false); in MaybeGetResultTypeId()
200 } else if (const auto* float_type = operand_type->AsFloat()) { in MaybeGetResultTypeId() local
202 ir_context, float_type->width(), true)) { in MaybeGetResultTypeId()
206 return fuzzerutil::MaybeGetIntegerType(ir_context, float_type->width(), in MaybeGetResultTypeId()
Dforce_render_red.cpp124 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument
131 MakeUnique<opt::analysis::FloatConstant>(float_type, zero_bytes)); in FindOrCreateFloatZeroAndOne()
133 MakeUnique<opt::analysis::FloatConstant>(float_type, one_bytes)); in FindOrCreateFloatZeroAndOne()
202 opt::analysis::Float* float_type = ir_context->get_type_mgr() in ForceRenderRed() local
206 FindOrCreateFloatZeroAndOne(ir_context.get(), float_type); in ForceRenderRed()
234 auto temp_vec4 = opt::analysis::Vector(float_type, 4); in ForceRenderRed()
267 auto float_type_id = ir_context->get_type_mgr()->GetId(float_type); in ForceRenderRed()
/external/mesa3d/src/compiler/nir/
Dnir_lower_idiv.c103 nir_alu_type float_type = nir_type_float | (options->allow_fp16 ? sz * 2 : 32); in convert_instr_small() local
105 nir_def *p = nir_type_convert(b, numer, int_type, float_type, nir_rounding_mode_undef); in convert_instr_small()
106 nir_def *q = nir_type_convert(b, denom, int_type, float_type, nir_rounding_mode_undef); in convert_instr_small()
117 res = nir_type_convert(b, res, float_type, int_type, nir_rounding_mode_undef); in convert_instr_small()
/external/rust/android-crates-io/crates/portable-atomic/src/tests/
Dhelper.rs125 ($atomic_type:ty, $float_type:ident, single_thread) => {
126 __test_atomic_common!($atomic_type, $float_type);
163 ($atomic_type:ty, $float_type:ident) => {
164 __test_atomic_float_load_store!($atomic_type, $float_type, single_thread);
931 ($atomic_type:ty, $float_type:ident, single_thread) => {
983 let a = <$atomic_type>::new($float_type::MAX);
984 assert_eq!(a.fetch_add(1., order), $float_type::MAX);
985 assert_eq!(a.load(Ordering::Relaxed), $float_type::MAX + 1.);
996 let a = <$atomic_type>::new($float_type::MIN);
997 assert_eq!(a.fetch_sub(1., order), $float_type::MIN);
[all …]
/external/sdv/vsomeip/third_party/boost/spirit/include/boost/spirit/home/x3/numeric/
Dreal.hpp54 typedef real_parser<float> float_type; typedef
55 constexpr float_type float_ = {};
/external/tensorflow/tensorflow/compiler/mlir/lite/experimental/tac/
Dtflite_import_export.cc61 auto float_type = mlir::FloatType::getF32(module.getContext()); in AttachCostPerDevice() local
63 mlir::FloatAttr::get(float_type, static_cast<float>(cost)); in AttachCostPerDevice()
/external/pytorch/aten/src/ATen/native/
DComplexHelper.h51 const auto float_type = c10::toRealValueType(self.scalar_type()); in _view_as_real_physical() local
52 …auto real_tensor = view_tensor(self, float_type, std::move(new_storage_offset), new_sizes, new_str… in _view_as_real_physical()
/external/tensorflow/tensorflow/lite/python/
Dutil.py683 float_type = _convert_tflite_enum_type_to_tf_type(float_tensor.type)
684 if float_type != dtypes.float32:
685 if float_type == inference_input_type:
691 float_tensor.name, get_tf_type_name(float_type)))
791 float_type = _convert_tflite_enum_type_to_tf_type(float_tensor.type)
792 if float_type != dtypes.float32:
793 if float_type == inference_output_type:
799 float_tensor.name, get_tf_type_name(float_type)))

1234