We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c113666 commit 9ac471bCopy full SHA for 9ac471b
test/base/texture.jl
@@ -69,6 +69,16 @@ end
69
@test length(array_mem) == length(d_a3D)
70
@test ndims(array_mem) == ndims(d_a3D)
71
72
+ # and its CuArrayPtr
73
+ ptr = convert(CUDA.CuArrayPtr{Float32}, array_mem)
74
+ @test isequal(ptr, ptr)
75
+ @test isless(ptr, 2 + ptr)
76
+ @test isless(ptr - 2, ptr)
77
+ @test ptr == ptr
78
+ @test ptr - 2 < ptr
79
+ @test eltype(ptr) == Float32
80
+ @test convert(UInt64, ptr) == UInt64(UInt(ptr))
81
+ @test_throws ArgumentError("cannot convert a GPU array pointer to a CPU pointer") convert(Ptr{Float32}, ptr)
82
end
83
84
@testset "CuTextureArray(::Array)" begin
0 commit comments