#define INDICES_TOOLS_GPU_H_\r
\r
#include "both_define.h"\r
+#include "cudaType_CPU.h"\r
\r
/*----------------------------------------------------------------------*\\r
|* Declaration *|\r
* h = hauteur\r
*/\r
__BOTH__\r
- static void toIJ( int s, int w, int* ptrI, int* ptrJ)\r
+ static void toIJ( int s, int w, int* ptrI, int* ptrJ)\r
{\r
*ptrI = s / w;\r
*ptrJ = s - w * (*ptrI);\r
}\r
\r
+ /**\r
+ * s[0,W*H[ --> x[0,W[ y[0,H[\r
+ */\r
+ __BOTH__\r
+ static float2 toPixelFloat(int s, int w)\r
+ {\r
+ const int y = s / w;\r
+ const int x = s - w * y;\r
+ const float2 pixel = { (float)x, (float)y };\r
+ return pixel;\r
+ }\r
+\r
/**\r
* i[0,H[ j[0,W[ --> s[0,W*H[\r
* w = largeur\r
};\r
}\r
\r
-#endif \r
+#endif\r
\r
/*----------------------------------------------------------------------*\\r
|* End *|\r