本文整理汇总了C#中Size.ToInt方法的典型用法代码示例。如果您正苦于以下问题:C# Size.ToInt方法的具体用法?C# Size.ToInt怎么用?C# Size.ToInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Size
的用法示例。
在下文中一共展示了Size.ToInt方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
void IVisitor.BitCast(Size size, Size targetSize, Size significantSize)
=> AddCode
(
"data.Push(data.Pull({0}).BitCast({1}).BitCast({2}))",
targetSize.SaveByteCount,
significantSize.ToInt(),
size.ToInt()
);
示例2: FormalMachine
internal FormalMachine(Size dataSize)
{
_startAddress = dataSize;
_data = new FormalValueAccess[dataSize.ToInt()];
_points = new FormalPointer[dataSize.ToInt() + 1];
}
示例3: SetFormalValues
void SetFormalValues(IFormalValue element, int startAddress, Size size)
{
var size1 = size.ToInt();
for(var i = 0; i < size1; i++)
_data[i + startAddress] = new FormalValueAccess(element, i, size1);
}
示例4: ResetInputValuesOfData
void ResetInputValuesOfData(Size inputSize)
{
var start = _startAddress.ToInt();
for(var i = 0; i < inputSize.ToInt(); i++)
_data[i + start] = null;
}
示例5: GetInputValuesFromData
IFormalValue[] GetInputValuesFromData(Size offset, Size inputSize)
{
var accesses = new List<FormalValueAccess>();
var start = (_startAddress + offset).ToInt();
for(var i = 0; i < inputSize.ToInt(); i++)
accesses.Add(_data[i + start]);
return FormalValueAccess.Transpose(accesses.ToArray());
}
示例6: GetInputValuesFromFrame
IFormalValue[] GetInputValuesFromFrame(Size offset, Size size)
{
var accesses = new List<FormalValueAccess>();
var start = _frameData.Length + offset.ToInt();
for(var i = 0; i < size.ToInt(); i++)
accesses.Add(_frameData[i + start]);
return FormalValueAccess.Transpose(accesses.ToArray());
}
示例7: AlignFrame
void AlignFrame(Size offset)
{
var minSize = -offset.ToInt();
if(_frameData.Length >= minSize)
return;
var frameData = _frameData;
var framePoints = _framePoints;
_frameData = new FormalValueAccess[minSize];
_framePoints = new FormalPointer[minSize + 1];
var delta = _frameData.Length - frameData.Length;
for(var i = 0; i < frameData.Length; i++)
_frameData[i + delta] = frameData[i];
for(var i = 0; i < framePoints.Length; i++)
_framePoints[i + delta] = framePoints[i];
}
示例8: CreateValuesInFrame
IFormalValue CreateValuesInFrame(Size size, Size offset)
{
var element = FormalValueAccess.Variable(Names[_nextValue++]);
var size1 = size.ToInt();
var start = _frameData.Length + offset.ToInt();
for(var i = 0; i < size1; i++)
_frameData[i + start] = new FormalValueAccess(element, i, size1);
return element;
}
示例9: PullInputValuesFromData
void IVisitor.ReferencePlus(Size right)
{
var formalSubValue = PullInputValuesFromData(RefSize).Single();
var startAddress = _startAddress.ToInt();
var element = FormalValueAccess.RefPlus(formalSubValue, right.ToInt());
SetFormalValues(element, startAddress, RefSize);
}
示例10: BitCast
static string BitCast(Size size, Size dataSize)
{
if(size == dataSize)
return "";
return $".BitCast({dataSize.ToInt()}).BitCast({size.ToInt()})";
}
示例11: DivideSize
static Size DivideSize(Size left, Size right)
=> Size.Create(DivideSize(left.ToInt(), right.ToInt()));
示例12: MultiplySize
static Size MultiplySize(Size left, Size right)
=> Size.Create(MultiplySize(left.ToInt(), right.ToInt()));
示例13: PlusSize
static Size PlusSize(Size size, Size size1)
=> Size.Create(PlusSize(size.ToInt(), size1.ToInt()));
示例14: Divide
public BitsConst Divide(BitsConst right, Size size)
{
if(!(Marshal.SizeOf(typeof(long)) * 8 >= size.ToInt()))
Tracer.AssertionFailed
(
@"sizeof(Int64)*8 >= size.ToInt()",
() => "right=" + right + ";size=" + size.Dump());
return Convert(ToInt64() / right.ToInt64()).Resize(size);
}