728x90 반응형 dtype2 [C] LLP64 vs. LP64 LLP64와 LP64는 C/C++ 컴파일러가 데이터 타입의 크기를 정의하는 데이터 모델(data model) 임. LLP64와 LP64는 는 해당 모델이 어떤 타입들을 64비트로 처리하는지를 나타내는 이름을 가짐.long과 pointer가 다른 크기면, 포인터를 long에 저장할 때 잘림(truncation) 문제가 발생할 수 있음플랫폼 간 이식성(portability) 확보를 위해서는 정확한 타입 사용이 필수LLP64, LP64 명칭의 의미이름약어 의미설명환경LP64Long and Pointer = 64-bitlong과 pointer가 64비트 (8바이트)로 확장됨gcc, clangLLP64Long Long and Pointer = 64-bitlong long과 pointer는 64비트, long은 여.. 2025. 3. 21. [DL] Tensor: dtype 변경(casting) 및 shape 변경. Tensor를 추상화하고 있는 class로는numpy.array: numpy의 ndarraytorch.tensortensorflow.constant: (or tensorflow.Variable)이 있음. 이들은 Python의 sequence types과 달리 일반적으로 다음과 같은 특징을 지님.데이터들이 연속적으로 할당되는 특징의 c,c++의 array와 매우 유사함.element들이 homogeneous인 특징을 가짐 (같은 크기의 unboxed object로 구성=같은 type들)dtyep 변경dtype는 The data type of element 를 가르키며, tensor에서 element의 type을 가르킴.numpy나 tensorflow, torch등이 지원하는 dtype는 다음 URL을 참고.. 2024. 3. 15. 이전 1 다음 728x90 반응형