how to get max blocks in thrust in cuda 5.5 -


the thrust function below can maximum blocks of cuda launch cuda 5.0, used sparse matrix vector multiplication(spmv) in cusp, , technique setting execution persistent threads. first line header file.

#include <thrust/detail/backend/cuda/arch.h>  thrust::detail::backend::cuda::arch::max_active_blocks(kernel<float,int,vectors_per_block,th    reads_per_vector>,threads_per_block,(size_t)0) 

but function not supported cuda 5.5. technique not supported cuda 5.5, or should use other function instead?

there never supported way perform computation in version of thrust. headers inside thrust/detail , identifiers inside detail namespace part of thrust's implementation -- not public features. using them break code.

that said, there's standalone code implementing occupancy calculator in repository:

https://github.com/jaredhoberock/cuda_launch_config


Comments