Sierra Toolkit Version of the Day
CudaDeviceMgr.hpp
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef stk_algsup_CudaDeviceMgr_hpp
00010 #define stk_algsup_CudaDeviceMgr_hpp
00011 
00012 #ifdef STK_HAVE_CUDA
00013 
00014 #include <stk_algsup/CudaCall.hpp>
00015 
00016 namespace stk {
00017 
00018 class CudaDeviceMgr {
00019   public:
00020     CudaDeviceMgr(int device=0);
00021 
00022     virtual ~CudaDeviceMgr() {}
00023 
00024     int get_device() const { return m_device; }
00025 
00026     static CudaDeviceMgr& get_singleton();
00027 
00028  private:
00029   int m_device;
00030 };//class CudaMemoryMgr
00031 
00032 }//namespace stk
00033 
00034 #endif
00035 
00036 #endif
00037 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines