* Partial initialization of the generator private information */
| 294 | * Partial initialization of the generator private information |
| 295 | */ |
| 296 | static void |
| 297 | initGenPriv( |
| 298 | GenPriv *priv, |
| 299 | DataType dtype, |
| 300 | unsigned int typeSize, |
| 301 | const SubproblemDim *dim, |
| 302 | DBlockCopyDirection dir, |
| 303 | const ItemWork *work, |
| 304 | const PGranularity *pgran) |
| 305 | { |
| 306 | unsigned int gsize; |
| 307 | |
| 308 | priv->dtype = dtype; |
| 309 | priv->typeSize = typeSize; |
| 310 | priv->nfloats = typeSize / sizeof(float); |
| 311 | priv->dim = dim; |
| 312 | priv->dir = dir; |
| 313 | priv->work = work; |
| 314 | priv->cnt = 0; |
| 315 | priv->vecLen = FLOAT4_VECLEN; |
| 316 | if (dir == DBLOCK_GLOBAL_TO_LOCAL || dir == DBLOCK_LOCAL_TO_GLOBAL) { |
| 317 | gsize = pgran->wgSize[0] * pgran->wgSize[1]; |
| 318 | priv->vecLen = (unsigned int)(dim->x * dim->y * priv->nfloats / gsize); |
| 319 | |
| 320 | if (priv->vecLen < 1) { |
| 321 | priv->vecLen = 1; |
| 322 | } else if (priv->vecLen > 4) { |
| 323 | priv->vecLen = FLOAT4_VECLEN; |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | } |
| 328 | |
| 329 | /* |
| 330 | * get info about work to be done by the work group |
no outgoing calls
no test coverage detected