Files
compute-runtime/core/unit_tests/utilities/clflush_tests.cpp
Zbigniew Zdanowicz 11c601b4ef Add CLFLUSH intrinsic call
Change-Id: Ibebd88b7347b53fbb6dd8563501ee7699ce7ff89
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-08-07 10:35:48 -07:00

19 lines
399 B
C++

/*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/utilities/clflush.h"
#include "gtest/gtest.h"
extern void const *lastClFlushedPtr;
TEST(ClFlushTest, whenClFlushIsCalledThenExpectToPassPtrToSystemCall) {
void const *ptr = reinterpret_cast<void const *>(0x1234);
NEO::CpuIntrinsics::clFlush(ptr);
EXPECT_EQ(ptr, lastClFlushedPtr);
}