boostorg / boostorg/compute

important data structures in detail namespace

Open
#662 5 comments 0 reactions 0 assignees View on GitHub
design feature
Dominant language
C++
Stars
1.7k
Forks
340
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to extend the boost.compute mechanisms to my matrix library and run into trouble implementing certain functionality as the mechanisms by which compute generates kernels out of expressions are hidden in detail.

This is most notably the boost::compute::detail::meta_kernel which is required for example when i want to assign a matrix expression e.g. A=exp(M) <=> A_ij = exp(M_ij). I need access to this one for a) generating a kernel from a functor-expression and b) to extend the provided functions using new functionality

Another useful feature hidden in detail is boost::compute::detail::unpack in compute/functional/detail/unpack.hpp as used for implementing boost::compute::inner_prod. I use this one to implement plus-assignment of vectors using v+=b <=> v_i = v_i + b_i. i.e. I take the implementation of inner_prod and replace accumulate by transform.

while it is possible to be on the safe side for unpack and just copy& paste it into my own implementation, this option does not exist on meta_kernel. So I am stuck with: either use it and feel the pain if the detail namespace changes, or hit a road block.

A possible way around the need of unpack would be if transform_iterator would have the necessary type magic to check whether its function takes 1 or more arguments and use unpack in that case.
##

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.