本文整理汇总了C++中JavascriptSIMDFloat64x2::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ JavascriptSIMDFloat64x2::GetValue方法的具体用法?C++ JavascriptSIMDFloat64x2::GetValue怎么用?C++ JavascriptSIMDFloat64x2::GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JavascriptSIMDFloat64x2
的用法示例。
在下文中一共展示了JavascriptSIMDFloat64x2::GetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ARGUMENTS
Var SIMDFloat64x2Lib::EntryClamp(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
// we expect at least 3 explicit args with Float64x2 type
if (args.Info.Count >= 4 &&
JavascriptSIMDFloat64x2::Is(args[1]) &&
JavascriptSIMDFloat64x2::Is(args[2]) &&
JavascriptSIMDFloat64x2::Is(args[3]))
{
JavascriptSIMDFloat64x2 *t = JavascriptSIMDFloat64x2::FromVar(args[1]);
JavascriptSIMDFloat64x2 *lower = JavascriptSIMDFloat64x2::FromVar(args[2]);
JavascriptSIMDFloat64x2 *upper = JavascriptSIMDFloat64x2::FromVar(args[3]);
Assert(t && lower && upper);
SIMDValue tValue, lowerValue, upperValue, resultValue;
tValue = t->GetValue();
lowerValue = lower->GetValue();
upperValue = upper->GetValue();
resultValue = SIMDFloat64x2Operation::OpClamp(tValue, lowerValue, upperValue);
return JavascriptSIMDFloat64x2::New(&resultValue, scriptContext);
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdFloat64x2TypeMismatch, L"clamp");
}
示例2: ARGUMENTS
Var JavascriptSIMDFloat64x2::EntryToString(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count == 0 || JavascriptOperators::GetTypeId(args[0]) != TypeIds_SIMDFloat64x2)
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedSimd, L"SIMDFloat64x2.toString");
}
JavascriptSIMDFloat64x2 *instance = JavascriptSIMDFloat64x2::FromVar(args[0]);
Assert(instance);
wchar_t stringBuffer[SIMD_STRING_BUFFER_MAX];
SIMDValue value = instance->GetValue();
JavascriptSIMDFloat64x2::ToStringBuffer(value, stringBuffer, SIMD_STRING_BUFFER_MAX);
JavascriptString* string = JavascriptString::NewCopySzFromArena(stringBuffer, scriptContext, scriptContext->GeneralAllocator());
return string;
}