# Multiple texture interpolations at the same time

**URL:** <https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037>\
**Category:** GPU\
**Created:** [October 1, 2021, 11:14am UTC](https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037 "2021-10-01T11:14:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lodygaw](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@lodygaw](https://discourse.julialang.org/u/lodygaw)\
**Post date:** [October 1, 2021, 11:14am UTC](https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037/1 "2021-10-01T11:14:47Z")

</div>

Hello,

I am begginer to Julia and CUDA.jl so please forgive me if the answer to the question is obvious. I couldn’t find the solution by myself.

I would like to perform texture interpolation (similar to [this](https://juliagpu.org/post/2020-10-30-cuda_2.1/)) but I have multiple source arrays and I would like to interpolate different sets of indices for every source array. I am wondering if it could be done parallel for all indices simultaneously. I think I could imagine a solution using CUDA kernel which would iterate over all indices and interpolate them using adequate source array, but I couldn’t find how to perform texture interpolations inside kernel. Maybe there is better way?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [October 1, 2021, 12:07pm UTC](https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037/2 "2021-10-01T12:07:29Z")

</div>

Texture interpolation inside a kernel is done by passing a texture object and using regular indexing, see the test suite for some examples: [https://github.com/JuliaGPU/CUDA.jl/blob/master/test/texture.jl](https://github.com/JuliaGPU/CUDA.jl/blob/master/test/texture.jl)

There’s also an example in one of the previous blog posts: [CUDA.jl 1.1 ⋅ JuliaGPU](https://juliagpu.org/post/2020-07-07-cuda_1.1/#experimental_texture_support)
