Lines Matching defs:pArray2

199 static int crSaIntersected(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
204 for (uint32_t i = 0, j = 0; i < pArray1->cSize && j < pArray2->cSize; )
206 if (pArray1->pElements[i] == pArray2->pElements[j])
218 else if (pArray1->pElements[i] < pArray2->pElements[j])
231 static void crSaIntersect(CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
233 for (uint32_t i = 0, j = 0; i < pArray1->cSize && j < pArray2->cSize; )
235 if (pArray1->pElements[i] == pArray2->pElements[j])
240 else if (pArray1->pElements[i] < pArray2->pElements[j])
251 VBOXSADECL(void) CrSaIntersect(CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
253 crSaIntersect(pArray1, pArray2);
256 VBOXSADECL(int) CrSaIntersected(CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
258 return crSaIntersected(pArray1, pArray2, pResult);
261 static int crSaUnited(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
268 while (i < pArray1->cSize && j < pArray2->cSize)
271 if (pArray1->pElements[i] == pArray2->pElements[j])
277 else if (pArray1->pElements[i] < pArray2->pElements[j])
304 else if (j < pArray2->cSize)
307 pTail = pArray2;
331 VBOXSADECL(int) CrSaUnited(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
333 return crSaUnited(pArray1, pArray2, pResult);
371 static int crSaCmp(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
373 int diff = CrSaGetSize(pArray1) - CrSaGetSize(pArray2);
377 return memcmp(pArray1->pElements, pArray2->pElements, pArray1->cSize * sizeof (pArray1->pElements[0]));
380 VBOXSADECL(int) CrSaCmp(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
382 return crSaCmp(pArray1, pArray2);
385 static bool crSaCovers(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
387 if (CrSaGetSize(pArray1) < CrSaGetSize(pArray2))
391 while (j < pArray2->cSize)
396 if (pArray1->pElements[i] == pArray2->pElements[j])
401 else if (pArray1->pElements[i] < pArray2->pElements[j])
410 VBOXSADECL(bool) CrSaCovers(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2)
412 return crSaCovers(pArray1, pArray2);