このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
reset
GPU デバイスをリセットし、そのメモリを消去する
説明
例
GPU デバイスのリセット
GPU デバイスを選択して gpuArray
を作成します。
D = gpuDevice;
M = eye(4,"gpuArray")
M = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
デバイスをリセットします。
reset(D);
デバイスがまだ選択されていることを示します。
D
D = CUDADevice with properties: Name: 'Quadro P620' Index: 2 ComputeCapability: '6.1' SupportsDouble: 1 GraphicsDriverVersion: '511.79' DriverModel: 'WDDM' ToolkitVersion: 11.2000 MaxThreadsPerBlock: 1024 MaxShmemPerBlock: 49152 (49.15 KB) MaxThreadBlockSize: [1024 1024 64] MaxGridSize: [2.1475e+09 65535 65535] SIMDWidth: 32 TotalMemory: 2147287040 (2.15 GB) AvailableMemory: 1614636238 (1.61 GB) CachePolicy: 'balanced' MultiprocessorCount: 4 ClockRateKHz: 1354000 ComputeMode: 'Default' GPUOverlapsTransfers: 1 KernelExecutionTimeout: 1 CanMapHostMemory: 1 DeviceSupported: 1 DeviceAvailable: 1 DeviceSelected: 1
gpuArray
の変数名がまだ MATLAB ワークスペースに存在することを示します。
whos
Name Size Bytes Class Attributes D 1x1 8 parallel.gpu.CUDADevice M 4x4 0 gpuArray
gpuArray
を表示してみます。
M
M = Data no longer exists on the GPU.
変数を消去します。
clear M
入力引数
gpudev
— GPU デバイス
GPU デバイス
GPU デバイス。現在選択されているデバイスを表す GPUDevice
オブジェクトとして指定します。
ヒント
GPU デバイスをリセットすると、そのデバイス上の配列またはカーネルを表すすべての変数は無効となり、これらを消去または再定義しなければなりません。
バージョン履歴
R2012a で導入
参考
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)