-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
printing blitz arrays via GDB #164
Comments
Would the use of templates address your problem?
On Sun, May 10, 2020 at 03:53 kishore1947 ***@***.***> wrote:
We would like your inputs on a couple of queries related to blitz usage.
It is very useful that Blitz supports printing any multidimensional arrays
with a very simple statement as below
std::cout<<blitz_array_name<<std::endl
We are working on a large codebase, and we would like to print the array
contents during the debug sessions as well.
We use GDB for debugging. We tried an option as below
a) overloaded functions for different type of arrays which we like to
print, as below
void printBlitz(blitz::Array<bool, 1> &in)
{
std::cout<<in<<std::endl;
}
void printBlitz(blitz::Array<int, 1> &in)
{
std::cout<<in<<std::endl;
}
and so on
on the gdb debugger, we can simply call this function as below
(gdb) call printBlitz(blitz_array_name)
The issue now is we use many types of multi-dimensional arrays (including
complex), we have to make overloads for every possible array
*If you have any suggestions to directly print the blitz contents via GDB,
please let us know.*
This will simplify our debug to a large extent.
Any suggestion is highly appreciated
Thank you so much in advance !!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#164>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOVY56MPVLFLFFVJHFMSLTRQZMQNANCNFSM4M5EIRRA>
.
--
Elizabeth Fischer, she/her
University of Alaska, Geophysical Institute
cell: 617-308-0436
UA is an AA/EO employer and educational institution and prohibits illegal
discrimination against any individual: www.alaska.edu/nondiscrimination.
|
Hi,
Thanks a lot for the response !
I tried doing this but no luck, also it is not very straight forward to
call template functions via GDB, but is still ok.
Could you please help provide an example with the same code as I gave, by
writing a template function to print a blitz array
Thanks a lot !
Thanks and Best Regards,
Kishore
On Sun, May 10, 2020 at 2:05 PM Elizabeth Fischer <[email protected]>
wrote:
… Would the use of templates address your problem?
On Sun, May 10, 2020 at 03:53 kishore1947 ***@***.***>
wrote:
> We would like your inputs on a couple of queries related to blitz usage.
> It is very useful that Blitz supports printing any multidimensional
arrays
> with a very simple statement as below
> std::cout<<blitz_array_name<<std::endl
>
> We are working on a large codebase, and we would like to print the array
> contents during the debug sessions as well.
> We use GDB for debugging. We tried an option as below
>
> a) overloaded functions for different type of arrays which we like to
> print, as below
>
> void printBlitz(blitz::Array<bool, 1> &in)
> {
> std::cout<<in<<std::endl;
> }
>
> void printBlitz(blitz::Array<int, 1> &in)
> {
> std::cout<<in<<std::endl;
> }
>
>
> and so on
> on the gdb debugger, we can simply call this function as below
>
> (gdb) call printBlitz(blitz_array_name)
>
> The issue now is we use many types of multi-dimensional arrays (including
> complex), we have to make overloads for every possible array
>
> *If you have any suggestions to directly print the blitz contents via
GDB,
> please let us know.*
>
> This will simplify our debug to a large extent.
> Any suggestion is highly appreciated
>
> Thank you so much in advance !!
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#164>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAOVY56MPVLFLFFVJHFMSLTRQZMQNANCNFSM4M5EIRRA
>
> .
>
--
Elizabeth Fischer, she/her
University of Alaska, Geophysical Institute
cell: 617-308-0436
UA is an AA/EO employer and educational institution and prohibits illegal
discrimination against any individual: www.alaska.edu/nondiscrimination.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#164 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPMQNHOAXR4LRNDKNSJUMTRQZROXANCNFSM4M5EIRRA>
.
--
What lies behind you and what lies before you are tiny compared to what
lies within you !
|
Perhaps some points from this discussion might be relevant: #43 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We would like your inputs on a couple of queries related to blitz usage.
It is very useful that Blitz supports printing any multidimensional arrays with a very simple statement as below
std::cout<<blitz_array_name<<std::endl
We are working on a large codebase, and we would like to print the array contents during the debug sessions as well.
We use GDB for debugging. We tried an option as below
a) overloaded functions for different type of arrays which we like to print, as below
and so on
on the gdb debugger, we can simply call this function as below
(gdb) call printBlitz(blitz_array_name)
The issue now is we use many types of multi-dimensional arrays (including complex), we have to make overloads for every possible array
If you have any suggestions to directly print the blitz contents via GDB, please let us know.
This will simplify our debug to a large extent.
Any suggestion is highly appreciated
Thank you so much in advance !!
The text was updated successfully, but these errors were encountered: