Skip to content

Minimize thrust dependency #279

Description

@stotko

In order to implement several functions in a portable manner across the backends, thrust is used as the abstraction of choice. This may, however, limit extending support to other possible libraries making it desirable to reduce the coupling to thrust. Throughout the whole code base, the following classes and functions are used:

Header algorithm:

  • all_of
  • copy
  • copy_if
  • count_if
  • equal
  • fill
  • for_each: Only used in stdgpu::for_each_index implementation.
  • generate
  • reduce
  • sequence
  • sort
  • tabulate
  • transform
  • transform_reduce: Only used in stdgpu::transform_reduce_index implementation.

Header execution:

  • device: Only used as object alias for stdgpu::execution::device.
  • host: Only used as object alias for stdgpu::execution::host.

Header functional:

  • equal_to<>
  • identity<>
  • plus<>

Header iterator:

  • counting_iterator: Only used in stdgpu::for_each_index and stdgpu::transform_reduce_index implementation.
  • discard_iterator: Implementation detail used for iterator_adaptor.
  • distance
  • iterator_adaptor: Only used in implementation of thrust-compatible container iterators.
  • transform_iterator: Only used in stdgpu::transform_range implementation.
  • zip_iterator

Header utility:

  • pair: Only used as typedef for stdgpu::pair.
  • tuple

Other Headers:

  • random

Note: The examples may still make use of thrust to demonstrate interoperability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions