Example #1
0
    void permute(adapter<T, N, device_tag> &a, int id, size_t count) {
	if (id != 0) return;
	//std::cout << "permute" << std::endl;
	//BOOST_STATIC_ASSERT((0));

	dim3 grid((a.shape()[1]+15)/16, (a.shape()[2]+15)/16);
	dim3 block(16,16);

	if (I == 0 && J == 2 && K == 1) {
	    grid = dim3(a.shape()[1], a.shape()[2]);
	    block = dim3(64);
	}

	(detail::device::kernel(grid, block)
	 (detail::permute(), a, boost::mpl::vector_c<int,I,J,K>()));
    }