├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── INSTALL ├── NAMESPACE ├── R ├── Rth-package.r ├── hash.r ├── rthcolsums.R ├── rthdist.R ├── rthgini.r ├── rthhist.R ├── rthkendall.R ├── rthma.R ├── rthmean.r ├── rthnorm.r ├── rthorder.R ├── rthpdist.R ├── rthpearson.R ├── rthrnorm.r ├── rthrunif.r ├── rthsort.R ├── rthtable.R ├── rthxpos.R └── threads.r ├── README.md ├── TODO ├── cleanup ├── configure ├── configure.ac ├── configure.win ├── demo ├── 00Index └── sort.R ├── inst ├── CITATION └── include │ └── thrust │ ├── CHANGELOG │ ├── adjacent_difference.h │ ├── advance.h │ ├── binary_search.h │ ├── copy.h │ ├── count.h │ ├── detail │ ├── adjacent_difference.inl │ ├── advance.inl │ ├── allocator │ │ ├── allocator_traits.h │ │ ├── allocator_traits.inl │ │ ├── copy_construct_range.h │ │ ├── copy_construct_range.inl │ │ ├── default_construct_range.h │ │ ├── default_construct_range.inl │ │ ├── destroy_range.h │ │ ├── destroy_range.inl │ │ ├── fill_construct_range.h │ │ ├── fill_construct_range.inl │ │ ├── malloc_allocator.h │ │ ├── malloc_allocator.inl │ │ ├── no_throw_allocator.h │ │ ├── tagged_allocator.h │ │ ├── tagged_allocator.inl │ │ ├── temporary_allocator.h │ │ └── temporary_allocator.inl │ ├── binary_search.inl │ ├── config.h │ ├── config │ │ ├── compiler.h │ │ ├── compiler_fence.h │ │ ├── config.h │ │ ├── debug.h │ │ ├── device_system.h │ │ ├── forceinline.h │ │ ├── hd_warning_disable.h │ │ ├── host_device.h │ │ ├── host_system.h │ │ └── simple_defines.h │ ├── contiguous_storage.h │ ├── contiguous_storage.inl │ ├── copy.h │ ├── copy.inl │ ├── copy_if.h │ ├── copy_if.inl │ ├── count.inl │ ├── cstdint.h │ ├── device_delete.inl │ ├── device_free.inl │ ├── device_malloc.inl │ ├── device_new.inl │ ├── device_ptr.inl │ ├── device_reference.inl │ ├── device_vector.inl │ ├── dispatch │ │ └── is_trivial_copy.h │ ├── distance.inl │ ├── equal.inl │ ├── execute_with_allocator.h │ ├── execution_policy.h │ ├── extrema.inl │ ├── fill.inl │ ├── find.inl │ ├── for_each.inl │ ├── function.h │ ├── functional.inl │ ├── functional │ │ ├── actor.h │ │ ├── actor.inl │ │ ├── argument.h │ │ ├── composite.h │ │ ├── operators.h │ │ ├── operators │ │ │ ├── arithmetic_operators.h │ │ │ ├── assignment_operator.h │ │ │ ├── bitwise_operators.h │ │ │ ├── compound_assignment_operators.h │ │ │ ├── logical_operators.h │ │ │ ├── operator_adaptors.h │ │ │ └── relational_operators.h │ │ ├── placeholder.h │ │ └── value.h │ ├── gather.inl │ ├── generate.inl │ ├── host_vector.inl │ ├── inner_product.inl │ ├── integer_traits.h │ ├── internal_functional.h │ ├── logical.inl │ ├── malloc_and_free.h │ ├── merge.inl │ ├── minmax.h │ ├── mismatch.inl │ ├── mpl │ │ └── math.h │ ├── numeric_traits.h │ ├── overlapped_copy.h │ ├── pair.inl │ ├── partition.inl │ ├── pointer.h │ ├── pointer.inl │ ├── range │ │ └── tail_flags.h │ ├── raw_pointer_cast.h │ ├── raw_reference_cast.h │ ├── raw_reference_cast.inl │ ├── reduce.inl │ ├── reference.h │ ├── reference.inl │ ├── reference_forward_declaration.h │ ├── remove.inl │ ├── replace.inl │ ├── reverse.inl │ ├── scan.inl │ ├── scatter.inl │ ├── sequence.inl │ ├── set_operations.inl │ ├── sort.inl │ ├── static_assert.h │ ├── swap.h │ ├── swap.inl │ ├── swap_ranges.inl │ ├── tabulate.inl │ ├── temporary_array.h │ ├── temporary_array.inl │ ├── temporary_buffer.h │ ├── transform.inl │ ├── transform_reduce.inl │ ├── transform_scan.inl │ ├── trivial_sequence.h │ ├── tuple.inl │ ├── tuple_meta_transform.h │ ├── tuple_transform.h │ ├── type_traits.h │ ├── type_traits │ │ ├── algorithm │ │ │ └── intermediate_type_from_function_and_iterators.h │ │ ├── function_traits.h │ │ ├── has_member_function.h │ │ ├── has_nested_type.h │ │ ├── has_trivial_assign.h │ │ ├── is_call_possible.h │ │ ├── is_metafunction_defined.h │ │ ├── iterator │ │ │ ├── is_discard_iterator.h │ │ │ └── is_output_iterator.h │ │ ├── minimum_type.h │ │ ├── pointer_traits.h │ │ └── result_of.h │ ├── uninitialized_copy.inl │ ├── uninitialized_fill.inl │ ├── unique.inl │ ├── use_default.h │ ├── util │ │ ├── align.h │ │ └── blocking.h │ ├── vector_base.h │ └── vector_base.inl │ ├── device_allocator.h │ ├── device_delete.h │ ├── device_free.h │ ├── device_malloc.h │ ├── device_malloc_allocator.h │ ├── device_new.h │ ├── device_new_allocator.h │ ├── device_ptr.h │ ├── device_reference.h │ ├── device_vector.h │ ├── distance.h │ ├── equal.h │ ├── execution_policy.h │ ├── extrema.h │ ├── fill.h │ ├── find.h │ ├── for_each.h │ ├── functional.h │ ├── gather.h │ ├── generate.h │ ├── host_vector.h │ ├── inner_product.h │ ├── iterator │ ├── constant_iterator.h │ ├── counting_iterator.h │ ├── detail │ │ ├── any_assign.h │ │ ├── any_system_tag.h │ │ ├── constant_iterator_base.h │ │ ├── counting_iterator.inl │ │ ├── device_system_tag.h │ │ ├── discard_iterator_base.h │ │ ├── distance_from_result.h │ │ ├── host_system_tag.h │ │ ├── is_iterator_category.h │ │ ├── is_trivial_iterator.h │ │ ├── iterator_adaptor_base.h │ │ ├── iterator_category_to_system.h │ │ ├── iterator_category_to_traversal.h │ │ ├── iterator_facade_category.h │ │ ├── iterator_traits.inl │ │ ├── iterator_traversal_tags.h │ │ ├── minimum_category.h │ │ ├── minimum_system.h │ │ ├── normal_iterator.h │ │ ├── permutation_iterator_base.h │ │ ├── retag.h │ │ ├── reverse_iterator.inl │ │ ├── reverse_iterator_base.h │ │ ├── tagged_iterator.h │ │ ├── transform_iterator.inl │ │ ├── tuple_of_iterator_references.h │ │ ├── universal_categories.h │ │ ├── zip_iterator.inl │ │ └── zip_iterator_base.h │ ├── discard_iterator.h │ ├── iterator_adaptor.h │ ├── iterator_categories.h │ ├── iterator_facade.h │ ├── iterator_traits.h │ ├── permutation_iterator.h │ ├── retag.h │ ├── reverse_iterator.h │ ├── transform_iterator.h │ └── zip_iterator.h │ ├── logical.h │ ├── memory.h │ ├── merge.h │ ├── mismatch.h │ ├── pair.h │ ├── partition.h │ ├── random.h │ ├── random │ ├── detail │ │ ├── discard_block_engine.inl │ │ ├── linear_congruential_engine.inl │ │ ├── linear_congruential_engine_discard.h │ │ ├── linear_feedback_shift_engine.inl │ │ ├── linear_feedback_shift_engine_wordmask.h │ │ ├── mod.h │ │ ├── normal_distribution.inl │ │ ├── normal_distribution_base.h │ │ ├── random_core_access.h │ │ ├── subtract_with_carry_engine.inl │ │ ├── uniform_int_distribution.inl │ │ ├── uniform_real_distribution.inl │ │ ├── xor_combine_engine.inl │ │ └── xor_combine_engine_max.h │ ├── discard_block_engine.h │ ├── linear_congruential_engine.h │ ├── linear_feedback_shift_engine.h │ ├── normal_distribution.h │ ├── subtract_with_carry_engine.h │ ├── uniform_int_distribution.h │ ├── uniform_real_distribution.h │ └── xor_combine_engine.h │ ├── reduce.h │ ├── remove.h │ ├── replace.h │ ├── reverse.h │ ├── scan.h │ ├── scatter.h │ ├── sequence.h │ ├── set_operations.h │ ├── sort.h │ ├── swap.h │ ├── system │ ├── cpp │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── dispatch │ │ │ │ └── sort.h │ │ │ ├── equal.h │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── partition.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique_by_key.h │ │ │ └── vector.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ └── vector.h │ ├── cuda │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── adjacent_difference.inl │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── block │ │ │ │ ├── copy.h │ │ │ │ ├── exclusive_scan.h │ │ │ │ ├── inclusive_scan.h │ │ │ │ ├── merge.h │ │ │ │ ├── merge.inl │ │ │ │ ├── merging_sort.h │ │ │ │ ├── odd_even_sort.h │ │ │ │ └── reduce.h │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_cross_system.h │ │ │ ├── copy_cross_system.inl │ │ │ ├── copy_device_to_device.h │ │ │ ├── copy_device_to_device.inl │ │ │ ├── copy_if.h │ │ │ ├── copy_if.inl │ │ │ ├── count.h │ │ │ ├── cuda_launch_config.h │ │ │ ├── default_decomposition.h │ │ │ ├── default_decomposition.inl │ │ │ ├── detail │ │ │ │ ├── alignment.h │ │ │ │ ├── b40c │ │ │ │ │ ├── kernel_utils.h │ │ │ │ │ ├── radixsort_api.h │ │ │ │ │ ├── radixsort_kernel_common.h │ │ │ │ │ ├── radixsort_key_conversion.h │ │ │ │ │ ├── radixsort_reduction_kernel.h │ │ │ │ │ ├── radixsort_scanscatter_kernel.h │ │ │ │ │ ├── radixsort_spine_kernel.h │ │ │ │ │ └── vector_types.h │ │ │ │ ├── balanced_path.h │ │ │ │ ├── cached_temporary_allocator.h │ │ │ │ ├── fast_scan.h │ │ │ │ ├── fast_scan.inl │ │ │ │ ├── launch_calculator.h │ │ │ │ ├── launch_calculator.inl │ │ │ │ ├── launch_closure.h │ │ │ │ ├── launch_closure.inl │ │ │ │ ├── set_operation.h │ │ │ │ ├── set_operation.inl │ │ │ │ ├── stable_merge_sort.h │ │ │ │ ├── stable_merge_sort.inl │ │ │ │ ├── stable_primitive_sort.h │ │ │ │ ├── stable_primitive_sort.inl │ │ │ │ ├── stable_radix_sort.h │ │ │ │ ├── stable_radix_sort.inl │ │ │ │ ├── stable_sort_by_count.h │ │ │ │ ├── stable_sort_by_count.inl │ │ │ │ └── uninitialized.h │ │ │ ├── equal.h │ │ │ ├── error.inl │ │ │ ├── execution_policy.h │ │ │ ├── extern_shared_ptr.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── fill.inl │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── for_each.inl │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── guarded_cuda_runtime_api.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── merge.inl │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── partition.h │ │ │ ├── reduce.h │ │ │ ├── reduce.inl │ │ │ ├── reduce_by_key.h │ │ │ ├── reduce_by_key.inl │ │ │ ├── reduce_intervals.h │ │ │ ├── reduce_intervals.inl │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── runtime_introspection.h │ │ │ ├── runtime_introspection.inl │ │ │ ├── scan.h │ │ │ ├── scan.inl │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_difference.inl │ │ │ ├── set_intersection.inl │ │ │ ├── set_operations.h │ │ │ ├── set_symmetric_difference.inl │ │ │ ├── set_union.inl │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── synchronize.h │ │ │ ├── synchronize.inl │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── temporary_indirect_permutation.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── trivial_copy.h │ │ │ ├── trivial_copy.inl │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique_by_key.h │ │ │ └── vector.inl │ │ ├── error.h │ │ ├── execution_policy.h │ │ ├── experimental │ │ │ └── pinned_allocator.h │ │ ├── memory.h │ │ └── vector.h │ ├── detail │ │ ├── adl │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy_if.h │ │ │ ├── count.h │ │ │ ├── equal.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── partition.h │ │ │ ├── reduce.h │ │ │ ├── reduce_by_key.h │ │ │ ├── remove.h │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ └── unique_by_key.h │ │ ├── bad_alloc.h │ │ ├── errno.h │ │ ├── error_category.inl │ │ ├── error_code.inl │ │ ├── error_condition.inl │ │ ├── generic │ │ │ ├── adjacent_difference.h │ │ │ ├── adjacent_difference.inl │ │ │ ├── advance.h │ │ │ ├── advance.inl │ │ │ ├── binary_search.h │ │ │ ├── binary_search.inl │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_if.h │ │ │ ├── copy_if.inl │ │ │ ├── count.h │ │ │ ├── count.inl │ │ │ ├── distance.h │ │ │ ├── distance.inl │ │ │ ├── equal.h │ │ │ ├── equal.inl │ │ │ ├── extrema.h │ │ │ ├── extrema.inl │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── find.inl │ │ │ ├── for_each.h │ │ │ ├── gather.h │ │ │ ├── gather.inl │ │ │ ├── generate.h │ │ │ ├── generate.inl │ │ │ ├── inner_product.h │ │ │ ├── inner_product.inl │ │ │ ├── logical.h │ │ │ ├── memory.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── merge.inl │ │ │ ├── mismatch.h │ │ │ ├── mismatch.inl │ │ │ ├── partition.h │ │ │ ├── partition.inl │ │ │ ├── reduce.h │ │ │ ├── reduce.inl │ │ │ ├── reduce_by_key.h │ │ │ ├── reduce_by_key.inl │ │ │ ├── remove.h │ │ │ ├── remove.inl │ │ │ ├── replace.h │ │ │ ├── replace.inl │ │ │ ├── reverse.h │ │ │ ├── reverse.inl │ │ │ ├── scalar │ │ │ │ ├── binary_search.h │ │ │ │ └── binary_search.inl │ │ │ ├── scan.h │ │ │ ├── scan.inl │ │ │ ├── scan_by_key.h │ │ │ ├── scan_by_key.inl │ │ │ ├── scatter.h │ │ │ ├── scatter.inl │ │ │ ├── select_system.h │ │ │ ├── sequence.h │ │ │ ├── sequence.inl │ │ │ ├── set_operations.h │ │ │ ├── set_operations.inl │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── swap_ranges.inl │ │ │ ├── tabulate.h │ │ │ ├── tabulate.inl │ │ │ ├── tag.h │ │ │ ├── temporary_buffer.h │ │ │ ├── temporary_buffer.inl │ │ │ ├── transform.h │ │ │ ├── transform.inl │ │ │ ├── transform_reduce.h │ │ │ ├── transform_reduce.inl │ │ │ ├── transform_scan.h │ │ │ ├── transform_scan.inl │ │ │ ├── type_traits.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_copy.inl │ │ │ ├── uninitialized_fill.h │ │ │ ├── uninitialized_fill.inl │ │ │ ├── unique.h │ │ │ ├── unique.inl │ │ │ ├── unique_by_key.h │ │ │ └── unique_by_key.inl │ │ ├── internal │ │ │ ├── decompose.h │ │ │ └── scalar │ │ │ │ ├── adjacent_difference.h │ │ │ │ ├── binary_search.h │ │ │ │ ├── copy.h │ │ │ │ ├── copy.inl │ │ │ │ ├── copy_backward.h │ │ │ │ ├── copy_if.h │ │ │ │ ├── extrema.h │ │ │ │ ├── find.h │ │ │ │ ├── for_each.h │ │ │ │ ├── general_copy.h │ │ │ │ ├── insertion_sort.h │ │ │ │ ├── merge.h │ │ │ │ ├── merge.inl │ │ │ │ ├── partition.h │ │ │ │ ├── reduce.h │ │ │ │ ├── reduce_by_key.h │ │ │ │ ├── remove.h │ │ │ │ ├── scan.h │ │ │ │ ├── scan_by_key.h │ │ │ │ ├── set_operations.h │ │ │ │ ├── sort.h │ │ │ │ ├── sort.inl │ │ │ │ ├── stable_merge_sort.h │ │ │ │ ├── stable_merge_sort.inl │ │ │ │ ├── stable_primitive_sort.h │ │ │ │ ├── stable_primitive_sort.inl │ │ │ │ ├── stable_radix_sort.h │ │ │ │ ├── stable_radix_sort.inl │ │ │ │ ├── trivial_copy.h │ │ │ │ ├── unique.h │ │ │ │ └── unique_by_key.h │ │ └── system_error.inl │ ├── error_code.h │ ├── omp │ │ ├── detail │ │ │ ├── adjacent_difference.h │ │ │ ├── assign_value.h │ │ │ ├── binary_search.h │ │ │ ├── copy.h │ │ │ ├── copy.inl │ │ │ ├── copy_if.h │ │ │ ├── copy_if.inl │ │ │ ├── count.h │ │ │ ├── default_decomposition.h │ │ │ ├── default_decomposition.inl │ │ │ ├── equal.h │ │ │ ├── execution_policy.h │ │ │ ├── extrema.h │ │ │ ├── fill.h │ │ │ ├── find.h │ │ │ ├── for_each.h │ │ │ ├── for_each.inl │ │ │ ├── gather.h │ │ │ ├── generate.h │ │ │ ├── get_value.h │ │ │ ├── inner_product.h │ │ │ ├── iter_swap.h │ │ │ ├── logical.h │ │ │ ├── malloc_and_free.h │ │ │ ├── memory.inl │ │ │ ├── merge.h │ │ │ ├── mismatch.h │ │ │ ├── par.h │ │ │ ├── partition.h │ │ │ ├── partition.inl │ │ │ ├── reduce.h │ │ │ ├── reduce.inl │ │ │ ├── reduce_by_key.h │ │ │ ├── reduce_by_key.inl │ │ │ ├── reduce_intervals.h │ │ │ ├── reduce_intervals.inl │ │ │ ├── remove.h │ │ │ ├── remove.inl │ │ │ ├── replace.h │ │ │ ├── reverse.h │ │ │ ├── scan.h │ │ │ ├── scan_by_key.h │ │ │ ├── scatter.h │ │ │ ├── sequence.h │ │ │ ├── set_operations.h │ │ │ ├── sort.h │ │ │ ├── sort.inl │ │ │ ├── swap_ranges.h │ │ │ ├── tabulate.h │ │ │ ├── temporary_buffer.h │ │ │ ├── transform.h │ │ │ ├── transform_reduce.h │ │ │ ├── transform_scan.h │ │ │ ├── uninitialized_copy.h │ │ │ ├── uninitialized_fill.h │ │ │ ├── unique.h │ │ │ ├── unique.inl │ │ │ ├── unique_by_key.h │ │ │ ├── unique_by_key.inl │ │ │ └── vector.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ └── vector.h │ ├── system_error.h │ └── tbb │ │ ├── detail │ │ ├── adjacent_difference.h │ │ ├── assign_value.h │ │ ├── binary_search.h │ │ ├── copy.h │ │ ├── copy.inl │ │ ├── copy_if.h │ │ ├── copy_if.inl │ │ ├── count.h │ │ ├── equal.h │ │ ├── execution_policy.h │ │ ├── extrema.h │ │ ├── fill.h │ │ ├── find.h │ │ ├── for_each.h │ │ ├── for_each.inl │ │ ├── gather.h │ │ ├── generate.h │ │ ├── get_value.h │ │ ├── inner_product.h │ │ ├── iter_swap.h │ │ ├── logical.h │ │ ├── malloc_and_free.h │ │ ├── memory.inl │ │ ├── merge.h │ │ ├── merge.inl │ │ ├── mismatch.h │ │ ├── par.h │ │ ├── partition.h │ │ ├── partition.inl │ │ ├── reduce.h │ │ ├── reduce.inl │ │ ├── reduce_by_key.h │ │ ├── reduce_by_key.inl │ │ ├── reduce_intervals.h │ │ ├── remove.h │ │ ├── remove.inl │ │ ├── replace.h │ │ ├── reverse.h │ │ ├── scan.h │ │ ├── scan.inl │ │ ├── scan_by_key.h │ │ ├── scatter.h │ │ ├── sequence.h │ │ ├── set_operations.h │ │ ├── sort.h │ │ ├── sort.inl │ │ ├── swap_ranges.h │ │ ├── tabulate.h │ │ ├── temporary_buffer.h │ │ ├── transform.h │ │ ├── transform_reduce.h │ │ ├── transform_scan.h │ │ ├── uninitialized_copy.h │ │ ├── uninitialized_fill.h │ │ ├── unique.h │ │ ├── unique.inl │ │ ├── unique_by_key.h │ │ ├── unique_by_key.inl │ │ └── vector.inl │ │ ├── execution_policy.h │ │ ├── memory.h │ │ └── vector.h │ ├── system_error.h │ ├── tabulate.h │ ├── transform.h │ ├── transform_reduce.h │ ├── transform_scan.h │ ├── tuple.h │ ├── uninitialized_copy.h │ ├── uninitialized_fill.h │ ├── unique.h │ └── version.h ├── man ├── Rth-package.Rd ├── rth.nthreads.Rd ├── rthcolsums.Rd ├── rthdist.Rd ├── rthhist.Rd ├── rthma.Rd ├── rthorder.Rd ├── rthrnorm.Rd ├── rthrunif.Rd ├── rthsort.Rd └── rthtable.Rd ├── reconf ├── redocument ├── src ├── Makevars.in ├── Makevars.win ├── Rth.h ├── backend.h ├── hash.c ├── hash.h ├── rand.h ├── rs.cpp ├── rthcolsums.cpp ├── rthdist.cpp ├── rthgini.cpp ├── rthhist.cpp ├── rthkendall.cpp ├── rthma.cpp ├── rthmean.cpp ├── rthnorm.cpp ├── rthorder.cpp ├── rthpdist.cpp ├── rthpearson.cpp ├── rthrnorm.cpp ├── rthrunif.cpp ├── rthsort.cpp ├── rthtable.cpp ├── rthxpos.cpp ├── rthxposnv.cpp └── threads.cpp └── test ├── rthcolsums.r ├── rthdist.r ├── rthgini.r ├── rthhist.R ├── rthsort.R └── rthtable.R /.Rbuildignore: -------------------------------------------------------------------------------- 1 | reconf 2 | redocument 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.mod 3 | *.so 4 | *.log 5 | *.status 6 | *~ 7 | src/Makevars 8 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: Rth 2 | Type: Package 3 | Title: Rth: Parallel R through Thrust 4 | Version: 0.1-0 5 | Description: Thrust is a powerful tool for parallel programming. Rth consists 6 | of R library functions that enable one to achieve parallelism through 7 | Thrust, without needing to know Thrust or C++. 8 | License: GPL (>= 2) 9 | Depends: 10 | R (>= 2.14.0) 11 | SystemRequirements: GNU make. If building with CUDA backend, then 12 | Nvidia's CUDA toolkit (>= release 5.0) is required. 13 | NeedsCompilation: yes 14 | ByteCompile: yes 15 | Authors@R: c(person("Norm", "Matloff", role = c("aut", "cre"), 16 | email = "nsmatloff@ucdavis.edu"), 17 | person("Drew", "Schmidt", role = "aut", 18 | email = "wrathematics@gmail.com")) 19 | Maintainer: Drew Schmidt 20 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | # Rth Installation 2 | 3 | 4 | 5 | ## OpenMP 6 | 7 | Assuming you have an OpenMP-compatible C++ compiler (generally not 8 | available on the Mac): 9 | 10 | R CMD INSTALL Rth_0.1-0.tar.gz \ 11 | --configure-args="--with-backend=OPENMP" 12 | 13 | 14 | 15 | ## Intel Thread Building Blocks 16 | 17 | 18 | R CMD INSTALL Rth_0.1-0.tar.gz \ 19 | --configure-args="--with-backend=TBB \ 20 | --with-tbb-incdir=$TBBINC --with-tbb-libdir=$TBBLIB" 21 | 22 | 23 | 24 | ## CUDA 25 | 26 | R CMD INSTALL Rth_0.1-0.tar.gz \ 27 | --configure-args="--with-backend=CUDA" 28 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2 (4.0.2): do not edit by hand 2 | 3 | export(rth.nthreads) 4 | export(rthcolsums) 5 | export(rthdist) 6 | export(rthgini) 7 | export(rthhist) 8 | export(rthkendall) 9 | export(rthma) 10 | export(rthmean) 11 | export(rthnorm) 12 | export(rthorder) 13 | export(rthpdist) 14 | export(rthpearson) 15 | export(rthrnorm) 16 | export(rthrunif) 17 | export(rthsort) 18 | export(rthtable) 19 | export(rthxpos) 20 | useDynLib(Rth) 21 | -------------------------------------------------------------------------------- /R/Rth-package.r: -------------------------------------------------------------------------------- 1 | #' Flexible parallel computing from R, on multicore machines and GPUs. 2 | #' 3 | #' A collection of R wrappers to C++ functions written in the Thrust 4 | #' environment. Since the latter can be configured for execution either on 5 | #' multicore systems or on graphics processing units (GPUs), the same code 6 | #' works on both types of platforms. 7 | #' 8 | #' R programmers may use these functions without knowing how to program in C++, 9 | #' and without knowledge of the underlying parallel hardware. 10 | #' 11 | #' \tabular{ll}{ Package: \tab rth\cr Type: \tab Package\cr License: \tab GPL 12 | #' >= 2\cr } 13 | #' 14 | #' @useDynLib Rth 15 | #' 16 | #' @name Rth-package 17 | #' @docType package 18 | #' @author Norm Matloff 19 | #' @references \url{http://heather.cs.ucdavis.edu/~matloff/rth.html} 20 | #' @keywords Package 21 | NULL 22 | 23 | -------------------------------------------------------------------------------- /R/hash.r: -------------------------------------------------------------------------------- 1 | hash96 <- function(a, b, c) 2 | { 3 | .Call("R_mix_96", as.integer(a), as.integer(b), as.integer(c), PACKAGE="Rth") 4 | } 5 | 6 | rth.getseed <- function() 7 | { 8 | date <- as.integer(Sys.Date()) 9 | time <- as.integer(Sys.time()) 10 | pid <- as.integer(Sys.getpid()) 11 | 12 | ret <- hash96(time, pid, date) 13 | ret <- as.integer(ret) 14 | 15 | return( ret ) 16 | } 17 | -------------------------------------------------------------------------------- /R/rthcolsums.R: -------------------------------------------------------------------------------- 1 | #' Matrix column sums. 2 | #' 3 | #' 4 | #' For the given input matrix, returns the vector of column sums. 5 | #' 6 | #' 7 | #' @param m The data, in data frame or matrix form. 8 | #' @param nthreads An optional argument for specifying the number of threads 9 | #' (in the case of OpenMP or TBB backends) that the routine should (at most) 10 | #' use. Does nothing with a CUDA backend. See \link{nthreads}. 11 | #' @return Vector of column sums. 12 | #' @author Norm Matloff and Drew Schmidt 13 | #' 14 | #' @examples 15 | #' 16 | #' \dontrun{ 17 | #' 18 | #' # "attitude" data set, built-in to R 19 | #' rthcolsums(attitude) 20 | #' # should print 1939 1998... 21 | #' } 22 | #' 23 | #' @export 24 | rthcolsums <- function(m, nthreads=rth.nthreads()) { 25 | if (is.data.frame(m)) m <- as.matrix(m) 26 | .Call("rthcolsums",m, as.integer(nthreads), PACKAGE="Rth") 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /R/rthgini.r: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthgini <- function(x, unbiased=TRUE, na.rm=FALSE, nthreads=rth.nthreads()) 3 | { 4 | if (na.rm) 5 | { 6 | x <- na.omit(x) 7 | attributes(x) <- NULL 8 | } 9 | 10 | if (!is.double(x)) 11 | storage.mode(x) <- "double" 12 | 13 | mu <- mean(x) 14 | 15 | ret <- .Call("rthgini", x, mu, as.integer(unbiased), as.integer(nthreads), PACKAGE="Rth") 16 | 17 | return( ret ) 18 | } 19 | -------------------------------------------------------------------------------- /R/rthkendall.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthkendall <- function(x,y, nthreads=rth.nthreads()) 3 | { 4 | if (!is.double(x)) 5 | storage.mode(x) <- "double" 6 | if (!is.double(y)) 7 | storage.mode(y) <- "double" 8 | 9 | ret <- .Call("rthkendall", x, y, as.integer(nthreads), PACKAGE="Rth") 10 | 11 | return(ret) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /R/rthma.R: -------------------------------------------------------------------------------- 1 | #' Parallel Moving Average 2 | #' 3 | #' Computes a moving-average vector 4 | #' 5 | #' Computes a vector like that of \code{runmean()} in \pkg{caTools}, except 6 | #' that only full windows are computed, causing a discrepancy at the endpoints 7 | #' with \code{runmean()}. 8 | #' 9 | #' @param x a numeric vector 10 | #' @param w window width for the moving average 11 | #' @param nthreads An optional argument for specifying the number of threads 12 | #' (in the case of OpenMP or TBB backends) that the routine should (at most) 13 | #' use. Does nothing with a CUDA backend. See \link{nthreads}. 14 | #' @return The moving-average vector. Element i is the average of 15 | #' \code{x[i-w+1]},..., \code{x[i]}. 16 | #' @examples 17 | #' 18 | #' \dontrun{ 19 | #' x <- c(5,2,12,13,8,0,50) 20 | #' rthma(x,3) 21 | #' # should output c(6.333333,9.000000,11.000000,7.000000,19.333333) 22 | #' } 23 | #' 24 | #' @export 25 | rthma <- function(x, w, nthreads=rth.nthreads()) 26 | { 27 | nthreads <- as.integer(nthreads) 28 | ret <- .Call("rthma",x,as.integer(w),as.integer(nthreads)) 29 | 30 | if (is.null(ret)) 31 | return(0) 32 | else 33 | return(ret) 34 | } 35 | 36 | -------------------------------------------------------------------------------- /R/rthmean.r: -------------------------------------------------------------------------------- 1 | ### slow, don't use 2 | 3 | #' @export 4 | rthmean <- function(x, nthreads=rth.nthreads()) 5 | { 6 | if (!is.double(x)) 7 | storage.mode(x) <- "double" 8 | 9 | ret <- .Call("rthmean", x, as.integer(nthreads), PACKAGE="Rth") 10 | 11 | return( ret ) 12 | } 13 | -------------------------------------------------------------------------------- /R/rthnorm.r: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthnorm <- function(x, p=2, nthreads=rth.nthreads()) 3 | { 4 | if (!is.double(x)) 5 | storage.mode(x) <- "double" 6 | 7 | ret <- .Call("rth_norm", x, as.double(p), as.integer(nthreads), PACKAGE="Rth") 8 | 9 | return( ret ) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /R/rthorder.R: -------------------------------------------------------------------------------- 1 | #' Parallel Order and Rank 2 | #' 3 | #' Similar to R's \code{order()} and \code{rank()}. 4 | #' 5 | #' 6 | #' @param x A numeric vector. 7 | #' @param rnk Logical; if TRUE, the result is like a call to R's \code{rank()}; 8 | #' if FALSE, it is like R's \code{order()}. 9 | #' @param nthreads An optional argument for specifying the number of threads 10 | #' (in the case of OpenMP or TBB backends) that the routine should (at most) 11 | #' use. Does nothing with a CUDA backend. See \link{nthreads}. 12 | #' @return Vector of indices for either order or rank operation.. 13 | #' @examples 14 | #' 15 | #' \dontrun{ 16 | #' x <- c(1.2,0.3,0.8,2.8) 17 | #' order(x) # prints 2,3,1,4 18 | #' rthorder(x) # same 19 | #' rank(x) # prints 3,1,2,4 20 | #' rthorder(x,rnk=TRUE) # same 21 | #' } 22 | #' 23 | #' @export 24 | rthorder <- function(x, rnk=FALSE, nthreads=rth.nthreads()) { 25 | if (!is.double(x)) 26 | storage.mode(x) <- "double" 27 | 28 | ret <- .Call("rthorder", x, rnk, as.integer(nthreads), PACKAGE="Rth") 29 | 30 | # convert from C's 0-based indexing to R's 1-based 31 | return(ret + 1L) 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /R/rthpdist.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthpdist <- function(m1,m2, nthreads=rth.nthreads()) { 3 | if(rth.get.backend() == "tbb") 4 | stop("this function does not yet work under a TBB backend") 5 | 6 | if (is.data.frame(m1)) m1 <- as.matrix(m1) 7 | if (is.data.frame(m2)) m2 <- as.matrix(m2) 8 | .Call("rthpdist", m1, m2, as.integer(nthreads), PACKAGE="Rth") 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /R/rthpearson.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthpearson <- function(x,y, nthreads=rth.nthreads()) { 3 | if (!is.double(x)) 4 | storage.mode(x) <- "double" 5 | if (!is.double(y)) 6 | storage.mode(y) <- "double" 7 | 8 | .Call("rthpearson", x, y, as.integer(nthreads), PACKAGE="Rth") 9 | } 10 | 11 | -------------------------------------------------------------------------------- /R/rthrnorm.r: -------------------------------------------------------------------------------- 1 | #' Parallel Random Normal Generation 2 | #' 3 | #' Generate from a normal distribution in parallel. 4 | #' 5 | #' @aliases rthrnorm 6 | #' @param n 7 | #' The number of values to generate 8 | #' @param mean,sd 9 | #' Parameters for normal random variables. 10 | #' @param seed 11 | #' Seed for the random number generation. 12 | #' @param nthreads 13 | #' An optional argument for specifying the number of threads 14 | #' (in the case of OpenMP or TBB backends) that the routine should (at most) 15 | #' use. Does nothing with a CUDA backend. See \link{nthreads}. 16 | #' 17 | #' @references 18 | #' \url{https://thrust.github.io/doc/group__predefined__random.html} 19 | #' 20 | #' @export 21 | rthrnorm <- function(n, mean=0, sd=1, seed=rth.getseed(), nthreads=rth.nthreads()) 22 | { 23 | .Call("rth_rnorm", as.integer(n), as.double(mean), as.double(sd), seed=as.integer(seed), as.integer(nthreads), PACKAGE="Rth") 24 | } 25 | -------------------------------------------------------------------------------- /R/rthrunif.r: -------------------------------------------------------------------------------- 1 | #' Parallel Random Uniform Generation 2 | #' 3 | #' Generate from a uniform distribution in parallel. 4 | #' 5 | #' \code{rthrunif()} uses thrust's implementation of the minimal standard 6 | #' random number generation algorithm. The way seeds for threads are chosen at 7 | #' the moment does not guarantee independence of the RNG streams. 8 | #' 9 | #' @aliases rthrunif 10 | #' @param n 11 | #' The number of values to generate 12 | #' @param min,max 13 | #' Parameters for uniform random variables. 14 | #' @param seed 15 | #' Seed for the random number generation. 16 | #' @param nthreads 17 | #' An optional argument for specifying the number of threads 18 | #' (in the case of OpenMP or TBB backends) that the routine should (at most) 19 | #' use. Does nothing with a CUDA backend. See \link{nthreads}. 20 | #' 21 | #' @references 22 | #' \url{https://thrust.github.io/doc/group__predefined__random.html} 23 | #' 24 | #' @export 25 | rthrunif <- function(n, min=0, max=1, seed=rth.getseed(), nthreads=rth.nthreads()) 26 | { 27 | .Call("rth_runif", as.integer(n), as.double(min), as.double(max), seed=as.integer(seed), as.integer(nthreads), PACKAGE="Rth") 28 | } 29 | 30 | -------------------------------------------------------------------------------- /R/rthxpos.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | rthxpos <- function(m) { 3 | if (is.data.frame(m)) m <- as.matrix(m) 4 | tmp <- .Call("rthxpos",m,PACKAGE="Rth") 5 | # matrix(tmp,nrow=ncol(m)) 6 | dim(tmp) <- c(ncol(m), nrow(m)) 7 | 8 | return(tmp) 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | ## TODO 2 | 3 | * Export C names 4 | * threads vs cuda compile objects 5 | -------------------------------------------------------------------------------- /cleanup: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | rm -rf ./chm 4 | rm -rf ./config.* 5 | rm -rf ./autom4te.cache 6 | rm -rf ./src/Makevars 7 | rm -rf ./src/Makedeps 8 | rm -rf ./src/Makeconf 9 | rm -rf ./src/*.dylib 10 | rm -rf ./src/*.so 11 | rm -rf ./src/*.o 12 | rm -rf ./src/*.d 13 | rm -rf ./src/*.dll 14 | rm -rf ./src/*.a 15 | rm -rf ./src/*.rc 16 | rm -rf ./src/*.rds 17 | 18 | find ./ -type f -name '*.o' -delete 19 | find ./ -type f -name '*.mod' -delete 20 | 21 | rm -rf ./src-* 22 | rm -rf ./inst/etc* 23 | rm -rf ./man/*.pdf 24 | -------------------------------------------------------------------------------- /configure.win: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rth-org/Rth/23a67d1b653a239c5e172c24a75fd674ea436576/configure.win -------------------------------------------------------------------------------- /demo/00Index: -------------------------------------------------------------------------------- 1 | sort Rth Sorting in parallel with Rth. 2 | 3 | -------------------------------------------------------------------------------- /demo/sort.R: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | y <- sample(1:25,8) 4 | y 5 | rthsort(y) 6 | -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | citHeader("To cite Rth:") 2 | 3 | citEntry( 4 | entry = "Misc", 5 | title = "Rth: Parallel R through Thrust", 6 | author = personList(as.person("Norm Matloff"), 7 | as.person("Drew Schmidt")), 8 | year = "2014", 9 | note = "{R} Package", 10 | url = "https://github.com/Rth-org/Rth", 11 | textVersion = "Matloff, N. and Schmidt, D. (2014) Rth: Parallel R through 12 | Thrust. R Package, URL https://github.com/Rth-org/Rth", 13 | key = "RthRPackage" 14 | ) 15 | 16 | 17 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/advance.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | /*! \file advance.inl 19 | * \brief Inline file for advance.h 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | namespace thrust 27 | { 28 | 29 | 30 | template 31 | void advance(InputIterator& i, Distance n) 32 | { 33 | thrust::system::detail::generic::advance(i, n); 34 | } // end advance() 35 | 36 | 37 | } // end namespace thrust 38 | 39 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/allocator/default_construct_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace thrust 22 | { 23 | namespace detail 24 | { 25 | 26 | 27 | template 28 | inline void default_construct_range(Allocator &a, Pointer p, Size n); 29 | 30 | 31 | } // end detail 32 | } // end thrust 33 | 34 | #include 35 | 36 | 37 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/allocator/destroy_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace thrust 22 | { 23 | namespace detail 24 | { 25 | 26 | template 27 | inline void destroy_range(Allocator &a, Pointer p, Size n); 28 | 29 | } // end detail 30 | } // end thrust 31 | 32 | #include 33 | 34 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/allocator/fill_construct_range.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace thrust 22 | { 23 | namespace detail 24 | { 25 | 26 | 27 | template 28 | inline void fill_construct_range(Allocator &a, Pointer p, Size n, const T &value); 29 | 30 | 31 | } // end detail 32 | } // end thrust 33 | 34 | #include 35 | 36 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /*! \file config.h 17 | * \brief Defines platform configuration. 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #ifndef THRUST_DEBUG 20 | # ifndef NDEBUG 21 | # if (DEBUG || _DEBUG) 22 | # define THRUST_DEBUG 1 23 | # endif // (DEBUG || _DEBUG) 24 | # endif // NDEBUG 25 | #endif // THRUST_DEBUG 26 | 27 | #if THRUST_DEBUG 28 | # ifndef __THRUST_SYNCHRONOUS 29 | # define __THRUST_SYNCHRONOUS 1 30 | # endif // __THRUST_SYNCHRONOUS 31 | #endif // THRUST_DEBUG 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config/forceinline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file forceinline.h 18 | * \brief Defines __thrust_forceinline__ 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #if defined(__CUDACC__) 26 | 27 | #define __thrust_forceinline__ __forceinline__ 28 | 29 | #else 30 | 31 | // TODO add 32 | 33 | #define __thrust_forceinline__ 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config/hd_warning_disable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file hd_warning_disable.h 18 | * \brief Defines __thrust_hd_warning_disable__ 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #if defined(__CUDACC__) 26 | 27 | #define __thrust_hd_warning_disable__ \ 28 | #pragma hd_warning_disable 29 | #else 30 | 31 | #define __thrust_hd_warning_disable__ 32 | 33 | #endif 34 | 35 | 36 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config/host_device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file host_device.h 18 | * \brief Defines __host__ and __device__ and other CUDA-isms 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA 26 | 27 | #include 28 | 29 | #else 30 | 31 | // since __host__ & __device__ might have already be defined, only 32 | // #define them if not defined already 33 | // XXX this will break if the client does #include later 34 | 35 | #ifndef __host__ 36 | #define __host__ 37 | #endif // __host__ 38 | 39 | #ifndef __device__ 40 | #define __device__ 41 | #endif // __device__ 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/config/simple_defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /*! \file simple_defines.h 18 | * \brief Primitive macros without dependencies. 19 | */ 20 | 21 | #pragma once 22 | 23 | #define THRUST_UNKNOWN 0 24 | #define THRUST_FALSE 0 25 | #define THRUST_TRUE 1 26 | 27 | #define THRUST_PREVENT_MACRO_SUBSTITUTION 28 | 29 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/device_vector.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | /*! \file device_vector.inl 19 | * \brief Inline file for device_vector.h. 20 | */ 21 | 22 | #include 23 | 24 | namespace thrust 25 | { 26 | 27 | template 28 | template 29 | device_vector 30 | ::device_vector(const host_vector &v) 31 | :Parent(v) 32 | { 33 | ; 34 | } // end device_vector::device_vector() 35 | 36 | } // end namespace thrust 37 | 38 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/distance.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | /*! \file distance.inl 19 | * \brief Inline file for distance.h 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | namespace thrust 27 | { 28 | 29 | 30 | template 31 | inline typename thrust::iterator_traits::difference_type 32 | distance(InputIterator first, InputIterator last) 33 | { 34 | return thrust::system::detail::generic::distance(first, last); 35 | } // end distance() 36 | 37 | 38 | } // end namespace thrust 39 | 40 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/functional/operators.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/functional/placeholder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace thrust 24 | { 25 | namespace detail 26 | { 27 | namespace functional 28 | { 29 | 30 | template 31 | struct placeholder 32 | { 33 | typedef actor > type; 34 | }; 35 | 36 | } // end functional 37 | } // end detail 38 | } // end thrust 39 | 40 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/host_vector.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | /*! \file host_vector.inl 19 | * \brief Inline file for host_vector.h. 20 | */ 21 | 22 | #include 23 | 24 | namespace thrust 25 | { 26 | 27 | template 28 | template 29 | host_vector 30 | ::host_vector(const device_vector &v) 31 | :Parent(v) 32 | { 33 | ; 34 | } // end host_vector::host_vector() 35 | 36 | } // end namespace thrust 37 | 38 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/raw_pointer_cast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | template 26 | inline __host__ __device__ typename thrust::detail::pointer_traits::raw_pointer 27 | raw_pointer_cast(const Pointer &ptr) 28 | { 29 | return thrust::detail::pointer_traits::get(ptr); 30 | } // end raw_pointer_cast() 31 | 32 | } // end thrust 33 | 34 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/reference_forward_declaration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | template class reference; 26 | 27 | } // end thrust 28 | 29 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | template 26 | __host__ __device__ 27 | inline void swap(Assignable1 &a, Assignable2 &b) 28 | { 29 | Assignable1 temp = a; 30 | a = b; 31 | b = temp; 32 | } // end swap() 33 | 34 | } // end namespace thrust 35 | 36 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/swap.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/type_traits/has_nested_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #define __THRUST_DEFINE_HAS_NESTED_TYPE(trait_name, nested_type_name) \ 22 | template \ 23 | struct trait_name \ 24 | { \ 25 | typedef char yes_type; \ 26 | typedef int no_type; \ 27 | template static yes_type test(typename S::nested_type_name *); \ 28 | template static no_type test(...); \ 29 | static bool const value = sizeof(test(0)) == sizeof(yes_type);\ 30 | typedef thrust::detail::integral_constant type;\ 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/type_traits/is_metafunction_defined.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | namespace detail 26 | { 27 | 28 | __THRUST_DEFINE_HAS_NESTED_TYPE(is_metafunction_defined, type) 29 | 30 | template 31 | struct enable_if_defined 32 | : thrust::detail::lazy_enable_if< 33 | is_metafunction_defined::value, 34 | Metafunction 35 | > 36 | {}; 37 | 38 | } // end detail 39 | 40 | } // end thrust 41 | 42 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/type_traits/iterator/is_discard_iterator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace thrust 24 | { 25 | namespace detail 26 | { 27 | 28 | template 29 | struct is_discard_iterator 30 | : public thrust::detail::false_type 31 | {}; 32 | 33 | template 34 | struct is_discard_iterator< thrust::discard_iterator > 35 | : public thrust::detail::true_type 36 | {}; 37 | 38 | } // end namespace detail 39 | } // end namespace thrust 40 | 41 | -------------------------------------------------------------------------------- /inst/include/thrust/detail/use_default.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace thrust 22 | { 23 | 24 | struct use_default {}; 25 | 26 | } // end thrust 27 | 28 | -------------------------------------------------------------------------------- /inst/include/thrust/iterator/detail/any_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | struct any_system_tag 26 | : thrust::execution_policy 27 | { 28 | // allow any_system_tag to convert to any type at all 29 | // XXX make this safer using enable_if> upon c++11 30 | template operator T () const {return T();} 31 | }; 32 | 33 | // TODO remove this in 1.7.0 34 | typedef THRUST_DEPRECATED any_system_tag any_space_tag; 35 | 36 | } // end thrust 37 | 38 | -------------------------------------------------------------------------------- /inst/include/thrust/iterator/detail/device_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // #include the device system's execution_policy header 22 | #define __THRUST_DEVICE_SYSTEM_TAG_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/execution_policy.h> 23 | #include __THRUST_DEVICE_SYSTEM_TAG_HEADER 24 | #undef __THRUST_DEVICE_SYSTEM_TAG_HEADER 25 | 26 | namespace thrust 27 | { 28 | 29 | typedef thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::tag device_system_tag; 30 | 31 | } // end thrust 32 | 33 | // TODO remove this in 1.8.0 34 | namespace thrust 35 | { 36 | 37 | typedef THRUST_DEPRECATED device_system_tag device_space_tag; 38 | 39 | } // end thrust 40 | 41 | -------------------------------------------------------------------------------- /inst/include/thrust/iterator/detail/host_system_tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // #include the host system's execution_policy header 22 | #define __THRUST_HOST_SYSTEM_TAG_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/execution_policy.h> 23 | #include __THRUST_HOST_SYSTEM_TAG_HEADER 24 | #undef __THRUST_HOST_SYSTEM_TAG_HEADER 25 | 26 | namespace thrust 27 | { 28 | 29 | typedef thrust::system::__THRUST_HOST_SYSTEM_NAMESPACE::tag host_system_tag; 30 | 31 | } // end thrust 32 | 33 | // TODO remove this in 1.8.0 34 | namespace thrust 35 | { 36 | 37 | typedef THRUST_DEPRECATED host_system_tag host_space_tag; 38 | 39 | } // end thrust 40 | 41 | -------------------------------------------------------------------------------- /inst/include/thrust/iterator/detail/iterator_traversal_tags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | namespace thrust 20 | { 21 | 22 | // define Boost's traversal tags 23 | struct no_traversal_tag {}; 24 | 25 | struct incrementable_traversal_tag 26 | : no_traversal_tag {}; 27 | 28 | struct single_pass_traversal_tag 29 | : incrementable_traversal_tag {}; 30 | 31 | struct forward_traversal_tag 32 | : single_pass_traversal_tag {}; 33 | 34 | struct bidirectional_traversal_tag 35 | : forward_traversal_tag {}; 36 | 37 | struct random_access_traversal_tag 38 | : bidirectional_traversal_tag {}; 39 | 40 | } // end thrust 41 | 42 | -------------------------------------------------------------------------------- /inst/include/thrust/iterator/detail/reverse_iterator_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | 25 | template class reverse_iterator; 26 | 27 | namespace detail 28 | { 29 | 30 | template 31 | struct reverse_iterator_base 32 | { 33 | typedef thrust::iterator_adaptor< 34 | thrust::reverse_iterator, 35 | BidirectionalIterator 36 | > type; 37 | }; // end reverse_iterator_base 38 | 39 | } // end detail 40 | 41 | } // end thrust 42 | 43 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | namespace system 25 | { 26 | namespace cpp 27 | { 28 | namespace detail 29 | { 30 | 31 | template 32 | __host__ __device__ 33 | void assign_value(thrust::system::cpp::detail::execution_policy &, Pointer1 dst, Pointer2 src) 34 | { 35 | *thrust::raw_pointer_cast(dst) = *thrust::raw_pointer_cast(src); 36 | } // end assign_value() 37 | 38 | } // end detail 39 | } // end cpp 40 | } // end system 41 | } // end thrust 42 | 43 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace thrust 23 | { 24 | namespace system 25 | { 26 | namespace cpp 27 | { 28 | namespace detail 29 | { 30 | 31 | 32 | template 33 | __host__ __device__ 34 | typename thrust::iterator_value::type 35 | get_value(thrust::system::cpp::detail::execution_policy &, Pointer ptr) 36 | { 37 | return *thrust::raw_pointer_cast(ptr); 38 | } // end get_value() 39 | 40 | 41 | } // end detail 42 | } // end cpp 43 | } // end system 44 | } // end thrust 45 | 46 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace thrust 24 | { 25 | namespace system 26 | { 27 | namespace cpp 28 | { 29 | namespace detail 30 | { 31 | 32 | 33 | template 34 | __host__ __device__ 35 | void iter_swap(tag, Pointer1 a, Pointer2 b) 36 | { 37 | using thrust::swap; 38 | swap(*thrust::raw_pointer_cast(a), *thrust::raw_pointer_cast(b)); 39 | } // end iter_swap() 40 | 41 | 42 | } // end detail 43 | } // end cpp 44 | } // end system 45 | } // end thrust 46 | 47 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cpp has no special swap_ranges 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cpp has no special transform 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cpp/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/binary_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/extrema.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/find.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/guarded_cuda_runtime_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to check for the existence of macros 22 | // such as __host__ and __device__, which may already be defined by thrust 23 | // and to undefine them before entering cuda_runtime_api.h (which will redefine them) 24 | 25 | // we only try to do this stuff if cuda/include/host_defines.h has been included 26 | #if !defined(__HOST_DEFINES_H__) 27 | 28 | #ifdef __host__ 29 | #undef __host__ 30 | #endif // __host__ 31 | 32 | #ifdef __device__ 33 | #undef __device__ 34 | #endif // __device__ 35 | 36 | #endif // __HOST_DEFINES_H__ 37 | 38 | #include 39 | 40 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/partition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/remove.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cuda has no special swap_ranges 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/synchronize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | namespace thrust 23 | { 24 | namespace system 25 | { 26 | namespace cuda 27 | { 28 | namespace detail 29 | { 30 | 31 | inline void synchronize(const char *message = ""); 32 | 33 | inline void synchronize_if_enabled(const char *message = ""); 34 | 35 | } // end namespace detail 36 | } // end namespace cuda 37 | } // end namespace system 38 | } // end namespace thrust 39 | 40 | #include 41 | 42 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // cuda has no special transform 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/unique.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/cuda/detail/unique_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special version of this algorithm 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the copy.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch copy 24 | 25 | #define __THRUST_HOST_SYSTEM_COPY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/copy.h> 26 | #include __THRUST_HOST_SYSTEM_COPY_HEADER 27 | #undef __THRUST_HOST_SYSTEM_COPY_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_COPY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/copy.h> 30 | #include __THRUST_DEVICE_SYSTEM_COPY_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_COPY_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/copy_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy_if.h of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the copy_if.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch copy_if 24 | 25 | #define __THRUST_HOST_SYSTEM_BINARY_SEARCH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/copy_if.h> 26 | #include __THRUST_HOST_SYSTEM_BINARY_SEARCH_HEADER 27 | #undef __THRUST_HOST_SYSTEM_BINARY_SEARCH_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_BINARY_SEARCH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/copy_if.h> 30 | #include __THRUST_DEVICE_SYSTEM_BINARY_SEARCH_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_BINARY_SEARCH_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a count of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the count.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch count 24 | 25 | #define __THRUST_HOST_SYSTEM_COUNT_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/count.h> 26 | #include __THRUST_HOST_SYSTEM_COUNT_HEADER 27 | #undef __THRUST_HOST_SYSTEM_COUNT_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_COUNT_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/count.h> 30 | #include __THRUST_DEVICE_SYSTEM_COUNT_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_COUNT_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a equal of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the equal.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch equal 24 | 25 | #define __THRUST_HOST_SYSTEM_EQUAL_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/equal.h> 26 | #include __THRUST_HOST_SYSTEM_EQUAL_HEADER 27 | #undef __THRUST_HOST_SYSTEM_EQUAL_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_EQUAL_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/equal.h> 30 | #include __THRUST_DEVICE_SYSTEM_EQUAL_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_EQUAL_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/extrema.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a extrema of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the extrema.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch extrema 24 | 25 | #define __THRUST_HOST_SYSTEM_EXTREMA_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/extrema.h> 26 | #include __THRUST_HOST_SYSTEM_EXTREMA_HEADER 27 | #undef __THRUST_HOST_SYSTEM_EXTREMA_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_EXTREMA_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/extrema.h> 30 | #include __THRUST_DEVICE_SYSTEM_EXTREMA_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_EXTREMA_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the fill.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch fill 24 | 25 | #define __THRUST_HOST_SYSTEM_FILL_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/fill.h> 26 | #include __THRUST_HOST_SYSTEM_FILL_HEADER 27 | #undef __THRUST_HOST_SYSTEM_FILL_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_FILL_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/fill.h> 30 | #include __THRUST_DEVICE_SYSTEM_FILL_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_FILL_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/find.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the find.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch find 24 | 25 | #define __THRUST_HOST_SYSTEM_FIND_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/find.h> 26 | #include __THRUST_HOST_SYSTEM_FIND_HEADER 27 | #undef __THRUST_HOST_SYSTEM_FIND_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_FIND_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/find.h> 30 | #include __THRUST_DEVICE_SYSTEM_FIND_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_FIND_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/for_each.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the for_each.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch for_each 24 | 25 | #define __THRUST_HOST_SYSTEM_FOR_EACH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/for_each.h> 26 | #include __THRUST_HOST_SYSTEM_FOR_EACH_HEADER 27 | #undef __THRUST_HOST_SYSTEM_FOR_EACH_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/for_each.h> 30 | #include __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the gather.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch gather 24 | 25 | #define __THRUST_HOST_SYSTEM_FOR_EACH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/gather.h> 26 | #include __THRUST_HOST_SYSTEM_FOR_EACH_HEADER 27 | #undef __THRUST_HOST_SYSTEM_FOR_EACH_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/gather.h> 30 | #include __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the generate.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch generate 24 | 25 | #define __THRUST_HOST_SYSTEM_GENERATE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/generate.h> 26 | #include __THRUST_HOST_SYSTEM_GENERATE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_GENERATE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_GENERATE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/generate.h> 30 | #include __THRUST_DEVICE_SYSTEM_GENERATE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_GENERATE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the get_value.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch get_value 24 | 25 | #define __THRUST_HOST_SYSTEM_GET_VALUE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/get_value.h> 26 | #include __THRUST_HOST_SYSTEM_GET_VALUE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_GET_VALUE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_GET_VALUE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/get_value.h> 30 | #include __THRUST_DEVICE_SYSTEM_GET_VALUE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_GET_VALUE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the iter_swap.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch iter_swap 24 | 25 | #define __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/iter_swap.h> 26 | #include __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER 27 | #undef __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/iter_swap.h> 30 | #include __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the logical.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch logical 24 | 25 | #define __THRUST_HOST_SYSTEM_LOGICAL_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/logical.h> 26 | #include __THRUST_HOST_SYSTEM_LOGICAL_HEADER 27 | #undef __THRUST_HOST_SYSTEM_LOGICAL_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_LOGICAL_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/logical.h> 30 | #include __THRUST_DEVICE_SYSTEM_LOGICAL_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_LOGICAL_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/merge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the merge.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch merge 24 | 25 | #define __THRUST_HOST_SYSTEM_MERGE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/merge.h> 26 | #include __THRUST_HOST_SYSTEM_MERGE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_MERGE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_MERGE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/merge.h> 30 | #include __THRUST_DEVICE_SYSTEM_MERGE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_MERGE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the mismatch.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch mismatch 24 | 25 | #define __THRUST_HOST_SYSTEM_MISMATCH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/mismatch.h> 26 | #include __THRUST_HOST_SYSTEM_MISMATCH_HEADER 27 | #undef __THRUST_HOST_SYSTEM_MISMATCH_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_MISMATCH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/mismatch.h> 30 | #include __THRUST_DEVICE_SYSTEM_MISMATCH_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_MISMATCH_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/partition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the partition.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch partition 24 | 25 | #define __THRUST_HOST_SYSTEM_PARTITION_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/partition.h> 26 | #include __THRUST_HOST_SYSTEM_PARTITION_HEADER 27 | #undef __THRUST_HOST_SYSTEM_PARTITION_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_PARTITION_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/partition.h> 30 | #include __THRUST_DEVICE_SYSTEM_PARTITION_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_PARTITION_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the reduce.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch reduce 24 | 25 | #define __THRUST_HOST_SYSTEM_REDUCE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/reduce.h> 26 | #include __THRUST_HOST_SYSTEM_REDUCE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_REDUCE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_REDUCE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/reduce.h> 30 | #include __THRUST_DEVICE_SYSTEM_REDUCE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_REDUCE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/remove.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the remove.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch remove 24 | 25 | #define __THRUST_HOST_SYSTEM_REMOVE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/remove.h> 26 | #include __THRUST_HOST_SYSTEM_REMOVE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_REMOVE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_REMOVE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/remove.h> 30 | #include __THRUST_DEVICE_SYSTEM_REMOVE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_REMOVE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the replace.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch replace 24 | 25 | #define __THRUST_HOST_SYSTEM_REPLACE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/replace.h> 26 | #include __THRUST_HOST_SYSTEM_REPLACE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_REPLACE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_REPLACE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/replace.h> 30 | #include __THRUST_DEVICE_SYSTEM_REPLACE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_REPLACE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the reverse.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch reverse 24 | 25 | #define __THRUST_HOST_SYSTEM_REVERSE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/reverse.h> 26 | #include __THRUST_HOST_SYSTEM_REVERSE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_REVERSE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_REVERSE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/reverse.h> 30 | #include __THRUST_DEVICE_SYSTEM_REVERSE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_REVERSE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the scan.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch scan 24 | 25 | #define __THRUST_HOST_SYSTEM_SCAN_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/scan.h> 26 | #include __THRUST_HOST_SYSTEM_SCAN_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SCAN_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SCAN_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/scan.h> 30 | #include __THRUST_DEVICE_SYSTEM_SCAN_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SCAN_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the scan_by_key.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch scan_by_key 24 | 25 | #define __THRUST_HOST_SYSTEM_SCAN_BY_KEY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/scan_by_key.h> 26 | #include __THRUST_HOST_SYSTEM_SCAN_BY_KEY_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SCAN_BY_KEY_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SCAN_BY_KEY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/scan_by_key.h> 30 | #include __THRUST_DEVICE_SYSTEM_SCAN_BY_KEY_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SCAN_BY_KEY_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the scatter.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch scatter 24 | 25 | #define __THRUST_HOST_SYSTEM_SCATTER_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/scatter.h> 26 | #include __THRUST_HOST_SYSTEM_SCATTER_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SCATTER_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SCATTER_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/scatter.h> 30 | #include __THRUST_DEVICE_SYSTEM_SCATTER_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SCATTER_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the sequence.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch sequence 24 | 25 | #define __THRUST_HOST_SYSTEM_SEQUENCE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/sequence.h> 26 | #include __THRUST_HOST_SYSTEM_SEQUENCE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SEQUENCE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SEQUENCE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/sequence.h> 30 | #include __THRUST_DEVICE_SYSTEM_SEQUENCE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SEQUENCE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/sort.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the sort.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch sort 24 | 25 | #define __THRUST_HOST_SYSTEM_SORT_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/sort.h> 26 | #include __THRUST_HOST_SYSTEM_SORT_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SORT_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SORT_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/sort.h> 30 | #include __THRUST_DEVICE_SYSTEM_SORT_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SORT_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the swap_ranges.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch swap_ranges 24 | 25 | #define __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/swap_ranges.h> 26 | #include __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER 27 | #undef __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/swap_ranges.h> 30 | #include __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the tabulate.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch tabulate 24 | 25 | #define __THRUST_HOST_SYSTEM_TABULATE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/tabulate.h> 26 | #include __THRUST_HOST_SYSTEM_TABULATE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_TABULATE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_TABULATE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/tabulate.h> 30 | #include __THRUST_DEVICE_SYSTEM_TABULATE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_TABULATE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the transform.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch transform 24 | 25 | #define __THRUST_HOST_SYSTEM_TRANSFORM_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/transform.h> 26 | #include __THRUST_HOST_SYSTEM_TRANSFORM_HEADER 27 | #undef __THRUST_HOST_SYSTEM_TRANSFORM_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_TRANSFORM_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/transform.h> 30 | #include __THRUST_DEVICE_SYSTEM_TRANSFORM_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_TRANSFORM_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/adl/unique.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a fill of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // the purpose of this header is to #include the unique.h header 22 | // of the host and device systems. It should be #included in any 23 | // code which uses adl to dispatch unique 24 | 25 | #define __THRUST_HOST_SYSTEM_UNIQUE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/unique.h> 26 | #include __THRUST_HOST_SYSTEM_UNIQUE_HEADER 27 | #undef __THRUST_HOST_SYSTEM_UNIQUE_HEADER 28 | 29 | #define __THRUST_DEVICE_SYSTEM_UNIQUE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/unique.h> 30 | #include __THRUST_DEVICE_SYSTEM_UNIQUE_HEADER 31 | #undef __THRUST_DEVICE_SYSTEM_UNIQUE_HEADER 32 | 33 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/generic/advance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | namespace thrust 23 | { 24 | namespace system 25 | { 26 | namespace detail 27 | { 28 | namespace generic 29 | { 30 | 31 | template 32 | void advance(InputIterator& i, Distance n); 33 | 34 | } // end namespace generic 35 | } // end namespace detail 36 | } // end namespace system 37 | } // end namespace thrust 38 | 39 | #include 40 | 41 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/generic/distance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #pragma once 19 | 20 | #include 21 | #include 22 | 23 | namespace thrust 24 | { 25 | namespace system 26 | { 27 | namespace detail 28 | { 29 | namespace generic 30 | { 31 | 32 | template 33 | inline typename thrust::iterator_traits::difference_type 34 | distance(InputIterator first, InputIterator last); 35 | 36 | } // end namespace generic 37 | } // end namespace detail 38 | } // end namespace system 39 | } // end namespace thrust 40 | 41 | #include 42 | 43 | -------------------------------------------------------------------------------- /inst/include/thrust/system/detail/generic/tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | /*! \file generic/tag.h 19 | * \brief Implementation of the generic backend's tag. 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | 26 | namespace thrust 27 | { 28 | namespace system 29 | { 30 | namespace detail 31 | { 32 | namespace generic 33 | { 34 | 35 | // tag exists only to make the generic entry points the least priority match 36 | // during ADL. tag should not be derived from and is constructible from anything 37 | struct tag 38 | { 39 | template 40 | __host__ __device__ inline 41 | tag(const T &) {} 42 | }; 43 | 44 | } // end generic 45 | } // end detail 46 | } // end system 47 | } // end thrust 48 | 49 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits assign_value 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits count 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits equal 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits fill 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits gather 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits generate 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits get_value 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits inner_product 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits iter_swap 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits logical 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/malloc_and_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits malloc and free 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/merge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits merge 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits mismatch 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reverse 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits scan 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits sequence 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/set_operations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits set_operations 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits swap_ranges 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits tabulate 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits transform 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_reduce 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_scan 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_copy 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/omp/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_fill 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/assign_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits assign_value 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/binary_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits binary_search 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/count.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits count 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/equal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits equal 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits fill 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/gather.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits gather 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits generate 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/get_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits get_value 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/inner_product.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits inner_product 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/iter_swap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits iter_swap 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/logical.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits logical 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/malloc_and_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits malloc and free 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/mismatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits mismatch 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/replace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/reverse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits reverse 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/scan_by_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits scan_by_key 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/scatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits this algorithm 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/sequence.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits sequence 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/set_operations.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits set_operations 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/swap_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // tbb inherits swap_ranges 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/tabulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits tabulate 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/temporary_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system has no special temporary buffer functions 22 | 23 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/transform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // omp inherits transform 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/transform_reduce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_reduce 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/transform_scan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits transform_scan 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/uninitialized_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_copy 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /inst/include/thrust/system/tbb/detail/uninitialized_fill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2012 NVIDIA Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | // this system inherits uninitialized_fill 22 | #include 23 | 24 | -------------------------------------------------------------------------------- /man/Rth-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \docType{package} 3 | \name{Rth-package} 4 | \alias{Rth-package} 5 | \title{Flexible parallel computing from R, on multicore machines and GPUs.} 6 | \description{ 7 | A collection of R wrappers to C++ functions written in the Thrust 8 | environment. Since the latter can be configured for execution either on 9 | multicore systems or on graphics processing units (GPUs), the same code 10 | works on both types of platforms. 11 | } 12 | \details{ 13 | R programmers may use these functions without knowing how to program in C++, 14 | and without knowledge of the underlying parallel hardware. 15 | 16 | \tabular{ll}{ Package: \tab rth\cr Type: \tab Package\cr License: \tab GPL 17 | >= 2\cr } 18 | } 19 | \author{ 20 | Norm Matloff 21 | } 22 | \references{ 23 | \url{http://heather.cs.ucdavis.edu/~matloff/rth.html} 24 | } 25 | \keyword{Package} 26 | 27 | -------------------------------------------------------------------------------- /man/rth.nthreads.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rth.nthreads} 3 | \alias{nthreads} 4 | \alias{rth.nthreads} 5 | \title{Determining the Number of Threads a Routine Uses} 6 | \usage{ 7 | rth.nthreads() 8 | } 9 | \description{ 10 | Note, this only applies for OpenMP and Intel Thread Building Blocks 11 | backends. 12 | } 13 | \details{ 14 | \code{rth.nthreads()} will determine the maximum number of threads to use by 15 | checking against the environment variable \code{RTH_NUM_THREADS} (and in the 16 | case of OpenMP, \code{OMP_NUM_THREADS}), and failing that, the default for 17 | the given backend. For OpenMP this means that the number of cores 18 | (physical+logical) will be returned. For Intel Thread Building Blocks, the 19 | default is the value \code{-1}. 20 | 21 | For any function taking \code{nthreads=} as an argument, the priority is 22 | (highest to lowest): \tabular{ll}{ nthreads argument in the R-level Rth 23 | function \cr RTH_NUM_THREADS environment variable \cr OMP_NUM_THREADS 24 | environment variable (for OpenMP backends) \cr Number of cores } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /man/rthcolsums.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthcolsums} 3 | \alias{rthcolsums} 4 | \title{Matrix column sums.} 5 | \usage{ 6 | rthcolsums(m, nthreads = rth.nthreads()) 7 | } 8 | \arguments{ 9 | \item{m}{The data, in data frame or matrix form.} 10 | 11 | \item{nthreads}{An optional argument for specifying the number of threads 12 | (in the case of OpenMP or TBB backends) that the routine should (at most) 13 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 14 | } 15 | \value{ 16 | Vector of column sums. 17 | } 18 | \description{ 19 | For the given input matrix, returns the vector of column sums. 20 | } 21 | \examples{ 22 | \dontrun{ 23 | 24 | # "attitude" data set, built-in to R 25 | rthcolsums(attitude) 26 | # should print 1939 1998... 27 | } 28 | } 29 | \author{ 30 | Norm Matloff and Drew Schmidt 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /man/rthdist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthdist} 3 | \alias{rthdist} 4 | \alias{rthpdist} 5 | \title{Parallel Computation of Distances} 6 | \usage{ 7 | rthdist(m, nthreads = rth.nthreads()) 8 | } 9 | \arguments{ 10 | \item{m}{Matrix/data frame for between-rows distance computation.} 11 | 12 | \item{nthreads}{An optional argument for specifying the number of threads 13 | (in the case of OpenMP or TBB backends) that the routine should (at most) 14 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 15 | 16 | \item{m1}{First matrix/data frame for between-matrices distance computation.} 17 | 18 | \item{m2}{Second matrix/data frame for between-matrices distance 19 | computation.} 20 | } 21 | \value{ 22 | Object of R class \code{"matrix"}. Duplicate computation is avoided 23 | in \code{rthdist()} but the entire matrix is constructed. 24 | } 25 | \description{ 26 | Similar to R's \code{dist()} and \code{pdist()}. 27 | } 28 | \details{ 29 | Calling \code{rthdist()} on the matrix \code{m} returns the euclidean 30 | distances between all pairs of rows in \code{m}. 31 | 32 | The call \code{rthpdist(m1,m2)} returns the distance from all rows of 33 | \code{m1} to all in \code{m2}. 34 | } 35 | \examples{ 36 | \dontrun{ 37 | library(Rth) 38 | m1 <- rbind(1:2,3:4) 39 | m2 <- matrix(c(1,0,1,6),ncol=2) 40 | m1 41 | m2 42 | rthdist(m1) 43 | rthpdist(m1,m2) 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /man/rthhist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthhist} 3 | \alias{rthhist} 4 | \title{Parallel Computation of Histograms} 5 | \usage{ 6 | rthhist(xname, nbins = 15, plot = TRUE, nthreads = rth.nthreads(), 7 | nchunks = nthreads) 8 | } 9 | \arguments{ 10 | \item{xname}{Name of data vector, quoted.} 11 | 12 | \item{nbins}{The number of bins.} 13 | 14 | \item{plot}{If TRUE, plot will be displayed.} 15 | 16 | \item{nthreads}{An optional argument for specifying the number of threads 17 | (in the case of OpenMP or TBB backends) that the routine should (at most) 18 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 19 | 20 | \item{nchunks}{Number of chunks for partitioning the data.} 21 | } 22 | \value{ 23 | Object of R class \code{"histogram"}. 24 | } 25 | \description{ 26 | Similar to R's \code{hist()} 27 | } 28 | \details{ 29 | Similar to \code{hist()}, though with fewer options. 30 | } 31 | \examples{ 32 | \dontrun{ 33 | # R built-in geyser data 34 | fw <- faithful$waiting 35 | fwh <- rthhist("fw") 36 | fwh # display plot, famously bimodal 37 | fwh <- rthhist("fw",plot=FALSE) 38 | fwh 39 | # bin counts, left endpt, binwidth printed out 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /man/rthma.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthma} 3 | \alias{rthma} 4 | \title{Parallel Moving Average} 5 | \usage{ 6 | rthma(x, w, nthreads = rth.nthreads()) 7 | } 8 | \arguments{ 9 | \item{x}{a numeric vector} 10 | 11 | \item{w}{window width for the moving average} 12 | 13 | \item{nthreads}{An optional argument for specifying the number of threads 14 | (in the case of OpenMP or TBB backends) that the routine should (at most) 15 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 16 | } 17 | \value{ 18 | The moving-average vector. Element i is the average of 19 | \code{x[i-w+1]},..., \code{x[i]}. 20 | } 21 | \description{ 22 | Computes a moving-average vector 23 | } 24 | \details{ 25 | Computes a vector like that of \code{runmean()} in \pkg{caTools}, except 26 | that only full windows are computed, causing a discrepancy at the endpoints 27 | with \code{runmean()}. 28 | } 29 | \examples{ 30 | \dontrun{ 31 | x <- c(5,2,12,13,8,0,50) 32 | rthma(x,3) 33 | # should output c(6.333333,9.000000,11.000000,7.000000,19.333333) 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /man/rthorder.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthorder} 3 | \alias{rthorder} 4 | \title{Parallel Order and Rank} 5 | \usage{ 6 | rthorder(x, rnk = FALSE, nthreads = rth.nthreads()) 7 | } 8 | \arguments{ 9 | \item{x}{A numeric vector.} 10 | 11 | \item{rnk}{Logical; if TRUE, the result is like a call to R's \code{rank()}; 12 | if FALSE, it is like R's \code{order()}.} 13 | 14 | \item{nthreads}{An optional argument for specifying the number of threads 15 | (in the case of OpenMP or TBB backends) that the routine should (at most) 16 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 17 | } 18 | \value{ 19 | Vector of indices for either order or rank operation.. 20 | } 21 | \description{ 22 | Similar to R's \code{order()} and \code{rank()}. 23 | } 24 | \examples{ 25 | \dontrun{ 26 | x <- c(1.2,0.3,0.8,2.8) 27 | order(x) # prints 2,3,1,4 28 | rthorder(x) # same 29 | rank(x) # prints 3,1,2,4 30 | rthorder(x,rnk=TRUE) # same 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /man/rthrnorm.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthrnorm} 3 | \alias{rthrnorm} 4 | \title{Parallel Random Normal Generation} 5 | \usage{ 6 | rthrnorm(n, mean = 0, sd = 1, seed = rth.getseed(), 7 | nthreads = rth.nthreads()) 8 | } 9 | \arguments{ 10 | \item{n}{The number of values to generate} 11 | 12 | \item{mean,sd}{Parameters for normal random variables.} 13 | 14 | \item{seed}{Seed for the random number generation.} 15 | 16 | \item{nthreads}{An optional argument for specifying the number of threads 17 | (in the case of OpenMP or TBB backends) that the routine should (at most) 18 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 19 | } 20 | \description{ 21 | Generate from a normal distribution in parallel. 22 | } 23 | \references{ 24 | \url{https://thrust.github.io/doc/group__predefined__random.html} 25 | } 26 | 27 | -------------------------------------------------------------------------------- /man/rthrunif.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.2): do not edit by hand 2 | \name{rthrunif} 3 | \alias{rthrunif} 4 | \title{Parallel Random Uniform Generation} 5 | \usage{ 6 | rthrunif(n, min = 0, max = 1, seed = rth.getseed(), 7 | nthreads = rth.nthreads()) 8 | } 9 | \arguments{ 10 | \item{n}{The number of values to generate} 11 | 12 | \item{min,max}{Parameters for uniform random variables.} 13 | 14 | \item{seed}{Seed for the random number generation.} 15 | 16 | \item{nthreads}{An optional argument for specifying the number of threads 17 | (in the case of OpenMP or TBB backends) that the routine should (at most) 18 | use. Does nothing with a CUDA backend. See \link{nthreads}.} 19 | } 20 | \description{ 21 | Generate from a uniform distribution in parallel. 22 | } 23 | \details{ 24 | \code{rthrunif()} uses thrust's implementation of the minimal standard 25 | random number generation algorithm. The way seeds for threads are chosen at 26 | the moment does not guarantee independence of the RNG streams. 27 | } 28 | \references{ 29 | \url{https://thrust.github.io/doc/group__predefined__random.html} 30 | } 31 | 32 | -------------------------------------------------------------------------------- /reconf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoconf configure.ac && autoreconf -if 3 | rm -r autom4te.cache 4 | -------------------------------------------------------------------------------- /redocument: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | Rscript -e "roxygen2::roxygenize()" 4 | 5 | -------------------------------------------------------------------------------- /src/Makevars.in: -------------------------------------------------------------------------------- 1 | ################################################################# 2 | 3 | PKG_CXXFLAGS = -I../inst/include/ 4 | PKG_LIBS = @RTH_LDFLAGS@ 5 | 6 | PKG_CPPFLAGS = @RTH_CPPFLAGS@ # -Wfatal-errors 7 | 8 | # rthcolsums.o \ 9 | # rthgini.o \ 10 | # rthhist.o \ 11 | # rthkendall.o \ 12 | # rthma.o \ 13 | # rthrnorm.o \ 14 | # rthrunif.o \ 15 | 16 | R_OBJS = \ 17 | hash.o \ 18 | rthdist.o \ 19 | rthmean.o \ 20 | rthnorm.o \ 21 | rthorder.o \ 22 | rthpdist.o \ 23 | rthpearson.o \ 24 | rthsort.o \ 25 | rthtable.o \ 26 | rthxpos.o \ 27 | threads.o 28 | 29 | 30 | OBJECTS = $(R_OBJS) 31 | 32 | BACKEND = @BACKEND@ 33 | all: $(SHLIB) 34 | 35 | ifeq "$(BACKEND)" "CUDA" 36 | NVCC = @NVCC@ 37 | CUDA_INCS = @CUDA_INCS@ 38 | 39 | %.o: %.cpp 40 | $(NVCC) -DGPU -x cu -c -Xcompiler "-fPIC" $(CUDA_INCS) $< -o $@ 41 | Rth.so: $(OBJECTS) 42 | $(NVCC) --shared $(OBJECTS) -o $@ 43 | else 44 | $(SHLIB): $(OBJECTS) 45 | endif 46 | 47 | 48 | clean: 49 | @rm -rf *.o *.so *.dll \ 50 | Makevars $(USER_CONF) $(SHLIB) $(OBJECTS) 51 | 52 | -------------------------------------------------------------------------------- /src/Makevars.win: -------------------------------------------------------------------------------- 1 | ################################################################# 2 | 3 | RCPP_CXXFLAGS = `$(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()"` 4 | RCPP_LDFLAGS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` 5 | 6 | PKG_CXXFLAGS = $(RCPP_CXXFLAGS) 7 | PKG_LIBS = $(RCPP_LDFLAGS) $(SHLIB_OPENMP_CFLAGS) 8 | 9 | PKG_CPPFLAGS = -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_OMP \ 10 | $(SHLIB_OPENMP_CFLAGS) -I../inst/include/ # -Wfatal-errors 11 | 12 | 13 | #R_OBJS = $(wildcard *.cpp) 14 | R_OBJS = \ 15 | hash.o \ 16 | rthcolsums.o \ 17 | rthdist.o \ 18 | rthgini.o \ 19 | rthhist.o \ 20 | rthkendall.o \ 21 | rthmean.o \ 22 | rthnorm.o \ 23 | rthorder.o \ 24 | rthpdist.o \ 25 | rthpearson.o \ 26 | rthrnorm.o \ 27 | rthrunif.o \ 28 | rthsort.o \ 29 | rthtable.o \ 30 | rthxpos.o \ 31 | threads.o 32 | 33 | OBJECTS = $(R_OBJS) 34 | 35 | all: $(SHLIB) 36 | 37 | $(SHLIB): $(OBJECTS) 38 | 39 | 40 | clean: 41 | @rm -rf *.o *.so *.dll \ 42 | Makevars $(USER_CONF) $(SHLIB) $(OBJECTS) 43 | 44 | -------------------------------------------------------------------------------- /src/Rth.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTH__ 2 | #define __RTH__ 3 | 4 | 5 | #ifdef GPU 6 | #define flouble float 7 | #else 8 | #define flouble double 9 | #endif 10 | 11 | #include 12 | #include 13 | 14 | #include "backend.h" 15 | 16 | #define RTH_ERROR -2147483648 // int NA in R 17 | 18 | #define INT(x) INTEGER(x)[0] 19 | 20 | #if RTH_OMP 21 | #define RTH_GEN_NTHREADS(nthreads) omp_set_num_threads(INT(nthreads)) 22 | #elif RTH_TBB 23 | #define RTH_GEN_NTHREADS(nthreads) tbb::task_scheduler_init init(INT(nthreads)) 24 | #else 25 | #define RTH_GEN_NTHREADS(nthreads) // nothing 26 | #endif 27 | 28 | #define INT(x) INTEGER(x)[0] 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/backend.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTH_BACKEND__ 2 | #define __RTH_BACKEND__ 3 | 4 | 5 | #include 6 | 7 | 8 | // FIXME should we include CPP ? 9 | #if THRUST_VERSION >= 100700 10 | #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_OMP 11 | #include 12 | #define RTH_OMP 1 13 | 14 | #elif THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_TBB 15 | #include "tbb/task_scheduler_init.h" 16 | #define RTH_TBB 1 17 | 18 | #elif THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA 19 | #define RTH_CUDA 1 20 | #endif 21 | #else 22 | #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_BACKEND_OMP 23 | #include 24 | #define RTH_OMP 1 25 | 26 | #elif THRUST_DEVICE_SYSTEM == THRUST_DEVICE_BACKEND_TBB 27 | #include "tbb/task_scheduler_init.h" 28 | #define RTH_TBB 1 29 | 30 | #elif THRUST_DEVICE_SYSTEM == THRUST_DEVICE_BACKEND_CUDA 31 | #define RTH_CUDA 1 32 | #endif 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/hash.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define INT(x) INTEGER(x)[0] 5 | 6 | 7 | // The hash function from the thrust devs 8 | unsigned int thrust_hash(unsigned int a) 9 | { 10 | a = (a+0x7ed55d16) + (a<<12); 11 | a = (a^0xc761c23c) ^ (a>>19); 12 | a = (a+0x165667b1) + (a<<5); 13 | a = (a+0xd3a2646c) ^ (a<<9); 14 | a = (a+0xfd7046c5) + (a<<3); 15 | a = (a^0xb55a4f09) ^ (a>>16); 16 | return a; 17 | } 18 | 19 | 20 | 21 | // Robert Jenkins' 96 bit Mix Function 22 | int mix_96(int a, int b, int c) 23 | { 24 | a=a-b; a=a-c; a=a^(c >> 13); 25 | b=b-c; b=b-a; b=b^(a << 8); 26 | c=c-a; c=c-b; c=c^(b >> 13); 27 | a=a-b; a=a-c; a=a^(c >> 12); 28 | b=b-c; b=b-a; b=b^(a << 16); 29 | c=c-a; c=c-b; c=c^(b >> 5); 30 | a=a-b; a=a-c; a=a^(c >> 3); 31 | b=b-c; b=b-a; b=b^(a << 10); 32 | c=c-a; c=c-b; c=c^(b >> 15); 33 | 34 | return c; 35 | } 36 | 37 | 38 | SEXP R_mix_96(SEXP a, SEXP b, SEXP c) 39 | { 40 | SEXP ret; 41 | PROTECT(ret = allocVector(INTSXP, 1)); 42 | 43 | INT(ret) = mix_96(INT(a), INT(b), INT(c)); 44 | 45 | UNPROTECT(1); 46 | return ret; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/hash.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTH_HASH__ 2 | #define __RTH_HASH__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | unsigned int thrust_hash(unsigned int a); 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/rand.h: -------------------------------------------------------------------------------- 1 | // The hash function from the thrust devs 2 | __host__ __device__ 3 | unsigned int thrust_hash(unsigned int a) 4 | { 5 | a = (a+0x7ed55d16) + (a<<12); 6 | a = (a^0xc761c23c) ^ (a>>19); 7 | a = (a+0x165667b1) + (a<<5); 8 | a = (a+0xd3a2646c) ^ (a<<9); 9 | a = (a+0xfd7046c5) + (a<<3); 10 | a = (a^0xb55a4f09) ^ (a>>16); 11 | return a; 12 | } 13 | -------------------------------------------------------------------------------- /src/rthmean.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "Rth.h" 8 | 9 | 10 | 11 | /* mean */ 12 | struct div_by_n 13 | { 14 | const int n; 15 | 16 | div_by_n(int _n) : n(_n) {} 17 | 18 | __host__ __device__ 19 | flouble operator()(flouble x) const 20 | { 21 | return x/((flouble) n); 22 | } 23 | }; 24 | 25 | 26 | 27 | // FIXME very slow 28 | extern "C" SEXP rthmean(SEXP x, SEXP nthreads) 29 | { 30 | SEXP avg; 31 | PROTECT(avg = allocVector(REALSXP, 1)); 32 | const int n = LENGTH(x); 33 | 34 | RTH_GEN_NTHREADS(nthreads); 35 | 36 | thrust::device_vector dx(REAL(x), REAL(x)+n); 37 | 38 | thrust::plus binop; 39 | REAL(avg)[0] = (double) thrust::transform_reduce(dx.begin(), dx.end(), div_by_n(n), (flouble) 0., binop); 40 | 41 | UNPROTECT(1); 42 | return avg; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/rthpearson.cpp: -------------------------------------------------------------------------------- 1 | // author: N. Matloff 2 | 3 | // Rth implementation of Pearson product-moment correlation 4 | 5 | // single-pass, subject to increased roundoff error 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Rth.h" 12 | 13 | typedef thrust::device_vector intvec; 14 | typedef thrust::device_vector doublevec; 15 | 16 | extern "C" SEXP rthpearson(SEXP x, SEXP y, SEXP nthreads) 17 | { 18 | SEXP cor; 19 | int n = LENGTH(x); 20 | doublevec dx(REAL(x), REAL(x)+n); 21 | doublevec dy(REAL(x), REAL(x)+n); 22 | double zero = (double) 0.0; 23 | 24 | RTH_GEN_NTHREADS(nthreads); 25 | 26 | double xy = 27 | thrust::inner_product(dx.begin(), dx.end(), dy.begin(), zero); 28 | double x2 = 29 | thrust::inner_product(dx.begin(), dx.end(), dx.begin(), zero); 30 | double y2 = 31 | thrust::inner_product(dy.begin(), dy.end(), dy.begin(), zero); 32 | double xt = 33 | thrust::reduce(dx.begin(), dx.end()); 34 | double yt = 35 | thrust::reduce(dy.begin(), dy.end()); 36 | double xm = xt/n, ym = yt/n; 37 | double xsd = sqrt(x2/n - xm*xm); 38 | double ysd = sqrt(y2/n - ym*ym); 39 | 40 | PROTECT(cor = allocVector(REALSXP, 1)); 41 | REAL(cor)[0] = (xy/n - xm*ym) / (xsd*ysd); 42 | 43 | UNPROTECT(1); 44 | return cor; 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /test/rthcolsums.r: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | m <- 100 4 | n <- 10 5 | x <- matrix(rnorm(m*n), m, n) 6 | 7 | t2 <- colSums(x) 8 | t1 <- rthcolsums(x) 9 | 10 | all.equal(t1, t2) 11 | -------------------------------------------------------------------------------- /test/rthdist.r: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | 4 | n <- 1e2 5 | x <- matrix(rnorm(n), ncol=1) 6 | 7 | 8 | ### Norms 9 | x1 <- norm(x, type="F") 10 | x2 <- rthnorm(x, p=2) 11 | all.equal(x1, x2) 12 | 13 | x1 <- norm(x, type="O") 14 | x2 <- rthnorm(x, p=1) 15 | all.equal(x1, x2) 16 | 17 | 18 | ### Distances 19 | y <- matrix(rnorm(n), ncol=1) 20 | X <- t(matrix(c(x,y), ncol=2)) 21 | 22 | all.equal(dist(X)[1], rthdist(x,y)) 23 | -------------------------------------------------------------------------------- /test/rthgini.r: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | n <- 100 4 | x <- rnorm(n) 5 | 6 | rthgini(x) 7 | -------------------------------------------------------------------------------- /test/rthhist.R: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | x <- c(3,5.01,12,6,5,15,7,8,4.01,10,4,16) 4 | rthhist("x",5,4,plot=F) # comp hist, 5 bins, 4 threads, no plot 5 | # $counts 6 | # [1] 5 3 1 1 2 7 | 8 | # $left 9 | # [1] 3 10 | # attr(,"Csingle") 11 | # [1] TRUE 12 | 13 | # $binwidth 14 | # [1] 2.6 15 | # attr(,"Csingle") 16 | # [1] TRUE 17 | 18 | -------------------------------------------------------------------------------- /test/rthsort.R: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | all.equal(rthsort(10:1), 1:10) 4 | -------------------------------------------------------------------------------- /test/rthtable.R: -------------------------------------------------------------------------------- 1 | library(Rth) 2 | 3 | ### test 1 4 | m <- rbind( 5 | c(1,2), 6 | c(1,1), 7 | c(2,3), 8 | c(1,2)) 9 | 10 | 11 | x1 <- rthtable(m,c(2,3),2) 12 | x2 <- matrix(c(1, 0, 2, 0, 0, 1), 2, 3) 13 | class(x2) <- "table" 14 | # [,1] [,2] [,3] 15 | # [1,] 1 2 0 16 | # [2,] 0 0 1 17 | 18 | all.equal(x1, x2, check.attributes=FALSE) 19 | 20 | 21 | ### test 2 22 | #m <- rbind( 23 | # c(1,2,2), 24 | # c(1,1,1), 25 | # c(2,3,1), 26 | # c(2,3,2), 27 | # c(1,2,2)) 28 | 29 | #x1 <- rthtable(m,c(2,3,2),3) 30 | 31 | # should output 32 | # , , 1 33 | # 34 | # [,1] [,2] [,3] 35 | # [1,] 1 0 0 36 | # [2,] 0 0 1 37 | # 38 | # , , 2 39 | # 40 | # [,1] [,2] [,3] 41 | # [1,] 0 2 0 42 | # [2,] 0 0 1 43 | 44 | 45 | --------------------------------------------------------------------------------