@@ -1,5 +1,6 @@
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
+ * Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
* Copyright (C) 2019 Mael Keryell
* StarPU is free software; you can redistribute it and/or modify
@@ -1,3 +1,18 @@
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+# 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.
import Libdl
using StarPU
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * 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 <stdio.h>
#include <starpu.h>
#include <math.h>
struct params
{
double centerr;
using LinearAlgebra
function mandelbrot(pixels, centerr ::Float64, centeri ::Float64, offset ::Int64, dim ::Int64) :: Nothing
@@ -1,6 +1,7 @@
- * Copyright (C) 2018 Alexis Juven
+ * Copyright (C) 2018 Alexis Juven
* it under the terms of the GNU Lesser General Public License as published by
include("../../src/Compiler/include.jl")
starpu_new_cpu_kernel_file("../build/generated_cpu_mandelbrot.c")
@@ -107,4 +108,4 @@ extern "C" void gpu_mandelbrot(void *descr[], void *args)
gpuMandelbrotKernel <<< nblocks, THREADS_PER_BLOCK, 0, starpu_cuda_get_local_stream() >>> (nxP, nyP, ldP, d_subP, *params);
cudaStreamSynchronize(starpu_cuda_get_local_stream());
-}
+}
function mandelbrotjl(pixels ::Matrix{Int64}, centerr ::Float64, centeri ::Float64)
height,width = size(pixels)
zoom = width * 0.25296875
include("mandelbrot.jl")
if length(ARGS) != 7
using Base.LinAlg
include("mult_naive.jl")
if length(ARGS) != 6
println("Usage : julia prog.jl start_dim step_dim stop_dim nb_tests nslicesx nslicesy")
function multjl(A ::Matrix{Float32}, B ::Matrix{Float32}, C ::Matrix{Float32})
heightC, widthC = size(C)
widthA = size(A)[2]
starpu_new_cpu_kernel_file("../build/generated_cpu_nbody.c")
@@ -157,4 +158,4 @@ extern "C" void gpu_nbody2(void * descr[], void *args)
>>> (d_subP, d_subV, d_subA, nxP, nxV, nxA, ldP, ldV, ldA, *params);
include("nbody_display.jl")
function mod2(v ::Vector{Float64})
return sqrt(v[1]^2 + v[2]^2)
#include("./nbody_display.jl")
include("nbody.jl")
function nbody_with_starpu(positions ::Matrix{Float64}, velocities ::Matrix{Float64}, accelerations ::Matrix{Float64}, masses ::Vector{Float64}, parameters ::Vector{Float64}, nbr_simulations ::Int64, nslices ::Int64, nbr_planets ::Int64)
function get_planet_pixels(X ::Int64, Y ::Int64)
pix ::Array{Tuple{Int64,Int64}} = []
for i = X-1:X+1
println("Usage: julia nbody_generated.jl start_nbr step_nbr stop_nbr nbr_simulations nbr_slices nbr_tests")
quit()
function variable(val ::Ref{Float32}) :: Nothing
val[] = val[] + 1
#include <stdint.h>
export JULIA_LOAD_PATH=$JULIA_LOAD_PATH:$PWD
if [ `uname` == "Darwin" ]; then
"""
__precompile__()
Returns the list of instruction that will be added before for loop of shape
"for for_index_var in set ..."
function is_indep_for_expr(x :: StarpuExpr)
global starpu_type_traduction_dict = Dict(
Int32 => "int32_t",
UInt32 => "uint32_t",
export starpu_new_cpu_kernel_file
export starpu_new_cuda_kernel_file
export @codelet
#======================================================
import Base.print
function print_newline(io :: IO, indent = 0, n_lines = 1)
export Link
mutable struct Link{T}