From 6e7a9fe0e5ce3aa25b0b2063be3059d3a087666b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkovsky@mmg.fjfi.cvut.cz>
Date: Tue, 30 Mar 2021 21:34:47 +0200
Subject: [PATCH] Revert the value returned from getMaxGridSize

The new value is not correct, it breaks e.g. ParallelFor2D and
ParallelFor3D (for which we had disabled tests by mistake). We need to
separate the max values for x, y and z axes, see the linked Gitlab
issue.

This reverts the commit 37632fd98a4450803d9077bf03e3f3c7b620c116
---
 src/TNL/Cuda/LaunchHelpers.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/TNL/Cuda/LaunchHelpers.h b/src/TNL/Cuda/LaunchHelpers.h
index 2b7113f432..a9e8bc1683 100644
--- a/src/TNL/Cuda/LaunchHelpers.h
+++ b/src/TNL/Cuda/LaunchHelpers.h
@@ -15,9 +15,11 @@
 namespace TNL {
 namespace Cuda {
 
-inline constexpr size_t getMaxGridSize()
+// TODO: the max grid size depends on the axis: (x,y,z): (2147483647, 65535, 65535)
+// see https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/4
+inline constexpr std::size_t getMaxGridSize()
 {
-   return 2147483647;//65535;
+   return 65535;
 }
 
 inline constexpr int getMaxBlockSize()
-- 
GitLab