MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / sprintfPersCoordBasedOffset

Function sprintfPersCoordBasedOffset

src/library/blas/gens/fetch.c:1741–1762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739}
1740
1741static void
1742sprintfPersCoordBasedOffset(
1743 Kstring *kstr,
1744 FetchContext *fctx,
1745 unsigned int line,
1746 unsigned int vec)
1747{
1748 const Kstring *var;
1749 unsigned int kdim;
1750 unsigned int idx, maxIdx;
1751 PersCoordInfo *info = (PersCoordInfo*)fctx->currAgent->priv;
1752
1753 kdim = bwidthPhysDimension(fctx);
1754 maxIdx = (fctx->fopts->mrole == MATRIX_A) ? info->vlenA : info->vlenB;
1755 idx = persCoordIdx(&fctx->physTile, line, vec, kdim);
1756
1757 var = (fctx->fopts->mrole == MATRIX_A) ?
1758 &fctx->currAgent->vars[PERS_COORD_A] :
1759 &fctx->currAgent->vars[PERS_COORD_B];
1760
1761 sprintfVectorComponent(kstr, var->buf, idx % maxIdx, maxIdx);
1762}
1763
1764static void
1765initPersCoordAgent(AddressingAgent *agent)

Callers

nothing calls this directly

Calls 3

bwidthPhysDimensionFunction · 0.85
persCoordIdxFunction · 0.85
sprintfVectorComponentFunction · 0.85

Tested by

no test coverage detected