- Timestamp:
- Jan 29, 2019, 1:14:21 AM (6 years ago)
- Branches:
- feature/crepe_org
- Children:
- 3ff9654
- Parents:
- 3ac1426
- Location:
- src/ai
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/tensor.c
r3ac1426 rcc74a29 235 235 #endif 236 236 } 237 238 void aubio_tensor_copy(aubio_tensor_t *s, aubio_tensor_t *t) 239 { 240 if (!aubio_tensor_have_same_shape(s, t)) { 241 AUBIO_ERR("tensor: not copying source tensor %s", 242 aubio_tensor_get_shape_string(s)); 243 AUBIO_ERR(" to destination tensor %s", 244 aubio_tensor_get_shape_string(t)); 245 return; 246 } 247 AUBIO_MEMCPY(t->buffer, s->buffer, s->size); 248 } -
src/ai/tensor.h
r3ac1426 rcc74a29 160 160 const char_t *aubio_tensor_get_shape_string(aubio_tensor_t *t); 161 161 162 /** compute matrix multiplication A x B = C 163 164 \param a left tensor 165 \param b right tensor 166 \param c output tensor 167 168 */ 162 169 void aubio_tensor_matmul(aubio_tensor_t *a, aubio_tensor_t *b, 163 170 aubio_tensor_t *c); 171 172 /** copy tensor 173 174 \param s source tensor 175 \param d destination tensor 176 177 */ 178 void aubio_tensor_copy(aubio_tensor_t *s, aubio_tensor_t *d); 164 179 165 180 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.