« first day (765 days earlier)      last day (2071 days later) » 

4:34 AM
I was just running a benchmark for blas subroutines in the xtensor linear algebra library vs. simd-accelerated elementwise xnor and sum; it seems like xtensor is much slower. Can anyone speculate why this is the case? pastebin.com/QZRD3mz3
time: 5.63 # cblas subroutine
time: 31.921 # fake blas dot product with int8's
time: 46.325 # elementwise ^ and ! and then sum
 
 
8 hours later…
12:30 PM
Thanks @milleniumbug
I actually did have a question, but ended up finding a different solution instead for now.
 
 
2 hours later…
2:26 PM
@OneRaynyDay did you profile?
 
 
1 hour later…
3:54 PM
Will someone please explain this piece of code to me... this code is related to creation of Linked Lists
struct node
{
	int data;
	node *next;
};

node *append(node *head,int x)
{
	node *temp,*ptr;
	temp=new node;
	temp->data=x;
	temp->next=NULL;

if(head==NULL)
	head=temp;
else
{
	ptr=head;
	while (ptr->next!=NULL)
		ptr=ptr->next;
		ptr->next=temp;
}
return head;
}
 
this looks like a fairly bad (also: with badly formatted code) implementation of a linked list
 
@Mgetz I didn't yet profile. I'll perf + flame graph it today at work. Basic benchmarking was all I did yesterday
 
nwp
@tatan Which part is not clear?
 
@nwp The if and else part in the second half
 
nwp
That part is for when the list is not empty and it finds the end and then tells the last value that it now has a new next node which is temp.
It doesn't look like it due to the terrible formatting but ptr->next=temp; is outside of the loop.
 
 
3 hours later…
7:02 PM
hey guys - I tried cmake'ing a file that requires intrinsics, and I get the following error:
error: '__mm256i' was not declared in this scope
     __mm256i tmp = _m256_loadu_si256((const __mm256i *) data);
what I have done so far: 1. added -march=haswell to my cmake flags in : set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=haswell"), and 2. included immintrin.h in my includes
not really sure what else I need
nevermind. Derp. It's __m256i
 

« first day (765 days earlier)      last day (2071 days later) »