search for: ai1

Displaying 9 results from an estimated 9 matches for "ai1".

Did you mean: a1
2016 Dec 31
2
Automatic Insertion of OpenACC/OpenMP directives
...y[j] = a*x[i] + y[I]; // Change 'I' into 'j'? ++j; } } I get this code below, once I replace 'I' with 'j'. We are copying n positions of both arrays, 'x' and 'y': float saxpy(float a, float *x, float *y, int n) { int j = 0; long long int AI1[6]; AI1[0] = n + -1; AI1[1] = 4 * AI1[0]; AI1[2] = AI1[1] + 4; AI1[3] = AI1[2] / 4; AI1[4] = (AI1[3] > 0); AI1[5] = (AI1[4] ? AI1[3] : 0); #pragma acc data pcopy(x[0:AI1[5]],y[0:AI1[5]]) #pragma acc kernels for (int i = 0; i < n; ++i) { y[j] = a * x[i] + y[j]; ++j;...
2016 Dec 31
3
Automatic Insertion of OpenACC/OpenMP directives
...insert into C/C++ programs. For instance, if we take a program like this one below: void saxpy(float a, float *x, float *y, int n) { for (int i = 0; i < n; ++i) y[i] = a*x[i] + y[i]; } Then dawn-cc produces the code below: void saxpy(float a, float *x, float *y, int n) { long long int AI1[6]; AI1[0] = n - 1; AI1[1] = 4 * AI1[0]; AI1[2] = AI1[1] + 4; AI1[3] = AI1[2] / 4; AI1[4] = (AI1[3] > 0); AI1[5] = (AI1[4] ? AI1[3] : 0); #pragma acc data pcopy(x[0:AI1[5]],y[0:AI1[5]]) #pragma acc kernels for (int i = 0; i < n; ++i) y[i] = a * x[i] + y[i]; } I was wond...
2016 Dec 31
0
Automatic Insertion of OpenACC/OpenMP directives
...take a program like this one below: > > void saxpy(float a, float *x, float *y, int n) { > for (int i = 0; i < n; ++i) > y[i] = a*x[i] + y[i]; > } > > Then dawn-cc produces the code below: > > void saxpy(float a, float *x, float *y, int n) { > long long int AI1[6]; > AI1[0] = n - 1; > AI1[1] = 4 * AI1[0]; > AI1[2] = AI1[1] + 4; > AI1[3] = AI1[2] / 4; > AI1[4] = (AI1[3] > 0); > AI1[5] = (AI1[4] ? AI1[3] : 0); > #pragma acc data pcopy(x[0:AI1[5]],y[0:AI1[5]]) > #pragma acc kernels > for (int i = 0; i < n; ++i) >...
2017 Jan 03
2
Automatic Insertion of OpenACC/OpenMP directives
...;> } >> >> I get this code below, once I replace 'I' with 'j'. We are copying n >> positions of both arrays, 'x' and 'y': >> >> float saxpy(float a, float *x, float *y, int n) { >> int j = 0; >> >> long long int AI1[6]; >> AI1[0] = n + -1; >> AI1[1] = 4 * AI1[0]; >> AI1[2] = AI1[1] + 4; >> AI1[3] = AI1[2] / 4; >> AI1[4] = (AI1[3] > 0); >> AI1[5] = (AI1[4] ? AI1[3] : 0); >> #pragma acc data pcopy(x[0:AI1[5]],y[0:AI1[5]]) >> #pragma acc kernels >>...
2007 Jul 31
3
Nonlinear optimization with constraints
Hello R community, I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below: Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n. subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a scalar. (x is a vector of variables, A is nxm matrix, b is a vector) [[alternative HTML version deleted]]
2012 Sep 12
2
[LLVMdev] [PATCH][Review request] tablegen: extend list fields
...perator in a let statement or placing a '"+" in front of a superclass: - Example 1: def D0 : C1 { let Predicates += [P2]; // Append P2 to C1's Predicates } - Example 2: def D0 : C1, +AddP1; Using a real example, MOVi16 (in ARMInstrInfo.td) which is defined as def MOVi16 : AI1<0b1000, (outs GPR:$Rd), (ins imm0_65535_expr:$imm), DPFrm, IIC_iMOVi, "movw", "\t$Rd, $imm", [(set GPR:$Rd, imm0_65535:$imm)]>, Requires<[IsARM, HasV6T2]>, UnaryDP { can be rewritten to this: clas...
2012 Sep 12
0
[LLVMdev] [llvm-commits] [PATCH][Review request] tablegen: extend list fields
...of a superclass: > > - Example 1: > > def D0 : C1 { > let Predicates += [P2]; // Append P2 to C1's Predicates > } > > - Example 2: > > def D0 : C1, +AddP1; > > > Using a real example, MOVi16 (in ARMInstrInfo.td) which is defined as > > def MOVi16 : AI1<0b1000, (outs GPR:$Rd), (ins imm0_65535_expr:$imm), > DPFrm, IIC_iMOVi, > "movw", "\t$Rd, $imm", > [(set GPR:$Rd, imm0_65535:$imm)]>, > Requires<[IsARM, HasV6T2]>, UnaryDP { > > &gt...
2012 Sep 14
1
[LLVMdev] [llvm-commits] [PATCH][Review request] tablegen: extend list fields
...0 : C1 { > > let Predicates += [P2]; // Append P2 to C1's Predicates > > } > > > > - Example 2: > > > > def D0 : C1, +AddP1; > > > > > > Using a real example, MOVi16 (in ARMInstrInfo.td) which is defined as > > > > def MOVi16 : AI1<0b1000, (outs GPR:$Rd), (ins imm0_65535_expr:$imm), > > DPFrm, IIC_iMOVi, > > "movw", "\t$Rd, $imm", > > [(set GPR:$Rd, imm0_65535:$imm)]>, > > Requires<[IsARM, HasV6T2]>, Una...
2010 Mar 22
1
SQL-select using native R methods ?
Hi I have a problem in R that I have been trying to solve but without success. I am trying to join two tables on two variables : an ID and a date (optional) that will be common between the two tables In SQL (and SAS PROC SQL) I am a frequent user of the "select" command and I am used to the following nomenclature : select a.*, b.c, b.y, b.z from table1 a, table2 b where