Giter VIP home page Giter VIP logo

Comments (8)

rodrigob avatar rodrigob commented on August 28, 2024

Clang reports

clang++-3.5 -c -DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -fopenmp -I/usr/local/cuda-6.5/targets/x86_64-linux/include -o nnet_cpu.o src/nnet/nnet_impl.cpp
In file included from src/nnet/nnet_impl.cpp:4:
In file included from src/nnet/nnet_impl-inl.hpp:6:
In file included from src/nnet/./nnet.h:12:
In file included from src/nnet/../utils/io.h:9:
In file included from ./dmlc-core/include/dmlc/io.h:342:
./dmlc-core/include/dmlc/./serializer.h:61:11: error: no member named 'Write' in 'dmlc::serializer::UndefinedSerializerFor<char>'
    Else::Write(strm, data);
    ~~~~~~^
./dmlc-core/include/dmlc/./serializer.h:300:7: note: in instantiation of member function 'dmlc::serializer::IfThenElse<false, dmlc::serializer::PODStringHandler<char>,
      dmlc::serializer::UndefinedSerializerFor<char>, std::basic_string<char> >::Write' requested here
    ::Write(strm, data);
      ^
./dmlc-core/include/dmlc/io.h:348:27: note: in instantiation of member function 'dmlc::serializer::Handler<std::basic_string<char> >::Write' requested here
  serializer::Handler<T>::Write(this, data);
                          ^
src/nnet/./nnet_config.h:137:10: note: in instantiation of function template specialization 'dmlc::Stream::Write<std::basic_string<char> >' requested here
      fo.Write(node_names[i]);

from dmlc-core.

tqchen avatar tqchen commented on August 28, 2024

This should be solved by specialization here
https://github.com/dmlc/dmlc-core/blob/master/include/dmlc/type_traits.h#L50

I am not sure what was going on in your compiler as my compiler successfully compiles it. Can you change it to DMLC_DECLARE_TRAITS(is_pod, char, true); and see if it solves the problem?

from dmlc-core.

rodrigob avatar rodrigob commented on August 28, 2024

Neither g++-4.8 nor clang++-3.5 compiled the code out of the box.

Adding the line DMLC_DECLARE_TRAITS(is_pod, char, true); fixed the issue.

from dmlc-core.

tqchen avatar tqchen commented on August 28, 2024

Thanks!

from dmlc-core.

tqchen avatar tqchen commented on August 28, 2024

Do you might open a PR for this? Even though this is a minor fix:)

Thanks!

from dmlc-core.

rodrigob avatar rodrigob commented on August 28, 2024

I could but I am not sure if it would break compilations on platforms where int8_t == char.

from dmlc-core.

tqchen avatar tqchen commented on August 28, 2024

Seems int8_t and char should be different things, according to the standard.

from dmlc-core.

rodrigob avatar rodrigob commented on August 28, 2024

PR #26 created.

from dmlc-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.