// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. //************************************************************************ /** * FastOS_Prefetch test program. * * @author Olaf Birkeland * @version $Id$ */ /* * Creation date : 2000-12-11 * Copyright (c) : 1997-2001 Fast Search & Transfer ASA * ALL RIGHTS RESERVED *************************************************************************/ #include #include #include "tests.h" class PrefetchTestApp : public BaseTest { private: public: virtual ~PrefetchTestApp() {}; bool PrefetchTest () { bool rc = false; int j, size, *a; register int or1, or2; FastOS_Time start, stop; double timeVal; TestHeader("Prefetch Test"); // 32MB size = 32; size *= 1024*1024/sizeof(*a); if ((a = static_cast(calloc(size, sizeof(*a)))) != NULL) { // Standard loop start.SetNow(); or1 = 1; for(j=0; j