ViennaCL - The Vienna Computing Library
1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
backend.cpp
Go to the documentation of this file.
1
/* =========================================================================
2
Copyright (c) 2010-2014, Institute for Microelectronics,
3
Institute for Analysis and Scientific Computing,
4
TU Wien.
5
Portions of this software are copyright by UChicago Argonne, LLC.
6
7
-----------------
8
ViennaCL - The Vienna Computing Library
9
-----------------
10
11
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
12
13
(A list of authors and contributors can be found in the PDF manual)
14
15
License: MIT (X11), see file LICENSE in the base directory
16
============================================================================= */
17
18
// include necessary system headers
19
#include <iostream>
20
21
#include "
viennacl.hpp
"
22
#include "
viennacl_private.hpp
"
23
24
25
VIENNACL_EXPORTED_FUNCTION
ViennaCLStatus
ViennaCLBackendCreate
(
ViennaCLBackend
*
backend
)
26
{
27
*backend =
new
ViennaCLBackend_impl
();
28
29
return
ViennaCLSuccess
;
30
}
31
32
VIENNACL_EXPORTED_FUNCTION
ViennaCLStatus
ViennaCLBackendSetOpenCLContextID
(
ViennaCLBackend
backend
,
ViennaCLInt
context_id)
33
{
34
backend->
opencl_backend
.
context_id
= context_id;
35
36
return
ViennaCLSuccess
;
37
}
38
39
VIENNACL_EXPORTED_FUNCTION
ViennaCLStatus
ViennaCLBackendDestroy
(
ViennaCLBackend
*
backend
)
40
{
41
delete
*
backend
;
42
*backend = NULL;
43
44
return
ViennaCLSuccess
;
45
}
46
ViennaCLBackend_impl
Generic backend for CUDA, OpenCL, host-based stuff.
Definition:
viennacl_private.hpp:54
ViennaCLStatus
ViennaCLStatus
Definition:
viennacl.hpp:97
VIENNACL_EXPORTED_FUNCTION
#define VIENNACL_EXPORTED_FUNCTION
Definition:
viennacl.hpp:40
ViennaCLOpenCLBackend_impl::context_id
ViennaCLInt context_id
Definition:
viennacl_private.hpp:44
viennacl_private.hpp
ViennaCLMatrix_impl::backend
ViennaCLBackend backend
Definition:
viennacl_private.hpp:115
ViennaCLBackend_impl::opencl_backend
ViennaCLOpenCLBackend_impl opencl_backend
Definition:
viennacl_private.hpp:59
ViennaCLInt
int ViennaCLInt
Definition:
viennacl.hpp:48
ViennaCLBackendCreate
VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendCreate(ViennaCLBackend *backend)
Definition:
backend.cpp:25
ViennaCLBackendSetOpenCLContextID
VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendSetOpenCLContextID(ViennaCLBackend backend, ViennaCLInt context_id)
Definition:
backend.cpp:32
ViennaCLBackendDestroy
VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendDestroy(ViennaCLBackend *backend)
Definition:
backend.cpp:39
viennacl.hpp
ViennaCLSuccess
Definition:
viennacl.hpp:99
libviennacl
src
backend.cpp
Generated on Fri Jul 31 2015 14:18:56 for ViennaCL - The Vienna Computing Library by
1.8.9.1