Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Nov 11, 2019
1 parent 94032f5 commit f71321f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -54,7 +54,7 @@ if(BUILD_SHARED_LIBS AND (WIN32 OR CYGWIN) AND (GINKGO_BUILD_TESTS OR GINKGO_BUI
option(GINKGO_CHECK_PATH "Tell Ginkgo to check if the environment variable PATH is available for this build." ON)
set(GINKGO_WINDOWS_SHARED_LIBRARY_RELPATH "windows_shared_library" CACHE STRING
"Set Ginkgo's shared library relative path in windows. Current default is `windows_shared_library`. \
This absoulte path ${PROJECT_BINARY_DIR}/GINKGO_WINDOWS_SHARED_LIBRARY_RELPATH must be in the environment variable PATH.")
This absolute path ${PROJECT_BINARY_DIR}/GINKGO_WINDOWS_SHARED_LIBRARY_RELPATH must be in the environment variable PATH.")
set(GINKGO_WINDOWS_SHARED_LIBRARY_PATH ${PROJECT_BINARY_DIR}/${GINKGO_WINDOWS_SHARED_LIBRARY_RELPATH})
else()
set(GINKGO_CHANGED_SHARED_LIBRARY FALSE)
Expand Down
10 changes: 5 additions & 5 deletions benchmark/utils/general.hpp
Expand Up @@ -360,17 +360,17 @@ double compute_max_relative_norm(vec<ValueType> *result,
answer->compute_norm2(lend(answer_norm));
auto neg_one = gko::initialize<vec<ValueType>>({-1.0}, exec);
result->add_scaled(lend(neg_one), lend(answer));
auto absoulte_norm =
auto absolute_norm =
vec<ValueType>::create(exec, gko::dim<2>{1, answer->get_size()[1]});
result->compute_norm2(lend(absoulte_norm));
result->compute_norm2(lend(absolute_norm));
auto host_answer_norm =
clone(answer_norm->get_executor()->get_master(), answer_norm);
auto host_absoulte_norm =
clone(absoulte_norm->get_executor()->get_master(), absoulte_norm);
auto host_absolute_norm =
clone(absolute_norm->get_executor()->get_master(), absolute_norm);
double max_relative_norm = 0;
for (gko::size_type i = 0; i < host_answer_norm->get_size()[1]; i++) {
max_relative_norm =
std::max(host_absoulte_norm->at(0, i) / host_answer_norm->at(0, i),
std::max(host_absolute_norm->at(0, i) / host_answer_norm->at(0, i),
max_relative_norm);
}
return max_relative_norm;
Expand Down

0 comments on commit f71321f

Please sign in to comment.