Changeset 0dad503
- Timestamp:
- Dec 29, 2021, 5:52:01 PM (3 years ago)
- Branches:
- feature/crepe
- Children:
- 1b9fe24
- Parents:
- 7897b51
- git-author:
- Paul Brossier <piem@piem.org> (01/29/19 01:14:21)
- git-committer:
- Paul Brossier <piem@piem.org> (12/29/21 17:52:01)
- Location:
- src/ai
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ai/tensor.c
r7897b51 r0dad503 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
r7897b51 r0dad503 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.