|
|
@ -139,7 +139,8 @@ class PowerTensor : public Primitive |
|
|
|
{ |
|
|
|
public: |
|
|
|
xarray<real, 3> tensor; |
|
|
|
SparkStack<real>* sparkStackPtr; |
|
|
|
|
|
|
|
// SparkStack<real>* sparkStackPtr;
|
|
|
|
|
|
|
|
void print() override { std::cout << "Power" << std::endl; } |
|
|
|
|
|
|
@ -151,7 +152,8 @@ public: |
|
|
|
{ |
|
|
|
tensor.ext_ = ext_; |
|
|
|
tensor.data_ = nullptr; |
|
|
|
sparkStackPtr = algoim_spark_alloc_heap(real, tensor); |
|
|
|
algoim_spark_alloc(real, tensor); |
|
|
|
// sparkStackPtr = algoim_spark_alloc_heap(real, tensor);
|
|
|
|
xarrayInit(tensor); |
|
|
|
} |
|
|
|
|
|
|
@ -159,10 +161,10 @@ public: |
|
|
|
|
|
|
|
~PowerTensor() |
|
|
|
{ |
|
|
|
if (sparkStackPtr) { |
|
|
|
algoim_spark_release_heap(sparkStackPtr); |
|
|
|
sparkStackPtr = nullptr; |
|
|
|
} |
|
|
|
// if (sparkStackPtr) {
|
|
|
|
// algoim_spark_release_heap(sparkStackPtr);
|
|
|
|
// sparkStackPtr = nullptr;
|
|
|
|
// }
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|