Browse Source

changed base-nonce generation for non GOFFSET paths to use get_local_size(0) and left shift

nfactor-troky
Philip Kaufmann 13 years ago committed by Con Kolivas
parent
commit
ab848057da
  1. 8
      diakgcn120208.cl

8
diakgcn120208.cl

@ -66,25 +66,25 @@ __kernel
#ifdef GOFFSET #ifdef GOFFSET
u nonce = ((uint)get_global_id(0) << 3) + (u)(0, 1, 2, 3, 4, 5, 6, 7); u nonce = ((uint)get_global_id(0) << 3) + (u)(0, 1, 2, 3, 4, 5, 6, 7);
#else #else
u nonce = ((uint)get_group_id(0) * (uint)WORKSIZE * 8U) + ((uint)get_local_id(0) * 8U) + base; u nonce = ((uint)get_group_id(0) * (uint)get_local_size(0) << 3) + ((uint)get_local_id(0) << 3) + base;
#endif #endif
#elif defined VECTORS4 #elif defined VECTORS4
#ifdef GOFFSET #ifdef GOFFSET
u nonce = ((uint)get_global_id(0) << 2) + (u)(0, 1, 2, 3); u nonce = ((uint)get_global_id(0) << 2) + (u)(0, 1, 2, 3);
#else #else
u nonce = ((uint)get_group_id(0) * (uint)WORKSIZE * 4U) + ((uint)get_local_id(0) * 4U) + base; u nonce = ((uint)get_group_id(0) * (uint)get_local_size(0) << 2) + ((uint)get_local_id(0) << 2) + base;
#endif #endif
#elif defined VECTORS2 #elif defined VECTORS2
#ifdef GOFFSET #ifdef GOFFSET
u nonce = ((uint)get_global_id(0) << 1) + (u)(0, 1); u nonce = ((uint)get_global_id(0) << 1) + (u)(0, 1);
#else #else
u nonce = ((uint)get_group_id(0) * (uint)get_local_size(0) * 2U) + ((uint)get_local_id(0) * 2U) + base; u nonce = ((uint)get_group_id(0) * (uint)get_local_size(0) << 1) + ((uint)get_local_id(0) << 1) + base;
#endif #endif
#else #else
#ifdef GOFFSET #ifdef GOFFSET
u nonce = (uint)get_global_id(0); u nonce = (uint)get_global_id(0);
#else #else
u nonce = ((uint)get_group_id(0) * (uint)WORKSIZE) + (uint)get_local_id(0) + base; u nonce = ((uint)get_group_id(0) * (uint)get_local_size(0)) + (uint)get_local_id(0) + base;
#endif #endif
#endif #endif

Loading…
Cancel
Save