Skip to content

Commit 8c80b51

Browse files
Use ClimaCartesianIndices
1 parent b732f9f commit 8c80b51

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.14.31"
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
88
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
99
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
10+
ClimaCartesianIndices = "afc79dc6-9922-4b50-ae92-da7b5116c2c8"
1011
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
1112
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
1213
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

ext/cuda/data_layouts_threadblock.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const CI5 = CartesianIndex{5}
2-
# using ClimaCartesianIndices: FastCartesianIndices
3-
FastCartesianIndices(x) = CartesianIndices(x)
2+
import ClimaCartesianIndices
3+
FastCartesianIndices(x) =
4+
length(prod(x)) > typemax(Int32) ? CartesianIndices(x) :
5+
ClimaCartesianIndices.FastCartesianIndices(x)
46

57
maximum_allowable_threads() = (
68
CUDA.attribute(CUDA.device(), CUDA.DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X),

0 commit comments

Comments
 (0)