Displaying 20 results from an estimated 1753 matches for "toy".
Did you mean:
too
2010 Jan 04
4
[LLVMdev] Getting Kaleidoscope to compile
...ng LLVM as the backend, and trying to experiment with
it using the Kaleidoscope demo compiler.
Taking the full source listing from
http://llvm.org/docs/tutorial/LangImpl3.html#code and trying to
compile it with the provided instructions gives me the following
errors:
a at a-desktop:~$ g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags
--libs core` -o toy
toy.cpp:5:30: error: llvm/LLVMContext.h: No such file or directory
toy.cpp:352: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In member function ‘virtual llvm::Value* NumberExprAST::Codegen()’:
toy.cpp:358: error: ‘getGlo...
2004 Sep 14
1
R-2.0.0 CMD check . and datasets
Hello everyone
I'm having a little difficulty with R-2.0.0 CMD check. My field is
Bayesian calibration of computer models.
The problem is that I have a large collection of toy datasets, that
in R-1.9.1 were specified with lines
like this:
x.toy <- 1:6
y.toy <- computer.model(x.toy)
z.toy <- reality(x.toy)
in file ./data/toys.R ; functions computer.model() and reality() are
defined in ./R/calibrator.R.
[In this application, the (toy) functions computer.mode...
2004 Sep 14
1
R-2.0.0 CMD check . and datasets
Hello everyone
I'm having a little difficulty with R-2.0.0 CMD check. My field is
Bayesian calibration of computer models.
The problem is that I have a large collection of toy datasets, that
in R-1.9.1 were specified with lines
like this:
x.toy <- 1:6
y.toy <- computer.model(x.toy)
z.toy <- reality(x.toy)
in file ./data/toys.R ; functions computer.model() and reality() are
defined in ./R/calibrator.R.
[In this application, the (toy) functions computer.mode...
2010 Jan 04
0
[LLVMdev] Getting Kaleidoscope to compile
...experiment with
> it using the Kaleidoscope demo compiler.
>
> Taking the full source listing from
> http://llvm.org/docs/tutorial/LangImpl3.html#code and trying to
> compile it with the provided instructions gives me the following
> errors:
>
> a at a-desktop:~$ g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags
> --libs core` -o toy
> toy.cpp:5:30: error: llvm/LLVMContext.h: No such file or directory
> toy.cpp:352: error: ‘getGlobalContext’ was not declared in this scope
> toy.cpp: In member function ‘virtual llvm::Value*
> NumberExprAST::Codegen()’:
&g...
2010 Jan 04
2
[LLVMdev] Getting Kaleidoscope to compile
I tried apt-get install llvm-dev just now, and it says it was already
installed, and when I again try compiling toy.cpp, it gives the same
set of error messages.
On Mon, Jan 4, 2010 at 10:27 AM, Oleg Knut <oleg77 at gmail.com> wrote:
> Probably you missed to install llvm-dev package with headers for llvm.
>
> 2010/1/4 Russell Wallace <russell.wallace at gmail.com>
>>
>> Hi all,...
2016 Apr 03
1
apply mean function to a subset of data
Here are several ways to get there, but your original loop is fine once it is corrected:
> for (i in 1:2) smean[i] <- mean(toy$diam[toy$group==i][1:nsel[i]])
> smean
[1] 0.271489 1.117015
Using sapply() to hide the loop:
> smean <- sapply(1:2, function(x) mean((toy$diam[toy$group==x])[1:nsel[x]]))
> smean
[1] 0.271489 1.117015
Or use head()
> smean <- sapply(1:2, function(x) mean(head(toy$diam[toy$group...
2016 Apr 02
3
apply mean function to a subset of data
...t
from group 1 say "n" rows and calculate the mean; then select "m" rows from
group 2 and calculate the mean as well. So far I've been using a for loop
for doing it but when it comes to a large data set is rather inefficient.
Any hint to vectorize this would be appreciated.
toy = data.frame(group = c(rep(1,10),rep(2,8)), diam =
c(rnorm(10),rnorm(8)))
nsel = c(6,4)
smean <- c(0,0)
for (i in 1:2) smean[i] <- mean(toy$diam[1:nsel[i]])
Thanks
Pedro
[[alternative HTML version deleted]]
2012 Oct 17
2
[LLVMdev] a bug in Kaleidoscope code
hi,
with LLVM 3.1, i am trying to compile toy.cpp from
http://llvm.org/docs/tutorial/LangImpl7.html#code.
i got the following error:
$ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit
native` -O3 -o toy
toy.cpp:4:10: fatal error: 'llvm/IRBuilder.h' file not found
#include "llvm/IRBuilder.h"
i fixed thi...
2016 Apr 02
0
apply mean function to a subset of data
Hi Pedro,
This may not be much of an improvement, but it was a challenge.
selvec<-as.vector(matrix(c(nsel,unlist(by(toy$diam,toy$group,length))-nsel),
ncol=2,byrow=TRUE))
TFvec<-rep(c(TRUE,FALSE),length.out=length(selvec))
toynsel<-rep(TFvec,selvec)
by(toy[toynsel,]$diam,toy[toynsel,]$group,mean)
Jim
On 4/3/16, Pedro Mardones <mardones.p at gmail.com> wrote:
> Dear all;
>
> This must have a r...
2010 Apr 26
1
Dropping "trailing zeroes" in longitudinal data
...quot;true" data or not, but we'd like to at least do some sensitivity
analyses by dropping "trailing zeroes" (ie, when there are non-zero
responses for some duration of the data that then "flat line" into all
zeroes to the end of the time period)
I've included a toy dataset below.
Basically, we have the data in the "long" format, and what I'd like to
do is subset the data.frame by deleting rows that occur at the end of a
person's data that are all zeroes. In a nutshell, select rows from a
person that are continuously zero, up to first no...
2010 Aug 12
4
conditional selection of dataframe rows
Dear helpeRs,
I have a dataframe (14947 x 27) containing measurements collected
every 5 seconds at several different sampling locations. If one
measurement at a given location is less than zero on a given day, I
would like to delete all measurements from that location on that day.
Here is a toy example:
toy <- data.frame(CH = rep(3:5,3), DAY = c(rep(4,5), rep(5,4)),
SLOPE = c(seq(0.2,0.6, .1),seq(0.2, -0.1, -0.1)))
In this example, row 9 has a negative measurement for Chamber 5, so I
would like to delete row 6, which is the same Chamber on the same
day, but not row 3, which is the...
2019 Nov 18
2
Crash using exceptions
...LLVM. I noticed that llvm-config --cxxflags
includes the -fno-exceptions flag. Do I need to throw no exceptions
whatsoever in my application to use LLVM JIT?
As a minimal example, I modified the code in
https://github.com/llvm-mirror/llvm/tree/master/examples/Kaleidoscope/BuildingAJIT/Chapter2.
In toy.cpp, I update LogError to throw an exception:
std::unique_ptr<ExprAST> LogError(const char *Str) {
fprintf(stderr, "Error: %s\n", Str);
throw std::runtime_error("");
}
and I catch that exception in MainLoop:
static void MainLoop() {
while (true) {
fprintf(stde...
2008 Jun 09
7
[LLVMdev] regression? Or did I do something wrong again?
I don't know if the toy program in chapter 4 of the tutorial
implementing Kaleidoscope in llvm with C++ is part of your
regression suite, but with the version of llvm I installed
last weekend, it does not compile:
hendrik at lovesong:~/dv/llvm/tut$ g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native`...
2016 Feb 16
4
[help] Kaleidoscope build fails after llvm-3.8
Hello ,
I have build llvm from release_38 branch ( only llvm and clang ) and
install it. My DYLD_LIBRARY_PATH points to installation-directory/lib.
I am compiling example files for Kaleidoscope with following command :
clang++ -g toy.cpp -std=c++11 `llvm-config --cxxflags --ldflags
--system-libs --libs core mcjit native` -O3 -o toy
but it fails with following error:
Undefined symbols for architecture x86_64:
"llvm::CmpInst::CmpInst(llvm::Type*, llvm::Instruction::OtherOps,
llvm::CmpInst::Predicate, llvm::Value*, llvm::V...
2014 Jun 16
3
[LLVMdev] include's are not being located
...’t know where to start reading
>> (besides the getting started page on llvm) :)
>
> You're still trying to build the tutorial right? I assume you
> successfully built LLVM already. So if you're building the tutorial
> you probably just need this.
>
> clang++ -g -O3 toy.cpp `llvm-config --cxxflags --ldflags --libs core` -o toy
>
> I see your `llvm-config --cxxflags`` output already has --std=c++11
> already in it (your --cppflags does not. I'm not sure why).
Dan, the preprocessor shouldn't need to know about '--std=c++11' right?
Maybe the...
2010 Jan 31
2
[LLVMdev] Compiling Kaleidoscope on Windows
...ne knows what (or how to find out what) the actual
command to compile Kaleidoscope is? I followed cmake/nmake down
through maybe half a dozen levels before getting lost, so I tried to
develop a compiler invocation from scratch. I got as far as
cl /EHsc /I\d\llvm-2.6\include /I\llvm\include /wd4355 toy.cpp
which successfully generated toy.obj and spat out 86 link time error
messages -- as expected, it needs the libraries specified.
cmakelists.txt says set(LLVM_LINK_COMPONENTS core jit interpreter
native) so I made a guess at the .lib file corresponding to the first
of these, and tried
cl /EHsc...
2006 Jun 08
1
expand only one of variable
Dear all,
I want to expand only one of variable in data frame and the others
variable will be following with the expand variable. Here my toy example:
toy.df <- data.frame(size=c(3,1,2,0,3,5,1,0), group=LETTERS[1:8],
country=c("Germany","England","Argentina","Mexico","Italy","Brazil","France","Spain"),
w=rep(0,8), d=rep(0,8), l=rep(0...
2010 Mar 14
4
[LLVMdev] Problem linking with llvm on mac os 10.6
Hello all,
I am trying to build the kaleidoscope sample code on Mac os (10.6).
What I have done to get llvm libraries :
1) Downloaded llvm-2.6 source code
2) ./configure
3)make
4) make intall
Then I tried to build kaleidoscope as described in the tutorial:
g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags --libs core` -o toy
I get typical link time errors (undefined symbols: ...) as if the linked libraries were not found ( llvm-config seems to work fine)
The very first errors are the following:
ld: warning: in /usr/local/lib/libLLVMCore.a, file was built for...
2007 Mar 25
1
controlling panel.width and panel.height in viewports
...conditions: (a) I only want the
levelplot to appear (I don't want axes, colour key, etc) in the
viewport and (b) I want the levelplot to expand to the maximum
allowable space in the viewport while observing the aspect ratio of the plot.
Condition (a) is OK, but (b) is giving me trouble. A toy example is:
library(lattice)
library(grid)
x <- 1:10
y <- 1:10
grid <- expand.grid(x=x, y=y)
grid$z <- grid$x*grid$y
asp.ratio.1 <- 2
asp.ratio.2 <- .5
asp.ratio.3 <- 1
test.1 <- levelplot(z~x*y, grid, cuts = 5, xlab="", axes = FALSE,
aspec...
2015 Jun 27
7
[LLVMdev] [RFC] Improving the testing of exported LLVM CMake targets
...as
documented in [1].
Right now we don't test this feature **at all** and as a result it has
been or is
* broken in trunk
* broken by those packaging LLVM
* broken in the official release binaries
I'd like to propose a few ideas I have to improve this situation.
I've created a small toy project [2] that uses the exported LLVM CMake
targets. What I'd like to happen is for this project to become part of
the LLVM source tree (or as a sub project) so that it can be tested in
various scenarios. I do not want this toy project to be a maintenance
burden so it makes very minimal use o...