Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Send me pics of your dog

Julieta Martinez una-dinosauria

💭
Send me pics of your dog
View GitHub Profile
@una-dinosauria
una-dinosauria / findmin.m
Created Feb 26, 2016
find min in matlab
View findmin.m
clear
tic;
matrix = rand( 256, 1e6, 'single' );
matrix_d = gpuArray( matrix );
toc
tic;
for i = 1:60
[~, b] = min( matrix, [], 1 );
View findmin.cpp
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <random>
#define N 1000000
#define H 256
#define TRIALS 60
float matrix [N][H];
View find_min.jl
function fm()
n::Int32 = 1000000
h::Int32 = 256
trials::Int32 = 15*4
@time begin
matrix = rand(Float32, h,n)
mins = zeros( Int32, n )