search for: constraints

Displaying 20 results from an estimated 5179 matches for "constraints".

2015 Mar 09
3
[LLVMdev] Inline Assembly: Memory constraints with offsets
...ound a place where all needed information would be readily > available, and where the common code would do all the work based on some > target-specific hook. Failing that, my last resort approach would be to > have a pre-isel pass that expands the inline-asm, potentially changing > the constraints to reflect the connection between the register and the > constant input operands (needed for the asm-printer). > > Not sure if this is of any help. > > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > hosted by The Linux Foundati...
2005 Oct 13
3
Optim with two constraints
Hi R-list, I am new to optimization in R and would appreciate help on the following question. I would like to minimize the following function using two constraints: ###### fn <- function(par,H,F){ fval <- 0.5 * t(par) %*% H %*% par + F%*% par fval } # matrix H is (n by k) # matrix F is (n by 1) # par is a (n by 1) set of weights # I need two constraints: # 1. each element in par needs to be between 0 and 1 # 2. sum(par)=1 i....
2012 Apr 28
0
[LLVMdev] Odd PPC inline asm constraint
On Fri, 2012-04-27 at 14:54 -0500, Hal Finkel wrote: > There is a comment in the file which reads: > > /* The weird 'i#*X' constraints on the following suppress a gcc > warning when __excepts is not a constant. Otherwise, they mean the > same as just plain 'i'. */ [sinp] > ("mtfsb0 %s0" : : "i#*X"(__builtin_ffs (__excepts))); [snip] > Does anyone know what that "weird" as...
2012 Apr 27
3
[LLVMdev] Odd PPC inline asm constraint
...LL_EXCEPT); ^ /usr/include/bits/fenvinline.h:56:11: note: expanded from macro 'feclearexcept' : : "i#*X"(__builtin_ffs (__excepts))); \ ^ 1 error generated. There is a comment in the file which reads: /* The weird 'i#*X' constraints on the following suppress a gcc warning when __excepts is not a constant. Otherwise, they mean the same as just plain 'i'. */ For example, one of the full macros is: /* Inline definition for feclearexcept. */ # define feclearexcept(__excepts) \ ((__builtin_constant_p (__excepts...
2013 Jan 23
4
[LLVMdev] Instruction Constraints Question
...6InstrSSE.td. According to the AVX2 manual, no two of the destination register, vector index register and mask register can be the same. The patterns in X86InstrSSE.td are missing this constraint and it's possible to generate an illegal instruction. It doesn't look like TableGen supports Constraints beyond EARLY_CLOBBER and TIED_TO. We would need to add a constraint such as "$dst != $src1, $dst != $mask, $src1 != $mask" to the current patterns to enforce the rules. Is there another mechanism to suport a constraint like this or is hacking TableGen the best way to do it? If the latt...
2010 Jul 29
3
[LLVMdev] inline asm constraints in LLVM
I'm trying to fix the handling of multiple alternate constraints in Clang (see http://gcc.gnu.org/onlinedocs/gcc/Multi_002dAlternative.html#Multi_002dAlternative ). How should the constraints be represented in the .ll file? Clang currently will assert because the code generator sees a constraints string with the wrong number of comma-separated items. Basicall...
2010 Aug 13
1
[LLVMdev] inline asm constraints in LLVM
...uple in llvm-gcc, as well as the code generator in Clang and the inline asm handling in LLVM (ala visitInlineAsm). While I see how Clang could do it to some extent by looking at the expression types of the operands, it seems that LLVM would be in a better position for choosing multiple alternative constraints as it would know what all the operands are, and where they currently are, particularly if part of an earlier transformation resulted in operands Clang thought were in memory were already in registers. And LLVm might need to step in anyway if registers can be allocated. Or is the constraint handli...
2009 Feb 16
2
solve.QP with box and equality constraints
...an example that estimates a 2x2 markov transition matrix across several periods from aggregate data using restricted least squares. I seem to be making headway using solve.QP(quadprog) as the unrestricted solution matches the example I am following, and I can specify simple equality and inequality constraints. However, I cannot correctly specify a constraint matrix (Amat) with box constraints per cell and equality constraints that span multiple cells. Namely the solution matrix I am aiming for needs to respect the following conditions: - each row must sum to 1 - each cell must >= 0 - each cell...
2013 Jan 23
0
[LLVMdev] Instruction Constraints Question
> It doesn't look like TableGen supports Constraints beyond EARLY_CLOBBER > and TIED_TO. We would need to add a constraint such as "$dst != $src1, > $dst != $mask, $src1 != $mask" to the current patterns to enforce the > rules. You can emulate such constraints via early clobbing. Just mark dst as early clobbing. > Is there ano...
2010 Jul 29
0
[LLVMdev] inline asm constraints in LLVM
The LLVM asm parser doesn't support multiple alternative constraints; you need to have Clang pick one tuple in the front end. See ChooseConstraintTuple in llvm-gcc for prior art. On Jul 29, 2010, at 11:36 AMPDT, John Thompson wrote: > I'm trying to fix the handling of multiple alternate constraints in > Clang (see http://gcc.gnu.org/onlinedocs/gcc...
2006 Sep 04
2
Fitting generalized additive models with constraints?
Hello, I am trying to fit a GAM for a simple model, a simple model, y ~ s(x0) + s(x1) ; with a constraint that the fitted smooth functions s(x0) and s(x1) have to each always be >0. >From the library documentation and a search of the R-site and R-help archives I have not been able to decipher whether the following is possible using this, or other GAM libraries, or whether I will have to try
2012 Feb 15
2
Control number of assets in resulting portfolio with optimizations using package fPortfolio
Dear All, I am using package fPortfolio to run minimum variance portfolio optimizations in R. I already know how to set portfolioSpecs, portfolio objects and constraints. Unfortunately I am not able to set the following type of constraints. I have a timeSeries object with returns data for roughly 1.5k assets for 261 subperiods (workingdays) and want to compute the global minimum variance portfolio, considering following constraints: - Leverage = 1 (fu...
2012 May 10
1
[LLVMdev] Odd PPC inline asm constraint
...r something PowerPC specific? Thanks again, Hal On Fri, 27 Apr 2012 19:33:58 -0500 Peter Bergner <bergner at vnet.ibm.com> wrote: > On Fri, 2012-04-27 at 14:54 -0500, Hal Finkel wrote: > > There is a comment in the file which reads: > > > > /* The weird 'i#*X' constraints on the following suppress a gcc > > warning when __excepts is not a constant. Otherwise, they mean > > the same as just plain 'i'. */ > [sinp] > > ("mtfsb0 %s0" : : "i#*X"(__builtin_ffs (__excepts))); > [snip] > > Does anyone know wha...
2013 Mar 04
2
[LLVMdev] [MIPS] How can I add a constraint to LLVM/Clang for MIPS BE?
...ll -emit-llvm -O3 -S -target mipsel-unknown-linux -std=gnu89 > llc mips_R_JiaLiu.ll -o mips_R_JiaLiu.o -mcpu=mips32r2 -march=mipsel -filetype=obj > mips-linux-gnu-gcc -mips32r2 -O3 -EL -fPIC -o mips_R_JiaLiu.exe mips_R_JiaLiu.o > I use your way to compile test case: llvm-install/bin/clang constraints.c -o constraints.ll -emit-llvm -O3 -S -target mipsel-unknown-linux -std=gnu89 --sysroot /Users/jia/project/Cross-SDK/sdk/mipsel-gnu-rootfs llvm-install/bin/llc constraints.ll -o constraints.llc.s -mcpu=mips32r2 -march=mipsel -filetype=asm llvm-install/bin/llc constraints.ll -o constraints.o -mcpu=m...
2009 Dec 16
2
[LLVMdev] Early-clobber constraint in TableGen
All, I've attached a small patch that adds a new early-clobber operand constraint option to TableGen and would like to get feedback before proceding. As background, the ARM store-exclusive instruction (STREX) stores a success result code in a register operand, and that register cannot be the same register as either the source of the value to be stored, or the base address.
2013 Mar 19
0
linear model with equality and inequality (redundant) constraints
Dear R-users, in the last days I have been trying to estimate a normal linear model with equality and inequality constraints. Please find below a simple example of my problem. Of course, one could easily see that, though the constraints are consistent, there is some redundancy in the specific constraints. Nevertheless my actual applications can get much larger and I would not like to manually check for presence of red...
2008 Oct 22
2
suboptimal lp solutions
Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example: library(lpSolve) proportions = c( 0.46, 0.28, 0.26) constraints = c( 352, 75, 171) lp(objective.in = proportions, const.mat = diag(c(1,1,1)), const.rhs=constraints,...
2015 Mar 03
5
[LLVMdev] Inline Assembly: Memory constraints with offsets
Hi, I'm trying to implement the ZC inline assembly constraint for Mips. This constraint is a memory constraint that expands to an address with an offset (the range of the offset varies according to the subtarget), so the inline assembly in: int data[10]; void ZC(void) { asm volatile ("foo %0 %1" : : "ZC"(data[1]), "ZC"(data[2])); } Should expand to
2017 Jun 06
2
Putting "tied-to" constraints on virtual registers in SelectionDAGISel's Select() method
...egister - this gives me the following error: "getVRegDef assumes a single definition or no definition" later, after instruction selection. Therefore, I try to use 2 virtual registers for the same physical register. I know in TablGen instruction specs we can give "tied-to" constraints on virtual registers of the form: string Constraints = "$regInput = $regOutput"; Can we put such "tied-to" constraints programatically also at instruction selection, in the Select() method of the SelectionDAGISel class? Thank you, Alex
2004 Aug 09
4
linear constraint optim with bounds/reparametrization
Hello All, I would like to optimize a (log-)likelihood function subject to a number of linear constraints between parameters. These constraints are equality constraints of the form A%*%theta=c, ie (1,1) %*% 0.8,0.2)^t = 1 meaning that these parameters should sum to one. Moreover, there are bounds on the individual parameters, in most cases that I am considering parameters are bound between zero and one...