Skip to content

important data structures in detail namespace #662

Open
@Ulfgard

Description

@Ulfgard

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions