From 869379020dc81f8cab4d0e563cd63131c5fc1e48 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Wed, 19 Feb 2014 11:44:08 +0100 Subject: [PATCH] some filename changes --- examples_ptx/ptxcc/ptxcc | 19 ----------------- examples_ptx/ptxcc/{ptxc.cpp => ptxcc.cpp} | 24 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 19 deletions(-) delete mode 100755 examples_ptx/ptxcc/ptxcc rename examples_ptx/ptxcc/{ptxc.cpp => ptxcc.cpp} (91%) diff --git a/examples_ptx/ptxcc/ptxcc b/examples_ptx/ptxcc/ptxcc deleted file mode 100755 index 25840e68..00000000 --- a/examples_ptx/ptxcc/ptxcc +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PTXSRC=$1__tmp_ptx.ptx -PTXCU=$1___tmp_ptx.cu -PTXSH=$1___tmp_ptx.sh - -NVCCPARM=${@:2} - -DEPTX=dePTX -NVCC=nvcc - -$(cat $1 | sed 's/\.b0/\.b32/g' > $PTXSRC) && -$DEPTX < $PTXSRC > $PTXCU && -$NVCC -arch=sm_35 -dc $NVCCPARM -dryrun $PTXCU 2>&1 | \ - sed 's/\#\$//g'| \ - awk '{ if ($1 == "LIBRARIES=") print $1$2; else if ($1 == "cicc") print "cp '$PTXSRC'", $NF; else print $0 }' > $PTXSH && -sh $PTXSH - -# rm $PTXCU $PTXSH diff --git a/examples_ptx/ptxcc/ptxc.cpp b/examples_ptx/ptxcc/ptxcc.cpp similarity index 91% rename from examples_ptx/ptxcc/ptxc.cpp rename to examples_ptx/ptxcc/ptxcc.cpp index 9d8b462a..759640b2 100644 --- a/examples_ptx/ptxcc/ptxc.cpp +++ b/examples_ptx/ptxcc/ptxcc.cpp @@ -6,6 +6,30 @@ #include #include "PTXParser.h" +/* + * The C++ code below is based on the following bash-script: + #!/bin/sh + + PTXSRC=$1__tmp_ptx.ptx + PTXCU=$1___tmp_ptx.cu + PTXSH=$1___tmp_ptx.sh + + NVCCPARM=${@:2} + + DEPTX=dePTX + NVCC=nvcc + + $(cat $1 | sed 's/\.b0/\.b32/g' > $PTXSRC) && + $DEPTX < $PTXSRC > $PTXCU && + $NVCC -arch=sm_35 -dc $NVCCPARM -dryrun $PTXCU 2>&1 | \ + sed 's/\#\$//g'| \ + awk '{ if ($1 == "LIBRARIES=") print $1$2; else if ($1 == "cicc") print "cp '$PTXSRC'", $NF; else print $0 }' > $PTXSH && + sh $PTXSH + + # rm $PTXCU $PTXSH + * + */ + static char lRandomAlNum() { const char charset[] =