C++
jerry173985
这个作者很懒,什么都没留下…
展开
-
Another Makefile compiler commands inside a project
Original repo doing wavelet transformation project:https://github.com/ircam-ismm/waveletg++ tests_filterbank.cpp tests_paul.cpp tests_morlet.cpp main_wavelets_tests.cpp -o test -std=c++11 -I ../dependencies/catch -I ../dependencies/armanpy -I ../src ../b原创 2021-07-15 15:20:57 · 83 阅读 · 0 评论 -
creating std::complex<double>
std::vector<double> a{ 1.0, 2.0, 3.0 };std::vector<double> b{ 4.0, 5.0, 6.0 };std::vector<std::complex<double>> cvec( a.size() );std::transform( a.begin(), a.end(), b.begin(), cvec.begin(), []( double da, double db ) { return原创 2021-07-13 05:34:33 · 323 阅读 · 0 评论 -
G++ compiler flag -W -D explain
-W 显示警告,但是只显示编译器认为会出现错误的警告。-Wall 显示all警告在编译时, -W和-Wall选项一起使用!-D means #define something as in C++ main code-D sometimes can be added with some other paths useful for the code (executable)("-g" compile flag for use with the debugger) Inserting the `g’原创 2021-07-13 05:24:58 · 277 阅读 · 0 评论 -
Makefile C++ for MacOS
CC = clang++BIN = rnnOBJS = rnn.o main.oRM = rm -rvfCXXFLAGS += -std=c++14 -Wall -v -g -I /usr/local/include/eigen3 all: $(BIN)$(BIN): $(OBJS) $(CC) $(CXXFLAGS) $(OBJS) -o $(BIN)clean: $(RM) $(OBJS) $(BIN)原创 2021-05-21 09:53:35 · 193 阅读 · 0 评论 -
Pytorch c++ cmake file and train model
A Minimal CmakeFile.txt ( with libtorch C++ ): find_packagecmake_minimum_required(VERSION 3.14 FATAL_ERROR)project(linear-regression VERSION 1.0.0 LANGUAGES CXX)find_package(Torch REQUIRED)set(EXECUTABLE_NAME linear-regression)add_executable(${EX原创 2021-05-21 09:09:38 · 210 阅读 · 0 评论