starpu_check_pthread.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. #
  3. # StarPU --- Runtime system for heterogeneous multicore architectures.
  4. #
  5. # Copyright (C) 2017 CNRS
  6. #
  7. # StarPU is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation; either version 2.1 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # StarPU is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. #
  16. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. dirname=$(dirname $0)
  18. sgrep="grep --exclude-dir=.svn --exclude-dir=.git --binary-files=without-match"
  19. macros=$(grep define $dirname/../../../include/starpu_thread_util.h | grep "define STARPU" | awk -F'(' '{print $1}' |awk '{print $2}')
  20. for m in $macros
  21. do
  22. func=$(echo $m | tr '[A-Z]' '[a-z]')
  23. echo processing $func
  24. pthread=$(echo $func | sed 's/starpu_//')
  25. $sgrep -rsl $func
  26. echo
  27. $sgrep -rs $pthread | grep -v $func
  28. read
  29. done