【发布时间】:2014-06-17 16:37:18
【问题描述】:
我想知道推力::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
}
如果是,排序是否会启动其他内核来并行化排序?
【问题讨论】:
-
我的问题不同;我正在启动一个具有多个线程的内核,在每个线程内我需要对一个可在全局/共享内存中访问的向量进行排序。