ROCm / roctracer

ROCm Tracer Callback/Activity Library for Performance tracing AMD GPUs
https://rocm.docs.amd.com/projects/roctracer/en/latest/
Other
69 stars 30 forks source link

Update gen_ostream_ops.py #32

Closed rkebichi closed 4 years ago

rkebichi commented 4 years ago

Changes to create basic_ostream_ops.h and {apiname}_ostream_ops.h (used to create one file only)

rkebichi commented 4 years ago

I applied the changes we agreed on thru email.

eshcherb commented 4 years ago

I have two questions:

  1. Why you have two options '-in' and '-includes' while it seems both of them provides just parsed headers?
  2. Why do you use API name as my understanding the generated operators should be just overloaded/selected by printed type?
rkebichi commented 4 years ago

I agree with you on item 1, we do not need both -in and -includes , using -in suffices. I verified it with the latest build and it worked. For your question 2, I mimicked hsa which has "roctracer::hsa_support::output_streamer". I checked it the latest changes to my branch, so it should be visible on this PR.

rkebichi commented 4 years ago

As agreed, I have added gcc pre-processor step to CMakeLists.txt to overcome the issue with CppHeaderParser not processing define directives.