Skip to content

Commit 0a9cee6

Browse files
committed
changes
1 parent 4fa4c45 commit 0a9cee6

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

Packages/MIES/MIES_Cache.ipf

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
///
1717
/// Usage:
1818
/// * Write a key generator function returning a string
19-
/// The parameters to CA_GenKey() must completely determine the wave you will later store.
19+
/// The parameters to CA_GenerateKeyFancyCalc() must completely determine the wave you will later store.
2020
/// The appended version string to the key allows you to invalidate old keys
2121
/// if the algorithm creating the wave changes, but all input stays the same.
2222
///
2323
/// \rst
2424
/// .. code-block:: igorpro
2525
///
26-
/// Function/S CA_GenKey(string input)
26+
/// Function/S CA_GenerateKeyFancyCalc(string input)
2727
///
28-
/// return HashString("", input) + "Version 1"
28+
/// return HashString("", input) + ":FancyCalc:Version 1"
2929
/// End
3030
/// \endrst
3131
///
@@ -39,7 +39,7 @@
3939
///
4040
/// Function/WAVE MyFancyCalculation(string input)
4141
///
42-
/// string key = CA_GenKey(input)
42+
/// string key = CA_GenerateKeyFancyCalc(input)
4343
///
4444
/// WAVE/Z result = CA_TryFetchingEntryFromCache(key)
4545
///
@@ -561,35 +561,6 @@ threadsafe Function/S CA_CalculateFetchEpochsKey(WAVE numericalvalues, WAVE text
561561

562562
return hv + ":Version 1"
563563
End
564-
565-
Constant HASH_XX3_64 = 102
566-
567-
threadsafe Function/S HashNumber(string previousHash, variable num)
568-
569-
string str = num2strHighPrec(num, precision = MAX_DOUBLE_PRECISION)
570-
571-
return HashString(previousHash, str)
572-
End
573-
574-
threadsafe Function/S HashString(string previousHash, string str)
575-
576-
ASSERT_TS(!IsEmpty(str), "str can not be empty")
577-
578-
#if IgorVersion() >= 10
579-
return Hash(previousHash + str, HASH_XX3_64)
580-
#endif
581-
582-
return num2istr(StringCRC(str2num(previousHash), str)) // NOLINT
583-
End
584-
585-
threadsafe Function/S HashWave(string previousHash, WAVE/Z wv)
586-
587-
#if IgorVersion() >= 10
588-
return previousHash + WaveHash(wv, HASH_XX3_64)
589-
#endif
590-
591-
return num2istr(WaveCRC(str2num(previousHash), wv)) // NOLINT
592-
End
593564
///@}
594565

595566
/// @brief Make space for one new entry in the cache waves

0 commit comments

Comments
 (0)