我想知道在一个线程中是否可以使用thrust :: sort()
__global__
void mykernel(float* array, int arrayLength)
{
int threadID = blockIdx.x * blockDim.x + threadIdx.x;
// array length is vector in the device global memory
// is it possible to use inside the thread?
thrust::sort(array, array+arrayLength);
// do something else with the array
}
Run Code Online (Sandbox Code Playgroud)
如果是,那么sort会启动其他内核来并行排序吗?