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

fftw 라이브러리 사용 테스트  (0) 2023.06.12
fft 잘못 사용하고 있었나?  (0) 2023.06.02
fftw 다차원 분석  (0) 2023.05.27
fft phase 연산  (0) 2023.04.07
fftw input range?  (0) 2023.04.07
Posted by 구차니

딸래미꺼 0원요금제로 갈아타기 모드

이번에 갈아타면 1년 간 버틸 수 있고

그냥 월 2200원에 월 1GB면 집에서만 인터넷 쓰게 하면 될 거 같기도?

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

핸드폰 개통  (2) 2024.02.05
핸드폰 요금제 변경  (0) 2023.08.14
터치 안되는 핸드폰 끄기(안드로이드)  (0) 2022.12.02
요금제 변경 시도  (0) 2022.09.05
아이패드 초기화 하기  (0) 2022.07.27
Posted by 구차니
Microsoft/Windows IoT2023. 6. 1. 10:30

먼가 한땀 한땀 읽으니 겨우 이해가 되네 -_-

나이가 들어서 그런가..

10.4 Installing Windows 10 IoT on eMMC and Booting Windows 10 IoT
1. Power on the board and let the Windows installer install Windows IoT Enterprise to the eMMC, then reboot
into installed Windows. Installing Windows IoT Enterprise from the SD card can take around 30 minutes, so
get some coffee while you wait!
Note: The WinPE installer renames the EFI folder at the root of the SD card to _efi, which causes UEFI to
skip the SD card at boot time. This allows you to keep the SD card inserted across reboots without having
Windows IoT reinstalled on each reboot. If you wish to boot into the WinPE installer again, you can rename
_efi back to EFI.
2. Make sure to disable sleep in “Power and sleep” settings after Windows OS boots up to avoid unexpected
system hangs.

