Skip to content

Commit 4285c0d

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into glyons-name
2 parents df201b1 + 4522237 commit 4285c0d

File tree

12 files changed

+740
-70
lines changed

12 files changed

+740
-70
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 16 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "llvm/Passes/StandardInstrumentations.h"
4343
#include "llvm/Support/BuryPointer.h"
4444
#include "llvm/Support/CommandLine.h"
45-
#include "llvm/Support/Debug.h"
4645
#include "llvm/Support/MemoryBuffer.h"
4746
#include "llvm/Support/PrettyStackTrace.h"
4847
#include "llvm/Support/TargetRegistry.h"
@@ -82,11 +81,6 @@
8281
#include "llvm/Transforms/Utils/SymbolRewriter.h"
8382
#include "llvm/Transforms/Utils/UniqueInternalLinkageNames.h"
8483
#include <memory>
85-
86-
namespace SPIRV {
87-
extern llvm::cl::opt<bool> SPIRVNoDerefAttr;
88-
}
89-
9084
using namespace clang;
9185
using namespace llvm;
9286

@@ -622,54 +616,22 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
622616
CodeGenOpts.PrepareForThinLTO));
623617
}
624618

625-
// FIXME: This code is a workaround for a number of problems with optimized
626-
// SYCL code for the SPIR target. This change trying to balance between doing
627-
// too few and too many optimizations. The current approach is to disable as
628-
// much as possible just to keep the compiler functional. Eventually we can
629-
// consider allowing -On option to configure the optimization set for the FE
630-
// device compiler as well, but before that we must fix all the functional and
631-
// performance issues caused by LLVM transformantions.
632-
// E.g. LLVM optimizations make use of llvm intrinsics, instructions, data
633-
// types, etc., which are not supported by the SPIR-V translator (current
634-
// "back-end" for SYCL device compiler).
635-
// NOTE: We use "normal" inliner (i.e. from O2/O3), but limit the rest of
636-
// optimization pipeline. Inliner is a must for enabling size reduction
637-
// optimizations.
638-
if (LangOpts.SYCLIsDevice && TargetTriple.isSPIR()) {
639-
PMBuilder.OptLevel = 1;
640-
PMBuilder.SizeLevel = 2;
641-
PMBuilder.SLPVectorize = false;
642-
PMBuilder.LoopVectorize = false;
643-
PMBuilder.DivergentTarget = true;
644-
PMBuilder.DisableGVNLoadPRE = true;
645-
PMBuilder.ForgetAllSCEVInLoopUnroll = true;
646-
647-
PMBuilder.DisableUnrollLoops = true;
648-
// Loop interleaving in the loop vectorizer has historically been set to be
649-
// enabled when loop unrolling is enabled.
650-
PMBuilder.LoopsInterleaved = false;
651-
PMBuilder.MergeFunctions = false;
652-
PMBuilder.PrepareForThinLTO = false;
653-
PMBuilder.PrepareForLTO = false;
654-
PMBuilder.RerollLoops = false;
655-
} else {
656-
PMBuilder.OptLevel = CodeGenOpts.OptimizationLevel;
657-
PMBuilder.SizeLevel = CodeGenOpts.OptimizeSize;
658-
PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP;
659-
PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop;
660-
// Only enable CGProfilePass when using integrated assembler, since
661-
// non-integrated assemblers don't recognize .cgprofile section.
662-
PMBuilder.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS;
663-
664-
PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;
665-
// Loop interleaving in the loop vectorizer has historically been set to be
666-
// enabled when loop unrolling is enabled.
667-
PMBuilder.LoopsInterleaved = CodeGenOpts.UnrollLoops;
668-
PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions;
669-
PMBuilder.PrepareForThinLTO = CodeGenOpts.PrepareForThinLTO;
670-
PMBuilder.PrepareForLTO = CodeGenOpts.PrepareForLTO;
671-
PMBuilder.RerollLoops = CodeGenOpts.RerollLoops;
672-
}
619+
PMBuilder.OptLevel = CodeGenOpts.OptimizationLevel;
620+
PMBuilder.SizeLevel = CodeGenOpts.OptimizeSize;
621+
PMBuilder.SLPVectorize = CodeGenOpts.VectorizeSLP;
622+
PMBuilder.LoopVectorize = CodeGenOpts.VectorizeLoop;
623+
// Only enable CGProfilePass when using integrated assembler, since
624+
// non-integrated assemblers don't recognize .cgprofile section.
625+
PMBuilder.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS;
626+
627+
PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;
628+
// Loop interleaving in the loop vectorizer has historically been set to be
629+
// enabled when loop unrolling is enabled.
630+
PMBuilder.LoopsInterleaved = CodeGenOpts.UnrollLoops;
631+
PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions;
632+
PMBuilder.PrepareForThinLTO = CodeGenOpts.PrepareForThinLTO;
633+
PMBuilder.PrepareForLTO = CodeGenOpts.PrepareForLTO;
634+
PMBuilder.RerollLoops = CodeGenOpts.RerollLoops;
673635

