Skip to content

Commit

Permalink
[SYCL-PTX] Add integer and shared builtins categories (#1828)
Browse files Browse the repository at this point in the history
This patch adds all builtins from the integer and shared builtins categories.

Remove old forward declared SPIR-V builtin from the integer and shared categories.
Update the binding file using the header generator.
Add relevant binding test.
Remove XFAIL from related SYCL tests.

Signed-off-by: Victor Lomuller <[email protected]>
Co-authored-by: David Wood <[email protected]>
  • Loading branch information
Naghasan and davidtwco authored Jun 18, 2020
1 parent 1f76efc commit f0a4fe2
Show file tree
Hide file tree
Showing 128 changed files with 12,708 additions and 223 deletions.
36 changes: 15 additions & 21 deletions libclc/generic/include/clc/integer/integer-gentype.inc
Original file line number Diff line number Diff line change
@@ -1,57 +1,51 @@
#ifndef __CLC_BODY_U
#define __CLC_BODY_U __CLC_BODY
#endif
#ifndef __CLC_BODY_S
#define __CLC_BODY_S __CLC_BODY
#endif
#define __CLC_GEN_S

#define __CLC_GENTYPE int
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE int2
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE int3
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE int4
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE int8
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE int16
#include __CLC_BODY_S
#include __CLC_BODY
#undef __CLC_GENTYPE

#undef __CLC_GEN_S

#define __CLC_GENTYPE uint
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE uint2
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE uint3
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE uint4
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE uint8
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#define __CLC_GENTYPE uint16
#include __CLC_BODY_U
#include __CLC_BODY
#undef __CLC_GENTYPE

#undef __CLC_BODY_U
#undef __CLC_BODY_S
23 changes: 0 additions & 23 deletions libclc/generic/include/spirv/integer/definitions.h

This file was deleted.

9 changes: 0 additions & 9 deletions libclc/generic/include/spirv/integer/rotate.inc

This file was deleted.

67 changes: 0 additions & 67 deletions libclc/generic/include/spirv/shared/vload.h

This file was deleted.

70 changes: 0 additions & 70 deletions libclc/generic/include/spirv/shared/vstore.h

This file was deleted.

11 changes: 1 addition & 10 deletions libclc/generic/include/spirv/spirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,13 @@
/* 6.11.2.1 Floating-point macros */
#include <clc/float/definitions.h>

/* 6.11.3 Integer Functions */
#include <spirv/integer/clz.h>
#include <spirv/integer/popcount.h>
#include <spirv/integer/rotate.h>

/* 6.11.3 Integer Definitions */
#include <clc/integer/definitions.h>

/* 6.11.2 and 6.11.3 Shared Integer/Math Functions */
#include <spirv/shared/vload.h>
#include <spirv/shared/vstore.h>

/* 6.11.4 Common Functions */
#include <spirv/common/degrees.h>
#include <spirv/common/radians.h>
#include <spirv/common/mix.h>
#include <spirv/common/radians.h>
#include <spirv/common/sign.h>
#include <spirv/common/smoothstep.h>
#include <spirv/common/step.h>
Expand Down
Loading

0 comments on commit f0a4fe2

Please sign in to comment.