This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/4] Add libgomp plugin for Intel MIC
- From: Maxim Blumental <bvmaks at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Ilya Verbin <iverbin at gmail dot com>, Thomas Schwinge <thomas at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Mon, 3 Aug 2015 13:23:59 +0300
- Subject: Re: [PATCH 3/4] Add libgomp plugin for Intel MIC
- Authentication-results: sourceware.org; auth=none
- References: <20141021171323 dot GA47586 at msticlxl57 dot ims dot intel dot com> <20141021172413 dot GD47586 at msticlxl57 dot ims dot intel dot com> <878uaq68fn dot fsf at kepler dot schwinge dot homeip dot net> <20150723185029 dot GA48606 at msticlxl57 dot ims dot intel dot com> <20150724080106 dot GH1780 at tucnak dot redhat dot com> <1437747492 dot 15571 dot 87 dot camel at surprise> <CACy_Q+xHdro9EZT0H0z7pMGaFKZooyg++mN2fVGjKoM0W8wAXw at mail dot gmail dot com>
Could you probably review the patch, please?
2015-07-28 18:42 GMT+03:00 Maxim Blumental <bvmaks@gmail.com>:
> Applied the idea with python script alternative. Review, please.
>
> 2015-07-24 17:18 GMT+03:00 David Malcolm <dmalcolm@redhat.com>:
>> On Fri, 2015-07-24 at 10:01 +0200, Jakub Jelinek wrote:
>>> #!/usr/bin/python
>>> import sys
>>> with open(sys.argv[1],"rb") as f:
>>> nextblock = f.read(12)
>>> while 1:
>>> block = nextblock
>>> nextblock = f.read(12)
>>> if block == "":
>>> break
>>> str = ""
>>> for ch in block:
>>> if str == "":
>>> str = " "
>>> else:
>>> str += ", "
>>> if ord(ch) < 10:
>>> str += "0x0" + chr(ord('0')+ord(ch))
>>> elif ord(ch) < 16:
>>> str += "0x0" + chr(ord('a')+ord(ch)-10)
>>> else:
>>> str += hex(ord(ch))
>>> if nextblock != "":
>>> str += ","
>>> print str
>>>
>>> python ./xxd.py $< >> $@
>>> does the same thing as
>>> cat $< | xxd -include >> $@
>>> (CCing David as python expert, my python knowledge is limited and
>>> 15 years old, not sure how portable this is (python 2 vs. python 3,
>>> and
>>> even python 2 minimal versions)).
>>
>> It doesn't work with Python 3 for various reasons ("print" syntax, and
>> str vs bytes issues).
>>
>> I'm attaching a version which works with both Python 2 and Python 3
>> (2.7.5 and 3.3.2 were the versions I tried).
>>
>> It ought to work with much older python 2 versions (as your script
>> appears to), but I don't have them handy.
>>
>> Presumably it would need a license header and some descriptive comments.
>>
>> (snip)
>>
>> Dave
>
>
>
> --
>
>
> ---------------------
> Sincerely yours,
> Maxim Blumental
--
---------------------
Sincerely yours,
Maxim Blumental