10 #ifndef STOKHOS_CUDA_DEVICE_PROP_HPP
11 #define STOKHOS_CUDA_DEVICE_PROP_HPP
13 #include "Kokkos_Core.hpp"
17 #include "cuda_runtime_api.h"
66 cudaGetDevice(&device_id);
70 cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor,
72 cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor,
80 "Cuda compute capability >= 2 is required!");
195 true, std::logic_error,
196 "DeviceProp not configured for compute capability " <<
201 template <
typename Kernel>
205 typedef void (*func_ptr_t)();
206 func_ptr_t func_ptr =
reinterpret_cast<func_ptr_t
>(kernel);
207 cudaFuncAttributes attrib;
208 cudaFuncGetAttributes(&attrib, func_ptr);
209 return attrib.numRegs;
216 template <
typename Kernel>
Kokkos::Cuda::size_type size_type
size_type max_threads_per_sm
size_type max_blocks_per_sm
size_type warp_granularity
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
size_type max_regs_per_sm
size_type max_shmem_per_block
size_type shared_memory_granularity
size_type compute_capability_major
size_type shared_memory_capacity
size_type max_threads_per_block
DeviceProp(int device_id=-1)
size_type max_warps_per_sm
size_type max_regs_per_block
size_type get_resident_warps_per_sm(Kernel kernel)
size_type get_kernel_registers(Kernel kernel)
size_type compute_capability_minor