search for: b_ptr

Displaying 12 results from an estimated 12 matches for "b_ptr".

Did you mean: cb_ptr
2017 Aug 04
3
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
...w to proceed. Let me begin by first describing the problem I'm trying to solve. Consider the following pseudo C code: *typedef struct element { unsigned idx; } element_t; * *static inline unsigned char fn2 (element_t *dst_ptr, const element_t *a_ptr, const element_t *b_ptr, unsigned char changed) { if (a_ptr && b_ptr && a_ptr->idx == b_ptr->idx) { if (!changed && dst_ptr && dst_ptr->idx == a_ptr->idx) { /* Do something */ } else { changed = 1; if (!dst_ptr) dst_ptr = fn3();...
2017 Aug 07
3
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
...sure how to proceed. Let me begin by first describing the problem I'm trying to solve. Consider the following pseudo C code: typedef struct element { unsigned idx; } element_t; static inline unsigned char fn2 (element_t *dst_ptr, const element_t *a_ptr, const element_t *b_ptr, unsigned char changed) { if (a_ptr && b_ptr && a_ptr->idx == b_ptr->idx) { if (!changed && dst_ptr && dst_ptr->idx == a_ptr->idx) { /* Do something */ } else { changed = 1; if (!dst_ptr) dst_ptr = fn3(); else...
2017 Aug 04
4
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
...trying to solve. Consider the following pseudo C code: > > *typedef struct element { > unsigned idx; > } element_t; > * > > *static inline > unsigned char fn2 (element_t *dst_ptr, const element_t *a_ptr, > const element_t *b_ptr, unsigned char changed) { > if (a_ptr && b_ptr && a_ptr->idx == b_ptr->idx) { > if (!changed && dst_ptr && dst_ptr->idx == a_ptr->idx) { > /* Do something */ > } else { > changed = 1; >...
2015 Nov 18
1
[Mesa-dev] llvm TGSI backend (WIP) questions
...add.ll has: ;FUNC-LABEL: {{^}}test1: ;EG: ADD_INT {{[* ]*}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} ;SI: v_add_i32_e32 [[REG:v[0-9]+]], vcc, {{v[0-9]+, v[0-9]+}} ;SI-NOT: [[REG]] ;SI: buffer_store_dword [[REG]], define void @test1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { %b_ptr = getelementptr i32, i32 addrspace(1)* %in, i32 1 %a = load i32, i32 addrspace(1)* %in %b = load i32, i32 addrspace(1)* %b_ptr %result = add i32 %a, %b store i32 %result, i32 addrspace(1)* %out ret void } So the generated code for test1 resmbles the input somewhat but is in no way c...
2017 Aug 07
2
[RFC][InlineCost] Modeling JumpThreading (or similar) in inline cost model
...; *typedef struct element { > unsigned idx; > } element_t;* > > *static inline > unsigned char fn2 (element_t *dst_ptr, const element_t > *a_ptr, > const element_t *b_ptr, unsigned char changed) { > if (a_ptr && b_ptr && a_ptr->idx == b_ptr->idx) { > if (!changed && dst_ptr && dst_ptr->idx == > a_ptr->idx) { > /* Do something */ >...
2012 Jul 21
3
Use GPU in R with .Call
...******************************/ /* "VecAdd_cuda.c" adds two double vectors using GPU. */ /************************************************/ extern void vecAdd_kernel(double *ain,double *bin,double *cout,int len); SEXP VecAdd_cuda(SEXP a,SEXP b) { int len; double *a_ptr,*b_ptr,*resout_ptr; /*Digest R objects*/ len=length(a); a_ptr=REAL(a); b_ptr=REAL(b); SEXP resout; PROTECT(resout=allocVector(REALSXP,len)); resout_ptr=REAL(resout); vecAdd_kernel(a_ptr,b_ptr,resout_ptr,len); UNPROTECT(1); return resout; } (b) Next, the host function and the kernel a...
2012 Jun 30
2
[LLVMdev] llc -O# / opt -O# differences
...the results are somewhat different. Here's a silly unoptimized bit of code which I'm generating from my LLVM-backed program ; ModuleID = 'foo' %Coord = type { double, double, double } define double @foo(%Coord*, %Coord*) nounwind uwtable ssp { entry: %dx_ptr = alloca double %b_ptr = alloca %Coord* %a_ptr = alloca %Coord* store %Coord* %0, %Coord** %a_ptr store %Coord* %1, %Coord** %b_ptr %a = load %Coord** %a_ptr %addr = getelementptr %Coord* %a, i64 0 %2 = getelementptr inbounds %Coord* %addr, i32 0, i32 0 %3 = load double* %2 %b = load %Coord** %b_ptr %ad...
2015 Nov 13
6
llvm TGSI backend (WIP) questions
Hi All, So as discussed I've started working on a TGSI backend for llvm to use as a way to get compute going on nouveau (and other gpu-s). I'm still learning all the ins and outs of llvm so I do not have much to show yet. I've rebased Francisco's (curro's) latest version on top of llvm trunk, and added a commit on top to actual get it build with the latest trunk. So
2017 Jun 20
0
[PATCH 07/11] drm: mgag200: remove dead code and pointless local lut storage
....c @@ -27,15 +27,19 @@ static void mga_crtc_load_lut(struct drm_crtc *crtc) { - struct mga_crtc *mga_crtc = to_mga_crtc(crtc); struct drm_device *dev = crtc->dev; struct mga_device *mdev = dev->dev_private; struct drm_framebuffer *fb = crtc->primary->fb; + u16 *r_ptr, *g_ptr, *b_ptr; int i; if (!crtc->enabled) return; + r_ptr = crtc->gamma_store; + g_ptr = r_ptr + crtc->gamma_size; + b_ptr = g_ptr + crtc->gamma_size; + WREG8(DAC_INDEX + MGA1064_INDEX, 0); if (fb && fb->format->cpp[0] * 8 == 16) { @@ -46,25 +50,27 @@ static void mga_cr...
2014 Oct 03
2
[LLVMdev] Weird problems with cos (was Re: [PATCH v3 2/3] R600: Add carry and borrow instructions. Use them to implement UADDO/USUBO)
...[0-9]+, v[0-9]+}} > -;SI-CHECK-NOT: [[REG]] > -;SI-CHECK: BUFFER_STORE_DWORD [[REG]], > +;SI: V_ADD_I32_e32 [[REG:v[0-9]+]], {{v[0-9]+, v[0-9]+}} > +;SI-NOT: [[REG]] > +;SI: BUFFER_STORE_DWORD [[REG]], > define void @test1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { > %b_ptr = getelementptr i32 addrspace(1)* %in, i32 1 > %a = load i32 addrspace(1)* %in > @@ -17,11 +17,11 @@ define void @test1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) { > } > > ;FUNC-LABEL: @test2: > -;EG-CHECK: ADD_INT {{[* ]*}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\....
2017 Jun 20
15
[PATCH 00/11] improve the fb_setcmap helper
Hi! While trying to get CLUT support for the atmel_hlcdc driver, and specifically for the emulated fbdev interface, I received some push-back that my feeble in-driver attempts should be solved by the core. This is my attempt to do it right. Boris and Daniel, was this approximately what you had in mind? I have obviously not tested all of this with more than a compile, but the first patch is
2017 Jun 22
22
[PATCH v2 00/14] improve the fb_setcmap helper
Hi! While trying to get CLUT support for the atmel_hlcdc driver, and specifically for the emulated fbdev interface, I received some push-back that my feeble in-driver attempts should be solved by the core. This is my attempt to do it right. I have obviously not tested all of this with more than a compile, but patches 1 and 3 are enough to make the atmel-hlcdc driver do what I need (when patched