# Kernel calling dimensions

**URL:** <https://pyfr.discourse.group/t/kernel-calling-dimensions/1272>\
**Category:** Development\
**Created:** [26 June 2025 18:24 UTC](https://pyfr.discourse.group/t/kernel-calling-dimensions/1272 "2025-06-26T18:24:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frankx9](https://avatars.discourse-cdn.com/v4/letter/f/3e96dc/32.png) [@Frankx9](https://pyfr.discourse.group/u/Frankx9)\
**Post date:** [26 June 2025 18:24 UTC](https://pyfr.discourse.group/t/kernel-calling-dimensions/1272/1 "2025-06-26T18:24:25Z")

</div>

Hi,

I am trying to schedule the following kernel

```auto
<%pyfr:kernel name='wspeed' ndim='1'
                usol='in fpdtype_t[${str(nupts)}][${str(nvars)}]'
                clen='in fpdtype_t'
                wsp='inout fpdtype_t[${str(nupts)}]'>

```

where

```auto
usol.ioshape = (27, 5, 18954)
clen.ioshape = (1, 18954)
wsp.ioshape = (27, 18954)
neles = 18954

```

and the kernel is registered

`self.backend.kernel('kname', tplargs, dims=[neles], usol=usol, clen=clen, wsp=wsp`

Is this scheduling correct?  
I need to update wsp for each upts and I want each upts of the soln to see the same value of clen.  
Hence the update I am looking for is something like:

`wsp[i] = f(clen, [usol[i][j] for j in nvars & for i in nupts])`

Is it correct?

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [28 June 2025 08:29 UTC](https://pyfr.discourse.group/t/kernel-calling-dimensions/1272/2 "2025-06-28T08:29:02Z")

</div>

Yes, this should be what you want assuming each `wsp` depends on every `usol` and `clen` point inside of an element. If the dependency is just pointwise you can use a two dimensional kernel which will be more efficient.

Regards, Freddie.
