Skip to content

Commit c8c2142

Browse files
Always use generated aligned_sizeof (#2838)
1 parent d3ce45c commit c8c2142

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/CUDA.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,8 @@ using Printf
5454
# - Base.aligned_sizeof is the size of an object in an array/inline alloced
5555
# Both of them are equivalent for immutable objects, but differ for mutable singtons and Symbol
5656
# We use `aligned_sizeof` since we care about the size of a type in an array
57-
@static if VERSION < v"1.11.0"
58-
@generated function aligned_sizeof(::Type{T}) where T
59-
return :($(Base.aligned_sizeof(T)))
60-
end
61-
else
62-
import Base: aligned_sizeof
57+
@generated function aligned_sizeof(::Type{T}) where T
58+
return :($(Base.aligned_sizeof(T)))
6359
end
6460

6561
## source code includes

0 commit comments

Comments
 (0)