Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
anagainaru committed Aug 20, 2024
1 parent cc2f4ea commit f3c1462
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions source/adios2/toolkit/derived/Function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@ T *ApplyOneToOne(Iterator inputBegin, Iterator inputEnd, size_t dataSize,
return outValues;
}

template <class T>
T *ApplyOneToOneOnce(T *inputData, size_t dataSize, std::function<T(T)> compFct)
{
T *outValues = (T *)malloc(dataSize * sizeof(T));
if (outValues == nullptr)
{
helper::Throw<std::invalid_argument>("Derived", "Function", "ApplyOneToOneOnce",
"Error allocating memory for the derived variable");
}
for (size_t i = 0; i < dataSize; i++)
{
T data = *(reinterpret_cast<T *>(inputData + i));
outValues[i] = compFct(data);
}
return outValues;
}

inline size_t returnIndex(size_t x, size_t y, size_t z, const size_t dims[3])
{
return z + y * dims[2] + x * dims[2] * dims[1];
Expand Down

0 comments on commit f3c1462

Please sign in to comment.