mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
minor update
This commit is contained in:
parent
27a65fdee7
commit
1501360f4b
2 changed files with 21 additions and 1 deletions
|
@ -117,6 +117,26 @@ extern "C" {
|
|||
__r; \
|
||||
})
|
||||
|
||||
// Lerp instruction
|
||||
#define vx_lerp(a, b, s) ({ \
|
||||
unsigned __r; \
|
||||
unsigned __a = a; \
|
||||
unsigned __b = b; \
|
||||
unsigned __s = s; \
|
||||
__asm__ __volatile__ (".insn r4 0x6b, 7, " __ASM_STR(unit) ", %0, %1, %2, %3" : "=r"(__r : "r"(__a), "r"(__b), "r"(__s)); \
|
||||
__r; \
|
||||
})
|
||||
|
||||
// Conditional move
|
||||
#define vx_cmov(c, t, f) ({ \
|
||||
unsigned __r; \
|
||||
unsigned __c = c; \
|
||||
unsigned __t = t; \
|
||||
unsigned __f = f; \
|
||||
__asm__ __volatile__ (".insn r4 0x6b, 6, " __ASM_STR(unit) ", %0, %1, %2, %3" : "=r"(__r : "r"(__c), "r"(__t), "r"(__f)); \
|
||||
__r; \
|
||||
})
|
||||
|
||||
// Set thread mask
|
||||
inline void vx_tmc(unsigned thread_mask) {
|
||||
asm volatile (".insn s 0x6b, 0, x0, 0(%0)" :: "r"(thread_mask));
|
||||
|
|
|
@ -98,7 +98,7 @@ int run_test(const kernel_arg_t& kernel_arg,
|
|||
|
||||
// wait for completion
|
||||
std::cout << "wait for completion" << std::endl;
|
||||
RT_CHECK(vx_ready_wait(device, -1));
|
||||
RT_CHECK(vx_ready_wait(device, MAX_TIMEOUT));
|
||||
|
||||
// download destination buffer
|
||||
std::cout << "download destination buffer" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue