Skip to content

Conversation

@EtiShkol
Copy link
Collaborator

@EtiShkol EtiShkol commented Aug 8, 2024

No description provided.

@EtiShkol EtiShkol requested a review from Tehilla77 August 8, 2024 18:25
@@ -0,0 +1,12 @@
#pragma once
#include "CachePrefetchManagement.h"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the include
move range struct

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done
we didnt move range struct

bool IsRangeInLoadingAPI(Range_t rangeForSearch);

//function that get range to remove, find it and delete it from loadingArray
void RemoveRangeFromLoadingRangesAPI(Range_t rangeForRemove);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove API
add prefetch to begining

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,125 @@
#pragma once
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include API

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

#include <stdbool.h>
#include <stdlib.h> // For malloc, free
#define COLLECTION_SIZE 4
#define RANGE_LENGTH 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportedRangeLengh/width

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#define RANGE_WIDTH 1
#define INIT_COUNTER_LEN 2
#define SIZE_OF_ENOUGH_SEQ 3
#define INIT_POINT { -1,-1 }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initPointValue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#define SIZE_OF_ENOUGH_SEQ 3
#define INIT_POINT { -1,-1 }
#define COUNT_OF_RANGE_TO_READING_AHEAD 2
#define INIT_RANGE {INIT_POINT,INIT_POINT}
Copy link
Collaborator Author

@EtiShkol EtiShkol Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initRangeVal

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#define INIT_RANGE {INIT_POINT,INIT_POINT}

//struct that representing a point in a plane
typedef struct Point_s
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove spaces

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Range_t nextExpectedRange;
Range_Direction_t dir;
int counterUse;
int counterLength;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

length

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


//control block of the program
typedef struct SequenceCollectionCtrlBlk_s {
SeqRangeInfo_t* seqRangeInfoArray[COLLECTION_SIZE];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectionSize->max Supported parallel range

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

//control block of the program
typedef struct SequenceCollectionCtrlBlk_s {
SeqRangeInfo_t* seqRangeInfoArray[COLLECTION_SIZE];
Range_t singleRangesArray[COLLECTION_SIZE];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create struct of singleRangesArray

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done:)))

#pragma region Range Functions

//function that init the range
Range_t GetDefaultRange();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add (void)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

//function that init the range
Range_t GetDefaultRange();

//function that get direction, range and num, and return the next range by the direction, double the num
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain more the counter

int GetLastUsedSequence();

//external function of insert new range
void InsertNewRangeAPI(Range_t range);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if remove

void InsertNewRangeAPI(Range_t range);

//internal function that called by the external function-InsertNewRangeAPI
TYPE_OF_ACTION_THAT_ACCURED_IN_INSERT_t InsertNewRange(Range_t range);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insert action type
internal

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

int IsRangeCreateNewSequence(Range_t range);

//function that get index of seq that update now and up the counter use of the others seqs
void UpCounterUseOfSeqsOthers(int index);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

increase all LRU conter except specific counter

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

bool CheckValidationOfRange(Range_t range);
#pragma endregion

void INIT();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to API
add prefecth to name

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


void INIT();

void SendLoadingRangeToAPI(Range_t range);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants