@@ -123,46 +123,6 @@ static void resizeAndCopy(ICpuGpuVectorPtr& dest,
123
123
}
124
124
}
125
125
126
- static void resizeAndCopy (UserDefinedVectorPtr& dest,
127
- const UserDefinedVectorPtr& src,
128
- bool useGpu,
129
- hl_stream_t stream) {
130
- if (src) {
131
- CHECK (!useGpu) << " not implemented" ;
132
- size_t height = src->size ();
133
- if (!dest) {
134
- dest = std::make_shared<std::vector<void *>>(height);
135
- } else {
136
- dest->resize (height);
137
- }
138
- std::copy_n (src->begin (), height, dest->begin ());
139
- } else {
140
- dest.reset ();
141
- }
142
- }
143
-
144
- static void resizeAndCopy (UserDefinedVectorPtr& dest,
145
- const UserDefinedVectorPtr& src,
146
- int32_t startPos,
147
- int32_t copySize,
148
- bool useGpu,
149
- hl_stream_t stream = HPPL_STREAM_DEFAULT) {
150
- if (src) {
151
- CHECK (!useGpu) << " not implemented" ;
152
- CHECK_LE ((size_t )startPos + copySize, src->size ());
153
-
154
- size_t height = copySize;
155
- if (!dest) {
156
- dest = std::make_shared<std::vector<void *>>(height);
157
- } else {
158
- dest->resize (height);
159
- }
160
- std::copy_n (src->begin () + startPos, height, dest->begin ());
161
- } else {
162
- dest.reset ();
163
- }
164
- }
165
-
166
126
static void resizeAndCopy (SVectorPtr& dest,
167
127
const SVectorPtr& src,
168
128
bool useGpu,
@@ -223,7 +183,6 @@ void Argument::resizeAndCopyFrom(const Argument& src,
223
183
false /* useGpu */ ,
224
184
stream);
225
185
}
226
- resizeAndCopy (udp, src.udp , useGpu, stream);
227
186
resizeAndCopy (strs, src.strs , useGpu, stream);
228
187
frameWidth = src.frameWidth ;
229
188
frameHeight = src.frameHeight ;
@@ -255,7 +214,6 @@ int32_t Argument::resizeAndCopyFrom(const Argument& src,
255
214
resizeAndCopy (value, src.value , startRow, copySize, useGpu, stream);
256
215
resizeAndCopy (grad, src.grad , startRow, copySize, useGpu, stream);
257
216
resizeAndCopy (ids, src.ids , startRow, copySize, useGpu, stream);
258
- resizeAndCopy (udp, src.udp , startRow, copySize, useGpu, stream);
259
217
resizeAndCopy (strs, src.strs , startRow, copySize, useGpu, stream);
260
218
return copySize;
261
219
} else {
@@ -268,7 +226,6 @@ int32_t Argument::resizeAndCopyFrom(const Argument& src,
268
226
resizeAndCopy (value, src.value , startRow, copyFeatureSize, useGpu, stream);
269
227
resizeAndCopy (grad, src.grad , startRow, copyFeatureSize, useGpu, stream);
270
228
resizeAndCopy (ids, src.ids , startRow, copyFeatureSize, useGpu, stream);
271
- resizeAndCopy (udp, src.udp , startRow, copySize, useGpu, stream);
272
229
resizeAndCopy (sequenceStartPositions,
273
230
src.sequenceStartPositions ,
274
231
startSeq,
0 commit comments