From d7600871ade2f8c76b2dceb9fcdb5b45d9be5763 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Wed, 17 Jul 2019 10:28:54 +0300 Subject: [PATCH] [HIPIFY][bash] Make 'find' sorted by extension (#1231) + Source files are the first to go. It is needed for in-place hipification in order to avoid errors with included but already hipified header files. + More extensions support for batch processing. [ROCm/clr commit: ba87bcba5c7c18587e689d8141f7dc6222e5b61b] --- projects/clr/hipamd/bin/findcode.sh | 5 ++++- projects/clr/hipamd/bin/finduncodep.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/bin/findcode.sh b/projects/clr/hipamd/bin/findcode.sh index d092d6bf8d..dbdb768d75 100755 --- a/projects/clr/hipamd/bin/findcode.sh +++ b/projects/clr/hipamd/bin/findcode.sh @@ -2,4 +2,7 @@ SEARCH_DIRS=$@ -find $SEARCH_DIRS -name '*.cpp' -o -name '*.h' -o -name '*.cu' -o -name '*.cuh' -o -name '*.c' -o -name '*.hpp' -o -name '*.inl' +find $SEARCH_DIRS -name '*.cu' +find $SEARCH_DIRS -name '*.cpp' -o -name '*.cxx' -o -name '*.c' -o -name '*.cc' +find $SEARCH_DIRS -name '*.cuh' +find $SEARCH_DIRS -name '*.h' -o -name '*.hpp' -o -name '*.inc' -o -name '*.inl' -o -name '*.hxx' -o -name '*.hdl' diff --git a/projects/clr/hipamd/bin/finduncodep.sh b/projects/clr/hipamd/bin/finduncodep.sh index 509f6e37b7..298d05d7ec 100755 --- a/projects/clr/hipamd/bin/finduncodep.sh +++ b/projects/clr/hipamd/bin/finduncodep.sh @@ -2,4 +2,4 @@ SEARCH_DIR=$1 -find $SEARCH_DIR -not -name '*.cpp' -and -not -name '*.h' -and -not -name '*.cu' -and -not -name '*.cuh' -and -not -name '*.c' -and -not -name '*.hpp' +find $SEARCH_DIR -not -name '*.cu' -and -not -name '*.cpp' -and -not -name '*.cxx' -and -not -name '*.c' -and -not -name '*.cc' -and -not -name '*.cuh' -and -not -name '*.h' -and -not -name '*.hpp' -and -not -name '*.inc' -and -not -name '*.inl' -and -not -name '*.hxx' -and -not -name '*.hdl'