/* StarPU --- Runtime system for heterogeneous multicore architectures. * * Copyright (C) 2013 Centre National de la Recherche Scientifique * * StarPU is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. * * StarPU is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License in COPYING.LGPL for more details. */ #include #include "../helper.h" #include #include #if !defined(STARPU_HAVE_SETENV) #warning setenv is not defined. Skipping test int main(int argc, char **argv) { return STARPU_TEST_SKIPPED; } #else int test_prefetch(unsigned memnodes) { int ret; float *buffers[4]; starpu_data_handle_t handles[4]; unsigned i; ssize_t available_size; buffers[0] = malloc(1*1024*512); STARPU_ASSERT(buffers[0]); starpu_variable_data_register(&handles[0], 0, (uintptr_t)buffers[0], 1*1024*512); for(i=1 ; i