+#ifndef INDICES_TOOLS_GPU_H_\r
+#define INDICES_TOOLS_GPU_H_\r
+\r
+#include "both_define.h"\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* Declaration *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |* Public *|\r
+ \*-------------------------------------*/\r
+\r
+namespace gpu\r
+ {\r
+ class IndiceTools\r
+ {\r
+\r
+ /*--------------------------------------*\\r
+ |* Constructor *|\r
+ \*--------------------------------------*/\r
+\r
+ public:\r
+\r
+ /*--------------------------------------*\\r
+ |* Methodes *|\r
+ \*--------------------------------------*/\r
+\r
+ public:\r
+\r
+ /**\r
+ * s[0,W*H[ --> i[0,H[ j[0,W[\r
+ * w = largeur\r
+ * h = hauteur\r
+ */\r
+ __BOTH__\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
+ * i[0,H[ j[0,W[ --> s[0,W*H[\r
+ * w = largeur\r
+ * h = hauteur\r
+ */\r
+ __BOTH__\r
+ static int toS(int w, int i, int j)\r
+ {\r
+ return (i * w) + j;\r
+ }\r
+\r
+ /*-------------------------------------*\\r
+ |* Attributs *|\r
+ \*-------------------------------------*/\r
+\r
+ private:\r
+\r
+ };\r
+ }\r
+\r
+#endif \r
+\r
+/*----------------------------------------------------------------------*\\r
+ |* End *|\r
+ \*---------------------------------------------------------------------*/\r