- pad or truncation value must be constant
- power of two transform
- and type-2 only
- double inputs only
Problems in using the Coder and/or gpuArray with the DCT
2 次查看(过去 30 天)
显示 更早的评论
Hello
I am facing problems when calling the dct function with the 'Type' option and I am attempting to to make use of gpuArrays OR when (without gpuArrays) I am trying to compile the code in C with the Matlab coder.
With gpuArrays it works fine when neither the direction nor the type are used.
In coder (without gpuArrays) the dct function does not work at all.
The Mathworks function reference page suggests that the function supports both functionalities so I am not quite sure what goes wrong.
The error messages given are:
For gpuArray:
Error using
matlab.internal.math.transform.mldct
Invalid data type. First argument must be
double, single, int8, uint8, int16, uint16,
int32, uint32, or logical.
Error in dct>dctinternal (line 116)
b =
matlab.internal.math.transform.mldct(x,n,dim,'Variant',type);
Error in dct (line 59)
b = dctinternal(a,varargin{:});
For coder:
- When used as dct(Matrix) the error message given is: Function call failed.
- When used with option as dct(Matrix,'Type',1) the error message given is: Error calling 'dct'. This call-site passes more inputs to this function than it can accept.
Any help will be much appreciated.
Thanks
Gerry
0 个评论
回答(1 个)
Ram Kokku
2019-6-14
Hi Gerry,
I dont think I completely understand the issues that you are running into. if you are tying to generate code for a design function that has gpuArrays, the error is expected. gpuArrays are not supported for code generation. that means your design function and its inputs cannot have any gpuArrays. that's the reason you see this error.
Invalid data type. First argument must be
double, single, int8, uint8, int16, uint16,
int32, uint32, or logical."
And about the second error, DCT code generation has following limitation.
Looks like these limitations are not mentioned in the documentation. I communicated this to the corresponding teams.
If this response does not answer your questions, please provide me an example that could reproduce the issue. Thank you.
2 个评论
Frantz Bouchereau
2019-6-18
Gerry, you are correct, the same limitations apply to the gpuArray. We will add the limitations to the documentation.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Array and Matrix Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!