• Main Page
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

/data/development/ViennaCL/dev/viennacl/ocl/utils.hpp

Go to the documentation of this file.
00001 #ifndef VIENNACL_OCL_UTILS_HPP_
00002 #define VIENNACL_OCL_UTILS_HPP_
00003 
00004 /* =========================================================================
00005    Copyright (c) 2010-2011, Institute for Microelectronics,
00006                             Institute for Analysis and Scientific Computing,
00007                             TU Wien.
00008 
00009                             -----------------
00010                   ViennaCL - The Vienna Computing Library
00011                             -----------------
00012 
00013    Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
00014                
00015    (A list of authors and contributors can be found in the PDF manual)
00016 
00017    License:         MIT (X11), see file LICENSE in the base directory
00018 ============================================================================= */
00019 
00024 #include <vector>
00025 #include "viennacl/ocl/backend.hpp"
00026 #include "viennacl/ocl/device.hpp"
00027 
00028 namespace viennacl
00029 {
00030   namespace ocl
00031   {
00032     
00035     template <typename ScalarType>
00036     struct DOUBLE_PRECISION_CHECKER
00037     {
00038       static void apply() {} 
00039     };
00040     
00041     template <>
00042     struct DOUBLE_PRECISION_CHECKER<double>
00043     {
00044       static void apply()
00045       {
00046         if (!viennacl::ocl::current_device().double_support())
00047           throw viennacl::ocl::double_precision_not_provided_error();
00048       }
00049     };
00050     
00051     
00052 
00053   } //ocl
00054 } //viennacl
00055 #endif

Generated on Fri Dec 30 2011 23:20:43 for ViennaCL - The Vienna Computing Library by  doxygen 1.7.1