Example #1
0
		public virtual void AddEntry(DataEntry dataEntry)
		{
			dataEntries.Add(dataEntry);
		}
Example #2
0
		private static DataEntry CreateDataEntry(DataModel dataModel)
		{
			var argumentBufferLength = GetBufferLength(dataModel.ArgumentsType);
			var functionBufferLength = GetBufferLength(dataModel.FunctionsType);

			var argumentsArray = new byte[dataModel.NumberOfArguments][];
			for (var i = 0; i < argumentsArray.Length; i++)
			{
				argumentsArray[i] = new byte[argumentBufferLength];
			}

			var functionsArray = new byte[dataModel.NumberOfFunctions][];
			for (var i = 0; i < functionsArray.Length; i++)
			{
				functionsArray[i] = new byte[functionBufferLength];
			}

			var dataEntry = new DataEntry(argumentsArray, functionsArray);

			return dataEntry;
		}
		public override void AddEntry(DataEntry dataEntry)
		{
			base.AddEntry(dataEntry);
			var cacheLine = new CacheLine(dataEntry.Arguments.Length, dataEntry.Functions.Length);
			cache.Add(cacheLine);
		}