|
ReMAS
1.5
Real-time Musical Accompaniment System
|
File with ReMAS kernels for Nvidia GPUs. More...
Go to the source code of this file.
Functions | |
| __device__ double | __shfl_downD (double var, unsigned int srcLane, int width=sizeWarp) |
| __shfl_downD performs __shfl_down of a double number More... | |
| __inline__ __device__ double | warpReduceSumD (double val) |
| warpReduceSumD does double sum reduction within a warp More... | |
| __inline__ __device__ float | warpReduceSumS (float val) |
| warpReduceSumD does float sum reduction within a warp More... | |
| __global__ void | kernel_InitDTW (MyType *__restrict__ pV, const int pos, const int size) |
| kernel_InitDTW This cuda kernel initializes DTW vector More... | |
| __global__ void | kernel_DTW (const MyType *__restrict__ Sequence, MyType *__restrict__ pD, const int NSeq, const int Where, const int NST) |
| kernel_DTW This cuda kernel performs the Online-DTW process for the current frame More... | |
| __global__ void | kernel_InitSxD (MyType *__restrict__ odata, MyType *__restrict__ v_SxD, const MyType *__restrict__ v_dxState, const int *__restrict__ I_SxD, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_InitSxD This cuda kernel sets up the vector SxD. More... | |
| __global__ void | kernel_Sum (MyType *__restrict__ odata, const MyType *__restrict__ idata, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_Sum This cuda kernel adds the elements of a vector. More... | |
| __global__ void | kernel_Vnorm (MyType *__restrict__ odata) |
| kernel_Vnorm This cuda kernel initializes position 0 of a vector More... | |
| __global__ void | kernel_ApplyWindow (MyType *__restrict__ X_fft, const short *__restrict__ frame, const MyType *__restrict__ v_hanning, const int TTRA, const int NFFT) |
| kernel_ApplyWindow scales and set the elements of the audio vector X_fft More... | |
| __global__ void | kernel_UpdateSxD (MyType *__restrict__ dest, const MyType ALPHA, const MyType *__restrict__ norm, const int size) |
| kernel_UpdateSxD This cuda kernel update the elements of SxD vector More... | |
| __global__ void | kernel_CompNorB0 (MyType *__restrict__ norms, const MyType value, const int size) |
| kernel_CompNorB0 This cuda kernel computes the norm of a vector when BETA=0 More... | |
| __global__ void | kernel_CompNorB1 (MyType *__restrict__ norms, const MyType *__restrict__ s_fk, const int NMIDI, const int size) |
| kernel_CompNorB1 This cuda kernel computes the norm of a vector when BETA=1 More... | |
| __global__ void | kernel_CompNorBG (MyType *__restrict__ norms, MyType *__restrict__ ts_fk, const MyType *__restrict__ s_fk, const int NMIDI, const MyType BETA, const int size) |
| kernel_CompNorBG This cuda kernel computes the norm of a vector when BETA <> 0 and BETA <> 1 More... | |
| __global__ void | kernel_PowToReal (MyType *__restrict__ dest, const MyType *__restrict__ src, const MyType ex, const int size) |
| kernel_PowToReal This cuda kernel powers the elements of a vector to a real number and stores them in other vector More... | |
| __global__ void | kernel_Modul (MyType *__restrict__ dest, const MyType *__restrict__ src, const int size) |
| kernel_Modul This cuda kernel computes the modulus of elements of a vector and stores them in other vector More... | |
| __global__ void | kernel_Cfreq (MyType *__restrict__ dest, const MyType *__restrict__ src) |
| kernel_Cfreq This cuda kernel computes sqrt(sum of elements of a vector) and stores it in dest[0] More... | |
| __global__ void | kernel_Reduction (MyType *__restrict__ dest, const int size) |
| kernel_Reduction This cuda kernel performs a typical sum-reduction of a vector More... | |
| __global__ void | kernel_ReductionPowBeta (MyType *__restrict__ dest, const MyType BETA, const int size) |
| kernel_Reduction This cuda kernel performs a typical sum-reduction of a vector More... | |
| __global__ void | __launch_bounds__ (maxThreads, 4) kernel_CompDisB0(MyType *__restrict__ dest |
| kernel_CompDisB0 This cuda kernel computes the distortion of a vector when BETA=0 More... | |
| if (i< size) | |
| __global__ void | kernel_Shift (short *__restrict__ frame, const int TTRAMA, const int TMUEST) |
| kernel_Shift shifts the vector elements TMUEST positions on the left More... | |
| __global__ void | kernel_BetaNorm (MyType *__restrict__ vector, const int size) |
| kernel__BetaNorm normalized the vector More... | |
| __global__ void | kernel_OneImin (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_OneImin calculates the position of one minimum in a vector More... | |
| __global__ void | kernel_OneIminLast (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int *__restrict__ ipos, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_OneIminLast used with kernel_OneImin to calculates the position of one minimum in a vector More... | |
| __global__ void | kernel_FirstImin (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_FirstImin calculates the position of the first minimum in a vector More... | |
| __global__ void | kernel_FirstIminLast (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int *__restrict__ ipos, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_FirstIminLast used with kernel_OneImin to calculates the position of the first minimum in a vector More... | |
| __global__ void | kernel_LastImin (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_LastImin calculates the position of the last minimum in a vector More... | |
| __global__ void | kernel_LastIminLast (MyType *__restrict__ odata, int *__restrict__ opos, const MyType *__restrict__ idata, const int *__restrict__ ipos, const int blockSize, const bool SizeIsPow2, const int size) |
| kernel_LastIminLast used with kernel_LastImin to calculates the position of the last minimum in a vector More... | |
| __global__ void __launch_bounds__ | ( | maxThreads | , |
| 4 | |||
| ) |
kernel_CompDisB0 This cuda kernel computes the distortion of a vector when BETA=0
kernel_CompDisBG This cuda kernel computes the distortion of a vector when BETA <> 0 and BETA <> 1
kernel_CompDisB1 This cuda kernel computes the distortion of a vector when BETA=1
| dest | (out) The output vector |
| v_cfreq | (in) Vector v_cfreq |
| norms | (in) Vector norms |
| s_fk | (in) Vector s_fk |
| NMIDI | (in) Number of midi notes |
| size | (in) Size of the vectors |
| dest | (out) The output vector |
| v_cfreq | (in) Vector v_cfreq |
| norms | (in) Vector norms |
| s_fk | (in) Vector s_fk |
| ts_fk | (in) Vector ts_fk |
| tauxi | (in) Vector tauxi |
| BETA | (in) BETA value |
| NMIDI | (in) Number of midi notes |
| size | (in) Size of the vectors |
|
inline |
__shfl_downD performs __shfl_down of a double number
| var | (inout) The data |
| srcLane | (in) The lane |
| width | (in) Width of line |
Definition at line 43 of file kernels.cuh.
| kernel_ApplyWindow | ( | MyType *__restrict__ | X_fft, |
| const short *__restrict__ | frame, | ||
| const MyType *__restrict__ | v_hanning, | ||
| const int | TTRA, | ||
| const int | NFFT | ||
| ) |
kernel_ApplyWindow scales and set the elements of the audio vector X_fft
| X_fft | (out) The vector to scale and set |
| frame | (in) The vector with current audio (frame) |
| v_hanning | (in) The hanning vector |
| TTRA | (in) Size of the frame |
| NFFT | (in) Size of the X_fft vector |
Definition at line 345 of file kernels.cuh.
| __global__ void kernel_BetaNorm | ( | MyType *__restrict__ | vector, |
| const int | size | ||
| ) |
kernel__BetaNorm normalized the vector
| vector | (out) The vector |
| size | (in) The vector size |
Definition at line 901 of file kernels.cuh.
| __global__ void kernel_Cfreq | ( | MyType *__restrict__ | dest, |
| const MyType *__restrict__ | src | ||
| ) |
kernel_Cfreq This cuda kernel computes sqrt(sum of elements of a vector) and stores it in dest[0]
| dest | (out) The output vector |
| src | (in) The input vector |
Definition at line 527 of file kernels.cuh.
| __global__ void kernel_CompNorB0 | ( | MyType *__restrict__ | norms, |
| const MyType | value, | ||
| const int | size | ||
| ) |
kernel_CompNorB0 This cuda kernel computes the norm of a vector when BETA=0
| norms | (out) The output vector |
| value | (in) The value for the initialization of the vector |
| size | (in) Size of the vectors |
Definition at line 386 of file kernels.cuh.
| __global__ void kernel_CompNorB1 | ( | MyType *__restrict__ | norms, |
| const MyType *__restrict__ | s_fk, | ||
| const int | NMIDI, | ||
| const int | size | ||
| ) |
kernel_CompNorB1 This cuda kernel computes the norm of a vector when BETA=1
| norms | (out) The output vector |
| s_fk | (in) Vector s_fk |
| NMIDI | (in) Number of midi notes |
| size | (in) Size of the vectors |
Definition at line 404 of file kernels.cuh.
| __global__ void kernel_CompNorBG | ( | MyType *__restrict__ | norms, |
| MyType *__restrict__ | ts_fk, | ||
| const MyType *__restrict__ | s_fk, | ||
| const int | NMIDI, | ||
| const MyType | BETA, | ||
| const int | size | ||
| ) |
kernel_CompNorBG This cuda kernel computes the norm of a vector when BETA <> 0 and BETA <> 1
| norms | (out) The output vector |
| ts_fk | (out) Vector ts_fk |
| s_fk | (in) Vector s_fk |
| NMIDI | (in) Number of midi notes |
| BETA | (in) Value of parameter BETA |
| size | (in) Size of the vectors |
Definition at line 440 of file kernels.cuh.
| __global__ void kernel_DTW | ( | const MyType *__restrict__ | Sequence, |
| MyType *__restrict__ | pD, | ||
| const int | NSeq, | ||
| const int | Where, | ||
| const int | NST | ||
| ) |
kernel_DTW This cuda kernel performs the Online-DTW process for the current frame
| Sequence | (in) Currente frame |
| pD | (out) DTW pD vector |
| NSeq | (in) One referenced position within DTW vectors |
| Where | (in) Position within DTW vectors |
| NST | (in) Number of states |
Definition at line 135 of file kernels.cuh.
| __global__ void kernel_FirstImin | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_FirstImin calculates the position of the first minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 1099 of file kernels.cuh.
| __global__ void kernel_FirstIminLast | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int *__restrict__ | ipos, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_FirstIminLast used with kernel_OneImin to calculates the position of the first minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| ipos | (in) Vector with input positions |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 1192 of file kernels.cuh.
| __global__ void kernel_InitDTW | ( | MyType *__restrict__ | pV, |
| const int | pos, | ||
| const int | size | ||
| ) |
kernel_InitDTW This cuda kernel initializes DTW vector
| pV | (out) DTW pV vector |
| pos | (in) One special position within the vectors |
| size | (in) Size of DTW vectors |
Definition at line 108 of file kernels.cuh.
| __global__ void kernel_InitSxD | ( | MyType *__restrict__ | odata, |
| MyType *__restrict__ | v_SxD, | ||
| const MyType *__restrict__ | v_dxState, | ||
| const int *__restrict__ | I_SxD, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_InitSxD This cuda kernel sets up the vector SxD.
| odata | (inout) Intermedial data vector |
| v_SxD | (out) v_SxD vector |
| v_dxState | (out) v_dxState vector |
| I_SxD | (out) I_SxD vector |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 185 of file kernels.cuh.
| __global__ void kernel_LastImin | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_LastImin calculates the position of the last minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 1283 of file kernels.cuh.
| __global__ void kernel_LastIminLast | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int *__restrict__ | ipos, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_LastIminLast used with kernel_LastImin to calculates the position of the last minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| ipos | (in) Vector with input positions |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 1376 of file kernels.cuh.
| __global__ void kernel_Modul | ( | MyType *__restrict__ | dest, |
| const MyType *__restrict__ | src, | ||
| const int | size | ||
| ) |
kernel_Modul This cuda kernel computes the modulus of elements of a vector and stores them in other vector
| dest | (out) The output vector |
| src | (in) The input vector |
| size | (in) Size of the vectors |
Definition at line 503 of file kernels.cuh.
| __global__ void kernel_OneImin | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_OneImin calculates the position of one minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 923 of file kernels.cuh.
| __global__ void kernel_OneIminLast | ( | MyType *__restrict__ | odata, |
| int *__restrict__ | opos, | ||
| const MyType *__restrict__ | idata, | ||
| const int *__restrict__ | ipos, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_OneIminLast used with kernel_OneImin to calculates the position of one minimum in a vector
| odata | (out) Stores the minimums |
| opos | (out) Stores the positions of the minimums |
| idata | (in) The vector |
| ipos | (in) Vector with input positions |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 1012 of file kernels.cuh.
| __global__ void kernel_PowToReal | ( | MyType *__restrict__ | dest, |
| const MyType *__restrict__ | src, | ||
| const MyType | ex, | ||
| const int | size | ||
| ) |
kernel_PowToReal This cuda kernel powers the elements of a vector to a real number and stores them in other vector
| dest | (out) The output vector |
| src | (in) The input vector |
| ex | (in) Number of midi notes |
| size | (in) Size of the vectors |
Definition at line 481 of file kernels.cuh.
| __global__ void kernel_Reduction | ( | MyType *__restrict__ | dest, |
| const int | size | ||
| ) |
kernel_Reduction This cuda kernel performs a typical sum-reduction of a vector
| dest | (inout) The vector |
| size | (in) The vector size |
Definition at line 560 of file kernels.cuh.
| __global__ void kernel_ReductionPowBeta | ( | MyType *__restrict__ | dest, |
| const MyType | BETA, | ||
| const int | size | ||
| ) |
kernel_Reduction This cuda kernel performs a typical sum-reduction of a vector
| dest | (inout) The vector |
| BETA | (in) The value of BETA |
| size | (in) The vector size |
Definition at line 586 of file kernels.cuh.
| __global__ void kernel_Shift | ( | short *__restrict__ | frame, |
| const int | TTRAMA, | ||
| const int | TMUEST | ||
| ) |
kernel_Shift shifts the vector elements TMUEST positions on the left
| frame | (out) The vector |
| TTRAMA | (in) Number of elements of the TRAMA |
| TMUEST | (in) Number of elements of the MUESTA |
Definition at line 880 of file kernels.cuh.
| __global__ void kernel_Sum | ( | MyType *__restrict__ | odata, |
| const MyType *__restrict__ | idata, | ||
| const int | blockSize, | ||
| const bool | SizeIsPow2, | ||
| const int | size | ||
| ) |
kernel_Sum This cuda kernel adds the elements of a vector.
| odata | (inout) Intermedial data vector |
| idata | (in) vector with values to add |
| blockSize | (in) BlockSize used |
| SizeIsPow2 | (in) True if the vector size is power of 2 |
| size | (in) Size of the vector |
Definition at line 260 of file kernels.cuh.
| __global__ void kernel_UpdateSxD | ( | MyType *__restrict__ | dest, |
| const MyType | ALPHA, | ||
| const MyType *__restrict__ | norm, | ||
| const int | size | ||
| ) |
kernel_UpdateSxD This cuda kernel update the elements of SxD vector
| dest | (inout) The vector SxD |
| ALPHA | (in) The value of parameter ALPHA |
| norm | (in) Vector with the norm in position 0 |
| size | (in) Size of the vectors |
Definition at line 364 of file kernels.cuh.
| __global__ void kernel_Vnorm | ( | MyType *__restrict__ | odata | ) |
kernel_Vnorm This cuda kernel initializes position 0 of a vector
| odata | (inout) The vector |
Definition at line 326 of file kernels.cuh.
| __inline__ __device__ double warpReduceSumD | ( | double | val | ) |
warpReduceSumD does double sum reduction within a warp
| val | (in) The data |
Definition at line 67 of file kernels.cuh.
| __inline__ __device__ double warpReduceSumS | ( | float | val | ) |
warpReduceSumD does float sum reduction within a warp
| val | (in) The data |
Definition at line 87 of file kernels.cuh.
| __global__ void const MyType *__restrict__ const MyType *__restrict__ const MyType *__restrict__ const MyType *__restrict__ const MyType *__restrict__ const MyType const int const int size |
Definition at line 625 of file kernels.cuh.
1.8.13