[링크 : https://www.nxp.com/docs/en/quick-reference-guide/IMXWQSG.pdf]

 

인스톨용 SD 카드를 뽑아서 열어보니

_efi 디렉토리가 있다. 설치하면서 설치 SD 카드에서 디렉토리 명을 바꿔버리는 듯

SD 부팅을 해놔야 하니 설치 하지 못하도록 막는 고육책일 것 같기도 하고..

i.mx8mp용 인스톨러 특성일지 아니면 다른 win on arm 계열들도 그런지 모르겠다.

'Microsoft > Windows IoT' 카테고리의 다른 글

x86 binary on win iot for arm  (0) 2023.05.30
Posted by 구차니

경기도 사는 사람에게는 안와서 잘 잤다만(?)

아무튼 강하나 건너면 바로 서울인데 서울에만 문자가 오고

경기도에는 오지 않은걸 보면 지역 기반도 아니고 동별로 처리하는건가?

 

‘北 미사일 발사’ 재난문자 오발령 촌극...서울시 “대피준비” vs 행안부 “오발령”

[링크 : http://www.enewstoday.co.kr/news/articleView.html?idxno=2005226]

 

"서울로 미사일 쐈다면 이미 저승행"…9분 늦은 문자에 분통

[링크 : https://v.daum.net/v/20230531164257531]

'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글

에라이  (0) 2023.07.12
도둑놈 심뽀?  (0) 2023.06.15
RE100, CFE ?  (2) 2023.05.17
전기, 가스 요금 인상  (0) 2023.05.15
망했어요  (0) 2023.04.26
Posted by 구차니
Microsoft/Windows IoT2023. 5. 30. 21:25

윈도우 iot 관련해서 찾아보니..

x86 to ARM64 에뮬레이션은 윈10 iot에서 지원

x64 to ARM64 에뮬레이션은 윈10 iot에서 지원해주다가 빼고 윈11 iot 에서 해준다고 한다.

 

아무튼 가상화는 아니고 x86 에뮬레이션으로 실행하고

Arm에서 x86 에뮬레이션이 작동하는 방식

x86 앱에 대한 에뮬레이션을 사용하면 Arm에서 Win32 앱의 풍부한 에코시스템을 사용할 수 있습니다. 이렇게 하면 사용자에게 앱을 전혀 수정하지 않고 기존 x86 win32 앱을 실행하는 놀라운 환경을 제공할 수 있습니다. 앱은 특정 API(IsWoW64Process2)를 호출하지 않는 한 Arm PC의 Windows에서 실행되고 있다는 것조차 알지 못합니다.

[링크 : https://learn.microsoft.com/ko-kr/windows/arm/apps-on-arm-x86-emulation]

 

Arm64EC - Arm에서 Windows 11 위한 앱 빌드
Arm64EC("Emulation Compatible")를 사용하면 새 앱을 증분 방식으로 빌드하거나 기존 앱을 포팅하여 가능한 경우 네이티브 Arm 성능을 활용하는 동시에 완전히 마이그레이션될 때까지 기존 x64 코드 & 라이브러리를 활용할 수 있습니다. 자세한 정보:


Arm의 기존 Windows 앱 지원
Windows on Arm은 수정되지 않은 많은 x86 & x64 앱뿐만 아니라 네이티브 Arm 앱을 실행하지만 최상의 성능과 배터리 수명을 위해 가능한 한 Arm 네이티브로 앱을 빌드해야 합니다. Windows 앱은 네이티브 C/C++ Win32 앱, 클래식 .NET Framework WinForms/WPF 앱, 최신 .NET 또는 MAUI 앱 또는 Java, Python, 노드 등을 사용하여 빌드된 앱 등 다양한 도구와 기술을 사용하여 빌드할 수 있습니다.

[링크 : https://learn.microsoft.com/ko-kr/windows/arm/overview?source=recommendations]

 

PC용 cpu-z를 받아서

x86과 x64용 실행파일을 실행하면

32bit(x86) 용은 구동에 문제가 없고

64bit(x64) 용은 프로그램마다 출력이 좀 다르긴 한데 아래와 같이 This app can't run on your PC 라고 뜨면서 실행이 안된다.

그렇다고 win 11 iot로 버전업 하긴 엄청 오래 걸릴 것 같고 패스~!

 

putty 64bit 인스톨러 실행시

'Microsoft > Windows IoT' 카테고리의 다른 글

win IoT 재설치 (i.MX8MP / win iot 10 ent)  (0) 2023.06.01
Posted by 구차니

ubuntu 22.04로 올렸더니 git에서 받으려고 시도했으나 실패해서

옆자리 동료에서 물어보니 ssh 보안관련 문제라고

 

그래서 추가로 검색해보니 SSL 에서 구버전 암호화 deprecate 시키듯이

SSH 에서도 ed25519 를 구버전 암호화로 사용을 막도록 기본값을 변경해서 생긴 문제인 듯.

The RSA SHA-1 hash algorithm is being quickly deprecated across operating systems and SSH clients because of various security vulnerabilities, with many of these technologies now outright denying the use of this algorithm.

It seems this has happened for the ssh client in Ubuntu 22.04. The RSA public-private key pair is considered not safe any more.

Solution
Use a more modern and secure type of key such as ed25519. Generate a new key pair in your Ubuntu 22.04 computer with this command:

ssh-keygen -t ed25519 -C "colin@colin-desktop"

[링크 : https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04]

[링크 : https://songs-family.tistory.com/entry/장애이슈-SSH-키-인증-방식-변경ssh-rsa-ecdsa-에-따른-서비스-장애]

 

EdDSA는 Edwards-curve 디지털 서영 알고리즘의 약자고

Ed25519는 SHA-512와 curve25519를 사용했다는데

Edwards-curve Digital Signature Algorithm (EdDSA)
Ed25519 is the EdDSA signature scheme using SHA-512 (SHA-2) and Curve25519[2] where

[링크 : https://en.wikipedia.org/wiki/EdDSA]

 

curve25519는 128bit 암호화를 제공해서 잘린건가?

In cryptography, Curve25519 is an elliptic curve used in elliptic-curve cryptography (ECC) offering 128 bits of security (256-bit key size) and designed for use with the elliptic curve Diffie–Hellman (ECDH) key agreement scheme. 

[링크 : https://en.wikipedia.org/wiki/Curve25519]

Posted by 구차니

역시 인텔 그래픽 감속기로는 무리인가...

HD 620 인데(7세대 내장) 그래픽 옵션들 전부 최저에

해상도 50%(960x540) 으로 해도 15프레임 될까 말까 한 듯

 

프레임도 느린데 asdw 키를 통해서 좌우/상하 전환하면

먼가 예상 한 것 보다 너무 빠르게 움직이고 한템포 늦게 카메라가 또 돌아가버리니 미묘하게 환장하게 만드는 조작감...

 

그래도 유유자적(?)하며 바다를 거니는 느낌은 좋다.

'게임 > 오리진&스팀&유플레이' 카테고리의 다른 글

오리진 계정 복구  (0) 2023.06.08
ea origin은 어디가고..  (2) 2023.06.06
스위치 둠 공략 - 챕터..4?  (0) 2022.08.30
macos 에픽게임즈  (0) 2022.05.27
macos 스팀 게임  (0) 2022.05.27
Posted by 구차니

그치질 않네

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

청소  (0) 2023.06.04
기절  (0) 2023.06.03
앵무새와 cites  (0) 2023.05.15
낮잠 기절  (0) 2023.05.13
휴가 10일차  (2) 2023.05.07
Posted by 구차니

libttfw 에서는 2차원 3차원 DFT를 지원하는데, 내가 생각하는 그 2차원 3차원이 맞나 모르겠다.

센서가 3축이면 3차원은 맞긴한데.. 희소행렬 형태로 삽입이 되어야 하나?

2.2 Complex Multi-Dimensional DFTs
Multi-dimensional transforms work much the same way as one-dimensional transforms: you allocate arrays of fftw_complex (preferably using fftw_malloc), create an fftw_plan, execute it as many times as you want with fftw_execute(plan), and clean up with fftw_destroy_plan(plan) (and fftw_free).

FFTW provides two routines for creating plans for 2d and 3d transforms, and one routine for creating plans of arbitrary dimensionality. The 2d and 3d routines have the following signature:

fftw_plan fftw_plan_dft_2d(int n0, int n1,
                           fftw_complex *in, fftw_complex *out,
                           int sign, unsigned flags);
fftw_plan fftw_plan_dft_3d(int n0, int n1, int n2,
                           fftw_complex *in, fftw_complex *out,
                           int sign, unsigned flags);

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

 

3.2.1 Row-major Format
The multi-dimensional arrays passed to fftw_plan_dft etcetera are expected to be stored as a single contiguous block in row-major order (sometimes called “C order”). Basically, this means that as you step through adjacent memory locations, the first dimension’s index varies most slowly and the last dimension’s index varies most quickly.

To be more explicit, let us consider an array of rank d whose dimensions are n0 × n1 × n2 × … × nd-1 . Now, we specify a location in the array by a sequence of d (zero-based) indices, one for each dimension: (i0, i1, i2,..., id-1). If the array is stored in row-major order, then this element is located at the position id-1 + nd-1 * (id-2 + nd-2 * (... + n1 * i0)).

Note that, for the ordinary complex DFT, each element of the array must be of type fftw_complex; i.e. a (real, imaginary) pair of (double-precision) numbers.

In the advanced FFTW interface, the physical dimensions n from which the indices are computed can be different from (larger than) the logical dimensions of the transform to be computed, in order to transform a subset of a larger array. Note also that, in the advanced interface, the expression above is multiplied by a stride to get the actual array index—this is useful in situations where each element of the multi-dimensional array is actually a data structure (or another array), and you just want to transform a single field. In the basic interface, however, the stride is 1.

[링크 : https://www.fftw.org/fftw3_doc/Row_002dmajor-Format.html]

 

A multi-dimensional array whose size is declared at compile time in C is already in row-major order. You don’t have to do anything special to transform it. For example:

{
     fftw_complex data[N0][N1][N2];
     fftw_plan plan;
     ...
     plan = fftw_plan_dft_3d(N0, N1, N2, &data[0][0][0], &data[0][0][0],
                             FFTW_FORWARD, FFTW_ESTIMATE);
     ...
}
This will plan a 3d in-place transform of size N0 x N1 x N2. Notice how we took the address of the zero-th element to pass to the planner (we could also have used a typecast).

[링크 : https://www.fftw.org/fftw3_doc/Fixed_002dsize-Arrays-in-C.html]

[링크 : https://www.fftw.org/fftw3_doc/Multi_002ddimensional-Array-Format.html]

 

+

에라이 모르겠다 ㅠㅠ

     switch (sz->rnk) {
 case 1:
      if (p->sign < 0) {
   if (verbose > 2) printf("using plan_dft_r2c_1d\n");
   return FFTW(plan_dft_r2c_1d)(sz->dims[0].n, 
(bench_real *) p->in, 
(bench_complex *) p->out,
flags);
      }
      else {
   if (verbose > 2) printf("using plan_dft_c2r_1d\n");
   return FFTW(plan_dft_c2r_1d)(sz->dims[0].n, 
(bench_complex *) p->in, 
(bench_real *) p->out,
flags);
      }
      break;
 case 2:
      if (p->sign < 0) {
   if (verbose > 2) printf("using plan_dft_r2c_2d\n");
   return FFTW(plan_dft_r2c_2d)(sz->dims[0].n, sz->dims[1].n,
(bench_real *) p->in, 
(bench_complex *) p->out,
flags);
      }
      else {
   if (verbose > 2) printf("using plan_dft_c2r_2d\n");
   return FFTW(plan_dft_c2r_2d)(sz->dims[0].n, sz->dims[1].n,
(bench_complex *) p->in, 
(bench_real *) p->out,
flags);
      }
      break;
 case 3:
      if (p->sign < 0) {
   if (verbose > 2) printf("using plan_dft_r2c_3d\n");
   return FFTW(plan_dft_r2c_3d)(
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
(bench_real *) p->in, (bench_complex *) p->out,
flags);
      }
      else {
   if (verbose > 2) printf("using plan_dft_c2r_3d\n");
   return FFTW(plan_dft_c2r_3d)(
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
(bench_complex *) p->in, (bench_real *) p->out,
flags);
      }
      break;
 default: {
      int *n = mkn(sz);
      if (p->sign < 0) {
   if (verbose > 2) printf("using plan_dft_r2c\n");
   pln = FFTW(plan_dft_r2c)(sz->rnk, n,
    (bench_real *) p->in, 
    (bench_complex *) p->out,
    flags);
      }
      else {
   if (verbose > 2) printf("using plan_dft_c2r\n");
   pln = FFTW(plan_dft_c2r)(sz->rnk, n,
    (bench_complex *) p->in, 
    (bench_real *) p->out,
    flags);
      }
      bench_free(n);
      return pln;
 }
     }

[링크 : https://github.com/FFTW/fftw3/blob/master/tests/bench.c]

 

+

mpi 예제도 있음.

그런데 3d로 한다고 하니 어마어마하게 데이터가 필요할 것 같은데

단순하게 3축 데이터라면 엄청 큰 공간에 딱 3줄 넣는 식이 될텐데 어떻게 해야 할까?

    data = (FFTW_COMPLEX *) FFTW_MALLOC(sizeof(FFTW_COMPLEX) * NX*NY*NZ*sizeof(FFTW_COMPLEX));
    
    /* create plan for forward DFT */
    gettimeofday(&tv_start, NULL);
    plan = FFTW_PLAN_DFT_3D(NX, NY, NZ, data, data,
    FFTW_FORWARD, FFTW_ESTIMATE);
    gettimeofday(&tv_stop, NULL);
    deltaT =  tv_stop.tv_sec  - tv_start.tv_sec +
      1e-6 * (tv_stop.tv_usec - tv_start.tv_usec);
    printf("Plan init time (c2c)  : %f sec\n", deltaT);
    
    /* initialize data */
    for (i = 0; i < NX; ++i) {
      for (j = 0; j < NY; ++j) {
        for (k = 0; k < NZ; ++k) {
          data[(i*NY + j)*NZ + k][0] = (i*NY + j)*NZ + k;
          data[(i*NY + j)*NZ + k][1] = 0;
        }
      }
    }

[링크 : https://github.com/pkestene/simpleFFTW/blob/master/c/fftw_test_3d_serial.c]

 

+

암만봐도 2d나 3d fft는 어떻게 써야 할지 감도 안와서 사용 시도 자체를 포기!

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

fft 잘못 사용하고 있었나?  (0) 2023.06.02
fft 라이브러리 목록  (0) 2023.06.01
fft phase 연산  (0) 2023.04.07
fftw input range?  (0) 2023.04.07
fft 복소수(complex) - 실수, 허수부(real, imaginary)  (0) 2023.04.07
Posted by 구차니
Programming/rust2023. 5. 26. 23:31

use std::io; 없이 사용시

error[E0433]: failed to resolve: use of undeclared crate or module `io`
 --> main.rs:8:5
  |
8 |     io::stdin()
  |     ^^
  |     |
  |     use of undeclared crate or module `io`
  |     help: a builtin type with a similar name exists: `i8`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.




변수 사용 없음 (경고)

warning: unused `Result` that must be used
  --> main.rs:10:5
   |
10 | /     io::stdin()
11 | |         .read_line(&mut guess);
   | |______________________________^
   |
   = note: this `Result` may be an `Err` variant, which should be handled
   = note: `#[warn(unused_must_use)]` on by default

warning: 1 warning emitted




read_line mut 없이

error[E0308]: mismatched types
  --> main.rs:11:20
   |
11 |         .read_line(&guess);
   |          --------- ^^^^^^ types differ in mutability
   |          |
   |          arguments to this method are incorrect
   |
   = note: expected mutable reference `&mut String`
                      found reference `&String`
note: method defined here
  --> /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\io\stdio.rs:383:12

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.





///
let guess = String::new();
    io::stdin().read_line(&mut guess);
///

error[E0596]: cannot borrow `guess` as mutable, as it is not declared as mutable
  --> main.rs:11:20
   |
11 |         .read_line(&mut guess);
   |                    ^^^^^^^^^^ cannot borrow as mutable
   |
help: consider changing this to be mutable
   |
8  |     let mut guess = String::new();
   |         +++

error: aborting due to previous error

For more information about this error, try `rustc --explain E0596`.







//
let guess = String::new();
    io::stdin().read_line(&guess);
//

error[E0308]: mismatched types
 --> main.rs:9:27
  |
9 |     io::stdin().read_line(&guess);
  |                 --------- ^^^^^^ types differ in mutability
  |                 |
  |                 arguments to this method are incorrect
  |
  = note: expected mutable reference `&mut String`
                     found reference `&String`
note: method defined here
 --> /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\io\stdio.rs:383:12

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.










'Programming > rust' 카테고리의 다른 글

rust mut  (0) 2023.05.25
rust visibility and privacy  (0) 2023.05.25
rust 소유권  (0) 2023.05.25
rust was  (0) 2023.05.20
c에서 rust 호출하기  (0) 2023.05.11
Posted by 구차니