# \#adapt

**URL:** https://discourse.julialang.org/tag/adapt/1225.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [BroadcastStyle of a SubArray](https://discourse.julialang.org/t/broadcaststyle-of-a-subarray/128181)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 0\
**Last updated:** [April 18, 2025, 7:50am UTC](https://discourse.julialang.org/t/broadcaststyle-of-a-subarray/128181 "2025-04-18T07:50:46Z")

</div>

The broadcast style of SubArrray (i.e. as obtained using view) is a DefaultArrayStyle: julia\> Base.BroadcastStyle(typeof(view(rand(10,10),2:3,3:4))) Base.Broadcast.DefaultArrayStyle{2}() yet it would be extremely usefu…

---

## [Adapt BroadcastStyle for CUDA](https://discourse.julialang.org/t/adapt-broadcaststyle-for-cuda/126861)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 1\
**Last updated:** [March 18, 2025, 5:50pm UTC](https://discourse.julialang.org/t/adapt-broadcaststyle-for-cuda/126861 "2025-03-18T17:50:40Z")

</div>

I am trying to get CUDA.jl to work seamlessly with a MutableShiftedArray . By writing a CUDASupportExt.jl class: module CUDASupportExt using CUDA using Adapt using MutableShiftedArrays indexing CUDA error # lets do t…

---

## [Need a basic example on using custom structs in CUDA.jl with Adapt.jl](https://discourse.julialang.org/t/need-a-basic-example-on-using-custom-structs-in-cuda-jl-with-adapt-jl/118829)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 2\
**Last updated:** [August 31, 2024, 7:11pm UTC](https://discourse.julialang.org/t/need-a-basic-example-on-using-custom-structs-in-cuda-jl-with-adapt-jl/118829 "2024-08-31T19:11:26Z")

</div>

I’m having a hard time understanding both the purpose of and how to use Adapt.jl to pass custom structs to CUDA kernels (that might not even be right). I’ve tried reading the CUDA.jl documentation and implementing a tri…

---

## [Converting entire custom structure from cpu to gpu and viceversa](https://discourse.julialang.org/t/converting-entire-custom-structure-from-cpu-to-gpu-and-viceversa/93203)

<div class="topic-metadata">

**Author:** [@carlogalli](https://discourse.julialang.org/u/carlogalli)\
**Replies:** 2\
**Last updated:** [January 19, 2023, 2:40pm UTC](https://discourse.julialang.org/t/converting-entire-custom-structure-from-cpu-to-gpu-and-viceversa/93203 "2023-01-19T14:40:56Z")

</div>

Hi! I am looking for a good way to convert a custom structure of Arrays to CuArrays and viceversa. I suspect the answer is related to them and to this topic, but I am not well versed in the usage of convert and adapt so…

---

## [CUDA adapter for FFTW plan](https://discourse.julialang.org/t/cuda-adapter-for-fftw-plan/91353)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 0\
**Last updated:** [December 7, 2022, 9:55am UTC](https://discourse.julialang.org/t/cuda-adapter-for-fftw-plan/91353 "2022-12-07T09:55:26Z")

</div>

I am writing a code where I want to use a custom structure inside CUDA kernel. Following the CUDA.jl manual (https://cuda.juliagpu.org/stable/tutorials/custom\_structs/), I need to write an Adapt.jl adapter for my struct…
