1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-10 19:30:25 +08:00

feat(examples): add image_scale (#7)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
fumiama
2026-03-29 17:11:22 +08:00
committed by GitHub
parent 68ca8b5e2e
commit 6522bde914
123 changed files with 1074 additions and 163 deletions

View File

@@ -36,6 +36,12 @@ func (h KernelHandle) SetArgumentValue(argIndex uint32, arg any) error {
return err
}
// SuggestGroupSize queries a suggested group size for the kernel given a global size for each dimension.
func (h KernelHandle) SuggestGroupSize(globalSizeX, globalSizeY, globalSizeZ uint32) (groupSizeX, groupSizeY, groupSizeZ uint32, err error) {
_, err = gozel.ZeKernelSuggestGroupSize(gozel.ZeKernelHandle(h), globalSizeX, globalSizeY, globalSizeZ, &groupSizeX, &groupSizeY, &groupSizeZ)
return
}
// SetGroupSize sets the thread group size for the kernel.
func (h KernelHandle) SetGroupSize(groupSizeX uint32, groupSizeY uint32, groupSizeZ uint32) error {
_, err := gozel.ZeKernelSetGroupSize(gozel.ZeKernelHandle(h), groupSizeX, groupSizeY, groupSizeZ)