Code generation from matlab function using my own BLAS function

6 visualizaciones (últimos 30 días)
anamika kumari
anamika kumari el 25 de Mzo. de 2021
Editada: anamika kumari el 21 de Abr. de 2021
codegen is by default replacing multiplication with cblas_sgemm though the header file have fun definition with different name.
What is the correct approach. I want to replace maths operators with BLAS?
classdef ifxcallback < coder.BLASCallback
methods (Static)
function updateBuildInfo(buildInfo, ~)
buildInfo.addSourceFiles(fullfile(pwd,'BLAS','src.c'))
buildInfo.addIncludePaths(fullfile(pwd,'BLAS'));
end
function headerName = getHeaderFilename()
headerName = 'inc.h';
end
function intTypeName = getBLASIntTypeName()
intTypeName = 'int';
end
end
end
function p = useEnumNameRatherThanTypedef()
p = true;
end
  12 comentarios
anamika kumari
anamika kumari el 6 de Abr. de 2021
@Ryan Livingston Thank you very much for the proposal to raise an internal request. I, like many others are certain to find the curated list extraordinarily helpful. It helps prioritizing development activities.
Thanks a lot, again.
anamika kumari
anamika kumari el 20 de Abr. de 2021
Editada: anamika kumari el 21 de Abr. de 2021
@Ryan Livingston Assuming that a sequence of mathematical operation have been described using simulink operators (e.g. multiply, add, transpose), it should be possible to generate either a BLAS call or perhaps a call to a function defined in the code replacement library. In a specific case such as matrix multiply, it should be possible for code generator to either generate cblas_sgemm() or crl_matrix_multiply(). Given availability of two alternative definitions, is it possible to prioritize one code replacement style over other?
For e.g. can i get code for operator matrix multiplication mapped to BLAS function while getting the code for the matrix transpose operator mapped to function defined in code replacement library?

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by