42 #ifndef STOKHOS_CUDA_DEVICE_PROP_HPP
43 #define STOKHOS_CUDA_DEVICE_PROP_HPP
45 #include "Kokkos_Core.hpp"
49 #include "cuda_runtime_api.h"
98 cudaGetDevice(&device_id);
102 cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor,
104 cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor,
112 "Cuda compute capability >= 2 is required!");
227 true, std::logic_error,
228 "DeviceProp not configured for compute capability " <<
233 template <
typename Kernel>
237 typedef void (*func_ptr_t)();
238 func_ptr_t func_ptr =
reinterpret_cast<func_ptr_t
>(kernel);
239 cudaFuncAttributes attrib;
240 cudaFuncGetAttributes(&attrib, func_ptr);
241 return attrib.numRegs;
248 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