/* StarPU --- Runtime system for heterogeneous multicore architectures. * * Copyright (C) 2016 Inria * Copyright (C) 2017 CNRS * Copyright (C) 2016 Uppsala University * * 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. */ /* * This creates two dumb vectors, splits them into chunks, and for each pair of * chunk, run axpy on them. */ #include #include "axpy_partition_gpu.h" #include //This code demonstrates how to transform a kernel to execute on a given set of GPU SMs. // Original kernel __global__ void saxpy(int n, float a, float *x, float *y) { int i = blockIdx.x*blockDim.x + threadIdx.x; if (i>>(__P_HKARGS,n,a,x,y); }