Comments (7)
Boost.Compute has these algorithms implemented for OpenCL:
Let me know if you need help integrating them.
from arrayfire.
@kylelutz I think ArrayFire's behavior for set operations is slightly different from Boost.Compute. Let me have a look and see if they can be made compatible.
from arrayfire.
@kylelutz Do set_union
and set_intersection
require the inputs to be sorted ?
from arrayfire.
Yeah, they have the same behavior and requirements as the standard C++ algorithms (std::set_union()
/ std::set_intersection()
).
from arrayfire.
@kylelutz All the set operations have two APIs like this:
AFAPI array setunique(const array& input);
AFAPI void setunique(array& values, array& indices, array& locations, const array& input);
ArrayFire does not expect the inputs to be sorted, so the input needs to be sorted internally. We can extend the API to include a default parameter bool isSorted=false
. This way user can optionally turn off the internal sort.
For the first API we can use std (for CPU), thrust (for CUDA) and Boost.Compute (for OpenCL).
For the second API we can write the code using existing ArrayFire functions.
If you are interested in contributing code, I can create the skeleton and implement the CUDA and CPU backends and leave the OpenCL backend for you.
from arrayfire.
I'd be happy to! Probably won't be too much work.
from arrayfire.
@kylelutz I just pushed the skeleton and CPU implementation to the "set" branch. Let me know if you want to work on the OpenCL backend for these three functions.
from arrayfire.
Related Issues (20)
- [Build] ArrayFire OpenPGP key expired on 11-21-2023 HOT 3
- binary package for arm64
- [BUG] indexing the second dim with af::seq ignores step
- [BUG] Sorting can fail when a NAN is present HOT 1
- [Build] Bundled "extern" sources in tarball broken HOT 2
- [Build] Syntax error in CMake generator expression for OpenCL HOT 2
- [BUG] Doesn't compile due to errors with spdlog
- [Build] collect2: error: ld returned 1 exit status HOT 3
- [BUG, CUDA backend] af::shift cannot shift an array with one row HOT 4
- Integrate ZLUDA for AMD CUDA HOT 1
- [BUG] Elementwise value assignment silently fails after in-place array downsize using `rows()` HOT 1
- Arrayfire Graph: Extend Sparse Array Functionality
- [Build] Build error on x64-linux
- [Build] OneAPI version 2024 incompatible for MKL
- Per-Array Backend Configuration for Seamless CPU and GPU Integration
- [BUG] Converting from sparse array to dense array right after computation on the coordinates
- [Build] Error : missing lib #include <climits>
- [BUG] bad handling of u8 data in saveImage
- [BUG] FP16 Types Not Allowed for Atan2 Method
- [Question]Memory allocation issue in multithread
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrayfire.