2015-12-19 21:35:35 -05:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015, PHILIPPE TILLET. All rights reserved.
|
|
|
|
*
|
|
|
|
* This file is part of ISAAC.
|
|
|
|
*
|
|
|
|
* ISAAC is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301 USA
|
|
|
|
*/
|
2015-12-21 17:04:09 -05:00
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
#ifndef ISAAC_DRIVER_COMMON_H
|
|
|
|
#define ISAAC_DRIVER_COMMON_H
|
2015-07-25 21:00:18 -07:00
|
|
|
#include <exception>
|
|
|
|
|
2015-08-25 12:41:21 -04:00
|
|
|
#include "isaac/driver/dispatch.h"
|
2015-07-21 22:02:36 -07:00
|
|
|
#include "isaac/defines.h"
|
2015-04-29 15:50:57 -04:00
|
|
|
|
2015-08-05 10:10:43 -07:00
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
namespace isaac
|
|
|
|
{
|
|
|
|
namespace driver
|
|
|
|
{
|
|
|
|
|
2015-08-21 13:06:20 -04:00
|
|
|
enum backend_type
|
2015-04-29 15:50:57 -04:00
|
|
|
{
|
2015-08-25 12:41:21 -04:00
|
|
|
OPENCL,
|
|
|
|
CUDA
|
2015-04-29 15:50:57 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
void check(nvrtcResult err);
|
|
|
|
|
|
|
|
void check(CUresult);
|
2015-11-27 02:09:15 -05:00
|
|
|
void check_destruction(CUresult);
|
2015-06-28 17:53:16 -07:00
|
|
|
|
2016-04-02 18:19:33 -04:00
|
|
|
void check(cl_int err);
|
2015-06-28 17:53:16 -07:00
|
|
|
|
|
|
|
}
|
2015-04-29 15:50:57 -04:00
|
|
|
}
|
2015-08-05 10:10:43 -07:00
|
|
|
|
2015-04-29 15:50:57 -04:00
|
|
|
#endif
|