From ade4587f3ad0a0d5cc30a6451ce6f6648b5c5b90 Mon Sep 17 00:00:00 2001 From: hk Date: Thu, 17 Nov 2016 21:26:36 +0100 Subject: [PATCH] Dodano .tex --- DergunPiotr-WaskoDominik/zad3/dok.tex | 108 +++++++++++++++++++++++ DergunPiotr-WaskoDominik/zad3/wykres.png | Bin 0 -> 11579 bytes 2 files changed, 108 insertions(+) create mode 100644 DergunPiotr-WaskoDominik/zad3/dok.tex create mode 100644 DergunPiotr-WaskoDominik/zad3/wykres.png diff --git a/DergunPiotr-WaskoDominik/zad3/dok.tex b/DergunPiotr-WaskoDominik/zad3/dok.tex new file mode 100644 index 0000000..f069506 --- /dev/null +++ b/DergunPiotr-WaskoDominik/zad3/dok.tex @@ -0,0 +1,108 @@ +\documentclass[a4paper,12pt]{article} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage[polish]{babel} +\usepackage{polski} +\usepackage[utf8]{inputenc} +\usepackage{indentfirst} +\usepackage{geometry} +\usepackage{array} +\usepackage[pdftex]{color,graphicx} +\usepackage{subfigure} +\usepackage{afterpage} +\usepackage{setspace} +\usepackage{color} +\usepackage{wrapfig} +\usepackage{listings} +\usepackage{datetime} + +\renewcommand{\onehalfspacing}{\setstretch{1.6}} + +\geometry{tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm} +\setlength{\parindent}{1cm} +\setlength{\parskip}{0mm} + +\newenvironment{lista}{ +\begin{itemize} + \setlength{\itemsep}{1pt} + \setlength{\parskip}{0pt} + \setlength{\parsep}{0pt} +}{\end{itemize}} + +\newcommand{\linia}{\rule{\linewidth}{0.4mm}} + +\definecolor{lbcolor}{rgb}{0.95,0.95,0.95} +\lstset{ + backgroundcolor=\color{lbcolor}, + tabsize=4, + language=C++, + captionpos=b, + tabsize=3, + frame=lines, + numbers=left, + numberstyle=\tiny, + numbersep=5pt, + breaklines=true, + showstringspaces=false, + basicstyle=\footnotesize, + identifierstyle=\color{magenta}, + keywordstyle=\color[rgb]{0,0,1}, + commentstyle=\color{Darkgreen}, + stringstyle=\color{red} + } + +\begin{document} + +\noindent +\begin{tabular}{|c|p{11cm}|c|} \hline +Grupa 1 & Piotr Dergun, Dominik Waśko & \ddmmyyyydate\today \tabularnewline +\hline +\end{tabular} + + +\section*{Zadanie 3 - Mnożenie macierzy GPU} + +Celem zadania jest obliczenie iloczynu dwóch macierzy prostokątnych o wymiarach n x n, wykorzystując karte graficzną oraz technologię CUDA . Posługując się zapisem matematycznym zadanie można zapisać jako równanie: A*B = C. +Kerlen odpowiadający za mnożenie macierzy wygląda następująco: +\begin{lstlisting} +__global__ void multiply(char *a,char *b,int *c, int N){ + int i =blockIdx.x * blockDim.x + threadIdx.x; + int sum = 0; + int temp,temp2; + while(i;ln|6s;CtRV!lA7Xm?x|{6TnZ7n||JB3YE#=tA ztcAT)8<0C4r@ZDMLGp^sqZ8@IWkn-J{zvZ<2%}>5tI7PQ@v3*n$0bvQ3r4tWIFbxp%w+`S~Yr>HWY@TSzdrm7~zJiTzyiILjl*_Y5@z7KR1@F%98!mOb+z_m>13UjopZiNpEv<^AuBDYZIhpEQ z6L0_>JzK87P>ZKmyDb_iGty3f|VDg zzpBHobkf%wH6iYjac?T3kk{{CR%K|WXj+ijliB7*TnZ;HLsOL$br4hYRc`&kOiS{7 zyo0@VHlMxcwWE)jBGqnqnjJJb)6ZSP@XqM&ljyKd_B>Z#`?G%fGL|_RKDmxkG5-eE zR#2K|fE#n9xmRM7dK=x(Ax-q10D?AKH^ih=^9HNwVzF`N9XcZn3L~mlDag}L$ARh( zy;_~#kv-VJBl7phsjFu|H6nWLd6g4TB-P1gV@z>Li68W0b!LxZ_`Ct5%K{@YZ6DDu zJs-qrPdx&wPn+Z~5vjrT8PNU?120MsLy{cp5gnk5chSzo&LuP6Q@!k%&%y*<+_%XZ zybE4oQS__PhUqy`n!tvW^vhAYq8(ZG>miV&;(KH4l7eRZ`Qpkc=426PPRlT>H%?T2 zKyeqw>DL8jjNnsL_%b%)2%@4f#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