Skip to content

Commit

Permalink
Update simple.hpp
Browse files Browse the repository at this point in the history
Remove optimizations, they don't work anyway
  • Loading branch information
dentalfloss1 authored Feb 16, 2024
1 parent e89a650 commit c7478b1
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions src/formats/simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,9 @@ class SIMPLEProcessor : virtual public PacketProcessor {

int chan = 0;
int nelem = 256;
//cout << pkt->src << ", " << pkt->nsrc << endl;
//cout << pkt->nchan << endl;
for( ; chan<nelem; ++chan ) {
/* #if defined BF_AVX_ENABLED && BF_AVX_ENABLED
_mm256_store_si256(reinterpret_cast<__m256i*>(&out[pkt->src + pkt->nsrc*chan]),
_mm256_loadu_si256(reinterpret_cast<const __m256i*>(&in[chan])));
#else*/
// #if defined BF_SSE_ENABLED && BF_SSE_ENABLED
// const unaligned128_type* dsrc = (const unaligned128_type*) &in[chan];
// aligned128_type* ddst = (aligned128_type*) &out[chan];
//
// _mm_store_si128(reinterpret_cast<__m128i*>(ddst),
// _mm_loadu_si128(reinterpret_cast<const __m128i*>(dsrc))); // Problem HERE?
// _mm_store_si128(reinterpret_cast<__m128i*>(ddst+1),
// _mm_loadu_si128(reinterpret_cast<const __m128i*>(dsrc+1)));
// #else
::memcpy(&out[chan],
&in[chan], sizeof(otype));
// #endif
// #endif
}
for( ; chan<nelem; ++chan ) {
::memcpy(&out[chan],&in[chan], sizeof(otype));
}
}

inline void blank_out_source(uint8_t* data,
Expand All @@ -124,22 +106,8 @@ class SIMPLEProcessor : virtual public PacketProcessor {
otype* __restrict__ aligned_data = (otype*)data;
for( int t=0; t<nseq; ++t ) {
for( int c=0; c<nelem; ++c ) {
/* #if defined BF_AVX_ENABLED && BF_AVX_ENABLED
_mm256_store_si256(reinterpret_cast<__m256i*>(&aligned_data[src + nsrc*(c + nelem*t)]),
_mm256_setzero_si256());
#else*/
// #if defined BF_SSE_ENABLED && BF_SSE_ENABLED
// aligned128_type* ddst = (aligned128_type*) &aligned_data[src + nsrc*(c + nelem*t)];
//
// _mm_store_si128(reinterpret_cast<__m128i*>(ddst),
// _mm_setzero_si128());
// _mm_store_si128(reinterpret_cast<__m128i*>(ddst+1),
// _mm_setzero_si128());
// #else
::memset(&aligned_data[src + nsrc*(c + nelem*t)],
0, sizeof(otype));
// #endif
//#endif
}
}
}
Expand Down

0 comments on commit c7478b1

Please sign in to comment.