The following is LDLT decomposition of 20x20 Hilbert Matrix A.
It seems Firefox render this page correctly.
The following is LDLT decomposition of 20x20 Hilbert Matrix A.
It seems Firefox render this page correctly.
There are many pitfalls in move constructors. Please read the textbook before utilizing it.
BTW, this is just demonstration purpose for the pointer member to contain only one int value. In this particular case, replacing int *p with int v improves the performance much more,
On Ubuntu computer, apt install ssh to install/enable sshd
check ip address of your Ubuntu computer using ifconfig
in my case, it is 192.168.11.103
http://www.teraterm.org/
install Teraeterm Menu, and right click Teraterm Menu icon on system tray and add your Ubuntu computer ip address, username, password and enable ssh. left click Teraterm menu icon and choose your Ubuntu connection profile and connect to Ubuntu.
run cmd and type ipconfig. my Windows computer IP is 192.168.11.199
Install Cygwin/X onto Windows computer https://x.cygwin.com/
Additionally install xterm and xhost from Cygwin setup
Open C:\cygwin64\bin\startxwin with text editor and modify
serverargs="" with
serverargs="+iglx -wgl -listen tcp"
On windows start menu, choose Cygwin-X → Xwin server to run Cygwin X server.
With Cygwin/X icon on system tray, choose System tools → XTerm to run xterm
On XTerm window, run
xhost +
left click Teraterm menu and connect to Ubuntu.
Type on Ubuntu console
export DISPLAY="192.168.11.199:0"
gnome-session
to run gnome desktop session onto your Cygwin/X X server. Ubuntu desktop is shown on your Windows computer. Remote Ubuntu computer can be used as a local native Ubuntu computer from Windows
Follow these steps.
Download Windows 11 Languages and Optional Features, version 22H2 iso file from your Visual Studio Subscription page.
Mount downloaded iso using Windows Explorer, double-click download iso to mount it.
In my case, iso image is mounted as H:\
Run cmd as administrator and type those commands to install language packs. "ja-JP" means Japanese. Change it to your language code. H:\ should be replaced your mounted iso image drive letter.
The dism command argument /online does not mean internet connection, it means language pack will be installed onto currently running OS.
Without /LimitAccess option, dism try to connect internet.
It seems /add-package option is deprecated and replaced to /add-capability
It is possible to broadcast 8bit, 16bit, 32bit, 64bit, 128bit and 256bit data onto 512bit register using AVX512 vpbroadcast/vbroadcast instructions.
On large data broadcasts, there is a choice to broadcast data with the same pattern, if it is to simply broadcast data,
because the former is more standard AVX512F instruction.
References
Prerequisites
Setup procedure
On Surface8, press Volume+ button on the left and press power button to boot UEFI bios. On security menu, enable secure boot from "Microsoft and 3rd party". On boot menu, delete existing Microsoft boot loader and enable USB boot with top priority.
On another Windows computer, download Ubuntu 20.04 Desktop x64 iso and create bootable USB using Rufus. Connect it to Surface and boot, Choose try Ubuntu (instead of Install Ubuntu), on Ubuntu start menu, run Terminal. On Terminal, sudo and fdisk /dev/nvme0n1 and delete all 4 partitions with d and write partition table with wq and shutdown the computer.
On another Windows computer, download Windows 10 2004 x64 iso image from MSDN subscriber downloads and create bootable USB using Rufus. Insert it and boot Surface, on network connection selection menu, press "I don't have network connection" on the left bottom of the screen. Installation finishes without entering any product keys, and Windows 10 home is installed.
Boot windows 10, disable all network connections on device manager. Insert Windows 11 pro USB thumbdrive and run setup.exe. Windows 11 Pro is installed without network connection, without Microsoft account.
Boot Windows 11, Enable the network connection on device manager. On Settings menu →System→Activation, press Change product key and enter your Windows 11 Pro retail license product key. Activation succeeded.
Titan V GPU clock is capped at 1335MHz when it is used as CUDA compute device.
Fig.1 GPU Clock is capped at 1335MHz
In order to lift this performance cap and draw full CUDA performance from Titan V, it is necessary to run the following nvidia-smi command with administrators privilege:
"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --cuda-clocks=OVERRIDE
Pre-emphasis frequency response for all frequencies .
therefore
De-emphasis
Pre-emphasis
Note: Math equations of this article uses MathML and it seems it is displayed correctly only on Firefox (as of November 2020).
Now we have frequency response equation of pre-emphasis (2) and FIR filter coefficients can be calculated from (2) using frequency sampling method, which is explained on the previous article.
I used Windows PC for the following tasks.
Prepare sound tracks of our Audio CD.
PCM should be pre-emphasis filtered 44.1kHz 16bit WAV.
I prepared the CD track WAV files Track01.wav and Track02.wav on C:\audio folder.
Download and run Cygwin setup-x86_64.exe https://www.cygwin.com/
Install cdrecord package: On the Select Packages menu on the Cygwin installer, Set View to "Full" and input "cdr" to Search. cdrecord package will be shown. On the pulldown list of the New column, select cdrecord version number to install.
Start → Cygwin → Cygwin64 Terminal.
Change current directory to C:\audio . Type the following text on the Cygwin64 Terminal :
$ cd /cygdrive/c/audio
Then type ls to show the file list of C:\audio folder. Make sure your wav files are there.
Create Audio CD with pre-emphasis:
$ cdrecord -audio -preemp Track01.wav Track02.wav
It seems Pre-emp is "Yes" 😄
Inserted created pre-emphasis CD-R to a CD transport and played. And watched its S/PDIF signal using RME Fireface UC and found emphasis flag of channel status is "None". This means the CD transport de-emphasised PCM signal in digital domain and no further de-emphasis is necessary on receiver/DAC.
It is possible to de-emphasis pre-emphasised PCM signal by playing it on the CD transport and recording S/PDIF signal using PCM recorder.
This FIR filter is for 44.1kHz PCM.
-0.0001031041010544631,
3.9223988214258376E-05,
-0.00035340551190767011,
8.1196136261327267E-05,
-0.00091024157376404236,
-0.00022270417890876693,
-0.0025945766943699933,
-0.0022553226067039134,
-0.009562843431584811,
-0.015097813965845558,
-0.051492871033445048,
-0.11992388565207374,
-0.44071105358364959,
2.2862148044176558,
-0.44071105358364959,
-0.11992388565207374,
-0.051492871033445048,
-0.015097813965845558,
-0.009562843431584811,
-0.0022553226067039134,
-0.0025945766943699933,
-0.00022270417890876693,
-0.00091024157376404236,
8.1196136261327267E-05,
-0.00035340551190767011,
3.9223988214258376E-05,
-0.0001031041010544631,
The following examples inputs 44.1kHz PCM file inFile.flac and apply 27taps Pre-emphasis FIR filter and output it as outFile.flac (this filter increases gain so sample value overflow may occur):
sox inFile.flac outFile.flac fir -0.0001031041010544631 3.9223988214258376E-05 -0.00035340551190767011 8.1196136261327267E-05 -0.00091024157376404236 -0.00022270417890876693 -0.0025945766943699933 -0.0022553226067039134 -0.009562843431584811 -0.015097813965845558 -0.051492871033445048 -0.11992388565207374 -0.44071105358364959 2.2862148044176558 -0.44071105358364959 -0.11992388565207374 -0.051492871033445048 -0.015097813965845558 -0.009562843431584811 -0.0022553226067039134 -0.0025945766943699933 -0.00022270417890876693 -0.00091024157376404236 8.1196136261327267E-05 -0.00035340551190767011 3.9223988214258376E-05 -0.0001031041010544631
There is a reference de-emphasis equation on this page (Thanks miguelito-san) : https://forums.stevehoffman.tv/threads/cd-dat-with-pre-emphasis-how-to-de-emphasize-correctly.88541/
This decibel is root power quantity therefore actual gain magnitude value T(f) is:
Note 1: Math equations of this article uses MathML and it seems it is displayed correctly only on Firefox (as of November 2020).
Note 2: It seems 0.00005 and 0.000015 of equation 1 means 50 microseconds and 15 microseconds respectively and it is called 50/15 microsec emphasis.
On this article, equation (2) is used to create frequency sampling FIR digital filter.
Calculation steps are very similar to Part 2.
When sampling frequency==44100 Hz and Desired FIR filter taps M==9,
Frequency sampling index
Frequency sampling angle frequency
Get filter gain on those frequencies using Equation (2):
Then G(k) is calculated from
FIR filter coefficients h(n) can be calculated by
Finally, this FIR filter is symmetry (linear phase), therefore h(8) = h(0), h(7) = h(1), h(6) = h(2), h(5) = h(3).
We've got all the 9 FIR filter coefficients h(n).
Now one FIR filter is available for testing. FIR filter gain of arbitrary angular frequency ω can be calculated using the following equation:
Real part and imaginary part of (5) can be calculated separately:
And FIR filter Gain magnitude is calculated as follows:
Finally Gain in decibel is:
For our M=9 FIR filter, frequency response can be calculated using equation (7). And this time reference equation is available: desirable gain of any frequency can be calculated, it is possible to compare gain values at as many frequency points as you wish. I compared 10Hz to 22040Hz semitone step frequency points and created Fig.1.
Fig.1. 9 taps FIR de-emphasis filter frequency response.
Comparing to the original de-emphasis table, max error of this FIR filter is 0.878 dB on 7360Hz, It is poor, and the quality can be improved by increasing M.
FIR Filter Taps M | Max Error (dB) |
9 | 0.878 |
15 | 0.1704 |
17 | 0.115 |
19 | 0.0631 |
21 | 0.0522 |
23 | 0.0231 |
25 | 0.0272 |
27 | 0.00882 |
Table 1: FIR Filter taps and max error
Fig.2 : Frequency Response of FIR Filter, taps=19 note: frequency axis is logarithmic.
Fig.3 : Frequency Response of FIR Filter, taps=27 note: frequency axis is logarithmic.
Fig.4 : Gain Error of FIR Filter, taps=27
19taps linear-phase FIR filter coefficients h(n) of max error = 0.0631 dB is as follows:
0.0022333652179533105,
0.0027676001211334594,
0.0042218013139663415,
0.0065438712761329912,
0.011312237381544295,
0.01877355043394098,
0.03398288954901494,
0.059120380386441337,
0.11593361915957012,
0.49022137032060437,
0.11593361915957012,
0.059120380386441337,
0.03398288954901494,
0.01877355043394098,
0.011312237381544295,
0.0065438712761329912,
0.0042218013139663415,
0.0027676001211334594,
0.0022333652179533105,
27taps linear-phase FIR filter coefficients h(n) of max error = 0.00882 dB is as follows:
0.00031102739649091732,
0.00036885685453166665,
0.00057659816229764602,
0.00082952248115418167,
0.001449970925925961,
0.0022387507393955598,
0.0039420948394406248,
0.0063363475292175873,
0.011215231698621361,
0.018685854350970088,
0.033951734838472802,
0.059076192885731141,
0.11592376177923121,
0.49018811103703697,
0.11592376177923121,
0.059076192885731141,
0.033951734838472802,
0.018685854350970088,
0.011215231698621361,
0.0063363475292175873,
0.0039420948394406248,
0.0022387507393955598,
0.001449970925925961,
0.00082952248115418167,
0.00057659816229764602,
0.00036885685453166665,
0.00031102739649091732,
sox inFile.flac outFile.flac fir 0.00031102739649091732 0.00036885685453166665 0.00057659816229764602 0.00082952248115418167 0.001449970925925961 0.0022387507393955598 0.0039420948394406248 0.0063363475292175873 0.011215231698621361 0.018685854350970088 0.033951734838472802 0.059076192885731141 0.11592376177923121 0.49018811103703697 0.11592376177923121 0.059076192885731141 0.033951734838472802 0.018685854350970088 0.011215231698621361 0.0063363475292175873 0.0039420948394406248 0.0022387507393955598 0.001449970925925961 0.00082952248115418167 0.00057659816229764602 0.00036885685453166665 0.00031102739649091732
On the previous blog post, we've got a 6th degree polynomial function of de-emphasis curve Equation 1:
Note: Math equations of this article uses MathML and it seems it is displayed correctly only on Firefox (as of November 2020).
This decibel is root power quantity therefore actual gain value f(x) is:
Next step is to create filter gain table of equal spacing frequency using this function.
And create the filter, evaluate its frequency response error from original de-emphasis table and choose the best FIR filter tap number M.
When sampling frequency==44100 Hz and Desired FIR filter taps M==9,
Frequency sampling index
Frequency sampling angle frequency
Get filter gain on those frequencies
Then G(k) is calculated from
FIR filter coefficients h(n) can be calculated by
And finally, This FIR filter is symmetry shape, therefore h(8) = h(0), h(7) = h(1), h(6) = h(2), h(5) = h(3).
We've got all the 9 FIR coefficient values h(n).
Now one FIR filter coefficients h(n) is available for testing. FIR filter gain of arbitrary angular frequency ω can be calculated using the following equation:
Real part and imaginary part of (5) can be calculated separately:
And FIR filter Gain magnitude is calculated as follows:
Finally Gain in decibel is:
For our M=9 FIR filter, frequency response can be calculated using equation (7):
Frequency(kHz) | |
0 | 0 |
1 | -0.214929748 |
2 | -0.847460501 |
3 | -1.855702469 |
4 | -3.153141013 |
5 | -4.58835657 |
6 | -5.939107409 |
7 | -6.960958392 |
8 | -7.506314657 |
9 | -7.624120111 |
10 | -7.521831664 |
11 | -7.433783042 |
12 | -7.52486218 |
13 | -7.862458657 |
14 | -8.419180318 |
15 | -9.081142015 |
16 | -9.670162018 |
17 | -10.00514702 |
18 | -9.997371674 |
19 | -9.707880014 |
20 | -9.30607583 |
21 | -8.974681539 |
22 | -8.840811148 |
Comparing to the original de-emphasis table, max error of this FIR filter is 0.87 dB on 7kHz, It is poor and may be M=9 is too small.
I'd like to have < 0.1 dB error of FIR filter with minimum filter taps. Calculated error from the original table on several M using DesignFrequencySamplingFilter and compared their performance.
Filter taps M | Max error from the original table |
9 | 0.871 dB |
17 | 0.217 dB |
19 | 0.140 dB |
21 | 0.172 dB |
23 | 0.104 dB |
25 | 0.118 dB |
27 | 0.0779 dB |
29 | 0.0802 dB |
31 | 0.0795 dB |
33 | 0.0770 dB |
From the table 2, M=27 is the most desirable one.
On M=27, maximum error from the original table is 0.0779 dB on 2kHz.
Resulted linear-phase FIR filter coefficients h(n) of M=27 for 44.1kHz PCM is as follows:
0.00087829953598830856,
0.00073354073461322569,
0.0013059505528472161,
0.00089158366884379073,
0.0022743712962963354,
0.0017509721612062167,
0.0046856769010995523,
0.0049418323357026065,
0.011621996337245248,
0.017825153275235591,
0.034805918374128435,
0.057946349576219941,
0.11652885832464696,
0.48761899385185181,
0.11652885832464696,
0.057946349576219941,
0.034805918374128435,
0.017825153275235591,
0.011621996337245248,
0.0049418323357026065,
0.0046856769010995523,
0.0017509721612062167,
0.0022743712962963354,
0.00089158366884379073,
0.0013059505528472161,
0.00073354073461322569,
0.00087829953598830856
Fig.1 M=27 de-emphasis FIR Filter frequency response
This linear-phase de-emphasis FIR filter is available on DSP menu of PlayPcmWin 5.0.79. Source code is https://sourceforge.net/p/playpcmwin/code/HEAD/tree/PlayPcmWin/WasapiIODLL/WWAudioFilterDeEmphasis.cpp
J.G. Proakis & D.G. Manolakis: Digital Signal Processing, 4th edition, 2007, Chapter 10, pp. 671-678