std::unordered_map

74 views
Skip to first unread message

Alex

unread,
Mar 25, 2013, 2:56:32 AM3/25/13
to graph...@googlegroups.com
Hi,

Does GraphLab support a user-defined vertex_type which has std::unordered_map as a member? Do i need to compile this in a different way?

Thanks,
Alex 

Joseph Gonzalez

unread,
Mar 25, 2013, 3:02:21 AM3/25/13
to graph...@googlegroups.com
Hi Alex,

This is supported in the GraphLab API (and pretty common).  However, you will need to make sure you implement the load and save functions as in:



Joey

--
You received this message because you are subscribed to the Google Groups "GraphLab API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to graphlabapi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex

unread,
Apr 19, 2013, 2:53:10 AM4/19/13
to graph...@googlegroups.com
Hi,

I get this error when I use std::unordered_map.

/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options

How do I overcome this error?

Thanks,
Alex

Chidananda Sridhar

unread,
Apr 19, 2013, 1:58:55 PM4/19/13
to graph...@googlegroups.com
Hi,

I am getting this error too. How do we enable the -std=c++0x or -std=gnu++0x compiler options?

Thanks,
Chidananda

Yucheng Low

unread,
Apr 19, 2013, 2:04:35 PM4/19/13
to graph...@googlegroups.com
Hi,

You can turn it on with ./configure --c++11
However, we have not tested this exhaustively.
A suitable alternative is to just use the boost unordered_map which does the same thing.

#include <boost/unordered_map>

We obtain all of boost as a dependency, so you can just use it directly.

Yucheng
Reply all
Reply to author
Forward
0 new messages