This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:fall2016:data:projects:dln0 [2016/09/10 16:02] – external edit 127.0.0.1 | haas:fall2016:data:projects:dln0 [2016/10/01 15:29] (current) – [In inc/node.h] wedge | ||
---|---|---|---|
Line 14: | Line 14: | ||
=====Objective===== | =====Objective===== | ||
- | In this project, we take our first opportunity to undergo a complete code re-write of node functionality, | + | In this project, we take our first opportunity to undergo a complete code re-write of node functionality, |
=====Procedure to obtain dln0===== | =====Procedure to obtain dln0===== | ||
- | As this is a rewrite, dln0 is not based on any of the code you have written up to this point. As such, the transition process is slightly different: | + | As this is a rewrite, dln0 is not based on any of the code you have written up to this point. As such, the transition process is slightly different. Two different approaches are outlined below: |
+ | |||
+ | ====In-project transition (Makefile from sll4)==== | ||
<cli> | <cli> | ||
Line 29: | Line 31: | ||
Once you run " | Once you run " | ||
+ | |||
+ | ====grabit==== | ||
+ | Just as we did with the first project in the series, **sln1**, we can also use grabit to obtain this project: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | ERROR: must specify class and project! | ||
+ | example: | ||
+ | grabit discrete matrixadd | ||
+ | |||
+ | Projects available for data: | ||
+ | * dln0 | ||
+ | * sln1 | ||
+ | |||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | So, we can just go ahead and do: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | And voila! Freshly grabbed **dln0** in our ~/src/data/ directory. | ||
=====Project Overview===== | =====Project Overview===== | ||
Line 50: | Line 77: | ||
struct node { | struct node { | ||
union info payload; | union info payload; | ||
- | struct node *after; | + | struct node *there; |
- | struct node *prior; | + | struct node *back; |
}; | }; | ||
Line 65: | Line 92: | ||
</ | </ | ||
- | There is an addition of a "prior" node pointer, to allow connections to our previous neighbors. | + | There is an addition of a "back" node pointer, to allow connections to our previous neighbors. |
The node info element has been changed as well... instead of a singular value, it is now a union by the name of payload, which contains a value entry (a char entry), a data entry (Node pointer), and an other entry (a void pointer). | The node info element has been changed as well... instead of a singular value, it is now a union by the name of payload, which contains a value entry (a char entry), a data entry (Node pointer), and an other entry (a void pointer). | ||
Line 155: | Line 182: | ||
====In inc/ | ====In inc/ | ||
- | Finally we have support.h... this header will contain some information on helper functions utilized in the various unit tests. You really don't need to bother with this... in fact, do not use any of these functions in your implementation. | + | Finally we have support.h... this header will contain some information on helper functions utilized in the various unit tests. You really don't need to bother with this... in fact, do **not** use any of these functions in your implementation. |
====node library==== | ====node library==== | ||
In **src/ | In **src/ |