5656Base. Tuple (x:: Vec4 ) = tuple (x. a, x. b, x. c, x. d)
5757
5858for (dispatch_rettyp, julia_rettyp, llvm_rettyp) in
59- ((:Signed , :(Vec4{UInt32 }), :v4u32 ),
60- (:Unsigned , :(Vec4{Int32 }), :v4s32 ),
59+ ((:Signed , :(Vec4{Int32 }), :v4u32 ),
60+ (:Unsigned , :(Vec4{UInt32 }), :v4s32 ),
6161 (:AbstractFloat , :(Vec4{Float32}), :v4f32 ))
6262
63- eltyp = :(Union{$ dispatch_rettyp, NTuple{<: Any ,$ dispatch_rettyp}})
63+ eltyp = :(Union{$ dispatch_rettyp,
64+ NTuple{1 ,$ dispatch_rettyp},
65+ NTuple{2 ,$ dispatch_rettyp},
66+ NTuple{3 ,$ dispatch_rettyp},
67+ NTuple{4 ,$ dispatch_rettyp}})
6468
6569 # tex1D only supports array memory
6670 @eval tex (texObject:: CuDeviceTexture{<:$eltyp,1,ArrayMemory} , x:: Number ) =
@@ -74,7 +78,7 @@ for (dispatch_rettyp, julia_rettyp, llvm_rettyp) in
7478 julia_sig = ntuple (_-> Float32, dims)
7579 julia_params = ntuple (i-> :($ (julia_args[i]):: Number ), dims)
7680
77- @eval tex (texObject:: CuDeviceTexture{<:$eltyp,$dims, } , $ (julia_params... )) =
81+ @eval tex (texObject:: CuDeviceTexture{<:$eltyp,$dims} , $ (julia_params... )) =
7882 Tuple (ccall ($ (" llvm.nvvm.tex.unified.$llvm_dim .$llvm_rettyp .f32" ), llvmcall,
7983 $ julia_rettyp, (CUtexObject, $ (julia_sig... )), texObject, $ (julia_args... )))
8084 end
0 commit comments