# Extend findmin/findmax functions in CUDA

**URL:** <https://discourse.julialang.org/t/extend-findmin-findmax-functions-in-cuda/92184>\
**Category:** GPU\
**Tags:** cuda\
**Created:** [December 27, 2022, 1:09pm UTC](https://discourse.julialang.org/t/extend-findmin-findmax-functions-in-cuda/92184 "2022-12-27T13:09:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedoroff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fedoroff/32/53209_2.png) [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Post date:** [December 27, 2022, 1:09pm UTC](https://discourse.julialang.org/t/extend-findmin-findmax-functions-in-cuda/92184/1 "2022-12-27T13:09:41Z")

</div>

Currently the findmin/findmax functions in CUDA are defined for cases where one passes in them only a single CuArray ([link](https://github.com/JuliaGPU/CUDA.jl/blob/243c4ae90f9d48a0384b6e711f3563fed125b1b3/src/indexing.jl#L83)), e.g. `findmin(a)`. However, findmin/findmax functions in Base allow to pass in them an additional function as the first argument, e.g. `findmin(abs2, a)`.  
Would it be hard to extend the existing definitions of CUDA findmin/findmax functions to match the functionality of Base?
