license import { Acos , KernelConfig } from '@tensorflow/tfjs-core' ; import { unaryKernelFunc } from '../kernel_utils/kernel_funcs_utils' ; import { CHECK_NAN_SNIPPET } from '../unaryop_gpu' ; const ACOS = CHECK_NAN_SNIPPET + `
  if (abs(x) > 1.) {
    return NAN;
  }
  return acos(x);
` ; export const acos = unaryKernelFunc ( { opSnippet : ACOS } ) ; export const acosConfig = { kernelName : Acos , backendName : 'webgl' , kernelFunc : acos , } ;