'프로그램 사용'에 해당되는 글 2354건

  1. 2023.01.26 gcc tree vectorize
  2. 2023.01.05 minicom lf에 cr 붙이기
  3. 2022.12.07 cmake ninja, cmake 옵션주기
  4. 2022.12.06 gcc fstack-protector-strong
  5. 2022.11.16 fft window 함수
  6. 2022.11.16 fftw @ 22Hz sine파 대충 돌려보니
  7. 2022.11.08 libvncserver without password
  8. 2022.11.04 real to complex
  9. 2022.11.04 fftw wisdom
  10. 2022.11.04 libvncserver 기본 인자
프로그램 사용/gcc2023. 1. 26. 19:55

필수

-O3 -ftree-vectorize

(-O2 에서는 -ftree-vectorize가 적용되지 않는다.)

 

옵션(?)

-mfpu=neon -fopt-info-vec[-all]

 

neon을 지정안해주어도 cortex-a9 에서 vfp로 되는진 모르겠지만

약간 변환되는게 있고

neon을 지정해주면 많이 늘어난다

 

[링크 : https://developer.arm.../Compiling-NEON-Instructions/Vectorization/Enabling-auto-vectorization-in-GCC-compiler]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc cortex-a9 double형 neon 연산 가속  (3) 2023.08.08
gcc fstack-protector-strong  (0) 2022.12.06
gcc vectorization 실패  (0) 2022.06.02
gcc / 문자열 선언  (0) 2022.03.17
static link  (0) 2022.02.07
Posted by 구차니

Add carriage Return을 활성화 해주면 자동으로  lf에 cr을 붙여주는 듯.

(ctrl - a,z - u)

 

[링크 : https://unix.stackexchange.com/questions/283924/]

'프로그램 사용 > minicom' 카테고리의 다른 글

minicom color  (0) 2024.11.06
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
minicom 16진수로 보기  (0) 2022.08.25
minicom 로그 저장하기  (0) 2021.09.16
minicom timestamp  (0) 2021.09.16
Posted by 구차니

-G Ninja 하면 Makefile 이 생성되지 않고 build.ninja만 생성된다.

빌드시 자잘한(?) 옵션은 -Doption=value 식으로 주면 ok

cmake.exe -G "Ninja" -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=ccache

[링크 : https://github.com/LibVNC/libvncserver/issues/448]

'프로그램 사용 > make, configure' 카테고리의 다른 글

makefile 매크로(?)  (0) 2023.08.28
make 조건식  (0) 2023.08.16
cmake 옵션 확인  (0) 2021.01.20
cmake 빌드 에러시  (0) 2021.01.19
make order  (0) 2016.06.16
Posted by 구차니
프로그램 사용/gcc2022. 12. 6. 16:59

fno 되어있어서 웬지 눈에 익숙한 느낌인데 

-fno-stack-protector

 

새로운게 보여서 찾아보니

말 그대로 stack 오버런이 발생하는지 감지하는 기능을 제공한다고 한다.

[링크 : https://m.blog.naver.com/neos_rtos/220688072708]

[링크 : https://developer.arm.com/documentation/101754/0618/armclang-Reference/armclang-Command-line-Options/-fstack-protector---fstack-protector-all---fstack-protector-strong---fno-stack-protector]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc cortex-a9 double형 neon 연산 가속  (3) 2023.08.08
gcc tree vectorize  (0) 2023.01.26
gcc vectorization 실패  (0) 2022.06.02
gcc / 문자열 선언  (0) 2022.03.17
static link  (0) 2022.02.07
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

cabs()  (0) 2023.02.15
FFT 분석 기법  (0) 2023.02.07
fftw @ 22Hz sine파 대충 돌려보니  (0) 2022.11.16
real to complex  (0) 2022.11.04
fftw wisdom  (0) 2022.11.04
Posted by 구차니

요건.. sin() 함수를 이용해서 만든 입력 신호(원본)

대충.. 22.5Hz 되는 것 같은데..

 

fftw 결과의 첫번째 값.. 이게 허수부인지 실수부인지 모르겠다

a+bi 식이니 a 쪽이라 실수부 라고 봐야 할 것 같긴한데..

 

앞 부분만 잘라서 보니 대충.. 22 근처에 피크 하나 발생

 

요건.. 아마도 허수부

 

실수부와는 반대 형태로 발생

 

sqrt(a^2 + b^2) 로 계산해보니

 

23 앞뒤로 샤프하게 주파수 하나 발생한게 보이긴 한데..

 

이걸 10*log(n) 으로 줘보니.. 40dB 라고 보면 되려나? 단위가 어떻게 되는지 감이 안온다.

 

부분만 보면.. 23 근처에 peak로 뜨긴 한데..

 

16000sampling/sec 를 기준으로 데이터를 생성한거라..

결과로 나오는 8khz 대역중 22hz 하나에 peak로 뜨는건.. 너무 무리하게 sharp한 결과를 바라는것 같고..

아니면 window 크기를 조절해서 더 샤프하게 분석이 가능한가 궁금하기도 하네.

 

https://stackoverflow.com/questions/4675457/how-to-generate-the-audio-spectrum-using-fft-in-c#comment5156988_4675457

+

The data is an array of type fftw_complex, which is by default a double[2] composed of the real (in[i][0]) and imaginary (in[i][1]) parts of a complex number.

[링크 : https://www.fftw.org/fftw3_doc/Complex-One_002dDimensional-DFTs.html]

 

 복소수(複素數, 영어: complex number)는 {\displaystyle a+bi}a+bi ({\displaystyle a,b}a,b는 실수) 꼴의 수이다.

[링크 : https://ko.wikipedia.org/wiki/복소수]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

FFT 분석 기법  (0) 2023.02.07
fft window 함수  (0) 2022.11.16
real to complex  (0) 2022.11.04
fftw wisdom  (0) 2022.11.04
FFT  (0) 2022.10.24
Posted by 구차니
프로그램 사용/VNC2022. 11. 8. 15:23

 

 

int main(int argc,char** argv)
{
  rfbScreenInfoPtr rfbScreen = rfbGetScreen(&argc,argv,maxx,maxy,8,3,bpp);
  if(!rfbScreen)
    return 1;
  rfbScreen->desktopName = "LibVNCServer Example";
  rfbScreen->frameBuffer = (char*)malloc(maxx*maxy*bpp);
  rfbScreen->alwaysShared = TRUE;
  rfbScreen->ptrAddEvent = doptr;
  rfbScreen->kbdAddEvent = dokey;
  rfbScreen->newClientHook = newclient;
  rfbScreen->httpDir = "../webclients";
  rfbScreen->httpEnableProxyConnect = TRUE;

[링크: https://github.com/LibVNC/libvncserver/blob/master/examples/example.c]

 

    server->authPasswdData = (void *)passwords;
    server->passwordCheck = rfbCheckPasswordByList;

[링크 : https://libvnc.github.io/doc/html/structrfb_screen_info.html#a0d709aef47e215065642eb6d0f6de633]

'프로그램 사용 > VNC' 카테고리의 다른 글

libvncserver 기본 인자  (0) 2022.11.04
libvncserver 종료 절차  (0) 2022.11.01
libvncserver 로그인  (0) 2022.09.26
libvncserver 접속 끊어짐 문제  (0) 2022.08.16
libvncserver websocket example  (0) 2022.08.12
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fft window 함수  (0) 2022.11.16
fftw @ 22Hz sine파 대충 돌려보니  (0) 2022.11.16
fftw wisdom  (0) 2022.11.04
FFT  (0) 2022.10.24
fftw 예제 와 복소수 처리  (0) 2022.10.19
Posted by 구차니

fftw는 plan을 세우고 계산하는데, plan을  export 하고 import 할 수 있다고 한다.

그러면 초기 구동 속도를 더 올릴수 있으려나?

Importing and Exporting Wisdom


void fftw_export_wisdom_to_file(FILE *output_file);
fftw_status fftw_import_wisdom_from_file(FILE *input_file);

[링크 : https://www.fftw.org/fftw2_doc/fftw_2.html#SEC13]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw @ 22Hz sine파 대충 돌려보니  (0) 2022.11.16
real to complex  (0) 2022.11.04
FFT  (0) 2022.10.24
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
Posted by 구차니
프로그램 사용/VNC2022. 11. 4. 10:42

libvncserver 라이브러리에서 제공되는 기본 옵션이 존재한다.

# ./vncserver -help
-rfbport port          TCP port for RFB protocol
-rfbportv6 port        TCP6 port for RFB protocol
-rfbwait time          max time in ms to wait for RFB client
-rfbauth passwd-file   use authentication on RFB protocol
                       (use 'storepasswd' to create a password file)
-rfbversion 3.x        Set the version of the RFB we choose to advertise
-permitfiletransfer    permit file transfer support
-passwd plain-password use authentication
                       (use plain-password as password, USE AT YOUR RISK)
-deferupdate time      time in ms to defer updates (default 40)
-deferptrupdate time   time in ms to defer pointer updates (default none)
-desktop name          VNC desktop name (default "LibVNCServer")
-alwaysshared          always treat new clients as shared
-nevershared           never treat new clients as shared
-dontdisconnect        don't disconnect existing clients when a new non-shared
                       connection comes in (refuse new connection instead)
-sslkeyfile path       set path to private key file for encrypted WebSockets connections
-sslcertfile path      set path to certificate file for encrypted WebSockets connections
-httpdir dir-path      enable http server using dir-path home
-httpport portnum      use portnum for http connection
-httpportv6 portnum    use portnum for IPv6 http connection
-enablehttpproxy       enable http proxy support
-progressive height    enable progressive updating for slow links
-listen ipaddr         listen for connections only on network interface with
                       addr ipaddr. '-listen localhost' and hostname work too.
-listenv6 ipv6addr     listen for IPv6 connections only on network interface with
                       addr ipv6addr. '-listen localhost' and hostname work too.

 

http 자체는 disable 하는게 없다.

줄   9: 00084         if (strcmp(argv[i], "-help") == 0) {
줄  12: 00087         } else if (strcmp(argv[i], "-rfbport") == 0) { /* -rfbport port */
줄  19: 00094         } else if (strcmp(argv[i], "-rfbportv6") == 0) { /* -rfbportv6 port */
줄  26: 00101         } else if (strcmp(argv[i], "-rfbwait") == 0) {  /* -rfbwait ms */
줄  32: 00107         } else if (strcmp(argv[i], "-rfbauth") == 0) {  /* -rfbauth passwd-file */
줄  39: 00114         } else if (strcmp(argv[i], "-permitfiletransfer") == 0) {  /* -permitfiletransfer  */
줄  41: 00116         } else if (strcmp(argv[i], "-rfbversion") == 0) {  /* -rfbversion 3.6  */
줄  47: 00122         } else if (strcmp(argv[i], "-passwd") == 0) {  /* -passwd password */
줄  57: 00132         } else if (strcmp(argv[i], "-deferupdate") == 0) {  /* -deferupdate milliseconds */
줄  63: 00138         } else if (strcmp(argv[i], "-deferptrupdate") == 0) {  /* -deferptrupdate milliseconds */
줄  69: 00144         } else if (strcmp(argv[i], "-desktop") == 0) {  /* -desktop desktop-name */
줄  75: 00150         } else if (strcmp(argv[i], "-alwaysshared") == 0) {
줄  77: 00152         } else if (strcmp(argv[i], "-nevershared") == 0) {
줄  79: 00154         } else if (strcmp(argv[i], "-dontdisconnect") == 0) {
줄  81: 00156         } else if (strcmp(argv[i], "-httpdir") == 0) {  /* -httpdir directory-path */
줄  87: 00162         } else if (strcmp(argv[i], "-httpport") == 0) {  /* -httpport portnum */
줄  94: 00169         } else if (strcmp(argv[i], "-httpportv6") == 0) {  /* -httpportv6 portnum */
줄 101: 00176         } else if (strcmp(argv[i], "-enablehttpproxy") == 0) {
줄 103: 00178         } else if (strcmp(argv[i], "-progressive") == 0) {  /* -httpport portnum */
줄 109: 00184         } else if (strcmp(argv[i], "-listen") == 0) {  /* -listen ipaddr */
줄 118: 00193         } else if (strcmp(argv[i], "-listenv6") == 0) {  /* -listenv6 ipv6addr */
줄 126: 00201         } else if (strcmp(argv[i], "-sslkeyfile") == 0) {  /* -sslkeyfile sslkeyfile */
줄 132: 00207         } else if (strcmp(argv[i], "-sslcertfile") == 0) {  /* -sslcertfile sslcertfile */

[링크 : https://libvncserver.sourceforge.net/doc/html/cargs_8c_source.html]

'프로그램 사용 > VNC' 카테고리의 다른 글

libvncserver without password  (0) 2022.11.08
libvncserver 종료 절차  (0) 2022.11.01
libvncserver 로그인  (0) 2022.09.26
libvncserver 접속 끊어짐 문제  (0) 2022.08.16
libvncserver websocket example  (0) 2022.08.12
Posted by 구차니