summaryrefslogtreecommitdiff
path: root/src/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory.cpp')
-rw-r--r--src/memory.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/memory.cpp b/src/memory.cpp
index 7454a2a..fc82a13 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -95,7 +95,7 @@ Block_Loop(memory *Memory, property_channel *Property, uint32 TotalCount, int *H
*HasIncremented = 0;
(*Index)++;
}
- uint8 *Occupied = (uint8 *)Bezier_LookupAddress(Memory, Property, *Index, 0);
+ uint8 *Occupied = (uint8 *)Bezier_LookupAddress(Memory, Property->Block_Bezier_Index, *Index, 0);
if (*Occupied) {
*HasIncremented = 1;
(*CurrentCount)++;
@@ -291,7 +291,16 @@ void Memory_Fill(uint8 *Address_Write, uint8 *Address_Read, uint64 WriteSize, ui
void Arbitrary_Zero(uint8 *Address_Write, uint64 Size)
{
+ __m256i Zero256 = _mm256_setzero_si256();
uint64 i = 0;
+ if (Size > 64 && InstructionMode == instruction_mode_avx) {
+ uint64 Size_Lane = Size - (Size % 64);
+ while (i < Size_Lane) {
+ _mm256_storeu_si256((__m256i *)(Address_Write + i), Zero256);
+ _mm256_storeu_si256((__m256i *)(Address_Write + i + 32), Zero256);
+ i += 64;
+ }
+ }
while (i < Size) {
*(Address_Write + i) = 0;
i++;