{"id":407,"date":"2015-03-13T01:16:04","date_gmt":"2015-03-12T23:16:04","guid":{"rendered":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/?p=407"},"modified":"2018-03-03T15:49:36","modified_gmt":"2018-03-03T13:49:36","slug":"matrix-multiplication-using-threads","status":"publish","type":"post","link":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/matrix-multiplication-using-threads\/","title":{"rendered":"Matrix multiplication using threads"},"content":{"rendered":"<p>Save the following lines of code in a file called matrix_multiplication.c, then compile and run it:<\/p>\n<pre class=\"lang:sh nums:false\">$ gcc -o matrix_multiplication matrix_multiplication.c -lpthread\r\n$ .\/matrix_multiplication\r\n<\/pre>\n<p>I would recommend running in parallel the top command in another shell window to observe the system\/processors load.<\/p>\n<pre class=\"url:wp-content\/uploads\/code\/sod\/matrix_multiplication_using_threads.c\"><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Save the following lines of code in a file called matrix_multiplication.c, then compile and run it: $ gcc -o matrix_multiplication matrix_multiplication.c -lpthread $ .\/matrix_multiplication I would recommend running in parallel the top command in another shell window to observe the&hellip; <a href=\"https:\/\/www.cs.ubbcluj.ro\/~bufny\/matrix-multiplication-using-threads\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[130,62],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/posts\/407"}],"collection":[{"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/comments?post=407"}],"version-history":[{"count":13,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/posts\/407\/revisions"}],"predecessor-version":[{"id":1349,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/posts\/407\/revisions\/1349"}],"wp:attachment":[{"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/categories?post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cs.ubbcluj.ro\/~bufny\/wp-json\/wp\/v2\/tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}