Rust project.

Lezárva Kiadva: 3 évvel ezelőtt Kiszállításkor fizetve
Lezárva Kiszállításkor fizetve

In this project, you need to do the following steps:

a. Use any computer or laptop with multicores configuration. Find out what is the maximum

number of cores in your computer.

b. Implement matrix multiplication algorithm in Rust. To simplify, let ?? = ??, and both are

a square matrix with the size of ?? × ??. The matrix elements are floating-point random

numbers.

2 of 3

c. While recording the serial processing time, varies the matrix size ?? until it recorded

significant processing time, i.e., more than 1 minute. Note that the maximum ?? depends

on the data type and the size of your computer's memory.

d. Implement the matrix multiplication program in parallel using threads or selected crates

(crossbeam, Rayon, etc). Discuss and justify the selection of Rust instructions, functions,

traits, crates, etc. In your rustc environment variables, you might want to consider the

following flags:

• target-cpu (you can run rustc --print target-cpus by checking the

answer to the point (a) above, in which you need to know your CPU).

• opt-level=3 (inlining function to speed up calculation)

• codegen-units=1 (improved performance but slower compilation)

e. Verify that the matrix multiplication results are the same, although you are using a

different number of threads: 1, 2, 3, or 4, etc.

f. Record the parallel time taken if you are using a different number of threads: 1, 2, 3, or

4, etc. Estimate the percentage of serial portion and predict the maximum speed up

achievable using Amdahl's law

Rust

Projektazonosító: #29826559

A projektről

Távolról teljesíthető projekt Utoljára aktív: 2 évvel ezelőtt