iccsa-17-gpulab

git clone https://git.igankevich.com/iccsa-17-gpulab.git
Log | Files | Refs

commit 5c092b91e0caffbb28b55e02a771f1adff1467a6
parent 2bded42c28d6fa6dcad2bac4550522ddae98c51f
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Sat,  1 Jul 2017 16:05:03 +0300

Update images for presenation.

Diffstat:
Makefile | 3++-
R/common.R | 4+++-
R/plot-cpu-gpu.R | 45+++++++++++++++++++++++++++++++++------------
3 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,7 @@ all: build all: build/classes.pdf - ./R/plot-cpu-gpu.R + ./R/plot-cpu-gpu.R png + ./R/plot-cpu-gpu.R pdf build/classes.svg: dia/classes.dia dia -t svg -e $@ $< diff --git a/R/common.R b/R/common.R @@ -126,7 +126,9 @@ arma.aggregate_dev <- function (data2) { arma.plot_aggregate_dev <- function (all_opencl, ...) { args <- list(...) - bar_colours <- gray.colors(ncol(all_opencl)) + #bar_colours <- gray.colors(ncol(all_opencl)) + palette <- colorRampPalette(c("#9F2D20", "#A8ADB4")) + bar_colours <- palette(ncol(all_opencl)) barplot( t(as.matrix(all_opencl)), ylim=args$ylim, diff --git a/R/plot-cpu-gpu.R b/R/plot-cpu-gpu.R @@ -2,23 +2,44 @@ source(file.path("R", "common.R")) -pdf( - file=file.path("build", "bench-cpu-gpu.pdf"), - width=3, - height=2.5, - pointsize=8 -) +args <- commandArgs(trailingOnly=TRUE) +fmt <- args[1] + +if (fmt == 'pdf') { + pdf( + file=file.path("build", "bench-cpu-gpu.pdf"), + width=3, + height=2.5, + pointsize=8 + ) +} else { + png( + file=file.path("build", "bench-cpu-gpu.png"), + width=800, + height=600, + pointsize=20 + ) +} par(family="Times") data <- arma.plot_cpu_gpu() dev.off() -pdf( - file=file.path("build", "breakdown-cpu-gpu.pdf"), - width=4.5, - height=4, - pointsize=8 -) +if (fmt == 'pdf') { + pdf( + file=file.path("build", "breakdown-cpu-gpu.pdf"), + width=4.5, + height=4, + pointsize=8 + ) +} else { + png( + file=file.path("build", "breakdown-cpu-gpu.png"), + width=1100, + height=600, + pointsize=20 + ) +} par(family="Times") data <- arma.plot_performance_breakdown()