Skip to content

Fixed a Couple Simple Warnings #2515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions libs/libvtrutil/cmake/modules/configure_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#Figure out the git revision
find_package(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS describe --always --long --dirty
OUTPUT_VARIABLE VTR_VCS_REVISION
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VTR_VCS_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)

if(NOT GIT_DESCRIBE_RETURN_VALUE EQUAL 0)
#Git describe failed, usually this means we
Expand All @@ -18,10 +19,12 @@ if(GIT_FOUND)

#Call again with exclude to get the revision excluding any tags
#(i.e. just the commit ID and dirty flag)
exec_program(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}
ARGS describe --always --long --dirty --exclude '*'
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
RETURN_VALUE GIT_DESCRIBE_RETURN_VALUE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty --exclude '*'
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VTR_VCS_REVISION_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE GIT_DESCRIBE_RETURN_VALUE)

if(NOT GIT_DESCRIBE_RETURN_VALUE EQUAL 0)
#Git describe failed, usually this means we
#aren't in a git repo -- so don't set a VCS
Expand Down
23 changes: 11 additions & 12 deletions vpr/src/route/router_lookahead_extended_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,26 +604,25 @@ float ExtendedMapLookahead::get_expected_cost(
}
}

#ifndef VTR_ENABLE_CAPNPROTO

void ExtendedMapLookahead::read(const std::string& file) {
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
}
void ExtendedMapLookahead::write(const std::string& file) const {
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
}

#else

void ExtendedMapLookahead::read(const std::string& file) {
#ifndef VTR_ENABLE_CAPNPROTO
cost_map_.read(file);

this->src_opin_delays = util::compute_router_src_opin_lookahead(is_flat_);

this->chan_ipins_delays = util::compute_router_chan_ipin_lookahead();
#else // VTR_ENABLE_CAPNPROTO
(void)file;
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::read not implemented");
#endif // VTR_ENABLE_CAPNPROTO
}

void ExtendedMapLookahead::write(const std::string& file) const {
#ifndef VTR_ENABLE_CAPNPROTO
cost_map_.write(file);
#else // VTR_ENABLE_CAPNPROTO
(void)file;
VPR_THROW(VPR_ERROR_ROUTE, "MapLookahead::write not implemented");
#endif // VTR_ENABLE_CAPNPROTO
}

#endif