| 144 | |
| 145 | template <typename SrcArrayT> |
| 146 | void operator()(SrcArrayT* array, const char* description) |
| 147 | { |
| 148 | if (array == nullptr || this->DstBuffer.Get() == nullptr) |
| 149 | { |
| 150 | return; |
| 151 | } |
| 152 | const auto values = vtk::DataArrayValueRange(array); |
| 153 | vtkNew<vtkAOSDataArrayTemplate<DestT>> data; |
| 154 | for (const auto& value : values) |
| 155 | { |
| 156 | data->InsertNextValue(value / this->Denominator); |
| 157 | } |
| 158 | const std::size_t nbytes = data->GetNumberOfValues() * sizeof(DestT); |
| 159 | this->WGPUConfiguration->WriteBuffer( |
| 160 | this->DstBuffer, 0, data->GetPointer(0), nbytes, description); |
| 161 | } |
| 162 | }; |
| 163 | } |
| 164 |
nothing calls this directly
no test coverage detected