length
병렬 객체 배열의 길이
설명
예제
task 객체의 태스크 개수
작업 객체 J
에 몇 개의 태스크가 할당되었는지 검토합니다.
작업을 만들고 난수의 태스크를 할당하여 10×10 확률 행렬을 생성합니다.
c = parcluster(); % Use default profile j = createJob(c); num_Tasks = randi([1 50],1); for idx = 1:num_Tasks task_idx = createTask(j, @rand, 1, {10,10}); end
태스크 j.Tasks
로 구성된 객체 배열을 검토합니다.
L = length(j.Tasks)
L = 41
입력 인수
obj
— 객체 배열
객체 | 객체 배열
검토할 객체로, 단일 병렬 객체 또는 병렬 객체 배열로 지정됩니다. 병렬 객체는 distributed
객체, codistributed
객체, gpuArray
객체, Composite
객체, parallel.Job
객체 또는 parallel.Task
객체일 수 있습니다.
예: L = length(distributed(1:10))
버전 내역
R2006a 이전에 개발됨
참고 항목
distributed
| codistributed
| gpuArray
| Composite
| createJob
| createTask
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)