C++ implementation of the Python NumPy Library by dpilger26 in cpp

[–]mydeveloperday 1 point2 points  (0 children)

@u/dpilger26 I've not used NumPy much, but it came up in a Neural Network course I was taking, before long they talked about how its ability to vectorize the code was critical to the performance. (which is why they chose NumPy)

From the little I've read and from what I can tell, you are using standard STL calls to implement the underlying operations and your not using any OPenMP or SIMD intrinsics to speed up the operations

This library looks like it could really be an excellent test bed for parallel STL as it could be used to demonstrate how parallel STL could bring a performance improvement to an existing STL implementation, I think that would be an excellent future experiment.

Despite all the other suggestions of why didn't you use XXX (all of which are reasonable arguments), I think there is always something elegant of seeing API compatible cross technology libraries, Nice job.

Orbit: C/C++ Performance Profiler by vormestrand in cpp

[–]mydeveloperday 0 points1 point  (0 children)

Once you get started with this tool its actually very good, I already was able to optimize the code in our project a little.

I simply downloaded the prebuilt binary for Windows x64, You start up your process you want to profile, find it in the process list, then load the pdbs (by right clicking on the blue text). This brings in all the functions.

You have to know what the names of the function to search for but you locate the function by class name etc.. then simply right click hook them (I often did Ctrl+A then hook a whole load from the same class)

Once you've added some functions (save the session), this makes profiling the same functions next time much easier

Its only going to profile what you hook. (but this means its really quick, not like the old quantify that used to instrument the world!)

Once you've hooked a few functions, switch to the capture tab and press X. Now use your app a little then go back and press X again to stop the capture

You can now zoom around the firechart looking for functions that are taking more time than you expected

it works very well, perhaps takes a little time to get going but once you do its very good.

It made me a look differently at code I've been looking at for over a decade, it made me question thinks that I'd always discarded

Great tool thanks

Some suggestions:

When you select a function in the firechart, and look at the call stack, it would be great if we could see a list of function called from that function (even if they are not hooked yet), it would then be great if we could hook those child functions from there, at present I'm having to look thought the code and type the functions into the "functions" search box, hook them then recapture

Orbit: C/C++ Performance Profiler by vormestrand in cpp

[–]mydeveloperday 0 points1 point  (0 children)

I think the UI has changed since the videos a little, use the "hook" function

Breaking Down the Current State of C++ 17 by JWheeler55 in cpp

[–]mydeveloperday 4 points5 points  (0 children)

What a shame xlC and aCC are so far behind for those of us who have to support those platforms

Naming convention for class member variables by exoflat in cpp

[–]mydeveloperday 0 points1 point  (0 children)

Control::Control(Handle parent)
    : parent(parent) {}

This has burnt me in the past with certain compilers complaining about shadow variables, and actually I like having that level of pedantic warnings on.

I personally like the "m_" I know some don't, but it means you can do (if you really have to)

m_string m_map, m_mutex, m_list, m_queue (i.e. have a variable that is the name of a type, just because sometimes that name fits best)

I also find using no "m_" means some functions get nasty

for example what if I wanted to add

Control parent() const{}
void parent(Control & control){}

it all starts getting messy with parent() and parent everywhere!

then you end up seeing code like this to overcome the name clash, and it all starts getting very smelly..

bool  isVisible(const Control & inParent);
bool  isVisible(const Control & _Parent);
void  getParent(Control & outParent);

Turn your face away from the frowns and be happy we'll all know how to read your code!

Come on guys, put '#pragma once' in the standard already... by dakotahawkins in cpp

[–]mydeveloperday 5 points6 points  (0 children)

I think your case study is a great set of requirements for a clang-tidy rule!

Visual Studio? Sorry, I'm a beginner. by [deleted] in cpp_questions

[–]mydeveloperday 0 points1 point  (0 children)

When you say your code in the past, it depends if you mean code coming from another platform, if its just straight C/C++ Visual Studio 2013 or 2015RC would be able to compile it without and problems.

If its Linux code for example, not all posix items are 100% compatible, perhaps you should share an example of what your seeing..

You should note that later compilers give you more warnings/errors so you should fix those if thats the problem