Skip to content

Instantly share code, notes, and snippets.

@ibayer
Last active May 4, 2017 21:22
Show Gist options
  • Save ibayer/7484fa620de10228ab4473453b1fe38f to your computer and use it in GitHub Desktop.
Save ibayer/7484fa620de10228ab4473453b1fe38f to your computer and use it in GitHub Desktop.
Test fastFM2 static lib
#include <iostream>
#include "../fastFM/fastfm.h"
using namespace std;
using namespace fastfm;
int main(int argc, char** argv) {
cout << endl << "[ii] Little test" << endl;
const int l = 2;
static const int size = 4;
double* tmp_array = new double[size];
double tmp = 4;
Model* m = new Model();
m->add_parameter(&tmp);
m->add_parameter(tmp_array, size);
Data* d = new Data();
d->add_prediction(size, tmp_array);
delete d;
delete m;
delete[] tmp_array;
cout << endl << "successfully completed :)" << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment