Skip to content

Commit

Permalink
Temporarily remove memory_op porting
Browse files Browse the repository at this point in the history
  • Loading branch information
Critsium-xy committed Oct 25, 2024
1 parent 262ce2a commit c5ecb4f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions source/module_base/module_device/memory_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,9 @@ struct resize_memory_op<FPTYPE, base_device::DEVICE_CPU>
{
if (arr != nullptr)
{
#ifdef __DSP
free_ht(arr);
#else
free(arr);
#endif
}
#ifdef __DSP
arr = (FPTYPE*)malloc_ht(sizeof(FPTYPE) * size, GlobalV::MY_RANK);
#else
arr = (FPTYPE*)malloc(sizeof(FPTYPE) * size);
#endif
std::string record_string;
if (record_in != nullptr)
{
Expand Down Expand Up @@ -104,11 +96,7 @@ struct delete_memory_op<FPTYPE, base_device::DEVICE_CPU>
{
void operator()(const base_device::DEVICE_CPU* dev, FPTYPE* arr)
{
#ifdef __DSP
free_ht(arr);
#else
free(arr);
#endif
}
};

Expand Down

0 comments on commit c5ecb4f

Please sign in to comment.