674636
MPM.add(new TargetLibraryInfoWrapperPass(*TLII));
675637

clang/lib/Driver/ToolChains/MSVC.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ void visualstudio::Linker::constructMSVCLibCommand(Compilation &C,
322322
}
323323
CmdArgs.push_back(II.getFilename());
324324
}
325+
if (Args.hasArg(options::OPT_fsycl_link_EQ) &&
326+
Args.hasArg(options::OPT_fintelfpga))
327+
CmdArgs.push_back("/IGNORE:4221");
325328
CmdArgs.push_back(
326329
C.getArgs().MakeArgString(Twine("-OUT:") + Output.getFilename()));
327330

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// REQUIRES: system-windows
2+
// RUN: %clangxx -target x86_64-pc-windows-msvc -fsycl -fintelfpga -fsycl-link -Xshardware %s -### 2>&1 \
3+
// RUN: | FileCheck %s
4+
// RUN: %clang_cl -target x86_64-pc-windows-msvc -fsycl -fintelfpga -fsycl-link -Xshardware %s -### 2>&1 \
5+
// RUN: | FileCheck %s
6+
// CHECK: /IGNORE:4221

llvm/lib/Target/NVPTX/SYCL/GlobalOffset.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ class GlobalOffset : public ModulePass {
259259
Function *NewFunc = Function::Create(NewFuncTy, Func->getLinkage(),
260260
Func->getAddressSpace());
261261

262+
// Keep original function ordering.
263+
M.getFunctionList().insertAfter(Func->getIterator(), NewFunc);
264+
262265
if (KeepOriginal) {
263266
// TODO: Are there better naming alternatives that allow for unmangling?
264267
NewFunc->setName(Func->getName() + "_with_offset");
@@ -272,7 +275,7 @@ class GlobalOffset : public ModulePass {
272275
}
273276

274277
SmallVector<ReturnInst *, 8> Returns;
275-
CloneFunctionInto(NewFunc, Func, VMap, /*ModuleLevelChanges=*/false,
278+
CloneFunctionInto(NewFunc, Func, VMap, /*ModuleLevelChanges=*/true,
276279
Returns);
277280
} else {
278281
NewFunc->copyAttributesFrom(Func);
@@ -298,9 +301,6 @@ class GlobalOffset : public ModulePass {
298301
NewFunc->addMetadata(MD.first, *MD.second);
299302
}
300303

301-
// Keep original function ordering.
302-
M.getFunctionList().insertAfter(Func->getIterator(), NewFunc);
303-
304304
Value *ImplicitOffset = NewFunc->arg_begin() + (NewFunc->arg_size() - 1);
305305
// Add bitcast to match the return type of the intrinsic if needed.
306306
if (ImplicitArgumentType != ImplicitOffsetPtrType) {

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 234 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ __SYCL_CONVERGENT__ extern SYCL_EXTERNAL void
205205
__spirv_SubgroupBlockWriteINTEL(__attribute__((opencl_global)) uint32_t *Ptr,
206206
dataT Data) noexcept;
207207

208+
template <typename dataT>
209+
__SYCL_CONVERGENT__ extern SYCL_EXTERNAL dataT __spirv_SubgroupBlockReadINTEL(
210+
const __attribute__((opencl_global)) uint64_t *Ptr) noexcept;
211+
212+
template <typename dataT>
213+
__SYCL_CONVERGENT__ extern SYCL_EXTERNAL void
214+
__spirv_SubgroupBlockWriteINTEL(__attribute__((opencl_global)) uint64_t *Ptr,
215+
dataT Data) noexcept;
208216
template <int W, int rW>
209217
extern SYCL_EXTERNAL ap_int<rW>
210218
__spirv_FixedSqrtINTEL(ap_int<W> a, bool S, int32_t I, int32_t rI,
@@ -256,14 +264,232 @@ extern SYCL_EXTERNAL ap_int<rW>
256264
__spirv_FixedExpINTEL(ap_int<W> a, bool S, int32_t I, int32_t rI,
257265
int32_t Quantization = 0, int32_t Overflow = 0) noexcept;
258266

259-
template <typename dataT>
260-
__SYCL_CONVERGENT__ extern SYCL_EXTERNAL dataT __spirv_SubgroupBlockReadINTEL(
261-
const __attribute__((opencl_global)) uint64_t *Ptr) noexcept;
262-
263-
template <typename dataT>
264-
__SYCL_CONVERGENT__ extern SYCL_EXTERNAL void
265-
__spirv_SubgroupBlockWriteINTEL(__attribute__((opencl_global)) uint64_t *Ptr,
266-
dataT Data) noexcept;
267+
// In the following built-ins width of arbitrary precision integer type for
268+
// a floating point variable should be equal to sum of corresponding
269+
// exponent width E, mantissa width M and 1 for sign bit. I.e. WA = EA + MA + 1.
270+
template <int WA, int Wout>
271+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCastINTEL(
272+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
273+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
274+
275+
template <int WA, int Wout>
276+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCastFromIntINTEL(
277+
ap_int<WA> A, int32_t Mout, int32_t EnableSubnormals = 0,
278+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
279+
280+
template <int WA, int Wout>
281+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCastToIntINTEL(
282+
ap_int<WA> A, int32_t MA, int32_t EnableSubnormals = 0,
283+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
284+
285+
template <int WA, int WB, int Wout>
286+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatAddINTEL(
287+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
288+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
289+
int32_t RoundingAccuracy = 0) noexcept;
290+
291+
template <int WA, int WB, int Wout>
292+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatSubINTEL(
293+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
294+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
295+
int32_t RoundingAccuracy = 0) noexcept;
296+
297+
template <int WA, int WB, int Wout>
298+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatMulINTEL(
299+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
300+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
301+
int32_t RoundingAccuracy = 0) noexcept;
302+
303+
template <int WA, int WB, int Wout>
304+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatDivINTEL(
305+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
306+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
307+
int32_t RoundingAccuracy = 0) noexcept;
308+
309+
// Comparison built-ins don't use Subnormal Support, Rounding Mode and
310+
// Rounding Accuracy.
311+
template <int WA, int WB>
312+
extern SYCL_EXTERNAL bool
313+
__spirv_ArbitraryFloatGTINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
314+
int32_t MB) noexcept;
315+
316+
template <int WA, int WB>
317+
extern SYCL_EXTERNAL bool
318+
__spirv_ArbitraryFloatGEINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
319+
int32_t MB) noexcept;
320+
321+
template <int WA, int WB>
322+
extern SYCL_EXTERNAL bool
323+
__spirv_ArbitraryFloatLTINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
324+
int32_t MB) noexcept;
325+
326+
template <int WA, int WB>
327+
extern SYCL_EXTERNAL bool
328+
__spirv_ArbitraryFloatLEINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
329+
int32_t MB) noexcept;
330+
331+
template <int WA, int WB>
332+
extern SYCL_EXTERNAL bool
333+
__spirv_ArbitraryFloatEQINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
334+
int32_t MB) noexcept;
335+
336+
template <int WA, int Wout>
337+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatRecipINTEL(
338+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
339+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
340+
341+
template <int WA, int Wout>
342+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatRSqrtINTEL(
343+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
344+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
345+
346+
template <int WA, int Wout>
347+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCbrtINTEL(
348+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
349+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
350+
351+
template <int WA, int WB, int Wout>
352+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatHypotINTEL(
353+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
354+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
355+
int32_t RoundingAccuracy = 0) noexcept;
356+
357+
template <int WA, int Wout>
358+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatSqrtINTEL(
359+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
360+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
361+
362+
template <int WA, int Wout>
363+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatLogINTEL(
364+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
365+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
366+
367+
template <int WA, int Wout>
368+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatLog2INTEL(
369+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
370+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
371+
372+
template <int WA, int Wout>
373+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatLog10INTEL(
374+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
375+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
376+
377+
template <int WA, int Wout>
378+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatLog1pINTEL(
379+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
380+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
381+
382+
template <int WA, int Wout>
383+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatExpINTEL(
384+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
385+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
386+
387+
template <int WA, int Wout>
388+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatExp2INTEL(
389+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
390+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
391+
392+
template <int WA, int Wout>
393+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatExp10INTEL(
394+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
395+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
396+
397+
template <int WA, int Wout>
398+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatExpm1INTEL(
399+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
400+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
401+
402+
template <int WA, int Wout>
403+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatSinINTEL(
404+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
405+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
406+
407+
template <int WA, int Wout>
408+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCosINTEL(
409+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
410+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
411+
412+
// Result value contains both values of sine and cosine and so has the size of
413+
// 2 * Wout where Wout is equal to (1 + Eout + Mout).
414+
template <int WA, int Wout>
415+
extern SYCL_EXTERNAL ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosINTEL(
416+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
417+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
418+
419+
template <int WA, int Wout>
420+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatSinPiINTEL(
421+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
422+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
423+
424+
template <int WA, int Wout>
425+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatCosPiINTEL(
426+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
427+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
428+
429+
// Result value contains both values of sine(A*pi) and cosine(A*pi) and so has
430+
// the size of 2 * Wout where Wout is equal to (1 + Eout + Mout).
431+
template <int WA, int Wout>
432+
extern SYCL_EXTERNAL ap_int<2 * Wout> __spirv_ArbitraryFloatSinCosPiINTEL(
433+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
434+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
435+
436+
template <int WA, int Wout>
437+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatASinINTEL(
438+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
439+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
440+
441+
template <int WA, int Wout>
442+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatASinPiINTEL(
443+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
444+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
445+
446+
template <int WA, int Wout>
447+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatACosINTEL(
448+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
449+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
450+
451+
template <int WA, int Wout>
452+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatACosPiINTEL(
453+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
454+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
455+
456+
template <int WA, int Wout>
457+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatATanINTEL(
458+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
459+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
460+
461+
template <int WA, int Wout>
462+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatATanPiINTEL(
463+
ap_int<WA> A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0,
464+
int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept;
465+
466+
template <int WA, int WB, int Wout>
467+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatATan2INTEL(
468+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
469+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
470+
int32_t RoundingAccuracy = 0) noexcept;
471+
472+
template <int WA, int WB, int Wout>
473+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatPowINTEL(
474+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
475+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
476+
int32_t RoundingAccuracy = 0) noexcept;
477+
478+
template <int WA, int WB, int Wout>
479+
extern SYCL_EXTERNAL ap_int<Wout> __spirv_ArbitraryFloatPowRINTEL(
480+
ap_int<WA> A, int32_t MA, ap_int<WB> B, int32_t MB, int32_t Mout,
481+
int32_t EnableSubnormals = 0, int32_t RoundingMode = 0,
482+
int32_t RoundingAccuracy = 0) noexcept;
483+
484+
// PowN built-in calculates `A^B` where `A` is arbitrary precision floating
485+
// point number and `B` is arbitrary precision integer, i.e. its width doesn't
486+
// depend on sum of exponent and mantissa.
487+
template <int WA, int WB, int Wout>
488+
extern SYCL_EXTERNAL ap_int<Wout>
489+
__spirv_ArbitraryFloatPowNINTEL(ap_int<WA> A, int32_t MA, ap_int<WB> B,
490+
int32_t Mout, int32_t EnableSubnormals = 0,
491+
int32_t RoundingMode = 0,
492+
int32_t RoundingAccuracy = 0) noexcept;
267493

268494
template <typename dataT>
269495
extern SYCL_EXTERNAL int32_t __spirv_ReadPipe(RPipeTy<dataT> Pipe, dataT *Data,

0 commit comments

Comments
 (0)