FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
arrayfire/test/nodevice.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
/
test
/
nodevice.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (53 loc) · 1.69 KB
Breadcrumbs
arrayfire
/
test
/
nodevice.cpp
Copy path
File metadata and controls
68 lines (53 loc) · 1.69 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
******************************************************
* 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 functions that provide information about the system and shouldn't
//
throw exceptions during runtime.
#
include
<
arrayfire.h
>
#
include
<
gtest/gtest.h
>
#
include
<
testHelpers.hpp
>
TEST
(NoDevice, Info) {
ASSERT_SUCCESS
(
af_info
()); }
TEST
(NoDevice, InfoCxx) {
af::info
(); }
TEST
(NoDevice, InfoString) {
char
* str;
ASSERT_SUCCESS
(
af_info_string
(&str,
true
));
ASSERT_SUCCESS
(
af_free_host
((
void
*)str));
}
TEST
(NoDevice, GetDeviceCount) {
int
device =
0
;
ASSERT_SUCCESS
(
af_get_device_count
(&device));
}
TEST
(NoDevice, GetDeviceCountCxx) {
af::getDeviceCount
(); }
TEST
(NoDevice, GetSizeOf) {
size_t
size;
ASSERT_SUCCESS
(
af_get_size_of
(&size,
f32
));
ASSERT_EQ
(
4
, size);
}
TEST
(NoDevice, GetSizeOfCxx) {
size_t
size =
af::getSizeOf
(
f32
);
ASSERT_EQ
(
4
, size);
}
TEST
(NoDevice, GetBackendCount) {
unsigned
int
nbackends;
ASSERT_SUCCESS
(
af_get_backend_count
(&nbackends));
}
TEST
(NoDevice, GetBackendCountCxx) {
unsigned
int
nbackends =
af::getBackendCount
();
UNUSED
(nbackends);
}
TEST
(NoDevice, GetVersion) {
int
major =
0
, minor =
0
, patch =
0
;
ASSERT_SUCCESS
(
af_get_version
(&major, &minor, &patch));
ASSERT_EQ
(
AF_VERSION_MAJOR
, major);
ASSERT_EQ
(
AF_VERSION_MINOR
, minor);
ASSERT_EQ
(
AF_VERSION_PATCH
, patch);
}
TEST
(NoDevice, GetRevision) {
const
char
* revision =
af_get_revision
();
UNUSED
(revision);
}
Back
|
FazBrowse Home
|
New Git URL