function LibraGetStarted() % Include Libra SDK/include/matlab interface (language bindings) oldPath = cd(pwd); cd .. cd .. cd .. addpath([pwd '/include/matlab/']); disp('*****************************'); disp('Initializing Libra...'); disp('*****************************'); % Point out /LibraSDK/ root ret = libra_init(pwd, {''}); cd(oldPath); if (ret > 0) exit; end N = 1024; libra_setDefaultDataType(GFLOAT64.value); % warm up (to get accurate timing results) randomValuesGPU = libra_rand(N);randomValuesGPU = libra_rand(N); startTime = libra_GetTime(); % Create 1 million random values using the CPU %randomValuesCPU = rand(N); % Create 1 million random values using the GPU randomValuesGPU = libra_rand(N); time = libra_GetTime() - startTime; disp('Total time (ms) : ');time*1000 end