-
Notifications
You must be signed in to change notification settings - Fork 548
Expand file tree
/
Copy pathcusolverDn.hpp
More file actions
35 lines (28 loc) · 1.4 KB
/
cusolverDn.hpp
File metadata and controls
35 lines (28 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#pragma once
#include <common/unique_handle.hpp>
#include <cusolverDn.h>
DEFINE_HANDLER(cusolverDnHandle_t, cusolverDnCreate, cusolverDnDestroy);
namespace arrayfire {
namespace cuda {
const char* errorString(cusolverStatus_t err);
#define CUSOLVER_CHECK(fn) \
do { \
cusolverStatus_t _error = fn; \
if (_error != CUSOLVER_STATUS_SUCCESS) { \
char _err_msg[1024]; \
snprintf(_err_msg, sizeof(_err_msg), "CUSOLVER Error (%d): %s\n", \
(int)(_error), arrayfire::cuda::errorString(_error)); \
\
AF_ERROR(_err_msg, AF_ERR_INTERNAL); \
} \
} while (0)
} // namespace cuda
} // namespace arrayfire