FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
arrayfire/src/api/cpp/exampleFunction.cpp at master · arrayfire/arrayfire · GitHub
arrayfire
arrayfire
Repository navigation
Code
Issues
292
(292)
Pull requests
39
(39)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
arrayfire
/
src
/
api
/
cpp
/
exampleFunction.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (23 loc) · 1008 Bytes
Breadcrumbs
arrayfire
/
src
/
api
/
cpp
/
exampleFunction.cpp
Copy path
File metadata and controls
31 lines (23 loc) · 1008 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
******************************************************
* 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
*******************************************************
*/
#
include
<
af/array.h
>
//
af::array class is declared here
#
include
<
af/util.h
>
//
Include the header related to the function
#
include
"
error.hpp
"
//
AF_THROW macro to use error code C-API
//
is going to return and throw corresponding
//
exceptions if call isn't a success
namespace
af
{
array
exampleFunction
(
const
array& a,
const
af_someenum_t
p) {
//
create a temporary af_array handle
af_array temp =
0
;
//
call C-API function
AF_THROW
(
af_example_function
(&temp, a.
get
(), p));
//
array::get() returns af_array handle for the corresponding cpp af::array
return
array
(temp);
}
}
//
namespace af
Back
|
FazBrowse Home
|
New Git URL