Consider the following code fragment:
Identify all data dependencies (potential data hazards) in the given code snippet within one loop iteration. Let the number of true data dependencies be $\mathrm{X}$, the number of anti-dependencies be $\mathrm{Y}, \&$ the number of output dependencies be $\text{Z}$.
What is $\mathrm{X}+2 \mathrm{Y}+3 \mathrm{Z}?$
@Philosophical_Virus can u list what are WAR dependencies here?
Finding ALL Data Dependencies in the Program: Finding RAW, WAW, WAR Dependencies
$ \large{\colorbox{yellow}{Detailed video solution of this question with direct time stamp}}$ All India Mock Test 3 - Solutions Part 2
@Deepak Poonia Sir, In Question within brackets it is written potential data hazards, but only RAW dependencies cause hazards. Why we are counting all dependencies?
@Deepak Poonia Sir , @GO Classes sir , @GO Classes Support Sir please answer above question . I am also having same doubt.
@Archie19, @Shivani Shukla
The pipeline details are not given. Also, data dependencies depend only on the given program, not on the machine Or pipeline. Data dependencies are all potential data hazards, whether they actually cause hazard or not on a particular pipeline. WAW & WAR dependencies can cause hazards in out-of-order pipelines.
Pipeline Complete Playlist: GO Classes Pipeline Complete Course
$$ \mathrm{X}=3 ; \mathrm{Y}=2 ; \mathrm{Z}=1 \text {. } $$ True Data Dependencies (within one loop iteration):
64.3k questions
77.9k answers
244k comments
80.0k users