이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
GPU CUDA 및 MEX 프로그래밍
고급 GPU CUDA 및 MEX 프로그래밍을 사용하여 코드 실행 속도 더욱 향상
함수
주요 함수
mexcuda | GPU 연산을 위해 MEX 함수 컴파일 |
parallel.gpu.CUDAKernel | PTX 및 CU 코드에서 GPU CUDA 커널 객체 만들기 |
feval | Evaluate kernel on GPU |
setConstantMemory | Set some constant memory on GPU |
C 함수
mxGPUCopyFromMxArray | Copy mxArray to mxGPUArray |
mxGPUCopyGPUArray | Duplicate (deep copy) mxGPUArray object |
mxGPUCopyImag | Copy imaginary part of mxGPUArray |
mxGPUCopyReal | Copy real part of mxGPUArray |
mxGPUCreateComplexGPUArray | Create complex GPU array from two real gpuArrays |
mxGPUCreateFromMxArray | Create read-only mxGPUArray object from input mxArray |
mxGPUCreateGPUArray | Create mxGPUArray object, allocating memory on GPU |
mxGPUCreateMxArrayOnCPU | Create mxArray for returning CPU data to MATLAB with data from GPU |
mxGPUCreateMxArrayOnGPU | Create mxArray for returning GPU data to MATLAB |
mxGPUDestroyGPUArray | Delete mxGPUArray object |
mxGPUGetClassID | mxClassID associated with data on GPU |
mxGPUGetComplexity | Complexity of data on GPU |
mxGPUGetData | Raw pointer to underlying data |
mxGPUGetDataReadOnly | Read-only raw pointer to underlying data |
mxGPUGetDimensions | mxGPUArray dimensions |
mxGPUGetNumberOfDimensions | Size of dimension array for mxGPUArray |
mxGPUGetNumberOfElements | Number of elements on GPU for array |
mxGPUIsSame | Determine if two mxGPUArrays refer to same GPU data |
mxGPUIsSparse | Determine if mxGPUArray contains sparse GPU data |
mxGPUIsValidGPUData | Determine if mxArray is pointer to valid GPU data |
mxGPUSetDimensions | Modify number of dimensions and size of each dimension |
mxIsGPUArray | Determine if mxArray contains GPU data |
mxInitGPU | Initialize MATLAB GPU library on currently selected device |
클래스
주요 클래스
CUDAKernel | Kernel executable on GPU |
C 클래스
mxGPUArray | Type for MATLAB gpuArray |
도움말 항목
- GPU에서 CUDA 또는 PTX 코드 실행하기
CU 코드에서 CUDA® 커널 객체를 생성하거나 GPU Coder™를 사용하여 CUDA 호환 소스 코드, 라이브러리 및 실행 파일을 컴파일하려면 CUDA 툴킷을 설치해야 합니다.
- CUDA 코드가 포함된 MEX 함수 실행하기
다른 MEX 파일과 마찬가지로 CUDA 코드를 포함하는 MEX 파일에는
mexFunction
이라는 단일 진입점이 있습니다.
추천 예제
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)