本文整理汇总了C++中UlamValue::putData方法的典型用法代码示例。如果您正苦于以下问题:C++ UlamValue::putData方法的具体用法?C++ UlamValue::putData怎么用?C++ UlamValue::putData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UlamValue
的用法示例。
在下文中一共展示了UlamValue::putData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: appendBinaryOp
void NodeBinaryOpArithSubtract::appendBinaryOp(UlamValue& refUV, u32 ldata, u32 rdata, u32 pos, u32 len)
{
UTI type = refUV.getUlamValueTypeIdx();
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
refUV.putData(pos, len, _BinOpSubtractInt32(ldata, rdata, len));
break;
case Unsigned:
refUV.putData(pos, len, _BinOpSubtractUnsigned32(ldata, rdata, len));
break;
case Bool:
refUV.putData(pos, len, _BinOpSubtractBool32(ldata, rdata, len));
break;
case Unary:
refUV.putData(pos, len, _BinOpSubtractUnary32(ldata, rdata, len));
break;
case Bits:
default:
assert(0);
break;
};
return;
} //appendBinaryOp
示例2: appendBinaryOp
void NodeBinaryOpShiftLeft::appendBinaryOp(UlamValue& refUV, u32 ldata, u32 rdata, u32 pos, u32 len)
{
assert(0); //not implemented yet!
#if 0
UTI type = refUV.getUlamValueTypeIdx();
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
refUV.putData(pos, len, _ShiftOpLeftInt32(ldata, rdata, len));
break;
case Unsigned:
refUV.putData(pos, len, _ShiftOpLeftUnsigned32(ldata, rdata, len));
break;
case Bool:
refUV.putData(pos, len, _ShiftOpLeftBool32(ldata, rdata, len));
break;
case Unary:
refUV.putData(pos, len, _ShiftOpLeftUnary32(ldata, rdata, len));
break;
case Bits:
case Unary:
refUV.putData(pos, len, _ShiftOpLeftBits32(ldata, rdata, len));
break;
default:
assert(0);
break;
};
#endif
return;
} //appendBinaryOp
示例3: appendBinaryOp
void NodeBinaryOpEqualArithRemainder::appendBinaryOp(UlamValue& refUV, u32 ldata, u32 rdata, u32 pos, u32 len)
{
UTI type = refUV.getUlamValueTypeIdx();
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
refUV.putData(pos, len, _BinOpModInt32(ldata, rdata, len));
break;
case Unsigned:
refUV.putData(pos, len, _BinOpModUnsigned32(ldata, rdata, len));
break;
case Bool:
refUV.putData(pos, len, _BinOpModBool32(ldata, rdata, len));
break;
case Unary:
refUV.putData(pos, len, _BinOpModUnary32(ldata, rdata, len));
break;
case Bits:
default:
m_state.abortUndefinedUlamPrimitiveType();
break;
};
return;
} //appendBinaryOp
示例4: appendBinaryOp
void NodeBinaryOpArithDivide::appendBinaryOp(UlamValue& refUV, u32 ldata, u32 rdata, u32 pos, u32 len)
{
if(rdata == 0)
{
MSG(getNodeLocationAsString().c_str(), "Possible Divide By Zero Attempt", ERR);
refUV.setUlamValueTypeIdx(Nav);
setNodeType(Nav); //compiler counts
return;
}
UTI type = refUV.getUlamValueTypeIdx();
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
refUV.putData(pos, len, _BinOpDivideInt32(ldata, rdata, len));
break;
case Unsigned:
refUV.putData(pos, len, _BinOpDivideUnsigned32(ldata, rdata, len));
break;
case Bool:
refUV.putData(pos, len, _BinOpDivideBool32(ldata, rdata, len));
break;
case Unary:
refUV.putData(pos, len, _BinOpDivideUnary32(ldata, rdata, len));
break;
case Bits:
default:
m_state.abortUndefinedUlamPrimitiveType();
break;
};
return;
} //appendBinaryOp
示例5: appendBinaryOp
void NodeBinaryOpArithRemainder::appendBinaryOp(UlamValue& refUV, u32 ldata, u32 rdata, u32 pos, u32 len)
{
if(rdata == 0)
{
MSG(getNodeLocationAsString().c_str(), "Possible Remainder By Zero Attempt", ERR);
return;
}
UTI type = refUV.getUlamValueTypeIdx();
ULAMTYPE typEnum = m_state.getUlamTypeByIndex(type)->getUlamTypeEnum();
switch(typEnum)
{
case Int:
refUV.putData(pos, len, _BinOpModInt32(ldata, rdata, len));
break;
case Unsigned:
refUV.putData(pos, len, _BinOpModUnsigned32(ldata, rdata, len));
break;
case Bool:
refUV.putData(pos, len, _BinOpModBool32(ldata, rdata, len));
break;
case Unary:
refUV.putData(pos, len, _BinOpModUnary32(ldata, rdata, len));
break;
case Bits:
default:
assert(0);
break;
};
return;
} //appendBinaryOp