mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
36 lines
No EOL
650 B
C++
36 lines
No EOL
650 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
#include <arrayfire.h>
|
|
|
|
using namespace af;
|
|
|
|
void MatMult_Bench();
|
|
void Pi_Bench();
|
|
void Vectorize_Bench();
|
|
void Demo();
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
try {
|
|
int device = 0;
|
|
setDevice(device);
|
|
info();
|
|
|
|
Demo();
|
|
Pi_Bench();
|
|
MatMult_Bench();
|
|
Vectorize_Bench();
|
|
} catch (af::exception& e) {
|
|
printf("\nError: %s\n", e.what());
|
|
} catch (...) {
|
|
printf("\nUnknown error\n");
|
|
}
|
|
printf("\nEnd");
|
|
#ifdef WIN32 // pause in Windows
|
|
printf(". Hit enter...");
|
|
fflush(stdout);
|
|
getchar();
|
|
#endif
|
|
} |