license import { KernelConfig , Multiply } from '@tensorflow/tfjs-core' ; import { createSimpleBinaryKernelImpl } from '../utils/binary_impl' ; import { binaryKernelFunc , createComplexBinaryKernelImpl } from '../utils/binary_utils' ; export const multiplyImpl = createSimpleBinaryKernelImpl ( ( ( aValue , bValue ) => aValue * bValue ) ) ; export const multiplyComplexImpl = createComplexBinaryKernelImpl ( ( ( aReal , aImag , bReal , bImag ) => { return { real : aReal * bReal - aImag * bImag , imag : aReal * bImag + aImag * bReal } ; } ) ) ; export const multiply = binaryKernelFunc ( Multiply , multiplyImpl , multiplyComplexImpl ) ; export const multiplyConfig = { kernelName : Multiply , backendName : 'cpu' , kernelFunc : multiply } ;