2using System.Collections.Generic;
5using System.Threading.Tasks;
24 m_rgdfData =
new double[nFieldCount];
26 m_nFull = ((int)Math.Pow(2, nFieldCount)) - 1;
37 public int Add(
int nFieldIdx,
int nItemIdx,
double[] rg,
int nFieldCount)
39 int nStart = (nFieldIdx == 0) ? 0 : 1;
41 for (
int j = nStart; j < nFieldCount; j++)
43 int nIdx = (nItemIdx * nFieldCount) + j;
44 Add(nFieldIdx, rg[nIdx]);
57 public bool Add(
int nFieldIdx,
double df)
59 m_rgdfData[nFieldIdx] = df;
60 m_nFilled |= (0x0001 << nFieldIdx);
62 if (m_nFilled == m_nFull)
82 Array.Clear(m_rgdfData, 0, m_rgdfData.Length);
The DataItem manages one synchronized data item where the first element is the sync field.
int Add(int nFieldIdx, int nItemIdx, double[] rg, int nFieldCount)
Adds a new set of raw data to the synchronized data.
bool Add(int nFieldIdx, double df)
Add a new data item at a specified field index.
DataItem(int nFieldCount)
The constructor.
void Reset()
Clears the data fields and the filled status.
double[] GetData()
Returns the synchronized data fields.
The MyCaffe.db.stream namespace contains all data streaming related classes.