# get results.dox
resultsname = filename.split('intro.dox',1)[0] + 'results.dox'
- # try to open the '.cc' file, otherwise try to open a '.cu' file
- try:
- fstep = open(stepname)
- except IOError:
- stepname = stepname[:-2] + 'cu'
- fstep = open(stepname)
+ # open the '.cc' file:
+ fstep = open(stepname)
lines += fstep.readlines()
fstep.close()
#
# The output of this file consists of three numbers per line, showing
# date source-lines test-lines
-# displaying the number of lines of code in .h and .cc files (and .cu and
-# .cuh files for CUDA), but excluding files in contributed libraries. The
-# resulting output can be piped into a data file and then be visualized
-# by importing into a spreadsheet, or using the following GNUPLOT script:
+# displaying the number of lines of code in .h and .cc files, but excluding
+# files in contributed libraries. The resulting output can be piped into a data
+# file and then be visualized by importing into a spreadsheet, or using the
+# following GNUPLOT script:
#
# set xdata time
# set timefmt "%Y-%m-%d"
date=$(git log --date=short --format="%ad" -n 1)
- files_source=$(find . -name '*.h' -or -name '*.cc' -or -name '*.cu' -or -name '*.cuh' -type f | \
+ files_source=$(find . -name '*.h' -or -name '*.cc' -type f | \
grep -E -i -v '(tests|boost|umfpack|bundled)/')
lines_source=$(cat $files_source | wc -l)
# Process all source and header files:
#
-process_changed "tests include source examples cmake/scripts contrib/python-bindings" ".*\.(cc|h|cu|cuh)" format_file
+process_changed "tests include source examples cmake/scripts contrib/python-bindings" ".*\.(cc|h)" format_file
process_changed "source" ".*\.inst.in" format_inst
#
#
process_changed "tests include source examples cmake/scripts contrib/python-bindings" \
- ".*\.(cc|h|cu|cuh|inst.in|output.*|cmake)" fix_permissions
+ ".*\.(cc|h|inst.in|output.*|cmake)" fix_permissions
process_changed "tests include source examples cmake/scripts contrib/python-bindings" \
- ".*\.(cc|h|cu|cuh|inst.in|cmake)" dos_to_unix
+ ".*\.(cc|h|inst.in|cmake)" dos_to_unix
#
# Removing trailing whitespace
#
process_changed "tests include source examples cmake/scripts contrib/python-bindings doc" \
- ".*\.(cc|h|cu|cuh|html|dox|txt)" remove_trailing_whitespace
+ ".*\.(cc|h|html|dox|txt)" remove_trailing_whitespace
#
# Ensure only a single newline at end of files
#
process_changed "tests include source examples cmake/scripts contrib/python-bindings doc" \
- ".*\.(cc|h|cu|cuh|html|dox|txt)" ensure_single_trailing_newline
+ ".*\.(cc|h|html|dox|txt)" ensure_single_trailing_newline
# Process all source and header files:
#
-process "tests include source examples contrib/python-bindings" ".*\.(cc|h|cu|cuh)" format_file
+process "tests include source examples contrib/python-bindings" ".*\.(cc|h" format_file
process "source" ".*\.inst.in" format_inst
#
#
process "tests include source examples cmake/scripts contrib/python-bindings" \
- ".*\.(cc|h|cu|cuh|inst.in|output.*|cmake)" fix_permissions
+ ".*\.(cc|h|inst.in|output.*|cmake)" fix_permissions
process "tests include source examples cmake/scripts contrib/python-bindings" \
- ".*\.(cc|h|cu|cuh|inst.in|cmake)" dos_to_unix
+ ".*\.(cc|h|inst.in|cmake)" dos_to_unix
#
# Removing trailing whitespace
#
process "tests include source examples cmake/scripts contrib/python-bindings doc" \
- ".*\.(cc|h|cu|cuh|html|dox|txt)" remove_trailing_whitespace
+ ".*\.(cc|h|html|dox|txt)" remove_trailing_whitespace
#
# Ensure only a single newline at end of files
#
process "tests include source examples cmake/scripts contrib/python-bindings doc" \
- ".*\.(cc|h|cu|cuh|html|dox|txt)" ensure_single_trailing_newline
+ ".*\.(cc|h|html|dox|txt)" ensure_single_trailing_newline
parser.add_argument("-b", "--clang-format-binary", metavar="PATH",
default=distutils.spawn.find_executable("clang-format"))
- parser.add_argument("--regex", default="*.cc,*.h,*.cu,*.cuh",
+ parser.add_argument("--regex", default="*.cc,*.h",
help="Regular expression (regex) to filter files on "
"which clang-format is applied.")
print " <li> <a href=\"#CommProg\" class=bold>The commented program</a>\n";
-my $file_extension;
-
-if (-f "$cmake_source_dir/examples/$step/$step.cc")
-{
- $file_extension = cc;
-}
-
-if (-f "$cmake_source_dir/examples/$step/$step.cu")
-{
- $file_extension = cu;
-}
-
-system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2toc", "$cmake_source_dir/examples/$step/$step.$file_extension";
+system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2toc", "$cmake_source_dir/examples/$step/$step.cc";
print
"</ol></td><td width=\"50%\" valign=\"top\"><ol>
print " * <a name=\"CommProg\"></a>\n";
print " * <h1> The commented program</h1>\n";
-system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2doxygen", "$cmake_source_dir/examples/$step/$step.$file_extension";
+system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2doxygen", "$cmake_source_dir/examples/$step/$step.cc";
system $^X, "$cmake_source_dir/doc/doxygen/scripts/create_anchors", "$cmake_source_dir/examples/$step/doc/results.dox";
print
"<a name=\"PlainProg\"></a>
<h1> The plain program</h1>
-\@include \"$step.$file_extension\"
+\@include \"$step.cc\"
*/
";
# Skip header lines at the top of the file, such as copyright notices and
-# license information, if the file is a step-xx.cc or .cu tutorial. Here, xx
+# license information, if the file is a step-xx.cc tutorial. Here, xx
# is either a number like step-32 or a number plus a letter like step-12b.
# Don't skip for other files such as code-gallery files
if ($ARGV[0] =~ /step-\d+[a-z]?.[cc|cu]/)
FOREACH(_step ${_deal_ii_steps})
GET_FILENAME_COMPONENT(_step "${_step}" NAME)
- IF(EXISTS "${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cu")
- SET(_FILE_EXTENSION "cu")
- ELSE()
- SET(_FILE_EXTENSION "cc")
- ENDIF()
-
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION}
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc
COMMAND ${PERL_EXECUTABLE}
ARGS
${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2plain
- < ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION}
- > ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION}
+ < ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc
+ > ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc
DEPENDS
${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2plain
- ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION}
+ ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc
VERBATIM
)
${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/intro2toc
${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/create_anchors
${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/program2doxygen
- ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.${_FILE_EXTENSION}
+ ${CMAKE_SOURCE_DIR}/examples/${_step}/${_step}.cc
${CMAKE_SOURCE_DIR}/examples/${_step}/doc/intro.dox
${CMAKE_SOURCE_DIR}/examples/${_step}/doc/results.dox
)
ADD_CUSTOM_TARGET(tutorial_${_step}
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/${_step}.h
- ${CMAKE_CURRENT_BINARY_DIR}/${_step}.${_FILE_EXTENSION}
+ ${CMAKE_CURRENT_BINARY_DIR}/${_step}.cc
COMMENT
"Building doxygen input file for tutorial program <${_step}>"
)
FILES_MATCHING PATTERN "*.h"
)
-IF(DEAL_II_WITH_CUDA)
- INSTALL(DIRECTORY deal.II
- DESTINATION ${DEAL_II_INCLUDE_RELDIR}
- COMPONENT library
- FILES_MATCHING PATTERN "*.cuh"
- )
-ENDIF()
-
#
# and don't forget to install all generated header files, too:
#
FILE(GLOB _header
${CMAKE_SOURCE_DIR}/include/deal.II/base/*.h
- ${CMAKE_SOURCE_DIR}/include/deal.II/base/*.cuh
)
DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header} ${_inst}
#include "matrix_vector_mf.h"
-// forward declare this function. will be implemented in .cu files
+// forward declare this function. will be implemented in .cc files
template <int dim, int fe_degree, typename Number>
void
test();
STRING(TOLOWER ${build_name} _build_lowercase)
SET(_target ${test_basename}.${_build_lowercase})
LIST(APPEND ALL_TESTS "${_target}")
- IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${test_basename}.cc")
- ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cc)
- ELSE()
- ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cu)
- ENDIF()
+ ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${test_basename}.cc)
DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${build_name})
IF("${mpi_run}" STREQUAL "")