Files
rocm-systems/bin/hipconvertinplace.sh
T

25 lines
602 B
Bash
Raw Normal View History

2016-01-26 20:14:33 -06:00
#!/bin/bash
2017-03-29 16:36:46 +03:00
#usage : hipconvertinplace.sh DIRNAME [hipify options] [--] [clang options]
2016-01-26 20:14:33 -06:00
2017-03-29 16:36:46 +03:00
#hipify "inplace" all code files in specified directory.
2016-01-26 20:14:33 -06:00
# This can be quite handy when dealing with an existing CUDA code base since the script
2016-01-28 20:16:43 -06:00
# preserves the existing directory structure.
2016-01-26 20:14:33 -06:00
SCRIPT_DIR=`dirname $0`
SEARCH_DIR=$1
2017-03-29 16:36:46 +03:00
hipify_args=''
while (( "$#" )); do
shift
if [ "$1" != "--" ]; then
hipify_args="$hipify_args $1"
else
shift
break
fi
done
clang_args="$@"
$SCRIPT_DIR/hipify-clang -inplace -print-stats $hipify_args `$SCRIPT_DIR/findcode.sh $SEARCH_DIR` -- -x cuda $clang_args