Created
February 26, 2016 01:19
-
-
Save una-dinosauria/ba89a2eda16263c21b88 to your computer and use it in GitHub Desktop.
find min in matlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear | |
tic; | |
matrix = rand( 256, 1e6, 'single' ); | |
matrix_d = gpuArray( matrix ); | |
toc | |
tic; | |
for i = 1:60 | |
[~, b] = min( matrix, [], 1 ); | |
end; | |
toc; | |
tic; | |
for i = 1:60 | |
[~, b] = min( matrix_d, [], 1 ); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment