Skip to content

Commit

Permalink
allow max index 12
Browse files Browse the repository at this point in the history
  • Loading branch information
AmesingFlank committed Dec 14, 2022
1 parent e9e374a commit 45b67a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion taichi/inc/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cstddef>

constexpr int taichi_max_num_indices = 8;
constexpr int taichi_max_num_indices = 12;
// legacy: only used in cc and opengl backends
constexpr int taichi_max_num_args = 8;
// used in llvm backend: only the first 32 arguments can be types.ndarray
Expand Down
4 changes: 2 additions & 2 deletions taichi/runtime/metal/shaders/runtime_structs.metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "taichi/inc/constants.h"

static_assert(taichi_max_num_indices == 8,
static_assert(taichi_max_num_indices == 12,
"Please update kTaichiMaxNumIndices");
static_assert(sizeof(char *) == 8, "Metal pointers are 64-bit.");
#define METAL_BEGIN_RUNTIME_STRUCTS_DEF
Expand All @@ -28,7 +28,7 @@ static_assert(sizeof(char *) == 8, "Metal pointers are 64-bit.");
// clang-format off
METAL_BEGIN_RUNTIME_STRUCTS_DEF
STR(
constant constexpr int kTaichiMaxNumIndices = 8;
constant constexpr int kTaichiMaxNumIndices = 12;
constant constexpr int kTaichiNumChunks = 1024;
constant constexpr int kAlignment = 8;
using PtrOffset = int32_t;
Expand Down

0 comments on commit 45b67a2

Please sign in to comment.