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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user