小编she*_*rif的帖子

如何在android状态栏中创建通知?

嗨,只是想分享我的android通知构建器,答案如下.

请分享任何变化.

notifications android

5
推荐指数
1
解决办法
1053
查看次数

使用SSE进行乘法(x*x*x)

我正在尝试使用SSE优化立方体功能

long cube(long n)
{
    return n*n*n;
}
Run Code Online (Sandbox Code Playgroud)

我试过这个:

return (long) _mm_mul_su32(_mm_mul_su32((__m64)n,(__m64)n),(__m64)n);
Run Code Online (Sandbox Code Playgroud)

而且表现更差(是的,我从未对sse做过任何事情).

是否有可以提高性能的SSE功能?或者是其他东西?

cat/proc/cpuinfo的输出


processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 15
model name  : Intel(R) Xeon(R) CPU            3070  @ 2.66GHz
stepping    : 6
cpu MHz     : 2660.074
cache size  : 4096 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : …

c sse

1
推荐指数
2
解决办法
550
查看次数

ejb 3.1丢弃有状态会话bean

我目前正在针对junit测试(学校作业)进行编程
.任务是创建一个处理作业分配的有状态会话bean

submitAssignments方法应该丢弃会话bean,以便junit测试工作

    jobManagementBean.submitAssignments();
    // check if the bean was discarded after submitAssignments() was
    // called successfully!
    try {
        jobManagementBean.getCache();
        fail(NoSuchEJBException.class.getName() + " expected!");
    } catch (NoSuchEJBException e) {
        // Expected
    }
Run Code Online (Sandbox Code Playgroud)

我怎么能丢弃豆子?

ejb-3.1

1
推荐指数
1
解决办法
462
查看次数

使用SSE(x*x*x)+(y*y*y)进行乘法

我正在尝试使用SIMD优化此功能,但我不知道从哪里开始.

long sum(int x,int y)
{
    return x*x*x+y*y*y;
}
Run Code Online (Sandbox Code Playgroud)

反汇编函数如下所示:

  4007a0:   48 89 f2                mov    %rsi,%rdx
  4007a3:   48 89 f8                mov    %rdi,%rax
  4007a6:   48 0f af d6             imul   %rsi,%rdx
  4007aa:   48 0f af c7             imul   %rdi,%rax
  4007ae:   48 0f af d6             imul   %rsi,%rdx
  4007b2:   48 0f af c7             imul   %rdi,%rax
  4007b6:   48 8d 04 02             lea    (%rdx,%rax,1),%rax
  4007ba:   c3                      retq   
  4007bb:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)
Run Code Online (Sandbox Code Playgroud)

调用代码如下所示:

 do {
for (i = 0; i < maxi; i++) { …
Run Code Online (Sandbox Code Playgroud)

c x86 sse simd

0
推荐指数
1
解决办法
646
查看次数

让我的行为奇怪

我有以下程序:

mnr = [0,1,2,3,4,5,6]  :: [Int]
name = "Max Mustermann" :: String
kzn = "e53X" :: String

t1 = ("p1",(take 2.tail)mnr, (take 3.words.(let no n= name;in no))"No");
{-result: t1 == ("p1",[1,2],["Max","Mustermann"]) -}
Run Code Online (Sandbox Code Playgroud)

为什么忽略"否",做let no n= name;in no什么?

haskell let

0
推荐指数
1
解决办法
150
查看次数

标签 统计

c ×2

sse ×2

android ×1

ejb-3.1 ×1

haskell ×1

let ×1

notifications ×1

simd ×1

x86 ×1