本文整理汇总了C++中JavascriptSIMDFloat64x2类的典型用法代码示例。如果您正苦于以下问题:C++ JavascriptSIMDFloat64x2类的具体用法?C++ JavascriptSIMDFloat64x2怎么用?C++ JavascriptSIMDFloat64x2使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JavascriptSIMDFloat64x2类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PROBE_STACK
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;
}
示例2: PROBE_STACK
Var SIMDFloat64x2Lib::EntryGreaterThanOrEqual(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 any of the args are missing, then it is Undefined type which causes TypeError exception.
// strict type on both operands
if (args.Info.Count >= 3 && JavascriptSIMDFloat64x2::Is(args[1]) && JavascriptSIMDFloat64x2::Is(args[2]))
{
JavascriptSIMDFloat64x2 *a = JavascriptSIMDFloat64x2::FromVar(args[1]);
JavascriptSIMDFloat64x2 *b = JavascriptSIMDFloat64x2::FromVar(args[2]);
Assert(a && b);
SIMDValue result, aValue, bValue;
aValue = a->GetValue();
bValue = b->GetValue();
result = SIMDFloat64x2Operation::OpGreaterThanOrEqual(aValue, bValue);
return JavascriptSIMDInt32x4::New(&result, scriptContext);
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdFloat64x2TypeMismatch, L"greaterThanOrEqual");
}