You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/install-guides/wperf.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,46 @@ WindowsPerf consists of a kernel-mode driver and a user-space command-line tool.
39
39
You cannot use WindowsPerf on virtual machines, such as cloud instances.
40
40
{{% /notice %}}
41
41
42
+
## Using winget (Recommended)
43
+
44
+
### Install
45
+
46
+
You can now install WindowsPerf directly from [winget](https://learn.microsoft.com/en-us/windows/package-manager/). Open an `Administrator` terminal on PowerShell and type
47
+
48
+
```console
49
+
winget install WindowsPerf
50
+
```
51
+
52
+
The output should look like:
53
+
54
+
```output
55
+
Found WindowsPerf [Arm.WindowsPerf] Version 4.3.1.0
56
+
This application is licensed to you by its owner.
57
+
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
It will install the lastest available WindowsPerf along with the [WPA plugins](/learning-paths/laptops-and-desktops/windowsperf_wpa_plugin/). To check that the installation was done correctly open a new terminal tab or window and follow the instructions under the [verify installation section](/install-guides/wperf/#verify-install)
68
+
69
+
### Uninstall
70
+
If you need to uninstall WindowsPerf, open an `Administrator` terminal on PowerShell and run:
71
+
```console
72
+
winget uninstall WindowsPerf
73
+
```
74
+
75
+
The output from a successfull uninstallation will look like:
76
+
```output
77
+
Found WindowsPerf [Arm.WindowsPerf]
78
+
Starting package uninstall...
79
+
Successfully uninstalled
80
+
```
81
+
42
82
## Visual Studio and the Windows Driver Kit (WDK)
43
83
44
84
WindowsPerf relies on `dll` files installed with Visual Studio, from the Community Edition or higher and, optionally, installers from the Windows Driver Kit extension.
@@ -86,7 +126,7 @@ Make sure you are in the `windowsperf-bin-<version>` directory:
86
126
cd windowsperf-bin-4.0.0
87
127
```
88
128
89
-
### Install with wperf-devgen {#devgen_install}
129
+
### Install with wperf-devgen
90
130
91
131
Navigate to the `wperf-driver` folder and run the installer:
92
132
@@ -103,7 +143,7 @@ Install requested.
103
143
Device installed successfully
104
144
```
105
145
106
-
## Verify install
146
+
## Verify install
107
147
108
148
You can check everything is working by running the `wperf` executable.
5.[Advanced usage for embedded development](#advanced-usage-for-embedded-development)
24
22
25
23
## Install dependencies
26
24
@@ -279,7 +277,7 @@ In the example above, the summary indicates that for this Learning Path all test
279
277
## Advanced usage for embedded development
280
278
### Using the Corstone-300 FVP
281
279
282
-
By default, the framework runs instructions on the Docker images specified by the [metadata](#edit-metadata). For embedded development, it is possible to build software in a container instance and then check its behaviour on the Corstone-300 FVP.
280
+
By default, the framework runs instructions on the Docker images specified by the [metadata](#edit-metadata). For embedded development, it is possible to build software in a container instance and then check its behavior on the Corstone-300 FVP.
283
281
284
282
For this, all container instances used by the test framework mount a volume in `/shared`. This is where software for the target FVP can be stored. To check the execution, the FVP commands just need to be identified as a `fvp` section for the framework.
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/matrix/3-code-1.md
+52-29Lines changed: 52 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,13 @@ In the Matrix processing library, you implement two types of checks:
23
23
24
24
The idea here is to make the program fail in a noticeable way. Of course, in a real world application, the error should be caught and dealt with by the application, if it can. Error handling, and especially recovering from errors, can be a complex topic.
25
25
26
-
At the top of file `include/Matrix/Matrix.h`, include `<cassert>` to get the C-style assertions declarations for checks in `Debug` mode only:
26
+
At the top of file `include/Matrix/Matrix.h`, include `<cassert>` to get the C-style assertions declarations for checks in `Debug` mode only, as well as `<cstddef>` which provides standard C declaration like `size_t`:
27
27
28
28
```CPP
29
29
#pragma once
30
30
31
31
#include<cassert>
32
+
#include<cstddef>
32
33
33
34
namespaceMatComp {
34
35
```
@@ -44,7 +45,7 @@ const Version &getVersion();
44
45
/// and the EXIT_FAILURE error code. It will also print the file name (\p
45
46
/// fileName) and line number (\p lineNumber) that caused that application to
@@ -109,10 +110,11 @@ The Matrix data structure has the following private data members:
109
110
Modern C++ offers constructs in the language to deal safely with memory; you will use `std::unique_ptr` which guaranties that the Matrix class will be safe from a whole range of memory management errors.
110
111
111
112
Add the following includes at the top of `include/Matrix/Matrix.h`, right under
This constructs a valid `Matrix` if it contains elements), and the `uninitializedConstruct` test checks that two valid matrices of different types and dimensions can be constructed.
347
+
You should also update the `booleanConversion` test in this file to check for boolean conversion for valid matrices so it now looks like:
348
+
349
+
```CPP
350
+
TEST(Matrix, booleanConversion) {
351
+
EXPECT_FALSE(Matrix<int8_t>());
352
+
EXPECT_FALSE(Matrix<double>());
353
+
354
+
EXPECT_TRUE(Matrix<int8_t>(1, 1));
355
+
EXPECT_TRUE(Matrix<double>(1, 1));
356
+
}
357
+
```
351
358
352
359
Compile and test again, all should pass:
353
360
@@ -374,6 +381,35 @@ ninja check
374
381
[ PASSED ] 4 tests.
375
382
```
376
383
384
+
Another constructor that is missing is one that will create and initialize matrices to a known value. Let's add it to `Matrix` in `include/Matrix/Matrix.h`:
385
+
386
+
```CPP
387
+
/// Construct a \p numRows x \p numCols Matrix with all elements
388
+
/// initialized to value \p val.
389
+
Matrix(size_t numRows, size_t numCols, Ty val) : Matrix(numRows, numCols) {
390
+
allocate(getNumElements());
391
+
for (size_t i = 0; i < getNumElements(); i++)
392
+
data[i] = val;
393
+
}
394
+
```
395
+
396
+
Add boolean conversion tests for this new constructor by modifying `booleanConversion` in `tests/Matrix.cpp` so it looks like:
397
+
398
+
```CPP
399
+
TEST(Matrix, booleanConversion) {
400
+
EXPECT_FALSE(Matrix<int8_t>());
401
+
EXPECT_FALSE(Matrix<double>());
402
+
403
+
EXPECT_TRUE(Matrix<int8_t>(1, 1));
404
+
EXPECT_TRUE(Matrix<double>(1, 1));
405
+
406
+
EXPECT_TRUE(Matrix<int8_t>(1, 1, 1));
407
+
EXPECT_TRUE(Matrix<double>(1, 1, 2.0));
408
+
}
409
+
```
410
+
411
+
You should be getting the pattern now: each new feature or method comes with tests.
412
+
377
413
The `Matrix` class is missing two important methods:
378
414
- A *getter*, to read the matrix element at (row, col).
379
415
- A *setter*, to modify the matrix element at (row, col).
@@ -397,20 +433,6 @@ Add them now in the public section of `Matrix` in `include/Matrix/Matrix.h`:
397
433
}
398
434
```
399
435
400
-
Another constructor that is missing is one that will create and initialize matrices to a known value. Let's add it to `Matrix` in `include/Matrix/Matrix.h`:
401
-
402
-
```CPP
403
-
/// Construct a \p numRows x \p numColumns Matrix with all elements
404
-
/// initialized to value \p val.
405
-
Matrix(size_t numRows, size_t numCols, Ty val) : Matrix(numRows, numCols) {
406
-
allocate(getNumElements());
407
-
for (size_t i = 0; i < getNumElements(); i++)
408
-
data[i] = val;
409
-
}
410
-
```
411
-
412
-
You should be getting the pattern now.
413
-
414
436
Add tests for those 3 methods in `tests/Matrix.cpp`:
415
437
416
438
```CPP
@@ -503,7 +525,7 @@ The C++ `std::initializer_list` enables users to provide a list of literal
503
525
values (in row major order) to use to initialize the matrix with:
504
526
505
527
```CPP
506
-
/// Construct a \p numRows x \p numColumns Matrix with elements
528
+
/// Construct a \p numRows x \p numCols Matrix with elements
507
529
/// initialized from the values from \p il in row-major order.
508
530
Matrix(size_t numRows, size_t numCols, std::initializer_list<Ty> il)
509
531
: Matrix(numRows, numCols) {
@@ -862,7 +884,7 @@ ninja check
862
884
[----------] 16 tests from Matrix (0 ms total)
863
885
864
886
[----------] Global test environment tear-down
865
-
[==========] 16 tests from 3 test suites ran. (0 ms total)
887
+
[==========] 16 tests from 1 test suite ran. (0 ms total)
866
888
[ PASSED ] 16 tests.
867
889
```
868
890
@@ -941,6 +963,7 @@ Add these to the public section of `Matrix` in `include/Matrix/Matrix.h`:
941
963
return false;
942
964
return true;
943
965
}
966
+
944
967
/// Returns true iff matrices do not compare equal.
0 commit comments