You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought this was the Mac-savvy version of the code... but it's failing right out of the box for me on the first allocation (around line 350 of word2vec.c), because the conditional compilation doesn't include a Mac case:
#ifdef _MSC_VER
syn0 = _aligned_malloc((long long)vocab_size * layer1_size * sizeof(real), 128);
#elif defined linux
a = posix_memalign((void **)&syn0, 128, (long long)vocab_size * layer1_size * sizeof(real));
#endif
Neither _MSC_VER nor linux is defined, so we simply don't allocate anything.
Just wondering if I have missed some obvious solution, or whether I need to add a Mac case (or maybe a generic case, simply using calloc?) to each such block.
The text was updated successfully, but these errors were encountered:
Actually, as a test, just adding #define linux 1 to the top of the file seems to fix it (i.e., the posix functions seem to apply equally well to the Mac). But I'm still not certain that's the proper solution.
I thought this was the Mac-savvy version of the code... but it's failing right out of the box for me on the first allocation (around line 350 of word2vec.c), because the conditional compilation doesn't include a Mac case:
Neither _MSC_VER nor linux is defined, so we simply don't allocate anything.
Just wondering if I have missed some obvious solution, or whether I need to add a Mac case (or maybe a generic case, simply using calloc?) to each such block.
The text was updated successfully, but these errors were encountered: