Week 18 Day 2 - Hyperthreading
The theme for today was a final review, where I went over all the topics in the class. I introduced two new things, though:
1) First, how to get two registers worth of utility out of a single register, by using bit masks and shifting. You can use the lower half as a loop counter, and the upper half as a regular variable, just watch out for over and underflowing. I then talked about when it's appropriate to do trix like this.
2) We also talked about hyperthreading. Hyperthreading is when one core pretends to be two cores, because even with our best efforts to minimize pipeline stalls, some pipeline stalls are unavoidable. So by having a second "core" appear, the OS can schedule a different task to run on that core, and that processes instructions will fill in any gaps in the pipeline that the first process left behind.
3) We reviewed classes being just an array with different offsets for each member variable, and how the order of member variables in a class can make a class substantially larger due to padding issues. There's also (https://docs.microsoft.com/en-us/cpp/cpp/cpp-bit-fields?view=msvc-160) to look at if you want more fine grained control over the bits going into your classes.
Finally, some advice as you move to bigger and better things -
1) Always work on your competency. Not only is mastering something good for the spirit, but if you keep up with the latest and greatest in technology then you won't be obsoleted as you get older. A lot of C++ professors out there still haven't learned C++11, and it's been 10 years at this point.
2) Always work on your social skills. The better you can get along with other people, and the better you can understand people the better off you'll be in life. Study human psychology. Put yourself in situations where you have to present and give speeches. Work on small talk with random people. All of these are skills that can be built up, and are worth being built up. Read Dale Carnegie's How to Win Friends and Influence People.
3) Finally, work on your business skills. Accounting, legal, marketing, taxes, all of these things are important, and will cost you dearly if you mess them up. Getting at least a layman's understanding of how they work is incredibly important.
It's been great knowing you guys for the past two years, and if you want some extra innings, check out game development some time. It's fun and gives you an opportunity to practice your skills some more! Peace!
Other Videos By Bill Kerney
2021-07-12 | Week 2 Day 1 - Advanced Materials |
2021-07-09 | Week 1 Day 2 - A Little Advanced C++... |
2021-07-09 | Week 1 Lecture 4 - Materials in UE4 |
2021-07-09 | Week 1 Day 3 - Lighting |
2021-07-07 | Week 1 Day 1 - Voroni Diagrams |
2021-07-07 | Week 1 Lecture 2 - Intro to Unreal Engine |
2021-07-07 | Week 1 Day 1 - Welcome to IS50A |
2021-05-15 | Week 18 - Bounding Volume Hierarchies |
2021-05-14 | Week 18 Day 3 - Use Cases |
2021-05-13 | Week 18 Day 2 - Final Presentations |
2021-05-13 | Week 18 Day 2 - Hyperthreading |
2021-05-12 | Week 18 Day 2 - Graph Adjacency Lists |
2021-05-12 | CSCI 41 Study Session: BSTs |
2021-05-12 | Week 17 Day 2 - The Development Process and AI |
2021-05-11 | Week 18 Day 1 - Shaders, Rasterization |
2021-05-11 | Week 18 Day 1 - Sockets Programming |
2021-05-10 | Week 18 Day 1 - EC, BST deletes, Graphs |
2021-05-08 | Week 17 - Making a 2.5D Game (Wolfenstein-style) from Scratch |
2021-05-08 | Week 17 Day 3 - Circular Arrays |
2021-05-07 | Week 17 Day 2 - Being a Sysadmin |
2021-05-05 | Week 17 Day 2 - Threads and Sockets Part II |