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 ViennaCLBackendCreate(ViennaCLBackend * backend)25VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendCreate(ViennaCLBackend * backend) 26 { 27 *backend = new ViennaCLBackend_impl(); 28 29 return ViennaCLSuccess; 30 } 31 ViennaCLBackendSetOpenCLContextID(ViennaCLBackend backend,ViennaCLInt context_id)32VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendSetOpenCLContextID(ViennaCLBackend backend, ViennaCLInt context_id) 33 { 34 backend->opencl_backend.context_id = context_id; 35 36 return ViennaCLSuccess; 37 } 38 ViennaCLBackendDestroy(ViennaCLBackend * backend)39VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLBackendDestroy(ViennaCLBackend * backend) 40 { 41 delete *backend; 42 *backend = NULL; 43 44 return ViennaCLSuccess; 45 } 46 47