Home
last modified time | relevance | path

Searched refs:asInt (Results 1 – 25 of 40) sorted by relevance

12

/third_party/node/test/js-native-api/test_conversions/
Dtest.js27 [test.asInt32, test.asUInt32, test.asInt64].forEach((asInt) => {
28 assert.strictEqual(asInt(0), 0);
29 assert.strictEqual(asInt(1), 1);
30 assert.strictEqual(asInt(1.0), 1);
31 assert.strictEqual(asInt(1.1), 1);
32 assert.strictEqual(asInt(1.9), 1);
33 assert.strictEqual(asInt(0.9), 0);
34 assert.strictEqual(asInt(999.9), 999);
35 assert.strictEqual(asInt(Number.NaN), 0);
36 assert.throws(() => asInt(undefined), numberExpected);
[all …]
/third_party/skia/tests/
DPathOpsOpLoopThreadedTest.cpp17 int asInt = SkScalarRoundToInt(x); in add_point() local
18 if (SkIntToScalar(asInt) == x) { in add_point()
19 str->appendf("%d", asInt); in add_point()
24 asInt = SkScalarRoundToInt(y); in add_point()
25 if (SkIntToScalar(asInt) == y) { in add_point()
26 str->appendf("%d", asInt); in add_point()
/third_party/vk-gl-cts/framework/randomshaders/
DrsgVariableValue.cpp78 int aMin = a.component(ndx).getMin().asInt(); in compareValueRangesAllTrue()
79 int aMax = a.component(ndx).getMax().asInt(); in compareValueRangesAllTrue()
80 int bMin = b.component(ndx).getMin().asInt(); in compareValueRangesAllTrue()
81 int bMax = b.component(ndx).getMax().asInt(); in compareValueRangesAllTrue()
240 int aMin = a.component(ndx).getMin().asInt(); in computeIntersection()
241 int aMax = a.component(ndx).getMax().asInt(); in computeIntersection()
242 int bMin = b.component(ndx).getMin().asInt(); in computeIntersection()
243 int bMax = b.component(ndx).getMax().asInt(); in computeIntersection()
DrsgBinaryOps.cpp417 ComputeValueRange()(state.getRandom(), dst.getMin().asInt(), dst.getMax().asInt(), in BinaryVecOp()
418 a.getMin().asInt(), a.getMax().asInt(), in BinaryVecOp()
419 b.getMin().asInt(), b.getMax().asInt()); in BinaryVecOp()
454 …dst.component(elemNdx).asInt(compNdx) = EvaluateComp()(a.component(elemNdx).asInt(compNdx), b.comp… in evaluate()
683 a.getMin().asInt(), a.getMax().asInt(), in RelationalOp()
684 b.getMin().asInt(), b.getMax().asInt()); in RelationalOp()
706 dst.asBool(compNdx) = EvaluateComp()(a.asInt(compNdx), b.asInt(compNdx)); in evaluate()
982 a.getMin().asInt(), a.getMax().asInt(), in EqualityComparisonOp()
983 b.getMin().asInt(), b.getMax().asInt()); in EqualityComparisonOp()
1062 …EqualityCompare<IsEqual>::compare(a.component(elemNdx).asInt(compNdx), b.component(elemNdx).asInt(… in evaluate()
DrsgUtils.cpp87 int minVal = valueRange.component(ndx).getMin().asInt(); in computeRandomValue()
88 int maxVal = valueRange.component(ndx).getMax().asInt(); in computeRandomValue()
89 dst.component(ndx).asInt() = rnd.getInt(minVal, maxVal); in computeRandomValue()
213 valueRange.getMin().component(ndx).asInt() = minVal; in computeRandomValueRange()
214 valueRange.getMax().component(ndx).asInt() = maxVal; in computeRandomValueRange()
324 int minVal = valueRange.component(ndx).getMin().asInt(); in computeRangeLengthSum()
325 int maxVal = valueRange.component(ndx).getMax().asInt(); in computeRangeLengthSum()
DrsgVariableValue.hpp102 int asInt (void) const { DE_STATIC_ASSERT(Stride == 1); return m_value->intVal; } in asInt() function in rsg::ConstStridedValueAccess
107 …int asInt (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, Stride)); return m_value[nd… in asInt() function in rsg::ConstStridedValueAccess
135 int& asInt (void) { DE_STATIC_ASSERT(Stride == 1); return this->m_value->intVal; } in asInt() function in rsg::StridedValueAccess
140 …int& asInt (int ndx) { DE_ASSERT(de::inBounds(ndx, 0, Stride)); return this->m_value[ndx… in asInt() function in rsg::StridedValueAccess
154 StridedValueAccess& operator= (int intVal) { asInt() = intVal; return *this; } in operator =()
DrsgExpression.cpp190 valueRange.getMin().component(ndx).asInt() = minVal; in computeRandomValueRangeForInfElements()
191 valueRange.getMax().component(ndx).asInt() = maxVal; in computeRandomValueRangeForInfElements()
437 minVal = valueRange.getMin().component(0).asInt(); in IntLiteral()
438 maxVal = valueRange.getMax().component(0).asInt(); in IntLiteral()
451 access.asInt(ndx) = value; in IntLiteral()
460 int minVal = valueRange.getMin().asInt(); in getWeight()
461 int maxVal = valueRange.getMax().asInt(); in getWeight()
480 str << Token(m_value.getValue(VariableType::getScalarType(VariableType::TYPE_INT)).asInt(0)); in tokenize()
614 template<> inline int getValueAccessValue<int> (ConstValueAccess access) { return access.asInt(… in getValueAccessValue()
619 template<> inline int& getValueAccessValue<int> (ValueAccess access) { return access.asInt(); } in getValueAccessValue()
[all …]
DrsgExecutionContext.cpp78 int samplerNdx = samplerVal->getValue(sampler->getType()).asInt(0); in getSampler2D()
87 int samplerNdx = samplerVal->getValue(sampler->getType()).asInt(0); in getSamplerCube()
/third_party/vk-gl-cts/modules/gles2/functional/
Des2fShaderOperatorTests.cpp170 …in1, const Vec2& in2) { DE_UNREF(in1); return (in2 + Vec2(1.0f) + Vec2((float)in0)).asInt(); } in sequenceSideEffCase2()
172 …eturn in1 + (in0 + Vec4((float)in2.x(), (float)in2.y(), (float)in2.z(), (float)in2.w())).asInt(); } in sequenceSideEffCase3()
178 …SideEffCase3(ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceNoSideEffCase3()
182 …SideEffCase3(ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceSideEffCase3()
666 …c2 (ShaderEvalContext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt()).asFloat(); } \
667 …(ShaderEvalContext& c) { c.color.xyz() = FUNC_NAME(c.in[0].swizzle(2, 0, 1).asInt()).asFloat(); } \
668 …ec4 (ShaderEvalContext& c) { c.color = FUNC_NAME(c.in[0].swizzle(1, 2, 3, 0).asInt()).asFloat(); }
672 …ext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt(), c.in[1].swizzle(1, 0).asInt())…
673 …c) { c.color.xyz() = FUNC_NAME(c.in[0].swizzle(2, 0, 1).asInt(), c.in[1].swizzle(1, 2, 0).asInt()…
674 … c) { c.color = FUNC_NAME(c.in[0].swizzle(1, 2, 3, 0).asInt(), c.in[1].swizzle(3, 2, 1, 0).asInt(…
[all …]
Des2fMultisampleTests.cpp839 IVec2 p0Win = ((region.p0+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
840 IVec2 p1Win = ((region.p1+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
841 IVec2 p2Win = ((region.p2+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
842 IVec2 p3Win = ((region.p3+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
/third_party/skia/src/ports/skia_ohos/
DHmSymbolConfig_ohos.cpp357 animationPara.animationMode = root[key].asInt(); in parseSymbolAnimationPara()
444 piecewiseParameter.duration = root[key].asInt(); in parseSymbolPiecewisePara()
450 piecewiseParameter.delay = root[key].asInt(); in parseSymbolPiecewisePara()
533 nativeGlyphId = root[key].asInt(); in parseOneSymbol()
539 symbolLayersGroups.symbolGlyphId = root[key].asInt(); in parseOneSymbol()
593 components.push_back(root[i].asInt()); in parseComponets()
699 indexes.push_back(root[i].asInt()); in parseLayerOrMaskIndexes()
759 animationSetting.animationMode = root[ANIMATION_MODE].asInt(); in parseAnimationSetting()
810 groupSetting.animationIndex = root[ANIMATION_INDEX].asInt(); in parseGroupSetting()
DFontConfig_ohos.cpp621 int weight = root[key].asInt(); in parseAlias()
657 values[i] = root[key].asInt(); in parseAdjust()
798 info.weight = root[key].asInt(); in parseVariation()
803 info.width = root[key].asInt(); in parseVariation()
840 TtcIndexInfo item = { SkString(root[0].asCString()), root[1].asInt() }; in parseTtcIndex()
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/shaderrender/
DvktShaderRenderOperatorTests.cpp142 …ector<deUint32, Size> subOne (const Vector<deUint32, Size>& v) { return (v.asInt() - 1).asUint(); } in subOne()
149 … subVecScalar (const Vector<deUint32, Size>& v, deUint32 s) { return (v.asInt() - (int)s).asUint… in subVecScalar()
184 …in1, const Vec2& in2) { DE_UNREF(in1); return (in2 + Vec2(1.0f) + Vec2((float)in0)).asInt(); } in sequenceSideEffCase2()
186 …eturn in1 + (in0 + Vec4((float)in2.x(), (float)in2.y(), (float)in2.z(), (float)in2.w())).asInt(); } in sequenceSideEffCase3()
192 …deEffCase3 (ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceNoSideEffCase3()
196 …eEffCase3 (ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceSideEffCase3()
876 …c2 (ShaderEvalContext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt()).asFloat(); } \
877 …(ShaderEvalContext& c) { c.color.xyz() = FUNC_NAME(c.in[0].swizzle(2, 0, 1).asInt()).asFloat(); } \
878 …ec4 (ShaderEvalContext& c) { c.color = FUNC_NAME(c.in[0].swizzle(1, 2, 3, 0).asInt()).asFloat(); }
882 …ext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt(), c.in[1].swizzle(1, 0).asInt())…
[all …]
/third_party/icu/icu4c/source/test/intltest/
Ditrbnf.cpp532 LLAssert(llong((int32_t)0).asInt() == (int32_t)0);
533 LLAssert(llong((int32_t)1).asInt() == (int32_t)1);
534 LLAssert(llong((int32_t)-1).asInt() == (int32_t)-1);
535 LLAssert(llong((int32_t)0x7fffffff).asInt() == (int32_t)0x7fffffff);
536 LLAssert(llong((int32_t)0xffffffff).asInt() == (int32_t)-1);
537 LLAssert(llong((int32_t)0x80000000).asInt() == (int32_t)0x80000000);
540 LLAssert(llong((int16_t)0).asInt() == (int16_t)0);
541 LLAssert(llong((int16_t)1).asInt() == (int16_t)1);
542 LLAssert(llong((int16_t)-1).asInt() == (int16_t)-1);
543 LLAssert(llong((int16_t)0x7fff).asInt() == (int16_t)0x7fff);
[all …]
/third_party/vk-gl-cts/modules/gles3/functional/
Des3fShaderOperatorTests.cpp171 …ector<deUint32, Size> subOne (const Vector<deUint32, Size>& v) { return (v.asInt() - 1).asUint(); } in subOne()
178 … subVecScalar (const Vector<deUint32, Size>& v, deUint32 s) { return (v.asInt() - (int)s).asUint… in subVecScalar()
260 …in1, const Vec2& in2) { DE_UNREF(in1); return (in2 + Vec2(1.0f) + Vec2((float)in0)).asInt(); } in sequenceSideEffCase2()
262 …eturn in1 + (in0 + Vec4((float)in2.x(), (float)in2.y(), (float)in2.z(), (float)in2.w())).asInt(); } in sequenceSideEffCase3()
268 …deEffCase3 (ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceNoSideEffCase3()
272 …eEffCase3 (ctx.in[0].swizzle(1, 2, 3, 0), ctx.in[1].swizzle(3, 2, 1, 0).asInt(), greaterThan(ctx… in evalSequenceSideEffCase3()
1160 …c2 (ShaderEvalContext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt()).asFloat(); } \
1161 …(ShaderEvalContext& c) { c.color.xyz() = FUNC_NAME(c.in[0].swizzle(2, 0, 1).asInt()).asFloat(); } \
1162 …ec4 (ShaderEvalContext& c) { c.color = FUNC_NAME(c.in[0].swizzle(1, 2, 3, 0).asInt()).asFloat(); }
1166 …ext& c) { c.color.yz() = FUNC_NAME(c.in[0].swizzle(3, 1).asInt(), c.in[1].swizzle(1, 0).asInt())…
[all …]
Des3fMultisampleTests.cpp1001 IVec2 p0Win = ((region.p0+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
1002 IVec2 p1Win = ((region.p1+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
1003 IVec2 p2Win = ((region.p2+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
1004 IVec2 p3Win = ((region.p3+1.0f) * 0.5f * (float)(m_viewportSize-1) + 0.5f).asInt(); in iterate()
Des3fFragmentOutputTests.cpp691 const IVec4 fmtMinVal = (-(tcu::Vector<deInt64, 4>(1) << shift.cast<deInt64>())).asInt(); in iterate()
692 …const IVec4 fmtMaxVal = ((tcu::Vector<deInt64, 4>(1) << shift.cast<deInt64>())-deInt64(1)).asInt(); in iterate()
701 …4 step = ((maxVal.cast<deInt64>() - minVal.cast<deInt64>()) / (rangeDiv.cast<deInt64>())).asInt(); in iterate()
/third_party/vk-gl-cts/external/openglcts/modules/gles31/
Des31cLayoutBindingTests.cpp379 IntegerConstant(Literals lit, int ai) : asInt(ai) in IntegerConstant()
385 s << asInt; in IntegerConstant()
388 s << asInt << "u"; in IntegerConstant()
391 s << asInt << "U"; in IntegerConstant()
394 s << "0" << std::oct << asInt; in IntegerConstant()
397 s << "0" << std::oct << asInt << "u"; in IntegerConstant()
400 s << "0" << std::oct << asInt << "U"; in IntegerConstant()
403 s << "0x" << std::hex << asInt; in IntegerConstant()
406 s << "0X" << std::hex << asInt; in IntegerConstant()
409 s << "0x" << std::hex << asInt << "u"; in IntegerConstant()
[all …]
/third_party/vk-gl-cts/modules/glshared/
DglsRandomShaderCase.cpp229 int unitNdx = uniformIter->getValue().asInt(0); in init()
438 case rsg::VariableType::TYPE_INT: message << value.component(elementNdx).asInt(); break; in operator <<()
440 …case rsg::VariableType::TYPE_SAMPLER_2D: message << value.component(elementNdx).asInt(); bre… in operator <<()
441 …case rsg::VariableType::TYPE_SAMPLER_CUBE: message << value.component(elementNdx).asInt(); b… in operator <<()
/third_party/vk-gl-cts/modules/gles31/functional/
Des31fShaderFramebufferFetchTests.cpp396 maxStr = de::toString(maxValue.asInt()); in genShaderSources()
397 minStr = de::toString(minValue.asInt()); in genShaderSources()
447 tcu::clear(data.getAccess(), color.asInt()); in genAttachementTexture()
521 m_gl.uniform4iv(colorLocation, 1, color.asInt().getPtr()); in genUniformColor()
616 …rence.getAccess(), tcu::clamp(fbColor.asInt() + uniformColor.asInt(), formatMinValue.asInt(), form… in genReferenceTexture()
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/runtime/
Dwasm-runtime.cpp112 int asInt() const { return Ptr; } in asInt() function in __anonf4832caa0211::WasmPtr
272 return trace(WasmPtr<char>(GlobalData->StrBuf).asInt()); in env$$ctime()
/third_party/skia/third_party/externals/sfntly/java/src/com/google/typography/font/sfntly/table/core/
DOS2Table.java558 public static int asInt(EnumSet<FsSelection> fsSelectionSet) { in asInt() method in OS2Table.FsSelection
991 this.setFsSelection(FsSelection.asInt(fsSelection)); in fsSelection()
/third_party/skia/third_party/externals/angle2/src/compiler/translator/
DBuildSPIRV.cpp1287 uint32_t asInt = static_cast<uint32_t>(value); in getBoolConstant() local
1289 spirv::IdRef constantId = mBoolConstants[asInt]; in getBoolConstant()
1298 mBoolConstants[asInt] = constantId = getNewId({}); in getBoolConstant()
/third_party/skia/third_party/externals/angle2/src/feature_support_util/
Dfeature_support_util.cpp168 return IntegerPart(parent[key].asInt()); in FromJson()
/third_party/vk-gl-cts/framework/common/
DtcuVector.hpp150 Vector<int, Size> asInt (void) const { return cast<int>(); } in asInt() function in tcu::Vector

12