search for: num_it

Displaying 3 results from an estimated 3 matches for "num_it".

Did you mean: num_in
2013 Oct 25
3
[LLVMdev] Question About Function Cloning
...s fine but the produced bit code does not behave correctly as it should (both the original and duplicated function in which the loop is extracted is called, but from the output it seems only one of them is executed.) Here is the source: #include<stdio.h> int main() { int i,j; int num_iter = 2; int val = 56; for(int i = 0; i<num_iter; i++) { val++; printf("Hello World\n"); } printf("val is %d\n",val); return 1; } Here's the bit code my pass produces: ; ModuleID = '<stdin>' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i1...
2006 May 18
1
Recommended style with calculator and persistent data
I have some calculations that require persistent state. For example, they retain most of the data across calls with different parameters. They retain parameters across calls with different subsets of the cases (this is for distributed computation). They retain early analysis of the problem to speed later computations. I've created an S4 object, and the stylized code looks like this calc
2017 May 08
3
RFC: Element-atomic memory intrinsics
...rm (ignoring alignment for simplicity): template<typename len_ty, uint16_t element_size> void memcpy_element_atomic(char *dest, char *src, len_ty len) { copy_ty = <int type with sizeof(type) == element_size>; len_ty num_iters = len / sizeof(copy_ty); for (len_ty i=0; i < num_iters; i++) *(copy_ty*)(dest + i*sizeof(copy_ty)) = *(copy_ty*)(src + i*sizeof(copy_ty)); // Note: restriction on len means we don’t need a residual loop. } We w...