코드 생성 구성하기
R2026b속도, 메모리 사용량, 코드 모양을 비롯하여 생성 코드의 다양한 측면을 제어하는 파라미터
코드 생성기를 사용하면 코드 구성 파라미터를 설정하여 코드 생성 프로세스의 많은 부분을 제어할 수 있습니다. 이러한 파라미터 중 일부는 출력 빌드 유형(MEX, LIB, DLL 또는 EXE), C와 C++ 중 사용할 언어와 같은 특성을 제어합니다. 다른 구성 파라미터를 사용하면 가독성, 성능, 외부 코드 통합 등의 특정 요구 사항에 따라 생성 코드를 사용자 지정할 수 있습니다. 이러한 파라미터의 값은 MATLAB® Coder™ 앱 또는 명령줄에서 수정할 수 있습니다.
함수
coder.config | 코드 생성 구성 객체 만들기 |
코드 구성 설정
| 빌드 유형 | 생성된 C/C++ 코드에서 빌드할 출력값 |
| 언어 | 생성 코드에서 사용할 언어 |
| 언어 표준 | Language standard to use for the generated code |
| 사용자 지정 출력 파일 | Name of code generation output file |
| 코드만 생성 | Generation of only source code |
| 검증 모드 | 코드 검증 모드 |
| 빌드 폴더 | Folder type for files generated during build process |
| 빌드 폴더 경로 | Folder path for files generated during build process |
| 작업 폴더 | Current working folder type for build process |
| 작업 폴더 경로 | Current working folder path for build process |
| CTRL+C와 그래픽스 새로 고침에 대한 반응 활성화 | Responsiveness checks |
| 외재적 호출 유지 | Extrinsic function call support |
| 메모리 무결성 검사 | Memory integrity checking |
| 정수 오버플로 시 포화 | Integer overflow support |
| 순수 정수만 지원 | Detection of floating-point code |
| nonfinite 숫자 지원 | Support for nonfinite values |
| 루프 풀기 임계값 | Threshold on the number of iterations that determines whether to automatically
unroll a for-loop and a parfor-loop |
| 진입점 함수에 대한 입력 데이터 유지 | Whether to protect entry-point input data from modification |
| C restrict 함수 인수 검증 | Annotate function declarations with the restrict keyword |
| 가능한 경우 OpenMP 라이브러리 활성화 | Parallelization of parfor-loops |
| 자동 병렬화 활성화 | Automatic parallelization of for loops |
| 최대 CPU 스레드 개수 | 병렬 for 루프를 실행하기 위한 최대 CPU 스레드 개수 |
| 타깃 하드웨어 확장 명령어 집합 활용 | SIMD instruction set for target hardware |
| FMA | Whether to use SIMD instructions for fused multiply add operations |
| 사용자 작성 MATLAB 함수를 위한 인라인 전략 | Control inlining between user-written functions |
| MathWorks 작성 MATLAB 함수를 위한 인라인 전략 | Control inlining between MathWorks functions |
| MathWorks 함수와 사용자 함수 간의 호출을 위한 인라인 전략 | Control inlining between user-written functions and MathWorks functions |
| 축소 최적화 | Generate SIMD code for reduction operations | Parallelize for-loops performing reduction operations |
| 하드웨어 SIMD 가속 | Level of SIMD intrinsics |
| 전역 데이터 동기화 모드 | Global data synchronization mode |
| 가변 크기 조정 활성화 | Variable-size array support |
| 동적 메모리 할당 활성화 | 가변 크기 배열에 대한 동적 메모리 할당 활성화 |
| 동적 메모리 할당 임계값 | Size threshold for dynamic memory allocation of variable-size arrays |
| 고정 크기 배열을 위한 동적 메모리 할당 활성화 | Dynamic memory allocation for fixed-size arrays |
| 동적 메모리 할당 인터페이스 | Dynamically allocated array at generated function interface |
| 배열 레이아웃 | 행 우선 배열 레이아웃 |
| 배열 차원 유지 | n차원 인덱싱 |
| 스택 사용량 최댓값 | Maximum stack usage per application |
| 재진입 코드 생성 | Multi-instance, reentrant code |
| 미사용 필드와 속성 유지 | Preserve unused class properties or structure fields in the generated C/C++ code |
| 생성 파일 분할 방법 | File partitioning mode |
| 큰 상수 생성 | Whether to write large deep learning constants to binary data files |
| 큰 상수 임계값 | Threshold above which the code generator writes DNN constants to binary data files |
| 주석 포함 | Comments in generated code |
| 주석 스타일 | Comment style in the generated code |
| MATLAB 소스 코드를 주석으로 삽입 | Inclusion of MATLAB source code as comments in generated code |
| MATLAB 소스 코드 주석 라인 번호 | Include line numbers of MATLAB source code as comments in the generated code |
| MATLAB 함수 도움말 텍스트 | MATLAB function help text in generated function banner |
| 요구 사항 요약을 주석으로 삽입 | Include requirements links as comments |
| if-elseif-else 패턴을 switch-case 문으로 변환 | Conversion of if-elseif-else patterns to
switch-case statements |
| 함수 선언에 extern 키워드 유지 | Preservation of the extern keyword in function
declarations |
| 고정소수점 연산 및 2의 거듭제곱이 곱해지는 연산에 부호 있는 왼쪽 시프트 사용 | Replacement of multiplications by powers of two with signed left bitwise shifts |
| 부호 있는 정수에 대한 오른쪽 시프트 허용 | Signed right bitwise shifts in generated code |
| 괄호 | Parenthesization level in the generated code |
| 최대 식별자 길이 | Maximum number of characters in generated identifiers |
| 헤더 가드 스타일 | Style of preprocessor directive in generated code |
| 들여쓰기 스타일 | Style for placement of braces in the generated code |
| 들여쓰기 크기 | Number of characters per indentation level |
| 열 제한 | Maximum number of columns before a line break in the generated code |
| 데이터형 대체 | Data type replacement in generated code |
| 사용자 지정 데이터형 대체 활성화 | Custom names for data types in generated code |
| 외부 헤더 파일에서 사용자 지정 유형 가져오기 | Whether to import type definition from external header files |
| 헤더 파일 | External header files that contain custom type definitions |
| 전역 변수 | Custom identifier format for global variable identifiers |
| 전역 유형 | Custom identifier format for global type identifiers |
| 전역 유형의 필드 이름 | Custom identifier format for field names in global type identifiers |
| 로컬 함수 | Custom identifier format for local function identifiers |
| 로컬 임시 변수 | Custom identifier format for local temporary variable identifiers |
| 상수 매크로 | Custom identifier format for constant macro identifiers |
| EMX 배열 유형 | Custom identifier format for EMX array types |
| EMX 배열 유틸리티 함수 | Custom identifier format for EMX array utility functions |
| 생성된 소스 및 헤더 파일 이름 형식 | File name customization macro |
| 코드 생성 템플릿 파일 | Code generation template for file and function banners |
| 사용할 코드 형식 툴 선택 | Formatting tool for generated code |
| clang 형식 구성 파일 사용 제어 | Control generation of clang-format file |
| C/C++ 컴파일러 디버그 모드 활성화 | C compiler debugging mode |
| 런타임 오류 검사 생성 | Run-time error detection and reporting in generated code |
| 상세 컴파일러 출력값 표시 | Code generation progress display |
| 항상 리포트 생성 | Code generation report |
| MATLAB에서 차이점 보고 | Potential differences reporting |
| 잠재적 데이터형 문제 강조 표시 | Highlighting of potential data type issues in the code generation report |
| 잠재적인 행 우선 문제 강조 표시 | Potential row-major layout issues |
| 묵시적 확장으로 인해 발생할 수 있는 잠재적 문제 강조 표시 | Highlight potential implicit expansion issues |
| coder.loop 함수 사용 시 발생할 수 있는 잠재적 문제 강조 표시 | Highlight potential loop control issues |
| 정적 코드 메트릭 리포트 생성 | Static code metrics report |
| 코드 대체 리포트 생성 | Code replacement report |
| 리포트가 생성된 경우 자동으로 실행 | Automatic open of code generation report |
| 리포트 정보를 변수로 내보내기 | Name of variable containing code generation report information |
| SIL 또는 PIL에 대한 소스 수준 디버그 활성화 | Debugging of generated code during a SIL or PIL execution |
| 상수 입력값 검사 | Constant input checking mode for a SIL or PIL execution |
| 전역 데이터 동기화 | Global data synchronization mode for a SIL or PIL execution |
| 진입점 실행 프로파일링 활성화 | Execution time profiling during a SIL or PIL execution |
| 함수 실행 프로파일링 활성화 | Execution time profiling of functions called within entry-point functions during a SIL or PIL execution |
| 프로파일링 저장 옵션 지정 | Collection and storage of execution-time measurements |
| 진입점 스택 프로파일링 활성화 | Stack usage profiling during a SIL or PIL execution |
| C/C++ 코드 커버리지 활성화 | Analysis of C/C++ code coverage |
| 실행 프로파일링 활성화 | Instrumentation for profiling |
| 코드 대체 라이브러리 | Code replacement library for generated code |
| 내장 FFTW 라이브러리 사용 | Generate code that uses the FFTW library shipped with MATLAB |
| 사용자 지정 FFT 라이브러리 콜백 | Callback class for FFTW library calls |
| 사용자 지정 BLAS 라이브러리 콜백 | BLAS callback class |
| 사용자 지정 LAPACK 라이브러리 콜백 | LAPACK callback class |
| 미리 컴파일된 라이브러리 사용 | Whether to use precompiled libraries in generated code |
| 소스 파일 | 생성된 .c 또는 .cpp 파일의 상단에 표시되는 코드 |
| 헤더 파일 | 생성된 C/C++ 헤더 파일의 상단에 표시되는 사용자 지정 코드 |
| 초기화 함수 | 생성된 초기화 함수에 포함할 사용자 지정 코드 |
| 종료 함수 | 생성된 종료 함수에 표시되는 코드 |
| 추가 include 디렉터리 | Include folders to add to include path for compiling generated code |
| 추가 소스 파일 | Source files to compile and link with the generated code |
| 추가 라이브러리 | Static library files to link with the generated code |
| 코드 생성 후처리 명령 | 빌드 프로세스를 사용자 지정하기 위한 명령 |
| 예약된 이름 | Names that code generator must not use for functions or variables |
| 하드웨어 보드 | Name of hardware board |
| 프로덕션 장치 세부 정보: 장치 공급업체 | Manufacturer of production hardware |
| 프로덕션 장치 세부 정보: 장치 유형 | Type of production hardware |
| 프로덕션 장치 세부 정보: char | Length in bits of the C char data type |
| 프로덕션 장치 세부 정보: short | Length in bits of the C short data type |
| 프로덕션 장치 세부 정보: int | Length in bits of the C int data type |
| 프로덕션 장치 세부 정보: long | Length in bits of the C long data type |
| 프로덕션 장치 세부 정보: long long | Length in bits of the C long long data type |
| 프로덕션 장치 세부 정보: float | Length in bits of the C floating-point data type |
| 프로덕션 장치 세부 정보: double | Length in bits of the C double data type |
| 프로덕션 장치 세부 정보: 머신 워드 | Microprocessor native word size |
| 프로덕션 장치 세부 정보: pointer | Length in bits of pointer data |
| 프로덕션 장치 세부 정보: size_t | Length in bits of size_t data |
| 프로덕션 장치 세부 정보: ptrdiff_t | Length in bits of ptrdiff_t data |
| 프로덕션 장치 세부 정보: 바이트 순서 | Significance of the first byte of a data word |
| 프로덕션 장치 세부 정보: 산술 시프트로 부호 있는 정수에 대한 오른쪽 시프트 수행 | Implementation of signed integer right shift as arithmetic right shift |
| 프로덕션 장치 세부 정보: long long형 사용 | Long long data type support |
| 프로덕션 장치 세부 정보: 최대 아토믹 정수 크기 | Largest atomic integer size for production hardware |
| 프로덕션 장치 세부 정보: 최대 아토믹 부동소수점 크기 | Largest atomic floating-point size for production hardware |
| 프로덕션 장치 세부 정보: 부호 있는 정수 나눗셈의 반올림 방식 | Rounding for division of two signed integers |
| 테스트 장치 세부 정보: 장치 유형 | Type of test hardware |
| 테스트 장치 세부 정보: 장치 공급업체 | Manufacturer of test hardware |
| 테스트 장치 세부 정보: char | Length in bits of the C char data type |
| 테스트 장치 세부 정보: short | Length in bits of the C short data type |
| 테스트 장치 세부 정보: int | Length in bits of the C int data type |
| 테스트 장치 세부 정보: long | Length in bits of the C long data type |
| 테스트 장치 세부 정보: long long | Length in bits of the C long long data type |
| 테스트 장치 세부 정보: float | Length in bits of the C floating-point data type |
| 테스트 장치 세부 정보: double | Length in bits of the C double data type |
| 테스트 장치 세부 정보: 머신 워드 | Microprocessor native word size |
| 테스트 장치 세부 정보: pointer | Length in bits of pointer data |
| 테스트 장치 세부 정보: size_t | Length in bits of size_t data |
| 테스트 장치 세부 정보: ptrdiff_t | Length in bits of ptrdiff_t data |
| 테스트 장치 세부 정보: 바이트 순서 | Significance of the first byte of a data word |
| 테스트 장치 세부 정보: 산술 시프트로 부호 있는 정수에 대한 오른쪽 시프트 수행 | Implementation of signed integer right shift as arithmetic right shift |
| 테스트 장치 세부 정보: long long형 사용 | Long long data type support |
| 테스트 장치 세부 정보: 최대 아토믹 정수 크기 | Largest atomic integer size for test hardware |
| 테스트 장치 세부 정보: 최대 아토믹 부동소수점 크기 | Largest atomic floating-point size for test hardware |
| 테스트 장치 세부 정보: 부호 있는 정수 나눗셈의 반올림 방식 | Rounding for division of two signed integers |
| 툴체인 | Toolchain to use for building a C/C++ library or executable program |
| 사용자 지정 툴체인 옵션 | Custom settings for tools in selected toolchain |
| 빌드 구성 | Compiler optimization or debug settings for toolchain |
| 테스트 하드웨어가 프로덕션 하드웨어와 동일함 | Equivalence of production and target hardware characteristics |
| C++ 네임스페이스 | Namespace name for generated C++ code |
| 인터페이스 스타일 | Interface style for generated C++ code |
| C++ 인터페이스 클래스 이름 | Interface class name for generated C++ code |
| MATLAB 네임스페이스에서 C++ 네임스페이스 생성 | Generate C++ namespaces for MATLAB namespaces |
| MathWorks 코드를 위한 네임스페이스 | Place C++ code generated for MathWorks code in a separate namespace |
| MATLAB 클래스에서 C++ 클래스 생성 | Generate C++ classes for MATLAB classes |
| MATLAB 열거형에서 C++ 열거형 클래스 생성 | Whether to generate C++ enumeration classes for MATLAB enumerations |
| 형변환 모드 | 데이터형 형변환 수준 |
| 상수 폴딩 제한 시간 | Maximum number of instructions to be executed by the constant folder |
| 컴파일타임 재귀 제한 | Maximum number of function specializations for compile-time recursion |
| 초기화 함수 자동 실행 | Automatically run the initialize function |
| 초기화 함수 필요함 | Initialize function generation |
| 종료 함수 필요함 | Terminate function generation |
| 알려진 MISRA 위반에 대한 정당화 사유 주석 생성 | Add annotations to suppress known MISRA/AUTOSAR violations |
| 샘플 메인 생성 | Example C/C++ main file generation |
| 변수 이름 유지 | Variable names to preserve in the generated code |
| 종료 세미콜론이 없는 표현식 에코 | Expression echoing |
| makefile 생성 | Makefile generation |
| 외재적 호출 자동 도입 | Automatic extrinsic function calls |
| 배열 인덱싱 단순화 | Strength reduction optimization |
| 벡터 할당에 memcpy 사용 | Whether to enable memcpy optimization |
| memcpy 임계값(바이트): | Minimum size for memcpy or memset
optimization |
| memset를 사용하여 부동소수점 및 double형을 0.0으로 초기화 | Assignment of float and double zero with memset |
| 상수 입력값 | Constant input checking mode |
| MEX의 빌드 유형에 대해 JIT 컴파일 사용 | Just-in-time (JIT) compilation mode |
| nonfinite이 사용되는 경우 관련 지원 파일 생성 | Generate support files for nonfinite data only if nonfinite data is used |
| 구조체를 진입점 함수에 참조 방식으로 전달 | Pass structures by reference |
| 항상 switch에 대한 default case 생성 | Default case for all switch statements |
| 코드 추적성 활성화 | Traceability in code generation report |
| Embedded Coder 기능 사용 | Whether to use Embedded Coder features |
| 묵시적 확장 활성화 | Implicit expansion capabilities in generated code |
| 자동 병렬화 리포팅 활성화 | Reporting for automatic parallelization of for
loops |
| 런타임 재귀 활성화 | Run-time recursion support |
| 동적 배열 데이터 캐시 | Dynamic array optimization |
| SIL/PIL 세부 정보 표시 | Display communication I/O information during SIL or PIL execution |
| SIL/PIL 프로파일링 메트릭 | PMU metric |
객체
coder.MexCodeConfig | Configuration parameters for MEX function generation from MATLAB code |
coder.CodeConfig | MATLAB 코드에서 C/C++ 코드를 생성하기 위한 구성 파라미터 |
coder.EmbeddedCodeConfig | Configuration parameters for C/C++ code generation from MATLAB code with Embedded Coder |
coder.HardwareImplementation | Hardware-specific configuration parameters for C/C++ code generation from MATLAB code |
coder.hardware | Create hardware board configuration object for C/C++ code generation from MATLAB code |
coder.ReplacementTypes | Configuration parameter to specify custom names for MATLAB built-in data types in C/C++ code generation |
도움말 항목
빌드 구성 기본 사항
- Configure Code Generation Settings
Configure code generation configuration parameters at the command line or in the MATLAB Coder app. - Specify Code Configuration Parameters Interactively
Configure the code generation process by using the Code Generation Settings dialog box.
특정 빌드 옵션
- Understand and Control Partitioning of the Generated Code
Understand how file partitioning method and inlining settings interact to control the partitioning of the generated code. - Change Language Standard Used for Code Generation
The code generator uses the language standard that you specify in the build settings. - Generate Portable Code for Image Filtering Algorithm
Prevent the code generator from using precompiled libraries in order to generate portable code.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)