FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
xtensor/benchmark/main.cpp at master · xtensor-stack/xtensor · GitHub
xtensor-stack
xtensor
Repository navigation
Code
Issues
381
(381)
Pull requests
44
(44)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
xtensor
/
benchmark
/
main.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (44 loc) · 1.37 KB
Breadcrumbs
xtensor
/
benchmark
/
main.cpp
Copy path
File metadata and controls
50 lines (44 loc) · 1.37 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
/*
**************************************************************************
* Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
***************************************************************************
*/
#
include
<
iostream
>
#
include
<
benchmark/benchmark.h
>
#
include
"
xtensor/containers/xarray.hpp
"
#
include
"
xtensor/containers/xtensor.hpp
"
#
ifdef
XTENSOR_USE_XSIMD
#
ifdef
__GNUC__
template
<
class
T
>
void
print_type
(T&&
/*
t
*/
)
{
std::cout << __PRETTY_FUNCTION__ << std::endl;
}
#
endif
void
print_stats
()
{
std::cout <<
"
USING XSIMD
\n
SIMD SIZE:
"
<< xsimd::simd_traits<
double
>::size <<
"
\n\n
"
;
#
ifdef
__GNUC__
print_type
(xt::xarray<
double
>());
print_type
(xt::xtensor<
double
,
2
>());
#
endif
}
#
else
void
print_stats
()
{
std::cout <<
"
NOT USING XSIMD
\n\n
"
;
};
#
endif
//
Custom main function to print SIMD config
int
main
(
int
argc,
char
** argv)
{
print_stats
();
benchmark::Initialize
(&argc, argv);
if
(
benchmark::ReportUnrecognizedArguments
(argc, argv))
{
return
1
;
}
benchmark::RunSpecifiedBenchmarks
();
}
Back
|
FazBrowse Home
|
New Git URL