Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Incorrect example for permutation iterator. #1660

@trivialfis

Description

@trivialfis

https://nvidia.github.io/thrust/api/classes/classthrust_1_1permutation__iterator.html#class-thrustpermutation_iterator

#include <thrust/iterator/permutation_iterator.h>
#include <thrust/device_vector.h>
...
thrust::device_vector<float> values(4);
values[0] = 10.0f;
values[1] = 20.0f;
values[2] = 30.0f;
values[3] = 40.0f;
values[4] = 50.0f;
values[5] = 60.0f;
values[6] = 70.0f;
values[7] = 80.0f;

I think the correct size should be 8 instead of 4.

Metadata

Metadata

Assignees

Labels

P1: should haveNecessary, but not critical.only: docsDocumentation changes only. Doesn't need code CI.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions