필터 지우기
필터 지우기

how to convert this code into gpuArray?

조회 수: 1 (최근 30일)
Anita pawar
Anita pawar 2017년 7월 24일
답변: KSSV 2017년 7월 24일
clc;
clear all;
close all;
tic
k = 1:0.5:10;
a = 1:0.5:5;
n1 = numel(k);
n2 = numel(a);
numpl = repmat(k, 1, n2)';
denpl = repmat([ones(n2,1), a.', zeros(n2,1)] ,n1, 1);
w=[.1,.5,.8,1,2,8,15,50,100];
P=freqcp(numpl,denpl,w);
% plot templates
plottmpl(w,w,P);
time=toc

답변 (1개)

KSSV
KSSV 2017년 7월 24일
It depends on the functions freqcp and plotmpl ....you see in those functions any function lies in these list http://in.mathworks.com/help/distcomp/run-built-in-functions-on-a-gpu.html. If matches, then if the input is a class of gpuarray, automatically it runs on gpu.

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by