Project
Loading...
Searching...
No Matches
test_CompilerBuiltins.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include <catch_amalgamated.hpp>
14
15struct Foo {
16 int foo;
18};
19
21 int someMethod() { return 0; };
22};
23
24TEST_CASE("TestPrefetch")
25{
26 int a[10];
27 int b[10];
28
29 [[maybe_unused]] Foo foo;
30 [[maybe_unused]] Bar bar;
31
32 for (int i = 0; i < 10; i++) {
33 a[i] = a[i] + b[i];
34 O2_BUILTIN_PREFETCH(&a[i + 1], 1, 1);
35 O2_BUILTIN_PREFETCH(&b[i + 1], 0, 1);
36 /* … */
37 }
38}
#define O2_VISIBILITY_HIDDEN
#define O2_BUILTIN_PREFETCH(x,...)
int32_t i
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
int O2_VISIBILITY_HIDDEN someHiddenMethod()
TEST_CASE("TestPrefetch")
HistogramRegistry foo()