Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <shogun/lib/Map.h>
- #include <shogun/io/SGIO.h>
- #include <shogun/base/init.h>
- #include <shogun/lib/common.h>
- #include <shogun/mathematics/Math.h>
- #include <shogun/lib/Time.h>
- using namespace shogun;
- #define SIZE 6
- void print_message(FILE* target, const char* str)
- {
- fprintf(target, "%s", str);
- }
- int main(int argc, char** argv)
- {
- init_shogun(&print_message, &print_message, &print_message);
- int v[200000];
- for (int i=0; i<200000; i++)
- {
- v[i]=CMath::random(0,200000);
- }
- CMap<int32_t, int32_t>* map = new CMap<int32_t, int32_t>(200000/1024, 200000/1024);
- CTime t;
- for (int i=0; i<200000; i++)
- {
- map->add(i, v[i]);
- }
- t.cur_time_diff(true);
- SG_UNREF(map);
- exit_shogun();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement